Tuesday, October 13, 2020

How to make field Address required in transaction KE51 in SAP

How to make field Address required in transaction KE51 in SAP ABAP.

Normally SAP doesn’t provide us configuration and user exit to make fields in Address tab required in transaction KE51 . but after little bit of debug ABAP Code, i found the clue that you need to create enhancement point in include program LRKPMF05  in subroutine md_user_command_handle.

Example:

FORM md_user_command_handle CHANGING p_fcode.

"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""$"$\SE:(1) Form MD_USER_COMMAND_HANDLE, Start                                                                                                                A

*$*$-Start: (1)---------------------------------------------------------------------------------$*$*

ENHANCEMENT 1  ZIMP_CO_REQUIRED_ADDR_KE51.    "active version

"Added By Rachmad Kurniawan

"Tgl 06/10/2016

IF md_fcode = 'MD_SAVE'.

 IF PRCT_V-STRAS EQ ''.

  MESSAGE 'You must input Street' TYPE 'E'.

ENDIF.

IF PRCT_V-ORT01 EQ ''.

 MESSAGE 'You must input Kota' TYPE 'E'.

ENDIF.

 IF PRCT_V-LAND1 EQ ''.

 MESSAGE 'You must input Country' TYPE 'E'.

ENDIF.

 IF PRCT_V-REGIO EQ ''.

 MESSAGE 'You must input Region' TYPE 'E'.

ENDIF.

 ENDIF.

ENDENHANCEMENT.

1 comment: