2007 Jan 17 5:45 AM
hi
in the footer of table in smartform currency field vbrp-cmpre and quantity field vbrp-fkimg are cuming with leading spaces as follows:
32.000 copies
@ Rs. 7.00=
2.24
this should come as :
32 copies @ Rs. 7 = 224
also the product of fkimg & cmpre is not coming correct.
kindly help.
thanks.
Message was edited by:
abapuser
2007 Jan 17 5:58 AM
Hi,
Assign the value to a character field in program lines.It won't show the decimals if it is zero after the decimal.After assigning it to 2 character variable variables say v1,v2,multiply v1 and v2 and assign it to v3[length should be sufficient to hold the product].
Program line:
Input parameter
wa-cmpre
wa-fkimg
Output parameter
v1
v2
v3
v1 = wa-cmpre.
v2 = wa-fkimg.
v3 = v1 * v2.
concatenate v1 ' copies @ Rs. ' v2 ' = ' v3 into v4.
Now in text element drag and drop v4 from field list.
Kindly reward points by clicking the star on the left of reply,if it helps.
hi
in the footer of table in smartform currency field vbrp-cmpre and quantity field vbrp-fkimg are cuming with leading spaces as follows:
32.000 copies
@ Rs. 7.00=
2.24
this should come as :
32 copies @ Rs. 7 = 224
also the product of fkimg & cmpre is not coming correct.
kindly help.
thanks.
Message was edited by:
abapuser
2007 Jan 17 5:48 AM
try to write variable like <b> &variable(.0)&</b> add extra (.0) after each variable in same line.
2007 Jan 17 5:55 AM
how to add (.0) before &.when i try to add it, the text element variable starts blinking & it doesnt permit edditing.
2007 Jan 17 6:02 AM
go to text editor (change editor option in menu) and do the changes.
2007 Jan 17 5:49 AM
For formatting problem please increase the size of your footer window ....it will come right then ...
2007 Jan 17 5:51 AM
Hi ,
To remove the decimal places for quantity and rate/quantity , use the syntax to restrict the number of digits after decimal places. The syntax is
<b>&symbol(.N)&</b>
where N is number of decimal places.
Since you dont want decimals use<b> &symbol(.0)&</b>
For the other case it depends on how the currency is represented , any way try using the syntex <b>&symbol(T)&</b>
Regards
Arun
2007 Jan 17 5:58 AM
Hi,
Assign the value to a character field in program lines.It won't show the decimals if it is zero after the decimal.After assigning it to 2 character variable variables say v1,v2,multiply v1 and v2 and assign it to v3[length should be sufficient to hold the product].
Program line:
Input parameter
wa-cmpre
wa-fkimg
Output parameter
v1
v2
v3
v1 = wa-cmpre.
v2 = wa-fkimg.
v3 = v1 * v2.
concatenate v1 ' copies @ Rs. ' v2 ' = ' v3 into v4.
Now in text element drag and drop v4 from field list.
Kindly reward points by clicking the star on the left of reply,if it helps.
2007 Jan 17 6:11 AM
hi jayanthi,
In the global data of smartforms i have given v1,v2,v3,v4 of type C.
In program lines iam giving :
Input parameter
wa-cmpre
wa-fkimg
v4
Output parameter
v1
v2
v3
v4
v1 = wa-cmpre.
v2 = wa-fkimg.
v3 = v1 * v2.
concatenate v1 ' copies @ Rs. ' v2 ' = ' v3 into v4.
but when i execute it i get the dump
the program attempted to interpret the value '*' as number but since the value contravenes the correct number formats this was not possible.
reagrds
2007 Jan 17 6:14 AM
in the window...of the text element.. leftside you will find "paper and pen" u will enter to the editod... there you can give (.0) as jayanthi told.
2007 Jan 17 6:24 AM
Hi,
Are you declaring the variable with maximum length to hold.
For eg.
v1 type char25
v3 = v1 * v2.
You should give sufficient space between v1 and * and * and v2.
| User | Count |
|---|---|
| 6 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |