cancel
Showing results for 
Search instead for 
Did you mean: 

Inputfield value from view to model

Former Member
0 Kudos

Hello Friends,

I am having following senario:

I am having a application with SAP R3 system as backend. I have to take a value from fornt -view and pass it to the RFC parameter ( any documenation would be gr8 to explain the binding of view elements with model elements ).

This same field is avaiable in one table, so when I do reimport model I can see this field in model context. But i am confused if I have to assign my view attribute to RFC or to this model attribute ?

Any suggestions would be gr8

regards.

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Shah:

Also <a href="http://help.sap.com/saphelp_webas630/helpdata/en/c3/76b45d9688e04abe1a1070410ddc1e/content.htm">Check this Too</a>

Will give you more idea.

Tnx,

MS

Former Member
0 Kudos

Hello Munna,

Thanks for the doc, is this docu, explains the adavtive RFC model ? OR

or without adaptive RFC model one can use of R3 system in web dynpro application ?

Regards,

Former Member
0 Kudos

Hello Friends,

I went through these examples but they did not help me much....

I am intrested to take an input field "value attribute" and assign to the RFC ( import parameter )........

Pls help in providing any documentation or so !!!!!

Regards,

former_member182294
Active Contributor
0 Kudos

Hi Shah,

Check this code snippet, replace with your RFC model nodes:

If your model import paramer is directly binded with UI then.. do this in wdInit() of your component controller.

Zbapi<BAPINAME>_Input input = new Zbapi<BAPINAME>_Input();

wdContext.nodeZbapi<BAPINAME>_Input().bind(input);

Or

If you have some value attribute assigned to InputField then do this..

Zbapi<BAPINAME>_Input input = new Zbapi<BAPINAME>_Input();

wdContext.nodeZbapi<BAPINAME>_Input().bind(input);

input.setImportParameter(wdContext.currentContextElement().getInputValue());

Then execute the BAPI.

Regards

Abhilash

Former Member
0 Kudos

Thanks Abhilash,

will just try and let you know,.....

Regards,

Former Member
0 Kudos

Following code is already there in custom controller:

Zport_Get_Fields_Input input = new Zport_Get_Fields_Input();

wdContext.nodeZport_Get_Fields_Input().bind(input);

The think is at view I have 4 input fields, 3 are going to RFC, one I have added and this fourth one is not going till RFC ( valled attribute )

I am try to enhance an existing code....

Regards,

Former Member
0 Kudos

Okey, I have found the followig in view : onActionSelect method it retrieve the remaing three fields, and set into the method

wdThis.wdFirePlugOutToFieldView

Now I tried to retrieve the fourth field in same way as the other three ( and I can see the value put into the inputfield) and extended the method wdFirePlugOutToFieldView to accept the fourth field. But when I try to deploy and run, I have got the following exception:

<b>java.lang.Error: Unresolved compilation problem: The method wdFirePlugOutToFieldView(String, String, String, String, String) in the type IPrivateTableManagerView is not applicable for the arguments (String, String, String, String, String, String) </b>

However I have manually extended the method wdFirePlugOutToFieldView for the string value......

Any idea how I can extended this method ?

Regards,

Message was edited by:

Shah H

null

null

Former Member
0 Kudos

Hi,

I have fix this exception, and added in the plug the corresponding field, but unfortunatelly when I debug I cant see the value of this newly added field ( I am debugging in R3 system ) however remaing fields are visible in debug dont know what else I have to do...

plz help...

Regards,

former_member182294
Active Contributor
0 Kudos

Check if your fields are mapped from View Controller to Component Controller. Or it might be possible that the parameters are passed based on the event. so check the method call if you are passing the correct value or not. For debugging purpose you can add some debug statements using wdComponentAPI().getMessageManager().reportSuccess("Debug 1").

Regards

AG

Former Member
0 Kudos

Hello Abhilash,

I have checked, unfortunatelly, there is no mapping between context of view with custom controller context. I have checked in action as well, and there the program only calls another view and set the plug values. I am getting mad, I mean how in this application the x-programmer is sending values to RFC, the thing is when I debug the RFC in r3 system the RFC import parameters are filled with values. But I cant see it happening it via binding, nore with any action event.......

Experts is there any other way also avaiable, ????

Regards,

Former Member
0 Kudos

Hello,

Any one has any idea / suggestion for me ?

Regards,

Former Member
0 Kudos

Okey, guys, got it, issue done, I can take the value from input field till RFC...

Regards,

Former Member
0 Kudos

Shah,

Refer <a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/761eba66-0401-0010-b982-d5f5bd9e8f90">Linking RFC to Webdynro</a> to understand it better.

You may also refer <a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/49f2ea90-0201-0010-ce8e-de18b94aee2d#15">Accessing ABAP Functions in WebDynpro</a>.

Bala

Former Member
0 Kudos

thanks Bala,

I will go throught these docus.....

I have to place f4 help also over the input field....

Any way, will get back to you, after going through these links ...:-)

Regards,