cancel
Showing results for 
Search instead for 
Did you mean: 

Dynamic file name

Former Member
0 Kudos

Hi

I am trying to create the file name using the Payload date field

my structure is :

MT_xxxx

Material

No

Date

I want to create the file based on date

i tried using variable substitution:

var1 Payload:Material,1,Date,1

Its not working Any idea where i did wrong

SV

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

I think it should be:

payload:MT_XXXX,1,Material,1,Date,1

Regards,

Indranil

Award points if helpful

Edited by: Indranil Roy on Apr 28, 2008 1:58 PM

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi

I tried that its giving me error

Message processing failed. Cause: com.sap.aii.af.ra.ms.api.RecoverableException: Error during variable substitution: java.text.ParseException: Security violation encountered during variable substitution: Content of variable var1 is not safe: 28/04/2008: com.sap.aii.adapter.file.configuration.DynamicConfigurationException: Error during variable substitution: java.text.ParseException: Security violation encountered during variable substitution: Content of variable var1 is not safe: 28/04/2008

Any idea

SV

Former Member
0 Kudos

So make sure that Adapter specific message attributes is not checked im.

Other method you can use dynamic configuration to generate dynamic filename.

String filename; -- > parameter with datetime.

You can create a user defined function and it will generate the dynamic filename

filename = fileName + ".DAT";

DynamicConfiguration conf = (DynamicConfiguration) container

.getTransformationParameters()

.get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);

DynamicConfigurationKey key = DynamicConfigurationKey.create( "http://sap.com/xi/XI/System/File", "FileName");

conf.put(key, filename);

return filename;

Regards,

Indranil