Application Development 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: 

Meaning of the code call 'RFCControl' id 'CODE' field '?'

0 Kudos

Hi All,

Can somebody tell me the meaning of the below code.

call 'RFCControl' id 'CODE' field '?'. "#EC CI_CCALL


Regards,

Rajesh.

5 REPLIES 5

Former Member
0 Kudos

Hi Rajesh,



CALL - Call a System Function: 

This statement is for internal use only.
It must not be used in application programs.

Note

Where possible, you should use kernel methods instead of system functions.

Syntax

CALL cfunc.

Addition:

... ID id1 FIELD f1 ... ID idn FIELD fn

Effect

Calls the system function cfunc. The relevant function must be entered in the sapactab.h file. If you change or recreate a function, you have to compile and link the ABAP kernel again. For this, you need the C source code files.
Normally, external programs should be called using RFC with CALL FUNCTION ... DESTINATION.

Addition

... ID id1 FIELD f1 ... ID idn FIELD fn

Effect

Passes fields to the called program by reference. With ID id1, you specify the name of a formal parameter, and with FIELD f1 the relevant field from the ABAP program. If a formal parameter expects an internal table, the latter is passed in the form FIELD tab[].

Example

DATA RESULT(8).
CALL 'MULTIPLY' ID 'P1'  FIELD '9999'
                ID 'P2'  FIELD '9999'
                ID 'RES' FIELD RESULT.

Note

With some critical C functions, the system automatically performs an authorization check. If the user does not have the appropriate authorization, a runtime error occurs. You can check the authorization with the function module AUTHORITY_CHECK_C_FUNCTION

Hope it Helps...

Thanks,

Vijay SR

0 Kudos

Hi Vijay,

Actually this is a standard code in the Smartform function module, where the above code is getting called and it is returning sy-subrc as '0' when i'm calling from SAP, but when i'm calling from webservice it is returning SY-SUBRC as  '1'. Infact the comment that is there in the standard code is * GUI connection enabled?. So, now can you explain me what exactly the meaning of this code. Below is the code written in standard. I am not getting print when i am calling from webservice, but the print is coming when i am calling from SAP. So, can you explain me.

* GUI connection enabled?
   call 'RFCControl' id 'CODE' field '?'. "#EC CI_CCALL
   check sy-subrc = 0.

* ok
   p_gui_connection = c_true.


Regards,

Rajesh.

sivaprasad_paruchuri
Active Participant
0 Kudos

hi

below link might be use full for u..

http://scn.sap.com/thread/733968

regards,

SIva

0 Kudos

Hi Siva,

I've gone through your link, how to check with this GUI, because that piece of code is checking whether GUI is enabled or not? So, where i have to check this whether GUI is enabled or not?

Regards,

Rajesh.

Former Member
0 Kudos

Hi Rajesh,

         Upto my understanding ,

Whenever we create a smartform it will create Function Module.So We can call the FM in the driver program for calling the smartform...

Funtional Module having two type ,.. ie.. Normal FM and Remote functional call enabled ...

Where Ordinary FM which will not support for getting datas from other services... where RFC enabled FM will take the data from Other services...and BAPI also there...

So in ur standard program it is checking whether it is Remote enable FM , so it fails so it giving subrc as 1.

The FM genetated in the standard is Normal Functional module not RFC enabled...

If you want to check

Goto T.Code ----> SMARTFORMS--->Give Smartform Name---->execute or press F8---->it will show Functional module name---->press Display--->click attributes Tab--->there u will see radio button whether it is normal or RFC enabled...

i hope this answer will be ok for you...

Thanks ,

Vijay SR