cancel
Showing results for 
Search instead for 
Did you mean: 

RFC IN WEB DYNPRO

Former Member
0 Kudos

Hi!

I am very new to this section. My task is to pass and retrieve data from a FM to web dynpro. I have created a FM with two import parameters that i want these data to be inserted in DB table. i have also created the model for this FM in Web Dynpro and i have done the mapping between the Model view Controller . I need some help with Java source code to pass the values from the web dynpro screen to RFC. where should i place the code? Could you please provide me with a sample code? i would also need sample code for retrieving data from an RFC to web dynpro.

Thanks in advance.

I will reward with points in any useful answers.

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Kudos

Hi Murtuza!!

Thanx for your answer!!

This code should be in the component's controller implementation inside the wdInit method?????? Or in the view's implemetation??

Former Member
0 Kudos

Hi,

It's better that you create a custom method in controller and place the code there.

Remember to replace IPrivate with IPublic.

Call this controller's method from view using wdThis.wdget<controllername>().<methodname>(); on some action of a button or other UI element.

Regards,

Murtuza

Former Member
0 Kudos

Dear experts,

thank you for your answers, but my problem is the java coding not the web dynpro configuration.

Please help!

Former Member
0 Kudos

Hi Iria,

1. To execute BAPI create an element of the input node of your BAPI, set your 2 input parameters and bind it to the input node.

say if name of your input node is input

IPrivate<viewname>.IinputElement element = wdContext.nodeInput().createInputElement();

element.set<parametername1>("<value>");

element.set<parametername2>("<value>");

wdContext.nodeInput().bind(element);

2. Last step is to execute BAPI

try

{

wdContext.currentInputElement().modelObject().execute();

//say name of your output node is output

wdContext.nodeOutput().invalidate();

}

Bind your output node the one that is found inside the input node to table or other UI element so that you can see the result of the BAPI after its execution.

Regards,

Murtuza

Former Member
0 Kudos

Hi,

Go through the following document which gives you step by step procedure to pass the input, to execute RFC & to get the result from RFC.

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_member201361
Active Contributor
0 Kudos

hi,

Please go through this model tutorials .

[http://help.sap.com/saphelp_nw04/helpdata/en/91/9c2226df76f64fa7783dcaa4534395/frameset.htm]

Thanks and reagrds

Fazal B

Former Member
0 Kudos

Hi,

Refer to the following link which clearly explains you the steps required.

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

/docs/DOC-8061#15 [original link is broken]

Thanks n Regards,

Jhansi Miryala