cancel
Showing results for 
Search instead for 
Did you mean: 

How to Hide Row in table view depend on condition

Former Member
0 Kudos

Dear Friends,

Please any one suggest how to do hide some rows in table depend on condtions.

My Issue is :

I have table with binding componant context controller, with in that some rows are no need to disply in my table, I tried to delete that entities from collection wrapper in do_prepare_output. but that entites are perminatly deleted from model node.

how can achive this with out delete entities from model node and hide some rows in table view.

thanks & Regards

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Ganesh ,

One approach would be to create a new Z table view wiith similar fields as in your original view.Create a Value nodes and display the values as per your conditions.When user tries to set some values on UI update your original view attributes.

Through configuration you can display your temporary view on UI instead of original table view.

Implementing this approach is little complex to do but definitely solves your issue.

Regards,

Padma.

Former Member
0 Kudos

Hi Parma,

Thank you, but that is lengthy & complex process, is there any alternative method instead of that.

thanks & Regards

Ganesh

Answers (1)

Answers (1)

afordham
Participant
0 Kudos

You could try using an iterator (IF_HTMLB_TABLEVIEW_ITERATOR) on whichever table tag is in the view. You could then implement the RENDER_ROW_START start method to skip the row if your criteria weren't met.

Andrew

Former Member
0 Kudos

Hi Andrew,

Please can you explain alobrate, because i wont' found that method in my implimentation and it's table config like follow

<% IF attr->check_consistency( ) eq abap_true. %>

<chtmlb:configTable xml="<%= lv_xml %>"

id="TextList"

navigationMode="BYPAGE"

onRowSelection="select"

table="//Text/Table"

width="100%"

selectedRowIndex="<%=Text->SELECTED_INDEX%>"

selectedRowIndexTable="<%=Text->SELECTION_TAB%>"

selectionMode="<%=Text->SELECTION_MODE%>"

usage="ASSIGNMENTBLOCK"

visibleRowCount="3"/>

<% ENDIF. %>

thanks & Regards

Ganesh

Former Member
0 Kudos

Dear Friends,

this isssue is solved, our approch is wrong..

lr_coll_wrapper->remove( lr_entity ).

  • IF lr_entity->is_send_active( ) = abap_false.

  • lr_entity->delete( ).

  • lr_entity ?= lr_iterator->get_current( ).

  • ENDIF.

we need to remove entity from collection wrapper instaed of that we did delete entity.

thanks all

Ganesh

Former Member
0 Kudos

Hi Ganesh,

I was just about to give you the same reply.Today I identified that we need to remove instead of delete.Your problem is already resolved

Regards,

Padma.