Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Problem with Display?

Former Member
0 Likes
889

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.

9 REPLIES 9
Read only

Former Member
0 Likes
869

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

Read only

kiran_k8
Active Contributor
0 Likes
869

Satish,

Try intialisaing that field to 0.00 when initial.

if itab-kwert eq space.

itab-kwert = ' 0.00 '.

endif.

K.Kiran.

Read only

Former Member
0 Likes
869

If I use this way, I need to do further calculations based on that. is it works for calculations.

Read only

Former Member
0 Likes
869

hi Satish,

What sort of calculations you are trying to do ???

Regards,

Santosh

Read only

Former Member
0 Likes
869

I am calcultating totals. But even, IF I use the '0.00' method, it is not working. Could you check in to this.

Read only

Former Member
0 Likes
869

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

Read only

Former Member
0 Likes
869

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

Read only

Former Member
0 Likes
869

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.

Read only

Former Member
0 Likes
869

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.