RSEINB00 flat file to idoc uploading in XI

Hi,
I've searched a lot of posts here in SDN on how to use RSEINB00 to upload flat file idocs, and i tend to get lost as there are conflicting answers...
can anyone give me a clear/consolidated answer on how to use RSEINB00 in XI?
correct me if i'm wrong but the process is basically to upload a flat file idoc (residing in the XI application server) using RSEINB00, then after successful upload you're supposed to see your idoc in SXMB_MONI (the idoc flat file will be converted to idoc xml using the meta data loaded automatically in IDX2 and be passed to the xi pipeline)
is it needed to finish first all the setup in Integration Builder to enable the automatic loading of the metadata in IDX2?
Also what is the difference between executing RSEINB00 in a 4.5B to 4.5B  system, and a 4.5B to XI system?  (because rseinb00 is existing even before xi).  is it the idoc xml convertion? if it is then definitely the importing of the idoc type in XI Integration Builder Design is necessary right?
Hope someone can explain clearly
I'll be more than willing to give points to the answer that will completely explain the concept..
Thanks in advance

Hi HJ,
Report RSEINB00 is no dedicated XI Report. You will NOT see the IDOC in SXMB_MONI.
Report RSEINB00 just calls a function module:
IDOC_INBOUND_FROM_FILE
This is the documentation of IDOC_INBOUND_FROM_FILE unfortunately just in german language available:
+Der Funktionsbaustein führt die IDoc-Eingangsverarbeitung von
IDocs aus, die sich in der übergebenen Datei (Dataset) befinden.
Die IDocs werden aus der Ddatei ausgelesen und auf der IDoc-Datenbank
abgelegt. IDocs, die weiterverarbeitbar sind, werden asynchron an die Anwendung weitergegeben. Die zeitliche Entkopplung zwischen Auslesen und Abspeichern auf der einen Seite und der Verarbeitung durch die Anwendung auf der anderen Seite wird durch Erzeugen eines Workflow-Ereignisses bewerkstelligt. Der Ereignis-Container nimmt i.a. mehr als nur eine IDoc-Nummer auf. Die Aufgabe, die durch das Ereignis ausgelöst wird, reicht alle IDocs and die Anwendung weiter.
Ein COMMIT wird nicht nach Verarbeitung jedes einzelnen IDocs abgesetzt, sondern durch einen Datensatzzähler gesteuert, ausgelöst.+
Normally IDOCs are posted to a R/3 System and will processed automatically.
If you have a IDOC lying in the file system of your R/3 you can upload this file and trigger the automatic processing. Your R/3 knows what to do with every single IDOC type. IDOCs point to
a) function modules or
b) workflows
Hope that helps
Regards Mario

