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

Function module to copy INVOIC IDOC

Former Member
0 Likes
1,236

One of our customers use the IDOC message type INVOIC. When the IDOC are received and the proces has been started, we will like to make a copy of the IDOC with the status code 70.

I know this functionality exist when we change the segment data using the transaction code BD87, and I have debugged this transaction, but the "copy" functionality are developed in the program SAPLEDI5 and not in a function module.

I am looking for a function module to handle this functionality. Hope you can help me.

Per Larsen

1 REPLY 1
Read only

Former Member
0 Likes
679

To make a copy of idoc message type, you simply have to find the linked Function module of the Idoc. So for INVOIC, there would be a linked Function Module , you can copy the interface of the Function Module and build your own custom Function Module (Z function module) to attach it to the message type.

So the steps to your problem would be:

1. Copy the FM to attached mesaage type into a Z function module.

2. Write the functionality you require in your Z function module.

3. Attach the message type/ idoc type to this function module. The systematic steps to this can be simply carried out in the Transaction WEDI which is an area menu for EDI/IDOC . Depending on whether it is inbound/outbound, you can follow the steps.

Cheers!

Disha