cancel
Showing results for 
Search instead for 
Did you mean: 

FTP server name dynamically

former_member978551
Discoverer
0 Kudos

Hi SDN,

I have a scenario wherein i have to send data from BW to a legacy system via XI. This load is triggered from EP. The directory where the file is to be put is decided from the user selection screen of EP.

The directory path also contains the FTP server name.

I can set the Filename and directory using Adapter Specific Message attributes.

I need to set the FTP server also dynamically based on the directory path selection.

Has anybody come across such a scenario?

Do i have any choice other than writing an adapter module??

Regards,

Chandra

Accepted Solutions (0)

Answers (2)

Answers (2)

STALANKI
Active Contributor
0 Kudos

How big is your file size..?

Another way is to download the files from ftp server dynamically using RFC FTP_* to temporary XI folder and do whatever you want.

You are going to excercise the functionality of abap stack..this is another way out.You decide accordingly.

/people/sravya.talanki2/blog/2005/08/23/sender-xi-ftp-adapter-with-regular-path-expression-150-abap

Blog above describes abap adapter.

moorthy
Active Contributor
0 Kudos

Hi Chandra,

Even you can set the directoy name dynamically by using variable substitution.

Regards,

Moorthy

former_member978551
Discoverer
0 Kudos

Thanks Krishna...

Can i set the FTP server name too...somehow at runtime..if yes how?

moorthy
Active Contributor
0 Kudos

Chandra,

I don't think so , it is possible with variable substituion. But you can try with Adapter Modules in the FTP Adapter. You can write Java code to retrieve the File Adapter properties and route it dynamically...

http://help.sap.com/saphelp_nw04/helpdata/en/8b/895e407aa4c44ce10000000a1550b0/frameset.htm

Hope this helps.

Regards,

Moorthy

bhavesh_kantilal
Active Contributor
0 Kudos

Hi Chandra,

I am not sure, if the server name can be given Dynamically, but I would suggest that you do try it out using Variable Name Substitution.

In your servername field. just give a variable with % symbols. (eg: %file% ).

Now, under the option Variable Name Substitution, you can give how the value has to be created.

It can be your interface name, sender service name, etc or it can be some value dynamically from your payload.

For the former, your give

message:interface_name ,etc

and for the payload part you give,

Payload: "your element root which u wanna acecss"

Just check this link out,

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

And read the contents under variable substitution and it will help you understand the concepts better.

If you have any clarifications, do get back,

Regards,

Bhavesh