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: 

Roll up item lines in invoice Idoc sent via EDI

Former Member
0 Kudos

Invoice which we send out ...there are subline item numbers but contains the same material(batch split).....this is one of the types of invoice's generated from the deliveries to a customer I think...by the knowledge I have(I am not writting in total).

so the rek is before I send this invoice to the customer via EDI I need to roll up the line items of same material ...where in the segments(E1EDP01) get reduced...

There are 2 options for doing this

1. write the ABAP code in the same user exit (enhancement - LVEDF001) function exit -002 which is called after each segment...

at the end of the last segment (e1eds01) when it is called..to rebuild the structure of the idoc...(if this is the sol u find it ....do let me know how are the child segments deleted of e1edp01 segment...I didn't understand how to code that).

2. to find a user exit which will be called before filling up the data in the idoc...so that there would be just data manipulation of the internal table...which is easier to code....if anyone able to atleast tell me the user exit....its great!!

I have very less time.... I would have attached the sample inovice...but I cann't paste it over here.

Maximum points will be awarded If I get the solution nearest to it.

Thankyou,

NaliniKalyan.

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi,

The line items are output from table t_vbdpr and you can manipulate this via user exit EXIT_SAPLVEDF_003. This occurs before it starts building the IDOC output.

Alternatively you could clone the function module IDOC_OUTPUT_INVOIC and assign your bespoke version to the process code.

Finally, as you say you can manipulate the IDOC structure via the user exits. To do this simply add, modify or delete entries from the internal table INT_EDIDD. The user exits normally get called every time an entry is appended to the internal table so you need to be aware of this when coding your changes.

Any amendments to the internal table still need to adhere to the IDOC structure rules, so ensure you are in the right position in the table when inserting new entries.

I hope this helps.

Darren

2 REPLIES 2

Former Member
0 Kudos

Hi,

The line items are output from table t_vbdpr and you can manipulate this via user exit EXIT_SAPLVEDF_003. This occurs before it starts building the IDOC output.

Alternatively you could clone the function module IDOC_OUTPUT_INVOIC and assign your bespoke version to the process code.

Finally, as you say you can manipulate the IDOC structure via the user exits. To do this simply add, modify or delete entries from the internal table INT_EDIDD. The user exits normally get called every time an entry is appended to the internal table so you need to be aware of this when coding your changes.

Any amendments to the internal table still need to adhere to the IDOC structure rules, so ensure you are in the right position in the table when inserting new entries.

I hope this helps.

Darren

0 Kudos

Thanks Darren,

I got it done with the option 1 I have mentioned....tested it...still testing is going on.

Anyways thanks for the answer.

Thankyou,

Nalinikalyan.