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 grouping columns

Former Member
0 Likes
408

my reqirment is to group the columns under different headings. For example

Normal vendor | Partner Function |

Vendor |Name1|CCode | Funct |Vendor | Name1 |

Please provide me the sample code accourding to my reqirement.

Points will be awarded.

Saya

my reqirment is to group the columns under different headings. For example

Normal vendor | Partner Function |

Vendor |Name1|CCode | Funct |Vendor | Name1 |

Please provide me the sample code accourding to my reqirement.

Points will be awarded.

Saya

2 REPLIES 2
Read only

Former Member
0 Likes
377

Hi Saya,

Check sample code it may be helpful to u

How to make ALV header like this?

Header long text 1 Header long text 2 Header long text 3

Col_1 Col_2 Col_3 Col_4 Col_5 Col_6 Col_7 Col_8 Col_9

-


Cell conents -


-


Cell conents -


-


Cell conents -


-


Cell conents -


-


Cell conents -


data: gt_list_top_of_page type slis_t_listheader. " Top of page text.

Initialization.

perform comment_build using gt_list_top_of_page[].

form top_of_page.

  • Note to self: the gif must be loaded into transaction OAOR with

  • classname 'PICTURES' AND TYPE 'OT' to work with ALV GRID Functions.

  • I Loaded NOVALOGO2 into system.

call function 'REUSE_ALV_COMMENTARY_WRITE'

exporting

  • I_LOGO = 'NOVALOGO2'

  • i_logo = 'ENJOYSAP_LOGO'

it_list_commentary = gt_list_top_of_page.

endform. " TOP_OF_PAGE

form comment_build using e04_lt_top_of_page type slis_t_listheader.

data: ls_line type slis_listheader.

clear ls_line.

ls_line-typ = 'A'.

ls_line-info = 'Special'(001).

fgrant = xgrant.

concatenate ls_line-info fgrant

'Stock Option Report to the board'(002)

into ls_line-info separated by space.

condense ls_line-info.

append ls_line to e04_lt_top_of_page.

endform. " COMMENT_BUILD

How to implement a footer in alv grid programming? What is the procedure and the code regarding to create a footer?

Use following syntex for footer print in alv:

  • For End of Page

form END_OF_PAGE.

data: listwidth type i,

ld_pagepos(10) type c,

ld_page(10) type c.

write: sy-uline(50).

skip.

write:/40 'Page:', sy-pagno .

endform.

  • For End of Report

form END_OF_LIST.

data: listwidth type i,

ld_pagepos(10) type c,

ld_page(10) type c.

skip.

write:/40 'Page:', sy-pagno .

endform.

http://help.sap.com/saphelp_erp2005/helpdata/en/b5/ac884118aa1709e10000000a155106/content.htm

Read only

0 Likes
377

hi Reddy,

I can able to group the columns but i want to know how to create heading to that group. Eg. Normal Vendor (as provided in the early post)

Saya