使用 BAPI 建立 Contract
定義
* BAPI Define
DATA: gw_so_header LIKE bapisdhd1,
gw_so_headerx LIKE bapisdhd1x,
gw_so_logic_switch LIKE bapisdls,
gv_so_doc_in TYPE bapivbeln-vbeln,
gv_so_doc_num TYPE bapivbeln-vbeln,
gt_so_return2 TYPE bapiret2,
gt_so_partners TYPE bapiparnr OCCURS 0 WITH HEADER LINE,
gt_so_items_in TYPE bapisditm OCCURS 0 WITH HEADER LINE,
gt_so_items_inx TYPE bapisditmx OCCURS 0 WITH HEADER LINE,
gt_so_return1 TYPE bapiret2 OCCURS 0 WITH HEADER LINE,
gt_so_conditions_in TYPE bapicond OCCURS 0 WITH HEADER LINE,
gt_so_conditions_inx TYPE bapicondx OCCURS 0 WITH HEADER LINE.