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

call function ... destination

Former Member
0 Likes
473

Hi everyone

I have a process to call an external system. I send some information in tables and I need to receive a numeric value. How can I do it??

This is the code of my RFC

  FUNCTION ZLETRARFWBI001.
*"----------------------------------------------------------------------
*"*"Interfase local
*"  TABLES
*"      TI_FECHAS STRUCTURE  ZLETRADATES OPTIONAL
*"      TI_TRANS_PLAN_PT STRUCTURE  ZLETRATPLST
*"      TI_LOADS STRUCTURE  ZLETRATKNUM OPTIONAL
*"  CHANGING
*"     VALUE(LINEAS) TYPE  IW_NOLINES
*"----------------------------------------------------------------------

ENDFUNCTION.

And this is the code of my call to the RFC

  CALL FUNCTION 'ZLETRARFWBI001' destination VL_DEST
    TABLES
      TI_FECHAS  =  TI_FECHAS
      TI_TPLST   =  TI_TPLST
      TI_LOADS   =  TI_LOADS
    CHANGING
      LINEAS     = VL_LINEAS
    EXCEPTIONS
      system_failure        = 1  MESSAGE VL_MESS
      communication_failure = 2  MESSAGE VL_MESS.

Can anyone help me please.

Thanks & Regards

David

3 REPLIES 3
Read only

Former Member
0 Likes
421

hi,

Yes this is the way to RFC funtion module.. destination to need to give RFC connection to the target sytem.

Rgs

Nagaraju

Read only

Former Member
0 Likes
421

Hi,

In SE37 write the code to get the Numeric value, you can write that in this RFC enabled function module

Regards

Sudheer

Read only

Former Member
0 Likes
421

This is the CORRECT code of my RFC

FUNCTION ZLETRARFWBI001.

*"----


""Interfase local

*" IMPORTING

*" VALUE(LINEAS) TYPE IW_NOLINES

*" TABLES

*" TI_FECHAS STRUCTURE ZLETRADATES OPTIONAL

*" TI_TRANS_PLAN_PT STRUCTURE ZLETRATPLST

*" TI_LOADS STRUCTURE ZLETRATKNUM OPTIONAL

*"----


ENDFUNCTION.

And this is the CORRECT code of my call to the RFC

CALL FUNCTION 'ZLETRARFWBI001' destination VL_DEST

EXPORTING

LINEAS = VL_LINEAS

TABLES

TI_FECHAS = TI_FECHAS

TI_TPLST = TI_TPLST

TI_LOADS = TI_LOADS

EXCEPTIONS

system_failure = 1 MESSAGE VL_MESS

communication_failure = 2 MESSAGE VL_MESS.