04-20-2006 7:48 PM
HI Group,
when I am using ALV for the reports I created header and footers.In both I created some information like
in Header:
Report
date
time
these information I need in the same line ,when I am using concatenate statement it is giving only one space I need 2 tab spaces in between each field,I also used CL_ABAP_CHAR_UTILITIES=>HORIZONTAL_TAB,but its not working.In the footer also same I need.Please suggest
04-20-2006 8:01 PM
Hi
use the following statement and pass two spaces in <b>SEPARATOR</b>
<b>CONCATENATE ONE TWO THREE INTO NAME
SEPARATED BY SEPARATOR.</b>
hope it may work.
regards,
Sunil.
04-20-2006 8:09 PM
Hi,
u can use the following code.
<b>DATA: ONE(10) VALUE 'John',
TWO(3) VALUE 'F.',
THREE(10) VALUE 'Kennedy',
NAME(40),
SEPARATOR(6) TYPE C..
SEPARATOR = ''.
CONCATENATE ONE TWO THREE INTO NAME SEPARATED BY SEPARATOR.</b>
regards,
sunil
04-20-2006 8:14 PM
Hi,
Create a class for event receiver with reference to cl_event_receiver.
Now define public section for this class and define a method below.
CLASS cl_event_receiver DEFINITION.
PUBLIC SECTION.
Define a method for TOP-OF-PAGE event .
METHODS:
handle_top_of_page
FOR EVENT print_top_of_page OF cl_gui_alv_grid.
ENDCLASS. "cl_event_receiver DEFINITION
Now in the implementation part of this class, code WRITE statements that you want to be displayed at top of page, for example...
CLASS cl_event_receiver IMPLEMENTATION.
METHOD handle_top_of_page.
WRITE:/ 'Program:', sy-cprog.
POSITION l_center_start.
WRITE t001-butxt.
POSITION l_right_align.
WRITE: 'Page:',
im_pagno USING EDIT MASK 'LL_______' NO-
GAP, ' '.
Calculate center and right positions for the second
line
l_title_length = STRLEN( title ).
l_center_start = ( sy-linsz - l_title_length ) / 2 +
1.
l_right_align = sy-linsz - 15.
Write the second header line using the positions
calculated
WRITE: / 'Run by :', sy-uname.
l_avl_text = sy-linsz - 43.
IF l_title_length > l_avl_text.
ENDMETHOD. "handle_top_of_page
ENDCLASS.