点击此处---> 群内免费提供SAP练习系统(在群公告中)
加入QQ群:457200227(SAP S4 HANA技术交流) 群内免费提供SAP练习系统(在群公告中)
TABLES: ZTBXYZH, ZTBXYZHI ,ZTBXYZCASETABSM.
SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-001.
SELECT-OPTIONS S_NR FOR ZTBXYZH-BXYZNR..
SELECT-OPTIONS S_CASE FOR ZTBXYZH-CASENAME..
SELECT-OPTIONS S_TYPE FOR ZTBXYZH-PLATE..
SELECTION-SCREEN END OF BLOCK B1.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR S_NR-LOW.
PERFORM SUB_HELP_NR USING S_NR-LOW.
FORM SUB_HELP_NR USING UV_NR.
DATA: L_ROW LIKE SY-TABIX,
LT_SYSTEMS LIKE DYNPREAD OCCURS 0 WITH HEADER LINE.
DATA RETURN_TAB LIKE TABLE OF DDSHRETVAL WITH HEADER LINE.
*
CALL FUNCTION 'F4IF_FIELD_VALUE_REQUEST'
EXPORTING
TABNAME = 'ZTBXYZH' "数据字典中的表明
FIELDNAME = 'BXYZNR' "数据字典中的字段名
SEARCHHELP = 'ZTBXYZH_HELP'
TABLES
RETURN_TAB = RETURN_TAB
EXCEPTIONS
FIELD_NOT_FOUND = 1
NO_HELP_FOR_FIELD = 2
INCONSISTENT_HELP = 3
NO_VALUES_FOUND = 4
OTHERS = 5.
*取出屏幕行
READ TABLE RETURN_TAB INDEX 1.
CHECK SY-SUBRC = 0.
DATA LS_BATCH TYPE ZTBXYZH.
SELECT SINGLE * INTO LS_BATCH
FROM ZTBXYZH
WHERE BXYZNR = RETURN_TAB-FIELDVAL.
UV_NR = RETURN_TAB-FIELDVAL.
LT_SYSTEMS-FIELDNAME = 'S_TYPE-LOW'.
LT_SYSTEMS-FIELDVALUE = LS_BATCH-TYPE.
APPEND LT_SYSTEMS.
LT_SYSTEMS-FIELDNAME = 'S_CASE-LOW'.
LT_SYSTEMS-FIELDVALUE = LS_BATCH-CASENAME.
APPEND LT_SYSTEMS.
CALL FUNCTION 'DYNP_VALUES_UPDATE'
EXPORTING
DYNAME = SY-REPID
DYNUMB = SY-DYNNR
TABLES
DYNPFIELDS = LT_SYSTEMS
EXCEPTIONS
INVALID_ABAPWORKAREA = 1
INVALID_DYNPROFIELD = 2
INVALID_DYNPRONAME = 3
INVALID_DYNPRONUMMER = 4
INVALID_REQUEST = 5
NO_FIELDDESCRIPTION = 6
UNDEFIND_ERROR = 7
OTHERS = 8.
IF SY-SUBRC <> 0.
ENDIF.
ENDFORM. " SUB_HELP_NR