Get structure names used in a database table

Aim:
To get the structure name of the .INCLUDE structures used in a database table.
Tip: Navigate to PRECFIELD field in the output to see the Structure name of the include

Report:
REPORT zag_test_extract_structures.

PARAMETERSp_table TYPE tabname16 DEFAULT 'EKKO'.

DATAlt_fields TYPE TABLE OF dd03p,
      lv_name   TYPE ddobjname.
DATA(lref_structypecl_abap_typedescr=>describe_by_namep_table ).
lv_name p_table.

CALL FUNCTION 'DDIF_TABL_GET'
  EXPORTING
    name          lv_name
  TABLES
    dd03p_tab     lt_fields
  EXCEPTIONS
    illegal_input 1
    OTHERS        2.
IF sy-subrc 0.
  CALL METHOD cl_demo_output=>display_data
    EXPORTING
      value lt_fields
      name  'Navigate to PRECFIELD field to see the Structure name of the include'.
ELSE.
  WRITE 'Error'.
ENDIF.


<End of Document>

Comments

Post a Comment

Popular posts from this blog

EWM PPF Trigger the existing PPF Action through Custom Program

ABAP 7.5 - FILTER Statement

Useful Transaction Codes / Tools in OData ABAP Service / SAP UI5/ SAP Fiori