on 05-05-2012 10:24 AM
Hi,
In my smartfrom, in main area of main window, I have a column SNo(Serial Number). In global data tab of global definitions, I have declared v_sno type n value 1 and in Initialization tab I has written the code:
data: v_sno type n.
v_sno = 1.
v_sno = v_sno + 1.
clear v_sno.
And also in Calculations tab of Table, I has given operator: number;target field : v_sno;Time : After loop.
In the output of column SNo I am getting:
1
2
3
4
5
6
7
8
9
0
1
2
Any body have faced this? Please give me the solution.
Thanks,
vbk.
Hello vbk,
Can you please declare as
data : v_sno type I.
instead n.
the size what n can hold is only one digit, they how can you expect 11, 12 ,......:)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
The statement "data: v_sno type n." declares a numaric char of length 1.
Declare the numaric character as per your requirement. For example, if you want to declare a numaric char of length 2, follow the declaration like below.
DATA: V_SNO(2) TYPE N.
Hope will solve your issue.
Regards,
Vijaymadhur.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
I have tried this one. Even though I declare v_sno(2) type N, after the serial number 9 it is starting again from 0,1,2,...
Also on 1st page, in 5th row, SNo 5 is not displaying but record is displaying in the row. And in the next page of 1st row SNo 5 is displaying and record is not displaying.It is happening for remaining pages also. If I increase the main window height it is displaying correctly. Any idea of why it is happening like that?
Thanks,
Venkata.
just change v_sno type you define like
data: v_sno type i.
Step 1 :In Global definitions, declared v_sno type i value 0.
Step 2 : In loop create new flow logic-->program line and write logic like
v_sno = v_sno + 1.
and pass v_sno om input and output parameters .
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Krupa,
If I declare DATA : V_SNO TYPE I in global data tab,
I have 12 records in my internal table.
If I reduce the height of main window I am getting the serial numbers upto 12.
But, on 1st page, in 5th row, SNo 5 is not displaying but record is displaying in the row. And in the next page of 1st row SNo 5 is displaying and record is not displaying.It is happening for next page also. If I increase the main window height it is displaying correctly. Any idea of why it is happening like that?
Thanks,
VBK.
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
7 | |
7 | |
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.