Call Standard Table Display (SE16) from Report

By | October 21, 2008 | Table Maintenance | 8,452 | 0

Eloborates the easiest way to call the Standard table display (SE16) from a Program

Sometimes, we need to call the Standard Table display (SE16) from our report program. In option of this we can create a Small ALV program using the Tutorials > SALV Table Display .

To call the Standard Table display, we can Submit the underlying program from our report. SAP creates a table dispaly report for all the database tables which can be viewed using the SE16. So, We can find that program name and Submit the program to call the Standard Table Display. This option does not seem to be the easiet way, as we have to find the underlying report name to call the SE16.

Let’s explore another option. Trasaction SE16 internally calls the function module RS_TABLE_LIST_CREATE to generate the output. Why not we also call that from our program to call the SE16.

Here is the code snippet to call the SE16 using above said FM:

*& Describes a way to call the SE16 with the Selection from report.
REPORT  ztest_tmp.
  t_sel-selname 'I1'.
  t_sel-kind    ' '.
  t_sel-sign    'I'.
  t_sel-option  'BT'.
  t_sel-low     '0000001000'.
  t_sel-high    '0000002000'.
  APPEND t_sel.
  CLEAR  t_sel.
  t_sel-selname 'I2'.
  t_sel-kind    ' '.
  t_sel-sign    'I'.
  t_sel-option  'BT'.
  t_sel-low     '20081001'.
  t_sel-high    sy-datum.
  APPEND t_sel.
* Function module to call the SE16 list
      table_name               'VBAK'
      action                   'ANZE'
*     WITHOUT_SUBMIT           = ' '
*     GENERATION_FORCED        =
*     NEW_SEL                  =
*     NO_STRUCTURE_CHECK       = ' '
*     DATA_EXIT                = ' '
*     PROGNAME                 =
      seltab                   t_sel
      table_is_structure       1
      table_not_exists         2
      db_not_exists            3
      no_permission            4
      no_change_allowed        5
      OTHERS                   6
  IF sy-subrc <> 0.
    MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
             WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.

It will generate an output somewhat like:

Disadvantages of SE16:
As we can see in the example code, instead of the Field name in the Selection Criteria table (T_SEL) we have to pass the Select Option name of the table selection screen. E.g. I1 for the Sales Document (VBELN) and I2 for the Creation Date (ERDAT). Sometimes, this Select-options may not present on the Selection screen when we call the SE16 and in that case we will not get the accurate result.

So, we will explore on how to call SE16N for the Standard Table display.


Like It? Share!!

Don't miss an Update

Get notified of the new post, right into your inbox

Naimesh Patel{273 articles}

I'm SAP ABAP Consultant for more than a decade. I like to experiment with ABAP especially OO. I have been SDN Top Contributor.
Follow :

Explore all of his 273 articles.

Load comments

Comments on this Post are now closed. If you have something important to share, you can always contact me.

You seem to be new here. Subscribe to stay connected.