cancel
Showing results for 
Search instead for 
Did you mean: 

UI elements are disabled

Former Member
0 Kudos

hi

iam using a pre-defined BAPI

BAPI_CUSTOMER_CREATEFROMDATA

this is first time i have been working on the issue

where i have to create the customer and

when i getting the Bapi to NWDS and binding the

values to the input fields , during deployment

all the fields are shown as DISABLED

can any one help me out with issue ? its urgent plz ?

Accepted Solutions (0)

Answers (5)

Answers (5)

Former Member
0 Kudos

Hi Murali,

If you bound your input fields with the node attribute then you have to initialize that node.

e.g. If your node structure is like this:

-Node1

---Value_att1

---Value_att2

---Value_att3

then you have to initialize Node1 like this:

IPrivate{View Name}.INode1Element ele =

wdContext.createNode1Element();

wdContext.nodeNode1().addElement(ele);

Thanks & Regards

Sandy

Former Member
0 Kudos

HI,

I think u create the model and get the Nodes and Attributes to Component Controller and to u r View Controller by using mapping and then u bind the context Nodes and Attribute to u r

by using Apply Template.

Try the Process like this.After creating the model in the Application Right click the Component controller in the Data Modeller and use Apply Template.the Context is mapped to the controller and the codings will automatically created in the implementation of the Component Controller.

And then mapped to the view and bind to u r user interface in the view.Now i think u r input field are Enabled at the running the Application.

Regards,

Satheshkumar.R

nikhil_bose
Active Contributor
0 Kudos

hi murali,

You get input values to value attributes (create new value attributes for accepting input) and then assign that to BAPI input parameters before calling BAPI.

This is because you have no instance at runtime ( context while design and runtime are different)

regards,

nikhil

Former Member
0 Kudos

Hi,

You need to execute the bapi and populate the context which is bound to the ui elements.



Sample code

Bapi_Flight_Getlist_Input bapiInput;
	  bapiInput = new Bapi_Flight_Getlist_Input();
	  wdContext.nodeBapi_Flight_Getlist_Input().bind(bapiInput);
	// Create new elements in the Destination_From and Destination_To nodes
	  bapiInput.setDestination_From(new Bapisfldst());
	  bapiInput.setDestination_To(new Bapisfldst());
	// Call BAPI
	  try {
	  wdContext.
	  nodeBapi_Flight_Getlist_Input().
	  currentBapi_Flight_Getlist_InputElement().
	  modelObject().
	  execute();
	  } catch (Exception ex) {
	  msgMgr.reportException(ex.getLocalizedMessage(), false);
	  }
	  // Resynchronise the data in the context with the data in the model
	  wdContext.nodeOutput().invalidate();

Regards

Ayyapparaj

Former Member
0 Kudos

Hi ,

You have to Intialize ur BAPI.. before the view is displayed.

use this code in init() method.

BAPI_CUSTOMER_CREATEFROMDATA_Input input = new BAPI_CUSTOMER_CREATEFROMDATA_Input();

wdContext.BAPI_CUSTOMER_CREATEFROMDATA_Input().bind(input);

Regards,

Sunitha Hari.