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

Submit statement with 3 selection screens

Former Member
9,245

Can anyone help me writing the submit statement which has to consider the input of 3 selection screens

1 ACCEPTED SOLUTION
Read only

michael_piesche
Active Contributor
7,971

1) ABAP documentation

Please have a look at the documentation ABAP Submit Syntax, especially the part about the selection-screen parameters ABAP SUBMIT - selscreen_parameters Syntax:

  1. ... USING SELECTION-SET variant
  2. ... USING SELECTION-SETS OF PROGRAM prog
  3. ... WITH SELECTION-TABLE rspar *
  4. ... WITH expr_syntax1 WITH expr_syntax2 ... *
  5. ... WITH FREE SELECTIONS texpr

The ones marked with (*) are the ones relevant for your case.

2) Pattern-Function WITH expr_syntax

If you use the PATTERN (CTRL+F6) function, choose "Other Pattern: SUBMIT" and type in your Report, it will give you a template for option (4) SUBMIT WITH expr_syntax1 WITH expr_snytax2 ...:

The pattern will include all selection-screen parameters and select options from your report programm.
Just keep the ones that are relevant for you. The parameters are unique and it doesnt matter from which 'tab' of the selection screen they come from, they are internally always available, even though you might have to switch tabs to access all of them.

SUBMIT zyourreport
        WITH param1 ...
        with param2 ...
        with ...
        with selopt1 ...
        with selopt2 ...
        with ...

3) Syntax WITH expr_syntax

Parameters are set with the equal sign (=) and the passed object has to be compatible to the parameter of the selection screen.

Select-Options can be either set as single values with an operator or as range tables.

SUBMIT zyourreport
        WITH param1   = pval1
        WITH selopt1 EQ sval1
        WITH selopt2 GT sval2 SIGN 'E'
        WITH selopt3 NOT BETWEEN sval3 AND sval4
        WITH selopt4 IN srange.

4) Syntax WITH SELECTION-TABLE rspar

DATA rspar TYPE TABLE OF rsparams.

APPEND VALUE #( selname = 'PARAM1'  kind = 'P' low = pval1 ) TO rspar.
APPEND VALUE #( selname = 'SELOPT4' kind = 'S' sign = 'I' option = 'EQ' low = sval4a ) TO rspar.
APPEND VALUE #( selname = 'SELOPT4' kind = 'S' sign = 'I' option = 'EQ' low = sval4b ) TO rspar.

SUBMIT zyourreport 
        WITH SELECTION-TABLE rspar.

5) Other issues

If you still have issues, please be more specific about your problem. What have you achieved so far? Show some coding or screenshots to support your case. Right now, your problem is not very specific and easily dealt with showing you the ABAP documentation.

Can anyone help me writing the submit statement which has to consider the input of 3 selection screens

6 REPLIES 6
Read only

Sandra_Rossi
Active Contributor
0 Likes
7,971

If I answer your question literally, I could answer that you simply have to pass each of the parameters using WITH, you don't have to consider in what selection screen(s) it's positioned. But I guess you have a specific issue, which is ... ???

Read only

Former Member
0 Likes
7,971

Actually The input screen has 3 tabs with many select options, in this scenario I need the submit statement

Read only

Sandra_Rossi
Active Contributor
0 Likes
7,971

So my first comment is still very valid.

Read only

former_member1716
Active Contributor
0 Likes
7,971

srividya421,

As sandra.rossi rightly suggested the keyword SUBMIT WITH should be enough for this requirement.

You need not worry about the tabs present because each selection screen element is unique here. Am not sure whether they are with PARAMETERS or SELECT OPTION but you get all the information you need in the below link.

SAP HELP

Regards!

Read only

michael_piesche
Active Contributor
7,972

1) ABAP documentation

Please have a look at the documentation ABAP Submit Syntax, especially the part about the selection-screen parameters ABAP SUBMIT - selscreen_parameters Syntax:

  1. ... USING SELECTION-SET variant
  2. ... USING SELECTION-SETS OF PROGRAM prog
  3. ... WITH SELECTION-TABLE rspar *
  4. ... WITH expr_syntax1 WITH expr_syntax2 ... *
  5. ... WITH FREE SELECTIONS texpr

The ones marked with (*) are the ones relevant for your case.

2) Pattern-Function WITH expr_syntax

If you use the PATTERN (CTRL+F6) function, choose "Other Pattern: SUBMIT" and type in your Report, it will give you a template for option (4) SUBMIT WITH expr_syntax1 WITH expr_snytax2 ...:

The pattern will include all selection-screen parameters and select options from your report programm.
Just keep the ones that are relevant for you. The parameters are unique and it doesnt matter from which 'tab' of the selection screen they come from, they are internally always available, even though you might have to switch tabs to access all of them.

SUBMIT zyourreport
        WITH param1 ...
        with param2 ...
        with ...
        with selopt1 ...
        with selopt2 ...
        with ...

3) Syntax WITH expr_syntax

Parameters are set with the equal sign (=) and the passed object has to be compatible to the parameter of the selection screen.

Select-Options can be either set as single values with an operator or as range tables.

SUBMIT zyourreport
        WITH param1   = pval1
        WITH selopt1 EQ sval1
        WITH selopt2 GT sval2 SIGN 'E'
        WITH selopt3 NOT BETWEEN sval3 AND sval4
        WITH selopt4 IN srange.

4) Syntax WITH SELECTION-TABLE rspar

DATA rspar TYPE TABLE OF rsparams.

APPEND VALUE #( selname = 'PARAM1'  kind = 'P' low = pval1 ) TO rspar.
APPEND VALUE #( selname = 'SELOPT4' kind = 'S' sign = 'I' option = 'EQ' low = sval4a ) TO rspar.
APPEND VALUE #( selname = 'SELOPT4' kind = 'S' sign = 'I' option = 'EQ' low = sval4b ) TO rspar.

SUBMIT zyourreport 
        WITH SELECTION-TABLE rspar.

5) Other issues

If you still have issues, please be more specific about your problem. What have you achieved so far? Show some coding or screenshots to support your case. Right now, your problem is not very specific and easily dealt with showing you the ABAP documentation.

Read only

7,971

srividya421, you accept the answer and unaccepted it again. Please post your issue if there are still problems occuring.