on 07-12-2005 12:41 AM
I created an abap routine call Get_BPList. It does a very simple select and brings back 3 fields. I tested the function module and it works ok.
I just want to execute it in dynpro and fill a dropdown list
I created a model and pointed it to the RFC ok and it generated a model. My problem is that my RFC is very simple on the ABAP side. It has no inputs or outputs, just one table (BPList). The model it generated has three nodes ZBP_Getlist_Input, ZBP_Getlist_Output, and ZBP_List.
Which one do I use in the context mapping and how do I execute the RFC?
Appreciate the help and will award points...
Regards,
Tom
Hi Thomas
Create a custom controller , right click it and apply service controller pattern , choose the ZBP_Getlist_Input for binding . This will generate the necessary code for you which includes an execute method. Attach this execute method to an action in the view.
check doco
<a href="
Regards
Pran
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Thomas,
You can make use of Templates in WebDynpro which will generate the code for exeuting the RFC !!!
1. Right click on the componentController ->Appply->Templates->Service Controller.
Select the ModelNode and click next and check the checkbox "generatemethod"
2. This will create a method in componentController.
You can call this method from the view.
Regards, Anilkumar
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Thomas,
Please check out the following link it will answer all your queries regarding RFC's and how to work with them.
https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/webas/webdynpro/li... rfc to web dynpro.pdf
Regards,
Vijith
Hi Thomas,
Follow the steps:
1. Create Model for RFC.
2. Add this model in Used Models.
3. Open Data modeler by double clicking on yoor Component.
4. Create link between your component and model.
5. Drag ZBP_Getlist_Input from model to component controller.
6. Check all nodes under it.
7. Make one method in Component controller named ExicuteBapi.
8. Write following code in it.
try{
ipublic<componetn name>.iZBP_Getlist_Input ele = wdcontext.createZBP_Getlist_Inputelement(new ZBP_Getlist_Input());
wdcontext.nodeZBP_Getlist_Input ().bind(ele);
wdcontext.currentZBP_Getlist_InputElement().modelobject().execute();
wdcontext.nodeOutput().invalidate();
}
catch(Exception e)
{
}
9. Now call this method from your view whenevder required.
Regards,
Bhavik
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi,
1.Add your model to the used models.
2.Go to data modeler and map the model to the controller.
3.In the controller init
ZBP_Getlist_Input inp = new ZBP_Getlist_Input();
wdContext.nodeZBP_Getlist_Input().bind(inp);
//within try catch
wdContext.currentZBP_Getlist_InputElement().modelObject().execute();
And go through the sample applications available in SDN,
Regards
Bharathwaj
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
89 | |
10 | |
10 | |
9 | |
6 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.