cancel
Showing results for 
Search instead for 
Did you mean: 

Dynamically creating target folder based on file-name

Former Member
0 Kudos

Hi,

My Scenario is as follows:

It is a File-to-File Logical Bypass(Where no mapping is included) Scenario.I just need to pick the file from the SAP Application server and place it in folder WIN2K server.Here the file-name comes as RAW.<Company-code>.<Time>.csv. Here the <Company-code> in the file-name is not fixed, it varies.Now the task is to create a folder dynamically for each <Company-code> and place the file in that folder.That is when a file comes with a particular <Company-code> it has to be placed in that particular <Company-code> folder only.Here XI has to dynamically choose the target folder based on the <Company-code> in the file-name.

Any suggestions on this?

Thanks and Regards,

Bhargav

Accepted Solutions (0)

Answers (3)

Answers (3)

santhosh_kumarv
Active Contributor
0 Kudos

Hi Bhargav,

This can be done using the variable substution method but the difficulty in this is you have to extract the companycode from the filename and have it in the payload so that with using the variable substution method the target folder can be determined.

<a href="/people/sravya.talanki2/blog/2005/08/11/solution-to-the-problem-encountered-using-variable-substitution-with-xi-sp12 to the problem encountered using Variable Substitution with XI-SP12</a> By Sravya Talanki

Regards

San

<a href=" to set the thread to solved when you have received a solution</a>

Where There is a <a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/sdn/weblogs?blog=/weblogs/topic/16">blog</a> there is a Way.

Former Member
0 Kudos

Hi Santosh,

Variable-substitution method is possible only when we do mapping so that we can get the name from Payload.but this is a Bypass Scenario there is no mapping included in it.

Thanks and Regards,

bhargav

Former Member
0 Kudos

Hi,

You can put all the files in one directory and then write some OS level scripts that will pick the files and put them in the corresponding folders. The simplest i can think is put the same message on the target side and do one to one mapping eventhough you dont need.

Regards,

Sudheer.

Former Member
0 Kudos

Hi,

We have thought of doing the one to one mapping, but they are not accepting it.They do not want mapping.And iam not aware of OS level scripts, can u please provide me with some help in this issue of writing OS level scripts.

Request your help in this.It is very urgent

Thanks and Regards,

Bhargav

Former Member
0 Kudos

Hi,

I am really sorry to tell you that i have no idea how they are developed. It depends on which OS the target system is running on.

Regards,

Sudheer.

Former Member
0 Kudos

Hi,

This can be done by variable substitution if there is mapping involved.But here as this a Bypass scenario there is no mapping to be done and we have to do it that way only.Is there any other alternative where it can be done.

thanks and Regards,

Bhargav

Former Member
0 Kudos

Hi,

I think this can be done using variable substitution.

Check this link.

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

Regards,

Sudheer.