Application Development 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: 

Complex_Selections_dialog in Module Pool Programming

Former Member
0 Kudos

Hi friends,

I have a screen (say 100) and i have few fields in it ... (field A, B, C) ...

Field B should accept 10 different values like 1,1,23,4,64,32,5,67,3,2 .....

I can say the above requirement exactly like .....

select-options : b for <tab> no-intervals. "it should allow only extensions...

I have a PUSH Button Near the Field B ... So on click of the Push Button in the PAI event i should invoke my requirement .....

How to achieve the same????

Hope iam clear with my question !! Please revert it iam not ;(

Thanks in advance ..

Cheers

Kripa Rangachari.....

1 ACCEPTED SOLUTION

athavanraja
Active Contributor
0 Kudos

check this sample for selecting cost centers with only option of using EQ and NE

data: wf_tab_field like rstabfield occurs 0 with header line ,
      wf_exl_opt like rsoptions .
ranges: r_kostl for csks-kostl .

 move: 'KOSTL' to wf_tab_field-fieldname ,
          'CSKS' to wf_tab_field-tablename .
    append wf_tab_field .
    clear wf_tab_field .

    move: 'X' to wf_exl_opt-bt ,
          'X' to wf_exl_opt-cp ,
          'X' to wf_exl_opt-ge ,
          'X' to wf_exl_opt-gt ,
          'X' to wf_exl_opt-le ,
          'X' to wf_exl_opt-lt ,
          'X' to wf_exl_opt-nb ,
          'X' to wf_exl_opt-np .
*      ' ' to wf_exl_opt-NE .

call function 'COMPLEX_SELECTIONS_DIALOG'
     exporting
       title                   = 'Select Cost Centers'
       text                    = 'Cost Center'
*         SIGNED                  = 'X'
*         LOWER_CASE              = ' '
*         NO_INTERVAL_CHECK       = ' '
*         JUST_DISPLAY            = ' '
*         JUST_INCL               = ' '
        excluded_options        = wf_exl_opt
*         DESCRIPTION             =
        help_field              = 'CSKS-KOSTL'
*          SEARCH_HELP             = 'KOST'
        tab_and_field           = wf_tab_field
      tables
        range                   = r_kostl
     exceptions
       no_range_tab            = 1
       cancelled               = 2
       internal_error          = 3
       invalid_fieldname       = 4
       others                  = 5
              .
    if sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
*         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    endif.

Raja

2 REPLIES 2

athavanraja
Active Contributor
0 Kudos

check this sample for selecting cost centers with only option of using EQ and NE

data: wf_tab_field like rstabfield occurs 0 with header line ,
      wf_exl_opt like rsoptions .
ranges: r_kostl for csks-kostl .

 move: 'KOSTL' to wf_tab_field-fieldname ,
          'CSKS' to wf_tab_field-tablename .
    append wf_tab_field .
    clear wf_tab_field .

    move: 'X' to wf_exl_opt-bt ,
          'X' to wf_exl_opt-cp ,
          'X' to wf_exl_opt-ge ,
          'X' to wf_exl_opt-gt ,
          'X' to wf_exl_opt-le ,
          'X' to wf_exl_opt-lt ,
          'X' to wf_exl_opt-nb ,
          'X' to wf_exl_opt-np .
*      ' ' to wf_exl_opt-NE .

call function 'COMPLEX_SELECTIONS_DIALOG'
     exporting
       title                   = 'Select Cost Centers'
       text                    = 'Cost Center'
*         SIGNED                  = 'X'
*         LOWER_CASE              = ' '
*         NO_INTERVAL_CHECK       = ' '
*         JUST_DISPLAY            = ' '
*         JUST_INCL               = ' '
        excluded_options        = wf_exl_opt
*         DESCRIPTION             =
        help_field              = 'CSKS-KOSTL'
*          SEARCH_HELP             = 'KOST'
        tab_and_field           = wf_tab_field
      tables
        range                   = r_kostl
     exceptions
       no_range_tab            = 1
       cancelled               = 2
       internal_error          = 3
       invalid_fieldname       = 4
       others                  = 5
              .
    if sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
*         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    endif.

Raja

raymond_giuseppi
Active Contributor
0 Kudos

You could take a look at FM COMPLEX_SELECTIONS_DIALOG. The module will show like a SELECTION-SCREEN and return a RANGE type parameter. Use parameter EXCLUDED_OPTIONS to remove the not desired options . (BT, NE, etc.)

Regards