Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 1

" firstly declare the Local Type and the Create internal table with

this Ty
example
types: begin of ty_s070,
xyz type char40,
abc type char40,
end of ty_s070.
*******************

declaration

data : L_STRUC TYPE REF TO CL_ABAP_STRUCTDESCR,


L_TYPEDESC TYPE REF TO CL_ABAP_TYPEDESCR,
IDETAILS3 TYPE ABAP_COMPDESCR_TAB,
XDETAILS3 TYPE ABAP_COMPDESCR,
*******************
declaration
" by this class we read the structure and also get the data type and length "
"of data element
CALL METHOD CL_ABAP_STRUCTDESCR=>DESCRIBE_BY_NAME
EXPORTING
P_NAME = 'TY_S070'
RECEIVING
P_DESCR_REF = L_TYPEDESC.
L_STRUC ?= L_TYPEDESC.
IDETAILS3[] = L_STRUC->COMPONENTS.

You might also like