cancel
Showing results for 
Search instead for 
Did you mean: 

How to make TOP_OF_LIST as left justify

nandishm
Participant
0 Kudos

Hi.....

In one of requirement i have used   TOP_OF_LIST  of alv ,  its coming at the center of the alv

EX :-

halign is set to begibOfLine ( I also tried with forcedLeft ) but its coming in center .

I have use one container, alv is bind in that container.

I need it at the left side of the page

.

Accepted Solutions (0)

Answers (1)

Answers (1)

ramakrishnappa
Active Contributor
0 Kudos

Hi Nandish,

You need to create a grid with no. of columns and rows which fits your result table. Using column no. you can set the header data.

Let us say you have divided your area into 3 columns, then to keep it left, use the column1.

Please refer the below links

http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/b0ee06d0-d475-2b10-ddad-bc4bf134c...

TOP OF LIST in ALV - Web Dynpro ABAP

Hope this helps you.

Regards,

Rama

nandishm
Participant
0 Kudos

Hi Ramakrishnappa...

I have used GRID only

Used below code

lr_value1 = lr_grid->create_text(

                row = 1

                column = 2

                text = 'XYZ' ).

   lr_value = lr_grid->create_label(

               row = 1

               column = 1

               text = 'COMPANY:'

               r_label_for = lr_value1 ).

   lr_value1 = lr_grid->create_text(

              row = 2

              column = 2

              text = sy-uname ).

   lr_value = lr_grid->create_label(

               row = 2

               column = 1

               text = 'DEVELOPER:'

               r_label_for = lr_value1 ).

ramakrishnappa
Active Contributor
0 Kudos

Hi Nandish,

You need to divide the grid first.

Add the below code before your code

CREATE OBJECT lr_grid

  EXPORTING

  columns = 6.

Here, you are using only 2 columns and rest 4 columns would just occupy the empty space.

Hope this helps you.

Regards,

Rama