on ‎2011 Oct 04 9:24 AM
Hi All,
My scenario is file to file without using IR .In that I am using Variable Substitution so as to pick the files from the sender where the file name is not unique ie,EX:A)20111004-002345-100 B)20111004-00123-200
I am not sure on what to give in the Reference tab value in variable substitution option,Could anyone guide me on that.
Thanks in Advance.
Regards,
Lavanya.B
Request clarification before answering.
Hi Lavanya
In the Reference tab you need to put variable name and the value as message: <sender_party, sender_service, receiver_party, receiver_service, interface_name, interface_namespace,message_id> or payload:root,1,Node1,1 etc.
Check this
http://help.sap.com/saphelp_nw70/helpdata/en/bc/bb79d6061007419a081e58cbeaaf28/frameset.htm
Regards
Raj
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Lavanya,
Check the [ link|http://www.saptechnical.com/Tutorials/XI/Variable/substitution.htm] you will get an idea to fill the reference tab.
Regards,
Naveen
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
You need to specify like payload:Messagetype,its occurrence,Rootelement,occurrence.....etc like this you need to specify till the element that you want to refer for substituting in place of variable.
Eg: payload:MT_src,1,Root,2,MaterialNo,1(i.e refer to first occurrence of materialno in second occurrence of root in the message)
Regards
Priyanka
Lavanya,
Variables can refer to attributes of message header, by adding the prefix message:message heade
The message header attribute supported are:sender_party,sender_service,receiver_party,receiver_service,interface_name,interface_namespace,message_id,
message_id_hex
so you can give as message:any of the above
and also Variable Substitution in http://help.sap.com/saphelp_nw04/helpdata/en/bc/bb79d6061007419a081e58cbeaaf28/content.htm
Regards,
Naveen
Hi Lavanya,
There is an alternative approach to meet your requirement. You need this UDF in any of your message mapping within your scenario.
public String getFileName(Container container){
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);
ourSourceFileName=ourSourceFileName.replaceAll(".txt",".xml");
conf.put(key, ourSourceFileName);
return ourSourceFileName;
}
Map this UDF to any root of the target XML which has no other elements mapped onto it.
Ensure the following events
1. Sender Communication Channel has ASMA properties and file name ticked
2. Receiver Communication Channel has ASMA properties and file name ticked
3. "fail if ASMA missing" tick this in receiver CC.
3. UDF has no input as variable
4. In receiver communication channel -> File access parameters-> File name scheme -
> put a default filename with XML extension such as default.xml. This is not a mandatory step.
Finally following link will be useful http://www.saptechnical.com/Tips/XI/ASMA/Index.htm
Hope this helps.
regards
Anupam
Lavanya,
Your scenario is like this ?
Source file name : abcd1234.txt
Target file name" abcd1234.xml
Then you can do that by clicking ASMA in both file adapters and writing file name value from Dynamic configuration to one of the message header of XI(like interface_name) and read that variable name during receiver file adapter by using DynamicConfiguration Bean module.
--Divyesh
Hi Divyesh,
I gave .txt and able to see all the files from sender but in receiver all the files are not of the sender file name but with name as .txt
EX:
Sender file name:201199.100.300.txt
Receiver file name : .txt
and cant use dynamic configuration as my scenario doesnt have Repository Objects .
Could you suggest me on this
Regards,
Lavanya
Edited by: Lavanya Balanandham on Oct 4, 2011 7:50 PM
Edited by: Lavanya Balanandham on Oct 4, 2011 8:08 PM
| User | Count |
|---|---|
| 9 | |
| 7 | |
| 5 | |
| 4 | |
| 4 | |
| 2 | |
| 2 | |
| 2 | |
| 2 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.