cancel
Showing results for 
Search instead for 
Did you mean: 

file name as field name

Former Member
0 Kudos

Hi,

I have one requirement in sftp i need to pass dynamic file name as field name.

how to achive this can anyone tell.

Thanks.

Accepted Solutions (0)

Answers (3)

Answers (3)

former_member186851
Active Contributor
0 Kudos

use the UDF as mentioned above and enable dyanmic parameters - file Name in SFTP adapter.

maheswarareddykonda
Active Contributor
0 Kudos

Hi Bhagya,

as per my understanding, if file name is "abc" then target field should be create as <abc></abc>

if that is correct, u can handle do map as below

dynamicconfig(udf)------ again UDF(as per below link)------target

the above link is not exact , i hope u can customize little bit

BR,

Maheswarareddy

azharshaikh
Active Contributor
0 Kudos

Hi Bhagya,

You can achieve this using UDF:

DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);

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

String Outputfile = conf.put(key,a);

return Outputfile;

Assign this Output of this UDF to the required Target field.

Also ensure to Enable ASMA in SFTP Channel for Filename...Refer:

Regards,

Azhar