Skip to Content
0
Former Member
Jun 09, 2014 at 06:58 AM

How to delete multiple empty lines in item assignment block in WebUI

174 Views

Hi Experts,

When i am reading 'BTAdminI' context node data, I am getting empty lines along with data. I can able to delete only one empty lines when its executing second empty line its failing in loop. Can you suggest me how can i delete multiple empty lines. I am using below code.

DATA: lr_entity1 TYPE REF TO cl_crm_bol_entity,

lr_current TYPE REF TO if_bol_bo_property_access,

lr_iterator TYPE REF TO if_bol_bo_col_iterator,

lv_strukname TYPE strukname,

dref TYPE REF TO data,

lv_thtmlb_tableview TYPE REF TO cl_thtmlb_table_view,

lr_cn TYPE REF TO cl_bsp_wd_context_node_tv,

cr_mixed_node_tv TYPE REF TO cl_bsp_wd_mixed_node.

FIELD-SYMBOLS: <fs_line_structure> TYPE data.

lr_iterator = me->typed_context->btadmini->collection_wrapper->get_iterator( ).

TRY.

lr_current = lr_iterator->get_first( ).

CATCH cx_root.

ENDTRY.

WHILE lr_current IS BOUND.

lr_entity1 ?= lr_current.

CHECK lr_entity1 IS BOUND.

lr_entity1->get_attr_struct_name( RECEIVING rv_result = lv_strukname ).

IF lv_strukname IS NOT INITIAL.

CREATE DATA dref TYPE (lv_strukname).

ASSIGN dref->* TO <fs_line_structure>.

IF <fs_line_structure> IS ASSIGNED.

lr_current->get_properties( IMPORTING es_attributes = <fs_line_structure> ).

IF <fs_line_structure> IS INITIAL.

me->typed_context->btadmini->collection_wrapper->remove( lr_current ).

EXIT.

ENDIF.

ENDIF.

ENDIF.

TRY.

lr_current = lr_iterator->get_next( ).

CATCH cx_root.

ENDTRY.

ENDWHILE.