on 03-21-2006 5:32 PM
Hello , i have a flat file scenario : XML to RFC and response back to xml , in which case i have a more complex scenario.
Instead of calling RFC multiple times i need to call RFC multiple times through a BPM loop through one xml with duplicated strcutures how is it possible please help me
Krishna
Hi
To know more about Par For Each Loop in BPM - go thru following Flight Example-
http://help.sap.com/saphelp_nw2004s/helpdata/en/3c/831620a4f1044dba38b370f77835cc/frameset.htm
Hope this helps..
Regards,
Moorthy
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi Krishna,
in your message mapping, when after you drag the RFC as your destination message type , change the occurence of the message type to to 0 to unbounded.
Likewise, change the occurence of your RFC Message Interface to 0 to unbounded.
Now, your mapping is doing a 1:N mapping.
In your BPM, make sure that the container element pointing to your RFC interface is a multiline.
Then put your send (for RFC request message ) in a block using either for each or par for each.
Regards,
Bhavesh
Sorry for my ignorance,
well to be more specific , i am expecting my source message XML will be having multiple structures repeated hence i assume that 0..unbounded .
Now as you suggest i have to make RFC Destination as also unbounded i.e. for ex i am using RFC_CUSTOMER_GET , by default its 1..1 i have to change it to 0..unbounded
i think i only define Messg interface for xml message and i directly use RFC from imported objects in message mapping of Destination message , where would i define MI for RFC
Please suggest
Thanks for your valuable replies
Krishna
Hi,
RFC itself acts as an Message Interface. SO you need to have one Outbound Interfce of type File and inbound Interface of type RFC - here RFC itself acts as a Interface.
To change the occurence, go to Message Mapping Editor->Messages Tab->Target Message->Occurence( Chnage the ocurence here)
To change in the interface mapping, go to Interface Mapping->Target Interface(change the occurence column)
Regards,
Moorthy
Thanks moorthy for your valued replies :
i think i am missing in the concept of this : for calling RFC through multiple times through one xml message having duplicated structures ,i was suggested earlier through 1:n mapping in which case i am defining Source XML occurence as 1 and target rfc as unbounded. if i am defnining souce as 1 will it allow mutliple values ?
Hello,
Quick Example here it goes-
Case : Have one xml file and having many RFC structurues of same RFC type ( i.e header and Line items are repeating)and I need to post one RFC for each structure(i.e one header and corresponding line items), then you can do like this-
1) Create a Message Mapping ( file to RFC not changing any occurence)
2) Create a interface Mapping for this.( No need of changing any occurence)
3) Receive the file xml data in the BPM
4) start Par For Each Block
5) Execute Transformation Step
6) Send the Mapped RFC data to R/3
In this case you will be calling RFC multiple times.
Is your scenario is similar like this ?
Regd. 1:N mapping-
in the source, you have one message ( irrespective of inside structure) and in the target side you have multiple messages.
For e.g SOurce message occurence is 1 here
<Source>
<Header> </Header> (1..1)
<Line> </Line> (1..n)
</Source>
For the same message occurence N means-and it will be wrapped by a message1 node once you change the occurence.
<Message1>
<Source>
<Header> </Header> (1..1)
<Line> </Line> (1..n)
</Source>
<Source>
<Header> </Header> (1..1)
<Line> </Line> (1..n)
</Source>
</Message1>
Hope this helps..
Regards,
Moorthy
Thanks Moorthy for your valued reply,
well with your input i can compare what is my scenario. i have an source XML file of type
Message1>
<Source>
<Header> </Header> (1..1)
<Line> </Line> (1..1)
</Source>
<Source>
<Header> </Header> (1..1)
<Line> </Line> (1..1)
</Source>
</Message1>
Now the destination RFC strcuture is (with out changing occurence ) is 1..1 , i changed it to 0..unbounded. and RFC structure is not identical to xml.
Please advise.
Krishna
Hi ,
Just More info-
Actually if you do the occurence as 0-n then you will be having structure like this-
<Messages>
<Message1>
<Source>
<Header> </Header> (1..1)
<Line> </Line> (1..1)
</Source>
<Source>
<Header> </Header> (1..1)
<Line> </Line> (1..1)
</Source>
</Message1>
<Message1>
<Source>
<Header> </Header> (1..1)
<Line> </Line> (1..1)
</Source>
<Source>
<Header> </Header> (1..1)
<Line> </Line> (1..1)
</Source>
</Message1>
</Messages>
In this case you have multiple Message1 under Messages node. So now it is N number of messages under one tag.
For your scenario, you can try like this-
1) No need of changing any occurence anywhere.
2) Use BPM -mentioned in my earlier reply
I think it will work without 1:N or N:1 mapping Because in your case there is no multiple messages, but you have multiple occurences of each set. So I think you can easily handle with parForEach loop.
For eg. on ParForEach -
http://help.sap.com/saphelp_nw2004s/helpdata/en/27/db283fd0ca8443e10000000a114084/frameset.htm
http://help.sap.com/saphelp_nw2004s/helpdata/en/27/db283fd0ca8443e10000000a114084/frameset.htm
http://help.sap.com/saphelp_nw2004s/helpdata/en/27/db283fd0ca8443e10000000a114084/frameset.htm
Also check in BPM Patterns for ParForEach.
Regards,
Moorthy
Just check it
Thanks for your message:
well i checked the source message is its like this
<messages> 1..1
<Message 1> 1..1
<Message_type>
.
.
.
</Message_type>
<Message_type>
.
.
.
</Message_type>
</Message 1>
</Messages>
Now RFC its { AFTER CHANGING OCCRENCE TO 0..UNBOUNDED}
<messages> 1..1
<Message 1> 1..1
<RFC_type>
.
.
.
</RFC_type>
<RFC_type>
.
.
.
</RFC_type>
</Message 1>
</Messages>
Thank you very much for your valued replies.
Krishna
Hi,
This link should help you understand multimappings better:
http://help.sap.com/saphelp_nw04/helpdata/en/21/6faf35c2d74295a3cb97f6f3ccf43c/content.htm
Chandra
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
If you are on SP14+, you can accomplish the same using the extended configuration in Interface Determination using the same multi-mapping you developed for BPM.
This will not require BPM and, therefore, less resources.
Regards,
Bill
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi Krishna,
To convert your flat file, into XML, you will have to perform content conversion on your Sender File Adapter.
Refer this blog for the same,
/people/venkat.donela/blog/2005/06/08/how-to-send-a-flat-file-with-various-field-lengths-and-variable-substructures-to-xi-30
To call an RFC in a BPM,
/people/arpit.seth/blog/2005/06/27/rfc-scenario-using-bpm--starter-kit
Regards,
Bhavesh
hi,
>>>> i need to call RFC multiple times through a BPM loop through one xml with duplicated s
1. create a multimapping that will create as many xml messages
as calls that you need
2.add those messages to a multiline container
3. use a block step with foreach on this multiline
container and the send step will execute
the rfc at each new message occurance
Regards,
michal
-
<a href="/people/michal.krawczyk2/blog/2005/06/28/xipi-faq-frequently-asked-questions">XI FAQ - Frequently Asked Questions</a>
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi,
no loop
1. use a message mapping 1:N
that will create as many messages as calls
2. put it in the transformation step in BPM
3. use block and a send step inside
and in block specify the use of foreach
on the multiline container that you will fill
inside the transformation step
Regards,
michal
User | Count |
---|---|
87 | |
23 | |
11 | |
9 | |
8 | |
5 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.