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: 

Question reg. 'SUBMIT'

Former Member
0 Kudos

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.

1 ACCEPTED SOLUTION

Former Member
0 Kudos

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

6 REPLIES 6

former_member589029
Active Contributor
0 Kudos

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

ferry_lianto
Active Contributor
0 Kudos

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

Former Member
0 Kudos

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

0 Kudos

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.

0 Kudos

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>

former_member589029
Active Contributor
0 Kudos

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