Skip to Content
Technical Articles

How to find whether a Transaction Code is Created for a Table Maintenance Generator?

Introduction

In every SAP Project you work for you will have a Custom table which is defined by the SAP Technical Consultant and generally it starts with z or y or based on Project naming standard. Sometimes this Custom table needs to be maintained manually and it is always a great Practice to create a separate Transaction Code for Maintenance. When you come to an existing Project it is very hard to know whether a Transaction Code is created for the Table Maintenance Generator for a particular Custom table or Standard Table.

Solution

Suppose we want to know whether a Table Maintenance Generator and a Transaction Code is created for table ZAP_PARENT_ORGUN

Check Table Maintenance Generator created for a Table.

Go To SE16–>TVDIR

Now we enter Table name ZAP_PARENT_ORGUN as mentioned below

If you have an entry that means a Table Maintenance generator is created like below.

Now we will check whether a Transaction Code is created for this Table Maintenance Generator.

 

Go To SE16–>TSTCP

Now enter * ZAP_PARENT_ORGUN * as mentioned below and Execute

 

Wala here we get the Transaction Code

 

Conclusion

You can use this both in SAP ECC and SAP S/4 HANA

 

Below is the video version.

6 Comments
You must be Logged on to comment or reply to a post.
  • Hello, arghadip kar.

    I already automated this process.

     

    • From my report you can find:
    • table maintenance
    • table maintenance transaction
    • view maintenance
    • view maintenance transaction
    • cluster maintenance
    • cluster maintenance transaction
    *&---------------------------------------------------------------------*
    *& Report  ZTCODE_BY_TABNAME                                        *
    *&                                                                     *
    *&---------------------------------------------------------------------*
    *&    Autor Sikidin A.P.                                                                  *
    *&                                                                     *
    *&---------------------------------------------------------------------*
    
    report  ztcode_by_tabname                                        .
    
    
    parameters
      : tabname type tabname obligatory
      .
    
    data
          : lv_tcode type tcode
          , lt_dd26s type table of dd26s
          , lv_vclname  type vcl_name
          .
    
    field-symbols
                   : <fs_dd26s> type dd26s
                   .
    
    start-of-selection.
    
      write : / 'Table maintenance'.
      uline.
    
      perform get_tcode_by_tabname using tabname.
    
      write : /' '.
      write : /' '.
      write : /' '.
    
      uline.
      write : / 'View maintenance'.
      uline.
      select distinct viewname  as viewname
        into corresponding fields of table lt_dd26s
        from dd26s
        where tabname = tabname
        .
    
    
      loop at lt_dd26s assigning <fs_dd26s>.
        write : / 'View ', <fs_dd26s>-viewname.
        perform get_tcode_by_tabname using <fs_dd26s>-viewname.
      endloop.
    
      write : /' '.
      write : /' '.
      write : /' '.
      uline.
      write : / 'Cluster  maintenance'.
      uline.
    
      select vclname into lv_vclname
        from vclstruc
        where object  = tabname.
    
        write : / 'Cluster ', lv_vclname.
        perform get_tcode_by_tabname using lv_vclname.
      endselect.
    
      loop at lt_dd26s assigning <fs_dd26s>.
        select vclname into lv_vclname
          from vclstruc
          where object  = <fs_dd26s>-viewname.
    
          write : / 'Cluster ', lv_vclname.
          perform get_tcode_by_tabname using lv_vclname.
        endselect.
      endloop.
      uline.
    
    *&---------------------------------------------------------------------*
    *&      Form  get_tcode_by_tabname
    *&---------------------------------------------------------------------*
    *       text
    *----------------------------------------------------------------------*
    *      -->TABNAME    text
    *      -->TCODE      text
    *----------------------------------------------------------------------*
    form get_tcode_by_tabname using tabname
                              .
    
      data
            : lv_tcode type tcode
            , lv_text type ttext_stct
            , lv_param  type tcdparam
            .
    
      concatenate '%' tabname '%' into lv_param .
    
    
    
    
      select
            tstcp~tcode
            tstct~ttext
      into (lv_tcode, lv_text)
      from
      tstcp inner join tstct on
                 tstcp~tcode = tstct~tcode
      where
             tstcp~param like lv_param
      .
    
        write : / lv_tcode, lv_text.
      endselect.
    endform.                    "get_tcode_by_tabname