cancel
Showing results for 
Search instead for 
Did you mean: 

Empty amount fields showing as 0.00 in webdynpro

Former Member
0 Kudos

Hi

I have created a table in webdynpro which displays a list of assets of a business partner with asset value.

The asset value is an amount field and is followed by an asset currency field.

For certain records, if the asset has no value, the table is showing 0.00. However since certain assets may have no value (business case), we want tis field to show as blank instead of 0.00.

Any suggestions how to accomplish this?

Regards

Vikram

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi,

In attribute property select display zero as blank option

Thanks,

Gokul Venkatesh

ramakrishnappa
Active Contributor
0 Kudos

Hi Gokul,

The option is for controlling the leading zeros.

Former Member
0 Kudos

Hi Ramakrishna,

I am agree with Gokul's solution!!!!!

What Gokul Venkatesh told, it will work...Same thing i used in many programs... Can you explain me how it will not work out please????

Regards,

Vijay SR

ramakrishnappa
Active Contributor
0 Kudos

Hi Vijay,

You are right it works ...

I had tried few years back on lower version of system and it did not work on decimal zero rather it was working on only leading zeros. hence I was hoping that it works for only leading zeros.

Just now checked... yes it works cool.

Message was edited by: Ramakrishnappa Gangappa

ramakrishnappa
Active Contributor
0 Kudos

Hi Vikram,

We dont have any standard way to avoid displaying zeros as we do it in ABAP by using conversion exit output FM.

Only we can remove the leading zero by using format properties of context attributes.

Some workaround solution:

  • Create an attribute AMOUNT_STR of type char/string & move all data of your amount field to it
  • Bind the table column's editor to this attribute AMOUNT_STR

So, you will be having 2 columns internally, one as currency field and other as character/stirng..

For calculations and updating database, you can use of currency field while the character field is being displayed in table.

Hope this helps you.

Regards,

Rama

srikanthv2
Participant
0 Kudos

Hi,

While displaying as Report:

  If you Don't want to get '0.00'(you will get it because it is currency field) you need to take one variable as string or Char type of that much length.

  if you do like above as another variable which will not fetch standard calculations.

while in database table creation:

       to avoid 0.00, you need to give data type as 'DEC' and if you want decimals give like length-9 and decimals-2 or 5.

for example: KURSF in BKPF table.

Regards,

Sri....