Skip to Content
author's profile photo Former Member
Former Member

i need header with page no's to every Pages

Hi Experts,

i need header with page no's with this logic.

it came one header and one page no. to every pages.

FORM COMMENT_BUILD USING LT_TOP_OF_PAGE TYPE

SLIS_T_LISTHEADER.

DATA: LS_LINE TYPE SLIS_LISTHEADER.

DATA: LV_PAGE_STRING(11),

lv_page_no(3).

pagno = sy-pagno.

data: pagno(5) type c.

CLEAR

ls_line.

refresh lt_top_of_page.

CLEAR

ls_line.

ls_line-typ = 'A'.

LS_LINE-key = 'Page Number'.

PAGNO = sy-pagno.

IF

PAGNO = 0.

PAGNO = 1.

ENDIF.

SHIFT PAGNO LEFT DELETING LEADING space.

LS_LINE-INFO = PAGNO.

APPEND LS_LINE TO LT_TOP_OF_PAGE.

CLEAR LS_LINE.

LS_LINE-TYP = 'H'.

LS_LINE-INFO = TEXT-001.

APPEND LS_LINE TO LT_TOP_OF_PAGE.

CLEAR LS_LINE.

LS_LINE-TYP = 'A'.

SELECT SINGLE * FROM T001W WHERE

WERKS IN WERKS.

CONCATENATE 'Name Of The Plant ' '-' T001W-NAME1 INTO

TXT SEPARATED BY SPACE.

LS_LINE-INFO = TXT.

APPEND LS_LINE TO LT_TOP_OF_PAGE.

CLEAR:TXT, LS_LINE.

LS_LINE-TYP = 'H'.

LS_LINE-INFO = TEXT-002.

APPEND LS_LINE TO LT_TOP_OF_PAGE.

CLEAR LS_LINE.

IF WERKS-HIGH EQ SPACE.

CONCATENATE 'Plant : ' WERKS-LOW INTO TXT.

ELSE.

CONCATENATE 'FROM PLANT : ' WERKS-LOW 'TO PLANT : ' WERKS-HIGH INTO TXT SEPARATED BY SPACE.

ENDIF.

LS_LINE-TYP = 'H'.

LS_LINE-INFO = TXT.

APPEND LS_LINE TO LT_TOP_OF_PAGE.

IF BUDAT-HIGH EQ SPACE. BUDAT-HIGH = BUDAT-LOW.

ENDIF.

CONCATENATE 'Date : From ' BUDAT-LOW6(2) '-' BUDAT-LOW4(2) '-'

BUDAT-LOW0(4) 'to' BUDAT-HIGH6(2) '-'

BUDAT-HIGH4(2) '-' BUDAT-HIGH0(4) INTO

TXT SEPARATED BY SPACE.

CLEAR LS_LINE.

LS_LINE-TYP = 'A'.

LS_LINE-INFO = TXT.

APPEND LS_LINE TO LT_TOP_OF_PAGE.

ENDFORM.

Thanks & Regards.

Sreedhar.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Oct 19, 2006 at 11:16 AM

    Hi Sreedhar,

    you are not mentioned which FM ur using for report display. The ALV reports will be displayed as single page on output. but when u print this report then this report will be splited into the pages.

    Test the program while printing the report.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Oct 20, 2006 at 07:52 AM

    i am using the REUSE_ALV_HIERSEQ_LIST_DISPLAY Functional

    Module

    i.e

    CALL FUNCTION 'REUSE_ALV_HIERSEQ_LIST_DISPLAY'

    EXPORTING

    I_CALLBACK_PROGRAM = GT_REPID

    IS_LAYOUT = GT_LAYOUT

    IT_FIELDCAT = GT_FIELDCAT[]

    IT_SPECIAL_GROUPS = GT_SP_GROUP[]

    IT_SORT = GT_SORT[]

    I_SAVE = G_SAVE

    IS_VARIANT = G_VARIANT

    IT_EVENTS = GT_EVENTS[]

    I_TABNAME_HEADER = G_TABNAME_HEADER

    I_TABNAME_ITEM = G_TABNAME_ITEM

    IS_KEYINFO = GS_KEYINFO

    TABLES

    T_OUTTAB_HEADER = IT_HEADER

    T_OUTTAB_ITEM = INT_DATA.

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.