on 03-08-2011 12:01 PM
Dear Experts,
I am a newbie in ABAP Webdynpro.
I am working on a requirement where I have a webdynpro component on ECC system.I need to call a RFC located on CRM system from my webdynpro component on the ECC system.
How do I do that ?? Please help.
Regards,
Mamai.
Hi Mamai,
RFC can be called from webdynpro same as how we are calling from normal abap.below is the code.
CALL FUNCTION 'Function module name' DESTINATION loc_dest
EXPORTING
contract_no = gv_tender
IMPORTING
zzremarks = gv_desc.
Regards,
Simi A M
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Thanks for your prompt response.
But since I am new to the technology,I am not able to follow should I do the context mapping n all like calling a RFC from the same system.
It would be of great help if you provide the step by step procedure or any links where I can follow how to call a RFC of a remote system onto my webdynpro component.
Regards,
Mamai.
Calling RFC from some other system is same as local except the difference is that you have to give destination name while calling.
And the regarding the method of calling it depends on your FM.
if it is big RFC with complex structure, you can create the service call for it with destination given as RFC desitination.
if it is simple straight forward RFC you can directly call it.
for creating RFC service call call use this method
1. Starting the Wizard
To start the wizard, position the cursor on the Web Dynpro component to be edited in the object list at the left margin of the
workbench window. Open its context menu and choose the entry Create->Service Call. The wizard is started and leads you
through the creation process.
Press Continue.
2. Choice of Controller
On the second dialog window of the wizard, you can choose whether the service call is to be embedded in an existing
controller or whether a new controller is to be created for this purpose. Service calls can only always be embedded in
global controllers u2013 that is, in the component controller or in additionally created custom controllers. It is not possible, to
embed service calls in view controllers.
a. Select radio button Use Existent Controller
b. Do not change the default entry for component: <CC name>
c. Enter for controller COMPONENTCONTROLLER
d. Press Continue.
3. Service Type and Service Selection
a. You now select, which service type should be used for this service call. Select radio button Function Module. Fill the
destination here. Press Continue.
b. Select the service: for Function Module enter <RFC name>. Press Continue.
4. The Required Methods and Context Elements
On the two subsequent dialog windows, default values are listed for giving names to the context nodes and attributes
required by the service call as well as to the required methods. The proposed names are based on the names of the
embedded service, but you can change them as required. However, heed the respective notes in the corresponding dialog
box.
a. Adapt Context: Select from Nodes/Attributes . Press Continue.
b. Specify Method Name: leave all entries as provided: Component: Controller: COMPONENTCONTROLLER Method: EXCUTE_ Press Continue.
5. Completing the Choice
When you have confirmed the last dialog box, the generation is triggered. Afterwards you now have the required methods
and contexts at your disposal for using them within your Web Dynpro component.
or if you want to call directly the use the call statement with destination
Hi Sabarjeet,
Thanks for the detailed and prompt response.
I have followed your steps in detail.
While mentioning the RFC name, I have called : BAPI_FLIGHT_GETLIST.
and destionation I have mentioned the remote system Id : S7R.
But I get the following error while executing the RFC :
Note
The following error text was processed in the system HE6 : RFC Exception COMMUNICATION_FAILURE with Message RFC destination S7R does not exist. Occurred
The error occurred on the application server hsdnt24s11_HE6_00 and in the work process 1 .
The termination type was: RABAX_STATE
The ABAP call stack was:
Method: EXECUTE_BAPI_FLIGHT_GETLIST of program /1BCWDY/A0Y1JBA3AWP44WKFQ27K==CP
Method: IF_COMPONENTCONTROLLER~EXECUTE_BAPI_FLIGHT_GETLIST of program /1BCWDY/A0Y1JBA3AWP44WKFQ27K==CP
Method: ONACTIONSEARCHFLIGHTS of program /1BCWDY/A0Y1JBA3AWP44WKFQ27K==CP
Method: IF_WDR_VIEW_DELEGATE~WD_INVOKE_EVENT_HANDLER of program /1BCWDY/A0Y1JBA3AWP44WKFQ27K==CP
Method: INVOKE_EVENTHANDLER of program CL_WDR_DELEGATING_VIEW========CP
Method: IF_WDR_ACTION~FIRE of program CL_WDR_ACTION=================CP
Method: DO_HANDLE_ACTION_EVENT of program CL_WDR_WINDOW_PHASE_MODEL=====CP
Method: PROCESS_REQUEST of program CL_WDR_WINDOW_PHASE_MODEL=====CP
Method: PROCESS_REQUEST of program CL_WDR_WINDOW=================CP
Method: EXECUTE of program CL_WDR_MAIN_TASK==============CP
Please tell me where I am going wrong.
Regards,
Mamai.
Hello,
To create RFC destination under SM59 follow the steps below. Also, have a look at the following links which might be helpful.
sm59-> R/3 connections -> create
1) give rfc destination name.
2) connection type - 3.
3) technical settings tab -> Target Host - give the Application Server name -> press enter.
the ip address automatially gets filled up.
4) Logon security tab -> Assign the Logon details
http://www.abap-tutorials.com/2010/04/02/creating-rfc-destinations/
http://help.sap.com/saphelp_nw04/helpdata/en/80/09680289c751429ab3b07ad2a61c10/frameset.htm
I hope this will resolve your problem.
Regards,
Gopal.
Edited by: Gopal Yarlagadda on Mar 9, 2011 3:00 PM
There is really nothing Web Dynpro specific about this activity. You would call the RFC exactly as you would in any standard program.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Roughly to say that you need to call the FM using the DESTINATION addition. However this destination system should have been defined in rfc destinations using transaction sm59.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
85 | |
10 | |
10 | |
10 | |
7 | |
6 | |
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.