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

Select options using COMPLEX_SELECTIONS_DIALOG

Former Member
0 Likes
3,539

Hi All,

I have created 2 input boxes for material number in a screen. i named as mat1 and mat2 . I have created the range table in top include.

How i can connect the dialog input values mat1 and mat2 to the range table.

Please also tell me how and where i need to use COMPLEX_SELECTIONS_DIALOG the function module. what will be the result after calling that.

Please share your ideas!

Thanks,

Pradeep.

6 REPLIES 6
Read only

former_member184158
Active Contributor
0 Likes
1,873

This message was moderated.

Read only

Juwin
Active Contributor
0 Likes
1,873

I have created 2 input boxes for material number in a screen. i named as mat1 and mat2 . I have created the range table in top include.

How i can connect the dialog input values mat1 and mat2 to the range table.

What kind of screen are you using - a dynpro or a selection-screen?


If you are using selection-screen, then you just need to use select-options and if you are using dynpro, you need to declare a screen with select-options and include that in your dynpro. Please read this thread: .


Either way, you don't have to declare variables, ranges or use COMPLEX_SELECTIONS_DIALOG function module.


Thanks,

Juwin

Read only

Former Member
0 Likes
1,873

Hi ,

I am using dynpro screen . not select option s

Read only

Juwin
Active Contributor
0 Likes
1,873

Then, please read the link which I have given in my earlier post.

Thanks,

Juwin

Read only

0 Likes
1,873

Hi

why you dont add the parameter to range table

r_mar1 type range of matnr,

s_mar1 like line of r_mar1.

s_mar1-low = P1_mat.

....

...

append s_mar1 to r_mar1.

s_mar1-low = P2_mat.

....

...

append s_mar1 to r_mar1.

so the both parameters p1, p2 are in range table, then you can use this range as want.

Regards.

Ibr

Read only

Former Member
0 Likes
1,873

hi pradeep,

if your range object is  werks_ran then you can add the values as follows:

DATA: werks_ran FOR komg-werks.


     werks_ran-LOW = MAT1.
     APPEND werks_ran.
     werks_ran-LOW = MAT2.
     APPEND werks_ran.


Once values are added to the range table and now you can call fm COMPLEX_SELECTIONS_DIALOG


     PERFORM func_multiple_select.


FORM FUNC_MULTIPLE_SELECT .

   DATA: struc_tab_and_field TYPE rstabfield.

   struc_tab_and_field-fieldname = 'WERKS'.
   struc_tab_and_field-tablename = 'KOMG'.


   CALL FUNCTION 'COMPLEX_SELECTIONS_DIALOG'
     EXPORTING
       tab_and_field           = struc_tab_and_field
     TABLES
       range                   = werks_ran
     EXCEPTIONS
       no_range_tab            = 1
       cancelled               = 2
       internal_error          = 3
       invalid_fieldname       = 4
       OTHERS                  = 5.
ENDFORM.                    " FUNC_MULTIPLE_SELECT