Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

CL_ABAP_ELEMDESCR returns incorrect help_id for dobj types

Former Member
0 Kudos

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.

1 ACCEPTED SOLUTION

franois_henrotte
Active Contributor
0 Kudos

the DESCRIBE statement does not give exactly the help-id, it gives the definition of field in form TABNAME-FIELDNAME

for class CL_ABAP_ELEMDESCR, I agree to say that HELP-ID attribute is not very useful !

in fact help-ids can be found in table DD04L for elements and in DD35L for fields of a table - those are the only reliable sources for this piece of information !

1 REPLY 1

franois_henrotte
Active Contributor
0 Kudos

the DESCRIBE statement does not give exactly the help-id, it gives the definition of field in form TABNAME-FIELDNAME

for class CL_ABAP_ELEMDESCR, I agree to say that HELP-ID attribute is not very useful !

in fact help-ids can be found in table DD04L for elements and in DD35L for fields of a table - those are the only reliable sources for this piece of information !