cancel
Showing results for 
Search instead for 
Did you mean: 

calling RFC function

Former Member
0 Kudos

I am trying to call an RFC function in my bsp page. The RFC is to start a process chain. It gives me an error and I am not sure why. It tells me E_LOGID is not expected. Here is code:


if event->id = 'Update1' and event->event_type = 'click'.
      Call Function 'RSPC_API_CHAIN_START'
      DESTINATION 'NONE'
      importing
      I_CHAIN = 'NCNADMFULL'
      I_SYNCHRONOUS = ''
      I_SIMULATE = ''
      EXPORTING
      E_LOGID = 0.

      endif.

Accepted Solutions (1)

Accepted Solutions (1)

GrahamRobbo
Active Contributor
0 Kudos

Hi Uday,

well it seems that the function module RSPC_API_CHAIN_START does not expect and exporting parameter called E_LOGID.

Why dont you just use the templating options to insert sample code to call the RFC?

When I did this I got this code generated.

CALL FUNCTION 'RSPC_API_CHAIN_START'
  EXPORTING
    i_chain             =
*   I_T_VARIABLES       =
*   I_SYNCHRONOUS       =
*   I_SIMULATE          =
*   I_NOPLAN            =
* IMPORTING
*   E_LOGID             =
* EXCEPTIONS
*   FAILED              = 1
*   OTHERS              = 2
          .
IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
*         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.

So it seems you got your IMPORTING and EXPORTING options around the wrong way.

Cheers

Graham

Former Member
0 Kudos

Thanks. That was it, I had it the other way around.

Answers (0)