Multiple Idocs creation based on source conditions

Dear All,
I have to create multiple idocs from the source idoc based on the line litems ie if my source Idocs has 5 line items so 5 different idocs to be generated at target.
I am able to process upto this stage.
Now my requirement is that target Idocs is to be generated based on different plants available in the source idoc line items. I need to trigger a single idoc for the line items having same plant.
S.No   Line Item No  Plant
1         00010            8200
2.        00020            7800
3.        00030            7800
4.        00040            8200
5.        00050            2100
So, for the above case total 3 Idocs needs to be generated at the target.
Kindly suggest me how the mapping is to be done which can filter out the plants at line items and creates the no of target idocs.
Regards,
NJ

just a samll pointer...
you can use
plant>sort>splitbyvalue(valuechange)->collapse context ..
this will create the plant Queue as
2100
7800
8200
now u can generate number of idocs based on this
Edited by: Tarang Shah on Mar 30, 2009 3:02 PM

Similar Messages

  • Split Single IDOC into Multiple IDOC's Based on Segment Type

    Hi Experts,
    I have a scenario IDOC to FILE ,  Split Single IDOC into Multiple IDOC's based on Segment Type
    Outbound:
    ZIdocName
    Control Record
    Data Record
    Segment 1
    Segment 2
    Segment 3
    Status Record
    I should get output like below
    Inbound:
    ZIdocName
    Control Record
    Data Record
    Segment 1
    Status Record
    ZIdocName
    Control Record
    Data Record
    Segment 2
    Status Record
    ZIdocName
    Control Record
    Data Record
    Segment 3
    Status Record
    Please suggest me step by step process to achieve this task.
    Thanks.

    Thanks a lot Harish for reply.
    I have small doubt. According to your reply , If we have N number of segments in single IDOC with same fields in all segments then for splitting Single IDOC into Multiple IDOC's based on Segment Type we need to duplicate N number of target IDOC tree structure.
    Is that possible to Split single IDOC into Multiple IDOC's based on Segment Type using only one Target IDOC structure without duplicating the Target IDOC structure tree.

  • Multiple purchase orders in a file - Multiple IDOC'S based on lineitem

    Hello All,
    I have a typical requirement where as there needs to be "separate IDOCs for different material with distribution channel X and Y".
    The input is a file with multiple purchase oders inorder to generate multiple IDOCs..
    As a prerequisite I made changes in occurrence of target structure IDOC from 1..1  to 1..unbounded.
    I came to know from some sources that it can be achieved  through Java mapping but i am not aware of JAVA.
    Can anybody has the detailed Java mapping code?
    It would be great if anybody help me out from this issue .
    Thanks in advance.
    Best regards
    Hari

    Hi Raj,
    Thanks for your reply.
    May be we can achieve it using graphical mapping but its a edifact file   with multiple purchase orders.
    Internally we have some conditions like for every repetirion of the segment UNH new idoc number needs to generate
    i.e. UNH -
    >IDOC
    along with line item requirement.
    In this case need to handle logic at the top level as well as line item level or can club both.
    If possible can you please let me know what have you done in your case so that i can compare mine.
    Thanks once again.
    Hari

  • How to restrict the idoc creation based on the distribution model

    Hi all,
    I want to create the idocs for certain material types only, for this i configured Distribution  model and set the filter for material types.
    If the delivery is created with the material type which is not in the filter means,
    Idoc is creating for that Delivery with header segments only and restricting Item level segments.
    it is coming to XI and failing in mapping every time.
    I do not want to generate the whole idoc itself. Am i missing any thing??
    Regards
    Edited by: Suman gupta on Jun 10, 2010 11:13 PM

    Hi Mike,
    >>config in PI in the routing condition - if no lines exits don't send the message to the mapping/receiver
    If no lines exists we can restrict don't send to receiver, but how can we restrict dont send to mapping??
    It comes to mapping and failing in PI MONI.
    Is there any way that i can restrict the Idoc generation itself in ECC ??
    Regards

  • Triggering Idoc creation based on following Sales Order changes

    Hi,
    I am trying to find the best way to trigger an outbound Idoc to a customer for the following cases:
      1. Delivery date change
      2. Partial Shipment
      3. Complete Shipment
      4. Backorder
      5. Cancellation from Vendor
    Any help is appreciated. SAP does not provide a clean way to do this. Thanks in advance.

    Hi,
        Use change pointers concept as follows
    Activating Change Pointers
    Change pointer generation has to be activated at both the
    general level and message type.
    1) Goto BD61, check the checkbox Change pointers activated - generally.
    2) Save
    3) Goto BD50, Choose the row for message type MATMAS, and check mark the corresponding field
    4) Save
    Converting change pointers to IDOCs
    • Create, change or mark for deletion materials using
    transaction MM01, MM02, or MM06.
    • Execute transaction BD21
    • Enter Message type MATMAS
    • Execute
    Regards
    Amole

  • Multiple Schema Creation with One Source system Via SLT

    Hi all,
    we have BW on HANA environment at our company premises, with SLT server installed
    So, my Question is that is it possible to create more than one schema in HANA system with one Source system
    As an example, lets say, ECC (Client 601) Source System has been connected to HANA via SLT and created Schema called SCHEMA_1 and again i want to create SCHEMA_2 by connecting same ECC (Client 601) source System.
    please help me to short this out?
    Thanks
    Mirana

    Hi Mirana,
    Yes, it is possible to create more than one schema in HANA system with one Source system.
    Please go through the Official SAP LT document for more details @ page number 13
    http://www.saphana.com/servlet/JiveServlet/previewBody/1811-102-5-5419/SAP_LT_Replication_Server_for_SAP_HANA_SPS05_Over…

  • File to multiple idoc, Raising alerts , not using ccBPM

    Hi experts,
    I have file to multiple idoc scenario.sturcture of the incoming file like given below..
    Header
    line item
    line item
    header
    line item
    line item
    there is a field Company COde in Header.If that company code is not Equal to "L" then dont map that header and line items with target
    now we have to raise an alert notification mail saying that "company code is wrong." we have to send a single mail for this scenario if this condition is true even many times.
    i am not using ccBPM in the scenario.
    how can we achieve this functionality??
    Thanks in advance.
    Thanks,
    Rohit

    Refer this blog to bundle multiple idocs.
    /people/michal.krawczyk2/blog/2005/12/04/xi-idoc-bundling--the-trick-with-the-occurance-change
    After you create the custom idoc interface using the above blog,
    map the root node of the idoc interface based on your condition.
    put a if condition to pass a constant to the root node for the idoc.
    as an else condition, raise an exception using a udf.
    Create a generic alert for runtime errors in mapping, which send mails whenever there is a failure in the mapping.
    http://help.sap.com/saphelp_erp2004/helpdata/en/80/942f3ffed33d67e10000000a114084/content.htm
    Regards,
    Ravi

  • Generate multiple Idoc segments

    Hi all,
    I have a Flat file to Idoc Scenario.
    I need to generate no. of multiple Idoc Segments based on the source field value.
    For Eg: if Field1 starts with 5 or 6 then E1 segment should be created 5 times,
    similarly if Field1 starts with 4 then E1 segment is created 6 times
    And as many times E1 is created that many times the corresponding other E2,E3 segments are created
    i.e E2 E3 has 1-1 relationship with E1
    Can this be done graphically ?
    Working on PI 7.0 Environment
    I would appreciate your Inputs.
    Regards,
    Varun
    Edited by: Varun Reddy on Oct 5, 2010 8:21 AM

    Im pretty sure that if you duplicate the target segment the max number of times (6) but you only map to 4 of them, only 4 will be created in the target structure. Let the Mapping/Data drive how many segments actually get created in your target structure.
    I could be wrong but Im pretty sure thats how Ive handled repeating segments before.

  • 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

  • Single iDOc to multiple files based on a condition

    Hi Friends
    need your help in one scenario which is something like this:
    there is one iDOC as the sender and this iDOC has to be mapped to files based on a condition means let us say if there is a particular field "R" in iDOC(WPDBBYY01) than it should go and create the file "ABC"
    and if the particlar field is P or G or M than it should create another 2 files named "XYZ" and "WUV" .
    Please guide me how can i put this condition ?
    Any help would be rewarded with points
    Thanks

    Have a single receiver and 2 inbound interfaces.
    So you will have 2 different mappings. In the first mappng source is IDOC and the target is file ABC.
    In the second mappping the source is IDOC and the target is 2 files XYZ and WUV.
    In Interface determination, add both the inbound interfaces and put the condition for each interface.
    Regards,
    Jaishankar

  • Multiple IDOCs based on multiple fields in File to IDOC mapping

    Hello Experts,
         I have a requirement to create multiple IDOCs based on multiple fields.
         Earlier my requirement is to create IDOCs based on ShipID (i.e., for every ShipID new IDOC...I achieved this).
         But now the requirement was to create IDOC based on two more fields like
    Source:
         ShipID1
         FieldA with value1 
         FieldB with value1
    Target :
         1 IDOC to create
    and If
    Source:
         ShipID1
         FiledA with Value2
         FiledB with Value2
         ShipID1
         FiledA with Value1
         FiledB with Value2
    Target:
         2 IDOCs based on FiledA
    Like wise IDOC should create for every change in FiledA and FieldB.
    If FiledA and FiledB has no changes then create IDOC based on ShipID
    please help me in achieving this as this is an urgent requirement.

    Hi Prasad -
    Just concat all the three fields - shipID1, FieldA and FieldB and
    remove contexts
    split by value (value changed)
    collapse contexts
    This way whenever there is a change in any of the above fields you'll have separate IDOC..

  • Condition based on source file name - PI 7.1

    Hi Friends
    I have an file2file interface without any mapping requirement , source is sending  .csv files and I need to post those source files to two target systems in which each target system have two directories where I need to post based on few conditions and here are my queries.
    1. As mapping is not required I guess File Content Conversion is also not required as I simply pick and drop the .csv files into target - please confirm.
    2. One of the condition is :  source file name will be XXXX-AABB-C-XXXX-XXX-XXX.csv , here SAP PI has to read the company code (AABB) to determine the target system. Z001 and Z007 should be sent to TARGET1 & All other files will be sent to Target2.
    3. 2nd Condition : SAP PI has to read the type of file indicator (C). The files will be sent to the following target application directories:
    Simulation files (indicator = S): /interfaces/XXX/simulation
    Production files (indicator = P): /interfaces/XXX/inbound/
    Please kindly provide your ideas/solutions .
    Regards
    Suman.

    Hi Suman,
    If the Target is two different locations, then i guess you need to have two receiver Channels. Please check the below thread for details:
    Re: Genrate file in 2 different locations
    Incase of different directories in same server, you can check out this link:
    Dyanamic Configuration at receiver file adapter determine target directory
    kanan

  • 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.

  • Crating multiple sales orders based on one inbound purchase order idoc

    Hi All,
    I have a requirement to create multiple sales orders based on single inbound PO idoc.Please let me know whether is it possible or not?
    Regards
    mahesh

    Hi Mahesh,
    What is your crieteria for different SO's ?
    Regards
    Megha

  • Writing in to multiple sheets in Excel file based on input condition

    Hi All Experts,
    i need to write in to multiple sheets in one Excel file output.
    is it possible with UTL_FILE ? or Any options there in Oracle to do this ?
    Can anyone please suggest me on this.
    Thanks,
    Ravi

    I have seen all of them they are all just simple SQL pulls from database in to Excel file..No, definitely not
    My requirement is i need to write in to one single Excel file with MULTIPLE sheets based on input condition-> [xml_spreadsheet|http://matzberger.de/oracle/spreadsheet-en.html]
    so for each parameter need to write into separate sheet in one Excel File..-> [xml_spreadsheet|http://matzberger.de/oracle/spreadsheet-en.html]
    I hope you understand my problem atleast now...I think I understood your problem at first sight.
    If you simply want to throw 2 queries at the package and get back an Excel file with 2 worksheets you just have to look at the first page of the [tutorial |http://matzberger.de/oracle/spreadsheet-tut-en.html]. Half way down the page there's an example.
    If you want a special formatting then you can do this too, it's described step by step.
    Regards
    Marcus

Maybe you are looking for

  • Document Manager Task Flow Customization

    Hi All,, I got following exception while customizing Document Manager Task Flow using jdeveloper customization role. i have added a input box in upload.jsff page Any one has some clue about this exception..........? <LifecycleImpl> <_handleException>

  • Forzen gray screen at boot

    I'm using an iMac that was new in Dec '12. 27-inch I think it's still the current model. Lately I've been getting long if not terminal hang-ups at boot on the plain gray screen. The only system maintenance I have with this Mac is to confirm and corre

  • HOW TO VIEW PAGE OF ONLIE BOOK IN PDF FILE

    i HAVE A PDF FILE THAT i AM TRYING TO OPEN AND READ IT IS A ONLINE MANUAL THAT ONLY SHOWS 8 PAGES OF A BOOK THAT IS ABOUT 400 PAGES CAN i VIEW THE RESET OF THESE PAGE BY CONVERTING THE FILE OR NOT?

  • Problem with log4j.properties and level DEBUG

    Hi, I need some log4j help. I create 2 different appenders in the log4j.properties file and it works. This is my complete log4j.properties: log4j.logger.log1=DEBUG, log1 log4j.logger.log2=DEBUG, log2 log4j.appender.log1=org.apache.log4j.DailyRollingF

  • ITunes not finding/syncing contacs

    Hi, i found my old iPod 1 and I'm trying to sync the contacs from my laptop with Windows 8 to the iPod but iTunes (latest version) can't find the contacts with Windows Contacts nor with Outlook. Please help! Thanks.