Skip to Content

OOPs ALV in background

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

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

4 Answers

  • Jun 28, 2017 at 04: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.

    Add comment
    10|10000 characters needed characters exceeded

  • Jun 28, 2017 at 01:52 AM
    -2

    Hi,

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

    Regards,

    Priyanka

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Jun 28, 2017 at 10: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.

    Add comment
    10|10000 characters needed characters exceeded

    • 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.

  • Jun 28, 2017 at 09: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

    Add comment
    10|10000 characters needed characters exceeded