Post multiple IDOCs from a single inbound file

Hi.
I have an inbound file with a single record structure. Each record has a field "DocumentNumber". There may be multiple records with the same DocumentNumber. The Document Number will increment to 2, 3 etc. Each set of records with the same DocumentNumber relates to a single IDOC that I want to post.
IE
1, various fields   <- IDOC 1
1, various fields   <- IDOC 1
2, various fields   <- IDOC 2
2, various fields   <- IDOC 2
3, etc
I plan to use the BPM to split (transform) the file message into multiple IDOCs, using a message mapping defined in the Designer. I have done all this, and defined my Source Message as Single Occurrence (1) and my Target Message as 1:Unbounded. I therefore have a mapping within the target "Message1" structure.
Can anybody tell me how to define my mapping flow to create a new target structure IDOC when the DocumentNumber field increments?   I was wondering about "createif" where DocumentNumber <> a global field set tot he previous value....
Any help would be very much appreciated.
JW
[email protected]

Hi Tony,
first you have to change the occurens - look in this Blog:
/people/michal.krawczyk2/blog/2005/12/04/xi-idoc-bundling--the-trick-with-the-occurance-change
Mapping - you need to use node funktions if you use graphical mapping (f.e. SplitByValue, CerateIf and so on)
Good for that is this blog:
/people/sravya.talanki2/blog/2005/12/08/message-mapping-simplified-150-part-ii
If you need more - keep on asking
Regards Matt

