on 10-10-2007 7:15 AM
Hi,
We need to access the attribute filename from Message Header during Variable Substitution.We are able to access the following attributes of Message Header
sender_party, sender_service, receiver_party, receiver_service, interface_name, interface_namespace,
message_id (message ID with hyphens, for example 9fbe1ff1-9a0d-11d9-8665-cbf10a126331)
message_id_hex (message ID in hexadecimal format, for example 9fbe1ff19a0d11d98665cbf10a126331)
For example, if we want to specify the interface name from the message header in the target directory or in the file name scheme, we enter message:interface_name as the reference.
In the same way i need to access the filename which we get in the Message Header(which we get in the Message Header when we check the Adaptor specific message properties and filename in sender CC).Any suggestions on the same
Thanks and Regards,
Bhargav
Message was edited by:
bhargav gundabolu
Message was edited by:
bhargav gundabolu
Hi Bhargav,
Use this UDF to retreive the file name from the Dynamic Configuration Payload in the mapping.
getFileName(UDF) -
> Filename(node in the target structure).
public String getFileName(Container container)
{
//write your code here
DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
DynamicConfigurationKey key = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File","FileName");
String ourSourceFileName = conf.get(key);
return ourSourceFileName;
}
Create a node in the target structure top hold the filename returned by the UDF.
Now your payload will have the filename along with the actual data.
U can use the variable substution now as u use for the other data in the payload since the filename is now a part of your payload.
Regards
San
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Santhosh,
This is a Bypass Scenario so i dont want to use a Mapping here.Thats the reason why i want to access the filename from the Message Header in Variable Substitution which is actually possible but i need the keyword to be used(for eg. message:message_id for MessageId).Any suggestions on the same.
Thanks,
Bhargav
Message was edited by:
bhargav gundabolu
Hi Bhargav,
i think, that is "FileName". Have a look to <a href="http://help.sap.com/saphelp_nw2004s/helpdata/en/43/09b16006526e72e10000000a422035/content.htm">Java Mapping of Adapter-Specific Message Attributes</a> and <a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/oss_notes/sdn_oss_bc_xi/~form/handler%7b5f4150503d3030323030363832353030303030303031393732265f4556454e543d444953504c4159265f4e4e554d3d383139373631%7d">SAP Note 819761</a>
Regards,
Udo
User | Count |
---|---|
95 | |
11 | |
11 | |
10 | |
9 | |
7 | |
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.