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: 

Problem while displaying top of page in list display

Former Member
0 Kudos
119

Hi,

M facing problem in displaying top of page in list .

M using following methods:-

lr_outer_grid TYPE REF TO cl_salv_form_layout_grid,

lr_inner_grid TYPE REF TO cl_salv_form_layout_grid,

lr_label TYPE REF TO cl_salv_form_label,

lr_text TYPE REF TO cl_salv_form_text.

For displaying the top of page m using event TOP_OF_PAGE.

CREATE OBJECT lr_outer_grid.

*Outer grid

lr_inner_grid = lr_outer_grid->create_grid(

row = 1

column = 1 ).

*... create lable information in inner_grid

  • User ID

lr_label = lr_inner_grid->create_label(

row = 1

column = 1

text = text-h03 ).

*... create text information in inner_grid

lr_text = lr_inner_grid->create_text(

row = 1

column = 2

text = sy-uname ).

*... set label for text

lr_label->set_label_for( lr_text ).

But while m going to do same coding for second parameter its not intializing length so adding extra spaces while displaying second row.

e.g

USERID abcdefghjik

PLANT jhk to hjk

I want that output should look like

USERID abcdefghjik

PLANT jhk to hjk

Please tell me the solution what should i do for avoiding extra space

1 ACCEPTED SOLUTION

Former Member
0 Kudos
98

Hi Neelema,

You could try this sample code.

[http://sap-img.com/fu037.htm]

[http://sap-img.com/abap/sample-alv-heading-in-alv.htm]

Regards,

Amit.

3 REPLIES 3

Former Member
0 Kudos
99

Hi Neelema,

You could try this sample code.

[http://sap-img.com/fu037.htm]

[http://sap-img.com/abap/sample-alv-heading-in-alv.htm]

Regards,

Amit.

0 Kudos
98

Hi ,

Thanks for your reply,

But can we use same thing for List display.

Becuase i have to use CALL FUNCTION 'REUSE_ALV_HIERSEQ_LIST_DISPLAY'

so can we use this method for same function module.

0 Kudos
98

hi,

Please check this demo program BALVHD01.

the below link has list of ALV demo programs [list|http://sample-code-abap.blogspot.com/2008/06/sampledemo-code-availble-in-sap.html]

Thank you.

Hope the content is helpfull.