Вы на каком step правите?
Мне надо было заполнить чать полей, делал на шаге PRESEL1, предварительно прочитав из формы SH
Цитата:
*"----------------------------------------------------------------------
* STEP PRESEL (Enter selection conditions)
*"----------------------------------------------------------------------
* This step allows you, to influence the selection conditions either
* before they are displayed or in order to skip the dialog completely.
* If you want to skip the dialog, you should change CALLCONTROL-STEP
* to 'SELECT'.
* Normaly only SHLP-SELOPT should be changed in this step.
IF CALLCONTROL-STEP = 'PRESEL'.
* PERFORM PRESEL ..........
EXIT.
ENDIF.
IF CALLCONTROL-STEP = 'PRESEL1'.
DYFIELDS-FIELDNAME = c_werks.
APPEND DYFIELDS.
DYFIELDS-FIELDNAME = c_stort.
APPEND DYFIELDS.
CALL FUNCTION 'DYNP_VALUES_READ'
EXPORTING
DYNAME = ENV_INFO-SUBPROG
DYNUMB = ENV_INFO-SUBDYNP
TABLES
DYNPFIELDS = DYFIELDS
EXCEPTIONS
invalid_abapworkarea = 01
invalid_dynprofield = 02
invalid_dynproname = 03
invalid_dynpronummer = 04
invalid_request = 05
no_fielddescription = 06
undefind_error = 07.
CHECK SY-SUBRC IS INITIAL.
w_selopt-sign = 'I'.
w_selopt-option = 'EQ'.
LOOP AT DYFIELDS.
CHECK NOT DYFIELDS-FIELDVALUE IS INITIAL.
CASE DYFIELDS-FIELDNAME.
WHEN c_werks.
w_selopt-shlpfield = 'WERKS'.
w_selopt-low = DYFIELDS-FIELDVALUE.
append w_selopt to shlp-selopt.
WHEN c_stort.
w_selopt-shlpfield = 'STORT'.
w_selopt-low = DYFIELDS-FIELDVALUE.
append w_selopt to shlp-selopt.
ENDCASE.
ENDLOOP.
EXIT.
ENDIF.