Replacement statement for ONCHANGE OF

HI All,
I am writing the coding in user exit.
I want to use the statement ON CHANGE OF .But this statement is obsolete statement.IT is not supporting in my code.It is not showing any systax error but it is not working properly.
What els ei can use for the statement ON CHANGE OF.
Thanks,

Hi,
Here ON CHANGE works for the loop at ITAB (to check for any field value change in ITAB) but not for ITAB1
go through the F1 help for ON CHANGE OF
In your logic u can use ON CHANGE OF if u are using LOOP AT ITAB1.
Modify the statements and try the below logic.
data gv_temp type sytabix value 1.
Loop at itab into wa_itab.
Reading the table itab1 into wa_itab1 .
if gv_temp = 1 or g_field1 ne  wa_itab1-field1.
g_field1 = g_field1 + 1.
endif.
g_filed1 = wa_itab1-field1.
endloop.
Regards,
Dwaraka.S

Similar Messages

  • Problem with Replace statement?

    Hi Guys,
                 I am using Replace statement for replacing '%20' in a partucular field like given below
    "  Replace All occurrences of REGEX '%20' in I_ZSTR_BPSITEUSER-FIRSTNAME with space ."
       But the problem is if Firstname = " Gopi%20%20%20A " after using this replace i am getting as
    " GopiA " but what my req is i need like "Gopi   A"(i want spaces in %20 place)so how to get it?
    Thanks,
    Gopi

    Hi,
    Try this..
    DATA: patt TYPE string VALUE '%20',
          text TYPE char100 VALUE 'Gopi%20%20%20A'.
    DATA: result_tab TYPE match_result_tab.
    DATA: v_length TYPE i.
    FIELD-SYMBOLS <match> LIKE LINE OF result_tab.
    * Find
    FIND ALL OCCURRENCES OF patt IN
         text
         RESULTS result_tab.
    SORT result_tab BY offset DESCENDING.
    * Replace
    LOOP AT result_tab ASSIGNING <match>.
      v_length = <match>-length - 1.
      text+<match>-offset(v_length) = space.
      SHIFT text+<match>-offset LEFT DELETING LEADING space.
      text+<match>-offset(1) = space.
    ENDLOOP.
    WRITE: / text.
    Thanks
    Naren

  • Replacement code for Translate statement in latest version

    Replacement code for
    TABLES XXXX  USING <r> LIKE <r>
    TRANSLATE <r>-<fieldname> TO UPPER CASE.
    <r> is a structure

    Hi,
    TRANSLATE ... TO UPPER/LOWER CASE
    TRANSLATE ... USING
    The arguments of these instructions must be single fields of type C, N, D, T or STRING or purely character-type structures. There is a syntax or runtime error if arguments of a different type are passed. A subset of this function is provided with the addition IN BYTE MODE for processing byte strings – that is, operands of type X or XSTRING. A statement such as CONCATENATE a x b INTO c is thus no longer possible when a, b, and c are all character-type, but x is of type X.
    TRANSLATE ... CODEPAGE ...
    TRANSLATE ... NUMBER FORMAT ...
    The above statements are not allowed in Unicode programs
    <b>Reward points</b>
    Regards

  • Happy Holidays.  I have Adobe Actobat 7.0 Standard for quite a while, and I'm happy with it. I use it for mainly filings at the federal court.  They require PDF.  I use two computers in two different states for work.  I realize my Adobe 7.1 is a few years

    .  I have Adobe Actobat 7.0 Standard for quite a while, and I'm happy with it. I use it for mainly filings at the federal court.  They require PDF.  I use two computers in two different states for work.  I realize my Adobe 7.1 is a few years old, but sometimes I have difficulty using it with the other days downloading a boarding pass, and e filing at the USDC. .  There's a problem with Adobe Flash, media, etc.  and other Adobe programs, (which I use for downloading boarding passes for airlines, etc.) so basically I have to delete these other Adobe programs, besides the Adobe Acrobat 7.0 Standard if I want to 7.0 Standard to work.  I periodically download the updates, but there's still a problem. My question is:  Can or should I purchase another program to update the present Adobe Acrobat 7.0 standard, or just buy a new program such as the Adobe 11?  Am I mistakenly doing something wrong, such as when I download?  I'm an old valued customer so I don't want to spend a lot of money since I am replacing my Dell XP for a new computer now, and my other computer is a Dell Vista.
    I'd appreciate your valued advice.

    If you are getting a new computer (for a PC it would have Win 7 or 8), then you will need to purchase XI if you wish to continue using Acrobat. Acrobat 7 is not compatible with these systems (and probably the same for MAC systems), though sometimes workarounds are possible, though not easy to use. I guess the answer is to buy the new version. Try http://www.adobe.com/products/catalog/software._sl_id-contentfilter_sl_catalog_sl_software _sl_mostpopular.html, click on the Buy for Acrobat, and then select the version you want.

  • Scheduled Job to gather stats for multiple tables - Oracle 11.2.0.1.0

    Hi,
    My Oracle DB Version is:
    BANNER Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
    PL/SQL Release 11.2.0.1.0 - Production
    CORE 11.2.0.1.0 Production
    TNS for Linux: Version 11.2.0.1.0 - Production
    NLSRTL Version 11.2.0.1.0 - Production
    In our application, we have users uploading files resulting in insert of records into a table. file could contain records ranging from 10000 to 1 million records.
    I have written a procedure to bulk insert these records into this table using limit clause. After the insert, i noticed my queries run slow against these tables if huge files are uploaded simultaneously. After gathering stats, the cost reduces and the queries executed faster.
    We have 2 such tables which grow based on user file uploads. I would like to schedule a job to gather stats during a non peak hour apart from the nightly automated oracle job for these two tables.
    Is there a better way to do this?
    I plan to execute the below procedure as a scheduled job using DBMS_SCHEDULER.
    --Procedure
    create or replace
    PROCEDURE p_manual_gather_table_stats AS
    TYPE ttab
    IS
        TABLE OF VARCHAR2(30) INDEX BY PLS_INTEGER;
        ltab ttab;
    BEGIN
        ltab(1) := 'TAB1';
        ltab(2) := 'TAB2';
        FOR i IN ltab.first .. ltab.last
        LOOP
            dbms_stats.gather_table_stats(ownname => USER, tabname => ltab(i) , estimate_percent => dbms_stats.auto_sample_size,
            method_opt => 'for all indexed columns size auto', degree =>
            dbms_stats.auto_degree ,CASCADE => TRUE );
        END LOOP;
    END p_manual_gather_table_stats;
    --Scheduled Job
    BEGIN
        -- Job defined entirely by the CREATE JOB procedure.
        DBMS_SCHEDULER.create_job ( job_name => 'MANUAL_GATHER_TABLE_STATS',
        job_type => 'PLSQL_BLOCK',
        job_action => 'BEGIN p_manual_gather_table_stats; END;',
        start_date => SYSTIMESTAMP,
        repeat_interval => 'FREQ=DAILY; BYHOUR=12;BYMINUTE=45;BYSECOND=0',
        end_date => NULL,
        enabled => TRUE,
        comments => 'Job to manually gather stats for tables: TAB1,TAB2. Runs at 12:45 Daily.');
    END;Thanks,
    Somiya

    The question was, is there a better way, and you partly answered it.
    Somiya, you have to be sure the queries have appropriate statistics when the queries are being run. In addition, if the queries are being run while data is being loaded, that is going to slow things down regardless, for several possible reasons, such as resource contention, inappropriate statistics, and having to maintain a read consistent view for each query.
    The default collection job decides for each table based on changes it perceives in the data. You probably don't want the default collection job to deal with those tables. You probably do want to do what Dan suggested with the statistics. But it's hard to tell from your description. Is the data volume and distribution volatile? You surely want representative statistics available when each query is started. You may want to use all the plan stability features available to tell the optimizer to do the right thing (see for example http://jonathanlewis.wordpress.com/2011/01/12/fake-baselines/ ). You may want to just give up and use dynamic sampling, I don't know, entire books, blogs and papers have been written on the subject. It's sufficiently advanced technology to appear as magic.

  • Doubt in using replace statement

    Hi all,
       I have a requirement where user will enter more than 1 label no in a screen, which will be populated internally in a table by SAP with ## for every ENTER button pressed by the user. the internal table populated by SAP will be having values like this. 11111111111##22222222222##3333333333
    I need to separate the values from ## and move it to another internal table. I used replace statement to replace ##. But its not working.  I dont know what could be the problem. Can any one suggest me in doing this.
    POINTS PROMISED
    Regards,
    Buvana

    You will need to use the replace, but you need to be searching for cl_abap_char_utilities=>CR_LF in the REPLACE statement, the ## is an internal representation of the CR_LF,  so use 
    replace  cl_abap_char_utilities=>CR_LF  with .....
    Regards,
    RIch Heilman

  • Explain me the following replace statement

    Hi guys,
    Please explain me the following replace statement with an example :
    REPLACE ALL OCCURRENCES OF '''' IN materialgroup_desc WITH ''''''.
    Please explain me the purpose of the above statement by showing the input and output.
    Regards,
    Vishu.

    Hi Rob,
    It's working fine .Thank you.But I just want to know the purpose of it as the functionality in one of the programs I have seen is as below  :
    Requirement :
    Need to get all the material groups and description2 based on the material descriptions we enter in the selection-screen .
    The program is coded in such a way that all the single quotes are replaced with double quotes :
    The following 3 statements are written in the code  :
    REPLACE ALL OCCURRENCES OF '''' IN materialgroup_desc  WITH ''''''.
    REPLACE ALL OCCURRENCES OF '*'  IN materialgroup_desc WITH '%'.
    REPLACE ALL OCCURRENCES OF '''' IN materialgroup_desc  WITH ''''''.
    and finally the result string is concatenated between quotes again to query the data.
    For instance if we give MAT'ER*IAL as the input it is converted to 'MAT''''ER%IAL'
    and by querying with a select statement using
    materialgroup_desc LIKE 'MAT''''ER%IAL' we are getting the required data.
    Hope you understand mny question.Please explain me why we are replacing the single quotes with double quotes 2 times.Is it a way to skip the special characters.
    Regards,
    Vishu shetty.

  • Unwanted Line Breaks in PL/SQL CODE after 'CREATE OR REPLACE' statements

    Does anybody know how to keep SQL Developer from automatically editing PL/SQL code and adding line breaks after 'CREATE OR REPLACE' statements?
    It keeps taking:
    CREATE OR REPLACE PACKAGE DEVELOPER AUTHID DEFINER
    And turns it into:
    create or replace
    package developer AUTHID DEFINER
    This unwanted linebreak causes our autodeployment processes to break.
    Thanks,
    Michael Dunn
    University of Notre Dame
    Edited by: user9133268 on Feb 21, 2012 8:00 AM

    Hi Michael,
    I believe nothing for this issue has progressed since it was asked here:
    2.1 RC Extra Line Breaks
    As there may be approval for some planned improvements to the SQL Formatter feature in 3.2, I logged an enhancement request for you:
    Bug 13744858 - FORUM: UNWANTED LINE BREAK AFTER CREATE OR REPLACE SYNTAX
    Regards,
    Gary
    SQL Developer Team
    Edited by: Gary Graham on Feb 21, 2012 4:19 PM
    But if you have control over your auto-deployment process code, it might be quicker to enhance that to deal with CREATE OR REPLACE on the same or the preceding line. Also, note that if you edit the package DDL to put the CREATE OR REPLACE on the same line with the package name in the code editor, then immediately use Export or Save Package Spec and Body to save it to disk, then PACKAGE <name> will appear on the same line as the CREATE OR REPLACE syntax.

  • Error when executing statement for table/stored proc.  : ORA-00911

    Hi All,
    I am posting IDOC->XI->JDBC, approx 5000 Idocs.
    But few messages are giving following error in XI-_SXMB_MONI
    Can any one guide me what is the cause of error? I check whole Idoc data I am not able to see bad character? can any once guide me what are the bad character in XML to post data in oracle? so that i can search in XML and how to avoide this error.
    "com.sap.aii.af.ra.ms.api.MessagingException: Error processing request in sax parser: Error when executing statement for table/stored proc. 'HRP1001' (structure 'INSERT_PAD34'): java.sql.SQLException: ORA-00911: invalid character"

    > I am talking about following IDOC.<ZRMD_A06> ->
    > <E1PLOGI SEGMENT="1">-> <E1PITYP SEGMENT="1"> ->
    > <E1PAD34 SEGMENT="1"> -><PROZT>0.00 #</PROZT>.
    > Can we remove this # during message mapping in XI??
    sure you can remove it using Replace function or by writing UDF.
    as I am seing # is last character..<b>so remove # with " " (single space) and then use the TRIM fucntion.</b>
    Thanks
    Farooq.
    *<b>Rewards points if you find it useful*</b>

  • How to fit results of the select query into next REPLACE statement

    Hello All,
    example:--
    select @DBName = Name from  sys.sysdatabases WHERE dbid = DB_ID('DBA')
    PRINT @DBName (Answer is DBA)
    Now, I want to use this @DBName result in the following statement EVERYTIME:--
    SET @NewDBName = SELECT REPLACE('DBA ' ,' DBA', 'DBANew')  ----------i need help with this syntex...
    HOW CAN I WRITE ABOVE REPLACE STATEMENT CORRECTLY, WHICH EVERYTIME USE THE RESULT OF THE FIRST SELECT QUERY?
    Thank you in advance....

    Thank you for quick reply.
    how about this situation:--
    i want to replace  'Z' with '\\sqlserver\Z$', how can i do this?
    DECLARE @OriginalBackupFile VARCHAR(100)
    SET @OriginalBackupFile = 'Z'
    DECLARE @cmd VARCHAR(100)
    SET @cmd = (SELECT REPLACE (@OriginalBackupFile, @OriginalBackupFile,????????) 
     PRINT @cmd 

  • Regarding select statement for this requirement

    Hi................
    good evening
    here is a requirement.
    i want to retrieve data from the following table.but how to join these table is my dought.
    tables  fields
    t001w--werks " plant id
    t001w--name1 " pl;ant name
    t001w--regio " plant address
    ekko--ebeln " purchase  order
    ekko-erdat : creation date
    ekko-ernam "name of the person
    ekpo-ebelp " item
    ekpo-bstyp "purchase order type
    eket-erdat " delivery date
    mara-matnr " material number
    these are the tables and fields.now we want to retrive data from these tables
    how we have to code select statement.
    selection-screen is
    plant id
    order type
    delivery date
    please provide select statement for this requirement.
    thanks and regards.
    k.swaminath  reddy.

    Is this what you are looking for?
    SQL> CREATE OR REPLACE FUNCTION f_team
      2  RETURN VARCHAR2
      3  IS
      4    s_return VARCHAR2(500);
      5  BEGIN
      6    FOR i IN ( select team from t_team order by 1) LOOP
      7      s_return := s_return || i.team || ', ';
      8    END LOOP;
      9   
    10    RETURN substr(s_return, 1, length(s_return) - 2);
    11  END;
    12  /
    Function created.
    SQL>  SELECT f_team FROM dual;
    F_TEAM
    Australia, Bangladesh, England, India, Kenya, Pakistan, South Africa, UAE, USA, West Indies, Zimbabwe
    SQL>

  • Replacement keyboard for model 2000-104CA??

    Hello all,
    I need to replace the keyboard on:
    The model is: 2000-104CA
    Product: LV987UA#ABC
    Rev. : 3577-100
    #1. Can someone please tell me what the keyboard part # is?
    #2. I tried removing the keyboard (after the fact) and the video instructions, located here: http://h20574.www2.hp.com/results.htm?SID=5059088&MEID=FAA31BDC-56B6-472D-BA7B-4295B0216628 seem incorrect.
    The instructions state to remove 1 5mm P1 screw, then press down with a probe tool in the hole indicated. All I ended up doing with pushing out the "insert" key. I can slightly lift that top side of the keyboard but there is definitely something locking down the keyboard around speaker mute/speaker + function keys.
    What am I doing wrong?
    Thank you

       IBM indicates your part numbers could be this: 39T7353 or this: 39T7417 if you have a laptop designed for English in the USA.
        Try these people: http://www.acsparts.com/contact_us.asp   Do check your machine first (remove the keyboard & look at its exact part number).  They can order things they don't have in stock from the warehouse.  I bought a replacement keyboard for my 3000 N200 from them a few months ago, it was an exact replacement.

  • Powershell - SQL statement for WMI query

    Need to input / update sql database, two main tables: server and diskDrive
    The Primary key for server table is server_id which is also a foreign key in diskDrive table.
    There is no primary key set in the diskDrive table.
    I am able to insert all of the basic data in the server table no problem. 
    What I need help creating/understanding is how to account for the servers with multiple drives.
    Here is my command for accounting for all drive information:
    $diskDrive = gwmi -query "select * from Win32_Volume where DriveType='3' AND DriveLetter IS NOT NULL" | Select @{Name="Device";Expression={$_.DriveLetter}},`
    @{Name="Capacity";Expression={[math]::round(($($_.Capacity)/1GB),2)}},`
    @{Name="FreeSpace";Expression={[math]::round(($($_.FreeSpace)/1GB),2)}},`
    @{Name="UsedSpace";Expression={[math]::round((($_.Capacity - $_.FreeSpace)/1GB),2)}},`
    @{Name="PercentFree";Expression={[math]::round(($($_.FreeSpace)/$($_.Capacity)*100),2)}}
    My thought is to create an exist statement to determine if I need to insert or update the Database:
    $ServerExist = "Select server_id from server where server_name = '$ServerInfo.csname'"
    if ($ServerExist) {
    update statement
    } else {
    #Create SQL Insert Statement with your values
    $insert_stmt = "INSERT INTO Server(server_name, domain_name, Manufacturer, Model, Memory)
    VALUES ('$($Output.Name)','$($Output.Domain)','$($Output.Manufacturer)','$($Output.Model)','$($Output.TotalPhysicalMemory)')" -replace "\s+"," "
    $cmd.CommandText = $insert_stmt
    ## Invoke the Insert statement
    $cmd.ExecuteNonQuery()
    I have tested the insert statement and that works fine.  However I have not implemented the $diskDrive aspect of the insert. 
    Although there will be a slight difference between the insert and update statement for the diskDrive table, still need to work out the iteration aspect for sql statement.
    Items that will need to be inserted/updated per drive:
    Server_id
    DriverLetter
    Capacity
    FreeSpace
    UsedSpace
    PercentFree
    Given my $diskDrive query, I think there needs to be While($diskDrive) statement that will iterate through the drive info and then insert/update until While is finished. 
    However I’m not sure how that is accomplished and hoping to get some help.
    Please let me know if any other information is needed.
    Thanks,
    Jr. Admin

    Hello jrv,
    The problem is my limited experience in powershell and how to iterate through the $diskDrive variable and pull the specific drive information including the server_id and inserting or updating the diskDrive table accordingly. 
    I was able to figure out how to do the insert for one specific wmi entry but in regards to the disk drive, i'm not sure how to work the scripting to run through each drive, insert/update and continue until all drives have been accounted for.
    Please let me know if you need any other information.  I will consider posting later on SQL forum.
    Thanks,
    Jr. Admin

  • My iPad mini has a light leak, will Apple replace it for me?

    Hi, I got my iPad mini about a month ago and I have always noticed this light leak. I was wondering if Apple will replace it for me?
    The only problem is that I bought my iPad in the United States and I live in France...

    You should contact apple support or take it to an apple store.

  • Replacement motherboard for P6813W

    I haven't been able to find an original replacement motherboard for my P6813W desktop.
    I see a lot of aftermarket boards for sale. I want something that is compairable to my original since it worked well for me.
    I need one that can support an AMD FX-4130 3.8Ghz proccesor and a MSI ATI Radion HD6450 video card.
    Any suggestions for one that is $150 or less?

    The Win 7 OS your using is tattoo'ed  with the original motherboard. It will only activate with the same board and version.  Recently my m8100e CTO motherboard (Narra3) became unsteady.   The HP s5120y has the Narra5. I tried swapping out the hard drive to the working system, but it did not activate, but did allow some latitude (3 days) to activate.  As I was busy with another project, I have not continued with the Narra5.
    I am a volunteer. I am not an HP employee.
    To say THANK YOU, press the "thumbs up symbol" to render a KUDO. Please click Accept as Solution, if your problem is solved. You can render both Solution and KUDO.
    The Law of Effect states that positive reinforcement increases the probability of a behavior being repeated. (B.F.Skinner). You toss me KUDO and/or Solution, and I perform better.
    (2) HP DV7t i7 3160QM 2.3Ghz 8GB
    HP m9200t E8400,Win7 Pro 32 bit. 4GB RAM, ASUS 550Ti 2GB, Rosewill 630W. 1T HD SATA 3Gb/s
    Custom Asus P8P67, I7-2600k, 16GB RAM, WIN7 Pro 64bit, EVGA GTX660 2GB, 750W OCZ, 1T HD SATA 6Gb/s
    Custom Asus P8Z77, I7-3770k, 16GB RAM, WIN7 Pro 64bit, EVGA GTX670 2GB, 750W OCZ, 1T HD SATA 6Gb/s
    Both Customs use Rosewill Blackhawk case.
    Printer -- HP OfficeJet Pro 8600 Plus

Maybe you are looking for

  • K7N2 Delta Onboard Sound Disable Question

    I have a K7N2 Delta motherboard with a MSI FX5600 256MB DDR video card.  I am currently using the onboard audio.  Ever since I first built this computer I have been having nearly every game I play on it lock up and freeze.  I am thinking that it is a

  • Fan cranking up

    Recently I've noticed that after about 10 minutes after starting up my macbook, the fan just goes out of control, whirring and whirring until it seems like it is about to explode, then it all calms down again, then starts up again but maybe not so fa

  • No sound since iOS 7 update

    I have no keyboard clicks or mail notification since the update

  • How do you turn off auto complete in finder?

    How do you turn off auto complete in finder?

  • NES plugin  in weblogic

    i have installed weblogic server 9.1 in windows xp. i try to configure sunone webserver 6.1 with weblogic server through proxy36.dll but unfortunately there is no proxy36.dll by default. can any one suggest how to configure weblogic with sun one by p