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: 

How to make full screen when i am using Custom Container In ALV Grid

former_member188685
Active Contributor
0 Kudos

Please tell me any one

How to make full screen when i am using Custom Container In ALV Grid Control

1 ACCEPTED SOLUTION

Former Member

Hello,

You don't need to create a custom container if your ALV is going to occupy the complete screen.

Use the following method and it will use full screen as container.

DATA: lr_grid             TYPE REF TO cl_gui_alv_grid.

  CREATE OBJECT lr_grid

    EXPORTING

      i_parent = cl_gui_container=>default_screen.

BR,

Sudharsan

29 REPLIES 29

Former Member
0 Kudos

Hi Vijay,

Just increase teh size of Container in the screen painter. This will help you to increase the size of Grid also.

Thanks & Regards,

Siri.

0 Kudos

Hi Srilatha,

I am able to do that, but it is looking very odd, i want it to be like normal report. or can u suggest is there any way to reduce the conatainer size dynamically.

thanks

vijay

0 Kudos

helpful

thanks.

Former Member
0 Kudos

Use Screen Painter and in sttributes change the screen size. This will increase the grid size.

0 Kudos

Hi,

Method exporting Parameter

In IS_LAYOUT Please set "CWIDTH_OPT" as 'X'. this automatically set the width of each column.

Try this.

0 Kudos

hi murthy i will tell u my problem with the grid control.

i am setting the screen size but when i am selecting only few fields then container is almost blank, rest with some fields if i want to avoid that either i will make it full screen so that u don't fell like it is blank. or dynamically reduce the size.

please tell me how to proceed.

thanks and regards

vijay

0 Kudos

I'm not sure if you can dynamically change the size of the container.

Regards,

Rich Heilman

0 Kudos

Vijay,

I feel having GRID inside a DOCKing container would help.

Have a look at the following thread:

Thanks

Kam

Message was edited by: Kam

0 Kudos

That was my next suggestion.

Regards,

Rich Heilman

0 Kudos

Hi ,

Is there any way to link GRID and Container

please let me know.

thanks

vijay

0 Kudos

What do you mean "link"?

Regards,

Rich Heilman

0 Kudos

Vijay,

Please have look in the Sample program present in the LINK(thread) mentioned in my previous postings. It should help.

Thanks

Kam

Message was edited by: Kam

0 Kudos

Try this method this will help.

CREATE OBJECT G_GRID

EXPORTING I_PARENT = G_CUSTOM_CONTAINER.

0 Kudos

Hi Kam,

The Report is already developed with Custom Container.

the Problem is when u exclude some fields from output

the container also should shrink.

is there any way to proceed.

thanks

vijay

0 Kudos

Vijay,

The following code was myself and Rich meant:

data : w_alv_grid type ref to cl_gui_alv_grid,

<b> w_docking_container type ref to cl_gui_docking_container.</b>

......

.....

if w_docking_container is initial.

perform create_objects.

endif.

.....

.....

----


  • Form create_objects

----


form create_objects.

<b> create object w_docking_container

exporting

extension = 1700

exceptions

cntl_error = 1

cntl_system_error = 2

create_error = 3

lifetime_error = 4

lifetime_dynpro_dynpro_link = 5

others = 6.

create object w_alv_grid

exporting

i_parent = w_docking_container.</b>

endform.

Check this...

Cheers,

Kam

Message was edited by: Kam

0 Kudos

Yep, looks like he doesn't want to change to DOCKING container. That's cool.

Please try using the SET_WIDTH method of class CL_GUI_ALV_GRID. It may solve your problem.



call method alv_grid->SET_WIDTH
      exporting
           WIDTH  =  20.



Regards,

Rich Heilman

0 Kudos

yeah Rich

i will try and let u know.

vijay

0 Kudos

Hi Rich,

No Difference

Thanks

vijay

0 Kudos

Hmm...... When are you calling this method, before or after the SET_TABLE_FOR_FIRST_DISPLAY?

Regards,

Rich Heilman

Former Member
0 Kudos

Hi Vijay,

when u go in screen painter & select custom container, Drag container fully according to screen.

It surely resolve ur problem.

Regards,

Digesh Panchal

former_member188685
Active Contributor
0 Kudos

Solved on its my own, taking the reference from Standard SAP program.

0 Kudos

Hi Vijay,

Can i have the referenced standrad program to resolve this problem?

How do we make the custom container size dynamic based on the resolution of screen. My problem is when I define size of container equavalent of Occupied screen size. But when i want to see in bigger screen(17" monitor) only defined area is displaying. It looks odd for me. Please suggest how do we resolve this problem.

Regards

Bhupal Reddy

0 Kudos

Hi Vijay

Could please post the solution?

0 Kudos

Given solutions are perfect for their cases.

Like  

pass extension in docking container as below

CREATE OBJECT o_docking

       EXPORTING

         extension = 2000.    "(A high valuewhich will cover the screen).

If there is single screen for display

use below code.

CREATE OBJECT o_grid

         EXPORTING

           i_parent cl_gui_container=>default_screen.


Again Thank you guys.

Former Member

Double click on custom_container and choose resizing vertical/horizontal and you will have a perfect screen

Former Member

Hello,

You don't need to create a custom container if your ALV is going to occupy the complete screen.

Use the following method and it will use full screen as container.

DATA: lr_grid             TYPE REF TO cl_gui_alv_grid.

  CREATE OBJECT lr_grid

    EXPORTING

      i_parent = cl_gui_container=>default_screen.

BR,

Sudharsan

0 Kudos

This is correct answer.
Thanks

0 Kudos

This helped me lot for my issue, thank you

Former Member
0 Kudos

hi experts.

i have an issue with my alv report.

while debugging the data are not coming into the internal table for single vendor no and whenever

i am executing without any vendor no specified the output comes the data of z table.

thanks.