公众号:matinal
本文作者:matinal
前言部分
大家可以关注我的公众号,公众号里的排版更好,阅读更舒适。
正文部分
按照COOIS读取货物移动记录的逻辑,通过COOIS的事务带出 要取移动记录的明细
在function【COIS_OUTPUT_FROM_IOC】上加入断点,查找搜索货物移动明细需要的参数内容信息。
比如生产订单 的sy-repid为PPIO_ENTRY
data: lt_seltab type table of rsparams, ls_tcoa type tcoa, lv_overview type flag, l_repid type sy-repid, l_valid(1) type c, ls_seltab type rsparams. Data:plv type table of rsparams with header line. data:faufnr type afko-aufnr. faufnr = ''. 生产订单号 l_repid = 'PPIO_ENTRY'. call function 'RS_REFRESH_FROM_SELECTOPTIONS' exporting curr_report = l_repid tables selection_table = lt_seltab exceptions not_found = 1 no_report = 2 others = 3. if sy-subrc <> 0. message id sy-msgid type sy-msgty number sy-msgno with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4. exit. endif. loop at lt_seltab into ls_seltab. case ls_seltab-selname. when 'P_ALV'. ls_seltab-low = 'X'. when 'P_AUTYP'. ls_seltab-low = '10'. when 'P_SC1100'. ls_seltab-low = 'PPIOD000 00000000001X'. when 'P_TCOA'. ls_seltab-low = '000IOHEADER 000001 00000'. when 'P_TCODE'. ls_seltab-low = 'COOIS'. when 'S_AUFNR'. ls_seltab-sign = 'I'. ls_seltab-option = 'EQ'. ls_seltab-low = faufnr. when 'S_FCTALW '. ls_seltab-sign = 'E'. ls_seltab-option = 'CP'. ls_seltab-low = '*'. endcase. modify lt_seltab from ls_seltab. endloop. data:gs_tcoa type table of tcoa with header line . gs_tcoa-mamo_sel = 'X'. gs_tcoa-layoutid_bd = '/ZM'. 200系统 coois变式 * 转换选择信息 call function 'COIS_SELECT_PARAMETERS_SET' exporting it_parameter = lt_seltab is_tcoa = gs_tcoa. data: iomamo_tab type iomamo_tab . * 读取移动明细 call function 'COIS_SELECT_ORDERS_READ' changing ct_iomamo = iomamo_tab[].