cancel
Showing results for 
Search instead for 
Did you mean: 

Dynamic FTP Directory Address in File Adapter - is this possible?

Former Member
0 Kudos

We have a customer who would like us to pick up a file via an FTP file adapter once per day. The problem is, they have a different directory each day containing the file. The directory name is of the form YYYY-MM-DD. The name of the file in the directory is always the same.

Is it possible to dynamically calculate the Source Directory name in the FTP file adapter? If so, how?

Kind Regards,

Tony.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Use DynamicConfiguration using Adapter-Specific Message Attributes

Former Member
0 Kudos

Hi,

These are useful answers, I have to research this a bit.

One question: the blog refers to a message type for the communication channel, and states

"Please reference help.sap.com for the namespace and technical names"

How can I find out what these are for a file adapter?

Also, how do I bind the message mapping? There is no mention of an Interface Mapping, and I'm not sure what to do woth the message mapping once it has been written. I fail to see how the message mapping is invoked.

BR,

Tony.

Answers (4)

Answers (4)

dharamveer_gaur2
Active Contributor
0 Kudos

Hi

Look this same thread:

Former Member
0 Kudos

>

> Hi

> Look this same thread:

>

Hi,

All the examples I have seen are to configure the Receiver File Adapter, not the Sender File Adapter. I don't thinl I have seen one blog yet whereby the source directory of a Sender File Adapter has been dynamically configured. I wonder if it can be done because the sender file adapter does not have Variable Substitution possibilities for filenames and directories.

So has anybody a link to a blog where this dynamic choice of a source directory has been done for a SENDER file adapter?

BR,

Tony.

dharamveer_gaur2
Active Contributor
0 Kudos

Hi

and use this bolg mentioned in this thread.

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

also look this thread

It provide u way to select from multiple directories,but not dyanamic.

https://www.sdn.sap.com/irj/sdn/wiki?path=/display/xi/single%2bsender%2bfile%2bcc%2b4%2bmultiple%2bd...

Edited by: Dharamveer Gaur on Oct 11, 2008 4:02 PM

former_member183906
Active Contributor
0 Kudos

Hii

Use DynamicConfiguration using Adapter-Specific Message Attributes

or

You can use "Advanced selection for source file" option in sender communication channel :

Here the constraint is that you should know all the directories when you configure sender communication channel.

Former Member
0 Kudos

hi,

if you want your directory name dynamically from Payload, you can use the option variable substitustion;

For example follow below procedure:

1)in the Target directory name --> /%dir%

2)go to advanced tab and check for the variable substitution option(enable),

3)variable name:dir

Reference:Payload:mt_filetest,1,name,1

according to the given details in the communication channel your payload should be like this

<?xml version="1.0" encoding="UTF-8"?>

<ns0:mt_filetest xmlns:ns0="urn://filetest">

<name>madhav</name>

</ns0:mt_filetest>

now directory is created with the name of madhav (Dynamically according to the payload directory name is created).

Former Member
0 Kudos

Hi,

You can use variable substitution for file and directory.

Else, you can map the filename and directory and refer the same in ID.

Regards

Krish