cancel
Showing results for 
Search instead for 
Did you mean: 

Intercompany billing has 2 line items referring to the same salesorder item

Former Member
0 Kudos

Hi All,

I am posting Intercompany billing documents using Idocs. I am using the standard function module that creates INVOICE IDocs, but these Idocs are failing with error text "Document contains same order item more that once".

The problem lies here, the PO that is been used is a STO (Scheduling Agreement) and the inter company billing the line item has the same material repeated twice but change in the quantity field. So, when I am posting document using Idocs we come across a segment E1EDP01 which has your quantity, weight, line item number and other fields. This segment is getting repeated twice with two different outbound deliveries.

So, I think the solution is a mixture of both functional and technical....

So, what I am planning to do here is for this particular material when ever it comes across duplicate entries add all the quantities fields and other numerical fields in the user exit and then refresh the internal table and then enter new entries. This could be done, but I don't know what could be the functional implications if these changes are made.

Request you all to let me know what exactly needs to done in order to avoid these scenarios.

Raghuram.

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member

Hi Folks

Even I am facing the same problem..Did you find the solution Can you please tell me whats the best pratice in the above case...

Thanks in Advance

Sri

Former Member
0 Kudos

I also found that Note - my quesiton is, how do I "Deactivate the billing of the batch sub-items in SD Customizing". I can't find that flag anywhere.

Does anyone know where you do that in IMG?

THANKS

Former Member
0 Kudos

Hello David,

You can do it through transaction VTFL (copy control from delivery to billing document), then select the desired item categories and set the Billing quantity indicator as "G" (Cumulative batch quantity minus invoiced quantity) for them. Very often the item categories used for batch split are the same as for the main item, so you should do this just once.

Please, if this is helpful to you, provide the corresponding rewards.

And good luck!

Carlos

Former Member
0 Kudos

Hi Raghuram,

I found a very important SAP Note 103051, details are below.

An IDoc processed by function module IDOC_INPUT_INVOIC_MM (of category INVOIC01) must not refer to the same purchase order item in several invoice items. This is also valid if for a goods receipt-related invoice verification several delivery notes belong to the same purchase order item.

Depending on the system settings and the situation, various error messages can occur (for example, FD240 'Order item ... selected more than once' or M8050 'Balance not zero: & debits: & credits: &').

In this situation module IDOC_INPUT_INVOIC_MRM generates error message M8321 'Document contains same order item more than once'.

For example, this situation occurs if you work with individual batch valuation and the SD billing document executes a batch split for different batches which belong to the same purchase order item and delivery.

Other terms

INVOIC, SAPLIEDI, M8047, M8, 321

Reason and Prerequisites

This is because of the program design.

Solution

There is no solution for IDOC_INPUT_INVOIC_MM.

Module IDOC_INPUT_INVOIC_MRM (only as of Release 4.0) for the logistics invoice verification can distinguish different goods receipts by means of the delivery note number. For this purpose, GR-related invoice verification must be active.

Owing to this symptom, billing documents for single batch valuation with batch split cannot be settled in MM-EDI inbound processing. The settlement generates exactly the situation described (several invoice items for the same purchase order item). In this case, the only solution is to deactivate the billing of the batch sub-items in SD Customizing and to calculate the main item only.

Hope this helps.

Reward if helpful.

Thanks