Types of enhancement in SAP ABAP | Enhancement in SAP ABAP

enhancement in SAP ABAP, implicit enhancement in SAP ABAP, explicit enhancement in SAP ABAP, types of enhancements in SAP ABAP, screen enhancement in SAP ABAP, customer exits in SAP ABAP, types of enhancement in SAP ABAP, enhancement types in SAP ABAP, sap technical, enhancements IN SAP ABAP, enhancements abap, enhancement in SAP ABAP.

In this article we will discuss about the Enhancement in SAP ABAP. In SAP to process any kind of processing in the R/3 system we will run a transaction code. SAP provides a standard set of transaction codes to be used to process a particular task or particular operation, But sometimes we need to create a client-specific Customization in SAP because in standard transaction code may not support that particular process which user want then we need to enhance some screen as per user requirements.

types of enhancement in SAP ABAP
Enhancement In SAP ABAP

Enhancement In SAP ABAP

In SAP to process any kind of processing in the R/3 system we will run a transaction code. SAP provides a standard set of transaction codes to be used to process a particular task or particular operation, But sometimes we need to create a client-specific Customization in SAP because in standard transaction code may not support that particular process which user want then we need to enhance some screen as per user requirements.

types of enhancement in SAP ABAP
Enhancement Section

What is Enhancement?

Enhancement is the coding block provided by the the SAP to customize standard reports or standard transaction codes according to the business requirements or user requirements. SAP provides a standard set of transaction codes to be used to process a particular task or particular operation, But sometimes we need to create a client-specific Customization in SAP because in standard transaction code may not support that particular process which user want then we need to enhance the process.

Enhancement is a special kind of programming where we write code for used to enhance custom SAP screens and standard transaction. We can enhance a specific screen and transaction code as per business or user requirement. enhancement permits us to modify or add SAP standard business applications without changing in original or standard transactions.

To Achieve such kind of functionality we have 3 types of enhancements in SAP ABAP

  1. USER EXIT.
  2. CUSTOMER EXT.
  3. BADI (BUSINESS ADD INS)

USER EXIT

User exit considered for modification not an enhancement because here we are changing the existing code of standard transaction code. User Exits permit us to add our own functionality or our own business requirements to SAP standard program without make any changes on standard program functionality. User exits are implemented in the form of subroutines known as FORM EXIT. The user exits are normally collected at includes and attached to the standard program.

All User exits start with the word FORM USEREXIT(USER EXIT NAME)

FORM USEREXIT_PRICING_PREPARE_TKOMP.

ENDFORM.

Major issue is in user exit is finding correct user exit in whole programming code if it is exist for the purpose. When you find the correct user exit then code is inserted in the created block started with z in the subroutine.

FORM USEREXIT_PRICING_PREPARE_TKOMP.


ENHANCEMENT 2  ZSD_INV_CKECK.


DATA : V_TAXM1 TYPE MLAN-TAXM1 ,
       TX_ID(2) TYPE N .

IF VBRK-FKART <> 'ZF2'  .
    SELECT SINGLE TAXM5 FROM MLAN INTO V_TAXM1
      WHERE MATNR eq VBAP-MATNR
        AND ALAND eq 'IN'.

   IF sy-subrc eq 0 .

     TKOMP-KONDM = V_TAXM1 .
   ENDIF .

   SELECT SINGLE BRAND_ID FROM MARA INTO TKOMP-ZZBRAND_ID
      WHERE MATNR eq VBAP-MATNR .

ENDIF .



    SELECT SINGLE uname FROM  ZCHECK_UNAME INTO @DATA(lv_flag) WHERE uname = @sy-uname.
    IF lv_flag IS  INITIAL.
      IF SY-TCODE = 'VF01' OR SY-TCODE = 'VF02' OR SY-TCODE = 'VF03'.

        DATA(IT_XVBRP) = XVBRP[].
