Delete duplicate column values for

Hi All,
My internal table contains the fields as no and text.The no is repeted but the text changes. so   how to delete the no which is repeated again in the internal table.
for eg:
No       Text
1         Text1
1         Text2
2         Text3
i need to replace the second column No as ' '.
Thanks
Yogesh.

try this out..
types: begin of typ_itab,
        no(2),
        text(5),
       end of typ_itab.
data: itab type table of typ_itab,
      rec_tab like line of itab,
      w_old(2).
rec_tab-no = 1.
rec_tab-text = 'test1'.
append rec_tab to itab.
rec_tab-no = 1.
rec_tab-text = 'test2'.
append rec_tab to itab.
rec_tab-no = 1.
rec_tab-text = 'test3'.
append rec_tab to itab.
rec_tab-no = 1.
rec_tab-text = 'test4'.
append rec_tab to itab.
loop at itab into rec_tab.
  w_old = rec_tab-no.
  if sy-tabix gt 1.
    if rec_tab-no = w_old.
      clear rec_tab-no.
      modify itab from rec_tab index sy-tabix.
    endif.
  endif.
endloop.
loop at itab into rec_tab.
  write: / rec_tab-no,rec_tab-text.
endloop.
~Suresh

Similar Messages

  • How can I delete duplicates in calendar for mac

    Is there an easy way to delete duplicates from calendar for Mac

    For dealing with duplicates in iPhoto check out Duplicate Annihilator

  • Programatically setting column values for table

    hi...
    I am programatically setting column values for table.
    But these values are not getting reflected on table after commit.
    I mean to say,new values are not persisted after commit.
    The code is as follows,It is in Application Module class
    public void createRecord()
    OAViewObject vo = (OAViewObject)this.getOpptyLoeVO1();
    if (!vo.isPreparedForExecution())
    vo.executeQuery();
    Row row = vo.createRow();
    row.setAttribute("Id",new Number(850));
    row.setAttribute("Model","Honda");
    row.setAttribute("Role","Team Lead");
    row.setAttribute("Hours",new Number(35));
    vo.insertRow(row);
    row.setNewRowState(Row.STATUS_INITIALIZED);
    getTransaction().commit();
    Here "Id,Model,Role,Hours" are columns in table .

    Hi,
    is your VO based on an Entity Object?
    If not, you can't update values in the DB using only a View Object!
    If yes, you should control that, in your VO, you have not selected the flag "Read Only" for the EO you want to update.
    Hope this helps you.
    Bye
    Raffy

  • Id column values for null objects

    If I have something like the following, where B.id is mapped to an INTEGER
    column in A's table, Kodo wants to store a NULL value into the column. This
    doesn't work if the column is specified as NOT NULL. Is there a way to
    configure Kodo to use some predefined integer value instead, such as 0
    or -1?
    class A {
    int id;
    B b;
    class B {
    int id;
    A a = new A();
    a.id = 123;
    a.b = null;
    pm.makePersistent(a);
    pm.currentTransaction().commit();

    I'm not sure what you mean by "value mapping." In my case, I am mapping a
    null reference to another object. I am using application identity. Here's a
    more complete example (still very abbreviated, but hopefully complete
    enough):
    class A {
    static class Id { int id; }
    int id;
    B b;
    class B {
    static class Id { int id; }
    int id;
    int value;
    create table A (ID integer not null, BID integer not null)
    create table B (ID integer not null, VALUE integer)
    <jdo>
    <package name="test">
    <class name="A" objectid-class="A$Id">
    <extension vendor-name="kodo" key="table" value="A"/>
    <field name="id" primary-key="true">
    <extension vendor-name="kodo" key="data-column" value="ID"/>
    </field>
    <field name="b">
    <extension vendor-name="kodo" key="id-data-column" value="BID"/>
    </field>
    </class>
    <class name="B" objectid-class="B$Id">
    <extension vendor-name="kodo" key="table" value="B"/>
    <field name="id" primary-key="true">
    <extension vendor-name="kodo" key="data-column" value="ID"/>
    </field>
    <field name="value">
    <extension vendor-name="kodo" key="data-column" value="VALUE"/>
    </field>
    </class>
    </package>
    </jdo>
    A a1 = new A();
    a1.id = 123;
    a1.b = new B();
    a1.b.id = 456;
    a1.b.value = 999;
    pm.makePersistent(a1);
    A a2 = new A();
    a2.id = 789;
    a1.b = null;
    pm.makePersistent(a2);
    pm.currentTransaction().commit();
    The inserts for table A look something like this:
    insert into A (ID, BID) values (123, 456)
    insert into B (ID, VALUE) values (456, 999)
    insert into A (ID, BID) values (789, NULL)
    The NULL value fails because the column is specified as NOT NULL
    (pre-existing schema scenario).
    What I need to be able to do is specify what value gets inserted for null
    object references. Kodo is inserting NULL. I need to insert -1.

  • Duplicate column headers for each of the rows

    Header 1
    Header 2
    Header 3
    row1 data1
    row1 data2
    row1 data3
    Header 1
    Header 2
    Header 3
    row2 data1
    row2 data2
    row2 data3
    Header 1
    Header 2
    Header 3
    row3 data1
    row3 data2
    row3 data3
    Hi folks,
    I want to know how to implement the table/grid format likes above described formation.
    Actually I want to generate each column header for each row data in one table/grid.
    Thanks for your help.

    I meant to delete this thread, but I do not know how to. Sorry.

  • Single query for displaying all but 1 column values for all tables

    Hi,
    All the tables have SYS_CREATION_DATE column.
    But I dont want to display this column value
    Can someone suggest some way in which i could achive this?
    Oracle version:11gR1
    OS:SunOS
    Cheers,
    Kunwar
    Edited by: user9131570 on Jul 6, 2010 7:57 PM

    user9131570 wrote:
    @Tubby
    I *want to display table-wise the values of all but 1(SYS_CREATION_DATE) columns in my database.*
    I need this in order to compare it to another database for all these values .Let me make a wild guess at what you are getting at.
    Given these two tables
    create table emp
       (empid number,
        empname varchar2(15),
        empaddr   varchar2(15),
        sys_creation_date date);
    create table dept
       (deptid number,
        deptmgr varchar2(10),
        sys_creation_date date);you want to somehow combine
    select empid,
             empname,
             empaddr
    from emp;with
    select deptid,
             deptmgr
    from dept;into a single sql statement?

  • Possible to set the Created_by column value for File Browse?

    I'm using database account authentication and then a user gets to upload a file. Then my stored procedure reads the file. I was investigating a problem, happened to search the apex_workspace_files view and noticed the created_by column is always set to APEX_PUBLIC_USER for the files my users upload. Is there some way I can set that value when they log in, so I can track who actually did the upload?
    Thanks,
    Stew

    Dimitri,
    I was just using the standard File Browse item, so getting the blob from the workspace view. Though I've seen notes here about loading to your own table, what I had seemed to work (and was done) fairly well. There were just these little features I wanted to use...
    Thanks for the suggestion.
    Dave, I'm not sure which stored procedure you're suggesting I add the apex_custom_auth.get_username value to? I hoped that the internal File Browse routine would pick up the get_username value automatically instead of the application definition Public User value.
    Thanks,
    Stew

  • Get column value for specific columns

    I want to change the default behavior of a IKM. In a specific step, I need to call a PLSQL procedure inside the loop below, and that procedure will substitute the insert clause. The procedure uses only some attributes, and I need to check the name of each one when I use the getColList method.
         for aRecord in myCursor loop
              insert into      <%=snpRef.getTable("L","TARG_NAME","A")%>
                   <%=snpRef.getColList("", "[COL_NAME]", ",\n\t\t\t", "", "((INS AND (NOT TRG)) AND REW)")%>
                   <%=snpRef.getColList(",", "[COL_NAME]", ",\n\t\t\t", "", "((INS AND TRG) AND REW)")%>
              values
                   <%=snpRef.getColList("", "aRecord.[COL_NAME]", ", \n\t\t\t", "", "((INS AND (NOT TRG)) AND REW)")%>
                   <%=snpRef.getColList(",", "aRecord.[COL_NAME]", ", \n\t\t\t", "", "((INS AND TRG) AND REW)")%>
         end loop;
    For example, to call the procedure I do that: schema.proc_1(col1, col2, col3). However, I have more than 3 columns, and I need to restrict them when I use the getColList method. I would like to know if there is a way to get only specific columns, giving these names. I pass the name of the column, and the method should return its value. Can I use the getColList to do that? Is there any other way to do that?

    Hi Luciene,
    You can use the UD flags to do this. If you click on one of your mappings in the Diagram tab of your interface you will notice several UD flags (UD1 to UD5) you can use those to flag the columns you want to use in proc_1.
    To summarize:
    - at the interface level flag the columns you want to use in your PL/SQL code -> check UD1 for all of them
    - modify your IKM code:
    <%=odiRef.getColList(",", "COL_NAME", ",\n\t\t\t", "", "((INS AND TRG) AND REW AND UD1)")%> <- retrieve columns flagged with insert, not read only, mapped on target and with UD1 flagged. The "AND UD1" part can be used in other getColList.
    Hope this helps.
    Thanks,
    Julien

  • How to delete duplicate songs itunes for windows?

    How to delete multple duplicates of songs on Itunes for windows?

    Apple's official advice 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 this thread 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. There are other ways to deal with deal links alone, but those won't preserve that information.
    tt2

  • How to select  rows with duplicate column values

    hi,
    i have a table property_details which has these 2 columns customerno and propertyno a customer can have many properties and property number has to be unique. but somehow these property number has been duplicated at an earlier stage so i have for a customer with many properties the same property number
    how i will select such records whose asset numbers are the same
    for ex
    customer no property no
    a1300 1
    a1300 1
    a1300 1
    a2330 10
    a2330 10
    a2330 10
    kindly suggest me a solution

    this example might be of help.
    SQL> select * from employees;
    YEAR EM NAME       PO
    2001 02 Scott      91
    2001 02 Scott      01
    2001 02 Scott      07
    2001 03 Tom        81
    2001 03 Tom        84
    2001 03 Tom        87
    6 rows selected.
    SQL> select year, empcode, name, position,
      2         row_number() over (partition by year, empcode, name
      3                            order by year, empcode, name, position) as rn
      4    from employees;
    YEAR EM NAME       PO         RN
    2001 02 Scott      01          1
    2001 02 Scott      07          2
    2001 02 Scott      91          3
    2001 03 Tom        81          1
    2001 03 Tom        84          2
    2001 03 Tom        87          3
    6 rows selected.
    SQL> Select year, empcode, name, position
      2    From (Select year, empcode, name, position,
      3                 row_number() over (partition by year, empcode, name
      4                                    order by year, empcode, name, position) as rn
      5            From employees) emp
      6   Where rn = 1;
    YEAR EM NAME       PO
    2001 02 Scott      01
    2001 03 Tom        81
    SQL>

  • How to reference SQL column value for  page item text field

    greetings,
    I created a simple report based on sql query. the query is select employeeid,salary from emp_tbl. under the report column i see employeeid and salary. I created a page item text field with the source type pl/sql function body. inside this source is simple block.
    begin
    if salary < 10000 then
    return (1);
    else
    return (2);
    end if;
    end;
    from the error i take it that it doesn't understand salary. I have tried bind variable (:salary) , hash marks (#salary#), ampersand (&salary.) but nothing works. Is this even possible?
    thank you,
    mon

    Hi Mon,
    I think you will find that anything you do in Forms, you can achieve in Apex, but you may have to think a little differently. Finding direct equivalents in both environments may not be easy or even possible in some circumstances, but with a little knowledge and thought an equivalent overall business flow can be achieved that is just as efficient.
    For example, in Forms where you have a multi row block based on a table, if you need to add any derived fields then you will add these at the block level. I can see that this is what you are trying to achieve in Apex.
    In Apex this will be more easily achieved by specifying the derived fields as part of the query for the region, and if the derivation of the fields is complex you can use user defined functions. If you require page type items to be displayed such as text boxes, LOV's, radiogroups, datepickers etc then these can be embedded in the query with the use of the Apex API, see the APEX_ITEM supplied package.
    I know this is still very high level, but I hope it helps you on your way in your journey with Apex.
    Regards
    Andre

  • Need to delete / clear PO value for a deleted shopping cart item.

    Hi friends
    Please help me on below mentioned issue.
    I have a shopping cart with one deleted item, That deleted item shows a PO number under table BP_PDBEI field BE_OBJECT_ID in production server.
    User want that PO number to be delete or clear from that shopping cart deleted item.
    We are not authorize to delete or clear a entry from the SAP standard table itself.
    Is there any function module, I can use directly in production server which can delete / clear this PO number from table BP_PDBEI field BE_OBJECT_ID from shopping cart deleted item
    Please help urgently.
    Thanks a lot in advance.

    Hi
        check this FM
    ISM_PORDER_DELETE
    ISM_PORDERNEW_DELETE
    ISM_PORDERRET_DELETE
    Regards,
    Viquar Iqbal

  • (10.1.2.0)Duplicate index value for ViewLinkAccessor in EO

    Hi,
    I did some major re-work on the model/data tier EO/VO/ViewLinks. The EO's used to be synchronised with the DB with PK/FK assoc etc. We have been struggling with accessor naming on FK associations in the BC4J for some time now and decided to remove all the constraints from the BC4J layer.
    We created a reference DB schema that doesn't contain all the constrants etc. I then systematically decoupled the associations from ViewLinks/Views/EO's etc.
    This in itself was quite a task since "Sync with DB" doesn't work straight out of the box.
    Every reference is out and all classes compile.
    I noticed that some of the VL accessors in one of the EO's are incorrect/missing.
    When editing the ViewLink and setting the accessors the following:
    1. Some VL's create the accessor but causes the ones already defined to get a dup index.
    eg. Attribute "myViewA" has index 10, Attribute "myViewB" has index 11
    I insert Attribute "myViewC" Through the VL editor and it inserts the accessor at index 10 causing "myViewA" to become 11. BUT "myViewB" has index 1.
    2. Some VL's dont insert the accessor attribute when ticked, it inserts an empty line.
    Whats cooking here?
    Buks

    D'oh! Search first, ask questions later...
    It's a known problem according to Metalink, patch 5064981 should solve it.
    Sorry.
    Arjan

  • ORA-00957: duplicate column name for multi-form page

    I have read numerous threads on this but I think I am missing something. I have two forms on one page, each based on a separate table. They each have one column in common which is why I believe I am getting this error. However, I do not understand why since each form has its own Automatic Row Processing, it is tripping over the column name. I have changed the name of the page item to be different, but I still get this error. TIA.

    Hi,
    Technically you can not use two forms in one page. Both table have the same column name which confuses the DML process. Try change the column name in one table and see if it works.
    Cheers,
    Tajuddin

  • Duplicate assigned value for Asset

    Hi Experts,
    Thanks for the reply the solution to reverse payment, then rev MIRO with MR8M, and rev MIGO with MBST. And then do ammendments to the PO. 
    But the Invoice already done payment, document had been posted. 
    Can we still proceed the adjustment ?
    thanks.
    rgds,
    tee

    Hi,
    I read your earlier message just now.
    If you want record this into small assets, you can do as below.
    You can do ABUMN ( Asset transfer within company code with partial transfer option).  This will take care of depreciation posted earlier with right proportion and transfer to small assets)
    Best Regards,
    Madhu

Maybe you are looking for

  • Aperture import is not working

    I just installed Lr 5.0 and upgraded to 5.7. I'm trying to import my Aperture library, but Lr does not recognize any photos that I have on my laptop. Using a MacBook Pro. I have no idea what to do. I'm so new to this, I don't even know what questions

  • How to add more than one tabular region in a page?...

    How to add more than one tabular region in a page? i have a page, that page contain form and tabular region. when i trying to add another tabular region it showing error 1 error has occurred Updatable SQL Query already exists on page 2. You can only

  • Just upgraded to 7.3.2.6 and my music library is gone!!--help!

    This has never happened before with a upgrade. Can I get my library back?

  • IWork suite won't open any file or template

    Hey guys, I just installed iWork 09 and when ever I open it and choose to start from a template or blank document the circle keeps spinning on that document forever and then just freezes. I can't do anything past this point. I reinstalled it, did my

  • Cat 6K configuration settings for Oracle RAC

    Does anyone have experience with Cat6K design and configuration best practices for Oracle RAC? TIA Bill