Skip to Content

RFC_READ_TABLE uses wrong field length?

We are using RFC_READ_TABLE to read table data to a PC application. We selected this FM (also if not released for customer use) because our constraint is to avoid installing any custom code in the target SAP system, so we can't write our own FM.

Reading an amount field of type CURR, with a length of 13 and 2 decimal places, the function module places it in the output record (DATA table) reserving the internal length of 13. Unfortunately, the field has an output length of 16: if the field contains a huge amount (for example 13,345,678,123.45) the returned field content is *345678123.45.

This is due to line 134 of the FM , where TABLE_STRUCTURE-LENG is moved to the LENGTH_DST component of the internal table describing the field structure.

OUTPUTLEN should be used instead.

I wasn't able to find a Note about this. Is there anyone from SAP aware of this problem?



image.png (2.8 kB)
Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Nov 29, 2017 at 10:30 AM

    The problem is partially solved by the equivalent BBP_RFC_READ_TABLE function: it adds 1 character in output length where decimal places are >0

    Add comment
    10|10000 characters needed characters exceeded