Create Individual Idocs Based on Parent and Child Segment type

Hi Experts,
I have a scenario IDOC to FILE ,  Split Single IDOC into Multiple IDOC's based on parent and child Segment Type
For example If 3 child segments are same and 1 segment is different under parent segment then 3 same child segments are clubbed and create single idoc under parent segments and 1 different child should create in individual idoc under parent segment.
Note : Same logic should work for N number of Parent Segments and Child Segments.
Outbound:
ZIdocName
Control Record
Data Record
Parent Segment A
   Child Segment 1
   Child Segment 1
   Child Segment 1
   Child Segment 2
Parent segment  B
   Child Segment 3
Status Record
I should get output like below
Inbound:
ZIdocName
Control Record
Data Record
Parent segment A
  Child Segment 1
  Child Segment 1
  Child Segment 1
Status Record
ZIdocName
Control Record
Data Record
Parent segment A
  Child Segment 2
Status Record
ZIdocName
Control Record
Data Record
Parent Segment B
  Child Segment 3
Status Record
Please suggest me step by step process to achieve this task.
Thanks.
Ram

Hello,
Segment won't hold any value, so filter criteria should be there on some field wich exist in Parent node and chile node?
Paste ur XML?
Try this(Assuming u have some fields in parent/child segment on which u want to define filter criteria):
Parent Field--UseOneAsMany----RC----
                                  ------------------Concat ----splitbyvalue(value change)--collapse context --- ZIdoc
Child field-- RC----------
Child field--RC--splitbyvalue(valuechange)--CC -Splitbyvalue(each value) -- ParentSegment
Child field--RC--splitbyvalue(valuechange)--- ChildSegment
RC -> Remove Context
CC - Collapse Context
Note - i haven't tested ur mapping, so make sure to adjust context in mapping
Thanks
Amit Srivastava
Message was edited by: Amit Srivastava

