Skip to Content

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

Need a POP-UP which can display internal table data in ALV format

HI All,

I need to display INTERNAL TABLE values through a POP-UP. Only condition is that the window with the internal table data should be in ALV format and not in TEXT only format.

To clarify, I used FM 'POPUP_WITH_TABLE_DISPLAY_OK' and 'POPUP_WITH_TABLE_DISPLAY', but both display the data in TEXT format and there is no provision to put the FIELD names there. Everthing needs to be put into internal table and it displays it in text format.

So I want a FM where I can display internal tabel data in ALV format( same format that would appear if you creata search help for a filed and output window would have all the ALV features like SORT buttons etc.

Hope there is some FM to achieve this ALV format data thing.

Thanks in advance for all your help.

Regards

FX3

Tags:
Former Member
replied
check this

REPORT y_demo_alv_3.

TYPE-POOLS: slis.

DATA: BEGIN OF i_outtab OCCURS 0.
        INCLUDE STRUCTURE sflight.
DATA:   w_chk TYPE c.                  "For multiple selection
DATA: END OF i_outtab.

*       I_OUTTAB TYPE SFLIGHT OCCURS 0,

DATA: i_private TYPE slis_data_caller_exit,
      i_selfield TYPE slis_selfield,
      W_exit(1) TYPE c.

PARAMETERS: p_title TYPE sy-title.
*
START-OF-SELECTION.

  SELECT * FROM sflight INTO TABLE i_outtab.

  CALL FUNCTION 'REUSE_ALV_POPUP_TO_SELECT'
       EXPORTING
            i_title                 = p_title
            i_selection             = 'X'
            i_zebra                 = 'X'
*           I_SCREEN_START_COLUMN   = 0
*           I_SCREEN_START_LINE     = 0
*           I_SCREEN_END_COLUMN     = 0
*           I_SCREEN_END_LINE       = 0
            i_checkbox_fieldname    = 'W_CHK'
*           I_LINEMARK_FIELDNAME    =
*           I_SCROLL_TO_SEL_LINE    = 'X'
            i_tabname               = 'I_OUTTAB'
            i_structure_name        = 'SFLIGHT'
*           IT_FIELDCAT             =
*           IT_EXCLUDING            =
*           I_CALLBACK_PROGRAM      =
*           I_CALLBACK_USER_COMMAND =
*            IS_PRIVATE             = I_PRIVATE
     IMPORTING
            es_selfield             = i_selfield
            e_exit                  = w_exit
       TABLES
            t_outtab                = i_outtab
       EXCEPTIONS
            program_error           = 1
            OTHERS                  = 2.

  IF sy-subrc <> 0.
*    MESSAGE i000(0k) WITH sy-subrc.
  ENDIF.

*****the internal table is modified with a cross sign for marking the
***rows selected

  LOOP AT i_outtab WHERE w_chk = 'X'.
    WRITE: /  i_outtab-carrid, i_outtab-price.
  ENDLOOP.
0 View this answer in context

Helpful Answer

by
Not what you were looking for? View more on this topic or Ask a question