Sunday, December 26, 2010
This program displays any program source code in ALV list display using function module REUSE_ALV_LIST_DISPLAY.

REPORT ztest_program.

DATA:
      BEGIN OF it_source_code OCCURS 0,
        data(500) TYPE c,
      END OF it_source_code.
TYPE-POOLS:
      slis.
DATA:
      it_fieldcat TYPE slis_t_fieldcat_alv,
      wa_fieldcat LIKE LINE OF it_fieldcat.

PARAMETERS:p_name(30) TYPE c.

START-OF-SELECTION.
  READ REPORT p_name INTO it_source_code.
  wa_fieldcat-fieldname = 'DATA'.
  wa_fieldcat-tabname   = 'IT_SOURCE_CODE'.
  wa_fieldcat-seltext_m = 'Source code'.
  wa_fieldcat-outputlen = '500'.
  APPEND wa_fieldcat TO it_fieldcat.
  CLEAR  wa_fieldcat.
  CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
    EXPORTING
      i_callback_program = sy-repid
      it_fieldcat        = it_fieldcat
    TABLES
      t_outtab           = it_source_code.

0 comments:

Post a Comment

Your useful comments, suggestions are appreciated.Your comments are moderated.

Followers

Contact Form

Name

Email *

Message *

Web Dynpro ABAP Book

An SAP Consultant

Follow US


Want to Contribute ?

If you are interested in writing about the new stuff you learn everyday while working, please write to the.sap.consultants@gmail.com.

Click on Contribution for more details.