Function module to copy INVOIC IDOC


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


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.

November 30, -0001

Function module to copy INVOIC IDOC

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

Whether this function module K_DOCUMENT_UPDATE can send IDOC to Non SAP Sys

Hi, I know function Module K_DOCUMENT_UPDATE can sent IDOC to R/3 systems. 1.Whether this function module can sent the IDOC to Non SAP System?. 2.How to make sure, that the function module can sent IDOC to Non SAP System?. Please advise.Thanks. Regar

Variables passed to Function module for posting the Idoc

Hi, For Posting the Inbound Idoc a Function module is created what should be the values passed to 1) return_variable and 2) workflow_result. I saw in many of the program like this if there is an error in posting. I gave return_variable-wf_param = ' E

Function module for finding related IDOCs of a document

Hi All, I have a requirement where the inout will be shipment numbers. The expected output is the list of all the IDOCs that are related to the shipments. I know that this is a replica of the WE09 functionality but the users will not have access to W

Function module to read inbound idoc

My requirement is:- 1) Read IDOC no's (DOCNUM) based on following selection criteria     status = 53,     Direction = 2,     Message Type : USERCLONE     UPDTIM          :sy-datum 2) Read IDoc Data table for all entries with the DOCNUM selected above

Function module to create Invoice from the Delivery no ?

Hi All, Is there any way (function module) to create an Invoice from the Delivery no and the Billing Type ? We do not want to go with BDC for transaction VF01. Details: We want to generate a pro-forma invoice while saving the delivery. We will have '

Function Module to Update Inbound Idoc

Please let me know is there any Function Module is there to update invound idoc to data base Thanks UmeshHi , Please take a look at this link which will show step by step on how to setup inbound proscessing.

IDOC ABAP-PI Port Function Module not called

HI all, i am using a scenario where i am sending (outbound) idocs via abap proxy to PI. I have assigned the function module to the abap-pi port. when i am trying to send a test idoc via we19, i get the message "IDoc '0000000000198029' transferred to

Use of Function Module IDOC_INPUT_CREDITOR

Hi All, Could you please let me know the use of the function module IDOC_INPUT_CREDITOR. If i customise this function module by copying to Z_IDOC_INPUT_CREDITOR.. is it possible for me to post the vendor classification data by using the function modu

Function Module for message "MBGMCR" in outbound process

Hi all, I want to create an IDoc via EDI when I post a material document. I use messgae type MBGMCR and IDoc type MBGMCR02 and I already configured in partner profile and all about output determination in SAP-IM. And now I need a function module to p

Inbound Invoice idoc segment feilds mapping to SAP feilds

Hi, Could you please help me to find out the tables and feilds in SAP for the inbound invoice idoc type INVOIC01. I need to map the idoc segment fields with SAP fields and respective tables. Thanks in Advance SatishHi Satish, That's quite a big case

F1 & F2 interfaces in generic extractors using function module

Hi experts, I created generic extractor using copy of function module RSAX_BIW_GET_DATA_SIMPLE with Delta capability. In ROOSOURCE, DataSource Extraction Method showing as F2. I checked In some blogs that we need to change the DataSource Extraction M

Function Module For Customer Receivable Invoice Document Wise

Dear All, Is there a standard Function Module / BAPI available for calculating Customer Receivable amount invoice document wise? I will explain the scenario in greater detail: 1) Invoice is booked against customer (FB70 / SD Interface) 2) Receipt is

Unable to generate IDOCS using IDOC_INPUT_ORDERS Function Module

Hi, I have written a program to post IDOCS using function module IDOC_INPUT_ORDERS . In the debugging mode,I found that after the call of this function-module,sy-subrc is set to zero which means that this function-module is getting successfully execu

Idoc/ Function module to create a Licence in GTS

Dear experts,   I have a situation where in I need to create Licence in GTS system based on the information from a 3rd party system. So, Is there any inbound idoc in GTS system to automatically create the licence (I'm using middle ware to convert the

To post parked PO invoice using function module BAPI_INCOMINGINVOICE_CREATE

Hi, I have a requirement to batch update program to auto post the parked po invoice. Is it possible to use the function module BAPI_INCOMINGINVOICE_CREATE to post po invoices as batch job? or Can I go for BDC program? Please give me your suggestions.

Idoc error 51 - "Function module not allowed - APPL_IDOC_INPUT1'

Hello everyone, We are uploading GL balances from legacy to SAP using the LSMW Bapi object - bus6035 method - post message type - ACC_DOCUMENT Basic type - ACC_DOCUMENT03 When we run the lsmw, idoc is created, however with an error 51 saying "Functio

Need a functional module to compute the invoice balance

Hi, I need to know if there is a functional module which we can use to compute the invoice balance by deducting the credit notes and the payments.This was not answeredRead other 2 answers

How to copy the standarad function module

hi,       i wants to copy the standard function module which are not rfc enabled. for that one i copied standard one and modified the attributes to rfc enabled. but it was giving the errors "You can only use LIKE and TYPE to specify types in RFC"

Need help for IDOC inbound function module !

Hi guys please help me to create a IDOC inbound function module. What are the parameters and tables. How to write the code. What it does. Please send me one inbound func module code if possuble