cancel
Showing results for 
Search instead for 
Did you mean: 

Fill Multiline container from multi records in source XML ?

Former Member
0 Kudos

Hi,

scenario: File-XI-RFC-File(BPM).

Read company id from source file, call BAPI(company_get_detail) using RFC receiver adapter and then write response to another file.

This works fine for one record(one RFC call to BAPI) using the BPM.

Now, I would like to implement the process for multiple records using block(forEach) to make multiple RFC calls in BPM.

<i>I understand that i have to create multiline container and map 1:n from input xml into that container.</i> I need help here.

BPM Steps:

<b>Receive source file - fill multicontainer ?</b>

Open block step (forEach)

send sync RFC call

save Response in another multiline container

close block

send step - write response to file(receiver)

file structure:

<ns0:MT_compRqst_multi xmlns:ns0="http://abc.com/FileToRFCBPM">

<DT_record>

<companyID>000001</companyID>

</DT_record>

<DT_record>

<companyID>000002</companyID>

</DT_record>

</ns0:MT_compRqst_multi>

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

You can do the RFC lookup by using a UDF in your message mapping program. This way you can avoid the use of ccBPM, therefore, more efficient.

If you want to send each company's info as a separate message, then, you can use the "Enhanced" option in Interface Determination, using a multi-map to split the message. No ccBPM is necessary.

But, if only 1 message is to be sent to the receiver, which will result in the response containing all the company info, then a normal processing will suffice, with just the UDF to do the RFC lookup in Message Mapping.

Regards,

Bill

Former Member
0 Kudos

Thanks for alternative soulution but this is just POC only.

Please help with BPM step to fill multi container element with multi records in input XML file.

Former Member
0 Kudos

Hi,

What you outlined is what you need to do in ccBPM. So, is your question on how to do the multi-map? Or, what needs to be done in ccBPM with the multi-map?

Regards,

Bill

Former Member
0 Kudos

> Hi,

> What you outlined is what you need to do in ccBPM.

Ok.

> So, is your question on how to do the multi-map?

> Or, what needs to be done in ccBPM with the

> multi-map?

Yes. Please help with both.

My objective is to save multiple records( from input XML file) as multiple messages in multiline container varaible of BPM.

I am referring to this blog /people/arpit.seth/blog/2005/06/27/rfc-scenario-using-bpm--starter-kit File – RFC – File(BPM) which works fine for one record and RFC call.

Former Member
0 Kudos

Hi -

For your requirement, as Bill implied, you need a multi-mapping (Transformation step) that maps your single message with multiple records to multiple, <i>complete</i> messages with one record each.

To get you started, basically, for the multi-mapping, create a message mapping with your source and target MTs the same (as the one you posted). Then in "Messages" tab, for your Target message, change the occurance to "0..unbounded". Now if you go back to the "Design" tab, you see that both your source and target messages have a "Messages/Messages1" wrapper around them. In the end, the target message would look like the following and would correspond to your multi-line container element:

<ns0:Messages xmlns:ns0="http://sap.com/xi/XI/SplitAndMerge">
    <ns0:Message1>
        <ns0:MT_compRqst_multi xmlns:ns0="http://abc.com/FileToRFCBPM">
            <DT_record>
                <companyID>000001</companyID>
            </DT_record>
        </ns0:MT_compRqst_multi> 
        <ns0:MT_compRqst_multi xmlns:ns0="http://abc.com/FileToRFCBPM">
            <DT_record>
                <companyID>000002</companyID>
            </DT_record>
        </ns0:MT_compRqst_multi> 
    </ns0:Message1>
</ns0:Messages>

You'll need further steps - Interface Mapping, ccBPM (Transformation step, adjusting your Block settings, container element for multi-line element, etc.). There are some blogs on multi-mapping within ccBPM that will help you - just do a search.

Note that if your scenario has a large number of records, this approach is not performance friendly.

Regards,

Jin

Former Member
0 Kudos

Hi,

First for multi-mappipng, in Message Mapping tool, click on the 3rd tab from the left, which says "Messages".

Drag the message type of your source msg into the source, and also the target. However, for target, change the Occurrence to "0...unbounded".

Then, go back to the "Design" tab and assign your mapping elements and test. During your design, you should assign the multi-occuring element from the source to the high-level message type on the target. And, only assign a constant to the multi-occuring element of the target. This way multiple messages will be created, with each have only 1 element below it.

Regards,

Bill

Former Member
0 Kudos

Mallik,

Check this weblog for multimapping which is written by Jin:

/people/jin.shin/blog/2006/02/07/multi-mapping-without-bpm--yes-it146s-possible

---Satish

Former Member
0 Kudos

Hi William & Jin, I have created multi-mapping and transformation step( in BPM) as per your comments.

In transformation step, I have selected target message as multiline container element(abs interface with multi checked).

In block step properties, i was able to select the above multiline element, but <b>current line is faded</b>. what seems to be wrong ? Please help. I am pretty close to resolution with your great help.

Also, <b>what should be end condition</b> ? My objective is to process all records in multiline container element. How do i put this as end condition ?

Answers (0)