1. 前言
- 支持读取状态列表
2. 实现
-
代码
DATA: ls_objects TYPE tca11, ls_t490_imp TYPE t490. DATA: lt_ord_pre_imp TYPE TABLE OF ord_pre. FIELD-SYMBOLS: <fs_jest> TYPE any. DATA: lt_jest TYPE TABLE OF jest. "fill var ls_objects = VALUE #( flg_alt = 'X' flg_seq = 'X' flg_opr = 'X' flg_fhm = 'X' flg_aps = 'X' flg_mst = 'X' ). ls_t490_imp = VALUE #( tcode = 'CO03' autyp = '10' ). lt_ord_pre_imp = VALUE #( ( aufnr = '000100002415' ) ). "call function getting data CALL FUNCTION 'CO_DB_ORDER_PRE_READ' EXPORTING flg_check = 'X' objects = ls_objects trtyp_imp = 'A' explode_ord_net = '' t490_imp = ls_t490_imp TABLES ord_pre_imp = lt_ord_pre_imp EXCEPTIONS not_found = 1 release_no_change = 2 OTHERS = 3. "assign data ASSIGN ('(SAPLBSVA)JEST_BUF[]') TO <fs_jest>. "initial object CALL FUNCTION 'CO_BH_DATA_RESET'. "using Production Data IF <fs_jest> IS ASSIGNED. lt_jest = <fs_jest>. cl_demo_output=>display( lt_jest ). ELSE. MESSAGE 'Open Order Error' TYPE 'E'. ENDIF.
-
效果
XXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXX