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: 

Invoice List data(VF21/VF22) as IDoc

Former Member
0 Kudos

Hi,

We have a typical scenario of converting Invoice List data in SAP into IDoc and to transmit it as an XML to the third party system. In the data to be transmitted, sub-totalling at the material (in the invoice items) and material+invoice date level is required and the sub-totals are to be populated in two kind of segments (for each of the sub-total type) in the IDoc.

That is, a new IDoc structure will be defined with the segments/fields that the customer wants viz., a header segment with only few fields from the invoice list header, an item segment with only few fields from the invoice list item, and a sub-total segment with two fields, each to hold sub-total at material and material+date level respectively.

We have output types which, when assigned in the invoice list should create the required Idocs.

Invoice lists will be created for several partners, but each list will have only one partner.

What are the steps to be carried out in order to achieve this objective? Please stress upon the FM parameters to be provided and NACE options to be selected.

Vish.

1 ACCEPTED SOLUTION

former_member303542
Participant
0 Kudos

Hello ,

Your requirement is very simple ,However before posting into sdn please do a proper search on idoc.

Now coming to your requirement as of now you have the invoice data coming up.

1. In the NACE transaction create an output type related with the respective partner data.

2.Create segments with the required fields and set its status to release.

3.create Idoc type and message type ..link the message and segents.

4.Now link the message type and idoc type .

5.

6. Now assign process code to the partner function by defining a logical system and in the process code

put your custom function module where you put your custom code which will filter and

cumulate the data coming from the invoice into different fields

using normal abap code,

Now once you are done with the abap coding the

function module has few parameters which you can pass them as it is .

control_in need to be passed to Control_out as it is.

Now fill the segments with the required data and append the segment data to the

EDI_DATA structure which is a exporting parameter for thefunction module .

Now once you execute the invoice using this partner function and message type

system would internally call the custom function module which you have assigned to

the process code and would create an idoc.

also go through saptechnical-com site for addition details on idoc creation.

1 REPLY 1

former_member303542
Participant
0 Kudos

Hello ,

Your requirement is very simple ,However before posting into sdn please do a proper search on idoc.

Now coming to your requirement as of now you have the invoice data coming up.

1. In the NACE transaction create an output type related with the respective partner data.

2.Create segments with the required fields and set its status to release.

3.create Idoc type and message type ..link the message and segents.

4.Now link the message type and idoc type .

5.

6. Now assign process code to the partner function by defining a logical system and in the process code

put your custom function module where you put your custom code which will filter and

cumulate the data coming from the invoice into different fields

using normal abap code,

Now once you are done with the abap coding the

function module has few parameters which you can pass them as it is .

control_in need to be passed to Control_out as it is.

Now fill the segments with the required data and append the segment data to the

EDI_DATA structure which is a exporting parameter for thefunction module .

Now once you execute the invoice using this partner function and message type

system would internally call the custom function module which you have assigned to

the process code and would create an idoc.

also go through saptechnical-com site for addition details on idoc creation.