cancel
Showing results for 
Search instead for 
Did you mean: 

Mapping: Each IDoc Segment to single new IDoc

Former Member
0 Kudos

Hi, can someone provide me with infos on how to solve this problem?!

Do i have to use BPM and when, is there any tutorial on this?!

We have two different Segments in IDoc and for each occurance they should be collected in two different IDocs, so that each contains one type of segment.

Can u please help?!

br

Accepted Solutions (0)

Answers (3)

Answers (3)

former_member194786
Active Contributor
0 Kudos

Hi Fritz,

You will have to use multimapping along with Enhanced Receiver Determination for this.

Regards,

Sanjeev.

Former Member
0 Kudos

go thru these links will help you to understand the concepts-

/people/sravya.talanki2/blog/2005/08/24/do-you-like-to-understand-147correlation148-in-xi

http://help.sap.com/saphelp_nw2004s/helpdata/en/a5/64373f7853494fe10000000a114084/frameset.htm

BPM CollectPattern..

http://help.sap.com/saphelp_nw2004s/helpdata/en/08/16163ff8519a06e10000000a114084/frameset.htm

regards

kummari

former_member537867
Active Contributor
0 Kudos

Hi Fritz,

You can use collect pattern when there is requirement of collecting multiple messages .For example i have an applicaion where i can send purchase order from different vendors.Now i wish that at the end of day i get one consolidated purchase order for each vendor instaed of multiple orders from a particular vendor then i can utilise it.Correlation will be required as the messages have to be grouped based upon a particular Information like in our example its vendor

Collection of IDoc to Single File

Collecting IDocs without using BPM By Stefan grube's

BPM CollectPattern..

http://help.sap.com/saphelp_nw2004s/helpdata/en/08/16163ff8519a06e10000000a114084/frameset.htm

http://help.sap.com/saphelp_nw04/helpdata/en/de/766840bf0cbf49e10000000a1550b0/content.htm

http://help.sap.com/saphelp_nw04/helpdata/en/cb/15163ff8519a06e10000000a114084/content.htm

http://help.sap.com/saphelp_nw04/helpdata/en/08/16163ff8519a06e10000000a114084/content.htm

Also have a look at these seminars,

https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/media/uuid/daea5871-0701-0010-12aa-c3a0c...

https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/media/uuid/e8515171-0701-0010-be98-e37be...

- Collection of IDoc to Single File

https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/30ea2fdf-f047-2a10-d3a2-955a634b...

Also this link,

http://help.sap.com/saphelp_nw04/helpdata/en/08/16163ff8519a06e10000000a114084/content.htm

Regards,

Vinod.

Former Member
0 Kudos

Thanks for this huge answer, but before i read all infos i want to verify that i have to use BPM.

As told, i have one IDoc with two different segments which can appear more than one time in source IDoc.

IDOC

SegmentA1

SegmentA2

SegmentB1

SegmentB2

These i want to collect into multiple different IDocs of same type of source.

IDoc

SegmentA1

IDoc

SegmentA2

IDoc

SegmentB1

IDoc

SegmentB2

How to achieve this?

br

former_member194786
Active Contributor
0 Kudos

Hi Fritz,

BPM is not required at all for this. It can be done without that. Just map your source segment to the target side IDOC and make the occurence of IDOC as 1...unbounded.

Regards,

Sanjeev.

Former Member
0 Kudos

Hi Sanjeev,

well i did this but the problem is that the segments can appear but don't have to.

My mapping looks like:

Segments:

Z1Batch 0..99999

Z1Movem 0..1


/ZMDI01/IDOC/EDI_DC40=SplitByValue([type=Each value]useOneAsMany(/ZMDI01/IDOC/EDI_DC40=, /ZMDI01/IDOC/Z1MOVEM=, /ZMDI01/IDOC/Z1MOVEM=))
[...]
/ZMDI01/IDOC/Z1BATCH=SplitByValue([type=Each value]/ZMDI01/IDOC/Z1BATCH=)
[...]
/ZMDI01/IDOC/Z1MOVEM=SplitByValue([type=Each value]/ZMDI01/IDOC/Z1MOVEM=)
[...]

is this ok so far?! because i only get two new IDocs with one Z1Batch and one Z1Movem and this only when Z1Movem appears - depending on the mapping!

Could some give me a hand on this?!

Do i have to use BPM or only mapping?!

br

Former Member
0 Kudos

Hi,

I think , no need to use BPM over here,

As you exolained above , first take the xsd of Idoc and change the occurrence - 00. unbound , this is for inbound side message type

In mapping you need to map the idoc parent node basded on the sender segment availability / qualifier condition you can map the respective segment , later these will be devided into multiple idocs , if you select in interface determination as extended

The other option , may be it works.

take target as above ,external definition and change the occurrence later in mapping create as many idocs ( manually) and mapp the each occurrence with respective idoc segment only.

Regards

Chilla

Former Member
0 Kudos

In mapping you need to map the idoc parent node basded on the sender segment availability

Yes i did this for SegmentA but what do i do with the segmentB. How to add this into mapping on IDoc-Node?!

With SegmentA it works fine!

I mapped:

SegmentA to IDoc

EDI_DC40 useOneAsMany (depending on SegmentA) SplitByValue EDI_DC40

SegmentA SplitByValue SegmentA

SegmentB SplitByValue SegmentB

what is wrong on this?! because this only works when SegmentA is available but in absence of this nothing is mapped.

br

former_member194786
Active Contributor
0 Kudos

Hi Fritz,

Now i got your prob. In the mapping go to your messages tab and add your IDOC twice. First occurence you map to the SegmentA and the second occurence you map to the SegmentB. Now in this case even if segmentA is not present your IDOC structure for SegmentB will be created.

Try it and let us know.

Regards,

Sanjeev.

Former Member
0 Kudos

Hi Sanjeev,

tanks for your hints.

Mapping etc runs that far, but only if i disable EDI_DC40 in targets.

I have problem in getting the source EDI_DC40 to the unbounded new generated IDocs.

How to solve this? Each of these IDoc's have to have this EDI_DC40.

can u help?!

br

former_member194786
Active Contributor
0 Kudos

Hi Fritz,

The EDI_DC40 contains the routing logic for the IDOC. You can directly map the target side EDI_DC40 fields of both IDOCS to the source side EDI_DC40 field according to the mapping logic required.

Regards,

Sanjeev.

Former Member
0 Kudos

Hi Fritz

Try using the useoneasmany function. This will help you solve the problem.

BR

Sameer