Similar Messages

  • IDoc flat file to IDoc

    I am receiving flat file in SFTP Server which need to be posted into SAP (No mapping involved)
    What will be the best approach ?
    1. I tried using IDOCFlatToXmlConvertor (The limitation in the format of source file. The parent and child node relationship should be explicitly mentioned in IDoc flat file which legacy system is not able to do) - Any workarounds ?
    2. I moved the Idoc flat file into SAP application server. Now need to schedule job using program RSEINB00
    3. File Content Conversion
    Any other better solution ? Appreciate your help.
    Thanks and regards,
    Jose Augastine

    For converting Idoc Flat file to idoc xml, ABAP mapping is one of the feasible option.

  • IDOC Flat File-- XI-- IDOC

    Hi,
       I have a requirement wherein we have to read the IDOC flat file and post it as IDOC to SAP using XI. I understand we have to use the Flat File Sender adapter and the IDOC Receiver Adapter. On the Sender Side we have to define the Content Conversion to convert the IDOC Flat File to IDOC XML. Writing File Content Conversion for the IDOC Flat File would be very tedious because of the number of fields and fixed structure of the flat file.
      I have don through the following guide Section 3.2 where it talks abt converting IDOC to IDOC XML using reportRSEINB00.
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/xi/xi-how-to-guides/how%20to%20convert%20between%20idoc%20and%20xml%20in%20xi%203.0.pdf
    I am not clear how to invoke this report in the Flat File Sender adapter. Also is there any other approach.
    Thanks
    Rajeev Gupta

    Hi Rajeev
    You have a flatfile at the sender side so you dnt  have any feasiable option to do other than FCC....FCC is not a tediuos one...if you can provide the strucutrre we will help you out...
    Check out you have a fixedlength file or piple separated one....
    In the functional design how many fields re present and buil the DT,MT MI accoprdingly.....
    you have to just use some conecnt conversion parameters that's it...
    item.fieldSeparator
    item.endSeparator
    item.fieldNames
    here item is your recordset name
    let us know your strucutre
    regards
    Nisar

  • Converting a flat file to IDOC

    Greetings to All,
    I have a requirement where i need to convert an IDOC (flat) file to IDOC.
    the idoc is SHPMNT04.Presently i am trying to implement it using FCC at the sender side as the flat file is fixed length type.
    Can any one suggest me a better method like using XSLT or Java mapping which could make my work smarter as i am Finding it very difficult to count and write the FCC for the IDOC which is have more than 60 segments.
    Any help will be greatly admired.
    Thnaks,
    Anika.

    Hi
    I am still having a doubt if this method will work on real time scenario.I mean i have to pick files
    from an 3rd party FTP location (polling and picking as and when i get a file starting with say
    ABC*.txt).Added to this there will be issue related to the volume of file(1000 per day),will that create
    any performance issues.
    It is now that you are sharing the complete scenario/ problem , just have a glance from your first post at the top & the replies, because its the problem statement that steers the discussion.
    Making the files available for the Report is a seperate task. You have to develop FTP-to-File XI scenario (or regular ftp process to send files across, which normally will not be allowed in XI server), I dont see any other way, if any, I 'assume' that it might complicate the situation.
    Performance - it is not something to do with your scenario alone, but the overall system load, configuration etc. (b.t.w 1000 is normal)
    Can we schedule a job for running the report periodically?
    Yes, scehdule a batch job calling this Report (with necessary variants) with required frequency or exact time (if there is any agreement with sender)
    I have started a POC
    I appreciate that, best way at this moment. you can reverse engineer from the errors to configure your scenario. for any reason,if you think it does not work, you can always stop and/or look for different solution.
    need your help
    - Definitely I will share my thoughts, if time permits
    how will i get the flat file xml(IDOC) in the source side
    do you mean the source structure, you can use the same structure as your target.
    once you are convinced with your solution approach, then it is better to close this thread & start a new one with new issues, for more views & suggestions and better readability.
    @Rajesh - I appreciate your efforts to solve the issue , but the below is not correct & possible, w.r.t this issue
    Here what you need is to do configure File Sender CC with NFS protocol.
    Regards
    Vishnu

  • IDOC to Flat file and Flat file to IDOC

    Hello Experts,
      I have the following requirement in my current project:
    Third Party Sender sends the data in the in the below XML format via HTTP:
    <?xml version="1.0"?>
    <fxEnvelope>
      <header>
        <message>
          <exchangeID></exchangeID>
          <messageID></messageID>
          <subject></subject>
          <payloadType>IDOC</payloadType>
        </message>
        <from>
          <orgID></orgID>
          <locationID></locationID>
          <messageID></messageID>
        </from>
        <to>
          <orgID></orgID>
          <locationID></locationID>
        </to>
      </header>
      <body>
        <Opaque>
          <DataType></DataType>
          <DataStream></DataStream>
        </Opaque>
      </body>
    </fxEnvelope>
    In the above XML, the Tag <DataStream> is a string which contains the IDOC flat file.
    Now, the scenario is HTTP to IDOC, where the sender sends the above XML payload and PI needs to convert <DataStream> to IDOC XML and pass it on to the receiver R/3.
    But the challange i am facing is converting this <DataStream> tag which contains the IDOC flat file to IDOC XML using a Mapping program.Since both adapters are running on ABAP stack i can not go for Adapter Modules available(We are using PI 7.10).
    Looking for some guidance on the same.
    Thanks in advance.
    Cheers,
    Manasa.

    There are 2 options for you
    In either case, you might need a java mapping to convert the DataStream into String. Use a file adpater to write this string to IDOC-File.
    1) Option1: Write the content of DataStream into IDOC-Flatfile.(java mapping) Pick it from PI to convert IDOC-flat file inot IDOC-XML (using std features of PI) & send it to ECC.
    2) Option2: Write the Content of DataStream to IDOC-Flatfile (accessible to ECC system). Configure WE21 to pick the file from a file port.
    If the datastream was IDOC-XML, then it would have been simpler, it will be a direct communcation from PI to ECC (using java mapping & IDOC adapter).
    Regards,
    Siva Maranani

  • Flat File to IDOC- didn't get data into IDOC

    Hi All,
    Our scenario is Flat File to IDOC....
    working fine... didn't get any errors... IDOC also generated but didn't get any data in that IDOC....
    for details see the attachment...
    Thanks In Advance,
    vishnu.........

    Hi Rajesh,
    I am getting payload in RWB from sender Cc like below:
    <?xml version="1.0" encoding="utf-8" ?>
    - <ns:MT_File xmlns:ns="http://mouritech.com/file2idocsender"> 
    - <MT_File> 
    <Value>1</Value>  
    <Reason>test</Reason>  
    </MT_File>
    </ns:MT_File>
    If i test with this payload in mapping i am getting a pop up with this message and mapping not completed ...
    Could you please let me know what i have to do now?
    Pop Up: 
            The processing instruction target matching "[xX][mM][lL]" is not allowed.
    See error logs for details    

  • Suggesstions on flat file to IDOC

    Hi,
       Help me on following topics,
       1) What is the use of port in program RSEINB00. I want this program to read a flat file and convert it into IDOC. How does this program recognize to which IDOC format it has to convert the flat file.
       2) what is the use of file port and ABAP port when to use them. My requirement is to download a flat file or CSV flie into the customer system through FTP.Can I specify the path in the directory itself or do i need to write a seperate program for this.
      3) what is the use of function module in file port.Is it used to generate file name alone or file itself.Can we write a own function.
    Thanks & Regards,
    Kaarthik.k

    Karthik,
    You know what you could do.. To get the input file format
    First download the MATMAS IDOC or any idoc for that matter to a flat file, using the standard transaction BD10.
    Then see the format.
    As a third step upload the same file as input file with minimal changes to the data keeping the format same.
    This way you can figure out how the system is able to fetch all the configuration details.
    Hope this helps.
    Rgds,
    HR

  • Convert flat file to Idoc format

    Due to some security reasons , the ALE scenario for material master is not allowed directly between 2 SAP systems
    So the SAP system A is sending a flat file (not in Idoc format)
    From SAP system B , we need to do an Inbound process to post the Idocs with following rough steps
    1) Flat file upload
    2) Flat file -> Idoc format conversion  (EDI subsystem is not existing in this scenario and so this step has to be done within SAP)
    3) Idoc processing
    Even though this scenario can be accomplished without using Idocs ,
    for better monitoring and reprocessing options it is required that Idocs need to be used.
    Please explain the detailed steps for the above scenario

    Hi,
    This sounds very much lie complicating things unnecessary...Are this 2 SAP systems of the same company ?
    Why would using IDOCS be more insecure then using flat files ?
    If the purpose is to have a manual check before upload, you can achieve the same with IDOCS.
    Please add some background to the process,
    regards
    Dirk

  • Extract to flat file or IDOC

    Does anybody know how to use BW Datasources in R3 (found in transaction RSA5) to extract data to a flat file for the purpose of loading a non-SAP data warehouse?
    The export file may be an IDoc.
    I tried RSA3, but it seems you have to specify a "target system" which is a BW system. I simply want to use the BW extractors to extract to a file.
    Thanks - I will reward points.

    Hi,
    If it is function module based extractor then you can use the copy/modify the code (copy in case you are authorized to change it). Now at the end of the extractor write an ABAP code to download the data into a flatfile using GUI_DOWNLOAD or any suitable function module. You can use this extractor fn module in an ABAP program and schedule it everyday to create the flatfile.
    If it view/table base extractor then use that in an ABAP program to create the flatfile.
    Revert if you need more info.
    You can find the type of extractor in RSO2 and also in the tabel ROOSOURCE.
    Bye
    Dinesh
    Message was edited by: Dinesh Lalchand

  • Flat file to idoc mapping issue

    Hi Gurus,
    i had a flat file format in sender side as below:
    H_ID     TYP_CODE    line_elemet      Quantity
    5896  STANDARD                       1.transmitter    1
    5896                  STANDARD       2.xxxxxxxxx           1
    5896                   STANDARD      3.yyyyyyyyy  2
    6895                  STANDARD       1.aaaaaaaaa        1
    9436                  STANDARD       1.bbbbbbbbb          4
    9436                  STANDARD       2.ggggggggg          3
    The above file need to be send to an Idoc.
    for which same header_ID values should create only one header segment, under that many a line segments should create as many line items appear on that header_id value.
    Here my query is how to suppress the repetetive header values to create onlyone header segment. And how to create as many line_item segments as the number of line items appear.
    points obvoius for the response
    Thanks in advance,
    Sekhar.

    About map problem I suggest youn to see the following link that are really helpful to improve knowledge about mapping:
    /people/sravya.talanki2/blog/2005/08/16/message-mapping-simplified--part-i
    /people/sravya.talanki2/blog/2005/12/08/message-mapping-simplified-150-part-ii
    I suggest you to see the following link to learn more about mapping:
    Mapping functionality in XI
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/9202d890-0201-0010-1588-adb5e89a6638
    SAP Exchange Infrastructure - Graphical_Mapping
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/6658bd90-0201-0010-fbb6-afe25fb398d3
    SAP Exchange Infrastructure - Graphical Mapping Exercise
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/fd5ebd90-0201-0010-d697-91374d5b5190
    SAP Exchange Infrastructure - Graphical Mapping - Advanced
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/be05e290-0201-0010-e997-b6e55f9548dd
    SAP Exchange Infrastructure: Mapping Patterns - Understand Context Handling in Message Mapping - Webinar Powerpoint
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/f59730fa-0901-0010-df97-c12f071f7d3b
    SAP NetWeaver Exchange Infrastructure Mapping Troubleshooting - Webinar Powerpoint
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/e01e9400-9e81-2910-20a5-a862945a5e98
    Mapping Lookups a RFC API
    Mapping lookups - RFC API
    XI 3.0 New Mapping Features
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/8a57d190-0201-0010-9e87-d8f327e1dba7
    I hope these links will be usefull.
    Regards,
    Salvatore

  • File content conversion - flat file to Idoc error

    Dear Experts,
    I have a situation where im using FCC in the sender adapter The data is in flat file with multiple fields separated by space .
    (*header444456    line4445758 header343434 line445687*) sample falt file data . should be divided as below
    header - 44456 , 343434
    *line    -  44457578 , 445687
    So i want to read the header items and pass it into header data of the IDoc and line items into line item data of the Idoc . And the header items and fields items are mixed up in the flat file . How do i read from the position 20 to 26 , 37 to 56 intermittently .And im not using any key field name . as the whole data is in one line . Any solution would be of great help .
    Thanks in advance
    Ganga
    Edited by: N.Ganga on Jan 28, 2012 3:30 PM
    Edited by: N.Ganga on Jan 28, 2012 3:30 PM

    Dear Grzegorz ,
    Yes i totally agree with you it can be separated by comma . But it is as below
    Header       - (once ).............................................. Flat file example :
         Field 1    -
    >order    line no 1   plant        material 1  code 1  quantity 1 
          .......................................................................order    line no 2   plant        material 2  code 2  quantity 2
         Field 2  (plant vlaue shuld come........................................................|
    Line          -  repeats (0-unbounded)                                      |                                     |                             |
       field 1 (line no 1)----
    |                                     |                             |
       field 2(material1)----
    |                             |
       field 3 (quant 1)----
    |
       field 1 (line no 2)----
    |                                     |                             |
       field 2(material2)----
    |                             |
       field 3 (quant 2)----
    |
    So i need to read the data intermittently and map them in the line items ignoring the order and plant data in every line apart from the first line. The order and plant remains the same in the flat file only line items keep changing .
    Hope my question is clear .
    Regards
    Ganga

  • Mapping FLAT File to Idoc

    Hi,
    I have to implement a flatfile --> XI ---> IDOC scenario and I have a question about the mapping.
    Suppose I have a Flat Fiel as following with the first 2columns as key:
    100991;001;text1;posting date
    100991;002;text2;posting date
    100992;001;text4;posting date
    100992;002;text6;posting date
    I have to pass this items to a IDOC strucutured  with header and positions.
    By mapping how can I group  key data to pass to single Idoc?
    Thanks
    marco

    Hi ,
    I have done it with ORDERS IDOC Structure .
    Since the source is a flat file you could take a simple structure with row and all the fields following it ( say filed1 , field2, field3).
    Take a bottom up approach for the child :
    Change the context of all the individual fields to the root then apply split by value on field3 ( this introduces context changes )
    Then format its parents Queue (Field2) based on Field3 Queue for this use the function Format By Example .
    Use the resulting queue  as one of the argument and Field1 to generate the link .
    Using Graphical this requirement is achievable . How ever it is upto your ease to choose which way you want to do it .
    Thanks & Regards
    Kavitha

  • Unsorted Flat File into IDoc with multiple use of nodes

    Hi Experts!
    I am facing a little problem. I have a source flat file for a classification where some fields appear several times.
    My source flat file looks like this:
    item1; field1a
    item2; fieldA
    item3; fieldxa
    item1; field1b
    as you can see the item1 exists twice (further appearances are also possible).
    Now i have to map the flat file into an IDoc structure
    My target IDoc looks like this
    Header
    -- node1
    attribute1
    -- node2
    the "field1a" and "field1b" has to be mapped into the "attribute1" in "node1". "node1" has to be duplicated for each time an "item1" appears (.. and if item2, item3 etc. appears twice, three ... four times...).
    So how can i reach it that the node1 will be duplicated automatically when an item appears twice or more times? I know that it could be possible to work with "SplitByValue"... but for this i need all item1 in an straight order.... but i dont have them in a correct order.
    I am looking forward to your suggestions.
    Thank you in advance.
    Udo

    Complex sorting is not or not easy possible with the grafical mapping tool.
    Use a sequence mapping. The first mapping is a simple XSLT which does the sort. The second mapping works as usual.
    I have an example XSLT which I used for a different purpose:
    <?xml version="1.0" encoding="UTF-8"?>
    <xsl:stylesheet version="1.0"
    xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
      <xsl:template match="/">
        <ORDERLIST>
          <xsl:for-each select="ORDERLIST/ITEM">
            <xsl:sort select="ID"/>
            <xsl:copy-of select="."/>
          </xsl:for-each>
        </ORDERLIST>
      </xsl:template>
    </xsl:stylesheet>
    Regards
    Stefan

  • Flat File and IDoc

    Hi,
      Is it possible to read a flat file and create the sale order through IDoc.  Can i do this by DOC_INBOUND_FROM_FILE without XI?? What file format should i pass??
    Regards,
    Kit

    Hi  ,
    you can create Sales order through IDoc. IDOC_INPUT_ORDERS
    At a high level, the IDOC processing executes in the following manner:
    1.     Interpret IDOC header segments and captures organizational, customer master and purchase
                   order header details. Performs user exits for each segment to process customizations to data
                     processing.
    2.     Interprets item level segments and captures item level details like material information. Again,
                   it performs user exits for each segment.
    3.     Sums up the order data and determines the posting criterion viz. creating order with reference
                      etc.
    4.     Builds up batch data communication sequence (BDC) with respect to the required screen
                  sequence of posting a sales order.
    5.     While building up the BDC data, system performs user exit to process customizations to BDC
                    data.
    6.     Calls transactions VA01 using the BDC data.
    7.     If the processing fails, an appropriate workitem is generated for workflow processing.
    if you give me brief i can help you out more.
    if helpful REWARD points
    Thank you .
    Regards
    Ramana

  • Flat file to IDOC creation

    hi all,
    I'm looking for the ABAP (sample) Program which can help me out in generating IDOC from the Flat file.
    Flat file will be residing on local PC.
    I required this for Purchase Order Confirmation Step (MSG Type ORDRSP).
    If any had done it, then let me know.
    Regards,
    S Anand

    Hi
    Sorry it is not copied properly.
    Read the data from flst file using function module GUI_UPLOAD and for each entry of internal table fille the control recor and data record and pass to function module IDOC_INBOUND_ASYNCHRONOUS to generate IDOC.
    Sample code which i have used in my report to update customer master using IDOC
    PARAMETERS:p_kunnr TYPE kna1-kunnr,
    p_zahls TYPE knb1-zahls,
    p_tlfns TYPE knb1-tlfns,
    p_intad TYPE knb1-intad.
    START-OF-SELECTION.
      PERFORM idocgeneration.
    *&      Form  idocgeneration
          IDOC Generation
    FORM idocgeneration.
      DATA:wa_knb1 TYPE knb1,
      wa_kna1 TYPE kna1,
      wa_controlrecord LIKE edi_dc40,
      wa_detailrecord  LIKE edi_dd40,
      wa_e1kna1m TYPE e1kna1m,
      wa_e1knb1m TYPE e1knb1m.
      DATA:it_controlrecord TYPE STANDARD TABLE OF edi_dc40,
      it_detailrecord  TYPE STANDARD TABLE OF edi_dd40.
      CONSTANTS: cedidc40    LIKE edi_dc40-tabnam  VALUE 'EDI_DC40',
                 cdebmas06   LIKE edi_dc40-idoctyp VALUE 'DEBMAS06',
                 czdebmas06  LIKE edi_dc40-cimtyp  VALUE 'ZZDEBMAS06',
                 cdebmas     LIKE edi_dc40-mestyp  VALUE 'DEBMAS',
                 ce1kna1m    LIKE edi_dd40-segnam  VALUE 'E1KNA1M',
                 ce1knb1m    LIKE edi_dd40-segnam  VALUE 'E1KNB1M',
                 c_2       TYPE c VALUE '2'.
    Control Record
      CLEAR: wa_controlrecord,it_controlrecord[].
      wa_controlrecord-tabnam  = cedidc40.
      wa_controlrecord-mandt   = sy-mandt.
      wa_controlrecord-direct  = c_2.
      wa_controlrecord-idoctyp = cdebmas06.
      wa_controlrecord-cimtyp  = czdebmas06.
      wa_controlrecord-mestyp  = cdebmas.
      wa_controlrecord-mesfct  = space.
      wa_controlrecord-sndpor  = 'SAPPLD'.
      wa_controlrecord-sndprt  = 'KU'.
      wa_controlrecord-sndprn  = 'A000'.
      wa_controlrecord-rcvpor  = 'SAPPLD'.
      wa_controlrecord-rcvprt  = 'KU'.
      wa_controlrecord-rcvprn  = 'A000'.
      APPEND wa_controlrecord TO it_controlrecord.
    Remove the contents in detail record internal table
      REFRESH it_detailrecord.
    Create detailed data
    Assign values to the segment fields
      CLEAR:wa_kna1,wa_e1kna1m.
      SELECT SINGLE * FROM kna1 INTO wa_kna1 WHERE kunnr = p_kunnr.
      IF sy-subrc IS INITIAL.
        MOVE-CORRESPONDING wa_kna1 TO  wa_e1kna1m.
        wa_e1kna1m-msgfn = 'INT'.
    Create the detail record
        CLEAR wa_detailrecord.
        wa_detailrecord-segnam  = ce1kna1m.
        wa_detailrecord-mandt   = sy-mandt.
        wa_detailrecord-segnum  = '000001'.
        wa_detailrecord-psgnum  = '000000'.
        wa_detailrecord-hlevel  = '01'.
        wa_detailrecord-sdata   = wa_e1kna1m.
        APPEND wa_detailrecord TO it_detailrecord.
      ENDIF.
    *assign values to the segment fields
      CLEAR:wa_knb1,wa_e1knb1m.
      SELECT SINGLE * FROM knb1 INTO wa_knb1 WHERE kunnr = p_kunnr.
      IF sy-subrc IS INITIAL.
        MOVE-CORRESPONDING wa_knb1 TO  wa_e1knb1m.
        wa_e1knb1m-msgfn = 'INT'.
        wa_e1knb1m-intad = p_intad.
        wa_e1knb1m-zahls = p_zahls.
        wa_e1knb1m-tlfns = p_tlfns.
      ENDIF.
    Add segment to the detail record
      CLEAR wa_detailrecord.
      wa_detailrecord-segnam  = ce1knb1m.
      wa_detailrecord-mandt   = sy-mandt.
      wa_detailrecord-segnum  = '000003'.
      wa_detailrecord-psgnum  = '000001'.
      wa_detailrecord-hlevel  = '02'.
      wa_detailrecord-sdata   =  wa_e1knb1m.
      APPEND wa_detailrecord TO it_detailrecord.
      CALL FUNCTION 'IDOC_INBOUND_ASYNCHRONOUS'
        TABLES
          idoc_control_rec_40 = it_controlrecord
          idoc_data_rec_40    = it_detailrecord.
      IF sy-subrc IS INITIAL.
        WRITE:/ 'Sucessfully Update'.
      ENDIF.
    ENDFORM.                    "IDOC Generation

Maybe you are looking for