1

I wanna have a table parameter in a RFC function module of type CGPL_TEXT1, which uses the domain type TEXT40, which is a char 40.

I tried to create it:

IT_PARTS_DESCRIPTION LIKE CGPL_TEXT1

But I keep getting this error

tables using like may only reference flat structures

I am also not able to use TYPE. If I do so, I get this error:

Flat types may only be referenced using LIKE for table parameters

Sandra Rossi
  • 11,934
  • 5
  • 22
  • 48
Niklas
  • 23,674
  • 33
  • 131
  • 170

2 Answers2

3

Don't go there. For RFC-enabled function modules, always use a structure as a line type for your table. The RFC protocol itself also supports unstructured tables, but many adapters don't. So you should

  • declare a data dictionary structure Z_MY_PARTS_DATA with a single field DESCRIPTION TYPE CGPL_TEXT2
  • declare a data dictionary table type Z_MY_PARTS_TABLE using this structure
  • use that table type in your function module.
vwegert
  • 18,371
  • 3
  • 37
  • 55
1

Look inside the dictionary for a table type which has only one column representing Your Text. If You cannot find it, just go the proper way and define a z structure and a z tabletype based on that structure. This is the proper way and I also prefer to use this ( even sometimes, when I would not really need it, i do this ).... because the structures sand table types can be documented.

icbytes
  • 1,831
  • 1
  • 17
  • 27