cancel
Showing results for 
Search instead for 
Did you mean: 

How to get PrintOut in Smatforms From Page to To Page Ex.Page 5 to page 8

0 Kudos

Hi,

i am facing a problem in smartform.

the requirment is. let suppose in the smartform Page is generate 100.

Print Priview is showing all pages.

user requirment is he want to get print out Not All Pages.

Example Page 5 to 6 , means dynamic page selection for print out.

Thank's

Amit Kr.Agrawal

Accepted Solutions (0)

Answers (2)

Answers (2)

former_member200345
Contributor
0 Kudos

Hi,

Let us assume your smartform generated 100 pages.

Now your requirement is to print for Ex from 4 to 9.

Now display the relevant spool no in SP01.

Select the spool request no-> in the menu bar, Spool request->Print->Print with changed parameters.

Enter FROM page and TO page and print.

Regards,

Vijaymadhur.

Former Member
0 Kudos

Hi friend,

Just set the system function &SFSY-PAGE& in the input. Then the smartform just moves to that page.

or

For better handling create an internal of type integer and then move the values which you need to print into that internal table.

First set the command line and inside it program logic ad inside the program logic set the condition for break using COMMANDS at the COMMANDS check the condition whether the &SFSY-PAGE& is the page which you have not entered. If no then break else print the page.

I think this will solve your issue.

If you face any issues please revert back to me i will help you.

Thanks,

Sri Hari

Edited by: srihari.kumar on Jan 11, 2012 9:51 AM

0 Kudos

Dear Hari ,

please send me a sample of code

Former Member
0 Kudos

Hi friend,

The logic flows like this,

Page1Main window->Loop -> Program lines ->Alternatives->True-> Condition

You will be having a default window main window.

Loop for displaying your 100 pages or so.

Inside loop create 2 program lines.

First program line assign &sfsy-page& to another one variable.

In Program lines 2 we have the following code.

select line1 from itab where line1 ne v_pageno.

v_sy-subrc = sy-subrc.

Note : itab you need to populate at the driver program or any othet before the process which contains the page no which you needed. Its has only one field line1 of type integer.

In Alternatives check whether eq 0.

If true then in condition assign break to next page.

If false then the required page is in progress so print that page.

I think this will solve your issue .

If you face any issues in this please let me know i will help you.

Thanks,

Sri Hari