cancel
Showing results for 
Search instead for 
Did you mean: 

BPM Collect

Former Member
0 Kudos

Hi Gurus,

I've got the following scenario:

I need to collect messages of the following structure

<ID>1234567

<ITEM>A</<ITEM>

</ID>

<ID>1234567

<ITEM>B</ITEM>

</ID>

<ID>1234567

<ITEM>C</ITEM>

</ID>

and map it to the structure

<ID>1234567

<ITEM>A</ITEM>

<ITEM>B</ITEM>

<ITEM>C</ITEM>

</ID>

It is simillar to collect all the items that belong to the same PO Number into 1 document. I think i've read an example of this using BPM somewhere in SDN but so far i have no luck in finding it.

Any help will be greatly appreciated.

Thanks.

Accepted Solutions (1)

Accepted Solutions (1)

former_member184619
Active Contributor
0 Kudos

Hi Jason,

Are you looking for these blogs:

/people/pooja.pandey/blog/2005/07/27/idocs-multiple-types-collection-in-bpm

/people/daniel.graversen/blog/2006/09/07/using-a-bpm-to-collect-messages-for-a-set-interval-of-time

Sachin

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Guys,

Thanks for all the help previously. Got a new doubt

say i have 3 files with the following structures

File 1:

<RUNDATE>12022009</RUNDATE>

<RUNID>ABC</RUNID>

<HEADER>

<PONUM>1234567</PONUM>

<SOURCE>DEF</SOURCE>

</HEADER>

<ITEM>

<NUMBER>789</NUMBER>

<COUNTRY>AU</COUNTRY>

<CITY>AU</CITY>

</ITEM>

File 2:

<RUNDATE>12022009</RUNDATE>

<RUNID>ABC</RUNID>

<HEADER>

<PONUM>1234567</PONUM>

<SOURCE>DEF</SOURCE>

</HEADER>

<ITEM>

<NUMBER>567</NUMBER>

<COUNTRY>UK</COUNTRY>

<CITY>UK</CITY>

</ITEM>

File 3:

<RUNDATE>12022009</RUNDATE>

<RUNID>ABC</RUNID>

<HEADER>

<PONUM>987654</PONUM>

<SOURCE>ABC</SOURCE>

</HEADER>

<ITEM>

<NUMBER>567</NUMBER>

<COUNTRY>US</COUNTRY>

<CITY>US</CITY>

</ITEM>

Would it be possible to achieve the following output using Graphical Mapping and BPM. Or do i need to use ABAP Mapping.

The correlation in the BPM will be based on the RUNDATE and RUNID. After collecting the messages, Im stuck at how to map the collected structure to the output.

<RUNDATE>12022009</RUNDATE>

<RUNID>ABC</RUNID>

<HEADER>

<PONUM>1234567</PONUM>

<SOURCE>DEF</SOURCE>

</HEADER>

<ITEM>

<NUMBER>789</NUMBER>

<COUNTRY>AU</COUNTRY>

<CITY>AU</CITY>

</ITEM>

<ITEM>

<NUMBER>567</NUMBER>

<COUNTRY>UK</COUNTRY>

<CITY>UK</CITY>

</ITEM>

<HEADER>

<PONUM>987654</PONUM>

<SOURCE>ABC</SOURCE>

</HEADER>

<ITEM>

<NUMBER>567</NUMBER>

<COUNTRY>US</COUNTRY>

<CITY>US</CITY>

</ITEM>

Edited by: Jason on Feb 27, 2009 3:13 AM

former_member181985
Active Contributor
0 Kudos

What is your scenario flow?

Former Member
0 Kudos

Hi Praveen,

Scenario will be to collect all the messages from 1 system and output them into a single file. The file should contain the ID value and its respective Items. The output file can contain multiple ID values, but each ID should have its own respective items.

Former Member
0 Kudos

Hi,

in your BPM process, have a block step.....inside it a recieve step to get the source file msg......provide a deadline branch to the block step and specify a time period to collect the source file msgs........your abstract msg interface for source file should be multi-line..........then after the block step have a transformation step in which you will call your interface mapping for n : 1 mapping....in the mapping have the occurance of source msg as 1..unbounded and of target msg as 1..1 and then do the mapping.. then have a send step to send the output msg structure to a file..........

Regards,

Rajeev Gupta

former_member181985
Active Contributor
0 Kudos

Does the sender system maintains the PO order since it is a single file?

Former Member
0 Kudos

Hi

Check these blogs, here he has used field "zip", you can use ID

/people/prasadbabu.nemalikanti3/blog/2006/02/24/collecting-and-bundling-vendor-records-from-different-multiple-interfaces-file-systempeoplesoft-and-sending-to-sap-r3-system-part-1

/people/prasadbabu.nemalikanti3/blog/2006/02/27/collecting-and-bundling-vendor-records-from-different-multiple-interfaces-file-systempeoplesoft-and-sending-to-sap-r3-system-part-2

also other useful blogs

/people/sharathchandra.girmaji/blog/2008/09/11/bpm-with-patterns-explained-part-1

/people/sharathchandra.girmaji/blog/2008/09/11/bpm-with-patterns-explained-part-2

Regards

Vishnu

aashish_sinha
Active Contributor
0 Kudos

Hi,

You can insert a pattern which is already there in PI System. For this, Right click on Integration Process -> Graphical Definition -> Insert -> Business process After -> go to SAP Basis SWCV -> Inside XI/ Systems/Patterns URN -> and choose the appropriate Pattern of collecting message for for your requirement. Link you MI and everything according.

To Collect Multiple incoming messages you need multiple receive steps inside a container element after fork. Then use a transformation step to bundle messages and then put it in a message and sent it. Choose pattern from SAP Basis/Patterns will contain all these steps.

Regards

Aashish Sinha

Former Member
0 Kudos

Hi,

Thanks for all the help

Tried to do a simple example and I've done the following for the mappin

Source Target

<PO_NUM> map -> <PO_NUM>

<ITEM_NUM> map -> <ITEM_NUM> ( Occurences 1 - Unbounded )

I implemented the BPM with a loop and deadline and use PO_NUM as the correlation.

the final output i hope to get looks like the following but so far thats not happening.

<PO_NUM> 123456

<ITEM_NUM>A

<ITEM_NUM>B

I think i have missed out something in the Message Mapping, but so far have no luck in figuring it out.

Thank you once again.

Edited by: Jason on Feb 26, 2009 9:10 AM

former_member206760
Active Contributor
0 Kudos

Hi ,

Go to SAP BASIS swc - > http://sap.com/xi/XI/System/Patterns - >BpmPatternCollectPayload

here the messages are collected if they have same ID ...you can also see the mapping specified in the transformation step here..

If you see the source message type is 0..unbounded and target MT is 1..1

just check this mapping very carefully and accordingly test your mapping

Giving points is another way to say thanks

Shabarish_Nair
Active Contributor
0 Kudos

your mapping is N:1

So in the message mapping, goto messages Tab, make the source message occurance as unbounded.

Former Member
0 Kudos

Hi all,

have resolved the problem.

I did not put message occurences as unbounded for the source message.

Thanks for all the help.