BAPI for MIRO Incoming Invoice
Hi All,
I want BAPI for MIRO Posting ie for Incoming Invoice.
.here MIRO is being done with Delivery Note number
Following are the necessary entries for MIRO Posting
Invoice date
Reference
Amount
Calculate Tax
Tax amount
Delivery Note
Vednor
Business Area
Please suggest me suitable BAPI for MIRO Incoming Invoice Posting with sample code.
immediately.Please give some sample code for my reference.
Rewards will be given.
Regards.
Ulhas
Hi,
BAPI for Invoice Verification: Post Invoice
BAPI_INCOMINGINVOICE_CREATE
The method can only carry out your function if no error messages were
generated in the Return table. This is the case if the header data and
all the items were processed successfully.
Transaction control is not implemented. The calling program therefore
has to execute the Commit Work itself after this method has been
successfully called (in other words, if no errors were reported in the
Return parameter).
Similar Messages
-
FIeld selection for MIRO Incoming Invoice
HI,
Iam creating invoice entry (MIRO). After entring purchase order number i will get all the GRN against that PO.
But iam getting all the fields with not necessary. pls tell what is the path in SPRO setting to select filed selection.
Regards
SunilHi
Please check the Tcode OLMRLIST . Here you can make fields mandatory/display/optional. You need to select transaction MIRO with appropriate screen variant and have to search for juridiction code , make it optinal.
Else check the GL code used for the particular line item and check if tax data is made mandatory for that.
Cheers
Mukta -
Can we Use T Code MIRA instead of MIRO for posting incoming invoice?
Hi All,
Can we Use T Code MIRA instead of MIRO for posting incoming invoice?
While trying to post a incoming invoice using MIRO, I am getting a error "HKONT is EMPTY". But when using MIRA i could get the invoice posted.
And in which situations we use MIRA?
Thanks in Advance
Gopi KrishnaHello
MIRA is for Invoice Verification in the Background
Purpose
This process is suitable for the following transactions:
Posting invoices with mass amounts of data for which no item check is required
Posting invoices referring to transactions not yet entered in the system
Entering Invoices for Verification in the Background (Without Item List)
When verifying invoices in the background, you enter only a small set of document header data, such as the invoice amount, the currency and the tax information. You also allocate the incoming invoice to a purchasing document or a vendor. The system saves the data and allocation criteria you enter.
At a later point, the system verifies the invoice in the background. It uses the allocation criteria you entered to determine the item list. It then calculates the net total from the item list.
If the net total = gross amount invoiced - tax amount (+/- tolerance), the system posts the invoice in the background.
If the net total ¹ gross amount invoiced - tax amount (+/- tolerance), the system does not post the invoice in the background. It saves the document header data and the items determined in the background; the saved document then has to be processed manually in Invoice Verification.
With Invoice Verification in the background, the system does not check for any quantity or price differences at item level. Since you do not enter any actual invoice item data, the system uses the default data for comparison.
Regards
Gregory Mathews -
Please,
Somebody know if it is possible make MIRO automatic (utilizing BAPI ) to received of the supplier XML.
Because, I'm having problems with difference measurement unit.
If anybody use this transaction BAPI for MIRO, please could send a example of the BAPI.
Thank you very much.
Daniela SoaresHow to find a BAPI?
Go to Tcode BAPI>Materials Management>invoice Verification>Incoming Invoice
Click on BAPI>press F8 >Menu GoTo>Documentation
Here you can read thru the documentation about BAPI to see thr functionality and limitations. -
BDC / Bapi For Post Incoming Payment (F-28)
Hi
Im creating BDC for F-28. But it got error coming out.
>> It says DB05B-PSZAH(02) is not an input field.
What I do is: First, I search for Line Item then Document Number. Then It return to basic list. Then I loop again for the second Line Item Number and Document Number.
I can activate the first amount but cannot for the next amount and so on.
Anybody could help me on this??
Is there any BAPI for Post Incoming Payment (F-28)?
Thank you.
Regards.i dont think there is a BAPI for this Transaction...
i have done a BDC on F-28 myself....pasting the code....hope it helps you....
*******NOTE********
the parameter in the subroutine is to see if there is a single document or multiple documents being posted.
FORM fill_bdc_data_f-28_9005 USING p_i_mult_doc TYPE c.
**BDC from screen 9005
DATA : l_amt_bdc(13), l_amt_bdc_remain(13), l_amt_bdc_mult(13),
l_amt_bdc_mult_remain(13), l_assignment(14), l_period(2),
l_amount(13).
CLEAR t_bdcdata.
REFRESH t_bdcdata.
PERFORM bdc_dynpro USING 'SAPMF05A' '0103'.
PERFORM bdc_field USING 'BDC_OKCODE' '=AB'. "OK CODE - doc overview
**get user default date format and pass date in that format
PERFORM convert_date_to_user_format USING bkpf-bldat.
PERFORM bdc_field USING 'BKPF-BLDAT' w_date. "cheque date
CLEAR w_date.
PERFORM bdc_field USING 'BKPF-BLART' i_blart. "doc type
PERFORM bdc_field USING 'BKPF-BUKRS' i_bukrs. "comp code
**get user default date format and pass date in that format
PERFORM convert_date_to_user_format USING bkpf-budat.
PERFORM bdc_field USING 'BKPF-BUDAT' w_date. "posting date
CLEAR w_date.
l_period = sy-datum+4(2).
PERFORM bdc_field USING 'BKPF-MONAT' l_period. "period
PERFORM bdc_field USING 'BKPF-WAERS' 'INR'. "currency
PERFORM bdc_field USING 'BKPF-BKTXT' i_bankl. "doc. hdr. text
PERFORM bdc_field USING 'BKPF-XBLNR' i_xblnr. "Ref. Document No.
PERFORM bdc_field USING 'BSEG-ZUONR' i_zuonr. "Assignment(Depot Code)
PERFORM bdc_field USING 'RF05A-KONTO' i_bank_gl. "Bank GL acc
PERFORM bdc_field USING 'BSEG-GSBER' i_gsber. "Business Area
l_amount = bseg-wrbtr.
PERFORM bdc_field USING 'BSEG-WRBTR' l_amount. "Amount
PERFORM bdc_field USING 'BSEG-PRCTR' ''. "Profit Center
**open items data
PERFORM bdc_field USING 'RF05A-AGKOA' 'D'. "Acc type (D=customers)
PERFORM bdc_field USING 'RF05A-XNOPS' 'X'. "Std OIs check box
**end of first screen
**document overview screen
PERFORM bdc_dynpro USING 'SAPMF05A' '0700'. "Overview Screen
PERFORM bdc_field USING 'BDC_CURSOR' 'RF05A-AZEI1(01)'. "cursor
PERFORM bdc_field USING 'BDC_OKCODE' '/00'. "OK CODE
PERFORM bdc_field USING 'RF05A-NEWBS' '19'. "posting key
PERFORM bdc_field USING 'RF05A-NEWKO' i_kunnr. "customer
PERFORM bdc_field USING 'RF05A-NEWUM' 'B'. "Spl GL Indicator
**for single document selected
CLEAR l_amt_bdc.
IF p_i_mult_doc = ''.
***new screen - next line item
PERFORM bdc_dynpro USING 'SAPMF05A' '0303'.
PERFORM bdc_field USING 'BDC_OKCODE' '=BU'. "OK CODE
**for single document, use the bouncing amount calculated earlier
l_amt_bdc = w_amt_ant_bouncing.
PERFORM bdc_field USING 'BSEG-WRBTR' l_amt_bdc. "amount
**due date - same as posting date on screen
**get user default date format and pass date in that format
PERFORM convert_date_to_user_format USING bkpf-budat.
PERFORM bdc_field USING 'BSEG-ZFBDT' w_date. "due date
CLEAR w_date.
**assignment
CLEAR l_assignment.
CONCATENATE t_seldoc_ant_bouncing-belnr
t_seldoc_ant_bouncing-gjahr INTO l_assignment.
PERFORM bdc_field USING 'BSEG-ZUONR' l_assignment. "assignment
PERFORM bdc_field USING 'BSEG-GSBER' i_gsber.
**if there is some remaining amount, then go for another line item
IF w_rem_amt_ant_bouncing > 0.
PERFORM bdc_field USING 'RF05A-NEWBS' '15'. "posting key
PERFORM bdc_field USING 'RF05A-NEWKO' i_kunnr. "customer
**new screen
PERFORM bdc_dynpro USING 'SAPMF05A' '0301'.
PERFORM bdc_field USING 'BDC_CURSOR' 'BSEG-ZTERM'. "CURSOR
PERFORM bdc_field USING 'BDC_OKCODE' '=BU'. "OK CODE-ENTER
l_amt_bdc_remain = w_rem_amt_ant_bouncing.
PERFORM bdc_field USING 'BSEG-WRBTR' l_amt_bdc_remain.
PERFORM bdc_field USING 'BSEG-ZTERM' '0001'.
**AGAIN
PERFORM bdc_dynpro USING 'SAPMF05A' '0301'.
PERFORM bdc_field USING 'BDC_CURSOR' 'BSEG-WRBTR'. "CURSOR
PERFORM bdc_field USING 'BDC_OKCODE' '=BU'. "OK CODE-SAVE
PERFORM bdc_field USING 'BSEG-WRBTR' l_amt_bdc_remain.
PERFORM bdc_field USING 'BSEG-ZTERM' '0001'. "pmt term -hardcoded
PERFORM bdc_field USING 'BSEG-SKFBT' l_amt_bdc_remain.
ENDIF.
**multiple documents
ELSE.
**initialize remaining amount to amt entered on screen
l_amt_bdc_mult_remain = bseg-wrbtr.
LOOP AT t_seldoc_ant_bouncing.
IF l_amt_bdc_mult_remain > 0.
IF bseg-wrbtr > t_seldoc_ant_bouncing-rem_amt.
l_amt_bdc_mult = t_seldoc_ant_bouncing-rem_amt.
ELSE.
l_amt_bdc_mult = bseg-wrbtr.
ENDIF.
**remaining amt = screen amt - amt calculated above.
l_amt_bdc_mult_remain = l_amt_bdc_mult_remain - l_amt_bdc_mult.
PERFORM bdc_dynpro USING 'SAPMF05A' '0303'.
PERFORM bdc_field USING 'BDC_OKCODE' '=BU'. "OK CODE
PERFORM bdc_field USING 'BSEG-WRBTR' l_amt_bdc_mult. "amount
PERFORM bdc_field USING 'BSEG-GSBER' i_gsber. "Business Area
**due date - same as posting date on screen
**get user default date format and pass date in that format
PERFORM convert_date_to_user_format USING bkpf-budat.
PERFORM bdc_field USING 'BSEG-ZFBDT' w_date. "due date
CLEAR w_date.
**assignment
CLEAR l_assignment.
CONCATENATE t_seldoc_ant_bouncing-belnr
t_seldoc_ant_bouncing-gjahr INTO l_assignment.
PERFORM bdc_field USING 'BSEG-ZUONR' l_assignment. "assignment
**posting key 19 for all but last document
PERFORM bdc_field USING 'RF05A-NEWBS' '19'. "posting key
PERFORM bdc_field USING 'RF05A-NEWKO' i_kunnr. "customer
PERFORM bdc_field USING 'RF05A-NEWUM' 'B'. "Spl GL
ENDIF.
ENDLOOP.
ENDIF.
**post remaining amount
IF p_i_mult_doc = 'X'.
**new screen if there is some amount left
IF l_amt_bdc_mult_remain > 0.
**posting key 15 with remaining amount
PERFORM bdc_field USING 'RF05A-NEWBS' '15'. "posting key
PERFORM bdc_field USING 'RF05A-NEWKO' i_kunnr. "customer
PERFORM bdc_field USING 'RF05A-NEWUM' ''. "Spl GL
**new screen
PERFORM bdc_dynpro USING 'SAPMF05A' '0301'.
PERFORM bdc_field USING 'BDC_OKCODE' '=BU'. "OK CODE
PERFORM bdc_field USING 'BSEG-WRBTR' l_amt_bdc_mult_remain.
PERFORM bdc_field USING 'BSEG-ZTERM' '0001'. "pmt term - hardcoded
ELSE.
**if no amount is left, no need for a further line item
PERFORM bdc_field USING 'RF05A-NEWBS' ''. "posting key
PERFORM bdc_field USING 'RF05A-NEWKO' ''. "customer
PERFORM bdc_field USING 'RF05A-NEWUM' ''. "Spl GL
ENDIF.
ENDIF.
**clear variables
CLEAR : l_amount, l_assignment, l_amt_bdc,
l_amt_bdc_remain,l_amt_bdc_mult, l_amt_bdc_mult_remain.
ENDFORM. " fill_bdc_data_F-28_9005 -
BAPI for Non PO Invoice posting?
Hi Experts,
I am posting invoices using BAPI_INCOMINGINVOICE_CREATE. These invoices have POs associated with the Item Details. This is working fine for me.
I want to post invoices that DO NOT have a PO. Can someone please point me to a BAPI that is similar to BAPI_INCOMINGINVOICE_CREATE in functionality but does not require a PO?
Thanks,
- Vik.I too was looking for a BAPI for non PO invoice posting. I found that the above counsel did not work for me. Instead of creating a buyside invoice, it just created a journal entry. What DID work for me was BAPI_ACC_INVOICE_RECEIPT_POST.
Below, I am pasteing the subroutines that I created for its calling. In it, for my purposes, only the invoice amount is parameter driven. My needs allowed all other BAPI parameters to stay the same.
I hope that this helps someone.
Donald Nigro
FORM create_buyside_invoice USING value(invoice_amt) TYPE p.
DATA:
gd_documentheader LIKE bapiache03,
it_accountpayable LIKE bapiacap03 OCCURS 0 WITH HEADER LINE,
it_accountgl LIKE bapiacgl03 OCCURS 0 WITH HEADER LINE,
it_accounttax LIKE bapiactx01 OCCURS 0 WITH HEADER LINE,
it_currencyamount LIKE bapiaccr01 OCCURS 0 WITH HEADER LINE,
it_return LIKE bapiret2 OCCURS 0 WITH HEADER LINE.
DATA:
wa_obj_key(20) TYPE c.
fill header
gd_documentheader-username = sy-uname.
gd_documentheader-header_txt = 'E-Payables Invoice'.
gd_documentheader-comp_code = 'EAUS'.
gd_documentheader-doc_date = sy-datum.
gd_documentheader-pstng_date = sy-datum.
gd_documentheader-doc_type = 'KR'.
CONCATENATE 'BOA' sy-datum sy-uzeit(4)
INTO gd_documentheader-ref_doc_no.
fill AP (line 1)
it_accountpayable-itemno_acc = 1.
IF sy-sysid(3) = 'DEV'.
it_accountpayable-vendor_no = '0600013370'.
ELSE.
it_accountpayable-vendor_no = '0600009022'.
ENDIF.
APPEND it_accountpayable.
fill GL (line 2)
it_accountgl-itemno_acc = 2.
it_accountgl-gl_account = '0001112227'.
it_accountgl-comp_code = 'EAUS'.
it_accountgl-pstng_date = sy-datum.
it_accountgl-fisc_year = sy-datum(4).
it_accountgl-fis_period = sy-datum+4(2).
it_accountgl-bus_area = '0100'.
APPEND it_accountgl.
fill currency ammounts for lines 1 & 2
it_currencyamount-currency = 'USD'.
it_currencyamount-itemno_acc = 1.
it_currencyamount-amt_doccur = invoice_amt * -100.
APPEND it_currencyamount.
it_currencyamount-itemno_acc = 2.
it_currencyamount-amt_doccur = invoice_amt * 100..
APPEND it_currencyamount.
CALL FUNCTION 'BAPI_ACC_INVOICE_RECEIPT_CHECK'
EXPORTING
documentheader = gd_documentheader
TABLES
accountpayable = it_accountpayable
accountgl = it_accountgl
accounttax = it_accounttax
currencyamount = it_currencyamount
return = it_return.
PERFORM invoice_error_check TABLES it_return.
CALL FUNCTION 'BAPI_ACC_INVOICE_RECEIPT_POST'
EXPORTING
documentheader = gd_documentheader
IMPORTING
obj_key = wa_obj_key
TABLES
accountpayable = it_accountpayable
accountgl = it_accountgl
accounttax = it_accounttax
currencyamount = it_currencyamount
return = it_return.
PERFORM invoice_error_check TABLES it_return.
COMMIT WORK.
WRITE: / 'ePayables Bank of America'.
WRITE: / ' Invoice Document Number:',
wa_obj_key(10).
ENDFORM.
Form invoice_error_check
FORM invoice_error_check TABLES it_return STRUCTURE bapiret2.
DATA:
bapi_success(5) TYPE c VALUE 'false'.
LOOP AT it_return.
IF it_return-type = 'S' AND bapi_success = 'false'.
bapi_success = 'true'.
ENDIF.
ENDLOOP.
IF bapi_success = 'false'.
WRITE: / 'Unable to post a buyside invoice with',
'BAPI_ACC_INVOICE_RECEIPT_POST'.
LOOP AT it_return.
WRITE: / 'Message Type: ', it_return-type,
/ 'Message Class: ', it_return-id,
/ 'Message Number: ', it_return-number,
/ 'Message: ', (80) it_return-message.
ENDLOOP.
ROLLBACK WORK.
STOP.
ENDIF.
ENDFORM. -
ERROR TRIGGERING DEFAULT METHOD FOR OBJECT (INCOMING INVOICE).
When trying to open invoices in my ERP inbox to authorise I get the following message.
ERROR TRIGGERING DEFAULT METHOD FOR OBJECT (INCOMING INVOICE).
. There might be an authorisation issue. but i am not confirm.
I have checked the authorisation in SU53 also.
is it possible that there is some other reason for it.
If so then what are they?
please help.Hi Naval,
Is it a custom business object....make sure that the status of all object components are set to Implemented or released..and regenerate the Object...
Thanks
Srinivas -
BAPI for post held invoice ?
Hi,
Is there a BAPI for posting held invoices?
I have to post held invoices in background....I hope there is other option, then CALL TRANSACTION.
I'm on release R/3 4.70x200, but it seems for BUS2081/IncomingInvoice there is no relevant BAPI.
Method Edit was also implemented via transaction MIR4.
OSS note 381593 mention that batch input problems with invoice related transactions. MIR4 is only mentioned as keyword, however I might have problems with it later on.
Any comment?
Can anyone on higher release check if there is relevant BAPI for this?
Thanks in advance,
PeterHi Peter,
You can use the following addition in the fm MRM_PARKED_INVOICE_POST call..
CALL FUNCTION 'MRM_PARKED_INVOICE_POST'
EXCEPTIONS
error_message = 1.
IF sy-subrc NE 0.
****Use syst message variables here..
ENDIF.
This will catch the error messages that terminate the process..
Hope this helps..
Sri -
Bapi for miro document creation
Hi,
can any one help me on how to use bapi " BAPI_INCOMINGINVOICE_CREATE" FOR UPLOADING TRANSACTION OF MIRO . IF POSSIBLE SAMPLE CODE
THANKSHi,
You can see the documentation, See below
Please give me point if you find it is useful
Thanks
Ramesh
FU BAPI_INCOMINGINVOICE_CREATE
Short text
Invoice Verification: Post Invoice
Functionality
You can use this method to create and post invoices.
When passing on the header data, you use the field INVOIC_IND to determine whether the system posts a credit memo or an invoice. If the field is blank, the system posts a credit memo. If you enter an X, the system posts an invoice.
If you want to enter an incoming invoice for a returns order, you should leave the INVOICE_IND field blank.
As in the online transaction, the system updates the purchase order history and stock valuation data in Materials Management. The system creates accounting documents in Accounting.
Using this method, you can:
Enter and post invoices with multiple account assignment
Change the account assignment of invoices, add account assignments, and post the invoices
Enter invoices for blanket purchase orders
Enter and post invoices for purchase orders containing planned delivery costs
Enter and post invoices containing unplanned delivery costs
Enter and post subsequent debits/credits
Use document types with external number assignment
Enter and post invoices with withholding tax
Enter and post invoice with more than one vendor line and different payment methods and terms of payment
Enter and post invoices for returns orders
Enter and post invoices for transportation service providers
Enter and post invoices for external service purchase orders
Post to G/L accounts
Post to material accounts
Enter and post invoices for a one-time vendor
Enter and post invoices with a different payee
Restrictions
The following fields in Financial Accounting are not passed on:
POR subscriber number
Bank details
Payment reference
House bank ID
Nota Fiscal
Notes
The following authorization object is checked using activity 01:
M_RECH_WRK Authorization to create invoices in certain plants
Transfer
You use the structure HeaderData to transfer the invoice header data.
You use the structure AddressData to transfer the address data of a one-time vendor or a different payee of the incoming invoice.
Tables ItemData and AccountingData contain the invoice item data. The table TaxData contains the tax information for theinvoice.
Tables ItemData and AccountingData contain the item data and the incoming invoice.
The table TaxData contains the tax information on the incoming invoice.
The table GlAccountData contains data on posting to a G/L account and the table MaterialData contains data on posting to a materialaccount.
Using table WithTaxData you can transfer withholding tax information.
Using table VendorItemSplitData you can distribute the gross amount to several vendor line items with different methods of payment and terms of payment.
Return
The invoice document number and the fiscal year are returned as key fields for the invoice.
Return messages
Messages are returned in the parameter return. The parameter documentation shows the return codes and their meanings.
Further Information
The method can only carry out your function if no error messages were generated in the "Return" table. This is the case if the header data and all the items were processed successfully.
Transaction control is not implemented. The calling program therefore has to execute the 'Commit Work' itself after this method has been successfully invoked (i.e. if no errors were reported in the Return parameter).
Example: Incoming Invoice
This example shows the header data that you need to enter in table Headerdata and the item data that you need to enter in table Itemdata to post an invoice.
Purchase order: 10 pieces of material A at 10 USD/piece
Goods receipt: 10 pieces of material A
You receive an invoice against this purchase order, with reference to purchase order number 4500007491, order item 10, for a quantity of 10 pieces of material A and an amount of 116 USD including 16% sales tax. Enter the following data:
Table HeaderData
INVOICE_IND (Post invoice/credit memo): X
DOC_DATE (Document date): 05.20.2000
PSTNG_DATE (Posting date): 05.23.2000
COMP_CODE (Company code): 1000
GROSS_AMOUNT (Gross amount): 116.00
CURRENCY (Currency key): USD
CALC_TAX_IND (Calculate tax): X
Table ItemData
INVOICE_DOC_ITEM (Invoice document item): 00001
PO_NUMBER (Purchase order number): 4500007491
PO_ITEM (Purchase order item): 00010
TAX_CODE (Tax code): VN
ITEM_AMOUNT (Item amount): 100
QUANTITY (Quantity): 10
PO_UNIT (Unit of measure): PC
For more information, see the parameter documentation for tables HeaderData and Itemdata.
Example: Incoming Invoice in Foreign Currency, Goods-Receipt-Based
Invoice Verification and Tax Information
This example specifies the header data that you need to enter in table Headerdata, the item data that you need to enter in table Itemdata and the tax information that you need to enter in table TaxData to post an invoice in a foreign currency.
Purchase order: 10 pieces of material A at 10 USD/piece
First goods receipt: 4 pieces of material A
Second goods receipt: 6 pieces of material A
You receive an invoice against this purchase order, with reference to purchase order number 4500007505, order item 10, goods receipt document 50010095, 2000, item 1. The invoice is for a quantity of 4 pieces of material A, a gross amount of 46.60 USD and 16% sales tax (6.60 USD). Enter the following data:
Table HeaderData
INVOICE_IND (Post invoice/credit memo): X
DOC_DATE (Document date): 05.20.2000
PSTNG_DATE (Posting date): 05.23.2000
COMP_CODE (Company code): 1000
CURRENCY (Currency key): USD
GROSS_AMOUNT (Gross amount): 46.60
Table ItemData
INVOICE_DOC_ITEM (Invoice document item): 00001
PO_NUMBER (Purchase order number): 4500007505
PO_ITEM (Purchase order item): 00010
REF_DOC (Goods receipt document): 50010095
REF_DOC_YEAR (Fiscal year of current period): 2000
REF_DOC_ITEM (Goods receipt document item): 1
TAX_CODE (Tax code): VN
ITEM_AMOUNT (Item amount): 40.00
QUANTITY (Quantity): 4
PO_UNIT (Unit of measure): PC
Table TaxData
TAX_CODE (Sales tax code): VN
TAX_AMOUNT (Tax amount in document currency): USD 6.60
For more information, see the parameter documentation for tables HeaderData, ItemData, and TaxData.
Example: Incoming invoice for blanket purchase order
This invoice shows which header data you need to enter in table HeaderData, which item data you need to enter in table ItemData, and which account assignment data you need to enter in table AccountingData in order to post an incoming invoice for a blanket purchase order.
You receive an invoice for the blanket PO 4500015172, PO item 10 for an amount 110 USD incl. sales tax at 10%. You want to distribute the invoice amount to the cost centers 1200 and 1500. Enter, for example, the following data:
Table HeaderData
INVOICE_IND (Post invoice/credit memo): X
DOC_DATE (Document date): 02.19.2001
PSTING_DATE (Posting date): 02.21.2001
COMP_CODE (Company code): 1000
GROSS_AMOUNT (Gross amount): 110
CURRENCY (Currency): USD
CALC_TAX_IND (Calculate tax): X
Table ItemData
INVOICE_DOC_ITEM (Item in the invoice document): 00001
PO_NUMBER (PO number): 4500015172
PO_ITEM (PO item): 00010
TAX_CODE (Tax code): V1
ITEM_AMOUNT (Item amount): 100
Table AccountingData
1st line: Change account assignment data
INVOICE_DOC_ITEM (Document item in invoice document): 0001
SERIAL_NO (Serial number for the acc. assignment): 01
TAX_CODE (Tax code): V1
ITEM_AMOUNT (Amount in document currency): 30
GL_ACCOUNT (G/L account number): 890000
COSTCENTER (Cost center): 1200
2nd line: Add unplanned account assignment
INVOICE_DOC_ITEM (Document item in invoice document): 0001
XUNPL (Unplanned acct. assignment from IV): X
TAX_CODE (Tax code): V1
ITEM_AMOUNT (Amount in document currency): 70
GL_ACCOUNT (G/L account number): 890000
COSTCENTER (Cost center): 1500
In the case of a blanket purchase order, the following fields for quantities and units of measurement must not be filled in the tables ItemData and AccountingData:
Quantity (QUANTITY)
PO_UNIT (PO unit of measure)
PO_UNIT_ISO (PO unit of measure in ISO code)
PO_PR_QNT (Quantity in PO price unit of measure)
PO_PR_UOM (PO price unit of measure)
PO_PR_UOM_ISO (PO price unit of measure in ISO code)
For more information, see the parameter documentation for tables HeaderData, ItemData, and AccountingData, or in the SAP Library under Logistics Invoice Verification.
Example: Change account assignments and add unplanned assignments
This example shows the header data that you need to enter in table Headerdata, the item data that you need to enter in table Itemdata, and the account assignment information that you need to enter in table AccountingData to change, add, and post account assignments for an invoice. If you want to change or add account assignments, there must be a non-valuated goods receipt or no goods receipt in the system. Goods-receipt-based invoice verification is specified.
Purchase order: 300 pieces of material A at 1 USD/piece
Goods receipt: 300 pieces of material A
This purchase order is subject to account assignment. You receive an invoice for it, refering to purchase order number 4500006846, order item 10, goods receipt document 50008849, 2000, item 1. The invoice is for a quantity of 100 pieces of material A, with a gross invoice amount of USD 116.00, including 16% sales tax. You want to change the planned account assignment for the second account assignment item and add an unplanned account assignment. Enter the following data:
Table HeaderData
INVOICE_IND (Post invoice/credit memo): X
DOC_DATE (Document date): 08.05.2000
PSTNG_DATE (Posting date): 08.08.2000
COMP_CODE (Company code): 1000
CURRENCY (Currency key): USD
GROSS_AMOUNT (Gross amount): 17.40
CALC_TAX_IND (Calculate tax automatically): X
PMNTTRMS (Terms of payment key): 0001
Table ItemData
INVOICE_DOC_ITEM (Invoice document item): 00001
PO_NUMBER (Purchase order number): 4500006846
PO_ITEM (Purchase order item): 00010
REF_DOC (Goods receipt document): 500008849
REF_DOC_YEAR (Fiscal year of current period): 2000
REF_DOC_ITEM (Goods receipt document item): 1
TAX_CODE (Tax code): VN
ITEM_AMOUNT (Item amount): 100
QUANTITY (Quantity): 100
PO_UNIT (Unit of measure): PC
Table AccountingData
Row 1: Change second account assignment item
INVOICE_DOC_ITEM (Invoice document item): 0001
SERIAL_NO (Account assignment serial number): 02
TAX_CODE (Tax code): VN
ITEM_AMOUNT (Amount in document currency): 10.00
QUANTITY (Quantity): 10
PO_UNIT (Order unit): PC
GL_ACCOUNT (G/L account number): 890000
COSTCENTER (Cost center): 1200
Row 2: Add unplanned account assignment
INVOICE_DOC_ITEM (Invoice document item): 0001
XUNPL (Unplanned account assignment in Invoice Verification): X
TAX_CODE (Tax code): VN
ITEM_AMOUNT (Amount in document currency): 5.00
QUANTITY (Quantity): 5
PO_UNIT (Order unit): PC
GL_ACCOUNT (G/L account number): 890000
COSTCENTER (Cost center): 1200
For more information, see the parameter documentation for tables HeaderData, ItemData, and TaxData, or Logistics Invoice Verification in the SAP Library.
Example: Invoice with Planned Delivery Costs
This examples shows the header data that you need to enter in table HeaderData, the item data that you need to enter in table ItemData, and the tax information that you need to enter in table TaxData to post an invoice containing planned delivery costs.
Purchase order: 100 pieces of material A at 1 USD/piece
Goods receipt: 100 pieces of material A
You receive an invoice for this purchase order refering to purchase order number 4500006986, order item 10, for a quantity of 100 pieces of material A and 136 USD, including 16% sales tax and 20 USD planned delivery costs. Enter the following data:
Table HeaderData
INVOICE_IND (Post invoice/credit memo): X
DOC_DATE (Document date): 08.10.2000
PSTNG_DATE (Posting date): 08.12.2000
COMP_CODE (Company code): 1000
CURRENCY (Currency key): USD
GROSS_AMOUNT (Gross amount): 136,00
Table ItemData
Row 1: Posting the purchase order item
INVOICE_DOC_ITEM (Invoice document item): 00001
PO_NUMBER (Purchase order number): 4500006986
PO_ITEM (Order item): 00010
TAX_CODE (Sales tax code): VN
ITEM_AMOUNT (Item amount): 100.00
QUANTITY (Quantity): 100
PO_UNIT (Unit of measure): PC
Row 2: Posting the planned delivery costs
INVOICE_DOC_ITEM (Invoice document item): 00002
PO_NUMBER (Order number): 4500006986
PO_ITEM (Order item): 00010
ITEM_AMOUNT (Item amount): 20.00
QUANTITY (Quantity): 100
PO_UNIT (Unit of measure): PC
COND_TYPE (Condition type): FRB1
Table TaxData
TAX_CODE (Sales tax code): VN
TAX_AMOUNT (Tax amount in document currency): 16.00
For more information, see the parameter documentation for tables HeaderData, ItemData, and TaxData.
Example: Incoming invoice with withholding tax.
This example shows you what header data you can enter in table HeaderData, and what item data and withholding tax information you can enter in table TaxData in order to park an incoming invoice with withholding tax.
Purchase order: 10 pieces of material A at $10
Goods receipt: 10 pieces of material A
You receive an invoice for this delivery with reference to purchase order number 4500007505, PO item 10, GR document 50010095 2000, Item 1. The invoice is for a quantity of 10 pieces and a gross amount of 100 USD. You have to pay 10% withholding tax for the gross amount. Enter the following data:
Table HeaderData
INVOICE_IND (Invoice/Credit memo): X
DOC_DATE (Document date): 05.20.2000
PSTNG_DATE (Posting date): 05.23.2000
COMP_CODE (Company code): WT01
CURRENCY (Currency key): USD
GROSS_AMOUNT (Gross amount): 100 USD
Table ItemData
INVOICE_DOC_ITEM (Item from invoice document): 00001
PO_NUMBER (PO number): 4500007505
PO_ITEM (PO item): 00010
REF_DOC (GR document): 50010095
REF_DOC_YEAR (Fiscal year of the current period): 2000
REF_DOC_ITEM (Item in a GR document): 1
TAX_CODE (Tax code): V0
ITEM_AMOUNT (Item amount): $100
QUANTITY (Quantity): 10
PO_UNIT (Unit of measure): PC
Table WithTaxData
SPLIT_KEY (Grouping key for withholding tax split): 0001
WI_TAX_TYPE (Code for withholding tax type): R1
WI_TAX_CODE (Withholding tax code): 01
WI_TAX_BASE (Withholding tax base amount): 100
WI_TAX_AMT (Withholding tax amount in doc. currency): 10.00
For more information, see the parameter documentation for tables HeaderData, ItemData, and WithTaxData.
Example: Incoming invoice with amount split.
This example shows you what header data you need to enter in table HeaderData, what item data you enter in table ItemData, and what information you can enter in table VendorSplitData in order to create an invoice with an amount split.
Purchase order: 10 pieces of material A at 10 USD
Goods receipt: 10 pieces of material A
You receive an invoice for this purchase order with reference to PO number 4500007505, PO item 10, GR document 50010095, item 1. The invoice is for a quantity of 10 pieces and a gross amount of 100 USD. You want to distribute the gross amount to two vendor lines. 40% of the gross amount should be paid immediately by check, and 60% of the gross amount should be paid within 14 days, taking into account a 3% cash discount. Enter the following data:
Table HeaderData
INVOICE_IND (Invoice/Credit memo): X
DOC_DATE (Document date): 05.20.2000
PSTNG_DATE (Posting date): 05.23.2000
COMP_CODE (Company code): 0001
CURRENCY (Currency key): USD
GROSS_AMOUNT (Gross amount): 100.00
Table ItemData
INVOICE_DOC_ITEM (Item from the invoice document): 00001
PO_NUMBER (PO number): 4500007505
PO_ITEM (PO item): 00010
REF_DOC (GR document): 50010095
REF_DOC_YEAR (Fiscal year for the current period): 2000
REF_DOC_ITEM (Item from a GR document): 1
TAX_CODE (Tax code): V0
ITEM_AMOUNT (Item amount): 100
QUANTITY (Quantity): 10.00
PO_UNIT (Unit of measure): PC
Table VendorItemSplitData
1st vendor line
SPLIT_KEY (Grouping key for split in the vendor line): 0001
SPLIT_AMOUNT (Gross invoice partial amount in doc. currency): 40.00
PYMT_METH (Payment method): S
TAX_CODE (Tax code): V0
PMNTTRMS (Payment terms key): 0001
2nd vendor line
SPLIT_KEY (Grouping key for split in the vendor line): 0002
SPLIT_AMOUNT (Gross invoice partial amount in doc. currency): 60.00
PYMT_METH (Payment method): U
TAX_CODE (Tax code): V0
PMNTTRMS (Payment terms key): 0003
For more information, see the parameter documentation for tables HeaderData, ItemData, and VendorItemSplitData.
You recieve an invoice with reference to the order number 4500006846, order item 10. The invoice is for a 100 pieces of material A, with a gross amount of 150.80 USD, including 16% value-added tax. The invoice includes a G/L account posting of 10 USD to account 400000 in company code 1 and a material account posting of material MAT01 for 20 USD.
Enter the following data:
Table HeaderData
INVOICE_IND (post invoice/credit memo): X
DOC_DATE (Document date): 05.08.2000
PSTNG_DATE (Posting date): 08.08.2000
COMP_CODE (Company code): 1000
CURRENCY (Currency): USD
GROSS_AMOUNT (Gross amount): 150,80
CALC_TAX_IND (Calculate tax): X
PMNTTRMS (Terms of payment): 0001
Table ItemData
INVOICE_DOC_ITEM (Invoice document item): 00001
PO_NUMBER (Purchase order number): 4500006846
PO_ITEM (PO item): 00010
TAX_CODE (tax code): VN
ITEM_AMOUNT (Amount in document currency): 100
QUANTITY: 100
PO_UNIT (Unit of measure): ST
Table GlAccountData
INVOICE_DOC_ITEM (Document item in invoice document): 00001
GL_ACCOUNT (G/L account): 400000
ITEM_AMOUNT (Amount in document currency): 10,00
DB_CR_IND (Debit/credit indicator): S
COMP_CODE (Company code): 0001
TAX_CODE (Tax code): VN
COSTCENTER (Cost center): 1
Table MaterialData
INVOICE_DOC_ITEM (Document item in invoice document): 0001
MATERIAL (MATERIAL): MAT01
PLANT (Valuation area): 0001
DB_CR_INP (Debit/credit indicator): S
ITEM_AMOUNT (Amount in document currency): 10,00
QUANTITY (Quantity): 1
PO_UNIT (PO unit of measure): ST
You can find further information in the parameter documentation for tables HeaderData, ItemData, GlAccountData and MaterialData or in the SAP Library under Logistics - Invoice Verification
Example: Invoice for a purchase order for external services and service-based invoice verification.
This example shows you which header data to enter in table HeaderData, which item data to enter in table ItemData, and which account assignment data to enter in table AccountingData in order to enter and post an incoming invoice.
You receive an invoice with reference to the PO number 4500000191, PO item 10. Two services A and B are invoiced, each with a quantity of six service units. Service A has a gross amount of 580 USD incl. 16% tax. Service B has 812 USD incl. 16% tax. Service A has an account assignment of 50% to both cost centers 1000 and 2000. Service B also has an account assignment to cost centers 1000 and 3000. The service acceptance was made for both services jointly with the service entry sheet number 1000000022.
Enter the following data:
Table HeaderData
INVOICE_IND (Post invoice/credit memo): X
DOC_TYPE (Document type): RE
DOC_DATE (Document date): 01.10.2002
PSTNG_DATE (Posting date): 01.10.2002
COMP_CODE (Company code): 0001
CURRENCY (Currency key): USD
GROSS_AMOUNT (Gross amount): 1392.00
CALC_TAX_IND (Calculate tax automatically): X
PMNTTRMS (Payment terms key): 0002
Table ItemData
First Entry for Service A:
INVOICE_DOC_ITEM (Item in invoice document): 000001
PO_NUMBER (PO number): 4500000191
PO_ITEM (PO item): 00010
TAX_CODE (Tax code): V1
ITEM_AMOUNT (Item amount): 250.00
QUANTITY (Quantity): 1
PO_UNIT (Unit of measure): LE
SHEET_NO (Service entry sheet number): 1000000022
SHEET_ITEM (Line number) : 10
Second Entry for Service A:
INVOICE_DOC_ITEM (Item in invoice document): 000002
PO_NUMBER (PO number): 4500000191
PO_ITEM (PO item): 00010
TAX_CODE (Tax code): V1
ITEM_AMOUNT (Item amount): 250,00
QUANTITY (Quantity): 3
PO_UNIT (Unit of measure): LE
SHEET_NO (Service entry sheet number): 1000000022
SHEET_ITEM (Line number) : 10
First Entry for Service B:
INVOICE_DOC_ITEM (Item in invoice document): 000002
PO_NUMBER (PO number): 4500000191
PO_ITEM (PO item): 00010
TAX_CODE (Tax code): V1
ITEM_AMOUNT (Item amount): 350.00
QUANTITY (Quantity): 1
PO_UNIT (Unit of measure): LE
SHEET_NO (Service entry sheet number): 1000000022
SHEET_ITEM (Line number) : 20
Second Entry for Service B:
INVOICE_DOC_ITEM (Item in invoice document): 000004
PO_NUMBER (PO number): 4500000191
PO_ITEM (PO item): 00010
TAX_CODE (Tax code): V1
ITEM_AMOUNT (Item amount): 350,00
QUANTITY (Quantity): 3
PO_UNIT (Unit of measure): LE
SHEET_NO (Service entry sheet number): 1000000022
SHEET_ITEM (Line number) : 20
Table AccountingData
First account assignment for service A:
INVOICE_DOC_ITEM (Document item in invoice document): 000001
SERIAL_NO (Sequential number of the account assignment): 01
TAX_CODE (Tax code): V1
ITEM_AMOUNT (Amount in document currency): 250.00
QUANTITY (Quantity): 3
PO_UNIT (PO unit of measure): LE
GL_ACCOUNT (G/L account number): 400000
COSTCENTER (Cost center): 1000
Second account assignment for service A:
INVOICE_DOC_ITEM (Document item in invoice document): 000002
SERIAL_NO (Sequential number of the account assignment): 02
TAX_CODE (Tax code): V1
ITEM_AMOUNT (Amount in document currency): 250.00
QUANTITY (Quantity): 3
PO_UNIT (PO unit of measure): LE
GL_ACCOUNT (G/L account number): 400000
COSTCENTER (Cost center): 2000
First account assignment for service B:
INVOICE_DOC_ITEM (Document item in invoice document): 000003
SERIAL_NO (Sequential number of the account assignment): 01
TAX_CODE (Tax code): V1
ITEM_AMOUNT (Amount in document currency): 350.00
QUANTITY (Quantity): 3
PO_UNIT (PO unit of measure): LE
GL_ACCOUNT (G/L account number): 400000
COSTCENTER (Cost center): 1000
Second account assignment for service B:
INVOICE_DOC_ITEM (Document item in invoice document): 000004
SERIAL_NO (Sequential number of the account assignment): 03
TAX_CODE (Tax code): V1
ITEM_AMOUNT (Amount in document currency): 350.00
QUANTITY (Quantity): 3
PO_UNIT (PO unit of measure): LE
GL_ACCOUNT (G/L account number): 400000
COSTCENTER (Cost center): 3000
For more information, see the parameter documentation for the tables HeaderData, ItemData, and AccountingData, or see the SAP Library under Logistics Invoice Verification.
Example: Incoming invoice for a one-time vendor
This example demonstrates the procedure for entering and posting an incoming invoice for a one-time vendor.
You do not need to provide table AddressData with data to do this. If you do not enter any data in the table AddressData, the address data for the one-time vendor is transfered exactly from the purchase order to the invoice.
If you use table AddressData to transfer the data, the system copies the address data for the one-time vendor from the purchase order to the invoice and then overwrites or adds to the data with the fields from table AddressData.
The name 'SAP AG', postal code '60000', and street and house number 'Neurottstraße 16' are stored in the purchase order for the one-time vendor. You receive an invoice with the one-time vendor address 'SAP AG', postal code '69190' and city 'Wallorf'.
You enter the following data:
Table AddressData
ACC_1_TIME (Indicator: One-time vendor): X
NAME (Name): SAP AG
POSTL_CODE (Postal code): 69190
CITY (city): Walldorf
The invoice is posted with the following one-time vendor address data: Name 'SAP AG', street and house number 'Neurottstraße 16', postal code '69190', city 'Walldorf'.
For more information, see the parameter documentation for table AddressData
Example: Incoming invoice for a different payee
This example demonstrates which data you must enter in table AddressData in order to enter and post an invoice for a different payee.
You receive an invoice for a different payee with name 'SAP AG', postal code '69190', city 'Walldorf', bank number '38070724' and account number '4711'.
Enter the following data:
Table AddressData
ACC_1_TIME (Indicator: One-time vendor): ' '
NAME (Name): SAP AG
POSTL_CODE (Postal code): 69190
CITY (City): Walldorf
BANK_NO (Bank number): 38070724
BANK_ACCT (Bank account number): 4711
For additional information, see the parameter documentation for table AddressData
Parameter
HEADERDATA
ADDRESSDATA
INVOICEDOCNUMBER
FISCALYEAR
ITEMDATA
ACCOUNTINGDATA
GLACCOUNTDATA
MATERIALDATA
TAXDATA
WITHTAXDATA
VENDORITEMSPLITDATA
RETURN
Exceptions
Function group
MRM_BAPI -
Error in BAPI while creating incoming invoice
Hi Experts,
Im creating incoming invoice by using the BAPI, 'BAPI_INCOMINGINVOICE_CREATE'.
when im going to posting my invoice it is showing the error like 'EDI: Error in customizing for differential invoicing'.it is a urgent requirement and need to solve this ASAP.Pls help me out with this error
Im passing following parameters to BAPI:
wa_header-invoice_ind = 'X'.
wa_header-doc_date = sy-datum. "Enter the document date
wa_header-pstng_date = sy-datum . "Enter the posting date
* wa_header-ref_doc_no = '5000008590'.
wa_header-comp_code = '1000'.
*wa_header-gross_amount = '50.11'. "Enter the gross amount(aft. tax) for the invoice
*wa_header-calc_tax_ind = 'X'.
wa_header-currency = 'INR'.
wa_header-INV_TRAN = 'X'.
wa_header-SIMULATION = 'X'.
wa_item-invoice_doc_item = '000001'.
wa_item-po_number = '3700000557'. "Enter the PO number
wa_item-po_item = '00010'. "Enter the PO item number
* wa_item-ref_doc = '5000008590'. "Enter the GR number
* wa_item-ref_doc_year = '2014'. "Enter the GR fiscal year
* wa_item-ref_doc_it = '0001'. "Enter the GR item number
* wa_item-tax_code = 'V0'. "Enter the tax code applicable
wa_item-item_amount = '50.60'. "Enter the item amount
* wa_item-quantity = '2380'. "Enter the invoice quantity
* wa_item-po_unit = 'EA'. "Enter the UoM
APPEND wa_item TO it_item.
CALL FUNCTION 'BAPI_INCOMINGINVOICE_CREATE'
EXPORTING
headerdata = wa_header
* * ADDRESSDATA =
IMPORTING
invoicedocnumber = g_invno
fiscalyear = g_fyear
TABLES
itemdata = it_item
* * ACCOUNTINGDATA =
* * GLACCOUNTDATA =
* * MATERIALDATA =
* * TAXDATA =
* * WITHTAXDATA =
* * VENDORITEMSPLITDATA =
return = it_ret
* * EXTENSIONIN =
IF g_invno IS NOT INITIAL.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
EXPORTING
WAIT = 'X'
* * IMPORTING
* * RETURN =Thanks every one for your valuable solutions.
Issue is Solved by unchecking the flag.
wa_header-INV_TRAN = 'X'.
Thanks & Regards,
Ramjee. -
Tax Jurisdiction code for EDI Incoming invoice
Hi,
We have implemented EDI incoming invoice using INVOIC02. The process code is INVL.The invoice is to be posted against a Purchase Order line item. It is noticed that the EDI invoice is not getting the Tax Jurisdiction code from the Purchase Order line . Instead the Tax Juridiction code is copied from the company code. However when we post the invoice manually using MIRO , then the Tax Juridiction code is copied from the Purchase Order. We understand that the system should take the Tax Jurisdiction code from the Purchase Order even for EDI invoices. Is it compulsory that we have to use the user exit EXIT_SAPLMRMH_014 in order to populate the Tax Jurisdiction code field TXJCD from the Purchase Order line? or is there any config required to enable the transfer of Tax Juridication code from the Purchase Order? In transaction OBCE there is a config to transfer the tax jurisdiction code supplied by the external vendor. If we do not check that box , then system is supposed to get the tax jurisdiction code from the Purchase Order.
Thanks
SukumarThe issue is resolved through OSS Note 506343. In the standard R/3 system, the tax jurisdiction code can't be written to invoice via EDI and only the Ship To Plant's Tax Jurisdiction Code is written to the invoice.
Regards
Sukumar -
Hi Experts,
I got couple of doubts with regards to MIRO..
1)Which doc no should be in the reference field?
2)this particular invoice is meant only for shipment services ryt?.....let me explain the scenario am working....we deliver goods from different plant of another company code say xxxx......vendor yyyy of xxxx will render shipment service to our customer, so here miro will contain the details of shipment service of the vendor correct me if this understanding is wrong........so invoice for the goods which xxxx is delivering has to be created seperatly thats called inter company invoice am i ryt?......
3)with which document we will cross check the incoming invoice?.....
4)whos invoicing party?.....the party who is issueing the invoice?...here vendor should be the invoicing party is it ryt?
5)can any one send me the steps to create MIRO document?....Hi,
A company arranges direct delivery of the goods to the customer from the stocks of another company belonging to the same corporate group. Ex- Company code A orders goods through its sales organization A from Plant B belonging to Company code B.
The condition type IV01 in intercompany billing document represents revenue to the Supplying Company. But its corresponding condition type PI01 in the billing document to the end customer is shown as a statistical item meant for information purposes. Condition Type VPRS in the intercompany-billing document indicates cost to the supplying company code.The use of two different condition types in Intercompany billing is necessary to ensure that data is transmitted correctly to the financial statement (Component CO-PA)
Specify purchase order no as reference and date so that price in the PO will flow to the MIRO document.
Regards. -
Hi Experts,
Once the GR is posted successfully for all the POs, we need to do Invoice Receipt against the POs. We do this manually with MIRO with reference to PO. I need to use BAPI for this i.e BAPI_INCOMINGINVOICE_CREATE, what are the mandatory fields for this bapi, please let me know with one example.
thanks,
santhoshHi,
Try this sample code
loop at it_ekpo .
itemdata-invoice_doc_item = sy-tabix .
it_material-invoice_doc_item = sy-tabix.
it_material-material = it_ekpo-matnr.
it_material-val_area = it_ekpo-werks.
it_material-db_cr_ind = 'X'.
it_material-tax_code = it_ekpo-mwskz.
it_material-quantity = it_ekpo-menge.
it_material-base_uom_iso = it_ekpo-meins.
itemdata-po_number = it_ekpo-ebeln .
itemdata-po_item = it_ekpo-ebelp .
itemdata-item_amount = it_ekpo-netpr * it_ekpo-menge .
itemdata-quantity = it_ekpo-menge .
itemdata-po_unit = it_ekpo-meins .
append itemdata to itemdatat .
append it_material.
endloop .
headerdata-invoice_ind = 'X' .
headerdata-doc_date = sy-datum .
headerdata-pstng_date = sy-datum .
headerdata-ref_doc_no = 'Test-Inv' .
headerdata-comp_code = '0101' .
headerdata-currency = 'INR'..
headerdata-gross_amount = '990.00'.
it_tax-tax_code = 'V0'.
it_tax-tax_amount = '90'.
it_tax-tax_base_amount = '990.00'.
append it_tax.
call function 'BAPI_INCOMINGINVOICE_CREATE'
exporting
headerdata = headerdata
importing
invoicedocnumber = invoicedocnumber
fiscalyear = fiscalyear
tables
itemdata = itemdatat
materialdata = it_material
taxdata = it_tax
return = return .
call function 'BAPI_TRANSACTION_COMMIT'.
Regards
Vinod -
Populating value in idoc segment E1EDP02 for INVOIC01- incoming invoice
Hi Friends,
I am working to get the incoming freight invoice posted to MIRO, using
IDOC : INVOIC01
message type: INVOIC
process code: INVL
function module : IDOC_INPUT_INVOIC_MRM
Vendor does not send the PO number only send the bill of lading number(shipment number). So i have customised the IDOC with one segment for getting bill of lading number. My requirement is get bill of lading number and then get PO no and populate into segment E1EDP02. I am not able to populate this field and hence each time the IDOC fails with message :
Required field BELNR(001) is missing in segment E1EDP02
Required field ZEILE(001) is missing in segment E1EDP02
Please tell me how to get this field populated and get the issue resolved. I have been trying to figure out for couple of days but no success OR My approach is incorrect for posting invoice to MIRO with populating field segment.
Please suggest.
Thanks
DeepakThanks everyone for getting the issue resolved. I have implemented implicit enhanencement and before the function module strarts procesing, I loop over segments and fill up the PO number to E1EDP02 for bill of lading number. There was also a case of error handling for IDOC. That is to check if the amount sent by vendor is correct as compared to the amount on the shipment cost docuemnt, if they dont match then I need to send an email to the business informing them for bill of lading number and amount. There is also another check to find out if the bill of lading number has already been invoiced, if invoiced I again need to inform the business user.
So keep all the requirements in mind I went with Implicit enhancement, thus populating the required segment and if the validations fail for amount or invoice document already generated, then I send the mail to business with bill of lading number and reason of failure. In such case IDOC is not executed and after sending the mail, the logic exits out of function module.
I -
BAPI -for Creating EXCISE INVOICE AT DEPOT tcode 'J1IG
Hi All,
Is there any BAPI for Excise Invoice Creation at depot Tcode is J1IG
Thanks,
SatishreddyHi,
Please try this Function Module
J_1I4A_CREATE_EXCISE_INVOICE
Hope it helps.
Regards
Hiren K.Chitalia
Maybe you are looking for
-
My Z10 does not have a setting of "smart dialing"
hello, I use Blackberry Z10, mode number STL100-2, software verison 10.1.0.4181. however in the phone application,when I tap down the setting options, i could not find "smart dialing". because when the caller calls, even though it is saved on my cont
-
HT4818 how can i install windows sp3 on my win xp?
i have 25Gb available on my partition and it says i need 4 additional MEGABYTES!! is this a bug?
-
Af:train across taskflows
I have four jsff pages used with af:train tag. In a single taskflow all the four jsff pages flow is coming up fine and it works as expected. The requirement is i want to move each jsff page into a seperate taskflow and than have the same functionalit
-
Getting BW data into WebDynpro table
Hi All Can any one suggest me how to get data from BW? Is it possible to write any RFC for that? As far as I know there are many options like BW Query Iviews etc but I need to get that data and have it in a table with lot of images based on result. S
-
How to fix the width of each bar in the Bar chart.
Hi, In BO design studio 1.3 is there any way to make each bar in the bar chart with fixed width. Thank You, Palani.