cancel
Showing results for 
Search instead for 
Did you mean: 

popup in interactive ALV report using OOPS

Former Member
0 Kudos

Hi all,

we are using Interactive ALV report using OOPS.

on double clicking of a field we need to display the internal table in another alv grid ,

issue is that we need to display the new grid in a "popup".

we are able to display the values in another screen but how to make the display in a popup

on the same screen.

Regards,

Anil.

A suggestion can make a difference.

Accepted Solutions (1)

Accepted Solutions (1)

MarcinPciak
Active Contributor
0 Kudos

Hi Anil,

Complete following steps:

- create screen say 0200 choosing modal dialog box type in screen atributes tab

- place custom control on it

- in event hanlder method for double_click call this screen.

- in PBO of this screen create custom container placing ALV inside it.

- display your ALV with your detail table

- in PAI leave the screen if OK button or CANCEL was pressed (function codes for them are the same: OK , CANCEL so just check ok_code of the modal screen)

Regards

Marcin

Former Member
0 Kudos

HI Marcin,

thanks for the reply

my screen painter is a not a graphical editor

it is not like dragging ittems but we need to go Edit->create element->custom control

so Iam unable to find modal dialog box type in screen atributes tab .

can u help me out.

Regards,

Anil.

Former Member
0 Kudos

Use Function Module :REUSE_ALV_GRID_DISPLAY_LVC it internally uses class(CL_GUI_ALV_GEID)

Just set the coridnates it will come as popup.

*   I_SCREEN_START_COLUMN             = 10
*   I_SCREEN_START_LINE               = 5
*   I_SCREEN_END_COLUMN               = 5
*   I_SCREEN_END_LINE                 = 10

CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY_LVC'
   EXPORTING
*   I_INTERFACE_CHECK                 = ' '
*   I_BYPASSING_BUFFER                =
*   I_BUFFER_ACTIVE                   =
     i_callback_program                = sy-cprog
*   I_CALLBACK_PF_STATUS_SET          = ' '
*     i_callback_user_command           = 'USER_COMMAND'
*   I_CALLBACK_TOP_OF_PAGE            = ' '
*   I_CALLBACK_HTML_TOP_OF_PAGE       = ' '
*   I_CALLBACK_HTML_END_OF_LIST       = ' '
*   I_STRUCTURE_NAME                  =
*   I_BACKGROUND_ID                   = ' '
*   I_GRID_TITLE                      =
*   I_GRID_SETTINGS                   =
     is_layout_lvc                     = fs_layo
     it_fieldcat_lvc                   = t_fcat
*   IT_EXCLUDING                      =
*   IT_SPECIAL_GROUPS_LVC             =
   it_sort_lvc                       = t_sort
*   IT_FILTER_LVC                     =
*   IT_HYPERLINK                      =
*   IS_SEL_HIDE                       =
*   I_DEFAULT                         = 'X'
*   I_SAVE                            = ' '
*   IS_VARIANT                        =
     it_events                         = t_event
*   IT_EVENT_EXIT                     =
*   IS_PRINT_LVC                      =
*   IS_REPREP_ID_LVC                  =
*   I_SCREEN_START_COLUMN             = 10
*   I_SCREEN_START_LINE               = 5
*   I_SCREEN_END_COLUMN               = 5
*   I_SCREEN_END_LINE                 = 10
*   IT_EXCEPT_QINFO_LVC               =
*   I_HTML_HEIGHT_TOP                 =
*   I_HTML_HEIGHT_END                 =
* IMPORTING
*   E_EXIT_CAUSED_BY_CALLER           =
*   ES_EXIT_CAUSED_BY_USER            =
    TABLES
      t_outtab                          = t_cross
   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.

ENDFORM.                    " alv_third_screen

Just call it in the PAI no extra screen is required

Regards,

Gurpreet

MarcinPciak
Active Contributor
0 Kudos

Hi Anil,

I don't thing you need Screen Painter for that. When you create a screen you can set a bunch of attributes (like its type, coordinates, next screen etc). There are four radiobuttons in frame screen type . The third option is the one you need. Screen Painter is fired up only when you press Layout pushbutton on application toolbar. [See the example|http://img10.imageshack.us/img10/5021/screenieu.jpg]

If you want to install screen painter, all you need is to update your SAP Gui. Google the case or search the SCN and I am sure you will find its latest download version. Then you can easily work with graphical editor.

Regards

Marcin

Former Member
0 Kudos

HI Gurpreet,

thanks its working

but now we need to handle double-click in the pop-up.

can I have any suggestion.

For earlier screen I did it by events but as this is not having any screen how can we handle double click.

Regards,

Anil kumar.

A suggestion can make a difference.

Former Member
0 Kudos

Step 1:

Create Dynamic Sub sroutine:

FORM user_command USING r_ucomm LIKE sy-ucomm
rs_selfield TYPE slis_selfield.

CASE r_ucomm.
    WHEN '&IC1'.
ENDCASE.
ENDFORM.                    "USER_COMMAND

Note: slis_selfield will give you the selected Row number

Step 2:

Pass it to the function Module.

CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY_LVC'
       EXPORTING
*          I_INTERFACE_CHECK                 = ' '
*          I_BYPASSING_BUFFER                =
*          I_BUFFER_ACTIVE                   =
          I_CALLBACK_PROGRAM                = SY-CPROG
*          I_CALLBACK_PF_STATUS_SET          = ' '
         I_CALLBACK_USER_COMMAND           = 'USER_COMMAND'

Regards,

Gurpreet

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi,

Try this.

When u r calling the 2nd screen, try the below code.

for ex: if your second screen no is 9000, then

call screen 9000 starting at '<X>' '<Y>' ending at '<X>' '<Y>'

<X> -


x coordinate of the screen.

<Y> -


y coordinate of the screen.

The above displays the second screen as a pop up on the first screen and u can also code for double click in the second screen as u did in the first screen.

Hope this helps you.

Regards,

Sharin.

Former Member
0 Kudos

Thanks Sharin for the reply.

Iam trying by the way in which Gurupreet suggested.

its showing some result else I wil go by this.