Skip to Content

When we are dealing with plants and storage locations, clients usually ask for requirement where they enter the material number in the material number field, and for the plant and storage location fields they ask for F4 help such that it will only show details related to that particular material number only.

  1. i.e.,

When we enter a particular material number, the plant field F4 help is supposed to show only the plants to which this material is assigned to and when plant is entered the storage location field F4 help is supposed to show only the storage locations linked.

For this there are two simple function modules.

  1. 1.       For fetching linked plants, in the at selection screen event of the field plant we have to use below code

AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_WERKS. “ plant
CALL FUNCTION ‘EINGABEWERTE_WERK’
EXPORTING
KZALL            =
‘ ‘
KZBEW_WERK       =
‘ ‘
MATNR            = p_matnr “ pass material number
IMPORTING
WERKS            = p_werks. “ give the plant field name here for having F4 help on that field

  1. 2.       For fetching linked storage locations, in the at selection screen event of the field storage location we have to use below code

AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_LGORT.
CALL FUNCTION ‘EINGABEWERTE_LGORT’
EXPORTING
KZALL          =
‘ ‘
MATNR          = p_matnr “ pass material number
WERKS          = p_werks “ pass plant
IMPORTING
LAGERORT       = p_lgort “ give storage location field name here for having F4 help on that field
WERKS          = p_werks. “ give plant field name

Thus we can get only values matching the criteria.

To report this post you need to login first.

Be the first to leave a comment

You must be Logged on to comment or reply to a post.

Leave a Reply