‎2007 Apr 17 4:59 AM
Hello Friends,
I have a currency fields in a Screen, When it's value is null, It is showing me as SPACE. But My requirement is to display 0.00. How can I do this? Please do the favour needful.
Thanks & Regards
Sathish Kumar.
‎2007 Apr 17 5:01 AM
hi Satish,
Sorry i haven't noted that it is currency field ... if that is a case ... do this way
loop at itab.
lv_tabix = sy-tabix.
if itab-curr = SPACE.
itab-curr = '0.00'.
modify itab index lv_tabix transporting curr.
endif.
endloop.
Regards,
Santosh
Message was edited by:
Santosh Kumar Patha
‎2007 Apr 17 5:02 AM
Satish,
Try intialisaing that field to 0.00 when initial.
if itab-kwert eq space.
itab-kwert = ' 0.00 '.
endif.
K.Kiran.
‎2007 Apr 17 5:07 AM
If I use this way, I need to do further calculations based on that. is it works for calculations.
‎2007 Apr 17 5:15 AM
hi Satish,
What sort of calculations you are trying to do ???
Regards,
Santosh
‎2007 Apr 17 5:17 AM
I am calcultating totals. But even, IF I use the '0.00' method, it is not working. Could you check in to this.
‎2007 Apr 17 5:29 AM
hi Satish,
You make the changes that i have specified at the final display of your internal table ...i.e, when you have all the data into your internal table and the table is ready for display do theser modifications so that it will not affect your calculations ...
i.e,
loop at it_final.
endloop.Regards,
Santosh
‎2007 Apr 17 5:02 AM
whatb ref.field u have take for this Field ,
like
field1 ref == bseg-dmbtr.
then it will comes .
otherwise check the attributes of that fields , have to checked no-zero option or not?
Regards
Prabhu
‎2007 Apr 17 5:04 AM
Sathish,
If it is not standard program,you can set the value like
AT SELECTION_SCREEN.
if p_currency is initial.
p_currency = '0.00'.
Endif.
Don't forget ot reward if useful.
‎2007 Apr 17 5:59 AM
i send to example to
check it
if u have any doubt in contact this email
<b><b>exmple</b></b>
tables : mard.
*this is required inernal table
data : begin of itab occurs 0,
matnr type mara-matnr,"material field
werks type mard-werks,"character field
end of itab.
*it was taken by the use of printing data in presentation server
*here define same itab in above except currency field
data : begin of itab1 occurs 0,
matnr type mard-matnr,"material field
vklab type mard-vklab,"currency field
end of itab1.
select-options s_matnr for mard-matnr.
select matnr werks from mard into table itab where matnr in s_matnr.
*here i cleared the character field data then this
*field contains only spaces
loop at itab.
clear itab-werks.
write : / itab-matnr,itab-werks.
modify itab from itab index sy-tabix.
endloop.
break-point.
*here i append the all the fields itab to itab1 except currency field
loop at itab.
if itab-werks = space.
move itab-matnr to itab1-matnr.
append itab1.
endif.
endloop.
*then i will print the itab1 values to presentation server
loop at itab1.
*clear itab-vklab.
write : / itab1-matnr,itab1-vklab.
endloop.