Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

CL_ABAP_ELEMDESCR returns incorrect help_id for dobj types

If runtime type services are used to retrieve the help_id of a dobj type (dbtab-field), the data element type is returned instead of the type dbtab-field. The describe statement provides a work-around since it works correctly, but data objects created from the data descriptor lose the information completely. Also, GET_DDIC_OBJECT seems to return the wrong information in the TABNAME and FIELDNAME fields.

Can anyone tell me if I am just missing something?

e.g.

*Use describe statement to find the help_id.

data foo like T100-ARBGB.

data descHelpID type string.

describe field foo HELP-ID descHelpID.

**********************************************************

*Now we use RTTS to find the help_id.

data elemDescr type ref to CL_ABAP_ELEMDESCR.

data rttsHelpID type string.

data myX031L type standard table of X031L.

elemDescr ?= CL_ABAP_TYPEDESCR=>DESCRIBE_BY_DATA( foo ).

rttsHelpID = elemDescr->help_id.

if elemDescr->IS_DDIC_TYPE( ) = abap_True.

myX031L = elemDescr->GET_DDIC_OBJECT( ).

endif.

**********************************************************

write: / `help_id via describe: `, descHelpID.

write: / `help_id via RTTS: `, rttsHelpID.

break-point.

Tags:

Helpful Answer

by
Not what you were looking for? View more on this topic or Ask a question