cancel
Showing results for 
Search instead for 
Did you mean: 

Items of input fields are disabled

Former Member
0 Kudos

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

Accepted Solutions (0)

Answers (5)

Answers (5)

Former Member
0 Kudos

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

Former Member
0 Kudos

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

Former Member
0 Kudos

You need to make sure your UI elements are bound to a context variable; otherwise they will be disabled.

/Greg

abhijeet_mukkawar
Active Contributor
0 Kudos

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,

Former Member
0 Kudos

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

Former Member
0 Kudos

Hi Sunitha,

I have already done like this. However the issue still persists. Can you please let me know if I am committing mistake somewhere else.

Regards,

Gaurav

Former Member
0 Kudos

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

Former Member
0 Kudos

Can you please explain me this line

input.setXXX(new expectingobjectvalue());

what is expectingobjectvalue()?.

I have only one import parameters to send as a Input parameters(PO no), relating PO details will be coming as ouput .