Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

INVOIC02 Idoc

Former Member
0 Likes
21,527

Hi,

I am trying to create an invoice linked to a PO using inbound INVOIC02 IDocs.

I am getting an error message "Formatting error in the field BKPF-BLART; see next message". This is puzzling me as BLART does not exist in any segment and there are no further error messages. I have populated the header segment with BSART = "INVO".

In vain, I have tried using output determination to automatically output an INVOIC02 IDoc when I create one manually in MIRO, in the hope I can just change the ports to post it back in with a new ID. I have set up the condition records OK, such that a message entry automatically appears when I create the invoice with the vendor in the condition record. I have set it to process immediately. When I save the invoice, no IDoc gets created (I have done something similar for POs and that works OK). I have even tried using program RSNAST00 to kick it off, but that doesn't do anything either.

Useful answers to either problem will be rewarded. Many thanks in advance,

Peter

1 ACCEPTED SOLUTION
Read only

Former Member
11,544

The error message is caused by missing EDI configuration. In order to post invoices successfully using inbound INVOIC02 IDocs, it is necessary to maintain configuration using transactions OBCA, OBCB, OBCC, OBCD and OBCE (these can also be accessed through SPRO under Financial Accounting - Accounts Receivable and Accounts Payable - Business Transactions - Incoming Invoices/Credit Memos - EDI).

1) In OBCA, maintain an external company code for each of the SAP company codes used in table T001. Although the field called "Company code name in the invoice" is a free text field, it must be identical (it is case sensitive too!!) to the value in the Idoc segment E1EDKA1 with qualifier ‘RE’.

2) In OBCB, set up a relationship between each SAP company code and the vendor reconciliation account. Specify a goods/services number of *

3) In OBCC, you can maintain additional account assignment details

4) In OBCD, maintain the name of the tax code from the external system and the SAP tax codes - even if you don't need to actually change the values between the systems. Maintain a tax type and rate for each country's tax codes you intend to use. These match up with the values in the Idoc segment E1EDP04.

5) In OBCE, maintain the posting keys and document types for each company code. This is where the invoice document type is taken from. There are some other interesting flags here, such as park document and create a BDC session - I've played around with the parking flag but the invoice was always posted!

Finally, make sure that your partner profile for the external system in WE20 has a process code INVL and calls function module IDOC_INPUT_INVOIC_MRM (as I was initially using INVF!)

Hopes this helps everyone as it took me 3 weeks to work out!!

Peter

12 REPLIES 12
Read only

Former Member
0 Likes
11,544

Hi Peter,

It looks it is some data format error.

Please follow this .

Get the message ID and message numer, search the Function module with the above function module .

*or *

2.go to SE91 ,use whereused list for the same message id and number , just put the break point . Goto we19 test ur Idoc now

I hope it resoleves ur problem . Please let me if u have any issue.

Rgds

Sree m

Read only

Former Member
11,545

The error message is caused by missing EDI configuration. In order to post invoices successfully using inbound INVOIC02 IDocs, it is necessary to maintain configuration using transactions OBCA, OBCB, OBCC, OBCD and OBCE (these can also be accessed through SPRO under Financial Accounting - Accounts Receivable and Accounts Payable - Business Transactions - Incoming Invoices/Credit Memos - EDI).

1) In OBCA, maintain an external company code for each of the SAP company codes used in table T001. Although the field called "Company code name in the invoice" is a free text field, it must be identical (it is case sensitive too!!) to the value in the Idoc segment E1EDKA1 with qualifier ‘RE’.

2) In OBCB, set up a relationship between each SAP company code and the vendor reconciliation account. Specify a goods/services number of *

3) In OBCC, you can maintain additional account assignment details

4) In OBCD, maintain the name of the tax code from the external system and the SAP tax codes - even if you don't need to actually change the values between the systems. Maintain a tax type and rate for each country's tax codes you intend to use. These match up with the values in the Idoc segment E1EDP04.

5) In OBCE, maintain the posting keys and document types for each company code. This is where the invoice document type is taken from. There are some other interesting flags here, such as park document and create a BDC session - I've played around with the parking flag but the invoice was always posted!

