cancel
Showing results for 
Search instead for 
Did you mean: 

InputField deactivated and i don't know why ?

former_member215107
Active Participant
0 Kudos

Hi everybody,

I create a WD application which call a RFC.

All is good except when i perform my application.

In the InputField, i can't enter a value. The InputField is deactivated...

My inputField is linked with the value ztest_input.Matnr which is the input variable of my RFC.

I Create and configure with success SDL and JCO ...

Any suggestions ?

Thanks,

Rodolphe.

Accepted Solutions (0)

Answers (8)

Answers (8)

former_member215107
Active Participant
0 Kudos

Hi,

I try to change the cardinality ... nothing happen

Vinod, i insert the code and i obtain the following error:

The initial exception that caused the request to fail, was:

java.lang.NullPointerException

at com.sap.tc.webdynpro.modelimpl.dynamicrfc.AiiModelClass.createNewBaseTypeDescriptor(AiiModelClass.java:256)

at com.sap.tc.webdynpro.modelimpl.dynamicrfc.AiiModelClass.descriptor(AiiModelClass.java:222)

at com.sap.tut.wd.flightlist.model.Ztest_Rla_Input.<init>(Ztest_Rla_Input.java:51)

at com.sap.tut.wd.flightlist.FlightListCust.wdDoInit(FlightListCust.java:98)

at com.sap.tut.wd.flightlist.wdp.InternalFlightListCust.wdDoInit(InternalFlightListCust.java:130)

... 38 more

Apparently,

the code line is not appreciated:

Ztest_Rla_Input input = new Ztest_Rla_Input ();

HEellp!

Thanks

Former Member
0 Kudos

Hi,

Don't directly bind the Input field with that RFC parameter ztest_input.Matnr.

Create a context element say inputMatnr of type String and bind that to input field. then in init method, put is code


// getting the RFC parameter value in to a string
String RFCelement = wdContext.current<RFCnode>.getinputMatnr();
//assign that value to the local context element that is bind to the input field
wdContext.currentContextElement().setinputMatnr( RFCelement);

Regards

Vinod V

Former Member
0 Kudos

Hi ,

Try changing the cardinality of the attribute which you have binded to tht input field . Try keeping the cardinality as 1..n.

former_member215107
Active Participant
0 Kudos

Hello,

Description of binding:

1- CUSTOM CONTROLLER:

I the Custom Controller, i create the context ListCust.

Then, i bound the contex to the model LuxModel like this:

Context:

Ztest_Rla_Input:

Output:

Labstr -


> Ztest_Rla_Input:Output:Ztest_Rla_Output:Labstr

Matnr -


> Ztest_Rla_Input:Matnr

In implementation of my ListCust, i added:

> Ztest_Rla_Input input = new Ztest_Rla_Input();

> wdContext.nodeZtest_Rla_Input().bind(input);

> input.setMatnr(new String());

2- SEARCHVIEW:

Context:

Ztest_Rla_Input:

Matnr -


> Ztest_Rla_Input:Matnr

Any suggestions?

Thanks a lot

Rodolphe.

former_member215107
Active Participant
0 Kudos

Unlucky, i already declare in my Custom Controllers

the following codes:

Ztest_Rla_Input input = new Ztest_Rla_Input();

wdContext.nodeZtest_rla().bind(input);

Ztest_Rla_input is the RFC name.

Other ideas ?

Thanks!

Former Member
0 Kudos

Hi,

If your input is under any structure/table then you need to initialise that also. Something like this:

input.set<Destination_From>(new <Bapisfldst()>);

OR

input.add<Destination_From>(new <Bapisfldst()>);

Refer to the following link which resolves your problem.

https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/user-interface-tec...

Thanks n Regards,

Jhansi Miryala

Former Member
0 Kudos

Hi,

FYI.

If it's me, I'd like to use Context RootNode for UI input.

Create an attribute in Context RootNode, link the UI Element to this attribute, and assign the attribute value to RFC parameter when later.

In this way, Context RootNode element always exists, so the UI element is always enabled, isn't it?

Former Member
0 Kudos

Hi,

You have to intialise your model in the wdDoInit method of the Component controller..i.e. Creating an Instance for the BAPI.

Bapi<...>_Input input = new Bapi<...>_input ();

wdContext.nodeBapi<...>_Input().bind(input);

Thanks n Regards,

Jhansi Miryala

Former Member
0 Kudos

Hi,

This is bcoz you dont have an element for the node bound to the textbox

Regards

Ayyapparaj

Former Member
0 Kudos

Hi ,

Create an Object for RFC in init menthod of either view or controller

i.e

ztest_input input = new ztest_input();

wdcontext.noceztest_input.bind(input);

Regards,

Sunitha Hari