Code :
REPORT ZVP_F4_HELP.
PARAMETERS: P_NAME TYPE CHAR10.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_NAME.
PERFORM GET_HELP.
AT SELECTION-SCREEN.
IF P_NAME = 'HELLO'.
MESSAGE 'SUCCESS' TYPE 'S'.
ENDIF.
FORM GET_HELP.
TYPES: BEGIN OF TY_HELP,
NAME TYPE CHAR15,
END OF TY_HELP.
DATA: IT_HELP TYPE STANDARD TABLE OF TY_HELP,
WA_HELP TYPE TY_HELP,
IT_RETURN TYPE TABLE OF DDSHRETVAL,
WA_RETURN TYPE DDSHRETVAL.
WA_HELP-NAME = 'HELLO'.
APPEND WA_HELP TO IT_HELP.
CLEAR WA_HELP.
WA_HELP-NAME = 'WORLD'.
APPEND WA_HELP TO IT_HELP.
CLEAR WA_HELP.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
RETFIELD = 'NAME'
VALUE_ORG = 'S'
TABLES
VALUE_TAB = IT_HELP
RETURN_TAB = IT_RETURN.
*read and transfer the selected value to field / parameter.
READ TABLE IT_RETURN INTO WA_RETURN INDEX 1.
P_NAME = WA_RETURN-FIELDVAL.
ENDFORM.
Output :
IDE Used To Test This Code : SAP Login 730.
Try this code in your computer for better understanding. Enjoy the code. If you have any Question you can contact us or mail us.We will reply you as soon as possible.
REPORT ZVP_F4_HELP.
PARAMETERS: P_NAME TYPE CHAR10.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_NAME.
PERFORM GET_HELP.
AT SELECTION-SCREEN.
IF P_NAME = 'HELLO'.
MESSAGE 'SUCCESS' TYPE 'S'.
ENDIF.
FORM GET_HELP.
TYPES: BEGIN OF TY_HELP,
NAME TYPE CHAR15,
END OF TY_HELP.
DATA: IT_HELP TYPE STANDARD TABLE OF TY_HELP,
WA_HELP TYPE TY_HELP,
IT_RETURN TYPE TABLE OF DDSHRETVAL,
WA_RETURN TYPE DDSHRETVAL.
WA_HELP-NAME = 'HELLO'.
APPEND WA_HELP TO IT_HELP.
CLEAR WA_HELP.
WA_HELP-NAME = 'WORLD'.
APPEND WA_HELP TO IT_HELP.
CLEAR WA_HELP.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
RETFIELD = 'NAME'
VALUE_ORG = 'S'
TABLES
VALUE_TAB = IT_HELP
RETURN_TAB = IT_RETURN.
*read and transfer the selected value to field / parameter.
READ TABLE IT_RETURN INTO WA_RETURN INDEX 1.
P_NAME = WA_RETURN-FIELDVAL.
ENDFORM.
Output :
IDE Used To Test This Code : SAP Login 730.
Try this code in your computer for better understanding. Enjoy the code. If you have any Question you can contact us or mail us.We will reply you as soon as possible.
Post a Comment