Friday 30 September 2016

The hassle with function module calls - part 2

In the last blog post I wrote about my approach to standard function module wrappers. See The hassle with function module calls

Thanks to your participation, there was a lot of very helpful input about this matter from the community. This lead me to a better understanding of exception classes and I now set up a handy mechanism to transform the function module exceptions into appropriate class-based exceptions. Hoping the fruitful discussion is going on, I'd like to share it!

With or without message?


Most function modules pass system messages when raising classical exception. For example, look at function SX_INTERNET_ADDRESS_TO_NORMAL, that can validate mail addresses:

Thursday 29 September 2016

Simple event handling in ABAP OOPS

Introduction:


This document is to show how to make a simple interactive report in OOPS by using event 'HOTSPOT_CLICK' present in standard sap class 'CL_GUI_ALV_GRID'.

I have taken a scenario of displaying the PO (Header and Item) data for a vendor by creating event driven interactive report. The program is created in ALV+OOPS. The interaction will be done on vendor number and PO document number.

The flow will be: - Vendor Details -> PO (Header) -> PO (Item)

Wednesday 28 September 2016

Three different ways to serialize and deserialize complex ABAP data

If you've ever written an RFC-enabled function that transfers a structure, then you've probably seen a code inspector error like this:

Three different ways to serialize and deserialize complex ABAP data

"The type "BKPF" or the type of one of its subcomponents can be enhanced. An enhancement can cause offset shifts when the RFC parameters are transferred."

Monday 26 September 2016

The hassle with function module calls

