cancel
Showing results for 
Search instead for 
Did you mean: 

SAP SCRIPT ..PRINTING A GRAPHIC IN LAST PAGE

Former Member
0 Kudos

Hello Everyboy.

First time implementing sap script and I have a problem.

I need to print a graphic in the last page of my sap script.

Some times the document that I want to print may have more than one page and it´s very important to print the graphic only in the last page....

As an example if the document has one page when i print the page , the graphic appears in this page.

If I print 2 pages , the graphic must appear in the last page , I mean the page 2.

If I print 3 pages , the graphic must appear in the last page , I mean the page 3.

Any ideas ,

Thanks a lot

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi stan,

page1 : page1(next page)

page2 : page 2(blank)

Page 2 : include the logo

In the print program

at last.

call function 'CONTROL_FORM'

exporting

command = 'NEW-PAGE PAGE2'

exceptions

unopened = 1

unstarted = 2.

endat.

Regards,

Sravanthi

Former Member
0 Kudos

Hi,

Use system variable &NEXTPAGE&

IF &NEXTPAGE& = 0

then print.GRAPHIC

Regards

Stu

Former Member
0 Kudos

With this code

/E LAST**

/: BITMA 'graphic' OBJECT GRAPHICS ID BMAP TYPE BMON**

The graphip appears as I want ..but in the left.. I implement it in the main window.

Now I want to align it in the right because it´s like a signature but i don´t know how to do it...

Is there any command to align graphic ?

Thanks a lot

former_member585060
Active Contributor
0 Kudos

Hi,

You create a Constant type window and wrute your code as below,

/E LAST

/: IF &NEXTPAGE& EQ 0

/: BITMA 'graphic' OBJECT GRAPHICS ID BMAP TYPE BMON

/: ENDIF

1) As far as your alignment, open the SAPScript in SE71

Menubar> Settings> Form Painter

Check the Graphical Form Painter, it will open your page layout,

Just move the COnstant window to which place you want to be aligned.

After that again Menubar> Settings> Form Painter,

Uncheck Graphical Form Painter.

Save and Activate.

2) Regarding printing graphic in Mainwindow, most of the system variables or symbols won't work in Mainwindow. I mean &NEXTPAGE& will not work in Main window. So better use other windows to check any condition.

Regards

Bala Krishna

Former Member
0 Kudos

Hi all

I have done it as indicated ..

1- create a constant window.

2- I have aligned it in the right as I want

3- I have put the codes :

/E LAST

/:iF &NEXTPAGE& EQ 0

/:BITMAP "Graphic" OBJECT GRAPHICS ID BMAP TYPE BMON

/:ENDIF

But it didn´t work ......The graph doesn´t appear...

***************************************************************

The original implementation that I have made in the main

window with this code :

/E LAST

/:BITMAP "Graphic" OBJECT GRAPHICS ID BMAP TYPE

shows the graphic but it appears at the left and I want it in the rght side .

*************************************************************

More suggestions please !!!!