cancel
Showing results for 
Search instead for 
Did you mean: 

reports

Former Member
0 Kudos

Hi..

could some tell me how to get a header and footer on a report, do we need to write any include program.

cheers

Srikanth

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi There,

If I'm not wrong you are talking about ABAP report.

In ABAP report there is no concept of Header & Detail as such. You have to program in the way to make a set of data as Header & Detail.

Say eg.

DATA : wa_ekko LIKE EKKO,

wa_ekpo LIKE EKPO,

ist_ekpo LIKE STANDARD TABLE OF EKPO.

SELECT * FROM EKKO

INTO CORRESPONDING FIELDS OF wa_ekko

WHERE EBELN = 1.

SELECT * FROM EKPO

INTO CORRESPONDING FIELDS OF TABLE ist_ekpo

WHERE EBELN = 1.

WRITE : wa_ekko-ebeln.

LOOP AT ist_ekpo INTO wa_ekpo.

WRITE : wa_ekpo-ebeln, wa_ekpo-ebelp.

ENDLOOP.

Regards,

Deva.

RichHeilman
Developer Advocate
Developer Advocate
0 Kudos

Here is a sample.....pay close attention to the LINE-COUNT statement.



report zrich_0003
      no standard page heading
      line-size 132
      <b>line-count 65(3).</b>


start-of-selection.

  do  100 times.
    write:/ sy-index.
  enddo.

top-of-page.

  write:/ 'This is the header'.


end-of-page.


  write:/ 'This is the footer'.


If this was helpful, please remember to award points accordingly. Thanks.

Regards,

Rich Heilman

Answers (2)

Answers (2)

Lakshmant1
Active Contributor
0 Kudos

Hi Srikanth,

Have a look at demo programs

DEMO_LIST_PAGE_HEADING

DEMO_LIST_END_OF_PAGE

Thanks

Lakshman

RichHeilman
Developer Advocate
Developer Advocate
0 Kudos

Use events. TOP-OF-PAGE and END-Of-PAGE.

Regards,

Rich Heilman

Former Member
0 Kudos

One more thing whenever you use end-of-page.

Don't forget to reserve the lines on start.

Like this LINE-SIZE 40 LINE-COUNT 8(2)

Reg,

Arpit