Application Development and Automation 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: 
Read only

Serial No's in Scripts

Former Member
0 Likes
683

Hi Friends...........

I got a problem in Script that I added a field called Serial No for that I want 1 2 3 4 5.......like that for each record........will u plz help me ........

4 REPLIES 4
Read only

Former Member
0 Likes
662

Use this code in your sap script for page no.

Page No : &PAGE& of &SAPSCRIPT-FORMPAGES(R)& &NEXTPAGE&

You will get: Page No : 3 of 12

and next page as 4

Read only

0 Likes
662

no not like that..i don't want page syntax.........

I want serial no for each record like........

S.No. date amount document no

1 xxxxxx xxxx xxx

2 xxxxxxx xxxxx xxxx

3 xxxxxxx xxxxxx xxxxx

I am getting date, amount ,document no....how can I get serial no........that is my issue...

Read only

0 Likes
662

If you r printing through internal table by loop. you can make a variable mctr and increase it in loop. use this varr. into your sap script as you passed another varriable.

you will get serial no too.

Read only

0 Likes
662

Use SAPscript Field SAPSCRIPT-COUNTER.

&SAPSCRIPT-COUNTER_x& (x = 0.. 9):

These fields represent ten counter variables that you can use in your text and forms for any counting purposes. You can use the u2018+u2019 and u2018-u2019 formatting options to increment or decrement a counter before its value is printed. You can use the DEFINE control command to assign any specific value to a counter.

Regards,

Joy.