on 02-09-2010 9:53 AM
Hello Experts
I have come across rather annoying issue with displaying initial amounts on ALV component of Web Dynpro for Abap. Basically instead of getting 0.00 I am getting blank fields. I tried several combinations (null value, retain zeros, default value etc) of context attribute settings but with no luck so far. Data type I am using for mentioned attributes is BETRH_KK. I have also tried populating fields with initial value with zero but that did not work either.
Does anyone have some idea how to solve it?
Regards
Michael
Hello Michael,
If everything fails You can always change the data type to char / string type and populate it with 0.00 values.
Thanks,
Abhishek
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Take a look at the formatting options in the context attribute. For some data types you can use the display leading zeros formatting option:
http://help.sap.com/saphelp_nw70ehp1/helpdata/en/3a/2232666aeb45f4b759848a4caf9c8b/frameset.htm
It could also be a field conversion exit on this data type. You might have create your own domain (of the same elemental data type) and use a custom field conversion exit to get the formatting exactly the way you want it.
Thomas
Thanks for your suggestions.
I have tried several things:
1. I have added following code in the WDDOINIT method of the View
DATA: nd_assessments TYPE REF TO IF_WD_CONTEXT_NODE,
nd_assessments_info TYPE REF TO IF_WD_CONTEXT_NODE_INFO,
ls_format_props TYPE WDY_ATTRIBUTE_FORMAT_PROP.
nd_assessments = wd_context->get_child_node( name = wd_this->wdctx_assessments ).
nd_assessments_info = nd_assessments->get_node_info( ).
ls_format_props-null_as_blank = ' '.
ls_format_props-condense = ' '.
nd_assessments_info->set_attribute_format_props( NAME = 'TAXBAMNT' FORMAT_PROPERTIES = ls_format_props ).
2. I have tried to manipulate displayed amounts by adding code in method WDDOMODIFYVIEW of the View. Code works perfectly fine as long as I am not trying to display zero amounts
3. I have also tried to use conversion exits for my amount data type. However I did not get far with that (tried several types with no luck). Please note that when printing zero amount in standard ABAP screen (using WRITE command) I do get expected result (0.00).
Please do share any additional advice you might have.
Regards
Michael
User | Count |
---|---|
84 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.