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: 

OOPs ALV in background

itabhishek9
Participant
0 Kudos

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

9 REPLIES 9

satyapriyanka_vana
Active Participant
0 Kudos

Hi,

Are you referring Top of Page as header box? What actually the header box contains?

Regards,

Priyanka

horst_keller
Product and Topic Expert
Product and Topic Expert

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.

matt
Active Contributor
0 Kudos

Interesting query though - how come docking containers are ok in background?

horst_keller
Product and Topic Expert
Product and Topic Expert

Maybe, as long as they are empty ...

bertrand_delvallee
Active Participant
0 Kudos

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

0 Kudos

Will this work in background?

0 Kudos

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

0 Kudos

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.

0 Kudos

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.