on 05-09-2007 12:47 PM
Hi,
I would like to know if we can access the value of the "Source Directory" that we define in the sender communication channel within an adapter module on the same side
Helpful answers will be rewarded.
Thanks
krishna
Hi,
I have found a solution to this based on the info given in the following blog on Dynamic Configuration.
/people/daniel.graversen/blog/2006/10/05/dynamic-configuration-in-adapter-modules
The previous idea was to get from the data from the hash table but actually the info like "Directory", "FtpHost" etc are set as dynamic cinfiguration parameters in the cm channel. This info can be viewed within sxmb_moni.
So, actually , we have to invoke the getMessageProperty() method of the message to access the dynamic configuration info like
sourceDirectory = msg.getMessageProperty("http://sap.com/xi/XI/System/File","Directory");
to retrieve the Directory value.
Thanks and Regards.
Krishna
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi bhavesh.
Thanks for pointing out the related OSS note.
But as mentioned in another similar thread, the hastable has only 2 entries ,namely, FileName and File Completed. I also verified the same.
So, how can i get hold of the "Source Directory Name" .
An exact answer will be rewarded 10 points.
Thanks and REgards
krishna
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
To access the Adapter Specific Message Attributes inside the Adapter Module ( FileName , File Directory etc ), you need to refer in the note : 819761
It Provides you the sample code as well.
public ModuleData process(ModuleContext mc, ModuleData md) throws
ModuleException
{
[...]
Hashtable mp = (Hashtable)
md.getSupplementalData("module.parameters");
String fileName = null;
if (mp != null)
fileName = (String) mp.get("FileName");
[...]
}
Regards
Bhavesh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
use this code for the directory,
public ModuleData process(ModuleContext mc, ModuleData md) throws
ModuleException
{
[...]
Hashtable mp = (Hashtable)
md.getSupplementalData("module.parameters");
String fileDirectory = null;
if (mp != null)
fileDirectory = (String) mp.get("Directory");
[...]
}
This will work for the directory,
You need to give the technical name of the Adapter Specific Identifiers.
The list of technical names are at the ned of this link,
http://help.sap.com/saphelp_nw04/helpdata/en/bc/bb79d6061007419a081e58cbeaaf28/content.htm
Regards
Bhavesh
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.