cancel
Showing results for 
Search instead for 
Did you mean: 

Best way to mask a web dynpro view field

Former Member
0 Kudos

hey guys ,

i was wondering , what would be the best way to mask a field in web dynpro.

the way i am doing this is i get a value (float ) and pass it to a method i have on my context that uses the java NumberFormat to apply #####.## and it returns a string.

but since all i want to do is on the field i want to show the value as a price ( i.e 999.99 ) always with double digits

TIA,

Guy

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Kudos

Hi

Use Java DDIC (data dictionary).Check out this post. This tells you how to use it.

https://www.sdn.sap.com/sdn/collaboration.sdn?node=linkFnode6-1&contenttype=url&content=https://

Hope that helps.

regards

ravi

Former Member
0 Kudos

Hi,

1. Create a simple type of type double and click the format tab of the simple type. Set the format "#####.##"

2. Create a context attribute

3. Assign the type of the context attribute to the created simple type

4. Assign the value to the context attribute.

Now the data will be stored in the specified format.

Regards,

Santhosh.C

Former Member
0 Kudos

Hi Barros

Create a simple type variable in your local dictionary. In the Representation tab, Format input filed type "####.##".

Create a value attribute and assign the type to the simple type created.

Kishore

Former Member
0 Kudos

You should use the Java DDIC (data dictionary) for this task. There you can create your own datatypes and define the needed format.

Armin