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: 

Create colum headings using text elements

Former Member
0 Kudos

Hi Experts,

I want to create column heading of a report using text element, how can i create create column headings using text elements and how can i use in the top-of-page event.

Thanks

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi Phani,

You can use the text elements directly in the top-of-page event and create the headings.

For eg,

under the top-of-page event, you can enter the following code,

write: / 'Report :', sy-cprog,

at l_pos_t1 text-001,

at l_pos_end 'Date:', sy-datum,

/ 'Sys/Cli:', (03) sy-sysid, '/', sy-mandt,

at l_pos_t2 i_title2,

at l_pos_end 'Time:', sy-uzeit,

/ 'UserID :', sy-uname,

at l_pos_t3 text-003,

at l_pos_end text-004 , (4) sy-pagno no-sign,

'of', (4) v_pagex no-sign.

Regards,

Vik

3 REPLIES 3

Former Member
0 Kudos

Hi Phani,

You can use the text elements directly in the top-of-page event and create the headings.

For eg,

under the top-of-page event, you can enter the following code,

write: / 'Report :', sy-cprog,

at l_pos_t1 text-001,

at l_pos_end 'Date:', sy-datum,

/ 'Sys/Cli:', (03) sy-sysid, '/', sy-mandt,

at l_pos_t2 i_title2,

at l_pos_end 'Time:', sy-uzeit,

/ 'UserID :', sy-uname,

at l_pos_t3 text-003,

at l_pos_end text-004 , (4) sy-pagno no-sign,

'of', (4) v_pagex no-sign.

Regards,

Vik

Former Member
0 Kudos

HI,

For your requirement you have to use a lot of text elements with write statement.

for all the text elemtns assign some text and activate them.

For Example:

WRITE:/1 text-001, 20 text-002, 40 text-003.

During double clinking on each element it will ask the for some description.

Give some suitable description and activate it.

Do for all elements.

Regds,

Anil

Former Member
0 Kudos

Hi,

1 For Creating Text Element,

go to Se38 -


> Write Name of the Program - > Click Change button -


> Then go to GoTo on Menu Bar--> text Elements

-


> Select Text Symbol

In First Column( Sym) Write any Number which is not used like 001, 002.....

In Second Column (Text) write in text or description .... like Sales Order....

U can use this text Symbol in code -


> text-001, text-002.....

2 In order to insert a report heading in to the ALV grid you need to perform the following steps:

1. Update 'REUSE_ALV_GRID_DISPLAY' FM call to include 'top-of-page' FORM

2. Create 'top-of-page' FORM

3 In order to add event functionality such as 'END_OF_PAGE' to the ALV grid you need to setup the

IT_EVENTS option of the ALV function module. Also depending on which event you are using you

may also need to setup the print parameters by activating the IS_PRINT option. Please note for events

such as end_of_page, end_of_list etc they will not be displayed on screen but only in the printed

output.

Step 1. Add data declaration for events and print parameters

Step 2. Update 'REUSE_ALV_GRID_DISPLAY' FM call to include parameter 'it_events' and 'is_print'

Step 3. Add code to setup events table and print parameters

Step 4. Create event FORM(s), which are executed when event is triggered

Thanks & Regards,

ShreeMohan