Skip to Content
author's profile photo Former Member
Former Member

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

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( ).


lr_current = lr_iterator->get_first( ).

CATCH cx_root.


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 ).






lr_current = lr_iterator->get_next( ).

CATCH cx_root.



Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • Best Answer
    Posted on Jun 09, 2014 at 09:28 AM

    Hi Nitish,

    I just curious to know why would you use EXIT statement after deleting first empty line?

    System will not continue the loop after deleting the first empty line.



    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Jun 09, 2014 at 07:42 AM

    Hi ,

    Use below statement before endwhile:

    UNASSIGN <fs_line_structure>.



    Kumar Gaurav

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hi Gaurav,

      Thanks a lot for your quick reply. I tried with above statement but, its not working.

      Ex. 3 records and 3 empty lines. Total 6 entries in 'BTAdminI' context node. its deleting only first 2 empty rows.

      Thanks & Regards,


Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.