How to create an IDoc programmatically at Inbound side?

Hi,
How to create an IDoc programmatically at Inbound side?
Assume that you have a file(material master details) which is enough to create master data.
Regards,
Thiyagu

Read the documentation of this FM first:
FU IDOC_INBOUND_ASYNCHRONOUS                                                                               
K. tekst
                                                                                IDoc inbound processing via tRFC                                                                               
Functionality
                                                                                This function module starts inbound processing in the case of port type    
    "tRFC". The function module is a successor to INBOUND_IDOC_PROCESS,        
    which processes IDocs in the Release 4.0 record types. If you are          
    processing IDocs in Release 3.X record types, the function module          
    INBOUND_IDOC_PROCESS must still be called.                                                                               
The function module checks the ID 'EDI_MES' in authorization object        
    B_ALE_RECV against the received message type.                                                                               
The IDocs are saved by the function module IDOC_INBOUND_WRITE_TO_DB (a     
    COMMIT for all IDocs) and then transferred directly to the application     
    by the dispatcher module IDOC_START_INBOUND.                                                                               
Parameter
                                                                                IDOC_CONTROL_REC_40                                                        
    IDOC_DATA_REC_40                                                                               
Exceptions
                                                                                Functiegroep                                                                               
Edited by: Micky Oestreich on Jun 11, 2009 12:52 PM

