How to delete the NULL entries in nest table

Hi,
After I used a loop and open/fetch cursor populated the object table
I found there are random NULL entries in my object table (nest table)
The data look like this
NULL NULL           NULL
NULL NULL           NULL
123     03-MAY-04     ACTIVE
NULL NULL           NULL
NULL NULL           NULL
234     21-MAY-04     ACTIVE
NULL NULL           NULL
345     11-MAY-04     ACTIVE
NULL NULL           NULL
How can I get rid of those NULL entries in my nest table? So it can become
123     03-MAY-04     ACTIVE
234     21-MAY-04     ACTIVE
345     11-MAY-04     ACTIVE
Additional info:
create type myType as object
(id NUMBER (10,0),
eff_date date,
status VARCHAR2(17)
create type myNestTab as table of myType;
I have tried Delete procedure in following two ways.
Version 1:
FOR i IN l_my_nest_tab.FIRST..l_my_nest_tab.LAST
LOOP
IF l_my_nest_tab(i).id IS NULL THEN
l_curr_event_tb.DELETE(i);
               END IF;                         
END LOOP;
Version 2:
FOR i IN l_my_nest_tab.FIRST..l_my_nest_tab.LAST
LOOP
IF l_my_nest_tab(i) IS NULL THEN
l_curr_event_tb.DELETE(i);
               END IF;                         
END LOOP;
Both of them give me the error “no data found.” And only left me the first NOT NULL entry in the table.
123     03-MAY-04     ACTIVE
Thanks in avdance.

Hi Vishnu,
u can write a report program for this and in that use the event  :
AT NEW <field-name> ( use primary key)
your statements
ENDAT
for eg.
loop at itab ( herfe itab must be of type of table for which u want to track new entries)
at new matnr
write:/ new record
endat
endloop.
schedule this report in background to run in every 5 or 10 mins as per your requirement and hence changes can be tracked.
regards
Vinod

Similar Messages

  • How to delete the total entries in ztable

    Hi ,
    How to delete the total entries in ztable...
    code pls.
    regards,

    Hi Venkat,
    pls see below records,
    Plant  Material                       Alternate material
    3770  00000000000126875          2020202
    3770  000000000005999335        2020202
    3770  117196                           2020202
    3780  00000000000126875           2020202
    3784  00000000000126875         2020202
    3784  000000000002809336       2020202
    3784  000000000005999335        2 020202
    3789  00000000000126875            2020202
    if  i write below syntax ,
    delete from ztable where matkl = '2020202'.
    all records contains  matkl = '2020202' will be deleted ??
    pls. reply.

  • How to delete the duplicate data  from PSA Table

    Dear All,
    How to delete the duplicate data  from PSA Table, I have the purchase cube and I am getting the data from Item data source.
    In PSA table, I found the some cancellation records for that particular records quantity  would be negative for the same record value would be positive.
    Due to this reason the quantity is updated to target but the values would summarized and got  the summarized value  of all normal and cancellation .
    Please let me know the solution how to delete the data while updating to the target.
    Thanks
    Regards,
    Sai

    Hi,
    in deleting the records in PSA table difficult and how many you will the delete.
    you can achieve the different ways.
    1. creating the DSO maintain the some key fields it will overwrite the based on key fields.
    2. you can write the ABAP logic deleting the duplicate records at info package level check with the your ABAPer.
    3.you can restrict the cancellation records at query level.
    Thanks,
    Phani.

  • How to tracke the new entries in database table ?

    Hi,
    How to tracke the new entries in database table ? is there any FM or report is there to check it ?
    regards
    vishnu

    Hi Vishnu,
    u can write a report program for this and in that use the event  :
    AT NEW <field-name> ( use primary key)
    your statements
    ENDAT
    for eg.
    loop at itab ( herfe itab must be of type of table for which u want to track new entries)
    at new matnr
    write:/ new record
    endat
    endloop.
    schedule this report in background to run in every 5 or 10 mins as per your requirement and hence changes can be tracked.
    regards
    Vinod

  • How to delete the trailng zeros in my table

    Hai
    I had a serious problem
    My table name called nrgp_main
    Here nrgpno declared as char(8) i had changed as 10 by mistake and i have update two times
    the number is like this 003800001 i need to cut the first '0' and update it
    Thanks & regards
    Srikkanth

    Duplicate post
    how to delete the trailng zeros in my table

  • How to delete the line for 300SAP* in table USR02 in SQL Management studio

    Hello
    I used to delete the line for 300SAP* in table USR02 in SQL Enterprise Manager. After I could log on with “pass”.
    I wander how to delete it in SQL Management studio. When I expand tdatabase it takes so long time and it is uncontrollable

    Hello,
    you have to delete the row by a sql statement.
    Open a new query and run a script like this:
    use <Your SID DB>                 -- e.g. use PRD
    setuser 'your sid in lowercase'  --- e.g. setuser 'prd'
    delete from USR02 where MANDT = '300' and BNAME = 'sap*'
    go
    Run a complete backup before deleting data manually.
    Regards
      Clas

  • How to delete the complete contents of database table ? should be empty !!

    Hi Guys,
    I have requirement where i have delete the contents of database table..i have make it empty (no records at all) and then i have to fill it with the records from the excel sheet.
    I can upload data from the excel sheet.
    Please tell me how to delete the complete contents of the database table ??
    Regards
    Rahul

    hi ,
    just write like this,
    delete from <database table>.
    commit work.
    sample code, here edpar is database table.
    delete from edpar." FROM TABLE g_tab_delete.
      call function 'DB_COMMIT'.
      loop at g_tab_edpar into g_wa_edpar.
        insert into edpar values g_wa_edpar.
        if sy-subrc  eq 0.
          move-corresponding g_wa_edpar to g_wa_edpar1.
          append g_wa_edpar1 to g_tab_edpar1.
        else.
          move-corresponding g_wa_edpar to g_wa_edpar2.
          append g_wa_edpar2 to g_tab_edpar2.
        endif.
      endloop.
    that's all it works.
    reward points if helpful.
    regards,
    seshu.

  • How to delete the duplicate records in a table without promary key

    I have a table that contains around 1 million records and there is no promary key or auto number coulums. I need to delete the duplicate records from this table. what is the simple effective way to do this.

    Please see this link:
    Remove duplicate records ...
    sqldevelop.wordpress.com

  • How to delete the unwanted entries directly from the UWL of MSS

    Hi experts
    I see an unwanted item stuck in WL of approver but not in his
    inbox how can i delete this entry form UWL,ihave tried refreshing UWL but the problem still persists please explain.
    when trying in the dev system
    *I actually applied leave from a test user
    his manager is able to view this workitem in his inbox
    then went into the background SAP and manually completed the workflow
    now if i go to the managers inbox i dont see it there
    but i still see it in UWL
    Could there be any reason for this,Please advice*
    Thanks in advance for your anticipated cooperation

    Hello,
    It is not easily possible to delete the workitems from UWL in MSS except using Batch program in backend ECC.
    Check again in the ECC, the workflow is got trigered and there is surely workitem in the manager's SAP Inbox. Check the tcode swia, enter the workflow task number and the workflow is got triggerred.
    Use swi5 tcode to see the Completed Workitems and to be completed workitems for that Employe (manager).
    The other reason could be.....somebody might hv executed this wf item, but still lying in UWL lists in  MSS.
    Try to re-register the system using UWL Wokflow Administrator in System Administration.
    Hope this helps.
    Regards,
    Anil Kumar.

  • How to delete the Red Entries of EWA

    Hello All,
    I have some red entries of EWA which had failed during initial Setup of EWA. Now, everything is fine. How to delete those entries from Solution Monitoring-> EWA ->Operations page. It islooking messy

    Hi,
    You can delete the EWA sesision reports as per below
    On EWA screen ...Go to Menu
    GO TO >Sessions>Re-Oraganise-->Select required entries
    Execute and choose which all entries you want to delete.
    Regards,

  • How to delete the data in New data table Because...

    Hi all,
    I have an urgent issue :
    in the process chain DSO has finished a delta load with 18592 data entries transfered and added, and activated , but when I checked New data table , there are still 18592 data entries there. This will cause problem I think, because this chain has to run daily, so next run will make the data in new data table added twice, so could you pls let me know the way to delete data in new data table?
    thanks in advance

    Dear Ryan Zhang  ,
    When activation DSO will automatically clears New table and places records in active table and change log table.
    If records still exist in New table means it has not activated properly.
    Check in active table and change log table if any entries are found.
    If not ,try activation again.
    If entries are there in active table then try these
    Go to SE14
    Give the active table name..
    Click on Edit
    Click on activate and adjust database.
    Load again and try to activate.
    Hope it helps
    Regards
    Bala

  • How to restrict the decimal entry on dynamic table in adf 11 .6

    Hi All,
      JDev version 11.6
      I have a usecase based on dynamic VO. How to restrict the decimal numbers on table columns . When user enter the decimal number .I have to show error message.
      In order to achieve above requirement .I have added value change listener on table column .its not working as expected
    <af:table rows="#{bindings.EmployeeDynamicVO.rangeSize}"
                      fetchSize="#{bindings.EmployeeDynamicVO.rangeSize}"
                      emptyText="#{bindings.EmployeeDynamicVO.viewable ? 'No data to display.' : 'Access Denied.'}"
                      var="row" rowBandingInterval="0"
                      value="#{bindings.EmployeeDynamicVO.collectionModel}"
                      selectedRowKeys="#{bindings.EmployeeDynamicVO.collectionModel.selectedRow}"
                      selectionListener="#{bindings.EmployeeDynamicVO.collectionModel.makeCurrent}"
                      rowSelection="single" id="t1"
                      styleClass="AFStretchWidth" autoHeightRows="-1"
                      columnStretching="last" contentDelivery="immediate" >
              <af:forEach items="#{bindings.EmployeeDynamicVO.attributeDefs}"
                          var="def">
                <af:column headerText="#{bindings.EmployeeDynamicVO.labels[def.name]}"
                           sortProperty="#{def.name}" id="c1">
                  <af:inputText value="#{row[def.name]}" id="ot1"
                                valueChangeListener="#{backingBeanScope.EmployeeBean.validateINputs}"
                                autoSubmit="true">
                    </af:inputText>
                  <af:outputText value="#{row[def.name]}" id="ot6"
                                 visible="#{def.name eq 'Dummy'}"/>
                </af:column>
              </af:forEach>
            </af:table>
    So appriciate if any alternatives on above usecase. Thanks in advance

    HI
    Expected :as soon as user enter the decimal values in table column , it should throw the error message in new small new window
    Getting the value change listener and validating , but its working only tab out (Because VO is dynamic )
    please suggest us any reg expression and Validators to achieve the above scenario ?

  • How to delete the Webservice entry from Web service navigator?

    Hi,
    My current issue is that, developers have created many webserivces and these web services are visible in web service navigator that i access by following link
    http://<host>:<port>/wsnavigator
    But now we have to remove the unwanted webservices i.e. i want that unwanted webservices should not be visible to anyone when we access WSNAVIGATOR.
    How should i go about it?
    Am i required to undeploy the web services that is deployed from SDM GUI?
    Please pour in your valuable inputs.
    Any help would be highly appreciated.
    Regards,
    Ameya

    I had to revove the entry from VA. Removing this entry also removes the web service from ws navigator.

  • How to delete the data inside a internal table?

    I got a internal table name g_itab1.
    currently my g_itab1 has a FNAME(50) component.
    Inside my component there is ADMINO, EYEAR, FIRSTNAME, LASTNAME and CONTACT.
    I want to clear away ADMINO, EYEAR, FIRSTNAME, LASTNAME and CONTACT inside my internal table.
    How do i clear it? i have tried using CLEAR g_itab1.
    It doesn't work.. the data are still inside.

    hi
                    DELETE TABLE itab WITH TABLE KEY k1 = v1 ... kn = vn.
    Example to delete all of the lines between 5 and 36 in a table of names where the entry begins with one of the letters 'A' to 'C'.
             DELETE  itab  FROM 5 TO 36 WHERE NAME CA 'ABC'.
    reward if useful
    regards
    sree

  • How to delete the committed row from a table from its VOImpl class ??

    I am new to ADF and I have problem to solve. To perform roll back I am using fetching key before roll back and setting it after undo operation, so that I can stay back in the currently selected row. But in my case I am using application model commit for one LOV attribute selection in the row. So when ever I am performing roll back operation after inserting a row, the values other than this committed LOV attribute gets roll backed, but I need remove the entire row from table. Does there any option to remove a row based on the attribute values of a row from VO's row implementation or from bean class in a performance optimized way ?
    Thanks in advance..........

    http://java.sun.com/javase/6/docs/api/javax/swing/table/DefaultTableModel.html#removeRow(int)
    Why did you mark it answered but gave no dukes to finalight? That's not how it works.
    You should mark his answer as correct and give him at least one duke, for the effort!

Maybe you are looking for