‎2015 Aug 11 6:50 AM
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.
‎2015 Aug 11 10:10 AM
‎2015 Aug 11 1:37 PM
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
‎2015 Aug 11 2:42 PM
‎2015 Aug 11 3:15 PM
Then, please read the link which I have given in my earlier post.
Thanks,
Juwin
‎2015 Aug 11 4:34 PM
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
‎2015 Aug 11 6:40 PM
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