cancel
Showing results for 
Search instead for 
Did you mean: 

Regarding New-Page using SAPSCRIPT-COUNTER_X

Former Member
0 Kudos

I Used SAPSCRIPT-COUNTER_X parameter in a main window. I have initialized it to 1 by using DEFINE statement. Next i put condition &SAPSCRIPT-COUNTER_X& = '13' in IF statement . if it is 13 then it counter NEW-PAGE control command. But it is not working fine. Can any one suggest me how to work with SAPSCRIPT-COUNTER_X? Urgent in my project....

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

hai Venkatmani,

In Print Program Use.

A Variable For Counter .

Then In Script.

if W_counter = 13.

/: New-page.

endif.

If Found helpful Do Reward.

Regards.

Eshwar.

Former Member
0 Kudos

Hi Venkat,

The counter allows you to specify a value from 0 to 9. You cant assign 13 to the counter. More notes on using the 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 ‘+’ and ‘-’ 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.

For your requirement you can use a counter from within the print program and transfer the value to script. In the script you can trigger a NEW PAGE based on the counter value sent from the program.

Former Member
0 Kudos

Mr Avinash. U r missunderstanding of usage of SAPSCRIPT-COUNTER_X(X=0..9). It does not restricts its value to 10. OK. I got my Answer. by equaling it to 13. If u Know well then only suggest otherwise No problem.