on 03-25-2010 4:44 PM
Hello,
To make screen look consistent with other character input field. How can we change the input field on the view stop displaying zeros even though the data type is NUMC and data type should not be change?
Edited by: sap_learner on Mar 25, 2010 5:44 PM
Edited by: sap_learner on Mar 25, 2010 5:49 PM
Edited by: sap_learner on Mar 25, 2010 5:55 PM
Hi,
In the attribute context, select the following formatting option-
Display Leading Zeros - Zeros as Blanks
Hope this fixes the issue.
Cheers,
Ravikiran.
[My Articles|http://divulgesap.com/profile.php?u=Mg==]
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi
Check this [pic|http://picasaweb.google.com/lh/photo/rNaiJ9MJ2t88j5XX4O8Dwg?feat=directlink]
Attributes of underlying data type NUMC, DEC etc will have this option of DisplayLeadingZeroes in formatting section available.
You can also set the same in code by using method SET_ATTRIBUTE_FORMAT_PROPS of interface if_wd_context_node_info.
Regards
Manas Dua
Hi,
Refer to this below link for more details-
http://www.divulgesap.com/blog.php?p=OTY=
Hope this solves your issue.
Cheers,
Ravikiran
hello Manas Dua,
Thanks for your help. I am able to resolve my problem.
My code will help the future comers to resolve this kind of issues.
*The code is applied to method WDDOINIT of the default view.
DATA lo_nd_terms_input TYPE REF TO if_wd_context_node.
DATA lo_nd_terms_input_i TYPE REF TO if_wd_context_node_info.
DATA lv_zeros TYPE wdy_attribute_format_prop.
lv_zeros-null_as_blank = 'X'.
lo_nd_terms_input = wd_context->get_child_node( name = wd_this->wdctx_input ).
lo_nd_terms_input_i = lo_nd_terms_input->get_node_info( ).
lo_nd_terms_input_i->set_attribute_format_props(
EXPORTING
name = `ENTER THE ATTRIBUTE NAME`
format_properties = lv_zeros ).
Edited by: sap_learner on Mar 26, 2010 5:02 PM
User | Count |
---|---|
87 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.