‎2009 Apr 15 11:00 AM
Hi Gurus,
I created a selection screen by using FM "COMPLEX_SELECTIONS_DIALOG" in module pool program.
Its works very fine. But my doubt is if I click on the Multiple selection button at right of every select option and enter the values, i need to show a green button on the multiple selection button.
It displays in noraml reports if we use the select-option statement.
The same way i need to show a green button in the module pool screen also.
The below is the my piece of code.
CALL FUNCTION 'COMPLEX_SELECTIONS_DIALOG'
EXPORTING
title = text-002
text = 'Material Number'
signed = 'X'
lower_case = ' '
no_interval_check = ' '
just_display = ' '
just_incl = 'X'
excluded_options =
description =
help_field =
search_help =
tab_and_field = st_tab
TABLES
range = r_matnr
EXCEPTIONS
no_range_tab = 1
cancelled = 2
internal_error = 3
invalid_fieldname = 4
OTHERS = 5.
Please look into this and tell me the procedure how to display green button when i select the data by using multiple selection button.
Thanks,
Srihari.
‎2009 Apr 15 11:04 AM
hi look at the code...
field-symbols: <fst> type standard table.
if r_uname[] is initial.
if not v_username is initial.
r_uname-sign = 'I'.
r_uname-option = 'EQ'.
r_uname-low = v_username.
append r_uname.
clear r_uname.
endif.
endif.
assign r_uname[] to <fst>.
call function 'COMPLEX_SELECTIONS_DIALOG'
exporting
title = 'Select Multiple Value'(059)
text = 'Finish Group'(058)
signed = 'X'
lower_case = ' '
no_interval_check = 'X'
just_display = ' '
just_incl = 'X'
tables
range = <fst>
exceptions
no_range_tab = 1
cancelled = 2
internal_error = 3
others = 4.
‎2009 Apr 15 11:20 AM
Hi,
I guess this can be done by dynamically changing the icon of that button.
Refer:-
In the TOP Module include: -
TYPE-POOLS : icon.
Take a button on the screen and say we name it as BUTTON having length of 4 (at-least).
Also declare this button in TOP Module as:-
DATA : button(4) TYPE c.
Now in the PBO of the screen include code:-
"check the number of records append using FM 'COMPLEX_SELECTIONS_DIALOG'
IF <condition>. "<--if multiple records
WRITE icon_select_all AS ICON TO button. u201Cicon_select_all is icon name (change icon name as per rqed)
ELSEIF <condition>. "<--if single selection
WRITE icon_deselect_all AS ICON TO button. u201Cicon_deselect_all is icon name (change icon name as per rqed)
ENDIF.
So when the screen id displayed first time, depending upon the condition, the icon is attached to the button at runtime.
Similarly the icon changes at run-time as per condition encountered when PBO is executed.
Hope this helps you.
Regards,
Tarun
‎2011 Feb 04 5:23 PM