cancel
Showing results for 
Search instead for 
Did you mean: 

Extension .txt.pgp to target file in receiver file communication channel

Former Member
0 Kudos

Dear Experts,

I need to create a file with extension .txt.pgp. But when i give this extension in target file name in channel to produce TEST_Action_.dat.pgp with time stamp.

Result file name comes as TEST_Action_.dat20161030101030.pgp where as i want TEST_Action_20161030101030.dat.pgp


Can any body guide me please?

Thanks.

Sumeet.

former_member182412
Active Contributor
0 Kudos

Nice trick Manoj.

former_member186851
Active Contributor
0 Kudos

True..Nice one Manoj.

Former Member
0 Kudos

Hi Manoj,

I am not using any message mapping and variable substitution needs that, hence error is coming.

I am hard coding file name in channel and adding time stamp into it.

Can anything else be done here?

Thanks.

Sumeet.

manoj_khavatkopp
Active Contributor
0 Kudos

The solution should work even without mapping i have tried it! can you please let us know what is the error.

Former Member
0 Kudos

Hi Manoj,

Error say that Date shd either message or payload.

Thanks.

Sumeet.

manoj_khavatkopp
Active Contributor
0 Kudos

it would be helpful if you put a screenshot of your channel config and error too so to assist you more , however the one which i have put up is the one i have implemented this without esr in advantaco sftp i guess it should work in sap adapter too.

engswee
Active Contributor
0 Kudos

I don't think SAP's adapter necessarily have the same features as Advantco's!

Refer the documentation for SAP's adapter - it only allows variable substitution for elements in payload (payload:xxx) or attributes in message header (message:xxx)

Defining Variable Substitution for Target Directory/File Name - Advanced Adapter Engine - SAP Librar...

Sumeet, best bet is to go for Praveen's suggestions since you are using SAP's standard adapter.

Binod_Thakur
Participant
0 Kudos

Hi Manoj,

This is not working for me, having 7.40 PO.

Accepted Solutions (0)

Answers (2)

Answers (2)

former_member186851
Active Contributor
0 Kudos

Hello Sumeet,

This is normal behaviour of file channel, to achieve like

TEST_Action_20161030101030.dat.pgp,you need to have dynamic file config.

You can refer the links shared by Praveen.

Binod_Thakur
Participant
0 Kudos

Hello raghuraman.sritharan & manoj.khavatkopp ,

Please suggest how can I get the file name as "MI_GL_UNZIP_FILE_IN20201005-185821-221.xml.pgp" in target side by using variable substitution.

I have tried many ways but not getting the output.

that 'Date' variable is not working where as 'fname' is working fine for reading the interface name dynamically.

former_member182412
Active Contributor
0 Kudos

Hi Sumeet,

File adapter add the time stamp before last '.' symbol that is why you are getting the file name like above. If you want required format mentioned above you need to do in below ways.

  • Set the dynamic file name in the mapping using DynamicConfiguration

         Dynamic file name and directory in Receiver File Adapter - summary of possibilities - Process Integr...

  • Set the dynamic file name using custom adapter module

      

Regards,

Praveen.