10-11-2007 3:27 PM
Hi,
Program A calls Program B with variant V.
However program A does not want the program B to process all the criteria in variant V (it may want to delete/modify some of the values of the variant V ).
How to achieve this using 'Submit' ?
Any input or example is highly appreciated.
Thanks a lot.
10-11-2007 3:48 PM
Use the syntax as shown below
SUBMIT B USING SELECTION-SET 'TEST'
WITH P_TEST1 EQ ' '
WITH P_TEST2 EQ ' '.
p_test1, p_test2 are the parameters in report B which needs to be ignored which are also included in the variant 'TEST'. The values supplied with the '<b>WITH'</b> addition take precedence over the values supplied with <b>USING SELECTION-SET</b> addition
10-11-2007 3:36 PM
You don't have to use a variant, you can also pass all the parameters to program B from within program A:
e.g.:
DATA: lt_par TYPE TABLE OF rsparams,
ls_par TYPE rsparams.
filename
CLEAR: ls_par, lt_par.
ls_par-selname = gc_sel_fname.
ls_par-kind = gc_char_p.
ls_par-sign = gc_i.
ls_par-option = gc_eq.
ls_par-low = x_file->mv_name_with_path.
APPEND ls_par TO lt_par.
SUBMIT rfkkze00 USING SELECTION-SCREEN 1000
WITH SELECTION-TABLE lt_par.
Regards,
Michael
10-11-2007 3:36 PM
Hi,
You can use SUBMIT statement with selection screen paramaters option.
SUBMIT zreport with p_param1 = 'value'
with p_param2 = 'value'
and return.
Regards,
Ferry Lianto
10-11-2007 3:48 PM
Use the syntax as shown below
SUBMIT B USING SELECTION-SET 'TEST'
WITH P_TEST1 EQ ' '
WITH P_TEST2 EQ ' '.
p_test1, p_test2 are the parameters in report B which needs to be ignored which are also included in the variant 'TEST'. The values supplied with the '<b>WITH'</b> addition take precedence over the values supplied with <b>USING SELECTION-SET</b> addition
10-11-2007 3:56 PM
Thanks friends for your quick answers. What if the number of records to be excluded are more than just a couple? Probably I may have to exclude even up to 100 records. Do I have to keep adding 100 such 'With's.
Thanks again.
10-11-2007 4:12 PM
use the FM <b>RS_REFRESH_FROM_SELECTOPTIONS</b> to fetch all the select options available in the called report and use the addition <b>WITH SELECTION-TABLE rspar</b>
10-11-2007 4:00 PM
If you have those values in a table, then just loop at the values and add the to the table before calling the SUBMIT WITH SELECTION-TABLE .
Michael