cancel
Showing results for 
Search instead for 
Did you mean: 

File adapter configuration.

Former Member
0 Kudos

Hi all

I'm configuring the sender file adapter and the receiver file adapter,i need the receiver file name and sender file name are the same.

I set the sender file name to file*.dat in sender adapter,then if i send the file1.dat,file2.dat and file3.dat i want to receive the same file as file1.dat,file2.dat and file3.

So the question is ,how to configure the receiver file name in receiver file adapter?

Any help would be appreciated.

Brand.

Accepted Solutions (1)

Accepted Solutions (1)

former_member537867
Active Contributor
0 Kudos

Hi Brand,

This can be acheived by giving the name of the file in sender CC as *.dat

And respectively in Receiver CC you can give any name( like a.dat) and that will be replaced by the Payload value at runtime....

Have a look at this:

Regards,

Vinod.

Answers (6)

Answers (6)

Former Member
0 Kudos

Hi all

Thank you for so quickly replying.

I have known it works with sp14 and above through reading the blog you providing .

Brand.

Former Member
0 Kudos

Hi,

from SP 14 u can use ASMP

1) Check on Adapter Specific message properties

2) check on filename

use

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;

now in the receiver file adapter (use var substitution)

in receiver file adapter give file name as below.

%receiver_file%.xml

since u have selected the ASMP in the sender adapter and wriiten above udf u will get the "filename" picked up by the sender file adapter.

in receiver file adapter (select :advanced tab)

varaible name reference

receiver_file payload:MT_OUTBOUND,1,filename,1

<ns0:MT_OUTBOUND xmlns:ns0="urn:sap-com:document:sap:rfc:functions">

<COMPANY_DETAIL>

<filename>

<NAME1/>

<NAME2/>

<COUNTRY/>

<LANGU/>

<STREET/>

<PO_BOX/>

<POSTL_COD1/>

<CITY/>

<CURRENCY/>

<COUNTRY_ISO/>

<CURRENCY_ISO/>

<LANGU_ISO/>

</COMPANY_DETAIL>

hope this helps

rgd

srini

Former Member
0 Kudos

HI,

Check the following threads..

Regards,

Soumya

former_member181962
Active Contributor
0 Kudos

Check the Variable Substituition section of the link:

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

Regards,

Ravi

GabrielSagaya
Active Contributor
0 Kudos

Please use Adapter specific attributes(filename) and Use UDF that includes Dynamic Configuration parameters

Former Member
0 Kudos

Hi,

You can go ahead with adapter specific attributes...

you can check the variable substitution..........

Thanks,

madhu

Edited by: Madhu on Jul 9, 2008 2:48 PM