Skip to Content

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

ALV OO; how to open detail popup on button click

Hi guys!

Can someone help me out with the following problem

I have a ALV OO table (like se16n), when i click on a button i want to get the details of this row in a seperate popup (like se16n)

in this popup the row should be editable.

does anyone have an example for this.

replied

You can use Dialog box for this. if not you can call the screen with starting at and ending at addition.

report  ztest_dialog_alv.

data dialogbox type ref to cl_gui_dialogbox_container.
data: grid type ref to cl_gui_alv_grid.
data: container type ref to cl_gui_container.

data: it_flight type sflight_tab1.


select * from sflight
into table it_flight
up to 20 rows.

call screen 100 .

module status_0100 output.
  set pf-status 'STATUS'.
  if dialogbox is initial.
    create object dialogbox
      exporting
        width   = 540
        height  = 100
        top     = 150
        left    = 150
        repid   = sy-repid
        dynnr   = sy-dynnr.

    if grid is initial.
      create object grid
      exporting
      i_parent = dialogbox.
    endif.

    call method grid->set_table_for_first_display(
       exporting
         i_structure_name              = 'SFLIGHT'
       changing
         it_outtab                     = it_flight
       exceptions
         invalid_parameter_combination = 1
         program_error                 = 2
         too_many_lines                = 3
            ).
    if sy-subrc ne  0.
      message id sy-msgid type sy-msgty number sy-msgno
                 with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
    endif.


  endif.

endmodule.                 " STATUS_0100  OUTPUT

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