IF IT_XVBRP IS NOT INITIAL.
        SELECT * FROM zsd_param INTO TABLE @DATA(it_tax_12) WHERE ZPROGRAM = 'RV60AFZZ'
              AND FIELD1    = 'BILLTAX_12'
              AND FIELD2   = 'STEUC'
              AND VAL3    = 'X'.
        SELECT * FROM zsd_param INTO TABLE @DATA(it_tax_5) WHERE ZPROGRAM = 'RV60AFZZ'
              AND FIELD1    = 'BILLTAX_5'
              AND FIELD2   = 'STEUC'
              AND VAL3    = 'X'.
            SELECT * FROM zsd_param INTO TABLE @DATA(it_tax_COND_TYPE) WHERE ZPROGRAM = 'RV60AFZZ'
              AND FIELD1    = 'BILLTAX'
              AND FIELD2   = 'COND_TYPE'
              AND VAL3    = 'X'.

        LOOP  AT XKOMV ASSIGNING FIELD-SYMBOL(<FS_KOMV>) WHERE KPOSN  NE ''." XVBRP-POSNR "VBRP-POSNR
          READ TABLE IT_TAX_COND_TYPE INTO DATA(WA_COND_TYPE) WITH KEY  VAL1 = <FS_KOMV>-KSCHL.
        IF SY-SUBRC IS INITIAL.
          "boc arpita 11/2/22.
          READ TABLE IT_XVBRP INTO DATA(WA_XVBRP) WITH KEY  POSNR = <FS_KOMV>-KPOSN.
          IF SY-SUBRC IS INITIAL.
            SELECT SINGLE steuc FROM marc
            INTO @DATA(lv_steuc)
                  WHERE matnr = @WA_Xvbrp-matnr
                  AND werks = @WA_Xvbrp-werks.
            READ TABLE it_tax_12  INTO DATA(WA_TAX_12) WITH KEY  VAL1 = LV_STEUC+0(4).
            IF SY-SUBRC IS INITIAL.
              CASE <FS_KOMV>-KSCHL.
              WHEN 'JOIG'.
                IF ( <FS_KOMV>-KAWRT / WA_XVBRP-FKIMG ) LE 1000.
                  <FS_KOMV>-KBETR = '120.00'.
                  <FS_KOMV>-KWERT = ( <FS_KOMV>-KAWRT * 12 ) / 100.
                ENDIF.
              WHEN 'JOCG'.
                IF ( <FS_KOMV>-KAWRT / WA_XVBRP-FKIMG ) LE 1000.
                  <FS_KOMV>-KBETR = '60.00'.
                  <FS_KOMV>-KWERT = ( <FS_KOMV>-KAWRT * 60 ) / 1000.
                ENDIF.
              WHEN 'JOUG'.
                IF <FS_KOMV>-KBETR IS NOT INITIAL.
                  IF ( <FS_KOMV>-KAWRT / WA_XVBRP-FKIMG ) LE 1000.
                    <FS_KOMV>-KBETR = '60.00'.
                    <FS_KOMV>-KWERT = ( <FS_KOMV>-KAWRT * 60 ) / 1000.
                  ENDIF.
                ENDIF.
              WHEN 'JOSG'.
                IF ( <FS_KOMV>-KAWRT / WA_XVBRP-FKIMG ) LE 1000.
                  <FS_KOMV>-KBETR = '60.00'.
                  <FS_KOMV>-KWERT = ( <FS_KOMV>-KAWRT * 60 ) / 1000.
                ENDIF.
              ENDCASE.
            ENDIF.

            READ TABLE it_tax_5  INTO DATA(WA_TAX_5) WITH KEY  VAL1 = LV_STEUC+0(2).
            IF SY-SUBRC IS NOT INITIAL .
              READ TABLE it_tax_5  INTO WA_TAX_5 WITH KEY  VAL1 = LV_STEUC+0(4).
            ENDIF.
            IF SY-SUBRC IS INITIAL.
              CASE <FS_KOMV>-KSCHL.
              WHEN 'JOIG'.
                IF ( <FS_KOMV>-KAWRT / WA_XVBRP-FKIMG ) LE 1000.
                  <FS_KOMV>-KBETR = '50.00'.
                  <FS_KOMV>-KWERT = ( <FS_KOMV>-KAWRT * 5 ) / 100.
                ENDIF.
              WHEN 'JOCG'.
                IF ( <FS_KOMV>-KAWRT / WA_XVBRP-FKIMG ) LE 1000.
                  <FS_KOMV>-KBETR = '25.00'.
                  <FS_KOMV>-KWERT = ( <FS_KOMV>-KAWRT * 25 ) / 1000.
                ENDIF.
              WHEN 'JOUG'.
                IF <FS_KOMV>-KBETR IS NOT INITIAL.
                  IF ( <FS_KOMV>-KAWRT / WA_XVBRP-FKIMG ) LE 1000.
                    <FS_KOMV>-KBETR = '25.00'.
                    <FS_KOMV>-KWERT = ( <FS_KOMV>-KAWRT * 25 ) / 1000.
                  ENDIF.
                ENDIF.
              WHEN 'JOSG'.
                IF ( <FS_KOMV>-KAWRT / WA_XVBRP-FKIMG ) LE 1000.
                  <FS_KOMV>-KBETR = '25.00'.
                  <FS_KOMV>-KWERT = ( <FS_KOMV>-KAWRT * 25 ) / 1000.
                ENDIF.
              ENDCASE.
            ENDIF. 
          ENDIF.
          ENDIF.
        ENDLOOP.

   ENDIF.
      ENDIF.
    ENDIF.


