on 04-09-2007 1:20 PM
Hi All,
I have created form using Web Dynpro. In this form, I have provided connnectivity with R/3 using RFC. After creation of the form, I noticed that input fields are disabled. Can you please suggest me the possible reason for this. I have mapped input field with model's parameter.
Regards,
Gaurav
Hello Gaurav,
I think you have directly bind the input context element to the InputField UI element.
Create a context element of type string and bind that to UI element then in WDInit() assign the context element to the RFC input context element.
Eg:
wdContext.currentRFCResult().setInputValue( wdContext.currentContextElement().getLocalInputElement());
Regards
Vinod V
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Gaurav
Instead of binding input field with model node,
it is better to create a value node and bind its attribute to input field.
Mandeep Virk
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You need to make sure your UI elements are bound to a context variable; otherwise they will be disabled.
/Greg
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi,
if you are properly passing parameters to the rfc and executing it properly,
then check if data is coming in the output node or not,
this can be done by checking its size
wdcontxt.node<output node>.size();, also have a check if there exist data in r3 or not.
the best way to bind UI elements is
goto layout -> outline view-> right click on RootUIElement-> Apply template->select table(for data coming in table)-> select proper output node from context -> finish
this is the best way to bind ui element , just check out if data is coming in output node
regards,
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Do something like this in the wdDoInit method of the custom controller..
i.e. Creating an Instance for the BAPI.
public void wdDoInit()
{
//@@Begin wdDoInit()
Bapi<...>_Input input = new Bapi<...>_input ();
wdContext.nodeBapi<...>_Input().bind(input);
//@@end
}
Regards,
Sunitha
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Gaurav,
The mistake you are doing is, you have to initialize the newly created input object. check below
/** Hook method called to initialize controller. */
public void wdDoInit()
{
//@@begin wdDoInit()
// Create a new element in the Bapi_Flight_Getlist_Input node
Bapi_Flight_Getlist_Input input = new Bapi_Flight_Getlist_Input();
wdContext.nodeBapi_Flight_Getlist_Input().bind(input);
// Create new elements in the Destination_From and Destination_To nodes
<u>input.setDestination_From(new Bapisfldst());
input.setDestination_To(new Bapisfldst());</u>
//@@end
}
This means.. adding to sunitha's code.. you should do below
public void wdDoInit()
{
//@@Begin wdDoInit()
Bapi<...>_Input input = new Bapi<...>_input ();
wdContext.nodeBapi<...>_Input().bind(input);
<u>input.setXXX(new expectingobjectvalue());</u>
//@@end
}
Check it...
Thanks,
Raags
User | Count |
---|---|
83 | |
24 | |
12 | |
9 | |
7 | |
6 | |
5 | |
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.