‎2012 Oct 04 10:34 AM
Hi all
Is it possible to run ABAP program with subscreens area including ALV in background
the program is timing ou in foreground processing
Thanks
‎2012 Oct 04 11:02 AM
Hi Malu,
In subscreen area create one container (Custom or docking). You can create your alv there using CL_GUI_ALV_GRID class and set_table_for_first_display method of that class.
- Manish.
‎2012 Oct 04 11:02 AM
Hi Malu,
In subscreen area create one container (Custom or docking). You can create your alv there using CL_GUI_ALV_GRID class and set_table_for_first_display method of that class.
- Manish.
‎2012 Oct 04 12:30 PM
Hi, if u r using container, then u can not run program in back ground mode,Rather will get cancel. here is job log
| 04.10.2012 13:31:18 Job started | 00 | 516 | S |
| 04.10.2012 13:31:18 Step 001 started (program BCALV_GRID_11, variant &0000000000000, | 00 | 550 | S |
| 04.10.2012 13:31:18 Control Framework: Fatal error - GUI cannot be reached | DC | 006 | W |
| 04.10.2012 13:31:18 ABAP/4 processor: RAISE_EXCEPTION | 00 | 671 | A |
| 04.10.2012 13:31:18 Job cancelled | 00 | 518 | A |
‎2012 Oct 04 12:50 PM
Hi Vipin,
But how you'll display an alv in screen/subscreen without using containers. If you want to display alv in screen/subscreen, then you have to go for containers.
- Regards,
Manish Shankar.
‎2012 Oct 04 12:58 PM
‎2012 Oct 04 1:46 PM
Hi mansih
The program is fully working with subsscreen and container , it is working fine in the foreground but
I want to run it in the background because it times out.
Thanks
‎2012 Oct 04 3:36 PM
‎2012 Oct 04 6:13 PM
Yes, you have to check in the program if it is executed in background or not, then create or not the container and only then the alv grid.
* create container if online
IF cl_gui_alv_grid=>offline( ) is initial.
CREATE OBJECT g_dock. " docking container or container defined in subscreen
ENDIF.
* then create grid (orphan if background)
CREATE OBJECT g_grid
EXPORTING I_PARENT = g_dock.
Off course don't CALL SCREEN too in background
Regards,
Raymond
‎2012 Oct 04 6:34 PM
Just dont call the Sub-screen when the program is being executed in the background.
you can check if the program is running in the background by checking the system field SY-BATCH.
hope this helps
good luck
‎2012 Oct 05 8:00 AM
Hi again
I getting his error when runing in background
SET SCREEN not allowed in subscreens
this is my code
l_container_name(30) type c,
l_custom_container type ref to cl_gui_custom_container,
data:
customer_grid type ref to cl_gui_alv_grid,
l_container_name = 'MAT'.
create object l_custom_container
EXPORTING
container_name = l_container_name
....
create object customer_grid
EXPORTING
i_parent = l_custom_container.
call method customer_grid->set_table_for_first_display
EXPORTING
is_layout = ls_layout
i_save = 'A'
is_variant = ls_variant
it_toolbar_excluding = lt_excludes
CHANGING
it_sort = it_sort
it_outtab = it_dat
it_fieldcatalog = gtfc.
I hope you can help
‎2012 Oct 08 10:02 AM