In ABAP Selection Screen you can make certain fields OBLIGATORY. This can be done by using the addition OBLIGATORY. Please find the syntax below.
SELECT-OPTIONS: s_vbeln for vbak-vbeln OBLIGATORY
If the addition OBLIGATORY is used the user is forced to enter values in the respective fields before proceeding further. A question mark appears in the selection screen for the SELECT-OPTIONS field.Find the code below.
REPORT ZEX_SELECTOPTIONS.
Tables: VBAK,
VBAP.
Data: int_vbak type vbak occurs 0 with header line.
Select-options: s_vbeln for vbak-vbeln OBLIGATORY.
Select * INTO int_VBAK from VBAK where
VBELN in s_vbeln.
APPEND int_VBAK.
CLEAR int_VBAK.
ENDSELECT.
loop at int_vbak.
Write:/ int_vbak-vbeln, int_vbak-AUART.
endloop.
Tables: VBAK,
VBAP.
Data: int_vbak type vbak occurs 0 with header line.
Select-options: s_vbeln for vbak-vbeln OBLIGATORY.
Select * INTO int_VBAK from VBAK where
VBELN in s_vbeln.
APPEND int_VBAK.
CLEAR int_VBAK.
ENDSELECT.
loop at int_vbak.
Write:/ int_vbak-vbeln, int_vbak-AUART.
endloop.
No comments:
Post a Comment