Application Development and Automation 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: 
Read only

Problem with ALV using OOPs.

Former Member
0 Likes
642

Hi,

I want to display the ALV in full screen using container(OOPs) .

I am using

DATA: lw_container TYPE REF TO cl_gui_custom_container,
        lw_grid TYPE REF TO cl_gui_alv_grid,
        g_container TYPE scrfname VALUE 'CHANGE'.


  IF lw_container IS INITIAL.
    CREATE OBJECT lw_container
      EXPORTING
        container_name = g_container.

    CREATE OBJECT lw_grid
      EXPORTING
        i_parent = lw_container.

    PERFORM fieldcat_alv_build.

    CALL METHOD lw_grid->set_table_for_first_display
      EXPORTING
        i_structure_name = 'I_OUTPUT_ALV'
      CHANGING
        it_outtab        = I_OUTPUT_ALV[]
        it_fieldcatalog  = i_fieldcat[].

I Have searched through the SDN but could not get the solution for this problem.

Please let me know how to make th ALV in fullscreen.

Thanks & Regards

Subha

<Added code tags>

Edited by: Suhas Saha on Aug 29, 2011 1:04 PM

1 ACCEPTED SOLUTION
Read only

Kiran_Valluru
Active Contributor
0 Likes
570

Hi,

You can increase the container size in your screen.,

esle,

instead of .,

creating custom container, just create screen and activate it,,

now instead of.,

DATA: lw_container TYPE REF TO cl_gui_custom_container,
>         lw_grid TYPE REF TO cl_gui_alv_grid,
>         g_container TYPE scrfname VALUE 'CHANGE'.
> 
> 
>   IF lw_container IS INITIAL.
>     CREATE OBJECT lw_container
>       EXPORTING
>         container_name = g_container.
> 
>     CREATE OBJECT lw_grid
>       EXPORTING
>         i_parent = lw_container.

use.,

DATA: lw_container TYPE REF TO cl_gui_custom_container,
>         lw_grid TYPE REF TO cl_gui_alv_grid.         
> 
>     CREATE OBJECT lw_grid
>       EXPORTING
>         i_parent = cl_gui_custom_container=>screen0.   " standard screens  

hope this helps u.,

Thanks & Regards,

Kiran

4 REPLIES 4
Read only

Former Member
0 Likes
570

The container is adjusted using the screen painter. I think there are restrictions in displaying it in the full screen.

Read only

Former Member
0 Likes
570

Please check the program :

BCALV_FULLSCREEN_GRID_EDIT.

BCALV_TEST_FULLSCREEN.

use BCALVTESTFULLSCREEN* or BCALVFULLSCREEN --> also give programs related to Fullscreen.

Hope this will be helpful..

Regards

Aravind.

Read only

SuhaSaha
Product and Topic Expert
Product and Topic Expert
0 Likes
570

Hello Subha,

If you've built the fieldcatalog in the subroutine fieldcat_alv_build, then you should not pass any value to the EXPORT'ing param i_structure_name.

Remove that param & check. If this doesn't help much, run an ALV consistency check & report your observations here.

BR,

Suhas

Read only

Kiran_Valluru
Active Contributor
0 Likes
571

Hi,

You can increase the container size in your screen.,

esle,

instead of .,

creating custom container, just create screen and activate it,,

now instead of.,

DATA: lw_container TYPE REF TO cl_gui_custom_container,
>         lw_grid TYPE REF TO cl_gui_alv_grid,
>         g_container TYPE scrfname VALUE 'CHANGE'.
> 
> 
>   IF lw_container IS INITIAL.
>     CREATE OBJECT lw_container
>       EXPORTING
>         container_name = g_container.
> 
>     CREATE OBJECT lw_grid
>       EXPORTING
>         i_parent = lw_container.

use.,

DATA: lw_container TYPE REF TO cl_gui_custom_container,
>         lw_grid TYPE REF TO cl_gui_alv_grid.         
> 
>     CREATE OBJECT lw_grid
>       EXPORTING
>         i_parent = cl_gui_custom_container=>screen0.   " standard screens  

hope this helps u.,

Thanks & Regards,

Kiran