cancel
Showing results for 
Search instead for 
Did you mean: 

Dynamic file name with out mapping

former_member190536
Participant
0 Kudos

Hello,

I am sending IDOC to file, the file also contains same structure of IDOC, so no mapping is required, I want to use dynamic file name with the field in IDOC.

file name should be FIELD1_DDMMYYHHMMSS.xml

Here I don't have mapping, so with variable substitution can I get the "date and time stamp" after field?

any idea? how to get this? or else I need to use mapping mandatory?

Accepted Solutions (1)

Accepted Solutions (1)

iaki_vila
Active Contributor
0 Kudos

Hi Khaja,

AFAIK variable substitution only permits to use variables with values in the payload or in the message header. Therefore you can use a OS command to append your filename the timestamp.

Regards.

giridhar_vegi
Participant
0 Kudos

Hi Inaki,

Could you please share script why because i am also having the same requirement

Thanks

Giridhar

rcsegovia
Active Participant
0 Kudos

Hi,

For tiemstamp you don't need script it's a parameter:

Configuring the Receiver File Adapter - Configuring the File/FTP Adapter in Integration Directory/PC...

Define Processing Parameters

  7.  Select the Processing tab page.

  8.  Select the File Construction Mode.

○  Create

The file is created. The document received last is saved in each case.

If you want the created file to be overwritten, set the Overwrite Existing File indicator. If you do not set the indicator, processing is stopped until the created file is processed.

○  Append

The file is written when the inbound documents are appended.

○  Add Time Stamp

A new file is created for each document. A time stamp with the format yyyyMMdd-HHmmss-SSS is added to the file name. The time stamp is added as the last part of the name before the extension.

This mode guarantees that no file is overwritten. In this way, files that originate from the same adapter configuration can be sorted

Cheers,

Roberto.

giridhar_vegi
Participant
0 Kudos

Hi Robert,

i have not asking about the timestamp . in the above requirement he needs to get the field name that should be attached in the file name . so how will you get the field name with out mapping so as per the inaki's  suggestion we need write the script to get the field value from the payload.

Thanks

Giridhar

former_member190536
Participant
0 Kudos

Hi,

does variable substitution and Add Time Stamp will both work?

I need field1 with time stamp?

iaki_vila
Active Contributor
0 Kudos

Hi Giridhar,

May be i explain bad, you can get values from payload with variable substitution. With

giridhar_vegi
Participant
0 Kudos

Hi inaki,

Here the sender interface is IDOC. So how can i get the field name with out mapping that why i have asked the script to get the field name as file name. if it is a file to file scenario we can use the command you specified. but here it is an idoc and i need to get the field name . correct me if i am wrong.

Thanks

Giridhar

giridhar_vegi
Participant
0 Kudos

Hi Khaja ,

I think we require the mapping to get the field name dynamically in your case . with out mapping it is not possible  as per knowledge . and the above discussion is the feasibility to get the field name from the payload.

Thanks

Giridhar

former_member190536
Participant
0 Kudos

Thx all,

I got system now and tested, with variable substitution and time stamp will both work with out mapping.

we need to use parameter Add Time Stamp.


Answers (1)

Answers (1)

rcsegovia
Active Participant
0 Kudos

Hi Khaja,

Please check  variable substitution under below link:

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

regards,

Roberto.

giridhar_vegi
Participant
0 Kudos

Hi roberto,

Here the above link which you have provided contains mapping . But here the requirement is without the mapping

Thanks

Giridhar