使用函数WS_REVERSE_GOODS_ISSUE冲销交货单,有时候会冲销失败,如果冲销失败可人工VL09试一下。
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 |
form cx_dn using gt_out type typ_out. data ls_emkpf type emkpf. data lt_mesg type standard table of mesg. select single wbstk,vbtyp into @data(l_likp) from likp where vbeln = @gt_out-le_vbeln. call function 'WS_REVERSE_GOODS_ISSUE' exporting i_vbeln = gt_out-le_vbeln i_budat = gt_out-budat i_vbtyp = l_likp-vbtyp i_tcode = 'VL09' importing es_emkpf = ls_emkpf tables t_mesg = lt_mesg exceptions error_reverse_goods_issue = 1 others = 2. if sy-subrc <> 0. rollback work. message e000 with 'DN冲销失败'. else. commit work and wait. message s000 with 'DN冲销成功'. endif. endform. |
本文作者: GavinDong
版权属于: GavinDong博客
文章链接: https://gavindong.com/3129.html
如果使用过程中遇到问题,可 **点击此处** 交流沟通。
版权所有,转载时必须以链接形式注明作者和原始出处及本声明。