on 02-06-2007 7:26 AM
Hi
I have a requirement that i hv to pull data from BAPI and display it as a popup so that user can select..
I dint understand how to carry on with this.
I have pulled data into component controller from R3
But its giving me error
"ContextModelNode modTest [modelClass]: The context model node has not been bound to a model class (Hint: A Context model node has to be bound to a model class or mapped to a model node of another controller.)"
Can anybody tell me step by step procedure to do this..
Thanks
Monika
Hi,
Import the model into WD naming supposr RAMA.
register the model into webdynpro using the usedmodels.
Then goto the Customcontroller the model nodes are avail in rightside of your cutomcustomcontrollercontext and do the Model binding.
Once you get the model into your cuctomcontroller u can register the custom controller into viewcontroller and getting the nodes into view context.
And goto the View and apply template and create the Table by using the existing node.
Goto the init method of the View controller and add the following code.
FNModule_Input input = new FNModule_Input();
wdContext.nodeFNModule_Input().bind(input);
// pass the input
input.setZ_Kunnr("0000000001");
try {
wdContext.currentFNModule_InputElement().modelObject().execute();
wdContext.nodeOutput().invalidate();
} catch (WDDynamicRFCExecuteException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
This might helps you.
thanks,
Lohi.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Lohitha
i has been done..
Can u tell me the code to display get the values from R3..
means i have succesfully called BAPI bt wn i displaying the values for a particular field stored in R3 it is giving me something like this..
NodeElement(Testcomp..Output.Plant_List.0)
I have used this code..
String dropvalue=String.valueOf(wdContext.nodeOutput().nodePlant_List().getElementAt(i));
to get values what i have to do..
Thanks
Monika
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
The code which i have written in the component controller is:-
Isa_Get_Plants_List_Input input=new Isa_Get_Plants_List_Input();
wdContext.nodeIsa_Get_Plants_List_Input().bind(input);
Plantnames pn=new Plantnames();
try
{
wdContext.nodeIsa_Get_Plants_List_Input ().currentIsa_Get_Plants_List_InputElement().modelObject().execute();
wdContext.nodeIsa_Get_Plants_List_Input().nodeOutput().invalidate();
}
catch(Exception e)
{
e.printStackTrace();
}
int size=wdContext.nodePlant_List().size();
String size1 = String.valueOf(size);
wdComponentAPI.getMessageManager().reportSuccess(size1);
but when i m printing size1 it is showing me 0.
bt in R3 there r 86 entries..
can anybody tell me the reason for this..
Thanks
Monika
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
takes care your Outputnode.
Every function module output table structures always put under one output node.
Under that node only all your output structures will available.
But you can use the statement like this.
int size = wdcontext.nodeoutput().size();
Then you can get the size or other wise send me your output nodestructure
such that we will find the where the error is .
Thanks,
Lohi.
Hi
i forgot to tell that all the data should e pulled into the simple type
Monika
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
10 | |
10 | |
10 | |
7 | |
6 | |
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.