05-23-2007 8:25 AM
Hi all,
I have requirement to execute a report in background processing.I have to create report using classes.
Iam using class cl_gui_alv_grid for creating report.When iam executing report in background am getting Fatal errror-GUI can not be reached.
Regards,
Srilatha.
05-23-2007 10:40 AM
Hi,
The issue is bcz. in background screen container is not recognized.
Change the code as follows:
SET PF-STATUS 'SCREEN_100'.
SET TITLEBAR 'xxx'.
<b>*if program is run in background
CALL METHOD cl_gui_alv_grid=>offline
RECEIVING
e_offline = off.
IF off IS INITIAL.
IF container1 IS INITIAL.
CREATE OBJECT container1
EXPORTING
container_name = 'CC_ALV1' .
ENDIF.
ENDIF.
CREATE OBJECT g_grid1
EXPORTING
i_parent = container1.</b>
PERFORM prepare_field_catalog.
PERFORM exclude_button.
PERFORM display_alv.
Best regards,
Prashant
05-23-2007 12:33 PM
Hi Prashant,
Thanks for your reply.
I had one doubt in that code.what the subroutine PERFORM exclude_button will do??
Please explain.
regards,
Srilatha.