on 09-07-2007 12:05 PM
Hi All,
In the Script i am using the SAPSCRIPT-COUNTER_1.
I have assigned the value '0' to it.
But after that i want to increment it.i am using the command which is in bold.
But the value is not incremented.
/: DEFINE &COUNTER_1& = '0'
<b>&COUNTER_1(+)&</b>
Please Suggest me....
Regards,
Swathi
Hi Swathi K.
You can use a perform statement in SAPSCRIPT. You must create a program first and use it in your form.
It's like this:
IN SAPSCRIPT:
/: PERFORM <form_name> IN PROGRAM <program_name>
/: USING &VAR1&
/: CHANGING &VAR2&
/: ENDPERFORM
IN PROGRAM:
REPORT ZTEST.
FORM increment TABLES IN_PAR STUCTURE ITCSY
OUT_PAR STRUCTURE ITCSY.
DATA: value TYPE i.
READ TABLE IN_PAR WITH KEY VAR1.
CHECK SY-SUBRC = 0.
value = IN_PAR-VALUE + 1.
READ TABLE OUT_PAR WITH KEY VAR2.
CHECK SY-SUBRC = 0.
OUT_PAR-VALUE = value.
MODIFY OUT_PAR INDEX SY-TABIX.
ENDFORM.
Hope this helped.
Best regards.
Reward usefull ideas.
Valter Oliveira.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.