cancel
Showing results for 
Search instead for 
Did you mean: 

Dynamic File name for File receiver adapter

jagesh_lakdawala
Active Participant
0 Kudos

Hello,

I am doing Proxy sender to File receiver scenario.

Filename is generated in SAP R/3 program and I want to create the file with this same name

on target location.

please suggest me how to use this file name in Receiver file adapter?.

Thanks & Regards

Jagesh

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Jagesh,

Filename is generated in SAP R/3 program and I want to create the file with this same name

on target location.

--> since you have generated the file name through proxy code and send it across to XI using a field in structure. You need to capture the value for this particular field by configuring receiver adapter in a right way .

Michal's blog will help in that :

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

http://help.sap.com/saphelp_nw04/helpdata/en/43/03612cdecc6e76e10000000a422035/content.htm

Hope it helps.

Regards,

jagesh_lakdawala
Active Participant
0 Kudos

Hi Santosh,

First of all I have Asynchronous scenario from Proxy sender to File receiver. and i am using PI 7.1 system

Yes it is true I have alreay filename available in R/3 coding. and proxy sender is also sending this filename in one of the field of Request message.

In XI, I just want to use this Filename of request message in creating the file on Target location.

so can you suggest me what is exactly required for this case?

Thanks for your help till now.

Regards

Jagesh

Former Member
0 Kudos

Only some extra features have been added to PI 7.1 environment but the functionality remains as in PI7.0

so after receiving data in to XI use UDF in messagemapping and pass the name of the source element from where this information is coming and return some dummy value

create interface mapping and configure everything in ID(dont remember name in 7.1)

enable filename option in file cc adapter

thats it

Rajesh

Former Member
0 Kudos

in IR - write the UDF in mapping to get the file name,

if you have the file name as a field just map it with the target field.

in ID -- write %variable% in File name Scheme field, check the adapter specific mapping in advance tab,

jagesh_lakdawala
Active Participant
0 Kudos

Dear Rajesh,

Correct but what to give in FILE NAME SCHEME of Target tab in File receiver CC?

Beacause it is mendatory entry.

regards

jagesh

Former Member
0 Kudos

Hi,

You can mention any variable in ur file name sheme.(%variable%)

ex: DYNAMIC.dat( if file you want to create is with .dat extn).

Regards,

Swetha.

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi,

This was asked earlier i suppose. You would get info on the same if you can do SDN search.

Use dynamic configuration in your MM.

Filename->UDF->Targetfield.

UDF:

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

DynamicConfigurationKey keyHeader1 = DynamicConfigurationKey.create( "http://sap.com/xi/XI/System/HTTP", "HeaderFieldOne");

conf.put(keyHeader1, a);

return "";

Also, do check the adapter specific attributes in the advanced tab of receiver communication channel.

Regards,

Swetha.

jagesh_lakdawala
Active Participant
0 Kudos

Hi Swetha,

thanks for yuor reply.

I understand by using UDF i will transform the Filename from Sorce filed to Target field in Message Mapping.

But can you suggest me the Dynamic configuration also which is required in File receiver adapter.

I am using the PI 7.1 version.

Regards

Jagesh

Former Member
0 Kudos

Hi Jagesh,

The only thing you have to do in File receiver adapter is, to check the "Adapter Specific Attributes" in the advanced tab of your file receiver adapter.

Regards,

Swetha.

Former Member
0 Kudos

Hi,

you have to enable the adapter specific parameter --> file name in both the sender and the receiver CC to get the input file name as output file name.

Refer this blog:

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

Also you need to use this udf

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;

Also refer this blog:

/people/william.li/blog/2006/04/18/dynamic-configuration-of-some-communication-channel-parameters-using-message-mapping

Regards,

Nithiyanandam

Former Member
0 Kudos

Use namespace http://sap.com/xi/XI/File and parameter as FileName in UDF for accessing file name through Adapter Specific message attributes

Rajesh

Former Member
0 Kudos

Hi,

You must be getting file name in mapping.

You can check this blog:

/people/william.li/blog/2006/04/18/dynamic-configuration-of-some-communication-channel-parameters-using-message-mapping

Regards

Arpil