cancel
Showing results for 
Search instead for 
Did you mean: 

Total Printed page counting issue - Smartforms

vijay_kumar134
Participant
0 Kudos

Hi,

I have 2 forms for printing PO's. 1st form is printing all our requirements and the next form is printing the summary of the printed forms like number of pages , processed items, Current date/time  etc..

In the Summary form (2nd form) i am displaying the total pages printed, (some PO's having more than one page of line items), i am not able to calculate the additional pages printed int the first form.

Please guide any one.

Thanks in advance.

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Vijay,

One option could be to create a window of type 'FINAL' in FORM1. A final window is executed at the end of processing of your form. Here you have a count of total number of pages in FORM1, try exporting that to memory, you can use variable SFSY-FORMPAGES.

Similary, in FORM2 define a another window of type final. Have logic to import from memory total pages of FORM1, and then add SFSY-FORMPAGES( which is tot pages of FORM2). Add both of them to get the final count.

Hope this helps,

Thanks,

-VM.

thangam_perumal
Contributor
0 Kudos

Hi Vijay,

                What is the variable you have used for printing Pageno?

Please Use SFSY-PAGE & SFSY-FORMPAGES

Regard's,

     Thangam.P

Florian
Active Contributor
0 Kudos

Hi Thangam,

did you really read through his question? Just suggest something doesn't help...

~Florian

vijay_kumar134
Participant
0 Kudos

Hi Thankgam,

I have used same for printing page no..

My issue is i want to count the total printed page in the first form and that need to be printed in the second form ( that is summary page).

Any other sugession please.

Vijay.

Florian
Active Contributor
0 Kudos

What's your problem with the solution I wrote before? You are also a developer, are you? I do not see your problem, just work through the documentation and you will find your solution with the suggested stone.

SSF_open

...

First form --> get your pages, save it anywhere

...

second form <--pass the pages, print it

...

SSF_CLOSE

Be happy

vijay_kumar134
Participant
0 Kudos

Hi Florian,

I tried your sugession.. But i am not able to get it.

Can you guide me any other options to get.

Thanks.

Vijay.

Florian
Active Contributor
0 Kudos

Hi Vijay,

you have to be a bit creative, it's your request, not mine

A solution for it would be:

Create a singleton in your driverprogram with two additional methods implemented:

set_pages_per_form

get_pages

And of course a member, where you can save it, perhaps a table with

VBELN

Num_of_pages

Now you got everything prepared to get your problem solved:

SSF_open

...

First form --> get your pages, save it in the singleton at the end of processing (Maybe MAIN and in the very end a coding-node)

( Repeat the step for every single form )

...

Get the table from your singleton (method get_pages).

second form <--pass the pages, print it

...

SSF_CLOSE

If you do not know, how to create a singleton, use the search.

Now it is up to you, to fix your issue.

~Florian

Florian
Active Contributor
0 Kudos

Hi Vijay,

just have a look in the Function-group where the 'SSF_FUNCTION_MODULE_NAME' is located. In there you will find a lot of Functions and also one called SSF_OPEN

This stone let you concatenate different forms in a row. So you can print your first form, get the information you need (in your case the pages) and afterwards append your summary-form and print it.

That's it. Have fun.

~Florian

vijay_kumar134
Participant
0 Kudos

Thanks your sugession Florian.. Please elobarate..