Experts,
I need your advise on the below issue.
Source Structure Target Structure
E1EDT20
E1ADRM1
E1EDL20 Record 0.. unbounded
--- E1EDL24 Field1 0...1
--- E1EDL24 Field2
--- E1EDL24 Field3
--- E1EDL37 Fieldn
---E1EDL49
--- E1EDL37
---E1EDL49
--- E1EDL37
---E1EDL49
Issue: I need to create a new record for each occurence of segment E1EDL49, iam getting proper output for multiple equal occurences of E1EDL20,E1EDL24,E1EDL49, however in cases like one occurence of E1EDL20 and multiple E1EDL24,E1EDL49 iam facing issues with contexts
Since i have mapped target header to E1EDL49 segment, iam seeing 3 records, however other fields that reference E1EDT20,E1ADRM1 segments in this case are not having the right context. target header node context has 3 entry for instance: but some source element context has only one entry.
What is want to do is if context has entry then map it to target, if there is no value then atleast copyvalue from the first occurence.
Copyvalue function doesn't work in this case bcause when there are values in segments its not populating them. i hope you guys are able to understand this requirement.
Waiting for your reply,
Thanks,
Pavan