Similar Messages

  • Need query linking parent and child discrete jobs created through ascp planning

    Could you help me create a query that will show both the parent and child discrete jobs created through ascp run? I do not need entire query. I need to know the names of tables and understand the links or joins between tables. Then, I shall be able to write the sql on my own.
    Thanks

    Just use a format like this:
    http://<Server Name>:<port Number>/OpenDocument/opendoc/openDocument.jsp?sDocName=reportB&sType=wid&sRefresh=Y
    &lsMObjectName=[test1],[test2]
    Here in lsM[ObjectName] parameter [ObjectName] = the object name which you want to send data to ReportB
    I can give you a idea of creating hyperlink for jumping another report (Here ReportB)
    Just use  a formula like that in any cell:
    ="<a href=http://<Server Name>:<port Number>/OpenDocument/opendoc/openDocument.jsp?sDocName=reportB&sType=wid&sRefresh=Y&lsMObjectName=[test1],[test2]&sWIndow=New> Click here to view </a>
    Now from the property select Read cell content as "Hyperlink"...
    thats it......
    For more information please see the
    "OpenDocument" artile
    Hope you can  get help from this
    Edited by: Arif Arifuzzaman on Aug 20, 2009 7:24 AM

  • Check for same parent and child combination

    hi all i am using oracle 10g. can you please help me in this issue.
    how do i know if the same combination of parent and child present in the table
    key value and value are the values given by user.
    if the user try to create a same profile with same set of key_value and value then that should be avoided
    so how to achieve that.
    example profile already in the table
    -- PROFILE_ID,DETAIL_ID,PARENT_DETAIL_ID,KEY_VALUE, VALUE, LAST_IND
    100,               1,               NULL,                      1,              CDE,     N
    100,               2,              1,                            2,              XXX,     N
    100,               3,              1,                            2,              YYY,    N
    100,               4,              1,                            4,              NEW,    Ynew profile by user -- it should throw an error saying that same profile already present
    -- PROFILE_ID,DETAIL_ID,PARENT_DETAIL_ID,KEY_VALUE,VALUE,LAST_IND
    101,               5,               NULL,                      1,              CDE,    N
    101,               6,              5,                            2,              XXX,    N
    101,               7,              5,                            2,              YYY,    N
    101,               8,              5,                            4,              NEW,    YEdited by: DeepakDevarapalli on Dec 9, 2009 9:48 AM
    Edited by: DeepakDevarapalli on Dec 9, 2009 9:59 AM

    sir i have used your logic, each query works fine and displays the correct results below are the results.
    SELECT   SUBSTR (t.ptxt, 2, LENGTH (ptxt)) profile_values
        FROM (SELECT     SYS_CONNECT_BY_PATH (rtxt, ',') AS ptxt
                    FROM (SELECT key_value || '/' || VALUE AS rtxt,
                                 ROW_NUMBER () OVER (PARTITION BY profile_id ORDER BY key_value,
                                  VALUE) AS rnum
                            FROM sp_profile_detail
                           WHERE profile_id IN (100, 101))
                   WHERE CONNECT_BY_ISLEAF = 1
              START WITH rnum = 1
              CONNECT BY rnum = PRIOR rnum + 1) t
    GROUP BY ptxtresults from query 1
    profile_values
    1/CDE,2/XXX,2/YYY,4/111
    1/CDE,2/XXX,2/YYY,4/222
    SELECT   SUBSTR (s.ptxt, 2, LENGTH (ptxt)) profile_values
        FROM (SELECT     SYS_CONNECT_BY_PATH (rtxt, ',') AS ptxt
                    FROM (SELECT key_value || '/' || VALUE AS rtxt,
                                 ROW_NUMBER () OVER (ORDER BY key_value,
                                  VALUE) AS rnum
                            FROM sp_profile_detail1)
                   WHERE CONNECT_BY_ISLEAF = 1
              START WITH rnum = 1
              CONNECT BY rnum = PRIOR rnum + 1) s
    GROUP BY ptxtresults from query 2
    profile_values
    1/CDE,2/XXX,2/YYY,4/111
    but when i tried to combine both and do a minus it throws me an error .
    ORA-00600: internal error code, arguments: [expcmo_strdef1], [27], [27], [], [], [], [], []
    -- target
    SELECT   SUBSTR (t.ptxt, 2, LENGTH (ptxt)) profile_values
        FROM (SELECT     SYS_CONNECT_BY_PATH (rtxt, ',') AS ptxt
                    FROM (SELECT key_value || '/' || VALUE AS rtxt,
                                 ROW_NUMBER () OVER (PARTITION BY profile_id ORDER BY key_value,
                                  VALUE) AS rnum
                            FROM sp_profile_detail
                           WHERE profile_id IN (100, 101))
                   WHERE CONNECT_BY_ISLEAF = 1
              START WITH rnum = 1
              CONNECT BY rnum = PRIOR rnum + 1) t
    GROUP BY ptxt
    MINUS
    -- staging
    SELECT   SUBSTR (s.ptxt, 2, LENGTH (ptxt)) profile_values
        FROM (SELECT     SYS_CONNECT_BY_PATH (rtxt, ',') AS ptxt
                    FROM (SELECT key_value || '/' || VALUE AS rtxt,
                                 ROW_NUMBER () OVER (ORDER BY key_value,
                                  VALUE) AS rnum
                            FROM sp_profile_detail1)
                   WHERE CONNECT_BY_ISLEAF = 1
              START WITH rnum = 1
              CONNECT BY rnum = PRIOR rnum + 1) s
    GROUP BY ptxt

  • How to list selected parent and child rows with values from ADF TreeTable

    I created one tree table having three levels using DepartmentsVO, EmployeesVO and
    JobHistoryVO where these tables contains parent and child relationship on database.
    Then i added one more column to the tree table which displays selectBooleanCheckBox. This
    check box is available for parent and child rows in that column.
    My first concern is i
    want to list out all the parentids and its child ids from three levels where the check
    box is selected.
    second concern is
    if i select the check box for a parent row, then the remaining check boxes for child rows also select automatically which are comes under the parent row.
    Thanks in advance.
    jk

    hi Frank,
    Thanks for the quick reply...
    As I mentioned before I am able to get the children using JUCtrlHierNodeBinding. but wanted to change the value of child row which have specific data.
    Is it possible through JUCtrlHierNodeBinding to update data of child and parent?? If so then can you please post the code snippet for the same???
    Viral

  • Delivery document how to print the BOM Parent and Child items

    Hi,
    I have a production BOM. In Delivery document how to print the Parent and Child items Item Code and Qty.At the time
    of add a delivery document Inventory stock redused only in Parent Item not child item because child item stock already reduced in issue for production.

    If you need to print both the BOM Parent and Child items, you have to create your own report. BOM is only for production if it is not Sales type.
    Thanks,
    Gordon

  • OIM API - How to get the values in the process form (both parent and child)

    Hi,
    I created an RO with a Process form (both Parent and Child).I created a unconditional process task which takes in the processinstance key and tried to retrieve the process form datas.When i tried to provison the resource,the process task is getting triggered and I could able to get the parent form data but not the child form data.
    Any idea why is this happening?.Is it mandatory to have the "Triggers" ON to get the Child Form data.?
    Thanks,

    try this
    tcResultSet childResults = formOper.getChildFormDefinition(
                             formOper.getProcessFormDefinitionKey(procInstanceKey),
                             formOper.getProcessFormVersion(procInstanceKey));
    This should work,
    Regards,
    Raghav

  • Programmatic, using bean add Parent and child nodes in af:tree dynamically

    Hi All,
    i have to add parent and child nodes dynamically in tree .
    Example :
    i have created a tree like below.On click of button i will get value A ,from pl/sql function i will A1 and A 2 values.which i have to show in pop as tree.
    A
    |-----A1
    |-----A2
    If user clicks on A2.I have to catch A2 value and pass to pl/sql function which gives A2.01 and A2.02 values.
    A
    |-----A1
    |-----A2
    |------A2.01
    |------A2.02.
    A, A1 ,A2,A2.01 ...........values comes from pl/sql funchtion .
    thanks in advance ......... any suggestion will greatly helps

    no use ......................

  • How to differentiate between Parent and Child in IBASE?

    Hi. I am working on enhancing a BAPI :BAPI_GOODSMVT_CREATE by calling the following function module IBPP_CREATE_IBASE at its exit.
    The BAPI is being called from an SAP ME system and will be passing MATNR and Serial Number of Parent and Child materials to create the IBASE in ECC system. I am confused as to how to differentiate between whether a object is Parent or a Child when the BAPI: BAPI_GOODSMVT_CREATE is called.

    if you have NULL valued fields. If
    you do a compare and one or both are NULL, then the result is always NULL,
    never true or false. Even comparing two fields which are both NULL will
    give NULL as result, not true! Or if you have something like "select
    sum(field) from ..." and one or more are NULL, then the result will be
    NULL. Use always "if field is NULL ..." for NULL checking and for safety
    maybe something like "select sum( IsNull(field,0) ) from ...". Check the
    function ISNULL() in the manual.

  • How to update parent and child tables while updating parent table

    I have a parent table EMPLOYEE which includes columns (sysid, serviceno,employeename...) sysid is Primary key, serviceno is Unique key and I have child table DEPENDENT includes columns (sysid,employee_sysid,name,dob...) here again SYSID is primary key for DEPENDENTS table, employee_sysid is Foreign key of EMPLOYEE table.
    Now I want to change SYSID (using sequence) in EMPLOYEE table which need to be update in DEPENDENTS table as well
    Note: I have 10000 records in EMPLOYEE table as well as I have 5 more child tables which need to update new SYSID.
    please help me

    first disable the FOREIGN KEY Constraints.
    you can update Parent as well as Child record also with help of trigger.
    here i am giving you one examlpe..it may help u.
    create table parent(id number primary key,name varchar2(100))
    create table child_1(id number primary key,p_id number,dob date,
    CONSTRAINT FK_id FOREIGN KEY (p_id) REFERENCES parent (ID))
    create table child_2(id number primary key,p_id2 number,addr varchar2(1000),
    CONSTRAINT FK_id2 FOREIGN KEY (p_id2) REFERENCES parent (ID))
    insert some test data to parent and child tables.
    alter table child_2 disable constraint FK_id2
    alter table child_1 disable constraint FK_id2
    CREATE OR REPLACE TRIGGER delete_child
    BEFORE UPDATE ON parent
    FOR EACH ROW
    BEGIN
    UPDATE CHILD_1
    SET P_ID=:NEW.ID
    WHERE P_ID=:OLD.ID;
    UPDATE CHILD_2
    SET P_ID2 =:NEW.ID
    WHERE P_ID2=:OLD.ID;
    END;
    then Upadte parent table primary key col and check the child tables.
    then enable the constraints...

  • %variance between parent and child hierarchy

    Experts,
          How to calculate a percentage variance between parent and child hierarchy.
    Ex: parent is 80 and child is 20 so I need a %variance between 80 and 20.
    Thanks in advance.

    Hi Nikki
    Create structure and restrict parent hierarchy with one node and child hierarchy with another node and create formula node to calculate the percentage variance between two nodes.assign points if helpfful.
    Regards
    Murali.

  • Need query to link parent and child discrete job planned through ascp

    Could you help me create a query that will show both the parent and child discrete jobs created through ascp run? I do not need entire query. I need to know the names of tables and understand the links or joins between tables. Then, I shall be able to write the sql on my own.
    Thanks

    Hi;
    Please check below thread which could be helpful for your issue:
    http://forums.oracle.com/forums/thread.jspa?messageID=9155702
    Regard
    Helios

  • Synchronizing Parent and Child Calendar on SharePoint 2013

    Dear all,
    How can I update Parent calendar automatically when I update Child calendar on SharePoint 2013? Thanks

    Sorry I didn't understand the parent and child calendar. How did you create these two?
    Bala

  • Create RSA keys based on p and q

    Is there a way to create a KeyPair based on p and q (BigIntegers or byte[])
    The reason i need this is because i need to encrypt files that need to be decrypted in a c# program (and vice versa). The encryption needs to be RSA (so no DES or....) although i know that there is not really a need for asymetric encryption.
    The problem is I can generate a keypair in Java but then i cannot get the data for that keypair in c# (and vice versa).
    In c# i can create an equivalent of a keyPair based on p and q or on so if there would be a way to get the p and the q of a generated keypair that would also help (or all the other paramets, d, n, e, phi,....).
    Thanks

    You can generate a PKCS8 private key bytes and X509 public key byte using something like
                final KeyPairGenerator rsaKeyPairGenerator = KeyPairGenerator.getInstance("RSA");
                rsaKeyPairGenerator.initialize(2048); // or whatever size you want
                final KeyPair rseKeyPair = rsaKeyPairGenerator.generateKeyPair();
                // The private key as PKCS8 bytes
                final byte[] privateKeyAsBytes = rseKeyPair.getPrivate().getEncoded();
                // The public key as X509 bytes
                final byte[] publicKeyAsBytes = rseKeyPair.getPublic().getEncoded();then you can import the X509 into C# (C# must have a way of importing an X509).
    OR
    do a similar thing in C# and export the X509 public key and import it into Java.
    The private key should only be used by either the C# or Java application (not both) and I would expect whichever needs the private key should generate the key pair.

  • How to get the parent and child relation of the group (______________)

    Please teach the method of acquiring the parent and child relation of the group with EDK5.2.
    EDK5.2____________________,_________o

    Hello.
    Java________,_______________...
    Class________o
    com.plumtree.remote.auth.ChildGroupList
    ...o(^^;)
    Best Regards,
    --------- Hiroko Iida_______ (05/10/28 18:27) -------
    Please teach the method of acquiring the parent and child relation of the group with EDK5.2.
    EDK5.2____________________,_________o

  • How to link parent and child relation in Metapedia

    How to link parent and child relation in Metapedia

    Vamsi,
    Did you every determine how to do what you were asking about? Where you thinking of how to link a parent term to a child term (i.e. like a related term) or was this about linking a term to a different metadata object (e.g. table or report) ?

