on 04-11-2013 10:15 AM
Hi all,
Currently we are working on a File to File scenario using ICO and without mapping in 7.3.
The scenario works perfectly fine, but we have a specific requirement which needs to be incorporated in the interface.
Say, if the source file name is "TempDATmas.txt" this has to be changed as "TempLXWmas.txt". Ideally DAT has to be replaced with LXW.
We don't want to do with CommandLine feature and we also want to achieve this without any mapping.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Sherin,
Could you please try the Java mapping for dynamic configuration, take help from the below links:
http://wiki.sdn.sap.com/wiki/display/XI/Sample+Code+-+Dynamic+Configuration+in+Java+and+ABAP+Mapping
http://help.sap.com/javadocs/pi/SP3/xpi/com/sap/aii/mapping/api/DynamicConfiguration.html
FOr changing file name, you have to give the logic as:
DynamicConfigurationKey key = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File", "FileName");
oldFilename = conf.get(key);
newFilename = oldFilename.replaceAll("DAT","LXW");
conf.put(key, newFilename);
Hope this helps.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Sherin,
Using a small java mapping is perhaps the simplest solution to the problem. You can use ASMA in mapping as shown here in the blog. The target filename is not a static one, but depends on the source filename. Thus you need to check what the source filename was and accordingly find out the target filename. This needs logic in PI which can be introduced using java mapping or adapter module.
Regards
Anupam
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi,
If your target file name always TempLXWmas.txt". then u can use filename as it is with timestamp
Cheers,
Cnu
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Sherin,
It seems to be difficult without any mapping.
If you dont want to use message mapping you can achieve this java mapping.
Regards,
Ashish
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello,
Check this:
Adapter module:
Java mapping:
http://wiki.sdn.sap.com/wiki/display/XI/Dynamic+file+name+for+pass-through+scenario
Thanks
Amit Srivastava
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello,
You already ruled out command line feature so AFAIK these are the only two options.
Let me tell you my exp, i have implemented this kind of design in many file transfer interfaces and it works fine and easy to build also (u just need to change the logic part in the above code and rest all will remain the same so can reuse it)
Thanks
Amit Srivastava
Hi,
>>Currently we are working on a File to File scenario using ICO and without mapping in 7.3.
My personal suggestion is to go with below reusable module.
Do small changes as below.
Read two input parameters(DAT,LXW) from config.
private String Input1;
private String Input2;
Input1 = (String) moduleContext.getContextData("Inputval1");
Input2 = (String) moduleContext.getContextData("Inputval2");
filename.replaceAll(Input1 ,Input2 );
..............
Regards
Venkat
you have to create one more receiver communication channel for rename the source file . in that adapter , u have to define Target file name as "TempLXWmas.txt". in FIle name on Target Receiver File adapter and u have to give target adapter path(directory) as source path.
and one more thing is u should select Processing mode is "DELETE" in source adapter.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
10 | |
10 | |
9 | |
7 | |
6 | |
5 | |
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.