Archived discussions are read-only. Learn more about SAP Q&A

FM to pop up and display a database tables contents?

Hello all,

Has anyone found a function module that has a database table as an input parameter that creates a pop-up of the database tables contents? POPUP_TO_SHOW_DB_DATA_IN_TABLE seemed like a good candidate but I couldn't get the function module to return the DB table contents.

I want to display the contents of a custom table at logon using the enhancement SUSR0001. The contents of the table are system messages.

We are creating this new functionality because the standard system message doesn't necessarily display the entries in the order we want the users to see these messages because of the three line limit in system messages.

Thanks

Bruce

Tags:
  • SAP Employee
replied

Check this sample program.....


report zrich_0002
       no standard page heading.


data: it001 type table of t001 with header line.
select * into corresponding fields of table it001
             from t001.

call function 'REUSE_ALV_POPUP_TO_SELECT'
  exporting
*   I_TITLE                       =
   I_SELECTION                   = space
*   I_ZEBRA                       = ' '
*   I_SCREEN_START_COLUMN         = 0
*   I_SCREEN_START_LINE           = 0
*   I_SCREEN_END_COLUMN           = 0
*   I_SCREEN_END_LINE             = 0
*   I_CHECKBOX_FIELDNAME          =
*   I_LINEMARK_FIELDNAME          =
*   I_SCROLL_TO_SEL_LINE          = 'X'
    i_tabname                     = 'T001'
    I_STRUCTURE_NAME              = 'T001'
*   IT_FIELDCAT                   =
*   IT_EXCLUDING                  =
*   I_CALLBACK_PROGRAM            =
*   I_CALLBACK_USER_COMMAND       =
*   IS_PRIVATE                    =
* IMPORTING
*   ES_SELFIELD                   =
*   E_EXIT                        =
  tables
    t_outtab                      = it001
* EXCEPTIONS
*   PROGRAM_ERROR                 = 1
*   OTHERS                        = 2
          .
if sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
*         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
endif.

Regards,

Rich Heilman

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question