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

PB in RFC function declaring table as CHANGING

frederic_r
Participant
0 Likes
675

Hi all,

I wrote an RFC function to get data between 2 SAP systems. I've to transmit to this function select-options felds. Therefor I've created a changing parameter in the function I_LFDAT type RSPARAMS_TT which is a table type with structure RSPARAMS.

I did it by this way as 'Tables are obsolete' in RFC functions.

My problem is that by calling the function I've a dump saying ' (ungültiger Datentyp 17)'. This means the parameter is not correct.

I checked anything and the table I'm sending has the same structure as the receiving parameter

thanks in advance for your help

4 REPLIES 4
Read only

Former Member
0 Likes
613

Hi,

Are you changing the select-option table ? or else use it in the table parameter.

Is I_LFDAT is select option of date then use this RANGE_DATE structure .

Regards,

Madhukar Shetty

Read only

0 Likes
613

No I'm not changing the select option table but I've another table in wich I write some records and send them back to the calling system.

I put all the tables in the TABLE tab instead of the CHANGING tab and it works... but by saving the FM I've the message 'TABLES are obsolete'...

Read only

0 Likes
613

Hello Fred

I am not really a fan of CHANGING parameters in fm's.

Since you have the table type RSPARAMS_TT I would recommend to use the following approach:



DATA:
  lt_seloptions   TYPE rsparams_tt.  " itab with select-options

" fm signature with 2 parameters:
...
  IMPORTING
    it_selopts = lt_seloptions
...
  EXPORTING
   et_selopts = lt_seloptions
...

The RFC-fm gets IT_SELOPTS as input, can change them, and returns them as EXPORTING parameter ET_SELOPTS.

Regards

Uwe

Read only

Former Member
0 Likes
613

HI

In RFC function module, did you change paramters..have you tried with it