Monday, May 30, 2016

User Exit - Explicit Enhancement Point

When an enhancement is used inside a custom program without disturbing the source code, it is called Explicit enhancement. Here the program is not SAP standard one. That is why it is called explicit. If it is standard one then it will be called implicit. We already have covered the implicit enhancement.

Explicit enhancement is saved in a package and transport in a similar way of implicit enhancement. Explicit enhancement has two types.
A.      Enhancement Point – when we use point, we can add additional functionality to the original program. Here the original program executes with enhanced function.
B.      Enhancement Section – when we use section, the original program is not executed. The enhanced program is executed.

In the following example we have demonstrated an explicit enhancement point. In this program originally we have printed the output of a program with no header information. Now we create an explicit enhancement point where the header information has been implemented. Hence the final output shows the complete output of the Airline information.

1.    We must have an activated custom program to implement explicit enhancement.


2.    Now keep the cursor where we need an enhancement. Right click > Enhancements > Create.

3.    Create Enhancement Point with Code option. Enter the name, description & package as follows.

4.    Now after saving the original program will look as follows. Click on the Enhance (Coin) button.

5.    Now keep the cursor on ENHANCEMENT key word. Right click > Enhancement Implementation > Create.

6.    Enter details and OK.

7.    Now write your enhanced code under Enhancement – Endenhancement. Then activate this.

8.    Finally activate the program and execute.

9.    We have the complete header information.

Similar kind of approach can be achieved by using Enhancement Section of explicit enhancement. In the following example we have used enhancement section and proceed the following output.


REPORT  zsr_test1 NO STANDARD PAGE HEADING.

TABLES sflight.
DATA: wa_sflight TYPE sflight,
      it_sflight TYPE TABLE OF sflight.

INITIALIZATION.
  SELECT-OPTIONS s_carrid FOR sflight-carrid.

START-OF-SELECTION.
  SELECT * FROM sflight INTO TABLE it_sflight
    WHERE carrid IN s_carrid.

ENHANCEMENT-SECTION     zsr_enh_s SPOTS zsr_enh2.

END-ENHANCEMENT-SECTION.
*$*$-Start: ZSR_ENH_S---------------------------------------------------------------------------$*$*
ENHANCEMENT 1  ZSR_ENH2.    "active version
  IF it_sflight IS NOT INITIAL.
    WRITE: / 'Airline Code',
          15 'Flight No.',
          27 'Flight Date',
          45 'Maximum Seat',
          60 'Occupied Seat'.
    ULINE.
    SKIP.
  ENDIF.
ENDENHANCEMENT.
*$*$-End:   ZSR_ENH_S---------------------------------------------------------------------------$*$*

  IF it_sflight IS NOT INITIAL.
    SORT it_sflight.
    LOOP AT it_sflight INTO wa_sflight.
      WRITE: /3 wa_sflight-carrid,
             15 wa_sflight-connid,
             27 wa_sflight-fldate DD/MM/YYYY,
             45 wa_sflight-seatsmax,
             60 wa_sflight-seatsocc.
    ENDLOOP.
  ENDIF.


20 comments:

Anonymous said...

Sir, It is Explicit enhancement and i think userexit enhancement is different.

Anonymous said...

Thank you for your effort.. it is very useful.
I just have one doubt here, you said "When an enhancement is used inside a custom program without disturbing the source code, it is called Explicit enhancement".
my question is, Custom codes can be edited in the change mode then what is the purpose of using explicit enhancement there.

Unknown said...

your blog excellent informatoin sap all modules mainly hana,mm,fico,abap ,
thank you for information
best online tarinings!

Anonymous said...
This comment has been removed by the author.
buyoriginalms said...
This comment has been removed by the author.
Anonymous said...
This comment has been removed by the author.
buyoriginalms said...
This comment has been removed by the author.
Anonymous said...
This comment has been removed by the author.
Anonymous said...
This comment has been removed by the author.
Anonymous said...
This comment has been removed by the author.
Anonymous said...
This comment has been removed by the author.
Anonymous said...
This comment has been removed by the author.
Anonymous said...
This comment has been removed by the author.
Unknown said...

thank you for the good information about sap. Excellent content

sap abap online training

online sap abap training in hyderabad

Anonymous said...

Thank you sir.This article is really contains lot more information about This Topic on. sapvideos

Anonymous said...

SAP Success Factors Real Time Hands on Training in Chennai...

Don't always Depend on Training Institute Alone and so please aware of Best Trainers too..

http://thecreatingexperts.com/sap-successfactors-training-in-chennai/

If You need a Best Trainer over SAP Success Factors Means??? Please ready for an DEMO From the Trainer MR.Karthick
CONTACT:8122241286

Both Classroom/Online Training is Available!!!!!!

Unknown said...

The information you posted here is useful to make my career better keep updates. sapvideos


Anonymous said...

Thank you. sir, Really I like your post on. sapvideos


Unknown said...

SAP FIORI Training in Chennai from the best and experienced SAP Consultants get trained and become the expert in SAP FIORI training in Chennai

Reach us @08122241286 & 9003085882

Anonymous said...

Great information. the information provided is of great

use as i got to learn new things. If you are looking for

real time training by industry experts with live projects

and placement support.kindly contact the creating experts

Reach our Technical Experts @ 8122241286 / 9003085882.