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: 

Use of REUSE_ALV_LIST_DISPLAY with container

Former Member
0 Kudos

Hello,

i would like to affect an alv to a container using the fm REUSE_ALV_LIST_DISPLAY.

How does it works?

Thanks.

22 REPLIES 22

deependra_shekhawat3
Contributor
0 Kudos

Hi Dominique,

Why do  you need to use container for LIST DISPLAY . REUSE_ALV_LIST_DISPLAY itself provide a screen for output so why do you need to create container.

0 Kudos

in fact i need a screen with an alv and a button above.

0 Kudos

Can you please let us know what exactly you are trying to achieve.?

0 Kudos

You can see program BCALV_GRID_05.

0 Kudos

I've buidt an  alv using

lo_alvgrid->set_table_for_first_display.

In my screen there is two part : a button and a container to display the alv.

My program work fine, but now i need to freez the two first rows.

In this forum i've been told that the only way to do this is to use
the fm REUSE_ALV_LIST_DISPLAY.

0 Kudos

Hi

What exactly do you mean by Freeze?

0 Kudos

Hi

What exactly do you mean by Freeze?

0 Kudos

by freez i mean fixed ( the two first rows must not move and  stay at the top of the alv)

0 Kudos

Hi,

While creating the field catalog just make FIX_COLUMN = 'X' for those two columns which you want to fix.

Regards,

Supratik

0 Kudos

in fact i don't want to fix the columns but the rows.

0 Kudos

Hi,

Check LVC_S_FCAT structure

0 Kudos

I dont think you have a easy method to achieve it. But you can try by keeping 1st two rows in top of page of the ALV. other rows will be part of body row.

Regards,

Supratik

0 Kudos

it doesn't work, but thanks for your help.

0 Kudos

Try to fill the field NO_SCROLLING of structure SLIS_LAYOUT_ALV with "X".

http://scn.sap.com/thread/1869727


0 Kudos

You have to do a little bit of tweaking with cL_GUI_ALV_GRID

There is a method set_fixed_rows in class CL_GUI_ALV_GRID but it is protected. May be you redefine it in your local class but inherting it from based class or if you can set property Fixedrows of alv then also it can work.

Thanks

Nabheet

0 Kudos

i've already tried but it doesn't work.

0 Kudos

What exactly did you in this case? Can you please share us your approach

0 Kudos

in fact this works only with REUSE_ALV_GRID_DISPALY_LVC. But in my program i use

         CALL METHOD lo_alvgrid->set_table_for_first_display

Former Member
0 Kudos

HI,

In case of button u can use Status in Grid display.

vladimir_erakovic
Contributor
0 Kudos

Hi Dominique,

Check this discussion:

https://scn.sap.com/thread/970847

Hope it helps.

Regards

0 Kudos

Hi,

Use "REUSE_ALV_GRID_DISPALY_LVC" to achieve your both requirement.

(1) Please go through this link : "http://scn.sap.com/message/2905665#2905665"

(2) For Button Create a GUI Status call it in a subroutine and Pass subroutine name in "I_CALLBACK_PF_STATUS_SET" parameter of "REUSE_ALV_GRID_DISPALY_LVC".

Reward if useful.

With Thanks & Regards,

Tushar Trivedi.

vladimir_erakovic
Contributor
0 Kudos

Only solution that I can think of is to concatenate titles of columns and data of the first row and show it in alv header. Something like that.