cancel
Showing results for 
Search instead for 
Did you mean: 

How to read Adapter Parameters at run time

Former Member
0 Kudos

Hi All,

We want to write a adapter module that reads the Adapter type and the file name which the adapter picks up, directly from Adapter parameters at runtime and then our adapter module which is being used in the receiver adapter would read these parameters and use them for further processing.

Now the question is how to read the adapter type and the file name that the sender adapter picks up? I am sure a adapter module is being used internally by SAP that holds these parameters, but which internal adapter module does this and how to access it's parameters so that we can use them in our scenario.

Regards,

XIer

Edited by: XIer on Jan 9, 2008 12:36 AM

Accepted Solutions (1)

Accepted Solutions (1)

Shabarish_Nair
Active Contributor
0 Kudos

You can use a functionality and not go for a module.

/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/frameset.htm

Refer the above links.

Former Member
0 Kudos

Thanks Shabrish,

But I am already aware of that, my concern is to read and use the file name directly from the adapter itself...

Regards,

XIer

bhavesh_kantilal
Active Contributor
0 Kudos

Check the file adapter FAQ. There is a SAP note with the file adapter FAQ that descirbes how the filename can be read with in a module.

The code looks like something like this,

Hashtable mp =

(Hashtable) inputModuleData.getSupplementalData(

"module.parameters");

String strFileName = "";

strFileName = (String) mp.get("FileName");

Regards

Bhavesh

Former Member
0 Kudos

Thx Bhavesh, but where can i get access to File adapter FAQ?

Regards,

XIer

bhavesh_kantilal
Active Contributor
0 Kudos

service.sap.com/notes

search for file adapter faq.

Regards

Bhavesh

Former Member
0 Kudos

Yes i went through the notes.

But can I write this code in Receiver adapter module to get the name of the file sent by sender adapter?

and do i have to check dynamic adapter parameters in Sender Adapter for the above?

Regards,

XIer

bhavesh_kantilal
Active Contributor
0 Kudos

Definitely.

As long as the filename is a part of the dynamic configuration and, you do not modify this setting in the mapping in the runtime the same can be accessed in the receiver adapter as well

Regards

Bhavesh

Former Member
0 Kudos

Thxs Bhavesh, but is this the only way to get the file name entered in the sender adapter, to be used in receiver adapter module.

Regards,

XIer

bhavesh_kantilal
Active Contributor
0 Kudos

If you want to complicate things, and put the filename in a dummy field in the payload and read in in the module and so on you sure can. But this is definitely the easiest way to read filename in a adapter module.

Regards

Bhavesh

Answers (0)