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

Running Object Oriented ALV in background

Former Member
0 Likes
1,774

Hi, All,

I have a normal report in which i am displaying the output as a grid using object oriented ALV.

I have not created any screens for this.I am using Factory functions.

Now this program should also run in background.Is job scheduling in SM36 is enough or should I write any special code for this?

Thanks,

Sandeep.

5 REPLIES 5
Read only

Former Member
0 Likes
922

Hi,

No the OO ALV will take care of this and switch to a printed version in the background.

Darren

Read only

0 Likes
922

Hi Darren,

Do you mean to say that I can directly schedule the job in SM36?

Thanks,

Sandeep.

Read only

0 Likes
922

Hi,

Can any one please answer this question?

Thanks,

Sandeep.

Read only

jrgkraus
Active Contributor
0 Likes
922

You don't have to write additional code. Look at the example that SAP provides:


REPORT  SALV_DEMO_TABLE_REAL_SIMPLE.

data: gt_outtab type table of SFLIGHT.
data: gr_table  type ref to cl_salv_table.

*... Select data
  select * from SFLIGHT into corresponding fields of table gt_outtab.

*... Create Instance
  call method cl_salv_table=>factory
    IMPORTING
      R_SALV_TABLE = gr_table
    changing
      t_table      = gt_outtab.


*... Display table
  gr_table->display( ).

This program runs perfectly in background. The ALV class switches automatically to a list display when it discovers that it was called by a background task.

Best regards

Jörg

Read only

Former Member
0 Likes
922

Hi Jorg,

Thank you soo much for your suggestion.

It is very helpful.

Thanks,

Sandeep.