on 05-02-2006 10:49 AM
Hi!All
How to call RFC on click of button?
Regards
Parth
Hi Partha,
The main thing you will have to consider is the creation of the JCO destinations for the application. These are maintained in the webdynpro content administration.
After creating the model in the webdynpro project, you need to go to the url http://<host>:<port>/webdynpro/welcome/ and create the JCO destinations you gave while creating the BAPI model. There they will come with red colored icons, after success creation them they will become green.
After that you need to initialize the input elements in the code and simply execte the bapi in some action method of the button.
Reply me if you need some more help.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
HI,
1) Create an Action say onActionButtonClick
2) create a method executeXYZRFC in this method write the following code
Bapi_User_Getlist_Input inpUser = new Bapi_User_Getlist_Input();
wdContext.nodeBapi_User_Getlist_Input().bind(inpinpUser);
try
{
wdContext.currentBapi_User_Getlist_InputElement().modelObject().execute();
}
catch(Exception e)
{
e.printStacktrace("Error while executing BAPI");
}
3) call the executeXYZRFC method in onActionButtonClick
Regards,
RK
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
please refer the step by step procedure.
https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/webdynpro/creating a web dynpro application accessing abap functions.pdf
You will have to complete some pre-requisite steps for the call to be successful.
Hope that helps.
Regards,
S.Divakar
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Partha,
U have to write the code onClick action.
Bapi_User_Getlist_Input inp = new Bapi_User_Getlist_Input();
wdContext.nodeBapi_User_Getlist_Input().bind(inp);
try
{
wdContext.currentBapi_User_Getlist_InputElement().modelObject().execute();
}
catch(Exception e)
{
wdComponentAPI.getMessageManager().reportException("Exception "+e,true);
}
Regards,
Vijay
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
93 | |
11 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.