cancel
Showing results for 
Search instead for 
Did you mean: 

SmartForms Page Number Reset

Former Member
0 Kudos

Hi Experts,

I have a problem with smartforms.

I pass two internal table to smartform like it_kna1 and it_vbrk.

now i create a loop on internal table it_kna1 and within the it_kna1 i create a loop on it_vbrk.

on the top of page i want to pring customer details and below customer's Invoice details.

when the customer change i create page break with a command.

Now i want to Print page number on every page with reset page number on customer.

if customer X invoice details cover 3 pages and then customer Y invoice details.

so the page number appear like :

Customer = X

Page: 1 of 3/ Page: 2 of 3/ Page: 3 of 3.

Customer = Y

Page: 1 of 2/ Page 1 of 2.

and so on.

anyone can solve my problem.

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

self solved by change requirement

Former Member
0 Kudos

Instead of expecting a Smartforms solution it is probably easier to code your own logic to solve this problem:

First determine how many pages, i.e. total pages, will be created for each customer and store the value in your customer itab. This can be done in Global Definitions u2013 Initialisation.

Then at each control break at customer level set your page count to 0 and use the already determined value for your new total pages value. Increment page count before first/new customer output.

Former Member
0 Kudos

help

???

Former Member
0 Kudos

Hi,

Follow example report SF_EXAMPLE_03.

regards,

Former Member
0 Kudos

Dear thanks for reply,

but i dont have any second page.

i want to initialize page number on it_kna1 loop.

Former Member
0 Kudos

yes, i know your requirement. We can not reset page number in the way that you do. second page is not require here to do this thing. So, please take a look carefully to report SF_EXAMPLE_03 to get what you expect.

thanks,

Former Member
0 Kudos

this example print page number from second page and top of page

but i want it from first page and bottom of page.

and i have only 2 windows 1 main and 1 for page number.