Similar Messages

  • How to create multiple Idocs in SAP R3 ?

    I have been asked question on Idocs from MNC company.
    How to create multiple idocs in R3 ? Please let me know.

    hi ,
    if you want to create in multiple IDOCS in XI , take XSD of IDOC and chnage the occurance to 1 to UNBOUNDED, you can genarate multiple IDOCS.
    Regards,
    Raj

  • How to create a IDOC?

    Hi Experts,
    I need to create a Stock TRansfer Order IDOC, the other detaiks are,
    IDOC type: WMTc1D01
    Message type: WMTOCO
    Partner profile: Ship To Acct #
    so, request u that, let me know How to create this IDOC, step by step, if time permits!
    thanq

    Hi Srinivas,
        Go through the following documents.
    Link:[http://lmy52.wordpress.com/2006/06/15/how-to-create-idoc]
    Link:[http://books.google.co.in/books?id=iXfURjhThDYC&pg=PA62&lpg=PA62&dq=createanIDOC&source=web&ots=nVyBnVmhKT&sig=PBiAMxaRUK3cem1v5dIUKz8Rkhc&hl=en&sa=X&oi=book_result&resnum=10&ct=result]
    Link:[https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/d19fe210-0d01-0010-4094-a6fba344e098]
    If they useful, reward points.
    Thank you,
    Prasad G.V.K

  • Regarding how to create custom IDOC?

    hi experts:
           thank you all in advance for all your answers . .
           I am studying Idoc, Would you please give me an example about how to create custom IDOC , and the basic idea, what's more , give me some material I can refer to . couldn't thank you more
           Best regards
           Frank

    Steps To Create Custom IDOC
    1.Create Segment Type (WE31)
    Go to Transaction code WE31
    Enter Segment type, click on Create
    Give Description
    Enter the Necessary Fields & Data Elements for those Fields.
    Save the Changes.
    2.Create Idoc Type (WE30)
    Go to transaction code WE30
    Enter the Object Name, select Basic type and click Create icon
    Select the create new option and enter a description for your basic IDOC type and press enter
    Select the IDOC Name and click Create icon
    The system prompts us to enter a segment type and its attributes
    Choose the appropriate values and press Enter
    The system transfers the name of the segment type to the IDOC editor.
    Follow these steps to add more number of segments to Parent or as Parent-child relation
    Save it and go back
    Go to Edit -> Set release
    3.Create Message Type (WE81)
    Go to transaction code WE81
    Change the details from Display mode to Change modenAfter selection, the system will give this message “The table is cross-client (see Help for further info)”. Press EnternClick New Entries to create new Message Type
    Fill details
    Save it and go back
    4.Assign Idoc Type to Message Type (WE82)
    Go to transaction code WE82
    Change the details from Display mode to Change moden After selection, the system will give this message “The table is cross-client (see Help for further info)”. Press Enter.
    Click New Entries to create new Message Type.
    Fill details
    Save it and go back
    You will get step by step process.
    ABAP Development
    http://www.sapgenie.com/sapedi/idoc_abap.htm
    http://www.netweaverguru.com/EDI/HTML/IDocBook.htm
    http://www.allsaplinks.com/idoc_sample.html
    http://www.geocities.com/xplosion78/customised_ALE_IDOC_BY_SACHIN_DABHADE.zip
    http://help.sap.com/saphelp_45b/helpdata/en/35/b0ea5187a62488e10000009b38f9b7/content.htm
    http://help.sap.com/saphelp_erp2005/helpdata/en/c4/6bc368fef411d28d0900104b56737d/frameset.htm
    ABAP Development
    Follow below steps to create custom IDOC.
    1.Create segments through transaction WE31.
    2.Create IDoc Type through transaction WE30 by attaching created segments.
    3.Message type through transaction WE81.
    4.Link Idoc and message type in WE82 transaction.
    Check the transaction WEDI for ALE settings
    Check these links for more details on IDoc's:
    ALE/ IDOC
    http://help.sap.com/saphelp_erp2004/helpdata/en/dc/6b835943d711d1893e0000e8323c4f/content.htm
    http://www.sapgenie.com/sapgenie/docs/ale_scenario_development_procedure.doc
    http://edocs.bea.com/elink/adapter/r3/userhtm/ale.htm#1008419
    http://www.netweaverguru.com/EDI/HTML/IDocBook.htm
    http://www.sapgenie.com/sapedi/index.htm
    http://www.sappoint.com/abap/ale.pdf
    http://www.sappoint.com/abap/ale2.pdf
    http://www.sapgenie.com/sapedi/idoc_abap.htm
    http://help.sap.com/saphelp_erp2005/helpdata/en/0b/2a60bb507d11d18ee90000e8366fc2/frameset.htm
    http://help.sap.com/saphelp_erp2005/helpdata/en/78/217da751ce11d189570000e829fbbd/frameset.htm
    http://www.allsaplinks.com/idoc_sample.html
    http://www.sappoint.com/abap.html
    http://help.sap.com/saphelp_erp2004/helpdata/en/dc/6b835943d711d1893e0000e8323c4f/content.htm
    http://www.sapgenie.com/sapgenie/docs/ale_scenario_development_procedure.doc
    http://edocs.bea.com/elink/adapter/r3/userhtm/ale.htm#1008419
    http://www.netweaverguru.com/EDI/HTML/IDocBook.htm
    http://www.sapgenie.com/sapedi/index.htm
    http://www.allsaplinks.com/idoc_sample.html
    ALE/ IDOC/ XML
    http://www.sapgenie.com/sapgenie/docs/ale_scenario_development_procedure.doc
    http://www.thespot4sap.com/Articles/SAP_XML_Business_Integration.asp
    http://help.sap.com/saphelp_srm30/helpdata/en/72/0fe1385bed2815e10000000a114084/content.htm
    IDOC Convertion
    /people/kevin.wilson2/blog/2005/12/07/changing-fields-in-an-idoc-segment
    http://www.intelligententerprise.com/channels/applications/feature/archive/kasturi.jhtml
    i need a sample code regarding to create a custom IDOC...
    Reward points...

  • How to create visitor roles programmatically

    Could you please help me how to create visitor roles programmatically using weblogic portal.
    Thanks in advance

    Hi,
    Point this method to the selectItems under selectonechoice.
            if (yourList == null) {
                (yourList = new ArrayList();
                DCBindingContainer bindings = ADFUtil.getDCBindingContainer();
                DCIteratorBinding iteratorbinding =
                    bindings.findIteratorBinding("yourVO1Iterator");
                if (iteratorbinding != null) {
                    Row[] rows = iteratorbinding.getAllRowsInRange();
                    String value = null;
                    Long key = 0L;
                    for (Row row : rows) {
                        value = (String)row.getAttribute("Attrib0");
                        key = (Long)row.getAttribute("Attrib1");
                        yourList .add(new SelectItem(key.toString(), value));
            return yourList;
    Thanks
    Nitish

  • How to create an IDOC Status.

    Hi All,
    I have a requirement to create an IDOC Status, which should be a copy of existing status.
    How to accomplish the same.
    Regards,
    Neha

    Hi Neha,
    You can create the Idoc status, if it is an Inbound Idoc. Copy the Existing process code & add it to u r Inbound Partner Profile. In the process code u can create the status..Check the below code.
    if gv_error_status <> 0.
            condense gt_msgv-msgv1 no-gaps.
            translate gt_msgv-msgv1 to upper case.  "#EC TRANSLANG
            set extended check on.
            read table idoc_contrl index 1.
            idoc_status-status = '68'.
            idoc_status-uname  = sy-uname.
            idoc_status-repid  = sy-repid.
            idoc_status-routid = gv_funcname.
            idoc_status-docnum = idoc_contrl-docnum.
            idoc_status-msgv1 = gt_msgv-msgv1.
            idoc_status-msgv2 = gt_msgv-msgv2.
            append idoc_status.
            idoc_status-status = '51'.
            idoc_status-uname  = sy-uname.
            idoc_status-repid  = sy-repid.
            idoc_status-routid = gv_funcname.
            idoc_status-docnum = idoc_contrl-docnum.
            append idoc_status.
    endif.
    I hope this help you.
    Regards
    Rajendra

  • How to find Outbound Idoc number from inbound Idoc number.

    Hi,
    I have one inbound Idoc in my system, then
    How to find the  idoc number from the system which sends that idoc(Outbound Idoc number).

    Hello
    You can use fm SREL_GET_NEXT_NEIGHBORS for this purpose.
    Scenario: An EDI purchase order is received by SAP-XI and forwarded as Inbound ORDERS IDoc to R/3. SAP-XI generates an (outbound) IDoc number which differs from the (inbound) ORDERS05 IDoc in the R/3 system.
    Calling fm SREL_GET_NEXT_NEIGHBORS with the following parameters:
    OBJECT-OBJKEY = <IDoc number, 16-digits>
    OBJECT-OBJTYPE = 'IDOC'
    MAX_HOPS = '99'            " <<< get all links
    I get the following result:
    0000000000133906                                   IDOC       CUSTOMER   OUTIDOC
    0000000000407402                                   IDOC                  INIDOC
    000000370383                                       BUS2012    CUSTOMER   OUTBELEG
    0010057944                                         BUS2032               INBELEG
    Outbound IDoc number
    Inbound IDoc number (ORDERS05)
    PO number
    Sales order (created from inbound ORDERS IDoc)
    Regards
      Uwe

  • How to create shipment document with out inbound delivery document

    Dear Friends
    How to create shipment document with out outbound/inbound delivery document.
    In my client scenario, there is no inbound delivery for normal purchases.
    Just there are raising the PO to vendor, then they are doing MIGO for goods receipt.
    Can we do shipment creation with reference to PO?
    If it is possible, how it will be?
    Please let it solve
    With regards
    Lakshmikanth

    Dear Sameer,
    Please go to transaction VT01N here you enter Transportation planning point and shipment type then press enter.
    Now system will take you to the shipment document creation screen here you click on Select deliveries or press F6 now system will take you to the select outbound deliveries screen in this screen you enter selection data then execute, now deliveries will get assigned to that shipment.
    After assigning the deliveries enter the remaining data then complete the shipment finally save the shipment document.
    For more information please go through this SAP help link
    Note:- Shipment process need to be carry out for the deliveries before PGI.
    http://help.sap.com/saphelp_47x200/helpdata/en/f5/04898047bd11d2bf750000e8a7386f/frameset.htm
    I hope this will help you,
    Regards,
    Murali.

  • How to CREATE an IDOC of name WMTC1D01 for Transfer Orders-STOs??

    Hi Experts,
    I need to  CREATE a IDOC-WMTC1D01 for Stock Transfer Orders-STOs and must execute it.
    So, in this regard, request u that, let me know that,
    1  - How I can CREATE the IDOC-WMTC1D01 for STOs?
    2 - Then, after creating it, How to execute it?
    thanq

    no reply

  • How to Create an IDOC

    Hi gurus,
    Please if some one can explain me the steps to create an idoc. It will be very beneficail if you can give an example of sale order creation.
    Thanks
    Dushyant

    Hi,
    BD87 transaction helps in monitering ALE. we do forceful posting of IDoc here.
    In selection screen enter the idoc no with valid date and execute.
    selectthe idoc and  Press "PROCESS"
    suppose your idoc is in status 64 ready to dispatch to application. you can forcefully dispatch it and can change the status to 53.
    -> you cab trace the idoc here.like outbound /inbound relationship can be traced here.
    -> display the idoc from here . you can see the control record, data record, status record from here.
    Regards,
    Nisha

  • How to create an idoc when the credit memo is generated!

    My requirement is "An idoc will be generated when the credit memo is created "
    What is the possible way to that.
    Please send me steps (with screen shots if possible)
    thnks

    Re: How to create a credit memo !
    Reward point..

  • How to create  Own IDOC

    how to create  our own idoc ..
    plz help me with  detail steps and explanations...
    thanks in advance.

    Hi Avi,
    Please go through the blog updated by me.
    http://theguruspeaksaboutsap.blogspot.com/2007/07/idoc-creation-steps.html
    or go through this link
    http://www.geocities.com/xplosion78/customised_ALE_IDOC_BY_SACHIN_DABHADE.zip
    Reward if helpful.
    Regards,
    Harini.S

  • How to create an IDOC as an output type for an SAP standard transaction

    Hi ,
    How to create an outbound IDOC as an output type for an SAP standard transaction.
    Regards,
    Beena

    In NACE tcode u can create output type with medium as EDI,
    u can assign the entry sub routine as ENTRY_EDI in RNASTED

  • How to create a IDOC program

    Hi All
    i have a requirement where i have to design a screen program to provide the user with a input screen. The user will input data on this screen, after the user enters the data and clicks on execute or some button on the module screen the system must generate a IDOC in the system. This IDOC will be picked up from another program within the same system.The reason we are doing this is the other program cannot be changed and it can accept only an IDOC from the external system which we are going to eliminate.
    My Questions:
    1. What are the steps in this requirement
    2. Do we require the partner profile and port and logical system definition as i am going to create a IDOC in the same system.( i am not sending the IDOC out of the system)
    3. Can i use the MASTER_IDOC_DISTRIBUTE FM to create a IDOC in the database?
    4. Can i use IDOC_CREATE_ON_DATABASE FM to do the same job?
    please guide me with deatils on how to go about this. Thanks
    ~Suresh

    Hi Suresh,
    First try to create a Module pool program.
    Assign the tcode to the IDOC.
    or else get the data into IDOC segment and try to transfer it.
    Creation of IDoc
    To Create Idoc we need to follow these steps:
    Create Segment ( WE31)
    Create Idoc Type ( WE30)
    Create Message Type ( WE81)
    Assign Idoc Type to Message Type ( WE82)
    Creating a Segment
    Go to transaction code WE31
    Enter the name for your segment type and click on the Create icon
    Type the short text
    Enter the variable names and data elements
    Save it and go back
    Go to Edit -> Set Release
    Follow steps to create more number of segments
    Create IDOC Type
    Go to transaction code WE30
    Enter the Object Name, select Basic type and click Create icon
    Select the create new option and enter a description for your basic IDOC type and press enter
    Select the IDOC Name and click Create icon
    The system prompts us to enter a segment type and its attributes
    Choose the appropriate values and press Enter
    The system transfers the name of the segment type to the IDOC editor.
    Create IDOC Type
    Follow these steps to add more number of segments to Parent or as Parent-child relation
    Save it and go back
    Go to Edit -> Set release
    Create Message Type
    Go to transaction code WE81
    Change the details from Display mode to Change mode
    After selection, the system will give this message “The table is cross-client (see Help for further info)”. Press Enter
    Click New Entries to create new Message Type
    Fill details
    Save it and go back
    Assign Message Type to IDoc Type
    Go to transaction code WE82
    Change the details from Display mode to Change mode
    After selection, the system will give this message “The table is cross-client (see Help for further info)”. Press Enter.
    Click New Entries to create new Message Type.
    Fill details
    Save it and go back
    u can also check all these links related to idocs
    http://www.allsaplinks.com/idoc_sample.html
    http://www.allsaplinks.com/
    http://www.sap-img.com/
    http://www.sappoint.com/abap.html
    http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCMIDALEIO/BCMIDALEIO.pdf
    http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCMIDALEPRO/BCMIDALEPRO.pdf
    http://help.sap.com/printdocu/core/Print46c/en/data/pdf/CABFAALEQS/CABFAALEQS.pdf
    http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCSRVEDISC/CAEDISCAP_STC.pdf
    http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCSRVEDI/CAEDI.pdf
    http://help.sap.com/saphelp_erp2004/helpdata/en/dc/6b835943d711d1893e0000e8323c4f/content.htm
    http://www.sapgenie.com/sapgenie/docs/ale_scenario_development_procedure.doc
    http://edocs.bea.com/elink/adapter/r3/userhtm/ale.htm#1008419
    http://www.netweaverguru.com/EDI/HTML/IDocBook.htm
    http://www.sapgenie.com/sapedi/index.htm
    http://expertanswercenter.techtarget.com/eac/knowledgebaseCategory/0,295197,sid63_tax296858_idx0_off50,00.html
    http://sap.ittoolbox.com/documents/popular-q-and-a/extending-a-basic-idoc-type-2358
    http://help.sap.com/saphelp_47x200/helpdata/en/dc/6b7eee43d711d1893e0000e8323c4f/frameset.htm
    /thread/199996 [original link is broken]
    Regards,
    Priyanka.

  • How to create outbound idoc?

    Hi Experts,
    I want to know , how to create the oubound idocs.What is the procedure ? I sit gets generated on the  application server.
    Regards,
    Rahul.

    Hi,
    Check this link...
    https://wiki.sdn.sap.com/wiki/display/ABAP/Outbound%20Idoc%20Through%20ALE
    Regards,
    Raj.

Maybe you are looking for