on 10-05-2009 8:05 AM
Hi,
I created a WD app which uses the RFC FM. I followed How-To-build-webdynpro.pdf document to create the WD and trying to deploy and run, I see the view page but when I trigger the action via button UI element I get following error as exception in the try catch block of execute method
In the NWA I see
Could not create JCOClientConnection for logical System: 'WD_MODELDATA_DEST' - Model
An exception has occurred: Erorr accessing cache [region]='XCM_SESSION_SCOPE'.
[EXCEPTION]
com.sap.isa.core.cache.Cache$Exception: Cannot return access for region 'XCM_SESSION_SCOPE'. Cache is not ready
I'm using following existing JCO definition by configuring them with correct parameters. Tested them successfully
WD_RFC_METADATA_DEST
WD_MODELDATA_DEST
What am I missing? In SM04 tcode I see 2 connections are opened with 2 Megabyte not released for a long time. I think if connections are released correctly it should drop to 1 megabyte. Is there anything that I need to do just after execute method as shown below (I have replaced function module with <FM> in below code)
try {
wdContext.node<FM>_Input().current<FM>_Get_InputElement().modelObject().execute();
} catch(Exception exception) {
msgMgr.reportException(exception.getLocalizedMessage(), false);
}
wdContext.nodeOutput().invalidate();
msgMgr.reportSuccess("Success");
The error is in the catch block which is displayed on the view page.
Thanks
Praveen
I modified the above code and put in finally block to close the connections as follows, please let me know if this is OK. I still get error message as "Error connecting using JCO.Client: null" but no additional connections in the SM04 after adding finally block.
try {
wdContext.node<FM>_Input().current<FM>_Get_InputElement().modelObject().execute();
} catch(Exception exception) {
msgMgr.reportException(exception.getLocalizedMessage(), false);
}finally {
// disconnect the connection
wdContext.<FM>_Get_InputElement().modelObject().modelInstance().disconnectIfAlive();
}
Edited by: Praveen11 on Oct 5, 2009 9:06 AM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks Satish.
The issue is resolved. I think it was to do with permission, as I was running directly from NWDS deploy and run the session didn't have proper authorisation or something that was causing this error.
When I copy pasted the URL in the correct browser session window I got no error and function module was successfully executed. However the issue now is that values are not showing up in the view may be to do with mapping context or model I'll review and post back as different thread.
Thanks
Praveen
User | Count |
---|---|
76 | |
9 | |
8 | |
7 | |
6 | |
5 | |
5 | |
5 | |
5 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.