on ‎2009 May 11 10:13 PM
I am doing a RFC and I do get data back.
I wanted to go though the results myself instead of just letting the application automoatically bind the data though a table.
I am also new to sap netweaver/web dynrpo (java), and so much of this code is auto-geneated that its hard for me to follow where its going.
I execute this statement: wdContext.nodeOutput().invalidate(); and (before or after - dont know where to put it) I wanted to create a loop and go though each row myself. I am getting back a table with over 600+ rows.
Anyone have any idea how to do this, or am I very confusing.
Plus, if someone could explain to me what the nodeOutput is doing, it would be really appreciated.
Thanks!!
Request clarification before answering.
Thanks to everyone for all their help!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thank you for all of your helpful answers in understand how web dynpro and RFC works.
I eventaully figured it out while coding, and what I was looking for was that once I execute the statement:
wdContext.currentRead_Site_InputElement().modelObject().execute();my data is store in the modelObject, and thats where I would retrieve it from.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Sana,
Please post it in the webdynpro for java forum so that you may get faster response
Thanks
Bala Duvvuri
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Sana,
Data fetching from RFC will have following steps:
a) Create RFC/BAPI/Funtion Module object
b) Supply input parameters
c) Execute the function module
d) Process the result and modify to your requiremenets
e) Present it to UI
FOr helping you out in your question, I request you to post code. In that way it will be easier to guide.
Regards,
Ganga
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
a) Create RFC/BAPI/Funtion Module object
b) Supply input parameters
c) Execute the function module
d) Process the result and modify to your requiremenets
e) Present it to UI
-
According to your 5 steps, I have done a, b, c, and e. What I need to do is D. How do I get to the data that was retrieved when the function was executed. I'm not understand where the data is being held??? wdContext---???
My code is VERY simple. I just set a number, and get the results.
wdContext.currentRead_Site_InputElement().setP_Locnr("000000"+strnum);
wdContext.currentRead_Site_InputElement().modelObject().execute();
wdContext.nodeOutput().invalidate();
and after that the UI picks it up and displays it in a table.
Thank you!
Sana
Hi Sana,
If the requirement is just to display the results in the UI, then you have 2 options:
1) You can add a table in view and bind the table to the Output node (select the attributes you need to display).Web Dynpro will automatically display the contents in the node in the table.
Or
2) Add a table to the view. Create a value node as per your requirement and bind it to the table. The programmatically fill data in the value node from the model node (Output node).
For example:
I<ValueNodeName> tableElement = null;
int iSize = wdContext.nodeOutput.size();
for (int iCount = 0; iCount < iSize ; iCount++)
{
//Create an element of the value node
tableElement = wdContext.node<ValuNodeName>.create<ValueNodeName>elment();
//Set the values in the element
tableElement.setCol1(wdContext.nodeOutput().getOutputElementAt(iCount).getCol1());
tableElement.setCol2(wdContext.nodeOutput().getOutputElementAt(iCount).getCol2());
....
//Add the element to the value node
wdContext.node<ValueNodeName>.addElement(tableElement);
}
Regards,
kartikaye j gomber
| User | Count |
|---|---|
| 5 | |
| 5 | |
| 4 | |
| 4 | |
| 2 | |
| 2 | |
| 2 | |
| 2 | |
| 2 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.