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

Hi Nitish,
Try below code instead of your code,
Data:
lt_empty_lines  TYPE TABLE OF REF TO cl_crm_bol_entity,
lr_entity TYPE REF TO cl_crm_bol_entity.
After getting collection from BTadmini use the below code.
lr_iterator ?= lr_coll->get_iterator( ).
    lr_entity ?= lr_iterator->get_first( ).
    WHILE lr_entity IS BOUND.
      IF lr_entity->is_send_active( ) EQ abap_false.
        APPEND lr_entity TO lt_empty_lines.
      ENDIF.
      lr_entity ?= lr_iterator->get_next( ).
    ENDWHILE.
    LOOP AT lt_empty_lines INTO lr_entity.
      typed_context->btadmini->collection_wrapper->remove( lr_entity ).
      lr_entity->delete( ).
    ENDLOOP.
Best Regards,
Dharmakasi.

Similar Messages

  • How do you remove blank lines from an assignment block?.

    I have used the UI enhancement tool to add fields to an assignment block, but I've ended up with a blank line between the fields. How can I remove this?. There's an option to add new lines and fields but not remove them.
    Anyone.
    Jason

    Many thanks, that worked fine. I did not think of doing that, but I can see why there would not be a remove line option.
    Regards
    Jas

  • HT1349 how to delete multiple items in itunes

    how to delete multiple items in itunes

    I inported my music files and see that I have multiple copies on my files so now I have multiple copies in iTunes.
    Some are multiples, some are duplicates, some are from different dates and some do not work and have the symbol for this.
    Thus, I must be picky about which ones I delete.
    Looks like I will have to continue deleting manually.

  • How to delete multiple duplicates of multiple songs?

    How to delete multiple duplicates of multiple songs from my library at the same time, rather than each individually?

    Apple's official advice on duplicates is here... HT2905: How to find and remove duplicate items in your iTunes library. It is a manual process and the article fails to explain some of the potential pitfalls such as lost ratings and playlist membership.
    Use Shift > View > Show Exact Duplicate Items to display duplicates as this is normally a more useful selection. You need to manually select all but one of each group to remove. Sorting the list by Date Added may make it easier to select the appropriate tracks, however this works best when performed immediately after the dupes have been created.  If you have multiple entries in iTunes connected to the same file on the hard drive then don't send to the recycle bin.
    Use my DeDuper script if you're not sure, don't want to do it by hand, or want to preserve ratings, play counts and playlist membership. See thisthread for background, this post for detailed instructions, and please take note of the warning
    to backup your library before deduping.
    (If you don't see the menu bar press ALT to show it temporarily or CTRL+B to keep it displayed.)
    The most recent version of the script can tidy dead links as long as there is at least one live duplicate to merge stats and playlist membership to and should cope sensibly when the same file has been added via multiple paths.
    tt2

  • How to delete multiple music tracks

    how to delete multiple music tracks?

    I think rendering the audio has to do with the way I import to FCE. This is how I bring video into FCE because it seems to be the only way I can get it to work. I run my video camera through a digital coverter which runs a firewire into my Mac. I then import the video into imovie. After that is done, I do a drag and drop of the imovie into FCE. I have to render the audio because it just beeps if I don't when I play it back in FCE. I tried using the video capture in FCE but it keeps telling me it is unable to capture (my gues is the cameras are too old and the digital converter in not compatable with FCE or Mac). So once the video and audio footage is in FCE, if I click the green button on the left hand side, my rendered audio becomes a red line. However, I can click the same button on the upper video portion, and it drops the video out so I can see video clips on the lower levels and not just the first one on top. So that's why I render the audio. I can see all twelve audio tracks already. Tom- would making the change you suggest still help? Great book by the way also.

  • How to delete multiple playlists from itunes

    how to delete multiple playlists from itunes?

    Have you subscribed to iTunes Match? There is a bug that can sometimes create hundreds of duplicate empty playlists. I've two scripts which might help you clean up: KillEmptyPlaylists and KillTopLevelPlaylists. This post describes a technique for resetting iTunes Match to stop it happening again.
    tt2

  • How to delete string or line from unix file(dataset) of application server

    Hi  All,
    After transfer workarea information or all records into dataset(unix file). When I see the file in application server automatically the last line is shown a blank line. I am not passing any blank line.
    I have tried for single record than also the file generates the last line(2nd line) also a blank line.
    When I m reading the dataset, it is not reading the last blank line but why it is showing the last blank line?
    How to delete string or line from unix file(dataset) of application server?
    Please give your comments to resolve this.
    Thanks
    Tirumula Rao Chinni

    Hi Rio,
    I faced similar kind of issue working with files on UNIX platform.
    The line is a line feed to remove it use
    DATA : lv_carr_linefd TYPE abap_cr_lf VALUE cl_abap_char_utilities=>cr_lf. 
      DATA : lv_carr_return TYPE char1,                                   
             lv_line_feed   TYPE char1.                                          
      lv_line_feed   = lv_carr_linefd(1).
      lv_carr_return = lv_carr_linefd+1(1).
    Note: IMP: The character in ' ' is not space but is a special
    character set by pressing ALT and +255 simultaneosly
      REPLACE ALL OCCURRENCES OF lv_line_feed IN l_string WITH ' '.
      REPLACE ALL OCCURRENCES OF lv_carr_return IN l_string WITH ' '.

  • How to delete multiple contacts in ios7??

    how to delete multiple contacts in ios7??

    Hi arunvdi!
    Here’s an article for you that will help you with deleting contacts:
    Manage conversations - iPhone
    http://help.apple.com/iphone/7/#/iphf2d85437
    Thanks for coming to the Apple Support Communities!
    Regards,
    Braden

  • How to delete multiple contacts in iphone 5

    how to delete multiple contacts in iphone 5

    This is a good little app to check for duplicates and delete multiple contacts all at the same time: https://itunes.apple.com/gb/app/delete-duplicates-+-contacts/id508504148?mt=8

  • How to delete multiple contacts in iphone

    how to delete multiple contacts in iphone

    To Erase iPhone Contacts, SMS and Photo Permanently,you must to use a iPhone data eraser software.
    This use guide about how to deleted iPhone contacts,it can help you erase all contacts from iPhone permanently.
    How to Delete iPhone Contacts Permanently
    http://www.z0download.com/useg...

  • How to delete the specified line in file?

    How to delete the specified line in file? In case of deleting a specified line in a file, how to do?
    Line 1
    Line 2
    Line 3
    Line 4
    Line 5
    The case is a file including the above content. Now I wanna to delete the "Line 3" and how to realize the action in Java?

    An alternative solution can be :
    import java.io.LineNumberReader;
    import java.io.IOException;
    import java.io.File;
    import java.io.FileReader;
    import java.io.BufferedWriter;
    import java.io.FileWriter;
    import java.io.PrintWriter;
    public class LineDeleter {
    public static void main(String args[]){
    try {
    //suppose you want to delete line 3
         int lineToBeDeleted = 3;
         File f = new File("line.txt");
         long fileSize = f.length();
    //Wrap the FileReader with a LineNumberReader. It will help you
    //identify the lines.
    LineNumberReader lnr = new LineNumberReader( new FileReader(f));
    //Wrap the FileWriter object with BufferedWriter object. Create it with the buffersize
    //equal to the file size.
         BufferedWriter bw = new BufferedWriter(new FileWriter(new File("line1.txt")),(int)fileSize);
    //Wrap BufferedWriter object with PrintWriter so that it allows you
    //to print line by line
    PrintWriter pw = new PrintWriter(bw);
         String s=null;
         while ( (s=lnr.readLine())!=null ){
              System.out.println(s);
              int lineNumber = lnr.getLineNumber();
    //match the line number
              if(! (lineNumber==lineToBeDeleted)){
                   pw.println(s);
              pw.flush();
              lnr.close();
              pw.close();
         catch(Exception e){System.out.println(e);}
    If you want you can rename the line1.txt to the original file name.
    I hope this helps.Good luck!!!!!!

  • How to delete multiple rows from ADF table

    How to delete multiple rows from ADF table

    Hi,
    best practices when deleting multiple rows is to do this on the business service, not the view layer for performance reasons. When you selected the rows to delete and press submit, then in a managed bean you access thetable instance (put a reference to a managed bean from the table "binding" property") and call getSeletedRowKeys. In JDeveloper 11g, ADF Faces returns the RowKeySet as a Set of List, where each list conatins the server side row key (e.g. oracle.jbo.Key) if you use ADF BC. Then you create a List (ArrayList) with this keys in it and call a method exposed on the business service (through a method activity in ADF) and pass the list as an argument. On the server side you then access the View Object that holds the data and find the row to delte by the keys in the list
    Example 134 here: http://blogs.oracle.com/smuenchadf/examples/#134 provides you with the code
    Frank

  • How to delete multiple photos

    how to delete multiple photos at once

    Hello 2075,
    Thanks for using Apple Support Communities.
    To delete multiple photos at once on your iPad, all you need to do is tap on Select while in the Photos app, select the photos you'd like to delete, and then tap on the trash can.
    Organize photos and videos - iPad User Guide
    Take care,
    Alex H.

  • How to delete multiple songs from iPhone 5S without losing form iTunes? The unchek function has not worked. Why?

    How to delete multiple songs from iPhone 5S without losing form iTunes? The unchek function has not worked. Why?

    Sorry I had to reply through your profile Gail from Maine, my PC has java issues. In any event, when I delete them directly from my device everything is perfect and cool. However, in the rare instance I want to add new music that I actually buy in stores (I know, quite the unique and old-fashioned idea...but hey Im an audiophile) once I upload the tunes, everytime I sync my library it re-adds everything that I spent hours deleting. In a perfect world, I thought I could maintain a massive iTunes Library, and add or delete (remove) songs from my iPhone to save both memory or keep my iPhone selections more current/apt to my musical "tastes" at that time. I know about the whole playlist thing, but thought there might be an easier way. ie - checking/un-checking the little box next to the song name, and then doing a sync. Again, everytime I do this however, whether everything is checked or un-checked it adds the entire library! So frustrating. Any suggestions. Thank you graiously in advance for your help.

  • How to delete multiple emails from iPad 2

    how to delete multiple emails from iPad 2?

    Update to ios7.0.3. They resurrected the trick of Edit, click a single email, then press move, release the email you checked and then all the e mails can be moved to whatever folder you want.

Maybe you are looking for

  • Nwds build error

    Hi, I am trying to apply a oss note on ess application using nwds, I have imported the development configuration perspective. When I rebuild ess-au-addr application (without any changes yet) I am getting the error (see below). Please help, thanks. 5/

  • TIME MACHINE - MAIL BACKUP - MAC 10.6.8

    Hi guys I am new to using Time Machine and still learning about my Mac. I have many important work emails that have contact information of people i am dealing with in other countries if i Lose my emails i am screwed. Does time machine backup your ema

  • Losing Printer Options after Snow Leopard Upgrade?  Any solution?

    I've lost the ability to print multiple pages on one page with my Samsung SCX-4500 printer. The only factor that changed is upgrading to Snow Leopard. I've reinstalled printer drivers but the Page Setup/Layout drop down screen is not available. Has a

  • How to change lables of container tabs?

    After creating a "Tab Set" container I can not find any option to change the label (e.g. Tab 1, Tab 2). Does anybody have an idea?

  • How to open .DB file

    I have a file with .DB extention of 1.5 MB size. I dont know whether i can open it in oracle ot any other tool?