[ABAP] Neue / obsolete Transaktionscodes für S/4 HANA suchen

* https://thinkdoforward.com/neue-transaktionen-mit-s-4hana-so-einfach-findest-zu-sie/
PARAMETERS: p_rel TYPE saprl DEFAULT '751'.
SELECT-OPTIONS: so_ta FOR lv_s_tcode.

START-OF-SELECTION.

  SELECT c~rel_name, c~s_tcode, c~t_tcode, tx~ttext
    INTO TABLE @DATA(it_prgn_corr2)
    FROM prgn_corr2 AS c
    INNER JOIN tstc AS t ON ( c~t_tcode = t~tcode )
    RIGHT OUTER JOIN tstct AS tx ON ( t~tcode = tx~tcode )
    WHERE c~rel_name >= @p_rel
      AND c~s_tcode IN @so_ta
      AND tx~sprsl = @sy-langu.

  SORT: it_prgn_corr2 BY s_tcode rel_name.


  TRY.
* SALV-Table
      DATA: o_salv TYPE REF TO cl_salv_table.

      cl_salv_table=>factory( IMPORTING
                                r_salv_table = o_salv
                              CHANGING
                                t_table      = it_prgn_corr2 ).

* Grundeinstellungen
      o_salv->get_functions( )->set_all( abap_true ).
      o_salv->get_columns( )->set_optimize( abap_true ).
      o_salv->get_display_settings( )->set_list_header( 'Überschrift' ).
      o_salv->get_display_settings( )->set_striped_pattern( abap_true ).
      o_salv->get_selections( )->set_selection_mode( if_salv_c_selection_mode=>row_column ).

      LOOP AT o_salv->get_columns( )->get( ) ASSIGNING FIELD-SYMBOL(<c>).
        DATA(o_col) = <c>-r_column.
        o_col->set_short_text( || ).
        o_col->set_medium_text( || ).
        o_col->set_long_text( |{ o_col->get_columnname( ) } [{ o_col->get_long_text( ) }]| ).
      ENDLOOP.

      o_salv->display( ).
    CATCH cx_root INTO DATA(e_txt).
      WRITE: / e_txt->get_text( ).
  ENDTRY.

[ABAP] Tabellen zu einer Transaktion auflisten

TYPES: BEGIN OF ty_data_item,
         tcode    TYPE tstc-tcode,
         ttext    TYPE tstct-ttext,
         pgmna    TYPE tstc-pgmna,
         tabname  TYPE d010tab-tabname,
         tabclass TYPE dd02l-tabclass,
         ddtext   TYPE dd02t-ddtext,
       END OF ty_data_item.

DATA: it_data TYPE STANDARD TABLE OF ty_data_item WITH DEFAULT KEY.

PARAMETERS: ptcode TYPE tstc-tcode DEFAULT 'MIGO'.
PARAMETERS: plang TYPE dd02t-ddlanguage DEFAULT 'DE'.

START-OF-SELECTION.

* Holt Transaktion, Programm zur Transaktion, verwendete Tabellen im Programm
  SELECT tstc~tcode, tstct~ttext, tstc~pgmna, d010tab~tabname, dd02l~tabclass, dd02t~ddtext
    FROM tstc
      INNER JOIN d010tab ON d010tab~master = tstc~pgmna
      INNER JOIN dd02l ON dd02l~tabname = d010tab~tabname
      INNER JOIN dd02t ON dd02t~tabname = dd02l~tabname
      INNER JOIN tstct ON tstct~tcode = tstc~tcode
      INTO CORRESPONDING FIELDS OF TABLE @it_data
      WHERE tstc~tcode = @ptcode
      AND dd02t~ddlanguage = @plang
      AND tstct~sprsl = @plang.

  SORT: it_data BY tabclass DESCENDING tabname.

  DATA: o_salv TYPE REF TO cl_salv_table.

  cl_salv_table=>factory( IMPORTING
                            r_salv_table = o_salv
                          CHANGING
                            t_table = it_data ).

  o_salv->get_functions( )->set_all( abap_true ).
  o_salv->get_display_settings( )->set_striped_pattern( abap_true ).
  o_salv->get_columns( )->set_optimize( abap_true ).

  o_salv->get_selections( )->set_selection_mode( if_salv_c_selection_mode=>row_column ).

  o_salv->display( ).