JDBC to Idoc mapping - create multiple Idocs from 1 JDBC input

I am importing data using JDBC and I want to put the data in an IDoc on a SAP system.  my data is about 100,000 rows, but my Idoc (ZIDOC) is defined as 1-35,000 for the segments.  I have followed Ossnote 814393, and also set up my Interface Mapping to use my JDBC source and the Idoc as the target.  In my Message Mapping, i use the source as my JDBC Message Type, and the target is my External Definition Idoc (changed to be 1 to unbounded). 
My incoming JDBC mapping is:
JDBCinput     (1:1)
  -row            (0...Unbounded)
      -part        (1:1)
      -unit        (1:1)
      -type       (1:1)
my outgoing Idoc (from external definition) is:
ZIDOC           (1:1)
  -IDOC          (1...Unbounded)
     -Begin       (required)
     -EDI_DC40  (1:1)
     -Zsegment   (1...35,000)
        -part        (1:1)
        -unit        (1:1)
        -type       (1:1)
I currently map JDBCinput = ZIDOC and IDOC,  row = Zsegment, and the rest of the rows match. 
When I use this mapping, my first 35,000 rows from my JDBC input gets mapped to ZIDOC with 35,000 segments, but the remaining 65,00 rows from my JDBC input just seem to be lost, as only this one ZIDOC is created.  I would expect to see 3 Idocs created, 2 with 35,000 segments each, and the 3rd Idoc created with 30,000 segments.
Does anyone know what I need to change to get this mapping to work and create the extra needed Idocs?  Can this be done with out using a BPM?
Any guidance? 
Thanks
Jake

HI,
Just try out with context change and check if it works
In this type of case, it is easy to use Java mapping so that you can generate target structures as you like.
Hope this helps,
Regards,
moorthy

