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: 

to schedule alv in backgroundz

Former Member
0 Kudos
332

hi,

how can i schedule the alv in background? please clarify my doubt on this.

8 REPLIES 8

athavanraja
Active Contributor
0 Kudos
131

is it your custom ALV program or standard alv program?

its the normal way using transaction SM36

Regards

Raja

0 Kudos
131

this is standard alv

Vinod_Chandran
Active Contributor
0 Kudos
131

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

Former Member
0 Kudos
131

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.

0 Kudos
131

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

0 Kudos
131

Are you facing any problem when running it in background?

can you give us the program name.

Regards

Raja

Former Member
0 Kudos
131

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

Former Member
0 Kudos
131

if sy-batch = 'X'.

coding for simple ALV list.

endif.

regards