2008 Oct 23 10:45 AM
Hi experts!!,
I would like to know a class and the method that I pass the structure name and return all the description fields.
Thanks a lot
2008 Oct 23 10:48 AM
Hello Ana
Have a look at class CL_ABAP_STRUCTDESCR.
DATA: ls_knb1 TYPE knb1.
DATA: lo_typedescr TYPE REF TO cl_abap_typedescr.
DATA: lo_strucdescr TYPE REF TO cl_abap_structdescr.
DATA: lt_dfies TYPE ddfields.
lo_typedescr = cl_abap_structdescr=>describe_by_data( ls_knb1 ).
lo_structdescr ?= lo_typedescr.
lt_dfies = lo_structdescr->get_ddic_field_list( ).
" Or check public attribute: lo_structdescr->components for non-DDIC structures
Other useful RTTI classes are:
CL_ABAP_DATADESCR
CL_ABAP_TYPEDESCR
CL_ABAP_TABLEDESCR
CL_ABAP_CLASSDESCR
Regards
Uwe
2008 Oct 23 11:18 AM
Hi Ana,
alternatively, you can go directly in table DD03M, according you've set a data element for each of your structure fields, and not have used Predefined Type.
Regards,
N H
2008 Oct 23 3:47 PM
I do it with this function
CALL FUNCTION 'DDIF_FIELDINFO_GET'
EXPORTING
TABNAME = STR
LANGU = SY-LANGU
TABLES
DFIES_TAB = IT_TEXTOS.
Thanks!!
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |