on 01-08-2015 5:04 AM
Hi Experts,
We have a scenario in which we are only passing the file using IC.
We need to pass the same file name from sender and add extension(.txt or .xml) along with timestamp.
If sender file name is pain001.ir8.003, It has to come with time stamp and extension.
I have used ASMA and add time stamp in channel, but that ll give the file name as "pain001.ir820150107_129403_222431.003" and ll not add extension.
I have two way to do it.:
1. Add mapping to this scenario and use dynamic mapping
2. write unix code to add extension before the channel picks the file.
Both of the above method will make the scenario complex. Is there any other way around.
Is it possible to do it with IC?
Please share your thoughts.
Regards,
Vikram
Hi All,
I didn't find any simpler way so I did this using OS command.
Thanks for your inputs.
Regards,
Vikram
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
you can try the workaround as
1. add adapter module AF_Modules/DynamicConfigurationBean
AF_Modules/DynamicConfigurationBean 1
parameters
1 | key.0 | write http://sap.com/xi/XI/System/File FileName |
1 | value.0 | message.interface |
2. Enable Variable substituion & ASMA
fName | message:interface_name |
3. File name scheme as %fName%.txt or %fName%.xml
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Virkam,
Please try my wiki Dynamic file name for pass-through scenario - SAP PI. It will have ESR objects.
Get file name in Java mapping and replaceAll("\\.","_"). Please let me know, if you need more guidance.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hmmm... so it's a payment file which you want to send from ECC to some Bank as I predict it from your file name e.g. pain001.
Well the simple solution is to aks the ABAPer to make the changes in the program so that when the program writes the file then it shoul write with desired timestamp and doing so it will becaome passthrough interface from PI point of view.
This is the best and most feasible solution in my opinion you can have.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Please can you try in your file name parameter on the receiver channel.
*.xml
Regards,
Jannus Botha
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Ok. Please have a look at these links below.
SAPTechnical.COM - Dynamic File name using ASMA (Adapter Specific Message Attributes) in XI / PI
Regards,
Jannus Botha
User | Count |
---|---|
85 | |
10 | |
9 | |
9 | |
6 | |
6 | |
6 | |
5 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.