Scenario on the combination of Transaction variant and enhancement framework

...Previous

The following screen appears after clicking the option Show implicit enhancement options  

“““Indicates that we can write the code here.

 

Now right click on the line below and create the enhancement implementation.

 

 

Now choose Code

 

 

 

The following screen appears. Now click on Create implementation button at the bottom.

 

 

After clicking on the create button, Give the name and the description of the enhancement and click on continue.  

Now the created implementation appears in the below list. Select the enhancement and click on continue.

 

 

Now place the desired code in the Enhancement and End Enhancement section shown below.

 

Code:

Code:

DATA: LV_STCODE TYPE SHDTV-TCODE.

CALL   'DY_GET_CURRENT_TRANSACTION'     “GET THE TCODE FOR TRANSACTION VARIANT

 ID 'TRANSACTION_NAME'

 FIELD LV_STCODE.

  IF LV_STCODE = 'ZMEK2’.

     CASE FD_FIELD.

          WHEN ‘LIFNR’.

           CLEAR  ‘LFA1-NAME1’.

          WHEN ‘MATNR’.

          CLEAR ‘MAAPV-ARKTX’.

          WHEN ‘EKORG’.

          CLEAR ‘T024E-EKOTX’.

    ENDCASE.

ENDIF.

 

Output:

Now when you execute ZMEK2,

The descriptions of vendor, material and purchase organization are hidden by implicit enhancement technique.  

The menu functions (drilldowns) are disabled by transaction variant.

Please send us your feedback/suggestions at webmaster@SAPTechnical.COM 

HomeContribute About Us Privacy Terms Of Use • Disclaimer • SafeCompanies: Advertise on SAPTechnical.COM | Post JobContact Us  

Graphic Design by Round the Bend Wizards

footer image footer image