Similar Messages

  • How can we save multiple IDocs as a single Flat file in R/3 system ?

    Hi,
    How can we save Multiple Idocs as a single Flat IDoc in R/3 (Not xmlized)
    Kulwinder

    Hi,
    Check this link for Mutiple IDOCs into single File.
    /people/pooja.pandey/blog/2005/07/27/idocs-multiple-types-collection-in-bpm
    Regards,
    phani
    Reward points if Helpful:)

  • Posting  multiple records from file to idoc

    Hi Exerts,
       i have done scenario to post one record from file to IDOC, to post multiple records from file to idoc what are the options to be modified in the scenario.
    thanks,
    dhanush

    Hi Dhanush,
      You need to change the occurance of idoc to 0 to unbounded ie need to opt idoc packaging.
      Just download the xsd of you idoc to the desktop and change the occurance tag as "<xsd:element name="IDOC" type="COND_A.COND_A02" maxOccurs="unbounded" />" and then reimport it into External definition and use it in your message mapping and then map it with you source structure.
    Regards,
    Prasanthi.

  • Multiple iDocs in a single file

    Hello,
    I'm working on some integration to send a purchase order change file into SAP from BizTalk.  Everything works when we send every change as its own iDoc, or when we send all changes for a single PO in a single file, but when we try and include multiple iDocs in a single send, we get an error that it has to many elements.  The definition below is of the idocData element which indicates it can send more than one:
    <xs:elementxmlns:q2="http://Microsoft.LobServices.Sap/2007/03/Types/Idoc/3/PORDCH03//711"minOccurs="1" maxOccurs="2147483647" name="idocData" nillable="true"type="q2:PORDCH03">
    A sample of the file:
    <?xml version="1.0"?>
    <ns0:Send xmlns:ns3="http://schemas.microsoft.com/2003/10/Serialization/" xmlns:ns2="http://Microsoft.LobServices.Sap/2007/03/Types/Idoc/Common/" xmlns:ns1="http://Microsoft.LobServices.Sap/2007/03/Types/Idoc/3/PORDCH03//711" xmlns:ns0="http://Microsoft.LobServices.Sap/2007/03/Idoc/3/PORDCH03//711/Send">
         <ns0:idocData>
            <ns1:EDI_DC40>
            </ns1:EDI_DC40>
            <ns1:E2PORDCH000GRP>
            ......        </ns1:E2PORDCH000GRP>
        </ns0:idocData>
        <ns0:idocData>
            <ns1:EDI_DC40>
            </ns1:EDI_DC40>
            <ns1:E2PORDCH000GRP>
         </ns1:E2PORDCH000GRP>
        </ns0:idocData>
    </ns0:Send>

    Hey Josh,
    Hope your issue is fixed by now.
    If not please check the Inbound Process code of the Order which is triggering Idoc in the SAP System.
    You have to modify that as per se your need.
    Thanks.

  • Append or combine multiple IDOCs into a single IDOC file

    Hi All,
    We are implementing multiple new payment types that will generate IDOC files for us to send to the bank.  To keep the cost to the minimum, the requirement is to combine multiple IDOCs to a single file.
    I'd like to know the most efficient way to complete this task.  Also, I am new to this forum, please let me know if I need to include additional information.
    Your help will be deeply appreciated.
    Thank you,
    Joanne T.

    Hi Milind,
    One way you can do this is generate each report in PDF or Postscript, and then use Adobe Acrobat Distiller to combine the files into one PDF document.
    Regards,
    Stewart

  • Executing multiple sql statements from a single sql file

    Hi, I am Vijay Krishna.
    I want to drop user, drop tablespace, create tablespace and create user from a single executable file or a single sql file. The command should be in sequence. How can we achieve it? Can I anybody help me in this regard. I want this as soon as possible. It's urgent. Kindly post a reply.
    Also, how can we know the oracle home directory from a java program? The problem is we should know the Oracle home directory and use it for creating the tablespace. In the userinterface we will give just for a new database user creation. I will be really thankfull if anybody can help me in this regard.

    It is showing any error messages.
    I will diplay the entire batch file which we are using.
    sqlplus / as sysdba
    drop user examination cascade;
    drop tablespace examination;
    create tablespace examination
    datafile 'C:\oracle\product\10.1.0\oradata\orcl\examination.dbf'
    size 500M autoextend on;
    create user examination identified by examination
    default tablespace examination
    quota unlimited on examination;
    grant connect, resource to examination;
    exit;
    when i run the batch file from the DOS prompt it is entering into the sql prompt and coming out in a fraction of a second. We are just seeing a screen coming and going. But no error messages are being displayed.
    first we thought that as we are giving the create tablespace and create user in the same file we created another file and tried without having the create commands. Even then the user didn't get dropped.

  • Not able to Post multiple IDOCS

    Hi All,
    I am getting my output from XSLT mapping like below:
    <?xml version="1.0" encoding="UTF-8" ?>
    <ZORDERS5>
    + <IDOC BEGIN="1">
    + <IDOC BEGIN="1">
    </ZORDERS5>
    But in the SAP R/3 it is able to post only the last IDOC (which is second IDOC in this case). I want to post all the IDOCS. What could be the problem?
    Edited by: sreinivas prak on May 13, 2008 11:12 AM

    Hi Srinivas,
    Post multiple IDOCS
    There are two Message Mappings involved in the whole scenario. First mapping is N:1 Mapping which will be used in BPM and second Mapping is 1:1 Mapping:
    1.     First Message Mapping &#61664; N: 1 – Mapping between IDoc (occurrence – 0...unbounded in “Messages” tab) to IDoc with changed occurrence of its top node (IDOC) as 0...unbounded.
    Check these Blogs:
    /people/michal.krawczyk2/blog/2005/12/04/xi-idoc-bundling--the-trick-with-the-occurance-change
    /people/stefan.grube/blog/2006/09/18/collecting-idocs-without-using-bpm
    /people/sap.user72/blog/2005/01/28/setting-up-inbound-qrfc-queues-for-serializing-idocs-using-the-idoc-adapter
    /people/prasadbabu.nemalikanti3/blog/2006/02/24/collecting-and-bundling-vendor-records-from-different-multiple-interfaces-file-systempeoplesoft-and-sending-to-sap-r3-system-part-1
    Thanks,
    Satya  Kumar
    Edited by: SATYA KUMAR AKKARABOYANA on May 13, 2008 11:21 AM

  • How do I insert multiple rows from a single form ...

    How do I insert multiple rows from a single form?
    This form is organised by a table. (just as in an excel format)
    I have 20 items on a form each row item has five field
    +++++++++++ FORM AREA+++++++++++++++++++++++++++++++++++++++++++++++++++++
    +Product| qty In | Qty Out | Balance | Date +
    +------------------------------------------------------------------------+
    +Item1 | textbox1 | textbox2 | textbox3 | date +
    + |value = $qty_in1|value= &qty_out1|value=$balance1|value=$date1 +
    +------------------------------------------------------------------------+
    +Item 2 | textbox1 | textbox2 | textbox4 | date +
    + |value = $qty_in2|value= $qty_out1|value=$balance2|value=$date2 +
    +------------------------------------------------------------------------+
    + Item3 | textbox1 | textbox2 | textbox3 | date +
    +------------------------------------------------------------------------+
    + contd | | | +
    +------------------------------------------------------------------------+
    + item20| | | | +
    +------------------------------------------------------------------------+
    + + + SUBMIT + ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    Database Structure
    +++++++++++++++++
    + Stock_tabe +
    +---------------+
    + refid +
    +---------------+
    + item +
    +---------------+
    + Qty In +
    +---------------+
    + Qty Out +
    +---------------+
    + Balance +
    +---------------+
    + Date +
    +++++++++++++++++
    Let's say for example user have to the use the form to enter all 10 items or few like 5 on their stock form into 4 different textbox field each lines of your form, however these items go into a "Stock_table" under Single insert transaction query when submit button is pressed.
    Please anyone help me out, on how to get this concept started.

    Hello,
    I have a way to do this, but it would take some hand coding on your part. If you feel comfortable hand writing php code and doing manual database calls, specificaly database INSERT calls you should be fine.
    Create a custom form using the ADDT Custom Form Wizard that has all the rows and fields you need. This may take a bit if you are adding the ability for up to 20 rows, as per your diagram of the form area. The nice thing about using ADDT to create the form is that you can setup the form validation at the same time. Leave the last step in the Custom Form Wizard blank. You can add a custom database call here, but I would leave it blank.
    Next, under ADDT's Forms Server Behaviors, select Custom Trigger. At the Basic tab, you enter your custom php code that will be executed. Here you are going to want to put your code that will check if a value has been entered in the form and then do a database INSERT operation on the Stock_table with that row. The advanced tab lets you set the order of operations and the name of the Custom Trigger. By default, it is set to AFTER. This means that the Custom Trigger will get executed AFTER the form data is processed by the Custom Form Transaction.
    I usually just enter TEST into the "Basic" tab of the Custom Trigger. Then set my order of operations in the "Advanced" tab and close the Custom Trigger. Then I go to the code view for that page in Dreamweaver and find the Custom Trigger function and edit the code manually. It's much easier this way because the Custom Trigger wizard does not show you formatting on the code, and you don't have to keep opening the Wizard to edit and test your code.
    Your going to have to have the Custom Trigger fuction do a test on the submitted form data. If data is present, then INSERT into database. Here's a basic example of what you need to do:
    In your code view, the Custom Trigger will look something like this:
    function Trigger_Custom(&$tNG) {
    if($tNG->getColumnValue("Item_1")) {
    $item1 = $tNG->getColumnValue("Item_1");
    $textbox1_1 = $tNG->getColumnValue("Textbox_1");
    $textbox1_2 = $tNG->getColumnValue("Textbox_2");
    $textbox1_3 = $tNG->getColumnValue("Textbox_3");
    $date1 = $tNG->getColumnValue("Textbox_3");
    $queryAdd = "INSERT INTO Stock_table
    (item, Qty_In, Qty_Out, Balance, Date) VALUES($item1, $textbox1_1, $textbox1_2, $textbox1_3, $date1)"
    $result = mysql_query($queryAdd) or die(mysql_error());
    This code checks to see if the form input field named Item_1 is set. If so, then get the rest of the values for the first item and insert them into the database. You would need to do this for each row in your form. So the if you let the customer add 20 rows, you would need to check 20 times to see if the data is there or write the code so that it stops once it encounters an empty Item field. To exit a Custom Trigger, you can return NULL; and it will jump out of the function. You can also throw custom error message out of triggers, but this post is already way to long to get into that.
    $tNG->getColumnValue("Item_1") is used to retrieve the value that was set by the form input field named Item_1. This field is named by the Custom Form Wizard when you create your form. You can see what all the input filed names are by looking in the code view for something like:
    // Add columns
    $customTransaction->addColumn("Item_1", "STRING_TYPE", "POST", "Item_1");
    There will be one for each field you created with the Custom Form Wizard.
    Unfortunately, I don't have an easy way to do what you need. Maybe there is a way, but since none of the experts have responded, I thought I would point you in a direction. You should read all you can about Custom Triggers in the ADDT documentation/help pdf to give you more detailed information about how Custom Triggers work.
    Hope this helps.
    Shane

  • Posting multiple idocs without BPM

    Hi all,
    We have a JDBC->XI->Idoc scenario.
    We would like to post "n" idocs to SAP for the "n" records fetched from database.
    Due to performance issues we are not using BPM.
    Is there any other way to post multiple idocs without using BPM.
    rgds
    Prashant

    HI,
    As suggested by others, it is possible without BPM.
    For this, you need to alter the Idoc Schema i.e change the occurence of the idoc in the idoc schema. Then import this xsd as a External Definition into Repository..then mapping etc ..
    Regards,
    Moorthy

  • Merge statement - update multiple columns from a single sub-select

    Is it possible to write in 10gR2, a MERGE statement, with UPDATE for multiple columns from a single sub_select?
    like this:
    MERGE INTO tableA
    using ( select * from temp) tmp
    on( tableA. col1 = tmp.col1)
    when matched then
    update set  ( tableA.col5,
                       tableA.col6,
                       tableA.col7) = ( select sum(col2), sum(col3), sum(col5)
                                                                                 from tableX
                                                                                where tableX.col1 = tableA.col1...)

    Hi,
    The USING clause is not a sub-query, so it can't reference columns from tables that are not in it.
    Include tableA in the USING clause if you really need to refer to it there. (It's not obvious that you do.)
    As always, it helps if you post:
    (1) The version of Oracle (and any other relevant software) you're using
    (2) A little sample data (just enough to show what the problem is) from all the relevant tables
    (3) The results you want from that data (In the case of a DML statement, such as MERGE, this will be the state of the tables when everything is finished.)
    (4) Your best attempt so far (formatted)
    (5) The full error message (if any), including line number
    Executable SQL statements (like "CREATE TABLE AS ..." or "INSERT ..." statements) are best for (2).
    If you can present your problem using commonly available tables (for example, tables in scott schema, or views in the data dictionary), then you can omit (2).
    Formatted tabular output is okay for (3).

  • Writing multiple arrays to a single xml file at seperate times without overwriting the previous file?

    Hi my name is Dustin,
    I am new to labview and teststand... I am trying to right multiple arrays of data to a single xml file. I can do this with a cluster but I have to create a variable for each of those arrays (21 arrays) and I was hoping to use the same variable for each array. Meaning I obtain my array of data write it to an xml file then replace that array in that variable with a new array and then call up my VI that writes that array to an xml file and write it to the same xml file underneath the first array without overwriting it. Attached is my VI I created to write an array to an xml file. Again I am wondering if there is a way to write multiple arrays to a single xml file at different times without overwriting the previous xml file.
    Thanks
    Solved!
    Go to Solution.
    Attachments:
    Write_to_XML_File.vi ‏11 KB

    Hi dlovell,
    Check the attached example. I think it may help you.
    Regards,
    Nitz
    (Give Kudos to Good Answers, Mark it as a Solution if your problem is Solved) 
    Attachments:
    Write to XML.vi ‏17 KB

  • Want to add multiple idoc type with single message type.

    Hi Gurus,
    I have a problem. I want to add multiple idoc type with single message type in WE20.
    How we can do this in WE20 or is there any other way to do that?
    Please help me.
    Thanks in advance.
    Srimanta.

    hi,
    basically in partner profile i.e. in we20 , we add details to the receiver / sender port that we have created using we21.
    so what exactly we do in that is that we first use the message type for those idocs that we have created.
    now based on those message type we create a process code. now this is the reason why you cannot apply several message types with the same name in we20... as process code is unque for each message type.
    so thats why you can only assign the same message name to several idocs in we82 and then in we20 define the process code for that message type.
    it will solve your problem.
    hope this will help you!!!
    Thanks & regards,
    punit raval.

  • Multiple smartform output to single pdf file

    HI,
    I am new to ABAP. I have a requirement to combine multiple smartfrom output to  single pdf file.  I searched in this site. I got material but i did not get the complete concept. Can anybody tell me the methodology and sample code to do that.
    Thanks & regards,
    Maha.

    Hi Mahalakshmi,
    Clik on the link to view document: <b>[Combining Multiple Smartform Outputs Into One PDF File|https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/62ae7fcd-0b01-0010-3e9d-a54f26944450?overridelayout=true]</b>
    Thanks
    Venkat.O

  • How to send multiple idocs from WE19?

    How to send 100 IDocs at  a time using We19?
    in other words, can we generate 100 IDocs from a single Idoc using We19
    Thanks,
    Ven

    Hi Venkat,
    Check program RSEOUT00.
    Hope this helps.
    Regards
    Lakshman

  • Error:  Current provider does not support returning multiple recordsets from a single execution

    Hello,
    The following piece of code which has been working for the
    past five years suddenly started giving me the following error:
    Current provider does not support returning multiple recordsets
    from a single execution
    We have recenlty moved this site to a new server. Could this
    error be related to their CFAdmin settings? Eveything else on the
    site seems to be working fine. Or am I using an outdated tag or
    something?
    Any light in this direction is appreciated, thanks.
    Here's the code:

    There doesn't seem to be anything that seems wrong with the
    code. It might have something to do with the Max Pooled Statements
    or Number of Connections settings in the CF Administrator, but it
    could just as easily have something to do with a setting on the
    database. I would check with your provider.

Maybe you are looking for