Skip to Content
0
Jan 22, 2014 at 02:42 PM

From generic CL_WD_UIELEMENT to datatype

78 Views

Hi all gurus,

need help on this simple task.

In a WDDOMODIFYVIEW routine, I'm looping over some customer fields which are - specifically - inputfields, checkboxes, and so on... Generically, on each loop pass, a field is processed and the reference is stored into a generic typeref to CL_WD_UIELEMENT object.

Now; I want to perform a specific action only for those fields which are DATS(8).

In order to do this, I should find a way that, given a CL_WD_UIELEMENT data reference, returns me the "inner" data type of the field.

This means that if I define a data element which is simply a DATS renamed, I should be able to recognize it as DATS.

Is there any facility to do this?

So far I noticed that cl_abap_typedescr=>describe_by_data( ) could be what I'm looking for... but I'm not dealing with a datastructure; I'm looping over CL_WD_UIELEMENT references.

Any help will be appreciated. 😊