Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Enhancements

Former Member
0 Kudos

Hi friends,

I understood the concepts of Enhancements like User exits,Functional Module Exits and Screen Exits .Could any one post me some real world examples .

2) I am planning to add Enhancements in my resume .How to defend before

interviewer.Could any one please give some samplecodes for this.

My id is :

(I already read different websites related to it.So no need of such posts.)

With Best Regards,

1 ACCEPTED SOLUTION

LeonardoAraujo
Active Contributor
0 Kudos

Enhancements can be done mainly in 3 ways:

- Old User-exit forms in predefined includes

- Enhancements and function module user-exits

- Badi's.

In ECC60 (Netweaver 2004s) you can also use the enhancement framework to create enhancements almost anywhere...

Examples:

For BAdI, take a look at the definition LE_SHP_DELIVERY_PROC.

There you will find an example implementation class (in SE19), CL_EXM_IM_LE_SHP_DELIVERY_PROC

method if_ex_le_shp_delivery_proc~change_field_attributes .

  data: ls_field_attributes type shp_screen_attributes,
        ls_xvbup            type vbupvb.

* Example 1: The field 'Actual goods-movement date' should not be
* changed by the user
  ls_field_attributes-name  = 'LIKP-WADAT_IST'.
  ls_field_attributes-input = 0.
  append ls_field_attributes to ct_field_attributes.

* Example 2: The material description should not be changed for a
* certain group of materials after completion of the picking process
  if is_lips-matnr cs 'ZZ'.
    read table it_xvbup into ls_xvbup with key mandt = is_lips-mandt
                                               vbeln = is_lips-vbeln
                                               posnr = is_lips-posnr
                        binary search.
    if ls_xvbup-kosta eq 'C'.
      ls_field_attributes-name  = 'LIKP-WADAT_IST'.
      ls_field_attributes-input = 0.
      append ls_field_attributes to ct_field_attributes.
    endif.
  endif.

endmethod. "IF_EX_LE_SHP_DELIVERY_PROC~CHANGE_FIELD_ATTRIBUTES

IN SE38 you can go to old user exit technology used in sales order processing: Ex: include MV45AFZZ

*---------------------------------------------------------------------*
*       FORM USEREXIT_FIELD_MODIFICATION                              *
*---------------------------------------------------------------------*
*       This userexit can be used to modify the attributes of         *
*       screen fields.                                                *
*       This form is processed for each field in the screen.          *
*                                                                     *
*       The use of the fields screen-group1 to screen-group4 is:      *
*                                                                     *
*       Screen-group1: Automatic modification contolles by transaction*
*                      MFAW.                                          *
*       Screen-group2: Contents 'LOO' for steploop-fields.            *
*       Screen-group3: Used for modififaction, which are dependent on *
*                      control tables or other fix information.       *
*       Screen-group4: Unused                                         *
*                                                                     *
*       For field mofifications, which are dependent on the document  *
*       status, you can use the status field in the workareas         *
*       XVBAP for item status and XVBUK for header status.            *
*                                                                     *
*       This form is called from module FELDAUSWAHL.                  *
*                                                                     *
*---------------------------------------------------------------------*
form userexit_field_modification.

* CASE SCREEN-GROUP3.
*   WHEN '900'.
*     IF VBAK-VBTYP NE 'A'.
*       SCREEN-ACTIVE = 0.
*     ENDIF.
* ENDCASE.

* CASE SCREEN-NAME.
*   WHEN 'VBAK-VBELN'.
*     SCREEN-ACTIVE = 0.
* ENDCASE.

endform.

Now you need to spend sometime on a system to figure it out.

Good luck,

Leonardo De Araujo

1 REPLY 1

LeonardoAraujo
Active Contributor
0 Kudos

Enhancements can be done mainly in 3 ways:

- Old User-exit forms in predefined includes

- Enhancements and function module user-exits

- Badi's.

In ECC60 (Netweaver 2004s) you can also use the enhancement framework to create enhancements almost anywhere...

Examples:

For BAdI, take a look at the definition LE_SHP_DELIVERY_PROC.

There you will find an example implementation class (in SE19), CL_EXM_IM_LE_SHP_DELIVERY_PROC

method if_ex_le_shp_delivery_proc~change_field_attributes .

  data: ls_field_attributes type shp_screen_attributes,
        ls_xvbup            type vbupvb.

* Example 1: The field 'Actual goods-movement date' should not be
* changed by the user
  ls_field_attributes-name  = 'LIKP-WADAT_IST'.
  ls_field_attributes-input = 0.
  append ls_field_attributes to ct_field_attributes.

* Example 2: The material description should not be changed for a
* certain group of materials after completion of the picking process
  if is_lips-matnr cs 'ZZ'.
    read table it_xvbup into ls_xvbup with key mandt = is_lips-mandt
                                               vbeln = is_lips-vbeln
                                               posnr = is_lips-posnr
                        binary search.
    if ls_xvbup-kosta eq 'C'.
      ls_field_attributes-name  = 'LIKP-WADAT_IST'.
      ls_field_attributes-input = 0.
      append ls_field_attributes to ct_field_attributes.
    endif.
  endif.

endmethod. "IF_EX_LE_SHP_DELIVERY_PROC~CHANGE_FIELD_ATTRIBUTES

IN SE38 you can go to old user exit technology used in sales order processing: Ex: include MV45AFZZ

*---------------------------------------------------------------------*
*       FORM USEREXIT_FIELD_MODIFICATION                              *
*---------------------------------------------------------------------*
*       This userexit can be used to modify the attributes of         *
*       screen fields.                                                *
*       This form is processed for each field in the screen.          *
*                                                                     *
*       The use of the fields screen-group1 to screen-group4 is:      *
*                                                                     *
*       Screen-group1: Automatic modification contolles by transaction*
*                      MFAW.                                          *
*       Screen-group2: Contents 'LOO' for steploop-fields.            *
*       Screen-group3: Used for modififaction, which are dependent on *
*                      control tables or other fix information.       *
*       Screen-group4: Unused                                         *
*                                                                     *
*       For field mofifications, which are dependent on the document  *
*       status, you can use the status field in the workareas         *
*       XVBAP for item status and XVBUK for header status.            *
*                                                                     *
*       This form is called from module FELDAUSWAHL.                  *
*                                                                     *
*---------------------------------------------------------------------*
form userexit_field_modification.

* CASE SCREEN-GROUP3.
*   WHEN '900'.
*     IF VBAK-VBTYP NE 'A'.
*       SCREEN-ACTIVE = 0.
*     ENDIF.
* ENDCASE.

* CASE SCREEN-NAME.
*   WHEN 'VBAK-VBELN'.
*     SCREEN-ACTIVE = 0.
* ENDCASE.

endform.

Now you need to spend sometime on a system to figure it out.

Good luck,

Leonardo De Araujo