‎2013 Nov 21 4:27 PM
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.
‎2013 Nov 25 6:58 AM
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
‎2013 Nov 22 4:42 AM
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
‎2013 Nov 22 5:12 AM
You can call some Subcreen on click of button and pass the selected values from the ALV to your Subscreen.
‎2013 Nov 25 6:39 AM
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.
‎2013 Nov 25 6:58 AM
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