on 2021 Nov 12 6:06 AM
Hello SAP experts,
I'm using BAPI_INCOMINGINVOICE_CREATE to create an invoice with reference to Purchase Order. We are facing below issues.
When trying to create an invoice with below code, There is no error but invoice number is not getting generated.
Code:
* Header
WA_HEADER-INVOICE_IND = 'X'.
WA_HEADER-DOC_TYPE = 'RE'.
WA_HEADER-DOC_DATE = SY-DATUM. "Document date
WA_HEADER-PSTNG_DATE = SY-DATUM. "Posting date
WA_HEADER-REF_DOC_NO = 'Test'. "Ref doc. No.
WA_HEADER-COMP_CODE = '1000'. "Company Code
WA_HEADER-GROSS_AMOUNT = '5000'. "Gross amount(aft. tax) for the invoice
WA_HEADER-CURRENCY = 'INR'. "Currency Field
WA_HEADER-INV_REC_DATE = SY-DATUM.
WA_HEADER-PMNTTRMS = 'Z005'.
WA_HEADER-BUS_AREA = 'B401'.
WA_HEADER-DIFF_INV = '0000100816'.
WA_HEADER-BUSINESS_PLACE = 'S004'.
* Item
WA_ITEM-INVOICE_DOC_ITEM = '000001'.
WA_ITEM-PO_NUMBER = '4700057078'. "PO number
WA_ITEM-PO_ITEM = '00010'. "PO item number
WA_ITEM-REF_DOC = '5000720172'. "GR number
WA_ITEM-REF_DOC_YEAR = '2021'. "GR fiscal year
WA_ITEM-REF_DOC_IT = '0001'. "GR item number
WA_ITEM-TAX_CODE = 'II'. "Tax code applicable
WA_ITEM-ITEM_AMOUNT = '5000'. "Item amount
WA_ITEM-QUANTITY = '50'. "Invoice quantity
WA_ITEM-PO_UNIT = 'KG'. "UoM
WA_ITEM-PO_UNIT_ISO = 'KGM'. "UoM
WA_ITEM-PO_PR_QNT = '50'. "UoM
WA_ITEM-PO_PR_UOM = 'KG'. "UoM
APPEND WA_ITEM TO IT_ITEM.
***Tax data
WA_TAX-TAX_CODE = 'II'.
APPEND WA_TAX TO TAXDATA.
CALL FUNCTION 'BAPI_INCOMINGINVOICE_CREATE'
EXPORTING
HEADERDATA = WA_HEADER
IMPORTING
INVOICEDOCNUMBER = G_INVNO
FISCALYEAR = G_FYEAR
TABLES
ITEMDATA = IT_ITEM
TAXDATA = TAXDATA
RETURN = IT_RET.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
EXPORTING
WAIT = 'X'
IMPORTING
RETURN = IT_RET.
Please help us to resolve these issues.
Regards,
Hello SAP experts,
We will require help from a Funcational or ABAP person, who already used BAPI: BAPI_INCOMING_INVOICE_CREATE for doing MIRO in Auto node or background.
Request for your suggestion or help in this regards,
Regards,
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
92 | |
8 | |
6 | |
5 | |
5 | |
5 | |
5 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.