on 08-02-2016 5:07 PM
You may try wdy_attribute_format_prop,
set ls_att_format-null_as_blank = 'X'.
also have a look at Suppress leading zeros for ALV column | SCN
Hope this helps.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I already gives you link,
data:
lr_node_contract_items TYPE REF TO if_wd_context_node,
lr_node_info TYPE REF TO if_wd_context_node_info.
data:
ls_att_format TYPE wdy_attribute_format_prop.
lr_node_contract_items = wd_context->get_child_node( name = if_componentcontroller=>wdctx_contract_items ).
lr_node_info = lr_node_contract_items->get_node_info( ).
ls_att_format-null_as_blank = 'X'.
lr_node_info->set_attribute_format_props(
name = 'FIELDNAME'
format_properties = ls_att_format
).
Hope this helps.
Hi Serge
You mean you want to hide content of that particular column or you want to hide the entire row ?
If the entire row then use delete where date is initial ?
Regards
Vinita
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Serge,
Create a new attribute CELL type WDUI_VISIBILITY in alv output node.
Then compare below code with your exisitng code in WDDOINIT or WDDOMODIFYVIEW of view
LOOP AT lt_column INTO ls_column .
lo_column = ls_column-r_column. .
CASE ls_column-id .
WHEN 'ERZET' .
l_column_header = lo_column->get_header( ) .
CALL METHOD l_column_header->set_text
EXPORTING
value = 'Date'.
CALL METHOD lo_column->create_header
RECEIVING
value = temp.
CALL METHOD lv_value->if_salv_wd_column_settings~set_column_header_splitter
EXPORTING
value = '1'.
DATA : lo_cell_v TYPE REF TO cl_salv_wd_uie.
l_column_header->set_ddic_binding_field(
if_salv_wd_c_column_settings=>ddic_bind_none ) .
lo_cell_v = ls_column-r_column->get_cell_editor( ).
CALL METHOD lo_cell_v->set_visible_fieldname
EXPORTING
value = 'CELL'.
WHEN 'CELL'.
CALL METHOD lo_column->set_visible(
EXPORTING
value = '00'
).
ENDCASE.
ENDLOOP.
DATA lo_nd_vbak TYPE REF TO if_wd_context_node.
DATA lt_vbak TYPE wd_this->elements_vbak.
DATA ls_vbak TYPE wd_this->element_vbak.
lo_nd_vbak = wd_context->get_child_node( name = wd_this->wdctx_vbak ).
lo_nd_vbak->get_static_attributes_table( IMPORTING table = lt_vbak ).
LOOP AT lt_vbak INTO ls_vbak.
IF ls_vbak-bnddt <> '20070930'.
ls_vbak-cell = '02'.
ENDIF.
MODIFY lt_vbak FROM ls_vbak INDEX sy-tabix.
ENDLOOP.
lo_nd_vbak->bind_table( new_items = lt_vbak set_initial_elements = abap_true ).
Please check highlighted part...
Hi Pranav,
If I got your code well, you're using a second property to control the visibility of the date column?
Funny! I would expect that Web Dynpro better handles this scenario.
If this is the only solution, it wouldn't be the first dirty coding I would provide to make it work instead of having it standard to the product!
Thanks!
Lind regards,
Serge.
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.