下面说的是根据业务需求做增强,再触发PO接口发送业务数据,样例为MB21创建预留单时,触发PO接口发送预留单信息:
1.找到MB21创建预留单的增强出口,并进行实施
2.在增强中写入RFC函数,接收MB21创建的预留单信息,并在函数取数汇总写入PO视图
lv_task = 'ZRES_DELIVERY' && sy-uzeit.
CALL FUNCTION 'ZFM_IF_QUERY_RESERVATION' STARTING NEW TASK lv_task
TABLES
ct_rkpf = ti_rkpf
ct_resb_new = ti_resb_new
ct_resb_old = ti_resb_old.
"赋值要发送的数据
REFRESH: lt_rkpf_view_tab,lt_resb_view_tab,lt_allyuliu_view_tab.
SORT lt_resb BY rspos.
SORT lt_allyuliu BY rspos.
MOVE-CORRESPONDING lt_rkpf TO lt_rkpf_view_tab.
MOVE-CORRESPONDING lt_resb TO lt_resb_view_tab