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

ALV grid header formatting....

Former Member
0 Likes
527

Hi all,

I want to dispaly the header in the ALV grid output in such a way that 'From address' sholud come at left side of the report header and 'To address' should come at right side of the report header.

As of now both I am using the following code in the event 'HEADING' , both the things are coming at left side of the report header which is not desired.

So help me to display both the 'From address' and 'To address' things at opposite side the report header.

FORM HEADING.

wl_header-typ = 'S'.

wl_header-key = 'From address'.

wl_header-info = wa_adrc-name1.

APPEND wl_header TO tl_header.

CLEAR wl_header.

wl_header-typ = 'S'.

wl_header-info = city.

APPEND wl_header TO tl_header.

CLEAR wl_header.

wl_header-typ = 'S'.

wl_header-key = 'To address'.

wl_header-info = wa_adrc-name1.

APPEND wl_header TO tl_header.

CLEAR wl_header.

wl_header-typ = 'S'.

wl_header-info = city.

APPEND wl_header TO tl_header.

CLEAR wl_header.

ENDFORM.

Regards,

Sachin

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
461

Hi,

Try using WRITE statements to write in top of page instead of pass it to the header internal table. (U can give length specifications to write 'to address' in right side).

Just a suggestion. Hope this works.

Regards,

Ramya

Hi all,

I want to dispaly the header in the ALV grid output in such a way that 'From address' sholud come at left side of the report header and 'To address' should come at right side of the report header.

As of now both I am using the following code in the event 'HEADING' , both the things are coming at left side of the report header which is not desired.

So help me to display both the 'From address' and 'To address' things at opposite side the report header.

FORM HEADING.

wl_header-typ = 'S'.

wl_header-key = 'From address'.

wl_header-info = wa_adrc-name1.

APPEND wl_header TO tl_header.

CLEAR wl_header.

wl_header-typ = 'S'.

wl_header-info = city.

APPEND wl_header TO tl_header.

CLEAR wl_header.

wl_header-typ = 'S'.

wl_header-key = 'To address'.

wl_header-info = wa_adrc-name1.

APPEND wl_header TO tl_header.

CLEAR wl_header.

wl_header-typ = 'S'.

wl_header-info = city.

APPEND wl_header TO tl_header.

CLEAR wl_header.

ENDFORM.

Regards,

Sachin

2 REPLIES 2
Read only

Former Member
0 Likes
462

Hi,

Try using WRITE statements to write in top of page instead of pass it to the header internal table. (U can give length specifications to write 'to address' in right side).

Just a suggestion. Hope this works.

Regards,

Ramya

Read only

Former Member
0 Likes
461

Hi,

write statements will work only in case of list,block list,hierarchical sequential list display only .it will not work for the grid display.

for ur requirement u need to go for the OOALV(Object Oriented).

search for BCALV* programs in ur sap system for example program.

rgds,

bharat.