cancel
Showing results for 
Search instead for 
Did you mean: 

Page numbering issue in smartforms

Former Member
0 Kudos

Dear all,

I am working on smartforms. There is a page number issue in printing the forms.

I have 3 pages 1. T&C 2. First page 3. Next page

I have definned the foollowing sequence for the pages.

T&C -->for this page next page is first page

First--> For this next page is Next Page

Next --> For this next page is Next

I need to print Terms and condition only when EKKO-BSART and EKKO-EKORG equal to my requirement (Condition)

When this condition meets then i donot have any issues,page numbers are coming properly. but when i donot have to display T&C then there is a issue in page numbering.

So i have used a logic to print page number.

in T&C window..i have written correctly as usual &sfsy-page& of &sfsy-jobpages&

in first page ,in program lines where i have defined in the window, i have written as follows

gv_pgn = sfsy-page - 1.

if is_ekko-ekorg NE 'SSPO' and is_ekko-bsart NE 'ZIME'.

gv_jpgn = sfsy-jobpages - 1.

else.

gv_jpgn = sfsy-formpages.

endif.

if the condition is not meeting then i have a problem in printing the page number.

Let me know your voluable feedback.

thanks in advance.

Regards,

Sri

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

In smartform, the total no. of pages is not calculated right in the beginning, that is why possibly using formpages is not giving the desired result.

Former Member
0 Kudos

Dear Friend,

So in that case, if i have to use a command to trigger a new page for T&C then where i need to place and also how the page sequences.

my T&C page should be displayed only when my condition is meeting. elso no T& C page.

Can you pls help on the same.

thanks in advance.

Former Member
0 Kudos

create 3 pages, but in 1st page, keep the contents of both 1st and 2nd page, if T&C conditon satisfies, print it, move to second page, if not, then print the contents of 2nd page in 1st page and use command to move to third page, for numbering use sfsy-page and sfsy-formpages , it will number accordingly

Former Member
0 Kudos

Dear Friend,

What i am trying to do is..

I have currently 3 pages...First points to next page and next page points next page and finally the T&C page point to none.

At the end of mainwindow i have created a command and i kept a condition to trigger a new page and give goto page to T&C page. and checked the Only after main window and checked only on page to T&C

But still my new page is not triggering.

Kindly let me know your voluable feedback....

Former Member
0 Kudos

while using command, the page from which it is being used, that page should point to itself only, next the page which you are trying to trigger using command, if it is the last page, the next page option of that page should be kept blank.

Former Member
0 Kudos

Thats a great reply and It has solved my problem..thanks alot my dear Friend.

Answers (0)