on 04-01-2014 6:59 PM
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
95 | |
11 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.