cancel
Showing results for 
Search instead for 
Did you mean: 

RFC_READ_TABLE uses wrong field length?

former_member192763
Participant
0 Kudos

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?

Thanks

Massimo

Accepted Solutions (0)

Answers (1)

Answers (1)

former_member192763
Participant

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