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: 

Reset page Numbers in SAPScript

Former Member
0 Kudos

Hi All,

I need to reset page numbers in a SAP Script for each Document when multiple documents are used in the selection. How can this be done. My page Numbers are based on &PAGE& of &SAPSCRIPT-FORMPAGES&

Thanks in Advance,

Jr.

3 REPLIES 3

Former Member
0 Kudos

Hi!

check out this -

CALL FUNCTION 'OPEN_FORM'

........

........

LOOP AT <ITAB> INTO <WORKAREA>.

AT NEW <doc. number>

CALL FUNCTION 'START_FORM'

EXPORTING

  • ARCHIVE_INDEX =

FORM = <form name>

.......

........

ENDAT.

CALL FUNCTION 'WRITE_FORM'

.......

........

CALL FUNCTION 'END_FORM'

.......

........

ENDLOOP.

CALL FUNCTION 'CLOSE_FORM'

.......

........

Reward points if it helps.

Regards,

Neha Bansal.

Former Member
0 Kudos

Hi,

When you use START_FORM and WRITE_FORM in the Loop of the Document Numbers internal table,(when you will write AT NEW and AT END OF the field)

There is no need to clear the page numbers for each document.

By default it will take fresh numbers for each Document number.

Regards,

Anji

Former Member
0 Kudos

Hi,

You need to write the perform for this one using &PAGE& and &SAPSCRIPT-FORMPAGES&. so in the Form of the Program you need to reset the values . You need to write this in the last page of the sapscript. so there in the form initialize these values and use the new values instead of the &PAGE& of &SAPSCRIPT-FORMPAGES&. hope you understand my words.

Regards

Sudheer