06-27-2017 6:38 PM
Hi SDNites,
I have a requirement where I need to have a Header Box and ALV to be displayed in output. I should be able to execute the ALV in background as well.
I have written the program using OOPs ALV. When I use docking container I am able to execute the OOPs ALV in background. But in order to have Header Box, I tried splitter which works fine in foreground but not in background. Then I tried to build 2 containers and in Header box container, I wanted to use CL_GUI_TEXT_EDIT to display only text. Please advise if this can work or also this cannot be executed in background.
Any other approach to make it work using OOPs ALV will be welcomed.
Regards,
Abhi
06-28-2017 2:52 AM
Hi,
Are you referring Top of Page as header box? What actually the header box contains?
Regards,
Priyanka
06-28-2017 5:55 AM
Usage of CFW requires SAP GUI. Programs using CFW cannot be executed in background. You must program it in such a way that CFW is only called if GUI is available which can be checked with FM gui_is_available.
06-29-2017 8:13 AM
Interesting query though - how come docking containers are ok in background?
06-29-2017 8:36 AM
06-28-2017 10:37 AM
Hello,
You should try to handle events "print_top_of_page" and "top_of_page" from cl_gui_alv_grid.
Please, have a look at this thread : https://archive.sap.com/discussions/thread/836692
Best regards,
Bertrand
06-28-2017 11:32 AM
06-28-2017 1:34 PM
Yes.
The trick is to create 2 top-of-page methods : one for foreground (HTML ready) and one for background (text + basic SAP colors only).
You should have a look there for ideas : http://abap-explorer.blogspot.fr/2008/12/demo-program-for-top-of-page-for-alv.html
Best regards,
Bertrand
06-28-2017 11:21 AM
CL_GUI_TEXT_EDIT can not run in background, as Horst stated, in background you need Control Framework ( CFW ) this handles the communication(synchronization) between Abap Object and Object @frontend in SAPGUI: That is usually an ActiveX object(if you run Windows). In Back Ground there is no front end!
Best regards, Robin.
06-28-2017 11:36 AM
As I have used docking container to execute ALV in background, can't we have an approach where we can use CL_GUI_TEXT_EDIT in background as well. If yes, some reference will be of great help.