‎2011 Jan 28 4:35 AM
Hi experts,
i have a quntity field with values like 61.00 and 121.00 like that
from these i have to get 61 and 121 and need to concatenate with measure like PC
output:
61 PC
121 PC.
how can i acheive this..can plz help me out?
Thanks & regards,
veena.
‎2011 Jan 28 4:58 AM
Use split and concatenate commands.
DATA: var1 TYPE string VALUE '61.00',
var3 TYPE string,
var4 TYPE string.
START-OF-SELECTION.
SPLIT var1 AT '.' INTO var3 var4.
CONCATENATE var3 'PC' INTO var3.
WRITE: var3.
‎2011 Jan 28 5:06 AM
Hi goutham ,,
Thanks for giving your reply
as per your code var1 is string but mine is qunatity field.
SPLIT command should not allow qunatity..so i declared var1 is qunatity field.
This is the code i have written..Solved..
data:var1 type kmpmg VALUE '10.000',
var2 type I,
VAR3 TYPE string,
VAR4 TYPE string.
var2 = var1.
VAR3 = VAR2.
CONCATENATE VAR3 'PC' INTO VAR4 SEPARATED BY SPACE.
write:/ var4.
Anyway thanks alot.
‎2011 Jan 28 5:02 AM
Hi Veena,
Have a separate field like
qty_in_uom(15) type c.
concatenate quantity UoM into qty_in_uom separated by space.Regards,
Jovito
‎2011 Jan 28 5:35 AM
you can try this.
DATA : w1 TYPE p DECIMALS 2,
n TYPE p.
w1 = '61.00'.
n = TRUNC( w1 ).