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).