cancel
Showing results for 
Search instead for 
Did you mean: 

sapscript counter ,can break/clear ?

Former Member
0 Kudos

Hi experts,

in sapscript, i want my output to be

1. AAA

2. BBB

-


1. ZZZ

2. XXX

but when i put the counter for 2 times, it can't work.

it will become like this (this is not the output I want)

1.AAA

2.BBB

-


3. ZZZ

4. XXX

Is there any way to break or clear the 1st counter and start the 2nd one ?

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

you can use /: RESET &count& command

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi Anil Mane,

I've try your suggested way,

it will become

1..

2..

/Reset &count&

4..

5..

Hi Fawaz Sheikh,

I've try your suggested way,

it will become

1..

2..

1..

0..

======

I've figure out the solution,

I define counter = ''.

    • set the counter to 0 **

and star the 2nd counter.

Thank's everyone for the solution provided, I'll rewards marks to you guys ya ~

Thank you.

Former Member
0 Kudos

Hi,

After incrementing the counter to 2, why dont you subtract the counter like &SAPSCRIPT-COUNTER_1(-)&.

Regards,

Fawaz

Former Member
0 Kudos

Do offer any help: Where did you define your counter: in the driver program or in the SAP script itself?

Regards,

John.

Former Member
0 Kudos

Hi John Heutmekers ,

I define the counter in my sapscript ,

<K8>&SAPSCRIPT-COUNTER_1(+)&</>

I define it twice , but it just can keep on add on and become "1..2..3..4"

I want it to be "1..2.." and another "1..2.."

Any ideas on this issue?

Please advise, thank you so much.

Former Member
0 Kudos

Hi,

Take a look at the following link: [Reset numbering|http://help.sap.com/saphelp_erp2004/helpdata/EN/d1/802fd3454211d189710000e8322d00/frameset.htm]

Former Member
0 Kudos

Hi John Heutmekers

the link u provided: http://help.sap.com/saphelp_erp2004/helpdata/EN/d1/802fd3454211d189710000e8322d00/frameset.htm

I've tried this way, it's not work for me, as i'm not using paragraph format in sapscript.

/E NOTIF_ACT_TITLE

/: PROTECT

/ <B8>MRB Dispositions:</>

/ <K8>&SAPSCRIPT-COUNTER_1(+)&</> This is the 1st counter

= <K8>&WQMMA-MNGRP&</> ,,<K8>&WQMMA-MNCOD&</> ,,

= <K8>&WQMMA-TXTCDGR(68)&</>

/ <K8>&WQMMA-MATXT&</>

/E NOTIF_ACT_2

/: PROTECT

UL &ULINE(70)&

/ <B8>Description of Defect:</>

/ <K8>&SAPSCRIPT-COUNTER_1(+)&</>This is the 2nd counter

/ <K8>&WQMFE-TXTCDGR(68)&</>

I've tried to change all the line feed to paragraph format and it's still come out with the result of "1..2..3..4.."

not "1..2.." and "1..2.."

Please advise, thank you