cancel
Showing results for 
Search instead for 
Did you mean: 

How to get Input field value?

Former Member
0 Kudos

Hi All,

I have some problem in getting of input value from View to customcontroller.

My problem is I have created a Input field in the view and if Iam giving the value to that field I can capture the value from View to customcontroller and send it as BAPI input.But My input filed is in the view Context.

How can i capture InputFiled value from View to CustomController.

Advance thanks

Nageswara.

Message was edited by: nageswar mandapati

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Nageswar,

Map attribute / nodeattribute in view controller to attribute / nodeattribute in custom controller.

For this add custom controller as required in view controller "Properties" tab, then select attribute / node, right-click and set mapping.

VS

Former Member
0 Kudos

Hi,

What I usually do is; in the custom controller I've created an 'execute' method to be called by the view once the user has input his/her values, you've probably done the same. I pass those input values as parameters to the execute method.

The values can also be passed through the context but I just prefer passing parameters to the method, don't know why really.

I hope this helps,

Patrick.

Former Member
0 Kudos

Thanks for your response Patrick,

In my customcontrollerView all my BAPI mathods instances and execute methods are declared.All the attributes directly getting from model class.

But I have two views , in first view I created a input field(for that i created valueAttribute in that context).

Here I want give the conditions If the input field is empty then directly call the execute method of BAPI.

Otherwise give any input to the inputfiled then capture that value and send it input to BAPI from view to BAPI.

In my customcontroller

BAPI b = new BAPI();

b.Param1();

b.param2();

and

execute BAPI()

I done like this.

How can i capture the view input value how to send as a b.parama();

Please guide me .

Any snippests appriciate.

Thanks

nageswara.

Former Member
0 Kudos

Please create a context mapping between the view context attribute and the controller context attribute.

Now whatever value that you have entered would be present in the controller and you can set the BAPI input as follows.

b.setParam1(wdContext.currentContextElement().get<attribute Name>());

Regards,

Noufal

Former Member
0 Kudos

Thanks for response Nouful.

In my Customcontroller All attributes only Model BApi node elenments only.

In my view I created new Value attribute .

How can i Mapp userdefine value attribute to Controller.

Please guide me.

Nageswara

Sorry, this behalf of nageswara mandapati only

Message was edited by: gopi krishna

Message was edited by: gopi krishna