cancel
Showing results for 
Search instead for 
Did you mean: 

Using BPM (Blocks) when Incoming message has multilple rows

Former Member
0 Kudos

Hi All,

I am using BPM in my scenario.I have a message with multiple rows coming.I want to check for a condition for each row of the incoming message.I am trying to use a block(Mode: For Each) and using a switch step inside this block.But in a block if u want to check for each line, we need to define a multiline container element as Source Interface message.Since I am already having multilple rows, I cannot give multiline option.Can someone give me some example scenarios where this type of scenarios are handled.

Thanks in Advance.

Soumya

Accepted Solutions (1)

Accepted Solutions (1)

moorthy
Active Contributor
0 Kudos

Hi Sowmya,

First of all recieve the message as it is by Recieve Step in the BPM without any loop. It is not required any multiline container etc. Because you are going to receive the One Message having multiple occurences of the Rows/Records.

Then check the condition with Switch step . While defining the condition, check the option of Multiline in the condition editor,

Then proceed for further logic.

Regards,

Moorthy

Former Member
0 Kudos

Hi Krishna,

If I hav to process more than one condition in the switch.ie.first i am checking whether an element material code is null and then using AND in the switch i am checking whether the batch number is valid, will this hold good? Here both material code and batch number are in the same row.Or will it assume that multiple rows of material is coming in one message?

Regards,

Soumya.

Former Member
0 Kudos

Hi Soumya,

Yes it will hold good for your condition too.....

Regards,

Abhy

Former Member
0 Kudos

Hi,

Thanks for ur response.

I have one more problem here.After checking the conditions in the switch step I also want to append the invalid records to a container using a container operation.This is to be done in a loop in one of the branches in the switch step.Since I don't know the number of the incoming rows, i am not able to give a condition in a loop.Can u suggest how I need to proceed?

Regards,

Soumya.

Former Member
0 Kudos

Hi Soumya,

I guess you will be giving the condition in the switch step to see if the entries are valid or invalid.

so if the condition is valid it goes to the 1st branch else its goes to the 2nd branch where you just need to give the container operation with the operation set to "Append". You need not use a loop.

Regards,

Abhy

Former Member
0 Kudos

Hi

In ur scenario, one of ue switch branch will be for invalid condition. In that branch u can have a receive step following a multiline receive step, both refer to same object of repository(only difference is one is multiline).So u dont have to bother about end condition.

Hope this helps u out.

Regards

Vineetha

Former Member
0 Kudos

Hi,

Here I am picking a file with multiple rows

The Sender Message Type structure is

<ns:File_MT xmlns:ns="http://File/send">

<recordset>

<Slno />

<Goods_Receipt_Date />

<Material_Code />

<Quantity />

<Plant_Code />

<Storage_loc />

<Batch_Number />

<PO_Number />

<Item_Number />

<Special_Stock_Indicator />

</recordset>

</ns:File_MT>

Here the row recordset has multiple occurences.

For my BPM I have defined an Abstract Message Interface of similar structure.

1)I am using a receive step to receive the message.

2)I am using a transformation step for structure change.

3)Then I have to check a condition whether each of the fields, ie material number,plant code etc are null or not.

I am using a switch for that.In the switch I have 2 branches-for error records and correct records.

Now in the eror record branch, I want to append error records to a container using a container operation and finally send it to another system.

Since my Source message is already having multilple rows.ie 0...unbounded for recorset, I can't define a multiline for container operation.The container operation expects a multiline container element when using append statement.

How should I go about this?Should I define a Loop after the transformation step?

Can you give me any example scenarios where transformation steps are used to change a source message with mutilple rows are used?I referred the FlightBooking Example, http://sap.com/xi/XI/Demo/Agency-SplitMultiplebookingOrder but in that they are not using the MessageTypes which are already defined, in the mapping.

Can anyone help?

Thanks and Regards,

Soumya.

moorthy
Active Contributor
0 Kudos

Hi,

Check the BPMPatterns available in the SAP BSAIS Software Components in the Repository. It has similar pattern.

Regards,

Moorthy

Answers (0)