08-13-2009 1:20 PM
The below code short dumps beucase 12,000.00 is recongnised as a number. So is there an easy way to get this value into the quantity field. I can think of replacing the comma, biut it doesnt seem that full proof, just wondered if there was an easier way?
DATA: ls_LTAP_CHK-VSOLM TYPE LTAP_VSOLM,
v_REQTY(12) TYPE C VALUE '12,000.00'.
ls_LTAP_CHK-VSOLM = v_REQTY.
08-13-2009 1:25 PM
08-13-2009 1:24 PM
Hi,
As per my knowledge its not possible to move some value of type C to other type (P or I or D or T or N or...) is not possible directly.
I think no way...
We can move other types to type C but vice versa is not possible..
Kiran...
Edited by: kiran vempati on Aug 13, 2009 5:54 PM
Edited by: kiran vempati on Aug 13, 2009 5:57 PM
08-13-2009 1:25 PM
08-13-2009 1:27 PM
Eliminate the thousand delimiter before assigning.
replace all occurences of ',' in v_REQTY with ''.
After that you can assign the char to the p variable. No FM needed.
08-13-2009 1:27 PM
08-13-2009 1:31 PM
Hi,
try this
data : qty type p decimals 2,
ch(10) type c value '10'.
move ch to qty.
may be this will be helpful to u.
or try the FM
CALL FUNCTION 'CHECK_AND_CONVERT_NUMERICS'
EXPORTING
dmzei = ','
dtype = 'CURR'
efeld = input
IMPORTING
error = error
ifeld = output
messg = messg
msgln = msgln
regards,
Archana