DOCUMENTATION>Functionality
You can use this function module to reset selected help processor fieldcontents in the corresponding screen fields
data: dyname like d020s-prog value 'TESTPROG',
dynumb like d020-dnum value '100'.
data: begin of dynpfields occurs 3.
include structure dynpread.
data: end of dynpfields.
move 'TABNAME' to dynpfields-fieldname.
move 'Testtable' to dynpfields-fieldvalue.
append dynpfields.
move 'FIELDNAME' to dynpfields-fieldname.
move 'Testfield' to dynpfields-fieldvalue.
append dynpfields.
call function 'DYNP_VALUES_UPDATE'
exporting
dyname = dyname
dynumb = dynumb
tables
dynpfields = dynpfields
exceptions
invalid_abapworkarea = 01
invalid_dynprofield = 02
invalid_dynproname = 03
invalid_dynpronummer = 04
invalid_request = 05
no_fielddescription = 06
undefind_error = 07.
Notes
This function module should be used in the user-programmed help if oneor more screen fields are to be given selected values, e.g. if thevalues are to be reset after callingHELP_VALUES_GET_WITH_TABLE_EXT>.automatic value reset, as performed e.g. by the function moduleHELP_VALUES_GET_EXTEND>, can also beoverwritten.
Screen field contents are read by the function moduleDYNP_VALUES_READ>.
The field names in DYNPFIELDS can be defined by the user, as in theabove example,where the fields TABNAME and FIELDNAME occur on thescreen. A Dictionary reference of these fields (... like...) isunaffected.
The module DYNP_GET_STEPL> must first be calledin strp-loop or table control to set the correct step-loop.
All exceptions are called by the system function HELP_GET_FIELDS.Parameter description
Parameter Ref.field/structure Default value
Import parameters
DYNAME D020S-PROG
DYNUMB D020S-DNUM
Table parameters
DYNPFIELDS DYNPREAD
Exceptions:
INVALID_ABAPWORKAREA
INVALID_DYNPROFIELD
INVALID_DYNPRONAME
INVALID_DYNPRONUMMER
INVALID_REQUEST
NO_FIELDDESCRIPTION
UNDEFINED_ERROR
Parameter documentation
- Import parameters:
DYNAME: Program name (of the calling screen)
Meaning: Name of the program from which the function
module is called. Set sy-prog here, rather than
sy-repid. Reason: the value of
sy-repid is the main program of the help processor
function group.
Value range: none
Default : none
DYNUMB: Number of the calling screen
Meaning : Number of the screen, from which the call was
made. sy-dynnr can be set here.
Value range: none
Default : none
- Table parameters:
DYNPFIELDS: Table for reading the current screen values.
Meaning: Before the function module call, the
table contains the names of the screen fields
to be read, and the values read, as well as
the step-loop lines, if it is a
step-loop screen.
- Exceptions:
INVALID_ABAPWORKAREA: No work area
Meaning: No valid ABAP work area exists.
INVALID_DYNPROFIELD: No valid screen field
Meaning: The screen does not contain the
specified screen field.
INVALID_DYNPRONAME: No valid screen name
Meaning: The specified program does not exist.
INVALID_DYNPRONUMMER: No valid screen number
Meaning: The specified screen does not exist
in generated form.
INVALID_REQUEST: General call error
Meaning: A system function call error occurred in
the screen read request.
NO_FIELDDESCRIPTION: No field description exists
Meaning: No description exists for the
specified screen field.
UNDEFINED_ERROR: Undefined error
Meanin: An unknown error occurred when calling
the system function.Description
Program name of the screen from which the F4 help is to be called. Notethat the variable sy-repid is not to be used for the call, as it can beoverwritten at run-time, e.g. byfunction group names. Either usethe variable sy-cprog instead, or enter the value as a literal.
Description
Number of the screen from which the F4 help is to be called.
If the variable sy-dynnr is assigned to this parameter, it canoccaisionally contain screen numbers of the current function groups SHLPand SHL2. Avoid this situation by assigning afour-character literal, e.g. '0100' to the parameter.
Description
Table for returning the field contents to the screen.
For step-loop lines, the desired line number must be passed.
Table structure:
- FIELDNAME e.g 'T001-BUKRS'
- STEPL
- FIELDVALUE <-- receives the values to be reset
- FIELDINP <-- not relevant here