2006 Jul 28 6:50 AM
a zreport which is gives stock report and mrp and some data. It is IS retail so the materials are huge. i need to run this program on in background even if it is intended to run ionf oreground. pls suggest
2006 Jul 28 6:52 AM
Hi navid,
1. simple
2. sy-batch
3. Use this variable
it will contain 'X'
only if the program is run in background
4. START-OF-SELECTION.
IF SY-BATCH IS INITIAL.
MESSAGE 'CANNOT RUN IN FOREGROUND' TYPE 'I'.
LEAVE LIST-PROCESSING.
ENDIF.
regards,
amit m.
a zreport which is gives stock report and mrp and some data. It is IS retail so the materials are huge. i need to run this program on in background even if it is intended to run ionf oreground. pls suggest
2006 Jul 28 6:51 AM
Hi Navid
Create a background job in SM35, schedule it in SM36.
You can view the status in SM37.
Reward points if found useful
Regards
Inder
2006 Jul 28 6:53 AM
hi indrajeet. in the company there are many users who will be running this report and are not that patient or co operative to do waht you say. i am sking for a some function module which will by default run it in background come waht may. please suggest on those grounds
2006 Jul 28 6:52 AM
Hi navid,
1. simple
2. sy-batch
3. Use this variable
it will contain 'X'
only if the program is run in background
4. START-OF-SELECTION.
IF SY-BATCH IS INITIAL.
MESSAGE 'CANNOT RUN IN FOREGROUND' TYPE 'I'.
LEAVE LIST-PROCESSING.
ENDIF.
regards,
amit m.
2006 Jul 28 7:00 AM
thank you amit,
i hide tired it but my mistake was i used ' if sy-batch
= ' '. and not in start of selection and so it used to stop any processing. silly mistake
2006 Jul 28 6:57 AM
Write a statement like
REPORT ZTEST MESSAGE-ID ZZ..
PARAMETERS: MATNR LIKE MARA-MATNR.
INITIALIZATION.
IF SY-BATCH = SPACE.
MESSAGE E001 WITH 'NOT IN BACKGROUND'.
ENDIF.
START-OF-SELECTION.
WRITE : MATNR.If you want to see the screen you could write the condition in at- selection screen.
cheers,
TM
2006 Jul 28 6:59 AM