cancel
Showing results for 
Search instead for 
Did you mean: 

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

Former Member
0 Kudos

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.

Accepted Solutions (1)

Accepted Solutions (1)

Harish
Active Contributor
0 Kudos

Hi Ram,

you can use the multi mapping for your requirement. in message mapping signature tab change the occurrence from 1-1 to 1-unbounded, then duplicate the target structure two times.

Map the first idoc with segment 1 and remaining segments (Control record, data record and status record). Disable the segment 2 and segment 3.

Similarly in second and third duplicate structure map the segment 2 and segment 3.

regards,

Harish

Former Member
0 Kudos

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.


former_member184720
Active Contributor
0 Kudos

Hi Ram - No need to define the N message types on the target structure. Just change the occurrence and map the segment type- remove context-> split by value(value change) - your target.

Refer to the below blog -

One IDOC to Multiple Files sending to Multiple folders of the FTP using single Communication Channel...

Answers (0)