on 11-07-2005 5:51 AM
Hi,
My scenario is File ->XI->File. On receiver side, file should not be created if there is a perticular value for a perticular field. For that i have written a module to check that value, but after checking the condition how can i specify that file should not be created.Do i need to change any parameter of the adapter or call any method that directly exits from the Module processor as well as Resource Adapter.
Regards,
Gowtham K.
Hi guys,
Thanks for the reply,
Now i am more clear on my doubt. Is there any way to call CallSAPAdapter module from our module.
I need a module here why because i have to go for some more enhancements in this like reading PDF files, storing into Excel files and some more tasks for which i should use module.
Currently i was stuck up with "how to call the CallSAPAdapter in my module".
Regards,
Gowtham K
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
1.what do you want if your condition is not to create the file. What do you want to do with the incoming message.
2. CallSAPAdapter should the last module after your customised modules in module tab.
3. Do your content based routing in Integration directory regarding file to be sent to which system.
Hope it helps,
Regards,
satish
Hi Satish,
If my condition hasn't satisfied i just want to discard the message.It should not create any file on receiver system.I haven't put CallSAPAdapter on receiver communication channel module tab.Because I want to call that module only if my condition satisfies , then only it can proceed further based on configuration data. Otherwise just discard the message.
Regards,
Gowtham K.
Hi Sriram,
I tried like u said. But i thought it may not be the proper way to solve this.Because when ever u change Transport protocol , message protocol parameters u need to do a lot of changes in the module code. So i just want to handover the control to CallSAPAdapter when my condition satisfies.
Regards,
Gowtham K.
Hi Gowtham,
I feel you should allow the message to come to Integration engine and in content based routing discard the message.
If condition is not met , You will get reciever not found error. or configure a dummy reciever and throw that message there .
If you still want to call Call SAp adapter bean in ur module here is the code, i have not tested it but should be in this line...
1. Call the context node
2. get the local home node for bean
3. Get the local node of CallSapAdapter bean
4. Call the process method by passinf context amd module data.
try {
InitialContext ctx = new InitialContext(); // Get the root context
CallSAPAdapterLocalHome home =
(CallSAPAdapterHome) ctx.lookup("localejbs/sap.com/CallSAPAdapter"); // get the local home for CALLSAPADAPTER
CallSAPAdapter local = home.create(); // Get the local node of CallSapAdapter bean
local.process(ModuleContext mc, ModuleData md) // Call process method.
}
catch (Exception ex) {
throw new SAXException( "Error while calling CallSAPAdapter" + ex.getMessage());
}
Hope it works,
Regards,
Satish
Hi Satish,
Thanks for the reply,
Do i need to download any jar files. Because it is giving an Error "Class can't be resolved for CallSAPAdapterLocalHome class". Where can i get the Jar file tha contains CallSAPAdapter.I have searched on Noncentral Adapter Engine. but didn't get that.
Regards,
Gowtham K.
Hi ,
Little change:
try {
InitialContext ctx = new InitialContext(); // Get the root context
ModuleLocalHome home =
(ModuleHome) ctx.lookup("localejbs/sap.com/CallSAPAdapter"); // get the local home for CALLSAPADAPTER
ModuleLocal local = home.create(); // Get the local node of CallSapAdapter bean
local.process(ModuleContext mc, ModuleData md) // Call process method.
}
catch (Exception ex) {
throw new SAXException( "Error while calling CallSAPAdapter" + ex.getMessage());
}
it should be ModuleLocalHome for CallSAPAdapterLocalHome
and ModuleLocal for CallSAPAdapterLocal.
You dont need to download any jar.
Regards,
Satish
Hi Satish,
I have called the CallSAPAdapter from my module. In sxmb_moni also it is showing successful.But in RWB-> message monitoring for Adapter engine on XI it is giving my message is cancelled with Erros.The detailed Error :
"Putting message into send queue failed, due to: Message ID 9450ad40-4f89-11da-8cc7-000c76084e55(INBOUND) already exists in database: com.sap.sql.DuplicateKeyException: ORA-00001: unique constraint (SAPLXIDB.SYS_C00114752) violated."
"Delivery of the message to the application using connection AFW failed, due to: Message ID 9450ad40-4f89-11da-8cc7-000c76084e55(INBOUND) already exists in database: com.sap.sql.DuplicateKeyException: ORA-00001: unique constraint (SAPLXIDB.SYS_C00114752) violated.
2005-11-07 12:31:45 Error The message status set to FAIL."
"Asynchronous error detected: Message ID 9450ad40-4f89-11da-8cc7-000c76084e55(INBOUND) already exists in database: com.sap.sql.DuplicateKeyException: ORA-00001: unique constraint (SAPLXIDB.SYS_C00114752) violated. Trying to report it."
"Asynchronous error reported. "
I have put audit log entries in my module from that what i understood is CallSAPAdapter module is called andreturned without Errors, after that when my module returns from there it is giving error statements.
Is there any other way that i can proceed like "Place the CallSAPAdapter in module tab , but depending on condition in my module i want to specify whether it should be executed or not."
Regards,
Gowtham K.
Why can't u check same in the Receiver/Interface Determination ? You can check the fields in the Interface Determination.
Why u want to use Module Processor here ?
Regards,
Moorthy
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
6 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.