cancel
Showing results for 
Search instead for 
Did you mean: 

get the rfc destination from PI

Former Member
0 Kudos

Hi all,

We are using the standard function modul  'rfc_read_table' in PI , to get data of the table using an RCF call  . The table that we want to get its data, has the same name in SRM, ECC, and BI.

CALL FUNCTION 'RFC_READ_TABLE'
      DESTINATION ????

      EXPORTING
        query_table = 'Z_TABLE'

*       DELIMITER   = ' '
*       NO_DATA     = ' '
*       ROWSKIPS    = 0
*       ROWCOUNT    = 0
      TABLES
*       OPTIONS     =
*       FIELDS      =
        data        = wt_data.

The question is , how could we determine the destination ( is it ECC or Bi or SRM ) ??

Cordialy

Accepted Solutions (0)

Answers (1)

Answers (1)

xavisanse
Active Participant
0 Kudos

i supose that you are using an abap mapping, and you are in SAP PI stack abap.

In this case u should call it

call function 'RFC_READ_TABLE' DESTINATION 'RFC_ECC'

where RFC_ECC is an entry at SM59 as a type 3.

after that, you should call again the function as mentioned but for BI and after for SRM.

You should have three different RFCs, one for each system,

Former Member
0 Kudos

Hi,

Thak you for your quiq response.

Ok .I will create the 3 entries in sm59. so in this case, only the correct rfc call ( Ecc, or SRM or BI ) will make my table wt_data full?

Other question , now I am in dev envirenemnt so the entry destination will be different from each envirenmemnt, ( dev, intgration, production)

For exemple for ecc : RFC_ECC_DEV, or RFC_ECC_INT, RFC_ECC_PROD

Thank you

xavisanse
Active Participant
0 Kudos

you can use a CASE  with  sy-sapsid (or something like that).

for example:

data: l_rfc type string. " i don't know what kind of type should be.

case ( sy-sapsid ).

when 'PID'.

l_rfc = 'RFC_ECC_DEV'.

when 'PIP'.

l_rfc = 'RFC_ECC_PROD'.

endcase.

CALL FUNCTION 'BLABLABLA' DESTINATION l_rfc.

Reward points

xavisanse
Active Participant
0 Kudos
Ok .I will create the 3 entries in sm59. so in this case, only the correct rfc call ( Ecc, or SRM or BI ) will make my table wt_data full?

I forget to answer this. Yes, it's correct. (BTW, i never used this FM)

Former Member
0 Kudos

Thank you,

In Options parametre of the FM rfc_read_table, how could we use it to limit records that we get ?? as where clause

xavisanse
Active Participant
0 Kudos

i don't know

suman_saha
Contributor
0 Kudos

Hi,

There is a field named "OPTIONS" where you can put the condition i.e. where clause and you can limit the number of rows using ROWCOUNT field.

Suman