on 08-04-2008 9:06 AM
Hi,
I'm setting up my first message mapping scenario and would like a pointer on how best to achieve the requirement.
The interface mapping is an RFC source interface to a target SOAP interface.
In my RFC I have a series of import parameters and a table with one or more student data records.
The import parameters map directly to the SOAP message structure and therefore I can use the drag and relate functionality in message mapping.
However, the table must be mapped to the SOAP message structure into a field called payload which will contain the XML data as a string, e.g:
<payload><students><interfaceid>01</interfaceid><student><studentid>074593486</studentid><studentname><title>Mr</title> ... </studentname> ... </student></students></payload>
I don't see how this can be achieved using simply the message mapping editor.
Any help greatly appreciated.
Alan
Please can you clarify your response:
"tables will be listed as 'Items" in RFC Message Structure . use tat "Items" as table to map to target SOAP struture"
Do you mean using the function FixValues?
Either way please could you explain further.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Alan,
The tables contains multiple rows, so each row will be trated as item.
Now here you have to consolidate all the rows to single field. This will be possible with Advanced User Defined Function.
Please refer How to create UDF and then copy below java code as it is.
http://help.sap.com/saphelp_nw04/helpdata/en/22/e127f28b572243b4324879c6bf05a0/content.htm
Source table field --> TestUDF ---> Target String
Cache parameter --> Queue
///Your code
try
{
String temp = new String("");
for(int i =0; a.length>i;i++)
temp = temp + a<i>;
result.addValue(temp);
} catch (ArrayIndexOutOfBoundsException e) {}
Let me know if you need anymore details.
Thanks
Swarup
tables will be listed as 'Items" in RFC Message Structure . use tat "Items" as table to map to target SOAP struture
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
This can't be done using the standard graphical mapping. You have to use the java mapping to convert the source XML payload to string.
Thanks
SaNv...
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
81 | |
10 | |
10 | |
9 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.