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: 

Dynamic Table or Ref type in RFC parameters

Former Member
0 Kudos

Hello All,

I am searching for possibilities for creating table with dynamic field size in RFC.

But as it gives following message when I use Ref as table field.

"No reference types are allowed for RFC" .

I have requirement to get output fields values of only those  which are in mentioned in input.

As of  in standard RFC "RFC_READ_TABLE" is controlling output fields by FIELDS table

But what I am looking for is if I am giving 2 field in input then output table's size should be of  total size of 2 fields in input.

Means the size is all depends on input fields.

The other way, I think,  is a table field of string type.

So at time of actually value is assigned to that field the size would be decided .

Appreciate any help.

Regards.

2 REPLIES 2

Sandra_Rossi
Active Contributor
0 Kudos

I understand the technical issue you have (a parameter containing TYPE REF TO is forbidden in an RFC-enabled function module), and the technical workaround you propose (using a parameter of type XSTRING or STRING for containing anything of any size), so you could go for data serialization using the identity transformation (CALL TRANSFORMATION ID SOURCE dobj = dynamicdobj RESULT XML xstring).

0 Kudos

" Dynamically create itab   CREATE DATA ldo_data TYPE TABLE OF (id_tabname).   ASSIGN ldo_data->* TO .   SELECT * FROM (id_tabname) INTO TABLE UP TO 100 ROWS.