Skip to Content
0

How to find the actual type of generic type?

Feb 08, 2017 at 03:24 PM

63

avatar image

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

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

2 Answers

Best Answer
Raymond Giuseppi
Feb 08, 2017 at 03:45 PM
1

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

Regards,
Raymond

Share
10 |10000 characters needed characters left characters exceeded
Horst Keller
Feb 08, 2017 at 05:09 PM
0

For simple cases, you can use DESCRIBE FIELD still.

Share
10 |10000 characters needed characters left characters exceeded