Do you know this? You use a function module from SAP (let's say, the very useful START_TIME_DETERMINE), and you use it often. But every time you insert it, half a page of coding is generated, the parameters do not get syntax checked and inline data declarations are not supported.

It would be much more convenient having the same functionality in a method, wouldn't it?

So I create a wrapper method. But where to put it? After a year, I want to find it easily, and I want my colleagues to be able to find it either. Here's my approach:

Saturday 24 September 2016

Language Translation Tool for SAP Technical Objects

Purpose:


The tool developed increases the efficiency of language translation objects as it helps in avoiding human errors. This tool also does the translation for Reports, Function groups, Includes in seconds. This tool not only saves time for translation but also helps in reviewing the translation done with an additional Excel tool.


Traditional method of LT


In most of the cases the Language translation for various Custom Texts is made available in Excel worksheet.
Below is sample screen shot of the same.

Friday 23 September 2016

How to compare the contents of transport Request?

Overview:

I got this requirement in my project to compare the contents of each transport.
Luckily this 2 programs came in handy for me. Hope so too for the peeps who'll have the same requirement.

Below are the sample transports to be compared (DIFFERENCE) PART1/2

Thursday 22 September 2016

Selection Screen Variants - Part III

My Previous Blogs in the series:

1. Selection Screen Variants - Part I
2. Selection Screen Variants - Part II

Dynamic Variants: The values in such variants are dynamic and can vary over time.

How to use table TVARVC for dynamic variants?: The table TVARVC can be used for creating variants where input data needs to be changed frequently.

We have to first maintain high and low values for a field in the table TVARVC .Transaction STVARVC can be used to maintain  these values in client 000. In other clients the table can be directly maintained in SM30.

Wednesday 21 September 2016

Selection Screen Variants - Part II

In my previous blog Selection Screen Variants - Part I


Variant Attributes:


Once we enter values on the screen and click on save there are various attributes that we can select. Here we will look into the details with the help of an example.

We have a selection screen with three fields namely: Material (Parameter) , Date and Plant ( Select Options).

Monday 19 September 2016

Selection Screen Variants - Part I

What are variants?


In SAP ABAP reports have a mechanism for entering values for database selection or for performing different calculations through SELECTION SCREENS.

Selection screen provides a user an option to execute the reports or transactions as per his requirements and thus provide a range of values as an input.

Whenever there is a requirement to execute a report with the same set of input values again and again, for large selection screens entering the same values can be a tiresome and boring task. Thus SAP has provided a functionality to save these values in a set called as VARIANTS.

Friday 16 September 2016

Creation of Selection Screen Variant in Module Pool Programming

Introduction


Selection screen variants can be stored only in Reports. This document explains on how to create Selection screen variant in a module program.

Preview of Output


Creation of Selection Screen Variant in Module Pool Programming

Thursday 15 September 2016

A simple tool to display product hierarchy in an ALV tree

Recently I start to study SD and I found the product hierarchy in transaction code V/76 could not be viewed in tree style and it is not so convenient to check:

A simple tool to display product hierarchy in an ALV tree

Tuesday 13 September 2016

General properties of ABAP Classes / Interfaces

Every day you create or change ABAP class in class builder. When you activate your change, have you noticed a series of objects with several "=" in the middle part of each?

General properties of ABAP Classes / Interfaces

Monday 12 September 2016

ABAP News for Release 7.50 - ABAP Channels Reloaded

ABAP Channels (ABAP Messaging Channels AMC and ABAP Push Channels APC) were introduced with ABAP 7.40, SP02, SP05. They enable an event based bidirectional communication between ABAP application servers and with the internet. For that, a dedicated Push Channel Protocol (PCP) can be used since 7.40, SP08. Before ABAP 7.50, the communication between ABAP servers and the internet was restricted to the Web Socket Protocol (WS) and the AS ABAP acting as a stateless APC server. The following features are new with ABAP 7.50:

Saturday 10 September 2016

A tale of two SAP incidents

Summer is a strange time for SAP teams: lots of people go on holiday, projects are left to tick over, burning issues are put on hold. A time for those who remain to take it easy a while, take a look at those really intractable problems or catch up on technical innovations and pet projects with no-one to bother you. This is all fine in theory except that the business doesn't rest and production incidents still occur. This is the story of two such incidents and how SAP support helped us.

The first occurred right at the start of August, when nearly all my development team had already left: the SWN_SELSEN production job had started to abend. I groaned inwardly when I heard the news. Nothing could be more simple on the face of it than SWN_SELSEN: it simply selects workflow notifications and sends them out. There is no variant but the customising is fearsomely complicated and you needed to be a deeply experienced workflow guru (something I am not) to understand the code and the exits. This was a high-profile problem too - though the business impact was small, the program was sending PO approval notifications to all the top guys in the company, so when these stopped, important people noticed.

Thursday 8 September 2016

A kill to an ABAP CDS View?

In the first blog of this series we considered that CDS views are not just for the super cool HANA types, but can also be used to escape when marooned on planets with nothing but a lowly Oracle DB. Many of SAP's customers I suspect have only just begun to dip their toes into these scary HANA waters, and so its important to understand what of this new technology we can learn and use today (whilst still on the traditional non-HANA DB); and what must wait for a possible future HANA implementation.

In today's blog we will consider the performance of the ABAP CDS view with an Oracle DB, if we are without the HANA DB in the back end; all from the perspective of a certain double-o secret agent. In Teched I posed the question to an SAP expert, (Who shall remain nameless, less Spectre (of course we all know that SAP==Spectre ABAP Programmers) learn of his details and track him down), here I was lead to believe that even on Oracle the use of the ABAP CDS views would give major performance benefits over the equivalent SQL statement. I have to say I had my suspicions that this may have been a double agent trying to lure me, and so without further ado on returning from TECHED set out to test the ABAP CDS view tech with the help of my very own 00-agent and the necessary 00 CDS-View.

Wednesday 7 September 2016

Setting Code Inspector Custom Variant as Default Code Inspector variant

In our projects we generally create a custom variant for the code inspectors, which take cares of our project related Naming convention and coding standard.
If you are new in creating Code inspector variant you can refer below link.

http://sapabapcentral.blogspot.com/2015/09/creating-code-inspector-check-variant.html

In general whenever we develop any object or make any changes in any object, we go to Transaction SCII and run the code inspector for Z created Variant instead of directly checking it from Object menu Class/Program/Function module etc. ->Check -> code inspector.

Saturday 3 September 2016

Output Catcher for ABAP

Output Catch is a small SAP server application to catch text on the presentation server from ABAP on the application server. You can send text direct to the editor of output catch, to a specific log file on the client, to a Windows debugger or to the Windows event protocol of the client.

It is very easy to use Output Catch:
  1. Register the Destination OUTPUTCATCH with the TAC SM59.
  2. Start the program OutptCatch.exe.
  3. Fill the connection parameters.

Friday 2 September 2016

Creating Custom Fields in ME31K , ME32K , ME33K

As we know the enhancement to the screen is not impossible but it is not supported because we need some S_DEVELOP authorisation and modify some of the Standard table with z fields .That why please consider this document only if water is above your head and is a critical requirement of client
1) Create a Project using CMOD Tcode.
2) Give the enhancement name MM06E005.
3) Go to component Tab.


Creating Custom Fields in ME31K , ME32K , ME33K

Thursday 1 September 2016

Smartform Version Comparison

There has long been a requirement, where we need to compare 2 Smartform versions.
In SAP there is no feature for this, there are no past versions maintained and also certainly no remote comparison.

This makes comparison and version management of smartforms a tedious task.

I was faced with such a task too. There were multiple complex smartforms and due to multiple activities and phases of my project working simultaneously, it was very difficult to trace what went wrong and definitely made it a lot of effort to maintain and revert changes in case of any issues.

Thus began my journey down the lane on how to overcome this problem.