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

Former Member
0 Likes
765

Hi All,

I'm using a submit statement passing parameters to a report. But the parameters that i pass are not filled in the report when i checked while debugging. What might be wrong.


  submit rm60simu
    with bdart  eq space            sign 'I'   "Requirements Type
    with conkz  eq space            sign 'I'   "Copy Configuration Data
    with dateb  eq space            sign 'I'   "From Date
    with datev  eq space            sign 'I'   "To Date
    with hiskz  eq space            sign 'I'   "History
    with listef eq c_check_on       sign 'I'   "Create List of results
    with matnr  in r_matnr                     "Material
    with opera  eq space            sign 'I'   "Change Quantity
    with pbdnr  eq space            sign 'I'   "Source Requirements Plan
    with pbdnz  eq ws_pbdnz         sign 'I'   "Target Requirements Plan
    with shift  eq space            sign 'I'   "Displace by
    with updkf  eq space            sign 'I'   "No Database Changes
    with vafld  eq space            sign 'I'   "Change Quantity
    with verso  eq p_verso          sign 'I'   "Source Version
    with versz  eq p_versz          sign 'I'   "Target Version
    with vervs  eq p_vervs          sign 'I'   "Target Version Active
    with werks  eq c_rm60simu_plant sign 'I'.  "Plant

Thanks in advance

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
692

Hi,

Look at the sample code below to understand how to pass the parameters to the SUBMIT command

REPORT report2.

DATA: text(10) TYPE c,

rspar_tab TYPE TABLE OF rsparams,

rspar_line LIKE LINE OF rspar_tab,

range_tab LIKE RANGE OF text,

range_line LIKE LINE OF range_tab.

...

rspar_line-selname = 'SELCRIT1'.

rspar_line-kind = 'S'.

rspar_line-sign = 'I'.

rspar_line-option = 'EQ'.

rspar_line-low = 'ABAP'.

APPEND rspar_line TO rspar_tab.

range_line-sign = 'E'.

range_line-option = 'EQ'.

range_line-low = 'H'.

APPEND range_line TO range_tab.

range_line-sign = 'E'.

range_line-option = 'EQ'.

range_line-low = 'K'.

APPEND range_line TO range_tab.

SUBMIT report1 USING SELECTION-SCREEN '1100'

WITH SELECTION-TABLE rspar_tab

WITH selcrit2 BETWEEN 'H' AND 'K'

WITH selcrit2 IN range_tab

AND RETURN.

-Kiran

Please mark useful answers

5 REPLIES 5
Read only

Former Member
0 Likes
693

Hi,

Look at the sample code below to understand how to pass the parameters to the SUBMIT command

REPORT report2.

DATA: text(10) TYPE c,

rspar_tab TYPE TABLE OF rsparams,

rspar_line LIKE LINE OF rspar_tab,

range_tab LIKE RANGE OF text,

range_line LIKE LINE OF range_tab.

...

rspar_line-selname = 'SELCRIT1'.

rspar_line-kind = 'S'.

rspar_line-sign = 'I'.

rspar_line-option = 'EQ'.

rspar_line-low = 'ABAP'.

APPEND rspar_line TO rspar_tab.

range_line-sign = 'E'.

range_line-option = 'EQ'.

range_line-low = 'H'.

APPEND range_line TO range_tab.

range_line-sign = 'E'.

range_line-option = 'EQ'.

range_line-low = 'K'.

APPEND range_line TO range_tab.

SUBMIT report1 USING SELECTION-SCREEN '1100'

WITH SELECTION-TABLE rspar_tab

WITH selcrit2 BETWEEN 'H' AND 'K'

WITH selcrit2 IN range_tab

AND RETURN.

-Kiran

Please mark useful answers

Read only

Former Member
0 Likes
692

HI

GOOD

SUBMIT STATEMENT->

http://help.sap.com/saphelp_nw04/helpdata/en/9f/dba50d35c111d1829f0000e829fbfe/content.htm

GO THROUGH THIS LINK AND USE ACCORDINGLY

THANKS

MRUTYUN

Read only

RichHeilman
Developer Advocate
Developer Advocate
0 Likes
692

Its actually working ok for me. I have added the VIA SELECTION SCREEN extension of the SUBMIT statement so that we can see the values on the selection screen. Which ones are not showing for you?



report zrich_0001 .

tables: mara.

data: c_check_on type c value 'X'.
data: ws_pbdnz type c value '1'.
data: p_verso(2) type c value '02'.
data: p_versz(2) type c value '03'.
data: p_vervs type c value 'X'.
data: c_rm60simu_plant type werks_d value '0001'.
ranges: r_matnr for mara-matnr.

r_matnr-sign = 'I'.
r_matnr-option = 'EQ'.
r_matnr-low  = 'ABC'.
append r_matnr.

r_matnr-sign = 'I'.
r_matnr-option = 'EQ'.
r_matnr-low  = 'DEF'.
append r_matnr.

submit rm60simu via selection-screen
  with bdart  eq space   sign 'I'   "Requirements Type
  with conkz  eq space            sign 'I'   "Copy Configuration Data
 with dateb  eq space            sign 'I'   "From Date
 with datev  eq space            sign 'I'   "To Date
 with hiskz  eq space            sign 'I'   "History
 with listef eq c_check_on       sign 'I'   "Create List of results
with matnr  in r_matnr                     "Material
with opera  eq space            sign 'I'   "Change Quantity
 with pbdnr  eq space            sign 'I'   "Source Requirements Plan
 with pbdnz  eq ws_pbdnz         sign 'I'   "Target Requirements Plan
 with shift  eq space            sign 'I'   "Displace by
 with updkf eq space            sign 'I'   "No Database Changes
 with vafld  eq space            sign 'I'   "Change Quantity
 with verso  eq p_verso          sign 'I'   "Source Version
 with versz  eq p_versz          sign 'I'   "Target Version
 with vervs  eq p_vervs          sign 'I'   "Target Version Active
with werks  eq c_rm60simu_plant sign 'I'.

Regards,

Rich Heilman

Read only

0 Likes
692

Thanks Rich,

Via Selection-screen worked for me better than debugging.

I actually wasn't suppossed to fill bdart.

Thanks again.

Read only

Former Member
0 Likes
692

Hi,

The syntax should be like this if u want to transport current report parameters to another report..

Submit Report_name with Source_parameter = Target_parameter and return.

I think u are not specifying the target parmeter .

Regards,

Kiran B