Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

RFC Function Module

Former Member
0 Likes
1,232

Hi,

I have a RFC function module in CRM and want to call use it in R/3 . Could you pls give me some steps in order to progress.

Thanks,

Vind.

11 REPLIES 11
Read only

Former Member
0 Likes
1,183

Hi

Check if R/3 connections in transaction SM59 contain the CRM destination...

if not exist you must create it .

In your code:

First you must read the RFC destination.


 crmdest TYPE rfcdest.
 crmdest = cl_crm_erp_il=>get_rfc_destination( ).

after you call the function as follow:


CALL FUNCTION 'function' DESTINATION crmdest
 IMPORT
     ..
 EXPORT
   ..

regards Marco

Read only

0 Likes
1,183

Hi Marco,

When i have put the below code its saying cl_crm_erp_il=>get_rfc_destination( ). is unknow.

Regards,

Vind

Read only

0 Likes
1,183

Hi vind

in table RFCDES you can find all the RFC connection

RFCTYPE = 3 for read the R/3 connection

Marco

Read only

0 Likes
1,183

HI,

Before calling the RFC connection must create it using transaction SM59 in connection abap-> create. Then you need to make the connection test.

Regards.

Read only

0 Likes
1,183

Hi Eric,

The connections are already there in R/3 SM59 ..My code is as below ...its giving me an error that z_rfc which is in CRM not found.

DATA: crmdest TYPE rfcdest.

DATA: url type string.

crmdest = 'CLT800'.

CALL FUNCTION Z_RFC DESTINATION crmdest

IMPORT

ID = ' '.

EXPORT

EP_URL = url.

Regards,

Vind

Read only

0 Likes
1,183

hi vind

modify


CALL FUNCTION Z_RFC DESTINATION crmdest

with


CALL FUNCTION 'Z_RFC' DESTINATION crmdest

regards

Marco

Read only

0 Likes
1,183

besides you must try to read the crmdest dinamically

because into the variuous system the name chenge.....

regards

Marco

Read only

0 Likes
1,183

Hi,

The function exists on the system destination?

Enrico

Read only

0 Likes
1,183

Hi,

It does exit in CRM just its throwing an error with 'Data error (invalid data type 6) in a Remote Function Call" for some reason just wondering why it is ??

Regards,

Vind

Read only

0 Likes
1,183

hi vind

Check if data type of r3 are equals of CRM

Marco

Read only

0 Likes
1,183

Hi

then working?

Marco