Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

START_FORM resetting page number

Former Member
0 Kudos

Hi, my SAPScript program is using function modules START_FORM / END_FORM to print the totals page which is of a different format. Somehow, using START_FORM resets the page number. So I end up with having "Page 1 of 1" in the totals page.

Below is an example.

Report with a total of 4 pages - 3 pages of details and 1 separate page for totals. So page numbering is:

Page 1 of 3

Page 2 of 3

Page 3 of 3

--> END_FORM is called and then START_FORM is called

Page 1 of 1

The above paging is incorrect. Output must be:

Page 1 of 4

Page 2 of 4

Page 3 of 4

Page 4 of 4

How can this be corrected? Please help....

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi

I suggest you,

1. If you can avoid calling START_FORM that is really good solution.

2. You can declare global variable to keep total number of pages and current number of page.

When the START_FORm is called you can use those variables as counter to keep current page number and total no.of pages.

(var = var + 1 would be current page number)

3. There are definite OSS notes available for this type of issues. SAP may provide patches to this type of issues.

P.S. award points.

Bala

2 REPLIES 2

Former Member
0 Kudos

Hi

I suggest you,

1. If you can avoid calling START_FORM that is really good solution.

2. You can declare global variable to keep total number of pages and current number of page.

When the START_FORm is called you can use those variables as counter to keep current page number and total no.of pages.

(var = var + 1 would be current page number)

3. There are definite OSS notes available for this type of issues. SAP may provide patches to this type of issues.

P.S. award points.

Bala

Former Member
0 Kudos

Hi Blumtain,

Start_Form starts a new Form..so it also starts the page numberings all over again...

so just use 'OPen_Form' n mention ur form name here itself.. dont use start_form....u ll get the desired result..

Regards