大家好,欢迎来到IT知识分享网。
*&---------------------------------------------------------------------* *& Report Z01 *& *&---------------------------------------------------------------------* *& *& *&---------------------------------------------------------------------* REPORT z01. DATA lv_header TYPE bapimereqheader. DATA lv_headerx TYPE bapimereqheaderx. lv_header-pr_type = 'NB'. lv_headerx-pr_type = 'X'. DATA wa_item TYPE bapimereqitemimp. DATA wa_itemx TYPE bapimereqitemx. DATA t_item TYPE TABLE OF bapimereqitemimp. DATA t_itemx TYPE TABLE OF bapimereqitemx. wa_item-material = 'A01'. wa_itemx-material = 'X'. wa_item-plant = '8010'. wa_itemx-plant = 'X'. wa_item-pur_group = '001'. wa_itemx-pur_group = 'X'. wa_item-quantity = '999'. wa_itemx-quantity = 'X'. APPEND wa_item TO t_item. APPEND wa_itemx TO t_itemx. DATA return TYPE TABLE OF bapiret2. DATA lv_number TYPE bapimereqheader-preq_no. CALL FUNCTION 'BAPI_PR_CREATE' EXPORTING prheader = lv_header prheaderx = lv_headerx * TESTRUN = IMPORTING number = lv_number * PRHEADEREXP = TABLES return = return pritem = t_item pritemx = t_itemx * PRITEMEXP = * PRITEMSOURCE = * PRACCOUNT = * PRACCOUNTPROITSEGMENT = * PRACCOUNTX = * PRADDRDELIVERY = * PRITEMTEXT = * PRHEADERTEXT = * EXTENSIONIN = * EXTENSIONOUT = * PRVERSION = * PRVERSIONX = * ALLVERSIONS = * PRCOMPONENTS = * PRCOMPONENTSX = * SERVICEOUTLINE = * SERVICEOUTLINEX = * SERVICELINES = * SERVICELINESX = * SERVICELIMIT = * SERVICELIMITX = * SERVICECONTRACTLIMITS = * SERVICECONTRACTLIMITSX = * SERVICEACCOUNT = * SERVICEACCOUNTX = * SERVICELONGTEXTS = * SERIALNUMBER = * SERIALNUMBERX = . CALL FUNCTION 'BAPI_TRANSACTION_COMMIT' EXPORTING wait = 'X' * IMPORTING * RETURN = . COMMIT WORK AND WAIT. WRITE lv_number.
免责声明:本站所有文章内容,图片,视频等均是来源于用户投稿和互联网及文摘转载整编而成,不代表本站观点,不承担相关法律责任。其著作权各归其原作者或其出版社所有。如发现本站有涉嫌抄袭侵权/违法违规的内容,侵犯到您的权益,请在线联系站长,一经查实,本站将立刻删除。 本文来自网络,若有侵权,请联系删除,如若转载,请注明出处:https://yundeesoft.com/34290.html