‎2007 Jan 21 7:45 AM
Hi
I want to define a field in types like length 17 decimas 2.
see this code and correct me what iam doing wrong.
Types : BEGIN OF t_amt_qty,
amt(17) type p decimal 2,
END OF t_amt_qty.
but it is showing error " "," expected after "P". "
correct me how to achieve it.
thanx and regards,
Rupa
‎2007 Jan 21 8:33 AM
rupa,
declare it as
amt(9) type p decimals 2.
as the Length of this amt is 2 * 9 = 18 - 1 = 17.
Data type P will always have length = 2n - 1.
regds,
kiran
‎2007 Jan 21 8:01 AM
Hi Rupa
Use 'decimals' and not 'decimal'. For type P a maximum length spec of 16 is allowed.
Types : BEGIN OF t_amt_qty,
amt(16) type p decimals 2,
END OF t_amt_qty.
Award points if useful
Regards
Indrajit
‎2007 Jan 21 8:07 AM
Hi Indra,
Thank you for your response.
my requirement is iam geting a amount field (17, 2) from legacy sysmet, so i need to capture it in a internal table. so tell me how can i define it.
Thanks and regards
Rupa.
‎2007 Jan 21 8:33 AM
rupa,
declare it as
amt(9) type p decimals 2.
as the Length of this amt is 2 * 9 = 18 - 1 = 17.
Data type P will always have length = 2n - 1.
regds,
kiran