Hi All. Below the code for demonstrate how to perform a manual value help(F4) on a particular field using "PROCESS ON VALUE-REQUEST" statement and how to return values back to I/O field on your screen.
* Screen flow logic........
PROCESS BEFORE OUTPUT.
*MODULE PBO_MODULE.
PROCESS AFTER INPUT.
*MODULE PAI_MODULE.
PROCESS ON VALUE-REQUEST. "F4
FIELD zzautfor MODULE help_autfor.
*&---------------------------------------------------------------------*
*& Module help_autfor INPUT
*&---------------------------------------------------------------------*
MODULE help_autfor INPUT.
DATA: t_return LIKE ddshretval OCCURS 0 WITH HEADER LINE.
DATA: BEGIN OF t_value OCCURS 0 ,
zzautfor LIKE eban-zzautfor.
DATA: END OF t_value.
t_value = 'SI'.
APPEND t_value.
t_value = 'NO'.
APPEND t_value.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
retfield = 'ZZAUTFOR'
value_org = 'S'
TABLES
value_tab = t_value
return_tab = t_return
EXCEPTIONS
parameter_error = 1
no_values_found = 2
OTHERS = 3.
IF sy-subrc = 0.
READ TABLE t_return INDEX 1.
MOVE t_return-fieldval TO zzautfor.
ENDIF.
ENDMODULE. "
Iscriviti a:
Commenti sul post (Atom)
2 commenti:
Simple and very practical example, Thanks!
Thank you! Very useful! =)
Posta un commento