cancel
Showing results for 
Search instead for 
Did you mean: 

Adapter file receiver command line dynamic

Former Member
0 Kudos

Hi everybody,

In the adapter file receiver, I'd like to put the command line dynamically depending of informations of the payload of the message.

Do you have ideas ?

Thank you in advance for your collaboration.

Regards

Accepted Solutions (0)

Answers (3)

Answers (3)

prateek
Active Contributor
0 Kudos

The complete command line could not be created dynamically. The filename parameter of the command line however could be changed dynamically based on payload. If the filename is in sender payload or same as sender file name, then you may use Adapter specific message attributes. If it resides in receiver side payload, then you may use variable substitution.

Regards,

Prateek

Former Member
0 Kudos

HI,

what you have to do is to make the use specific adapter properties (filename) in the receiver file adapter

and then populate the filename in the mapping:

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

DynamicConfigurationKey key = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File","FileName");

conf.put(key, "newfilename");

check out the blog by michal for more details : /people/michal.krawczyk2/blog/2005/11/10/xi-the-same-filename-from-a-sender-to-a-receiver-file-adapter--sp14

Thanks

Hamja

Edited by: Hamja Hussain on Feb 23, 2009 1:44 PM

Former Member
0 Kudos

Eric,

Why not work with Parameters (adapter Specific)

Enable Adapter Specific attributes and fill them with data from the Payload. Be aware that this need to be filled via the Dynamic Configuration

See SAP Help

Dynamic Conf

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

Sender File/FTP Adapter

http://help.sap.com/saphelp_nw04/helpdata/en/e3/94007075cae04f930cc4c034e411e1/content.htm

Receiver File/TFP Adapter

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

PS: the option Command line execution can also be filled with parameters. This in order to make dynamic cmd line executions

Greets and Success