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

Problem in submit statement

Former Member
0 Likes
2,835

Hi,

I have written the code as

submit rabewg_alv01 with bukrs = p_bukrs

with brdatu = lv_lastdate

with ktansw = p_ktansw

with budat-low = lv_start

with budat-high = lv_end

using selection-set 'DEFECT '

and return.

In the o/p which is getting generated it is not taking into account the value of bukrs,brdatu,ktansw and budat.The o/p which is getting displayed is only based on the variant set.How to rectify this error

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
2,190

submit rabewg_alv01 using selection-set 'DEFECT '

with bukrs = p_bukrs

with brdatu = lv_lastdate

with ktansw = p_ktansw

with budat-low = lv_start

with budat-high = lv_end

and return.

17 REPLIES 17
Read only

Former Member
0 Likes
2,190

Hi

This s the syntax for submit u follow like that.

SUBMIT {rep|(name)} [selscreen_options]

[list_options]

[job_options]

[AND RETURN].

Read only

Former Member
0 Likes
2,190

Can i know the reason why you are using this statement. Is there specific reason to execute the report with DEFECT variant as well as your defined parameters ?

using selection-set 'DEFECT '

Read only

0 Likes
2,190

I have saved the variant as 'DEFECT' as per my required selection screen.In the pgm they have set 4 variants out of which the variant DEFECT is specific for my requirement.

Read only

Former Member
0 Likes
2,192

submit rabewg_alv01 using selection-set 'DEFECT '

with bukrs = p_bukrs

with brdatu = lv_lastdate

with ktansw = p_ktansw

with budat-low = lv_start

with budat-high = lv_end

and return.

Read only

0 Likes
2,190

Still am not getting the correct o/p

Read only

0 Likes
2,190

I think this is the way it actually works. To achieve your requirement you have to combine SELECTION-SET and WITH SELECTION-TABLE. more info here:

http://help.sap.com/saphelp_470/helpdata/EN/9f/dba51a35c111d1829f0000e829fbfe/frameset.htm

Read only

0 Likes
2,190

Have already tried the same but its not working out...

Read only

0 Likes
2,190

the order here does matter: SELECTION-SET first than WITH SELECTION-TABLE. If it still does not help, than I would suggest to create a variant woithout the fields you want to change dynamically and go for your original idea (SELECTION-SET and all other fields one by one)

Read only

0 Likes
2,190

hi hema,

the values your passing with submit statement are from that report or what?

if your passing the values of calling report, u can do like this.

suppose if you have a select-option say s_uname in the report,

Inside the report, by using EXPORT statement you send the values to the called report.

EXPORT s_uname to memory-id 'key'.

after submit statement you just import the values of the selection screen.

IMPORT s_uname from memory-id 'key'.

Now in s_uname You can find the values of the submitted report selection screeen values.

Hopes this helps you.

Regards,

Shake sha vali

Read only

0 Likes
2,190

hiii

why u r not using export import parameter for this requirement.

i think this will give u correct values

hope it help you.

Edited by: vikalp on Oct 8, 2008 6:05 PM

Read only

0 Likes
2,190

can you please send a sample code for import and export

Read only

0 Likes
2,190

like

export burks into memory id 'VIKALP'

AFTER THAT

submit <program name> and return.

in that program.

u define burks same as previous

after that

import burks from memory id 'VIKALP'.

if u r facing any problem then press f1 on import and export.

Read only

0 Likes
2,190

Hi Hema,

Try this code

The code inside the submit report....

REPORT Zsubmit_report.

TABLES: USR21.

SELECT-OPTIONS : S_USER FOR usr21-bname

START-OF-SELECTION.

EXPORT S_USER to memory ID 'USR'.

The following code should be in Calling Program

SUBMIT Zsubmit_report VIA SELECTION-SCREEN AND RETURN.

IMPORT S_USER FROM MEMORY ID 'USR'.

Like s_user, you can import all the parameters and select-options from your report.

Hope this helps you.

Regards,

Shake sha vali

Read only

Former Member
0 Likes
2,190

why not just use :

SUBMIT program USING SELECTION-SET 'Variant'.

Regards,

Saurabh.

Read only

0 Likes
2,190

or just

SUBMIT program VIA SELECTION-SCREEN

WITH p_1 = text-085

WITH p_2 = text-086

WITH p_3 = text-088.

Read only

Former Member
0 Likes
2,190

I think you will have to use SELECTION-TABLE as it is a Select option not a parameter.

SUBMIT report1 USING SELECTION-SCREEN '1100'

WITH SELECTION-TABLE rspar_tab

WITH selcrit2 BETWEEN 'H' AND 'K'

WITH selcrit2 IN range_tab

AND RETURN.

There is a sample report in the ABAP help how to use SELECTION-TABLE. Check that you. That might resolve your problem.

Cheers

-Aman

Read only

Former Member
0 Likes
2,190

Did you try....

DATA: t_rspar LIKE TABLE OF wa_rspar.

CLEAR wa_rspar.

wa_rspar-selname = 'P_IDOC'.

wa_rspar-kind = 'P'.

wa_rspar-sign = 'I'.

wa_rspar-option = 'EQ'.

wa_rspar-low = wa_docnum-docnum.

APPEND wa_rspar TO t_rspar.

SUBMIT rbdagaie WITH SELECTION-TABLE t_rspar AND RETURN

EXPORTING LIST TO MEMORY.