on 08-08-2008 2:56 PM
Dear Experts,
Could you suggest the syntax for specifying the file name from a variable in the file receiver communication channel? I need to grab the file name from an ATTRIBUTE of an element of the payload.
Thanks a lot.
Example: Need to pass the attribute "descReceipt" of the element "promotionEvent" to the variable in the following payload:
<?xml version="1.0" encoding="UTF-8"?>
<promotionExport>
<promotionEvent eventIdentifier="30" status="A" descReceipt="FILE1">
Not sure about the Variable substitution syntax to refer the payload.
But you can use Dynamic Configuration in Mapping and can override the file name with the value coming in the attribute.
Thanks
Farooq.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Check this:
http://help.sap.com/saphelp_nw70/helpdata/en/bc/bb79d6061007419a081e58cbeaaf28/content.htm
The variables can refer to attributes of the message header or elements of the message payload.
So not sure if you can access the attribute.
Thanks,
Beena.
Thank you all for the posting. What I really meant is that I need to get the variable name from an attribute of the element of the payload at the target side. So the file adapter needs to read it from the attribute.
I can nolt use the elements themselves as they carry other values.
Any idea?
Thank you.
The scenario is IDOC to FILE. I need to get the value of the receiving partner.
The message header has the node "DynamicConfiguration". Please see the xml below. I need to grab the key RCVPRN (0000002104) from this and pass as the file name in the receiver file adapter.
How do I setup my receiver file adapter for this? I tried changing the values for the variable, and also enabling the adapter specific message attributes. No solution yet.
<SAP:DynamicConfiguration xmlns:SAP="http://sap.com/xi/XI/Message/30" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/" SOAP:mustUnderstand="1">
<SAP:Record namespace="http://sap.com/xi/XI/System/IDoc" name="RCVPOR">LXDCLNT250</SAP:Record>
<SAP:Record namespace="http://sap.com/xi/XI/System/IDoc" name="SNDPRT">LS</SAP:Record>
<SAP:Record namespace="http://sap.com/xi/XI/System/IDoc" name="RCVPRN">0000002104</SAP:Record>
<SAP:Record namespace="http://sap.com/xi/XI/System/IDoc" name="SNDPOR">SAPLCD</SAP:Record>
<SAP:Record namespace="http://sap.com/xi/XI/System/IDoc" name="SNDPRN">LCDCLNT220</SAP:Record>
<SAP:Record namespace="http://sap.com/xi/XI/System/IDoc" name="CIMTYP" />
<SAP:Record namespace="http://sap.com/xi/XI/System/IDoc" name="IDOCTYP">WPDBBY01</SAP:Record>
<SAP:Record namespace="http://sap.com/xi/XI/System/IDoc" name="MESTYP">WPDBBY</SAP:Record>
<SAP:Record namespace="http://sap.com/xi/XI/System/IDoc" name="RCVPRT">KU</SAP:Record>
</SAP:DynamicConfiguration>
Thank you all for your help. Finally solved with the following code in the UDF that writes to the DynamicConfiguration.
Code:
DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
DynamicConfigurationKey FileName = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File","FileName");
conf.put(FileName, a);
return "";
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
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.