on 04-28-2009 8:38 AM
Hi,
the UI-Element Table which I have created has in some fields default Zeros.
UI-Element Table is editable.
The current Contextname is ZHEAD. And there are 3 columns
affected e.g. MKG etc.
How can I remove those zeros.
Best regards
ertas ilhan
dear experts,
I am getting the message:
element_context is unknown
Regards
ertas
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Select the node in which you have the attribute for which you do not want default value as Zero.
Data: l_node type ref to if_wd_context_node.
l_node = wd_context->get_child_node( 'NODENAME' ). " Node in which you have the attribute which has to be made blank.
l_node->set_attribute_null( exporting name = 'Atrtibute Name' ).
Regards,
Radhika.
dear friends thank you very much for your helps.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi,
->In your table , there must be some columns which are coming as zeros in the output.
->Note the context which is binded to that column.
Use Set_Attribute_null of if_wd_Context_node to set zeros to null.
Thanx.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
In the latest versions, you can find the formatting options for the context attribute where
you can display the zeroes as Blanks. Select this option for the context attributes. If still it is not set
then use the above ways as suggested by others.
Go to context attribute propertoes->
FORMATTING->
DISPLAY LEADING ZEROES choose option Zeros as Blanks.
Regards,
Lekha.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Zero appears because the data type that you are using has the default value Zero.
Check if you can change the data type to String, as the default value for string is space else use
set_attribute_null method.
Regards,
Radhika.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
You can use set_attribute_null( ) method to clear the input field.
Refer the code below:
DATA lo_el_context TYPE REF TO if_wd_context_element.
DATA ls_context TYPE wd_this->element_context.
* get element via lead selection
lo_el_context = wd_context->get_element( ).
** get single attribute
lo_el_context->set_attribute_null(
EXPORTING
name = `ABC` "ABC is the name of attribute that is binded to the input field.
).
You can use this code in wddoinit method to clear the input field in the table.
Or you can set the Display Leading Zero property of the attribute that is binded to the input field as Zeros as Blank.
I hope it helps.
Regards
Arjun
Edited by: Arjun Thakur on Apr 28, 2009 1:13 PM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
81 | |
9 | |
9 | |
7 | |
7 | |
6 | |
6 | |
6 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.