Hi,
Can anyone please help me in BAPI_INCOMINGINVOICE_CREATE. I passed
all values to BAPI as shown below, but it is not posting invoice
as well as it is not returning any error messages in 'RETURN' table
in the bapi. Can anyone please tell me what went wrong. Thankyou
very much for your help.
*/* Assigning Values to the Header Data.
IN_HEAD-DOC_DATE = ZDOC_DATE.
IN_HEAD-PSTNG_DATE = SY-DATUM.
IN_HEAD-COMP_CODE = RECS_BRAND-C_CODE.
IN_HEAD-CURRENCY = 'USD'.
IN_HEAD-GROSS_AMOUNT = '1000.00'.
IN_HEAD-CALC_TAX_IND = 'X'.
IN_HEAD-INVOICE_IND = 'X'.
*/* Assigning Values to the Item Data.
IN_ITEM-INVOICE_DOC_ITEM = '1'.
IN_ITEM-PO_NUMBER = RECS_EKKO-EBELN.
IN_ITEM-PO_ITEM = RECS_EKKN-EBELP.
IN_ITEM-ITEM_AMOUNT = '1000.00'.
IN_ITEM-QUANTITY = '1000.00'.
IN_ITEM-PO_UNIT = '$$$'. "RECS_EKPO-MEINS.
APPEND IN_ITEM.
*/* Assigning Values to the Account Assignment Data.
IN_ACCT-INVOICE_DOC_ITEM = '1'.
IN_ACCT-SERIAL_NO = '01'.
IN_ACCT-ITEM_AMOUNT = PRINT_INPUT_RECS-BILLING.
IN_ACCT-GL_ACCOUNT = RECS_EKKN-SAKTO.
IN_ACCT-QUANTITY = PRINT_INPUT_RECS-BILLING.
IN_ACCT-PO_UNIT = '$$$'. "RECS_EKPO-MEINS.
APPEND IN_ACCT.
FORM POST_INVOICE.
CALL FUNCTION 'BAPI_INCOMINGINVOICE_CREATE'
EXPORTING
HEADERDATA = IN_HEAD
IMPORTING
INVOICEDOCNUMBER = INVOICE_DOC_NUM
FISCALYEAR = FISCAL_YEAR
TABLES
ITEMDATA = IN_ITEM
* ACCOUNTINGDATA = IN_ACCT
* TAXDATA = IN_TAX
RETURN = IN_RETURN