Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Dynamic Interactive Pop-Up window

Former Member
0 Likes
1,924

Hi All,

I have a requirement where the user will select multiple lines in the ALV and on clicking the payment button a pop-up should raise with the customers entered on the selection screen and option to enter the amounts as well.  Do we have any FM or classes to achieve this dynamic pop-up scenario?

Please see the attachment for the mock up pop-up screen.

1 ACCEPTED SOLUTION
Read only

former_member188827
Active Contributor
0 Likes
1,631

Try using "REUSE_ALV_POPUP_TO_SELECT" for this.Please refer to sample code:

  

DATA:BEGIN OF groups OCCURS 1,

   check(1),

   group TYPE char15,

   rate TYPE kbetr,

END OF groups.

   groups-group = 'A'.

   groups-rate = 10.

    append groups.

   clear groups.

   groups-group = 'B'.

   groups-rate = 20.

   append groups.

   clear groups.

   fieldcat-fieldname   = 'GROUP'.

   fieldcat-seltext_m   = 'Group'.

   fieldcat-col_pos     = 1.

   fieldcat-outputlen   = 15.

   fieldcat-emphasize   = 'X'.

   fieldcat-key         = 'X'.

   APPEND fieldcat TO field_tab.

   CLEAR  fieldcat.

   fieldcat-fieldname   = 'RATE'.

   fieldcat-seltext_m   = 'Amount'.

   fieldcat-col_pos     = 3.

   fieldcat-outputlen   = 15.

   fieldcat-emphasize   = ''.

   fieldcat-input   = 'X'.

   APPEND fieldcat TO field_tab.

   CLEAR  fieldcat.

   CALL FUNCTION 'REUSE_ALV_POPUP_TO_SELECT'

     EXPORTING

      i_title                       = 'Select Group'

      i_selection                   = 'X'

*   I_ALLOW_NO_SELECTION          =

*   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          = 'CHECK'

*   I_LINEMARK_FIELDNAME          =

*   I_SCROLL_TO_SEL_LINE          = 'X'

       i_tabname                     = 'GROUPS'

*   I_STRUCTURE_NAME              =

    it_fieldcat                   = field_tab

*   IT_EXCLUDING                  =

*   I_CALLBACK_PROGRAM            =

*   I_CALLBACK_USER_COMMAND       =

*   IS_PRIVATE                    =

    IMPORTING

      es_selfield                   = sel_field

      e_exit                        = p_exit

     TABLES

       t_outtab                      = groups

    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

4 REPLIES 4
Read only

Former Member
0 Likes
1,631

Hi R V,

I think you can achieve this functionality by using the FM 'POPUP_GET_VALUES'. You can refer the demo program 'RSSPO410'.

Regards

Anoop


Read only

0 Likes
1,631

You can call some Subcreen on click of button and pass the selected values from the ALV to your Subscreen.

Read only

davis_raja
Active Participant
0 Likes
1,631

This achieved by selecting the Modal Dialog Box option in the Screen Type of the Attributes of the Screen and Adding the required codes in the PBO and PAI.

Read only

former_member188827
Active Contributor
0 Likes
1,632

Try using "REUSE_ALV_POPUP_TO_SELECT" for this.Please refer to sample code:

  

DATA:BEGIN OF groups OCCURS 1,

   check(1),

   group TYPE char15,

   rate TYPE kbetr,

END OF groups.

   groups-group = 'A'.

   groups-rate = 10.

    append groups.

   clear groups.

   groups-group = 'B'.

   groups-rate = 20.

   append groups.

   clear groups.

   fieldcat-fieldname   = 'GROUP'.

   fieldcat-seltext_m   = 'Group'.

   fieldcat-col_pos     = 1.

   fieldcat-outputlen   = 15.

   fieldcat-emphasize   = 'X'.

   fieldcat-key         = 'X'.

   APPEND fieldcat TO field_tab.

   CLEAR  fieldcat.

   fieldcat-fieldname   = 'RATE'.

   fieldcat-seltext_m   = 'Amount'.

   fieldcat-col_pos     = 3.

   fieldcat-outputlen   = 15.

   fieldcat-emphasize   = ''.

   fieldcat-input   = 'X'.

   APPEND fieldcat TO field_tab.

   CLEAR  fieldcat.

   CALL FUNCTION 'REUSE_ALV_POPUP_TO_SELECT'

     EXPORTING

      i_title                       = 'Select Group'

      i_selection                   = 'X'

*   I_ALLOW_NO_SELECTION          =

*   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          = 'CHECK'

*   I_LINEMARK_FIELDNAME          =

*   I_SCROLL_TO_SEL_LINE          = 'X'

       i_tabname                     = 'GROUPS'

*   I_STRUCTURE_NAME              =

    it_fieldcat                   = field_tab

*   IT_EXCLUDING                  =

*   I_CALLBACK_PROGRAM            =

*   I_CALLBACK_USER_COMMAND       =

*   IS_PRIVATE                    =

    IMPORTING

      es_selfield                   = sel_field

      e_exit                        = p_exit

     TABLES

       t_outtab                      = groups

    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