Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
DATA(lo_stru1) = CAST cl_abap_structdescr( cl_abap_typedescr=>describe_by_name( 'VEKPVB' ) ).
DATA(lo_stru2) = CAST cl_abap_structdescr( cl_abap_typedescr=>describe_by_name( 'E1EDL37' ) ).
DATA(lt_components1) = lo_stru1->get_components( ).
DATA(lt_components2) = lo_stru2->get_components( ).
DATA(lt_list1) = lo_stru1->get_ddic_field_list( p_including_substructres = abap_true ).
DATA(lt_list2) = lo_stru2->get_ddic_field_list( p_including_substructres = abap_true ).
DATA(lv_count) = 0.
LOOP AT lt_list1 INTO DATA(ls_list1).
IF line_exists( lt_list2[ fieldname = ls_list1-fieldname ] ).
lv_count = lv_count + 1.
WRITE: / ls_list1-fieldname.
ENDIF.
ENDLOOP.
WRITE: / lv_count, 'found'.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment