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: 

Background job getting cancelled : Choose at least one scope of list

Former Member
0 Kudos

Hello to all,

I am trying to Run on Z report in background which conatins SUBMIT statement to standard progarm for MB5B .This report already programmed to call a report in background.It takes stocks for given period,I am taking the values using "import memory-id" statement.It gives an error log in SM37 as:

Choose at least one scope of list

Message no. M7829

Can we call a submit stmt in a report that is to run in background?? or pls provide any alternative for this problem??

Thnax & Regards

Sonal

7 REPLIES 7

SrihariNerella
Participant
0 Kudos

Hi,

How you wirtten submit statement .

Scope of list is nothing but radio button in MB5B report.

Please check the fallowing code of submit statement using MB5b.

**CALL PROG VIA SUBMIT

SUBMIT RM07MLBD "via selection-screen

WITH BUKRS IN S_BUKRS

WITH WERKS IN S_WERKS

WITH DATUM IN S_BUDAT

WITH MATNR IN S_MATNR "Material

WITH LGBST EQ ' '

WITH BWBST EQ 'X'

WITH SBBST EQ ' '

WITH XSUM EQ ' '

WITH PA_SUVAR EQ ' '

WITH PA_SUMFL EQ 'X'

WITH PA_SFLVA EQ ' '

WITH XCHAR EQ ' ' " FOR BATCH WISE

WITH XNOMCHB EQ ' '

WITH NOSTO EQ ' '

EXPORTING LIST TO MEMORY AND RETURN.

If you need any help please revert back.

Regards

Nandan.N

0 Kudos

Hi Nandan,

Thanks for your prompt Reply .

i m using in following way . But in backgriound processeng job is getting cancelled automatically.

SUBMIT zrm07mlbd WITH matnr BETWEEN wa_mara-matnr AND ''

WITH werks BETWEEN pr_werks AND ''

WITH datum BETWEEN so_date-low AND so_date-high

AND RETURN.

Please revert.

Thanks .

0 Kudos

Hi,

Use above syntax what ever i given before post.

You did not define the which stock you required

1. valuated stock

2. batch stock

3. specical stock .

Press F1 on every field on MB5b Give the all required fields then it will work .

Regards

Nandan.N

Former Member
0 Kudos

Hi Sonal,

1. This is happening because there are some checkboxes on the selection screen

which are ticked by default when we run in fore ground

and are blank when run in background.

Hence the system gives the error meaning to select atleast one of them.

2. We can simulate this error in foreground also.

There is one button on selection screen in the middle frame.

"> Category"

Just push it.

Some checkboxes will appear now.

Untick all of them and run the report. You will get the same error

Choose at least one scope of list

3. So while doing SUBMIT in the z report, you can pass the values of those checkboxes (which ever you require) as 'X'.

eg.



report abc.

submit RM07MLBD

with matnr = '3'
with pa_wdzer = 'X'.

4. The checkboxes field names are:



 PARAMETERS : pa_wdzer    LIKE AM07M-MB5B_XONUL
                          modif id liu.
 PARAMETERS : pa_wdzew    LIKE AM07M-MB5B_XONUL
                          modif id liu.
 PARAMETERS : pa_wdwiz    LIKE AM07M-MB5B_XONUL
                          modif id liu.
 PARAMETERS : pa_wdwuw    LIKE AM07M-MB5B_XONUL
                          modif id liu.
 PARAMETERS : pa_wdwew    LIKE AM07M-MB5B_XONUL
                          modif id liu.
 PARAMETERS : pa_ndzer    LIKE AM07M-MB5B_XONUL
                          modif id liu.
 PARAMETERS : pa_ndsto    LIKE AM07M-MB5B_XONUL
                          modif id liu.

regards,

amit m.

p604431
Active Participant

Hi,

If you see in MB5B selection screen, there you find LIST SCOPE section in that many check are there for which has to be passed according to your requirement. see this example code

 SUBMIT RM07MLBD
             WITH DATUM IN S_BLDAT
             WITH WERKS IN S_WERKS
             WITH LGORT IN S_LGORT7
             WITH MATNR IN S_MATNR
             WITH XSUM  EQ ' '
             WITH LGBST EQ 'X'
             WITH BWBST EQ ' '
             WITH PA_SUMFL EQ 'X'
*******Scope of List
             WITH PA_WDZER EQ 'X'
             WITH PA_WDZEW EQ 'X'
             WITH PA_WDWIZ EQ 'X'
             WITH PA_WDWUW EQ 'X'
             WITH PA_WDWEW EQ 'X'
             WITH PA_NDZER EQ 'X'
             WITH PA_NDSTO EQ 'X'
             EXPORTING LIST TO MEMORY
             AND RETURN. 

0 Kudos

Hi Gokula ,

thanks , its a correct answer .

thanks,

sachin.

0 Kudos

hi Gokul,

Thanks for your information!!.