cancel
Showing results for 
Search instead for 
Did you mean: 

Print previous page number on the current page

Former Member
0 Kudos

Hi guys,

I want to print previous page number on the current page number.

i.e. like continued from page1 on page2 and

continued from page2 on page3 and go on...............

please give the solution for this.......

bye

Kiran

Edited by: kiran kumar on Dec 25, 2008 1:31 PM

Accepted Solutions (0)

Answers (3)

Answers (3)

former_member196280
Active Contributor
0 Kudos

I am not sure, &SY-PAGE& - 1 will work or not.

Try to call a subroutine pool and solve do your decrement...

Ex.

/: PERFORM <Subroutine name> IN PROGRAM <subroutine prog name>

/:USING &<field name>&

/:CHANGING &<field name1&

/:ENDPERFORM

Then create subroutine pool program and you have to write the code.

FORM ><subroutine name> tables int_cond structure itcsy

outt_cond structure itcsy.

data : value(20), value1(20). "do your own declarations

Read int_cond table index 1.

value = int_cond-value.

value1 = value1 + value.

Read outt_cond table index 1.

outt_cond-value = value1.

Modify outt_cond index 1.

ENDFORM.

Just rough idea given above.

Regards,

SaiRam

Former Member
0 Kudos

hi u can simply use

v_page = &sfsy-page&.

v_page = v_page - 1.

print as

continued from &v_page& on &sfsy-page&

Former Member
0 Kudos

Hi Kartik,

you said i can write the following code. Where I have to write this code? Because I can't write the code in the print program. I am modifying the standard form. So, I can make the changes in the form only.

please tell me where I have to write this code?

v_page = &sfsy-page&.

v_page = v_page - 1.

print as

continued from &v_page& on &sfsy-page&

bye

Kiran

Former Member
0 Kudos

You need to write in the text editor of footer window.

Regards,

Former Member
0 Kudos

are u doing scripts or smartforms?

Former Member
0 Kudos

Hi Kartik,

I am working on script. Its a standard form. So, I am modifying it by copying in to z form.

I can make the changes in the form only not in the print program

bye

Kiran

Former Member
0 Kudos

hi kiran ,

in script wherever u have created a window for the page number for example in footer window ,

open the text editor for that window and write the code there.

regards,

prashanti

Former Member
0 Kudos

Hi,

As suggested above u can open ur window and write ur code in the text editor.

for further reference check this wiki

https://www.sdn.sap.com/irj/scn/wiki?path=/display/profile/external%252bsubroutines%252bin%252bsap%2...

write ur code in subroutine and call ur subroutine in ur script, thr above wiki link gives u the procedure for using subroutines in script.

кu03B1ятu03B9к.

joginder_singh
Active Participant
0 Kudos

Hi

In the page attributes you can reset the counter.

cheers

Joginder