cancel
Showing results for 
Search instead for 
Did you mean: 

Regarding Page No Format

Former Member
0 Kudos

Hi,

I need page No to be printed as page No / Total No of pages.

Example 01/ 05 .

If I use this &SFSY-PAGE& of &SFSY-FORMPAGES& then its printing 1/ 5.

So i tired doing for SFSY-PAGE

wf_flag5 = sfsy-page.

if wf_flag5 le 9.

concatenate ' 0' wf_flag5 into wf_flag5.

endif.

When i am populating as &wf_flag5&/ &SFSY-FORMPAGES(2)&

Then 01/05 05 is overlapping

Please guide me regarding this.

Regards,

Neelima.

Edited by: Sammeta Neelima on Nov 21, 2008 9:57 AM

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

hi sammeta,

in the code lines before the text element to print page no write the following logic ,

CLEAR : g_v_tot_pages,

g_v_page.

g_v_tot_pages = sfsy-formpages

if g_v_tot_pages gt 0.

g_v_page = sfsy-page mod g_v_tot_pages.

if g_v_page eq 0.

g_v_page = g_v_tot_pages.

endif.

ENDIF.

now in text element write &g_v_page(3cz)&/&g_v_tot_pages(3cz)&

this will print the page number in the format current page no / total page no .

note : make this window as final window

this will surely help as i was also having similar requirement and dis solved my problem.

Former Member
0 Kudos

Hi Prashanti,

My requirement is 01/05 . 01 is current page and 05 is total no of pages...can u please explain ur logic.

Regards,

Neelima.

former_member451655
Active Participant
0 Kudos

hi ,

just declair two variables as

W_FROM TYPE N LENGTH 2

W_TO TYPE N LENGTH 2

then before print the Pages in Every Page assign it to variables ,

w_from = SFSY-FORMPAGES.

w_to = SFSY-PAGE.

then Print it , its working fine as 01/ 05 on 1st page 02/05 on 2nd page ..ect .

i test the same in my system ,

Br,

Dilum

Former Member
0 Kudos

Use like below;

Data : pageno(2) type N,
 formpage(2) type N.

Pageno = SFSY-PAGE.
formpage = SFSY-FORMPAGES.

And now print as;

&pageno&/&formpage&

This will solve your problem.

Regards

Karthik D

Former Member
0 Kudos

Hi Karthik,

Its Not Working... its printing 0/ 0

Regards,

Neelima.

Former Member
0 Kudos

Hi,

I just wrote the code for an example, you should declare the two variables in global parameters not inside your program lines.

Regards

Karthik D

Former Member
0 Kudos

Hi karthik,

Every thing in global parameters or

This in Program lines.

Pageno = SFSY-PAGE.

formpage = SFSY-FORMPAGES.

Regards,

Neelima.

Former Member
0 Kudos

Hi,

Try like this.

&wf_flag5&/&space(2)&&SFSY-FORMPAGES(2)&

Former Member
0 Kudos

Hi Usha,

Its Not working... Please guide me with other solution.

Regards,

Neelima.

Former Member
0 Kudos

HI,

I am getting the correct O/P.Once check the &'s Properly in the code.

Former Member
0 Kudos

Hi Karthik,

Can u please how can i declare

Data : pageno(2) type N,

formpage(2) type N. in global paramters.

Can u specify the declaration.

Regards,

Neelima.

Former Member
0 Kudos

Hi,

Declare in global parameters as;

pageno TYPE NUM2
formpage TYPE NUM2

and in program lines just above textelement to print;

Pageno = SFSY-PAGE.
formpage = SFSY-FORMPAGES.

and in text element print as;

&pageno&/&formpage&

This will solve your problem.

Regards

Karthik D

Former Member
0 Kudos

Hi,

Its printing 01/01 in first page , 02/02 in second page.

Regards,

Neelima.

Former Member
0 Kudos

Hi,

Can you paste what you have coded in program lines and what you have given in text element?.

Regards

Karthik D

Former Member
0 Kudos

Hi Neelima,

As u said u r getting like..01/01 02/02...

even i faced the same problem when i tried in my system,..what all u have done till now that is right...just a small change will give u the correct solution.

just change the window type as " final window".

this will surely work out.i guarantee u 100%.