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

Doubt in Selection screen for Module pool

Former Member
0 Likes
471

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.

3 REPLIES 3
Read only

former_member203501
Active Contributor
0 Likes
404

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.

Read only

I355602
Product and Topic Expert
Product and Topic Expert
0 Likes
404

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

Read only

Former Member
0 Likes
404

Thanks for the replies. Its reolved my self.