cancel
Showing results for 
Search instead for 
Did you mean: 

Creating folder Dynamically in FTP server

former_member209575
Contributor
0 Kudos

Hi all,

In one of my scenario I need to place files in folder dynamically depending on the payload. R3 is sending materials to different sites, depending on sites name from payload i need to place the file in the folder with name of site. if folder is not ther i need to create folder and place the file in it. Please help me in doing this scenario.

Regards

Pradeep P N

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

HI,

Use Adapter Specific Identifiers and set the the Directory name dynamically from your mapping.

or, put it into one folder and then use a Shell Script to move it to the other folders.

Dynamic folder - in payload -


Another alternative -- /people/michal.krawczyk2/blog/2007/02/08/xipi-command-line-sample-functions

Thanks

Swarup

former_member209575
Contributor
0 Kudos

Hi Swarup,

Thanks for quick reply, can u please give some more description how we can take the folder name dynamically from mapping..?

Regards

Pradeep P N

Former Member
0 Kudos

HI Pradeep ,

Refer

/people/jayakrishnan.nair/blog/2005/06/20/dynamic-file-name-using-xi-30-sp12-part--i --> Dynamic File Name using XI 3.0 SP12 Part – I

/people/michal.krawczyk2/blog/2005/11/10/xi-the-same-filename-from-a-sender-to-a-receiver-file-adapter--sp14

Here you just need to make the usage of

Create one Simple UDF in Message Mapping and paste the code in it.

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

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

String ourSourceFileName = conf.get(key);

return ourSourceFileName;

Then in communication channel use variable substitution as similar to below link,

http://help.sap.com/saphelp_nw04/helpdata/en/bc/bb79d6061007419a081e58cbeaaf28/content.htm

see Variable Substitution in it

Thanks

Swarup