Skip to Content
avatar image
Former Member

How to find the actual type of generic type?

I have created a importing parameter with type 'any' in one of the method interface.

Consumer can pass structure or table to this importing parameter.

Later, I am assigning this importing parameter to field symbol to read data.

Since, I cannot loop this field symbol if someone is passing structure to this - I want to check if generic type converted to table or structure after data assignment.

data type any (method importing parameter)

field-symbols: <fs> type any.

assign data to <fs>.

Regards,

Naveen

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Best Answer
    Feb 08, 2017 at 03:45 PM

    Use RTTS classes (ref. RTTS - Runtime Type Services)

    Regards,
    Raymond

    Add comment
    10|10000 characters needed characters exceeded

  • Feb 08, 2017 at 05:09 PM

    For simple cases, you can use DESCRIBE FIELD still.

    Add comment
    10|10000 characters needed characters exceeded