Replace statement is not working in OLE

Hi
I am generating the excel using OLE and in excel i want ot use replace staement for a column . I want to write the code for that . In excel macro i found some code for that and it is mentioned below
    Selection.Replace What:="'", Replacement:="", LookAt:=xlPart, _
        SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, _
        ReplaceFormat:=False
I have convert this in ABAP but it is not working Please find the code in abap
CALL METHOD OF gs_cells_temp 'Replace'
        EXPORTING
        #1 = '1'
        #2 = ' 2'
        #3 = 2
        #4 = 1
        #5 = 'False'
        #6 = 'False'
        #7 = 'False'.
Can anyone help me in this regard.

Hi Amit,
I am facing the same issue, can you advice?
Thanks in advance,
Hung

Similar Messages

  • Insert statement will not work if select statement has less number of colum

    Hi,
    One of my thread is already resolved on the following URL : unable to insert rows into the table
    DROP TABLE TEMP;
    CREATE TABLE TEMP AS SELECT * FROM CASE_101 WHERE 1=2;
    DECLARE
    S VARCHAR2(200);
    STMT VARCHAR2(500);
    begin
    for C in (select TABLE_NAME INTO S from USER_TABLES where TABLE_NAME like 'CASE%' TABLE_NAME NOT like '%OLD' and Num_ROWS > 0 order by TABLE_NAME) loop
    STMT := 'INSERT INTO TEMP SELECT * FROM ';
    STMT:=STMT || C.TABLE_NAME;
    EXECUTE IMMEDIATE STMT;
    dbms_output.put_line(c.table_name);
    end loop;
    end;
    i am facing now some different; almost all the tables have same number of columns except in few of tables have some additional columns. As above i am creating a table "TEMP" who has highest column temp(by doing some manual process). The table who has less columns than "TEMP" table : Insert statement will not work. 'INSERT INTO TEMP SELECT * FROM less_columns_table_name'.
    Please let me know , how can i execute proper way.
    Thanks.
    Best Regards
    Arshad

    user13360241 wrote:
    Hi,
    One of my thread is already resolved on the following URL : unable to insert rows into the table
    DROP TABLE TEMP;
    CREATE TABLE TEMP AS SELECT * FROM CASE_101 WHERE 1=2;
    DECLARE
    S VARCHAR2(200);
    STMT VARCHAR2(500);
    begin
    for C in (select TABLE_NAME INTO S from USER_TABLES where TABLE_NAME like 'CASE%' TABLE_NAME NOT like '%OLD' and Num_ROWS > 0 order by TABLE_NAME) loop
    STMT := 'INSERT INTO TEMP SELECT * FROM ';
    STMT:=STMT || C.TABLE_NAME;
    EXECUTE IMMEDIATE STMT;
    dbms_output.put_line(c.table_name);
    end loop;
    end;
    i am facing now some different; almost all the tables have same number of columns except in few of tables have some additional columns. As above i am creating a table "TEMP" who has highest column temp(by doing some manual process). The table who has less columns than "TEMP" table : Insert statement will not work. 'INSERT INTO TEMP SELECT * FROM less_columns_table_name'.
    Please let me know , how can i execute proper way.
    Thanks.
    Best Regards
    Arshadmore often than not "TEMP" tables are NOT required & are highly inefficient in Oracle.
    Either only specify explicit column in TEMP to get data,
    or provide value for "extra" column in TEMP

  • CASE Statement is not working Derived table

    Hi All,
    in the bello SQL Statement case statement is not working in derived table. I am new to creation of derived table if any body knows plz kinldy help me out on this.
    SELECT x.market, x.droprate as med1
    FROM
    (select upper(market_name) as market, fulldate as date_value,
         (sum([Dy_LOT_DROPS_N][Dy_OB_HO_DROPS][Dy_NonRF_Drop]))/
              nullif(sum(CASE WHEN (month(BBHDLY.FullDate)}>= 6 and { year(BBHDLY.FullDate)} = 2011) or {fn year(IDENSLABBHDLY.FullDate)} > 2011
    THEN  BBHDLY.Dy_Calls - BBHDLY.Dy_HO_CHAN_ALLOC ELSE BBHDLY.Dy_Calls END),0)*100 as droprate
    from BBHDLY sla
    inner join Dim mkt
         on sla.bts_name = mkt.bts_name and sla.SectorID = mkt.Sector_Id
                   where fulldate >= GETDATE()-46
                   group by market_name, fulldate) x,
    (select market_name as market, fulldate as date_value,
    (sum([Dy_LOT_DROPS_N][Dy_OB_HO_DROPS][Dy_NonRF_Drop]))/
              nullif(sum(CASE WHEN ({fn month(BBHDLY.FullDate)}>= 6 and {fn year(BBHDLY.FullDate)} = 2011) or {fn year(BBHDLY.FullDate)} >
    2011 THEN  BBHDLY.Dy_Calls - BBHDLY.Dy_HO_CHAN_ALLOC ELSE BBHDLY.Dy_Calls END),0)*100 as droprate
    from BBHDLY sla
    inner join Dim mkt
         on sla.bts_name = mkt.bts_name and sla.SectorID = mkt.Sector_Id
                   where fulldate >=GETDATE()-46
                   group by market_name, fulldate) y
    where x.market = y.market
    GROUP BY x.droprate, x.market
    HAVING
       SUM(CASE WHEN y.droprate <= x.droprate
          THEN 1 ELSE 0 END)>=(COUNT(*)+1)/2 AND
       SUM(CASE WHEN y.droprate >= x.droprate
          THEN 1 ELSE 0 END)>=(COUNT(*)/2)+1
    Thanks

    It looks like SQL Server or Sybase given that you're using getdate().
    As such, Vinesh's comment to use decode is wrong - decode is  Oracle syntax.
    Looking at your statement again, I've noticed the following:
    you have no { to match the first } - not sure why you're using them anyway.
    you haven't given x.market a name - use x.market as market instead
    use coalesce instead of nullif if you're on SQL Server.

  • Insert statement is not working for z table.

    Hi experts,
    My insert statement is not working.
    I have used follwing code to update z table .
    INSERT ztable FROM TABLE gt_table.
    here i have checked gt_table and its filled up with all the records properly.
    now the problem is in this table i have 15 fields and it inserts 14  fields of it but
    the last field is never inserted though in gt_table i can see value for last fields also.
    I have added this field in ztable recently . so i also used se14 to adjust table but still i am facing same problem.
    please help me out.
    thanks,
    Neo

    > > Table maintainance will have nothing to do with
    > this
    > > issue.
    >
    > It does sometimes when you are trying to see the
    > values from SM30 instead of SE16. The value may be
    > there, but it may just not seen in SM30 because the
    > table maintenance hasn't registered the addition of
    > new field.
    >
    > Another place to look at is the activation log to see
    > if there are any warnings issued there.
    You shouldn't use SM30 to view table entries. You use this transaction to maintain the table entries. Pure and Simple.

  • Delete Statement is not working correctly

    Hello,
    The following delete statement is not working correctly.
    If I press delete it will delete everything in the category table
    I don't know whats wrong with it.
    ----delete row from category if there is not infrastructure to support------
    IF :P12_DFCY_SEQNO4 IS NOT NULL AND :P12_DFCY_CATG_C = '7' THEN
    DELETE FROM DFCY_CATG
    WHERE NOT EXISTS(SELECT I.DFCY_SEQNO
    FROM DFCY_CATG C, DFCY_CATG_INFRSTRCTR I
    WHERE C.DFCY_SEQNO = I.DFCY_SEQNO
    AND :P12_DFCY_SEQNO4 = I.DFCY_SEQNO);
    end if;
    Thanks
    Mary

    Hi,
    IF :P12_DFCY_SEQNO4 IS NOT NULL AND :P12_DFCY_CATG_C = '7' THEN
    DELETE FROM DFCY_CATG
    WHERE NOT EXISTS(SELECT I.DFCY_SEQNO
    FROM DFCY_CATG C, DFCY_CATG_INFRSTRCTR I
    WHERE C.DFCY_SEQNO = I.DFCY_SEQNO
    AND :P12_DFCY_SEQNO4 = I.DFCY_SEQNO);
    end if;So, if P12_DFCY_SEQNO4 does not exist, then I would expect all records to be deleted because the NOT EXISTS() function would just return TRUE for every record on the table. Somewhere in the statement, I would expect to see something that links between the table being deleted from and the NOT EXISTS() data or, perhaps, using the P12_DFCY_CATG_C value as a filter?
    Andy

  • Delete statement is not working.

    Hi,
    find the code. Here the delete statement is not working and i am getting sy-subrc = 4. although ,
    xe1edp10-idnkd = 34596 and dint_edidd -sdata = 34596.
    please help me ...
    loop at dekek_x.
    loop at dint_edidd where segnam = 'E1EDP10'.
    if dekek_x-stpin = 1 .
    CLEAR xe1edp10.
      MOVE dint_edidd-sdata TO xe1edp10.
    delete dint_edidd where sdata = xe1edp10-idnkd.
    endif.
    endloop.

    1st thing..
    i tried this :
    tables: edidd, e1edp10.
    edidd-sdata = '315934 EA 017'.
    WRITE edidd-sdata.
    move edidd-sdata to e1edp10.
    IF edidd-sdata = e1edp10-idnkd.
    WRITE: e1edp10-idnkd.
    else.
      WRITE: 'nothing'.
    ENDIF.
    output
    >315934 EA 017
    >315934 EA 017
    2nd thing,.
    your loop inside loop doesnt make any sense as they are not related any where.
    3rd thing:
    the fields are not type compatible.. this might be the reason for wrong delete statement..
    and 1 more clarification:
    TABLES: edidd, e1edp10.
    DATA :it TYPE TABLE OF edidd WITH HEADER LINE.
    edidd-sdata = '315934 EA 017'.
    WRITE edidd-sdata.
    APPEND edidd TO it.
    edidd-sdata = '315934 EA 018'.
    APPEND edidd TO it.
    LOOP AT it." where segnam = 'E1EDP10'.
      CLEAR e1edp10.
      MOVE it-sdata TO e1edp10.
      DELETE it WHERE sdata = e1edp10-idnkd.
    ENDLOOP.
    in this also delete is working perfectly fine... you run and check..

  • SORT statement is not working!

    Hi frdz,
    Below SORT statement is not working. Can any one explain me why this is happening.
    SORT i_bseg ASCENDING BY belnr bukrs
                        DESCENDING kunnr.
    I have table content as below.
    BELNR      BUKRS KUNNR   
    0016000000|CROP |         
    0016000000|CROP |0008910168
    Before and after the sort content order is same.
    I want to sort the content like below.
    0016000000|CROP |0008910168
    0016000000|CROP |       
    Is there any thing wrong with the sort statement???
    i_bseg is defined as TYPE STANDARD TABLE OF
    Sort criteria must not change i. e ascending by belnr and bukrs and descending by kunnr.
    Thanks,
    Vinod.

    hi vinod,
    this is because on your statement, you are sorting BUKRS in descending order and KUNNR in ASCENDING order.
    please take note that the sort order should come after the sorted field. if no order is given, the default which is ASCENDING will be used.
    do your sorting like this
    SORT i_bseg BY belnr bukrs kunnr DESCENDING.
    regards,
    Peter

  • SELECT statement does not work if characters ## are contained in field

    Hi Experts,
    I have the following statement:
    select single field1
        from table1
        into var1
        where field2 = text.
    This is a very simple statement that is working for me almost always correct. However there is a situation where the system is not able to find the record in my table. If text is equal to JAN##2011 the system won't deliver a result even if I have an entry in table1 with exactly this value.
    TABLE1
    field1 field2
    rome JAN##2011
    paris JAN2011
    only if text is JAN2011 the select will find a result.
    all fields are defined as CHAR.
    Thanks in advanced

    Hi Alberto,
    probably ## is not ## :-).
    is the visible representation used by ABAP to show any non-displayable characters as control characters like TAB, CR, LF, FF and the like.
    In debugger you can switch to HEX display of values, if you see something like 0A0D you can find this using CL_ABAP_CHAR_UTILITIES constant attributes.
    Regards
    Clemens

  • Message statement is not working?

    I would like to place a message in the following method:
    It's defined like this:
    Position & cannot be delimited because the position is occupied until &
    This is in the program:
    MESSAGE: s029(zpom_001) WITH st_hrp1001-objid(8) st_hrp1001-endda(8), display like 'E'.
    I inserted the (display like 'E' ) in so I can get the RED 'X' error message.  If I take out the display like 'E', it works.
    I get the following error:
    Three-digit error number XXX required in the "MESSAGE EXXX..." statement.
    Thanks for any help you can give?
    Jeff

    Satish,
    That did not work...
    If I remove the part of the message (  Display like 'E' )  it works......  But if I want to get a RED X error message, what would I do?
    JeffG

  • Cursor 'mouseover' state change not working in Chrome

    Flash novice here.
    I'd appreciate any tips on where to start looking for answers to this problem.
    Here's the basic details:
    1. 40kb banners with no audio and nothing tricky
    2. Created in Flash Pro CC 2014
    3. Opened and re-saved in Flash CS6 for delivery to client website
    4. Client IT reports that everything is fine and banners are up and running
    5. For me personally, the mouseover state for the cursor works in Safari, but not in Chrome.
    6. While the mouseover cursor state for my banner is not working in Chrome, it is working for all the other banners/ads on that page.
    7. A friend tested the banner on all major browsers and the mouseover cursor state works for him.
    Any ideas where to look would be appreciated.
    Should I be talking to the host website, examining the Flash file, or checking my version of Chrome?
    Thanks in advance.

    This forum software is very tricky; updates to forum posts sometimes need to be done three or four times until it "takes".  I have been able to update your original post.
    Now that it is actually readable, I will go and have a look at it.

  • HTML5 Canvas (in Flash CC) Button Functionality Faulty - Over, Down states do not work

    I have searched and searched and I can't find a solution.
    In Flash CC, creating in an Actionscript 3.0 canvas, buttons work as expected. Up, Over, Down and Hit states produce desired results.
    I am creating an HTML5 animated webpage and none of the buttons work as expected. Here are the flaws:
    1 - There is no hand when a button is scrolled over. This is an issue because there are multiple objects on stage, only half of which are buttons. The user needs to be able to know which are clickable.
    2 - When I have an image on the Up state, all is well. But when I add an image on the Over state, it causes a loop. Up and over just loop in the preview and after I publish regardless of the cursor position and regardless of the browser type (FF, Chrome, IE).
    I have searched the web. A lot of people have this problem but no answers have surfaced. I don't particularly want to spend another 100 hours recreating in Edge Animate--which I am not as familiar with. Is there some code that might stop all the madness?

    You can program using java script in flash.
    use the code
    exportRoot.stop();
    inside the button frame
    if not working and all becomes gray as described above then target your button from the main timeline like
    exportRoot.someClip.subClip.stop();
    But remember to change .someClip & .subClip with their correct names.

  • Replacement install DVDs not working (possible serial number problem?)

    I have been sent two sets of Mac OS X install DVDs as my old disk 1 was too scratched by my (now replaced) faulty optical drive.
    I asked for a disk 1 and disk 2 replacement and they sent them.
    First of all i dont know which is disk 1 or 2 as they arent written on the disk, only "Macbook pro Mac OS X install dvd" and "Mac OS X install dvd"
    The first set disk 1 serial number was - 2Z691-5841-A
    The second set disk 1 serial num was - 2Z691-5948-A
    My ORIGINAL disk 1 serial number is - 2Z691-5967-A
    My question is do the serials matter if it is still OS X?
    I attempted to install with both these and the Macbook PRo stayed on Grey screen then just spat them both out, where as with my original it goes through the install process (but can not finish due to the scratches)
    I called Apple again today when i got them and he said it was the laptop, however i know it isnt as my original disk boots to the install screen where as theirs dont, he said he would send the version of disk with my original serial and see if this works.
    So.....does the serial matter? I think he said there are three "versions" of disk 1, and my understanding was you can not use any of these unless it is with that specific version also of macbook pro.
    Thanks

    I purchased it directly from Apple on the Apple website.
    I told the guy at applecare the number on my original install disk 1 and he said he would send that one.
    Then i called again later to ask if they needed the serial of my actual macbook pro, he took it and said it looks like they have already ordered the correct CD.
    I HOPE it will be here Friday, waiting yet another week.
    If it does not work i cant think of anything, my originml works and the laptop has NOTHING installed on it, free hard drive....soooo all i can think of is taking it to an apple store with ALL the disks they have sent me and see if they know whats going on.

  • Replacement Ipod Site Not Working???

    My ipod is dead beyond fixing and I've tried everything. I was directed towards the Ipod replacement site as I am still under warranty. http://depot.info.apple.com/ipod/
    The only problem is the site does not work past the step where I put in my country and Ipod serial number. Someone please help!

    hiya!
    The only problem is the site does not work past the step where I put in my country and Ipod serial number. Someone please help!
    could you describe to us what's going wrong when you get to that step, please? err on the side of too much detail rather than too little.
    love, b

  • Clearing state currentState = ''; not working

    I am developing a code where I have developed three components that is three states for me. I have a contol on my home screen (base state) which is able to take me to any of these states whenever required. My issue is once I reach to say in State A and want to go back to home page. My "HOME" button in State A is not working even after I am clearing state using currentState = '' ; Do I have to do anything extra to get it to home page from State A here? Any help would be highly appreciated!!

    Whenever I create a flex app that has several states, I've gotten into
    the habit of simply copying my base state and renaming it something
    to the effect of "start", so rather than trying to clear your state try this method. 
    Slightly superfluous and even a tad bit inane, but it works and gives you an
    extra state buffer between impromptu edits and your base state .
    So copy your base state
    and rather than:
               currentState = "";
    try      currentState = "start";
    on for size.

  • Replacement path does not work for a specific query after migration 7.0

    Hello all,
    We have a problem with a replacement path variable in a query.
    After the migration, it seems this replacement path doesn't work.  This replacement path is defined inside a structure that is used in some other queries and for the other queries is working properly.
    Another think we have done is to make a copy of the query where the replacement path doesn't work and the copied query works ok.
    Did anybody find this kind of problem in a migration. Any help will be appreciated.
    Regards, Inma

    This is just for those who might have simmilar requirement &  would in case refer to this thread..
    Me too faced same problem of OLE DB for OLAP cant be released. I was using  replacement path query variable which was using result set from the other  query.
    I just had to uncheck 'Allow External Access' in release for OLE  DB for OLAP in query properties. This worked from me, my query using replacement path variable is giving desired results.
    Hope this might be useful for relevant users.
    Regards,
    Pritesh

Maybe you are looking for

  • Macbook pro wont open

    I downloaded Lion, but after successfully installing it and restarting the my MacBook Pro, it wont open anymore. What will I do? Please help.

  • How to install windows 7 on CX61 2PC

    Hi, How do I install windows 7 on a CX61 2pc? The BIOS doesn't have the option to change the boot to "legacy" mode. When I try to install W7 from the cd/dvd Where to install windows? Disk 0 Partition 1: FREEDOS    921.5 GB     921.1 GB      System Di

  • Query Performance - Query not using proper plan

    Hello, I am experiencing a performance issue with queries that span multiple partitions/tablespaces. Specifically, a query utilizing a stored procedure does not use the indices, rather, full table scans are being done resulting in the query taking 30

  • What is the procedure to transfor the data to idoc.

    Hi Abapers, What is the procedure to transfor the data to idoc. I have added some new fields in my program. so now i need to transfer those same filed into IDOC. Can any body tell me the procedure. Points will be given.

  • A NICE HD CAMERA

    Can you guys tell me what would be a nice HD camera to buy that is not to expensive but yet will give a great quality picture, somewhere in the range of $3500 until I can get over to NAB to check everything out. Any good suggestions? And yes I know t