Finally, make sure that your partner profile for the external system in WE20 has a process code INVL and calls function module IDOC_INPUT_INVOIC_MRM (as I was initially using INVF!)

Hopes this helps everyone as it took me 3 weeks to work out!!

Peter

Read only

0 Likes
11,544

Hi Peter,

I appreciate your answer for T.Code.OBCD.

My question is I configured the tax code at OBCD.

Partner type

Partner No

Tax type

Tax rate

Country

Tax code

Now How have to it test...... What type transaction is going to impact in SAP R/3

I would like to see the Tax code or Tax type ...?on my Account document.

Read only

Former Member
0 Likes
11,544

Odaiah,

Posting an invoice using IDoc INVOIC02 simulates transaction MIRO; it also creates an AP invoice, simulating FB01. These invoices can be viewed using transactions MIR4 and FB03 respectively - you'll see the tax codes there too.

Hope this helps

Peter

Read only

0 Likes
11,544

Hi Peter

I appreciate your promt answer regarding Configuaration of T.Code: OBCD. It's great explanation.

What is message type : INVOIC , I know about INVOIC02

This is intercompany invoice. How Tax type is mapped to tax code in another company code? I would like to know the link/process of effecting in two company codes.

How to start testing? or post a transaction wether my tax code is picking up or not?

Please let me know How I should assign you the points for questions for forum?

This is the first time I am assigning points. I appreciate your answer.

Regards

Odaiah Pelley

Edited by: Odaiah Pelley on Jun 16, 2008 5:34 PM

Read only

0 Likes
11,544

Hi Odaiah,

INVOIC is the basic type of message types INVOIC01 and INVOIC02.

I haven't worked on intercompany invoices before, but OBCD is just a look-up table. Tax type and tax rate are free text fields, so have you tried populating these with the values for your first company code, and "Cty" and "Tx" with the values for the second company code?

You also might like to look at the part of the IDoc processing which reads table T076M, namely include LMRMHF0X. It tries 4 scenarios in turn to find an entry in the table. This include also has a user exit (CUSTOMER-FUNCTION '012') which "allows you to determine the tax code from the IDoc data at item level and at totals level in a different way to that defined in the standard system for the relevant segment".

Unfortunately you can't award points because I started this thread - but I can award you points! Maybe you should start a new thread?

Peter

Read only

0 Likes
11,544

Hi Peter,

I appreciate your answer , I need a sequence of steps to test the tax code configuared in OBCD through Inbound Idoc.Either it is standard or inter company invoice. I would appreciate you answer in advance.

Regards

Odaiah Pelley

Read only

0 Likes
11,544

Hi Odaiah,

I am not sure exactly what you need, but in principle you can test inbound Idocs using transaction WE19 - just make sure you use partner profiles that you have set up in WE20. You will need a different IDoc for each entry in OBCD. It would also be worthwhile double checking that if you try to use a value in an Idoc that you have not configured in OBCD, the IDoc should fail to post. In WE19, you can select to process using the inbound function module option, specifying IDOC_INPUT_INVOIC_MRM, and using the debug option, go to the point where table T076M is read (the one in which the OBCD values are held).

Kind regards,

Peter

Read only

0 Likes
11,544

OSS Notes 127178 and 137686 may also be helpful.

Peter

Read only

0 Likes
11,544

hi Peter

what is the difference between the two tcodes you mentioned.

I have a user who is saying she clicks a document and that opens up in FB01, she wants to be in MIRO.

What needs to be changed on her inbox configuration?

Appreciated.

Read only

0 Likes
11,544

FB01 is for creating vendor invoices - direct postings to Accounts Payable

MIRO is for creating invoices which reference purchasing documents

You can't create vendor invoices in MIRO or purchasing-based invoices in FB01.

Peter

Read only

Former Member
0 Likes
11,544

Hi Peter,

I need your help . I have a similar requirement in which we have to pick the inbound idoc (INVOIC) and do the invoice verfication(MIRO).

Can you explain me the whole process step by step both technically and functionally ?

waiting for ur reply.

Thanks in advance,

Rhea.