2005 Aug 29 7:42 AM
hi,
how can i schedule the alv in background? please clarify my doubt on this.
2005 Aug 29 7:45 AM
is it your custom ALV program or standard alv program?
its the normal way using transaction SM36
Regards
Raja
2005 Aug 29 7:49 AM
2005 Aug 29 7:49 AM
Hi,
There are multiple options for this.
1. In the selection screen of the ALV report you can use the menu "Program -> Execute in Background" to schedule the program in background.
2. Using transction SM36. Create a job here and give your program in 'STEP'. Please let me know if you want more information on this.
3. Another option is to use the function modules 'JOB_OPEN', 'JOB_CLOSE' etc.
Please let me know which option you selected, so that I can give you more information.
Thanks
Vinod
2005 Aug 29 7:49 AM
U can run ALV in background by presiing F9 instead of F8 and schedule the job.
Then goto<b> SM36 or SM37</b> and see the jobs scheduled and if it runs successfully it will be having a spool if u have a look at the spool u can find the list created for the ALV report.
While creating container add this
* IF Program Running in Background, place a container.
IF sy-batch = 'X'.
CREATE OBJECT o_alvgrid
EXPORTING
i_parent = o_dockingcontainer. (docking_container)
ENDIF.
Hope this helps.
2005 Aug 29 7:58 AM
Generally if you run the alv program in back ground it will give you dump. This is because of dynamic creation of objects.
For this you need to create objects based on the running mode. Check the following code for the object creation.
<b>IF CL_GUI_ALV_GRID=>OFFLINE() IS INITIAL.
IF OBJ_CUSTOM_CONTAINER IS INITIAL.
CREATE OBJECT OBJ_CUSTOM_CONTAINER
EXPORTING
CONTAINER_NAME = '____'.
ENDIF.
IF OBJ_ALV_GRID IS INITIAL.
CREATE OBJECT OBJ_ALV_GRID
EXPORTING
I_PARENT = OBJ_CUSTOM_CONTAINER.
ENDIF.
ELSE.
CREATE OBJECT OBJ_ALV_GRID
EXPORTING
I_PARENT = OBJ_CUSTOM_CONTAINER.
ENDIF.</b>
Hope this helps.
Regards,
Suvan
2005 Aug 29 7:58 AM
Are you facing any problem when running it in background?
can you give us the program name.
Regards
Raja
2005 Aug 29 7:57 AM
Hi,
Using SM36 you can schedule the job for alv. First create a variant for that alv report, goto SM36 specify job name and job class, then goto steps there you mention report program name and varient then execute the job.
Cheers,
Sasi
2005 Aug 29 8:34 AM