cancel
Showing results for 
Search instead for 
Did you mean: 

check condition in Loop step in BPM

Former Member
0 Kudos

Hi All,

Need urgent help... I have to specify the condition in loop in such away I need to receive and bundle IDOC1 till I get IDOC2. Please let me know how to specify the condtion in loop.

Thank you in advance

Regards,

Dhill.

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

HI

See the below link

/people/pooja.pandey/blog/2005/07/27/idocs-multiple-types-collection-in-bpm - Collection of IDoc to Single File

/people/michal.krawczyk2/blog/2005/12/04/xi-idoc-bundling--the-trick-with-the-occurance-change - IDOC bundling

Also we have Collection of messages based on the message a pattern in SAP BASIS see the BpmPatternCollectMessage and check for correct IP config..

Regards

Chilla

Former Member
0 Kudos

Use a fork step and make the required no of branches as 1. In one branch use a receive step with in a loop to receive IDOC1. In the second branch use a receive to receive IDOC2.

Regards,

Jai Shankar

Former Member
0 Kudos

Hi Jai,

Thanks, I did the same by making necessary branches as 1 but can you please tell me what condition I need to give in loop step.

Regards,

Dhil

Former Member
0 Kudos

1=1

You can find a similar BPM pattern in SAP BASIS SWCV under the namespace http://sap.com/xi/XI/System/Patterns

Regards,

Jai Shankar

Message was edited by:

Jai Shankar

Former Member
0 Kudos

Hi Jai,

when i click the below link it is going to the below link http://www.sap.com/platform/netweaver/index.epx

Regards,

Dhil

prabhu_s2
Active Contributor
0 Kudos

Dhil

Check in ur SCV BASIS in IR of ur xi system

Former Member
0 Kudos

You are not suppose to open the link. In your Integration Repository, open the Software Component SAP BASIS. With in that SWCV you will find a name space with the name I mentioned above. In that open the BPMs, you will find a standard BPM pattern shipped with XI for the same requirement.

Regards,

Jai Shankar

Former Member
0 Kudos

thank jai & prabu,

I went and seen but my requirement is that I need to receive idoc1 till i receive idoc2 and after it should exist from loop.. Will tht work with this step please confirm because we are not specifying the condition between 2 idocs.

Regards,

Dhil.

prabhu_s2
Active Contributor
0 Kudos

in this case u might look into exception braching where u u can break from the loop based ont he condition specified

Former Member
0 Kudos

Just try what I mentioned in my above reply. It will work

Regards,

Jai Shankar

prabhu_s2
Active Contributor
0 Kudos

here he wants to break from the loop when he gets the idoc2 into the process. maybe having a exception branch might help. i assume that he wants to collect and process all the idocs until a new idoc type is recv. if i got ur step correct fork steps process both the idocs.

Former Member
0 Kudos

>>if i got ur step correct fork steps process both the idocs.

No. That is why, I asked him to make the required number of branches to 1 in the fork step. So the fork step will end as soon as IDOC2 reaches the BPM.

Dhil, you need a container operation step with in the loop which will collect the msg to a multi line container.

Regards,

Jai Shankar

prabhu_s2
Active Contributor
0 Kudos

okie thats new to me but here dont we have to give some parameters on checking for the idoc type i.e. brach1 process only idoc1 etc?

Former Member
0 Kudos

>>okie thats new to me but here dont we have to give some parameters on checking for the idoc type i.e. brach1 process only idoc1 etc?

Ofcourse, you need to mention a msg name in receive step. correct?

Give the first IDOC name in one branch and the other IDOC name in branch 2.

Regards,

Jai Shankar

prabhu_s2
Active Contributor
0 Kudos

in recv step u have the option of initiating the process via start process, the abs interface name for recv the message into the process, correlation id...(wud have missed some) but here what difference wud it make when i specify the message name? and what is the message name u imply here?

Former Member
0 Kudos

Thank you very much Prabhu and Jai,

I just went for my lunch and suprise to see the blog i really got more information. but now when I change and execute the messge is still in inprocess status only and i not getting the file.

Currently i send only 2 idoc of different type. please let me know what next i need to know.

Regards,

Dhill

prabhu_s2
Active Contributor
0 Kudos

send another file that satifies the correlation condition and see if u get the file.

Former Member
0 Kudos

Hi Prabhu,

I send only the file which satisfied the correlation condition. I think it was stucked in the loop itself.

Regards,

Dhill.

prabhu_s2
Active Contributor
0 Kudos

follow the steps as in the blog pointed by chilla

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

still u have the message in process mode then u need to check on the correlation id. perhaps teh condition wouldnt have satisfied

Former Member
0 Kudos

can you tell where i can check the runtime value of correlation in BPM because as per the idoc the condition is true. and the other thing even though the condition is failed i need to send it to mail.

Dhil

Former Member
0 Kudos

Hi Prabhu and jai,

Now i am able to do it but the ouput is coming only when send idoc one by one . If I do with transaction WE14 the bpm is not coming out from the loop itself.

Please help out to solve this problem

Regards,

Dhill

henrique_pinto
Active Contributor
0 Kudos

WE14 will send both IDOC1 and IDOC2?

If that's so, probably IDOC2 is processed by IDOC adapter b4 IDOC1.

Make sure you use EOIO in Sender IDOC adapter here.

Regards,

Henrique.