‎2007 Sep 06 6:44 AM
Dear Experts
In the table ekpo the value for menge is 1.000, ie. it is showing 3 decimal places
but in my report I nedd to display in 2 decimal places
pls advice the solutions
thanks in advance
kar
‎2007 Sep 06 6:51 AM
Check this
DATA : p_menge TYPE menge VALUE '13.123'.
DATA : p_menge1 TYPE p DECIMALS 2.
p_menge1 = p_menge.
WRITE : p_menge1.in your output table for report display move the quantity to a variable which has only 2 decimals, just like what i did above.
Regards
Gopi
‎2007 Sep 06 6:51 AM
Check this
DATA : p_menge TYPE menge VALUE '13.123'.
DATA : p_menge1 TYPE p DECIMALS 2.
p_menge1 = p_menge.
WRITE : p_menge1.in your output table for report display move the quantity to a variable which has only 2 decimals, just like what i did above.
Regards
Gopi
‎2007 Sep 06 6:51 AM
Hi,
In final output specify like this
otab-recv_qty DECIMALS 2Regards,
Nandha
Reward if it helps
‎2007 Sep 06 7:10 AM
DATA: BEGIN OF itab OCCURS 0,
ebeln LIKE ekpo-ebeln,
menge TYPE p DECIMALS 2,
END OF itab.
SELECT ebeln menge FROM ekpo INTO CORRESPONDING FIELDS OF TABLE itab
WHERE ebeln = '7103500006'.
LOOP AT itab.
WRITE:/ itab-ebeln,itab-menge.
ENDLOOP.
Try this coding.
‎2007 Sep 06 1:36 PM
hi karthik,
I understood u'r doubt and clarified it upto my knowledge level, so go though this code. If this is not helpfull just make u'r doubt a little bit more clariffication.
TABLES: ekpo.
DATA: BEGIN OF itab OCCURS 0,
ebeln LIKE ekpo-ebeln,
menge TYPE p DECIMALS 2,
END OF itab.
SELECT ebeln menge FROM ekpo INTO CORRESPONDING FIELDS OF TABLE itab
WHERE ebeln = '2000001992'.
LOOP AT itab.
WRITE:/ itab-ebeln,itab-menge.
ENDLOOP.
<b>please reward points if helpfull.</b>
with regards,
radhika kolluru.
‎2007 Sep 06 1:45 PM
hi,
u can do this 2 ways.
1st way -
create a variable with two decimal places and assign the result value to this variable and display the newly created variable
DATA : p_menge TYPE menge VALUE '13.123'.
DATA : p_menge1 TYPE p DECIMALS 2.
p_menge1 = p_menge.
WRITE : p_menge1.
2way: while declaring the decimal value use DECIMALS KEYWORD WITH REQUIRED LENGTH as
DATA : p_menge TYPE p DECIMALS 2.
if helpful reward some points.
with regards,
Suresh ALuri.
‎2007 Sep 06 2:14 PM
data : begin of itab_ekpo,
mange like ekpo-menge,
end of itab_ekpo.
data : var1 type p decimals 2.
select mange from ekpo into table itab_ekpo.
var1 = mange.
write 😕 var1.
Reward with points if helpful.