cancel
Showing results for 
Search instead for 
Did you mean: 

File channel ASMA issue: add .xml along with time stamp to sender file name

former_member585940
Participant
0 Kudos

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

Accepted Solutions (0)

Answers (5)

Answers (5)

former_member585940
Participant
0 Kudos

Hi All,

I didn't find any simpler way so I did this using OS command.

Thanks for your inputs.

Regards,

Vikram

Former Member
0 Kudos

you can try the workaround as

1. add adapter module AF_Modules/DynamicConfigurationBean

AF_Modules/DynamicConfigurationBean  1

parameters

1key.0write http://sap.com/xi/XI/System/File FileName
1value.0

message.interface

2. Enable Variable substituion & ASMA

fName

message:interface_name

3. File name scheme as %fName%.txt or %fName%.xml

RaghuVamseedhar
Active Contributor
0 Kudos

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.

Former Member
0 Kudos

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.

Former Member
0 Kudos

Hi,

Please can you try in your file name parameter on the receiver channel.

*.xml

Regards,

Jannus Botha

former_member585940
Participant
0 Kudos

Hi,

I tried this but it didn't work.

former_member585940
Participant
0 Kudos

Thanks for the links.

In these links, everyone is mentioning to go for UDF or OS command, but I am looking for some alternate option, so that we don't have to go for message mapping or OS command.

But I think, there is no other way around.

Regards,

Vikram