Saturday, January 5, 2013

Implicit Enhancement in SAP ABAP ( New Enhancement Framework ) with Tutorial

Introduction: Implicit enhancement is an enhancement option which is provided in new enhancement framework .
Requirement is to remove Reconstruct tab from WPDTC Transaction.:
There is something called transaction variant and screen variant .to solve this problem .But it has it’s own disadvantages like You can’t submit that Report using SUBMIT statement as it will not consider the changes done on screen using the variant.
Step 1:
Go to system status of transaction WPDTC and check the program name it is PDTC_REPORT.
Here you can see many Explicit enhancement (Source code plug-ins options).
To hide a screen element code can be done in AT SELECTION-SCREEN OUTPUT event.
There is a form named  pdtc_screen_output.
Step 2:
To see the Explicit enhancement option click on the spiral symbol on the top.
As we don’t have any explicit enhancement options the only possibility left is implicit enhancement.
To see the implicit Enhancement Go to menu path:
EDIT->Enhancement operations->Show implicit Enhancement Points.
As you know implicit enhancement options are provided at beginning and end of every method, function module and in subroutine.
Select the Enhancement mode as CODE.
The next pop up will show u the available Enhancement done in this Report, You can merge your enhancement in one of the available Enhancement or you can create your own. To create a new one click on the create icon.
Step 3:
Provide the Enhancement Implementation name and short text to it.
(Note: No need for composite enhancement implementation).
Click on the continue. It will again take you to the Select Enhancement popup. Select your created enhancement and continue.
Step 4:
Now you can see some space in standard code to put your own code.
As per the requirement we need to de-activate the last tab.
Go to layout of the screen 1000, and find the name of the third tab. To make your work easy the third tab name is : TABSTR_4.
Here is the simple code which can loop at the screen and deactivate the third tab.
loop at screen.
if screen-name = ‘TABSTR_4′.
screen-active = 0.
Put the above code inside the Enhancement and activate it.
Step 5:
Go to Transaction WPDTC and check that the third tab is invisible or not. ( if not don’t look puzzled just check whether you have followed the steps properly or not ).
Post a Comment