on 04-22-2014 12:03 PM
Hello All,
I am working on Adapter module .it accomplish to generate file with message id,message key ,sent time,received time,FromService(Business system names),toServiece(Business system name),sender interface name,receiver interface name .
i got all details in my file by calling module data by method get principal data,but i am fail to get sender interface in that file .
can you please guide me how to get sender interface name in adapter module.
I am getting some information from this following blogs
https://scn.sap.com/thread/1583665
but i am facing same error what they faced.
Please guide me to how to get sender interface name in adapter module.
Thanks
Ganesh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Indrajit/Harish
Thanks for your sport.Now i am able to get sender interface name by calling adapter module .now .
here is the code.
File f = new File("/tmp/pitest/Audit/"+smid+"*.txt");
if(!f.exists())
{
Action act = msg.getAction();
String SndrinterfaceName = act.getName();
FileWriter fw=new FileWriter("/tmp/pitest/Audit/"+smid+"*.txt,true);
fw.write("Messageid-->"+smid+"\n"
+"MessageKey-->"+smkey+"\n"
+"Time Sent-->"+SentTime+"\n"
+"Time Received-->"+ReceiveTime+"\n"
+"Fromservice-->"+fromservice+"\n"
+"SenderInterfaceName-->"+SndrinterfaceName);
fw.close();
}
else
{
Action act = msg.getAction();
String RcvinterfaceName = act.getName();
//FileReader fw=new FileReader("/tmp/pitest/Audit/"+smid+"*.txt");
FileWriter fw=new FileWriter("/tmp/pitest/Audit/"+smid+"*.txt",true);
fw.write("\n"+"To Service-->"+toservice+"\n"+"RecInterfaceName-->"+RcvinterfaceName);
fw.close();
}
Thanks to All Team
Ganesh
Hi Ganesh
Write a module in the sender adapter and use this piece of code
Message mes = null;
mes = (Message) inputModuleData.getPrincipalData();
String SI = mes.getAction().getName();
Also you can read the same by creating a UDF in message mapping
Following is the code
InputHeader inputHeader = container.getInputHeader();
String SI = inputHeader.getInterface()
;
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Javi
I have checked that link its having public void transform()method .
it returns null.i have already posted this link in my original thread.
its having action class by using that we are getting only receiver interface name.
can you please provide any other solution.
Thanks for response.
Regards
Ganesh
User | Count |
---|---|
101 | |
13 | |
13 | |
11 | |
11 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.