Today, I want to show you a cool class in order how to check fields in a table or fetching the complete list of components in a structure/table. Also, you are even able to create a global structure or table dynamically with this class.
In the following snippet, you see a simple approach, how to check for a ZZ field, which was extended via an APPEND structure in the table EVBS (IS-U premises). This allows you to check first if the field is available in the table before you do an update or getting the value from it.
IF cl_rebf_ddic_tabl=>exists_field(
id_name = 'EVBS'
id_fieldname = 'ZZANYFIELD'
) EQ abap_true.
" Do something with this field...
ENDIF.
This was a brief introduction in this class to highlight you the possibilities within SAP ABAP.
Leave a Reply