Maybe you are looking for

  • AP Credit Memo - R12

    Having an issue when paying invoices in batches. Credit memos are not being applied to invoices. I have the credit memos matched to the appropriate invoices. Any ideas why I am seeing this behavior? Thank you

  • HT1848 How do I add the purchases of songs on my Ipad Airt to my laptop?

    I am trying to upload the songs purchased on my Ipad Air to my laptop, but it is not giving me the option.

  • SRM-SUS: "Create Invoice" button not available in "Confirmation"

    A confirmation is created from SUS(702) and posted to ECC (607). Service Entry sheet is released in ECC. Supplier unable to see the "Create Invoice" button in the confirmation. Please advise what could be missing here? Is there any status update to C

  • OnPremisesSmtpClientSubmissionMonitor unhealthy

    Hi I ran "get-healthreport" and got an unhealthy "Frontend Transport". I found out the problem is the monitor "OnPremisesSmtpClientSubmissionMonitor". I found this event: The client submission probe failed 3 times over 15 minutes. Server 127.0.0.1 on

  • How can I make a link in a AccordionTab?

    Hi, This is my website: www.student.tue.nl/V/b.a.t.moor As you can see the basis for my website is a Spry Accordion. The words with a large font-size are the first navigationlevel. The smaller words in the Tabs are the secondaire navigationlevel. Now