cancel
Showing results for 
Search instead for 
Did you mean: 

How to print header in first and last page only in SAPSCRIPT

Former Member
0 Kudos

Hi!

How to print header in first and last page only in SAPSCRIPT,

in between pages, I need to print all line items in MAIN window only .

Thanks in anticipation!

Aki.

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi All,

Thanks for your early update...but my requirement here is

I have two pages (FIRST , NEXT ) First is having Header, Main and Footer

NEXT is having Main and Footer ..I am printing PO here..let us think that my PO is having 20lines items , let us assume that it takes five pages...

Now how application is printing is ..first set of data is printing in FIRST page and remainiang data distributed to 4 pages printing in NEXT page ..but what my requirement is , I need fifth page print on FIRST page, instead of NEXT page... Ultimately I need last set of data always print in FIRST ie out of 5 pages 1st print on FIRST 2nd 3rd 4th print on NEXT and 5th print again on FIRST .

hope you this will clear you.

Thanks!

Former Member
0 Kudos

You can write simple logic :

  • First page

/: IF &PAGE(C)& = '1'

P1 use header information

/: ENDIF.

  • Last page

/: IF &PAGE(C)& = &SAPSCRIPT-FORMPAGES(C)

P1 use header information

/: ENDIF

Thanks

Seshu

Former Member
0 Kudos

Hi Akbar,

Write a condition for first page

if nextpage = total no. of page - 1.

for last page.

if nextpage = 0.

Hopes this helps you.

Ali