首页 > 代码库 > 交货单开票
交货单开票
REPORT ZLYTEST001."BAPI_BILLINGDOC_CREATEMULTIPLE 交货单开票DATA:GT_VBRK TYPE TABLE OF BAPIVBRK, GW_VBRK LIKE LINE OF GT_VBRK, GT_RETURN TYPE TABLE OF BAPIRET1, GW_RETURN LIKE LINE OF GT_RETURN, GT_SUCCESS TYPE TABLE OF BAPIVBRKSUCCESS, GW_SUCCESS LIKE LINE OF GT_SUCCESS.GW_VBRK-SALESORG = ‘1000‘."销售组织GW_VBRK-DISTR_CHAN = ‘10‘."分销渠道GW_VBRK-DIVISION = ‘10‘."产品组GW_VBRK-DOC_TYPE = ‘ZOR‘."销售凭证类型GW_VBRK-ORDBILLTYP = ‘ZF2‘."与订单有关的出具发票凭证的建议出具发票类型GW_VBRK-BILL_DATE = ‘20161008‘."出具发票索引和打印的出具发票日期GW_VBRK-SOLD_TO = ‘0000100521‘."售达方GW_VBRK-ITEM_CATEG = ‘ZTAN‘."销售凭证项目类别GW_VBRK-PRICE_DATE = ‘20161008‘."定价日期和汇率GW_VBRK-PLANT = ‘1020‘."工厂GW_VBRK-BILL_TO = ‘0000100521‘."收取发票方GW_VBRK-PAYER = ‘0000100521‘."付款方GW_VBRK-SHIP_TO = ‘0000100521‘."送达方GW_VBRK-REF_DOC = ‘0080009971‘."参考单据的单据编号GW_VBRK-REF_ITEM = ‘000010‘."参考项目的项目号GW_VBRK-DOC_NUMBER = ‘0080009971‘."销售凭证GW_VBRK-ITM_NUMBER = ‘000010‘."销售凭证项目GW_VBRK-MATERIAL = ‘000000000044007359‘."物料号GW_VBRK-SALES_UNIT = ‘PC‘."销售单位GW_VBRK-REQ_QTY = 388800."以销售单位表示的累计订单数量GW_VBRK-PAYMENT_TERMS = ‘D000‘."付款条1GW_VBRK-INCOTERMS1 = ‘ZZZ‘."国际贸易条款 (部分1)GW_VBRK-INCOTERMS2 = ‘国内交货‘."国际贸易条件(部分2)GW_VBRK-REF_DOC_CA = ‘J‘."销售凭证类型APPEND GW_VBRK TO GT_VBRK.CALL FUNCTION ‘BAPI_BILLINGDOC_CREATEMULTIPLE‘* EXPORTING* CREATORDATAIN =* TESTRUN =* POSTING = TABLES BILLINGDATAIN = GT_VBRK* CONDITIONDATAIN =* CCARDDATAIN =* TEXTDATAIN =* ERRORS = RETURN = GT_RETURN SUCCESS = GT_SUCCESS.IF GT_SUCCESS[] IS INITIAL. CALL FUNCTION ‘BAPI_TRANSACTION_ROLLBACK‘. LOOP AT GT_RETURN INTO GW_RETURN. WRITE : / GW_RETURN-TYPE,GW_RETURN-MESSAGE. ENDLOOP.ELSE. CALL FUNCTION ‘BAPI_TRANSACTION_COMMIT‘ EXPORTING WAIT = ‘X‘. LOOP AT GT_SUCCESS INTO GW_SUCCESS. WRITE : / GW_SUCCESS-BILL_DOC,GW_SUCCESS-BILL_DOC_ITEM. ENDLOOP.ENDIF.
交货单开票
声明:以上内容来自用户投稿及互联网公开渠道收集整理发布,本网站不拥有所有权,未作人工编辑处理,也不承担相关法律责任,若内容有误或涉及侵权可进行投诉: 投诉/举报 工作人员会在5个工作日内联系你,一经查实,本站将立刻删除涉嫌侵权内容。