Application Development 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: 

IDOC INVOIC/FI, why is vendor line item always at the end?

Michal_Kunze
Participant
0 Kudos

Hi,

I implement an IDOC/EDI solution where some invoices are sent directly to FI module using INVOIC FI message, in SAP R/3 4.7.

Normally, when such invoice is posted manually in the system (e.g. tcode FB01) the users enter vendor line item at the beginning of the FI document(item 001).

When the invoice is posted from IDOC, the vendor line item is always appended by the system as the last item in the FI document which is 'unnatural' for the end users.

After tracing the code in function module IDOC_INPUT_INVOIC_FI

I can see that vendor line item is counted as '1' in internal table beleg_daten[] throught the processing of IDOC. But at the end, in FORM VERARBEITUNG_BELEGENDE, when data is moved from beleg_daten[] to fb01_daten[] and vendor data is always appended as the last line item to be posted here.

Do you have any similar experience and an idea how to influence this behaviour, to get the vendor line item

posted as item 001 in FI document, from IDOC?

Kind regards,

Michal Kunze

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hello Michal,

looking to the logic of LIEDIF31 i'm in doubt if you can change this behaviour. the logic loops through the line items of the IDOC, preparing to splitt the document at 949 line items. So they have to add the single amounts for the vendor line - to get a balanced document.

Regards Wolfgang

1 REPLY 1

Former Member
0 Kudos

Hello Michal,

looking to the logic of LIEDIF31 i'm in doubt if you can change this behaviour. the logic loops through the line items of the IDOC, preparing to splitt the document at 949 line items. So they have to add the single amounts for the vendor line - to get a balanced document.

Regards Wolfgang