cancel
Showing results for 
Search instead for 
Did you mean: 

Not appear zeros in text field

Former Member
0 Kudos

Hi experts,

I have a problem with Visual Composer 7.0 and the scenario is as follows:

I have a BAPI that displays the salaries of employees, and the salaries can be u201C500.100u201D, u201C325.000u201D, etcetera.

When I test the BAPI there is no problem, the data display with no problem, but the problem arises when deploying this data in an IView form in Visual Composer, here it displays the following data: u201C500.1u201D or u201C325u201D. Not so when the values are u201C9.999u201D o u201C100.001u201D (The field in the form Iview is Text Type). In other words, all zeros to the right not appear.

Is there any solution for this problem?

Thanks.

PD: I think the text field is taking a decimal value.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi

I am not getting what you want exactly but try with formula.

Where you are using these fields, there you can select the field through 'Enter Formula' & try following -

1. If you want to display 'Texxt field' as number & with all decimals then use formula - NVAL(Your Text field)

2. If you dont want to display decimals then use formula - ROUND(Your Text Field)

Regards

Sandeep

Edited by: Sandeep Patki on Sep 16, 2009 6:43 AM

Answers (1)

Answers (1)

vipin_v2
Participant
0 Kudos

Hi,

Alternatively try doing this, for the table column "xyz", go to properties>Formatting tab>set number format =

"numeric" , uncheck the "local format" and then set decimal places to 0.

Regards,

Vipin.

Former Member
0 Kudos

Thanks for your help guys,

But I need is to show all decimals, even the zeros. The problem is that the field is not numeric (is type Text), so I canu2019t change to local format.

I try with formula NVAL, but I don´t have any result.

Regards.

Former Member
0 Kudos

Hi,

if:

both dataservice returns a String, and the form field is a String

you should have any issues... sounds to me like a bug.

but:

I put an expression box of type String in a form and assigned the value "500.00000000000000" to it.

the number is not cut.

also I have tried it with a dataservice that returns a string, and still it's not cut..

could you describe the scenario more clearly? what SP are you using?

Edited by: Amir Mimran on Sep 16, 2009 10:30 AM

Former Member
0 Kudos

Hi Amir,

The scenario is as follows:

I have a ZBAPI that returns a several data employee (employee number, employee name, position, etcetera) and among these, is the Field Employee Salary (BETRG infotype 00008) which is declared as Char. When I test the ZBAPI, the ZBAPI returns correctly the employee salary; therefore if the salary of some employee is 1000, the ZBAPI returns 1.000

But at the moment of consulting the same employee in the form Iview of Visual Composer returns the value 1, I tested with an Expression Box, but the result is the same.

Portal 7.0 SP16

Regards

Former Member
0 Kudos

Ok.

an idea, could there be that the locale of the user that runs the VC iView is NOT "de-XX"?

in the de locales, as you know the "." is for thosands, but in en-us and other locales the "." is for decimal seperation.

and so: 1.000 is in fact 1, and not 1000.

VC takes it's locale from the Portal locale, so maybe there's a difference between what the ZBAPI returns and what is used in the portal?

and in general, I suggest upgrading to SP18 at least, where issues relating to number formatting and locale are solved completly.

(as I said before in this forum, you can, yet I can't recommend, install only VC scas (those that start with VC*.SDA) to upgrade VC only, with no affect on portal, but do it on your own risk)

Former Member
0 Kudos

OK,

Thanks Amir, I will try as you say and then explain the results.

Regards.

Former Member
0 Kudos

Finally an abap developer fix the problem with the ZBAPI, anyway thank you very much for your advice.

Regards.

PD: forgiveness for the delay in my reply.