‎2009 Feb 16 9:22 AM
Hi
i am facing one issue
i want Vat% should come in digit or number but not in floating point variable in the script output.
but it is coming floating point value.
i am using below code.
Data:w_vat LIKE konv-kbetr,
VAT % to be calculated
SELECT SINGLE kbetr
FROM konv
INTO w_vat
WHERE knumv EQ w_knumv
AND kposn EQ zvxx_oe_inv_item-posnr
AND kschl EQ c_mwst.
UNASSIGN <fs_itcsy>.
READ TABLE ta_out_table
ASSIGNING <fs_itcsy> INDEX c_1.
IF sy-subrc EQ 0.
MOVE w_vat TO lo_sum.
SHIFT lo_sum LEFT DELETING LEADING space.
MOVE lo_sum TO <fs_itcsy>-value.
ENDIF.
Regards
Atul
‎2009 Feb 16 9:27 AM
hi,
DATA:
f TYPE f,
i TYPE i.
f = 123.
i = f.
WRITE:/ f, i.move the value of the vat% to an integer type variable.
regards
sarves
‎2009 Feb 16 9:24 AM
hi,
In your case in the move statement,
instead the existing target field , specify a target field of type I.
This converts the floating value to a digit or integer as per your requirement.
Use this target field in your text elements in the text editor of your SAP SCRIPTS to generate the requirement output on the form
Thanks
Sharath
‎2009 Feb 16 9:49 AM
Hi
the correct answer is to Declare target field is
data : lw_sum type N.
Thanks
Atul
‎2009 Feb 16 9:27 AM
‎2009 Feb 16 9:27 AM
Hi,
use this..
&symbol(.N)&
Ex:
suppose output is 1234.10..
if u want to omit the digits after dot.
write like this..
&symbol(.0)&
Regards
Kiran
‎2009 Feb 16 9:27 AM
hi,
DATA:
f TYPE f,
i TYPE i.
f = 123.
i = f.
WRITE:/ f, i.move the value of the vat% to an integer type variable.
regards
sarves
‎2009 Feb 16 9:33 AM
Hi
You can transfer the vat% value to integer type directly by transfering he float into integer type.So that you can get the digit or number.
Regards,
Rajani