ENDENHANCEMENT.
ENDFORM.

USER EXIT IN SAP ABAP

HOW TO FIND USER EXIT

To find the user exit just find out first program of that particular transaction code by using SE93. Then go to the hierarchy of that program and click on subroutines here you will find out all the user exits . this is the simplest way to find out all user exits list.

Customer Exits in SAP ABAP

Customer Exits are created for specific program or specific purposes, specific screen, and specific menus for standard applications. Customer exists are created in the form of function modules. In customer Exits we will update the screen, menu, and field.

Customer Exits is function Exits , here we use the statement Call customer-function. We will add our custom code inside the function module this is we called function Exits . In these function modules we have Z includes or we will create the Z includes to customization.

We have 2 standard tables MODSAP and MODCAT where we get all the function exists of enhancement.

There are 3 types of function exists.

  1. Menu Exists: – Menu Exists are reserved for SAP GUI interface.
  2. Screen Exists: – Screen Exists allows user to add fields to the screen of SAP program.
  3. Field Exists: – Field Exists is used to put validation on input fields.

Types of enhancements in SAP ABAP

We have various types of enhancement; we have these new enhancements concepts or Enhancement points

Types of enhancements in SAP ABAP
Enhancement point

1. implicit enhancement in SAP ABAP : – Implicit enhancement is the provided by SAP to implement enhancement at standard code of SAP. Implicit enhancement used to write our own code into a coding block, we can write our own code into a standard program or any function module or any include program.

We have standard include programs for different purposes.

MV45* for related to Orders.

MV50* for related to Delivery.

RV60* for related to Billing.

2. Explicit enhancement in SAP ABAP: – Explicit enhancement provided by the SAP at different section of the code. When we use enhancement in a custom program without disturbing the original source code, we called it Explicit enhancement here the program is not SAP standard program.

Related Posts:

TMG IN SAP ABAP.

WHAT IS SEARCH HELP IN SAP ABAP.

BAPI PO CREATE1

For the next blog please connect with us and follow us on twitter.com/einfonett

2 thoughts on “Types of enhancement in SAP ABAP | Enhancement in SAP ABAP”

Leave a Comment

%d bloggers like this: