cancel
Showing results for 
Search instead for 
Did you mean: 

trigger a new-page in smartform

Former Member
0 Kudos

Hi SAP Gurus,

In a Costomized Smartform , i am having one page (page1) by which line items are printed page by page.

now i have a large scanned image of A4 size which is to be printed on the last page after printing all the line items.

for eg, i am having 15 line items which are printed in 3 pages then after that i need to print this graphic on a new page,

can anyone plz suggest!

Regards Pavan.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

U set a FLAG variable once u complete printing all the line items.

Create a New page for printing the LOGO

at the end of the page, create a COMMAND 'Go to New Page' (give name of new page), in condition tab give this FLAG = 'X'.

eg:

data : lv_count TYPE i,

lv_lines TYPE i,

lv_flag.

describe table itab lines lv_lines.

write the below code lines in Main window:

LOOP AT itab.

lv_count = lv_count + 1. ---> Counting the Line items in the LOOP

IF lv_count = lv_lines.

lv_flag = 'X'.

ENDIF.

Now, create a COMMAND, 'Go to New Page', give lv_flag = 'X' in Condition tab of the COMMAND.

ENDLOOP.

Hope it works!!

Rgds,

Pavan

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi,

Create a new page with a secondary window and put your A4 logo.

Give a condition for this window, only after end of main window.

Regards

Narasingam

alex_m
Active Contributor
0 Kudos

You create a Third page with image. Inside Main Window you create an COMMAND window and set a Condition 'Only After End of Main window' and set the property 'Go to New Page' as third page in command.

Former Member
0 Kudos

Thanks , now i am getitng the image at the last page .

Now , if i see the print preview it is showing fine , and print also coming fine ,

But if i download it into PDF , the windows in the first page are also displayed overlapping along with the image .

Note that the problem is only when i download into PDF.

Plz Help!

Regards Pavan