Similar Messages

  • Create multiple idoc with multiple receivers based on value mapping table

    Hi,
    Scenario: 
    Step1 : sender sends a finance doc iin the form of an idoc. This idoc will have multiple line items based on profit center. Do determine the value of receiving comp code(header field) n receiving system(logical sys name) value mapping table has to be used.
    Solution so far: I can put an rfc lookup for fetching receiving comp code from mapping table with i/p paraameter as profit center . And split the incoming idoc based on comp code value by using split by value. Now I need your advise 2 take this further.
    Issue 1 : say the incoming idoc has 4  line seg wid 4 diff profit center
    Profit center.       Rec comp code.   Recv sys
    P1.                       C1.                        R1
    P2.                       C2.                        R1
    PS.                       C2.                        R1
    P3.                       C3.                        R2
    Nw using this info, I want 3 diff idocs to be created for each unique comp code.
    Idoc 1 : for C1 wid one line item + 1 for reconsilation ( to be generated additionally)
    Idoc2 : for C2 wid 2 line items + 1 for reconsilation
    Idoc 3: for C3 wid 1 line item + 1 for reconsilation
    Idoc 1 and idoc 2 shud be sent to R1.
    Idoc 3 shud be sent to R2.
    Kindly advise on this

    Hi experts,
    U all r pretty close, but let me put this more clearly.
    Step1: create multiple idocs based on unique comp code - I'm able to do this using rfc lookup n split by value. So I get 3 idocs each for c1, c2 n c3.
    Nw as per the values from value mapping table.
    Idoc for c1 contains 1 line seg.
    Idoc for c2 contains 2 line segs.
    N idoc for c3 contains 1 line seg.
    steps2 n 3,  where I do not have a confirmed solution yet n need ur advise.
    Step 2 : for each idoc generated I need 2 create n additional segment, mapping 4 which will be based on the values in the original segments for that idoc.
    In d above scenario, idoc for c1 contains 1 line seg, nw I want 2 add one more seg to it. The amount and pisting key values in this segment wud be calculated based on the values of the amount and posting key belonging to the original segment in this idoc.
    Similarly for idoc for c2 there are 2 segs, nw I need one more, means 3 in allm
    Hence for idoc for c3, 1 orig already present + 1 more. = total 2.
    Nw I need ur advise on how 2 generate this additional seg in each idocm
    Step 3: when all dese 3 idocs are generated, ( in this case itz 3, in real time it can be n), I need to find their respective receivers using rfc lookup n then based on the receiver send 2 resp recvng systm
    Nw how do I do this?
    Please explain with examples if possible 4 bettr understanding.
    u2020ђąu03B7kўu03C3u03C5 in advance.

  • 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 multiple idocs based on complex condition

    HI Users,
    my scenario is jms(xml file) to idoc. for each file have multiple records for each record i need to create multiple idocs.
    source structure:
    <lineitem>
    <student sid="cid">456</student>
    <hreference>
    <reference rtype="number">123</reference>
    </hreference>
    <hreference>
    <reference rtype="number">789</reference>
    </hreference>
    <hreference>
    <reference rtype="char">147</reference>
    </hreference>
    now condition is One input message must create only one output message for each unique  rtype="number" and sid="cid" combination.
    for example
    1. rtype="number" and sid="cid" the value combination means 123456 for this one idoc
    2.  rtype="number" and sid="cid" the value combination means 789456 for this one idoc
    --> the below file shows with out sid="cid"
    <lineitem>
    <student sid="abc">456</student>
    <hreference>
    <reference rtype="number">123</reference>
    </hreference>
    <hreference>
    <reference rtype="number">789</reference>
    </hreference>
    <hreference>
    <reference rtype="number">147</reference>
    </hreference>
    in this case we have to consider only rtype="number" so here we need to create  3 idocs.
    Could anyone help me in this regard.
    Thanks in advance

    Hi Swathip,
    Change the occurence of the IDoc to "unbounded", so that multiple IDocs can get create
    Try with below logic
    If (SID = "CID")
    Then
         If(rtype = "number")
              concat(student,reference ) ---> removeContext ---> Idoc          
    Else
         rtype ---> removeContext ---> Idoc
    If combination of unique  student and reference can occur more than once in the XML, use sort command and splitByValue (Value Change)
    Edited by: chandra shekhar on Jul 3, 2011 12:53 PM

  • Creating multiple links from one map image in Flash CS4

    I have been tasked with creating multiple links from one map image using flash. Each link would go to the main website page with that location. I assume I could create a button for each location on the map but not having a lot of experience any help / tutorial you know of would be super helpful.. Thanks! Not looking for someone to work me thru it but a little guidance would be great!

    If I was to answer the problem, I would be giving you what you asked not to be given... the solution.  So I'll suggest that you start by researching the getURL() function.  That is what AS2 uses for opening web pages.
    As for coding a button, I'll recommend the following article for you... it will explain the proper approach to coding a button, which will give you an advantage over others who don't follow it, but instead use the way the article says not to.
    http://www.adobe.com/devnet/flash/articles/as_bestpractices_04.html
    Google is one of the best resources available for learning how to do things with Flash--it's the first place I go when I have a wondering.  In general, if you type in the right keywords, you get fairly good search results.  In your case, combinations of "AS2", "button", "getURL", "tutorial" would probably work well.

  • Creating Multiple POs from the shopping cart

    Hi
    I have a requirement to create multiple POs from shopping cart. we are in SRM 7.0 I have implemented the BADI BBP_SC_TRANSFER_BE GROUP_PO method. modified group_1 field with 1 and Doc_type with custom document type
    and udpate the change parameter CT_PROC_ITEM with the above changed data for each line item.
    But purchase order always taking original document type and its number range only. 
    Please help me in this regard,
    Regards,
    Rama.

    Hi,
    Thanks for your reply. I have implemented the BADI BBP_BS_GROUP_BE method GROUP_PO_BACKEND. I modified BE_DOC_TYPE with the custom document type and REFNUMBER as the group number .
    But  it is generating number range for the original document type only.  when i debug the code i found that it is taking original document type (which is hardcoded contant value mentioned in the code when number range is initial).
    Please suggest me  after grouping the line items with document types and REFNUMBER how to assign number ranges for each group of line items.
    Regards,
    Rama.

  • Create multiple PDFs from multiple files

    Hi everyone
    I'm trying to use the "Create multiple PDFs from multiple files" function in Acrobat 9 Pro (version 9.4.6) to create about 100 PDFs from InDesign CS5 files. Theoretically this would do the trick for my purpose. BUT: When running the function, it does not use the CS5 InDesign (version 7.0.3), but tries to open the files with InDesign CS3. Of course this does not work. We, as a professional working agency, have installed CS3, CS4 and CS5. Even with making the InDesign CS3 .app invisible an pushing it into the garbage bin during the process did not work. Acrobat still wants to access InDesign CS3. It is not possible to downgrade the files to CS3 files, for there are special (i.e. interactive) functions which only work in CS5. It would be more work than creating the PDFs manually, anyways.
    Does anyone have similar issues? Any ideas how to solve the problem?
    Thanks in advance.
    Thinka

    OK, cool, I found one, which seems to work just fine.
    http://www.kahrel.plus.com/indesign/batch_convert_cs3.html
    found here:
    http://forums.adobe.com/message/3712434#3712434
    Thanks for the hint!

  • Creating multiple records from 1 record in the source file for Import DM

    Hi Experts,
    Today I am working on an interface/import where I want to get the following result:
    Source file contains a records like:
    Account, Entity, DriverX
    Sales,EntityA,ZZ
    The BPC appset contains the 2 dimensions Account and Entity next to CostCenter dimension. The DriverX field in the source file is just additional information in the source file. However based on this DriverX we need to determine what CostCenter to choose but we also need to have the same record assigned to a second record in BPC.
    Following my example, based on DriverX value I need to create 2 records:
    Account, Entity, CostCenter,
    Sales,EntityA,CC1
    Sales,EntityA,CC2
    I don't have a problem assigning the record to 1 CostCenter based on DriverX value but I have a problem creating my second record. Does any of you have had the same "challenge" and if so would you like to share the solution for this?
    Best regards,
    Johan
    PS: I am working on SAP BPC, version 7.0 Microsoft version.

    Hi Greg,
    Many thanks for your answer. And yes this would be a solution. However I just simplified my case as the decision to create an second record and where to post is depending on more than 1 field in the source.
    But I will keep it in mind, because I also can opt for a solution to store data differently in BPC fac-tabels which will help me to use script logic.
    If it is not possible to create multiple records from a single records in the standard functionality in the Transformation and/or Conversion file, I have to create a custom DTSX or change my way of storing data.
    Anyone else who is having an alternative idea like Greg came up with?
    Please let it know!
    Best regards,
    Johan

  • How to improve the speed of creating multiple strings from a char[]?

    Hi,
    I have a char[] and I want to create multiple Strings from the contents of this char[] at various offsets and of various lengths, without having to reallocate memory (my char[] is several tens of megabytes large). And the following function (from java/lang/String.java) would be perfect apart from the fact that it was designed so that only package-private classes may benefit from the speed improvements it offers:
        // Package private constructor which shares value array for speed.
        String(int offset, int count, char value[]) {
         this.value = value;
         this.offset = offset;
         this.count = count;
        }My first thought was to override the String class. But java.lang.String is final, so no good there. Plus it was a really bad idea to start with.
    My second thought was to make a java.lang.FastString which would then be package private, and could access the string's constructor, create a new string and then return it (thought I was real clever here) but no, apparently you cannot create a class within the package java.lang. Some sort of security issue.
    I am just wondering first if there is an easy way of forcing the compiler to obey me, or forcing it to allow me to access a package private constructer from outside the package. Either that, or some sort of security overrider, somehow.

    My laptop can create and garbage collect 10,000,000 Strings per second from char[] "hello world". That creates about 200 MB of strings per second (char = 2B). Test program below.
    A char[] "tens of megabytes large" shouldn't take too large a fraction of a second to convert to a bunch of Strings. Except, say, if the computer is memory-starved and swapping to disk. What kind of times do you get? Is it at all possible that there is something else slowing things down?
    using (literally) millions of charAt()'s would be
    suicide (code-wise) for me and my program."java -server" gives me 600,000,000 charAt()'s per second (actually more, but I put in some addition to prevent Hotspot from optimizing everything away). Test program below. A million calls would be 1.7 milliseconds. Using char[n] instead of charAt(n) is faster by a factor of less than 2. Are you sure millions of charAt()'s is a huge problem?
    public class t1
        public static void main(String args[])
         char hello[] = "hello world".toCharArray();
         for (int n = 0; n < 10; n++) {
             long start = System.currentTimeMillis();
             for (int m = 0; m < 1000 * 1000; m++) {
              String s1 = new String(hello);
              String s2 = new String(hello);
              String s3 = new String(hello);
              String s4 = new String(hello);
              String s5 = new String(hello);
             long end = System.currentTimeMillis();
             System.out.println("time " + (end - start) + " ms");
    public class t2
        static int global;
        public static void main(String args[])
         String hello = "hello world";
         for (int n = 0; n < 10; n++) {
             long start = System.currentTimeMillis();
             for (int m = 0; m < 10 * 1000 * 1000; m++) {
              global +=
                  hello.charAt(0) + hello.charAt(1) + hello.charAt(2) +
                  hello.charAt(3) + hello.charAt(4) + hello.charAt(5) +
                  hello.charAt(6) + hello.charAt(7) + hello.charAt(8) +
                  hello.charAt(9);
              global +=
                  hello.charAt(0) + hello.charAt(1) + hello.charAt(2) +
                  hello.charAt(3) + hello.charAt(4) + hello.charAt(5) +
                  hello.charAt(6) + hello.charAt(7) + hello.charAt(8) +
                  hello.charAt(9);
             long end = System.currentTimeMillis();
             System.out.println("time " + (end - start) + " ms");
    }

  • Creating Multiple Ringtones from 1 song

    Does anybody know whether or not we'll be able to make multiple ringtones from one song with out having to pay 99 cents for each one? i.e. you buy one song, +another one bites the dust+, and then you want to make 4 different ringtone from the same song, do we have to pay for each one, even though they're from the same song technically?

    Hi Greg,
    Many thanks for your answer. And yes this would be a solution. However I just simplified my case as the decision to create an second record and where to post is depending on more than 1 field in the source.
    But I will keep it in mind, because I also can opt for a solution to store data differently in BPC fac-tabels which will help me to use script logic.
    If it is not possible to create multiple records from a single records in the standard functionality in the Transformation and/or Conversion file, I have to create a custom DTSX or change my way of storing data.
    Anyone else who is having an alternative idea like Greg came up with?
    Please let it know!
    Best regards,
    Johan

  • Creating multiple idocs in ABAP mapping

    Hi,
    my scenario is source message (JDBC) to target message (idoc).
    There can be multiple idocs (unbounded).
    I am using ABAP mapping to create the Idoc XML structure. For this i use function module IDX_IDOC_TO_XML.
    The idoc is getting created but the problem occurs in case of generating multiple idoc instances.
    I changed the idoc occurence to unbounded & used the new idoc external definition in the interface mapping.
    I also call the IDX_IDOC_TO_XML & create the output stream factory in a loop (per idoc ).
    However only 1 idoc gets generated every time.
    Can someone suggest how to create the multiple idocs.
    Regards
    Prasenjit

    Hi Prasenjit,
    In order to generate multiple idoc first of all you need to change the target structure with multiple occurence...that you have already done...
    Now while generating XML in abap mapping you have to make sure you have element idoc(with its content) repeating for your "N" number of idocs...
    can you please copy paste your final xml generated...
    Nilesh

  • Multiple document numbers not created while creating multiple idocs.

    Hi Experts,
    we have developed one the interface file to idoc, whenever invoice number change it will create a multiple idocs.
    but i am facing some issue with context handling, can you suggest the suitable mapping / UDF for the below issue.
    Our customized idoc structure has header and line items and both are in not same level-its parent child structure.
    in our sample file there are three different invoice number and as per the requirement its creating three idocs and corresponding headers but not line item details.
    all line item details creating in 1st idoc itself and 2nd and 3rd idoc has only header items no line items. but tried fix with graphical mapping context handling for this problem but not resolved. please advise.
    Regards,
    Krushi.

    hi Hareesh,
    thank you for your quick response.
    after the File Adapter FCC, below is the inbound payload, first four feilds we mapped to header and rest for line items.
    <SettlementDetails>
    <row>
      <PaymentType>CHECK</PaymentType>
      <Filler></Filler>
      <Currency>IN</Currency>
      <Filler1></Filler1>
      <Invoice>100410-133MT5-MH</Invoice>
      <Filler2></Filler2>
      <SettlementMethod>4</SettlementMethod>
      <Filler3></Filler3>
      <PreferredTradingPartnerIdentifier>MT</PreferredTradingPartnerIdentifier>
      <Filler4></Filler4>
      <FinalPayAmount>12.00</FinalPayAmount>
      <Filler5></Filler5>
      <ProductIDUnformatted>55111064001</ProductIDUnformatted>
      <Filler6></Filler6>
      <Filler7></Filler7>
      <Filler8></Filler8>
      <PaytoPreferredTradingPartnerIdentifier>MT</PaytoPreferredTradingPartnerIdentifier>
      <ClaimType>ORIG</ClaimType>
      <CMSRecordID>FFSU</CMSRecordID>
    </row>
    </SettlementDetails>
    multiple settlement details will be there.
    regards,
    krushi.

  • Create multiple IDocs

    Hi experts,
    I have a scenario where XI has to read the following flat file.
    FI010 delivery start ( 1..1)
         FI020 Section start (1..n)
              FI030 paymentrecord ( 1..n )
                   FI040 Name adresse record                     FI041 Meddelelsesrecord
         FI080 Sektion end
         FI020 Sektion start
         FI080 Sektion end
    FI090 delivery start
    For each FI020 section XI has to create an Idoc.
    In the message mapping i can create only one idoc.
    How can i split this source message into multiple messages ( dependant on FI020 section records ) so that message mapping is done for each message and mulitple IDocs are created???
      Can i split the source message using file adapter?
      can i use BPM transformation to do this??
    Looking forward to share your ideas.......
    thanks in advance
    Suneel
    Message was edited by: Suneel

    Hi,
    I was reading thru the thread..
    I request a help.
    I have a scenario where i have a outbound idoc (Zartmas04)
    Against a material it can have multiple plant information.
    It is required I update 6 tables of anotehr application if the incoming messages have all the mandatory fields..Else i have to consolidate all the error (Material Plant Comination) and send a Mail
    Let me know how can i achieve this
    Thanks
    John

  • How to create multiple extract from one map

    Hello ,
    I have a map which extract data from source and create a output text file. Now, I need to create 10 different files from the same mapping with same format but different name. So I want to generate file1.txt, file2.txt, file3.txt etc . My map currently has one target file , i donot want to create 10 target files operator in the map itself, is there a way to achive this functionality ie I want to call the same map 10 times. Do I have to do it from outside.
    Thank you.
    Suhail

    Hi Suhail
    Why not create 10 maps? These don't take up much space, only a few Kb, and you would be able to generate a unique file per map, which would be the correct approach.
    If you don't want to have duplicate maps, would the data in the output files be the same or would it need to change based on some condition?
    If the data is the same you can do this externally by just making x copies of the original file.
    If the data needs to change you either need to have multiple maps, as mentioned at the beginning, or you would somehow need to change the source data. You cannot change the name of a mapped output file, this is because OWB maps use a hard-coded file name making it impossible to change the name of the file dynamically.
    However, let's say you are able to change the source data, perhaps using a view. If you had x copies of the view script you could generate it x times, calling the map x times. Each time you would run the map it would generate file1.txt, and you would need to rename it to file2.txt before recompiling the view and rerunning the map to get another file1.txt. This would be renamed file3.txt and you could then repeat the process as many times as you like.
    Does this help?
    Regards
    Michael

  • Create multiple idocs at once

    Dear Experts,
    I need to create few Idocs - for MBGMCR -  in WE19.
    Can you please suggest is there any shortcut to to similate multiple idocs at a time.
    I saw the option of using file as a template in WE19. But donot know how to use it.
    Can some one pls help me?
    Regards,
    Shashidhar

    For the file option, you need to define a file port in WE21 then format a file in your IDOC format and drop it in that location.  You then specify the file location in WE19.  When I need to run a bunch of IDOCs, I use LSMW with WE19.  LSMW can do just about anything.  It depends on your requirements I guess.

Maybe you are looking for

  • Getting error while accessing a webpage by using link local address of ipv6

    Hello, I want to access my login.jsp by using ipv6 address. when i am accessing my web page by using loop back or localhost6(like the following) it is working. http://[::1]:8080/test/login.jsp //for loopback http://localhost6:8080/test/login.jsp But

  • Cfmail file attachements

    I want to dynamically attach a document and send via cfmail.I use various queries to get the recipent names, and unique id info, then retrieve the document that corresponds. One cfmail documentation says to use cfparam inside cfmail and specifiy the

  • Parental Controls - Internet Access Stopped!

    My wife has a white MacBook running Leopard 10.5.8.  It has worked fine for two years.  Nothing was changed.  She could not change anythign due to being logged into a managed account. It could always access the internet over our home (or any availabl

  • No windows store in windows 8.1

    After i installed windows 8.1 on my laptop . There is no windows store nor the icon or anything .. what happened .. my laptop model is dell m5050

  • How to reset the auto-complete email adresses?

    How can I delete old email addresses from auto complete? I have been having trouble trying to find out how to delete the old typed email history. For an example, if I go to send a picture to Bob, I start typing Bob and it comes up with 3 old emails o