Search code examples
abaprtti

RTTI: Get length of a character column


My function module receives a table name and a column name at runtime.

I would like to get the length of the column: How many characters are allowed in the transparent table?

I used my favorite search engine and found RTTS.

But the examples in the documentation pass a variable to the RTTS method DESCRIBE_BY_DATA; in my case, I don't have a variable, I just have the type names in table_name and column_name.

How to get the length?


Solution

  • You don't need RTTS for this. You can Do one of this

    1. Select table DD03L with TABNAME and FIELDNAME
    2. Use Function DDIF_FIELDINFO_GET