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: 

ALV

Former Member
0 Kudos

Hai,

Can any one help me out

1. Is it possible to run ALV report in Background if Yes How

1 ACCEPTED SOLUTION

Former Member
4 REPLIES 4

Former Member

Former Member
0 Kudos

Former Member
0 Kudos

Hi,

Yes you can Run in Background but make sure it is alv list, not alv Grid FM. if you are uisng alv list not problem , but if you are using alv grid then you can code like this..

if sy-batch = ' '.

call 'REUSE_ALV_GRID_DISPLAY'.

else.

call 'REUSE_ALV_LIST_DISPLAY'.

endif.

if you are using OO alv then write this code..

CALL METHOD cl_gui_alv_grid=>offline

RECEIVING e_offline = off.

IF off IS INITIAL.

CREATE OBJECT g_custom_container

EXPORTING container_name = g_container.

ENDIF.

Former Member
0 Kudos

SM36 and schedule

or

Code:

&----


*& Module status_0100 OUTPUT

&----


MODULE status_0100 OUTPUT.

SET PF-STATUS 'MAIN100'.

SET TITLEBAR 'TB000'.

IF m_custom_container IS INITIAL.

*
For backgroung processing

IF cl_gui_alv_grid=>offline( ) IS INITIAL.

CREATE OBJECT m_custom_container

EXPORTING container_name = container_main.

CREATE OBJECT m_grid

EXPORTING i_parent = m_custom_container.

ELSE.

  • If it is in backround:

CREATE OBJECT m_grid

EXPORTING i_parent = m_doc_container.

ENDIF.

*// For backgroung processing

CALL METHOD m_grid->set_table_for_first_display

EXPORTING

i_structure_name = 'IT_MDPS'

is_layout = wa_layout

is_variant = wa_variant

i_save = 'A'

it_special_groups = it_fieldgroups

CHANGING

it_outtab = it_mdps

it_fieldcatalog = it_fieldcat.

CREATE OBJECT event_receiver.

SET HANDLER event_receiver->handle_hotspot_click FOR m_grid.

ELSE.

CALL METHOD m_grid->refresh_table_display

EXPORTING i_soft_refresh = 'X'.

ENDIF.

ENDMODULE. " status_0100 OUTPUT