on 10-06-2009 8:19 AM
Hi,
I have created WD app which uses RFC FM to retrieve information from ABAP and display on WD app. I first tried to execute the FM from backend system and all executed correcly and I got expected result. The result I get back after executing FM is
return code as Export parameter
3 tables which actually holds the values that I need. One of the table output parameter is MESSAGE_LINES.
In the WD app, I have done all model binding and context binding correctly. When I execute the FM from WD, I get only MESSAGE_LINES information as "Function was carried out" but one particularly table information is not displaying on the bound input fields. If I'm getting MESSAGE_LINES correctly then I should be getting other tables parameters as well I believe, but I'm not.
For example the output is
=========================
Export Parameters
Return Code 0
Tables
======
Table1
1 Entry
Message_Lines
1 Entry
Message_Struct
1 Entry
I can read the output of Message_lines and Message_Stuct and also Export parameter return code successfully but not the Table1 data, what am I missing here?
Thanks
Praveen
Hi Praveen
As u said only Table1 structure values are not display :
1. Check whether some test data are there or not in R/3 sys for that structure .
2. For Printing size do the same like :int size = Wdcontext.nodeRequest_getAllData.Size(); // See the name of node in that structure which is there in your mapping from that rfc
WdComponentAPI().getMessageManager().reportSuccess(size +"Size of the Table1 node");
3As you said : before calling invalidate as follows wdContext.nodeOutput().invalidate() : this is for your local node Ok, Same thing u have to do for rfc response Node (so that it ready to take new output after any transaction)
4. 'XCM_SESSION_SCOPE' : It is someting related to catche so delete all the stored object from your browser.
5. wdContext.current<CN>_InputElement().modelObject().modelInstance().disconnectIfAlive(); : No need of this remove this line
6 Finally go for debugging .
Best Regards
Satish Kumar
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. As you suggested I tried size and Table1 was 0 compared to Message_Lines and Message_Struct. Then I did debugging using SE37 and found that dates sent from WD to backend FM was incorrect so the Table1 details were never returned though it has successfully executed. I was using depreciated java.sql.Date constructor, now I changed it to to Calendar with proper date then created java.sql.Date to pass as parameter to the FM all worked successfully.
You were saying to remove disconnectIfAlive line, if I didn't have disconnectIfAlive code line, then in SM04 I find RFC connection were more than 1 Megabyte after execution of the FM from WD, shouldn't this drop to 1 Meg? Isn't 1 Meg means that the JCo connections are released and pool is still available but not holding any orphan JCo connections? Please advise.
Thanks
Praveen
Edited by: Praveen11 on Oct 7, 2009 12:00 PM
Hi
As per my understanding if you don't call disconnectIfAlive WebDyn Framework will call automatically and If you call second time rfc , Same connection will be used.Finally the object is to make operation synchronized after any transaction like CREATE,UPDATE,DELETE.So good practice is call disconnectIfAlive in the final Block. or no harm if you used it there.
Best Regards
Satish Kumar
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi
Do some checks
1. Print the size of the output node of that rfc print of each structure
2. Check the cardinality of the node and mapping.
3.Invalidate the response node of that rfc after execuation.
Best Regards
Satish Kumar
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
How do I check size of the output node?
I checked the cardinality and found that the output node has 0..1 where the table structure node has 0..n I'm hoping this is correct as I didn't make any change to this. The only cardinality change that I made was in the view context input node value attributes to 1..1.
I even tried to print the Table1 structure in the UI table element but still no luck.
Why would only Table1 structure values are not displayed whereas other structures are displayed.
I also put in below code
wdContext.current<CN>_InputElement().modelObject().modelInstance().disconnectIfAlive();
before calling invalidate as follows
wdContext.nodeOutput().invalidate();
I used above code to release JCo's.
Any other advise.
Thanks
Praveen
I also found everytime I excute the RFC I see a error message in NWA as follows
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... [see details]
Edited by: Praveen11 on Oct 6, 2009 11:45 AM
Edited by: Praveen11 on Oct 6, 2009 11:54 AM
User | Count |
---|---|
86 | |
10 | |
10 | |
10 | |
7 | |
6 | |
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.