# Fetch fields from table or structure in ABAP SAP

SAP HANASAPSAP Basis

If you need to identify the fields and number of fields in a structure, then you should use runtime type services. Using runtime type services makes more sense in this case as if we have some data in our environment, then it’s not ideal to call database for fetching the same.

DATA(structure) = VALUE <your structure>( )
DATA(Fields = LINES(Descriptor ->components ) 
SELECT COUNT(*) INTO @data(count)
AND AS4LOCAL = 'A'