Problem with the Formula variable

Dear All,
There is a need to convert INR values to USD values. Since my source table in r/3 is not having currency value stored i cant use currency translation type to achieve the same.
So i am using formula variable to determine the Exchange rate.
I have created the CKF with the following calculation = INR values / 'ZEXC_RT'.
Here zexc_rt is a formula variable which is a customer exit and of type Number.
Now in cmod i am writing a code to determine the value for this formula variable. But the problem is with data type of formula variable and tcurr table UKURS (Exchange rate) field. I have defined formula variable as Number and my UKURS field is of decimal data type because of which the currency conversion is not taking place.
Here is my code below . Kindly suggest how can i achieve this.
My logic is :- Whenever the user runs the report take the system date and determine the previous month. Then go to tcurr table and get the exchange rate which matches with the previous month date.
WHEN 'ZEXC_RT'.
*   IF I_STEP=2.
    CLEAR L_S_RANGE.
    DATA:  v_date(10).
    DATA:  v_rate type C.
    DATA: z_date(8).
    concatenate sy-datum+0(4) sy-datum+4(2) '01' into v_Date.
    v_date = v_date - 1.
    concatenate v_date+0(4) v_date+4(2) '01' into v_date.
select SINGLE UKURS into v_rate from tcurr where GDATU = V_date
and KURST ='M'.
    l_s_range-low = v_rate.
    l_s_range-opt = 'EQ'.
    l_s_range-sign = 'I'.
    APPEND l_s_range TO e_t_range.

Hi Anup,
I am not able to get the exact problem.
CKF is not working means it is giving the INR Values or it is giving some random value.
Please check your code first by writing a text program in se38 if you are able to read the value correctly from TCURR.
Domain UKURS has a conversion routine EXCRT. You may require to use it to get the correct value.
Once you get the right value in the program, you can use the same logic in your formula variable and you should get the correct values.
Let me know if it helps.
Regards,
Gaurav

Similar Messages

  • Error with the Shared Variable Engine

    Hi,
    I have a problem with the Shared Variable Engine,
    A .doc File is attached to this message, decribing the problem with pictures.
    I will be glad if anyone can help me. 
    Sincerely yours
    Amitai Abramson
    Attachments:
    Question.doc ‏819 KB

    Hi Amitai,
    Good afternoon and I hope your well.
    A member of the team from NI Israel contacted me regarding this post.
    I want to provide you with extra details on how to resolve your issue - i.e. Repair (Or Re-install) the Shared Variable Engine.
    If you use the MsiBlast Tool it will populate a list of all MSI NI Installers. One of these will be NI Variable Engine. On the right-hand side you can the click 'Repair'. I would also Repair the engine support for the versions of LabVIEW you have installed. Please see attachments for MsiBlast and a screenshoot of the MSIBlast screen.
    If this doesn't work I would recommend re-installing LabVIEW using the following guide, which I posted on this forum. (second post by me).
    Please let me know how you get on,
    Kind Regards,
    James.
    Message Edited by Hillman on 12-03-2008 12:19 PM
    Message Edited by Hillman on 12-03-2008 12:19 PM
    Kind Regards
    James Hillman
    Applications Engineer 2008 to 2009 National Instruments UK & Ireland
    Loughborough University UK - 2006 to 2011
    Remember Kudos those who help!
    Attachments:
    Repair Shared Variable Engine.JPG ‏97 KB
    msiBlast.zip ‏110 KB

  • Help Regarding the Formula Variable

    Hi,
    We have a scenario where  "CKF = RKF/Formula Variable". When we execute a Query in BEx Analyzer, for this particular CKF values are displaying as 'X'. (i.e Numeric values are not displaying)
    When we check in the backend data is available for the RKF.
    Can someone please guide on how to validate whether the Formula Variable is working fine or not?
    Thanks in advance
    Regards,
    Seshendra Reddy

    Hello,
    This post caught my attention because I am facing a similar problem.
    I created a Formula Variable with replacement path on Posting Date (0DATE Char), with exception aggregation = MAX and results calc = MAX.  The purpose is to return the last posting date for a set of documents.  However, it seems that if Posting Date is not in the drilldown, then the formula formula returns 'X'. 
    This limitation is not mentioned in SAP help... and seems to be a pretty big constraint if the reference char on the replacement path formula variables must be in the drilldown.
    Does anyone know how to work around this?
    Thanks!
    Jenni.

  • A formula with a formula variable with a replacement path delivers X

    A formula with a formula variable with a replacement path delivers X as a result if the characteristic of the replacement is not in the drilldown
    I have Created on ( date ) on which I have a Formula variable . I have used that Formula Variable in my calculated Key figure .
    Now the Problem is If I use Created on in ROW , The calculated key figure works . But if I don't use in Row , The calculated Key figure shows X . Situation is Users don't want to see Created on in ROW .
    If I use in row and hide also , then number of Records  will be same .
    Pls guide me what shoud I do .
    Is this problem related to support pack .

    hi
    i would like to know how to create the replacement path and authorisation variables.
    what are the steps we need to follow in rsa1.
    Edited by: vasu reddy on Apr 9, 2008 11:28 AM

  • Many problems with the 'Export to Text' (.txt) in CR Xi

    Hi,
    I have listed many problems with the 'Export to Text' (.txt) function of CR Xi.
    These problems are related to this export format only (meaning everything works fine in the Viewer or in the 'Export to PDF')...
    - Multi-columns layout do not export as Multi-column (export only a one column);
    - Numeric values with parenthesis for negative values or with a fix currency sign at the leftmost position are not exported correctly;
    - Fields having a Suppress formula which is "WhilePrintingRecords" do not appears when exported;
    - Fields with 'Suppress double value' checked are not always suppressed when exported to Text.
    - 'Keep Group Together' flag is not working.
    - 'Reset Page Number After' simply does not works when exported to text;
    - 'Keep object together' on TextBox/Section is not working.
    - Whenever a group is ending on the last line of a page, the the following page as the same Group header as the previous group with no records until the page is filled, then the PageBreak and PageHeader is missing but the records of the following group appears.
    I would like to know what is the status of the 'Export to Text' function (is it a deprecated function not supported anymore???).
    If still supported, when will these bugs be fixed???
    Thanks

    Hi Rene
    Export to Text is supported till date. Crystal Reports 2008 also supports this with Keep together working however when I tried with format with multiple columns, it didnot show up in the exported text file.
    Regards
    Sourashree

  • Problem with the FOR statement.....again!

    Hi everyone,
    Well I'm still trying to do a car slideshow using external
    files and can't seem to see the end. The current movie is here:
    http://www.virtuallglab.com/projects.html
    I also attach the code. My problem is I had originally set up
    an animation with 2 pictures sliding in with some text, and then
    wait 4 seconds before sliding out, and then next pictures and text
    would slide in and so on, using a setInterval.
    The problem is the FOR loop seems to skip the setInterval and
    the function "wait", so it just loops quickly and jumps to last
    picture, so on the example above, it just slides the last picture
    (i=9) and that's it!
    Can you not include another function within a FOR statement.
    Or is there a way to tell the FOR loop to wait until all motion is
    finished?
    Any help greatly appreciated
    import mx.transitions.*;
    import mx.transitions.easing.*;
    for (i=0; i<10 ; i++) {
    var picLeft = "pics/"+i+".jpg";
    var picRight = "pics/"+i+"b.jpg";
    var txtToLoad = "text/"+i+".txt";
    this.createEmptyMovieClip("leftHolder",1);
    leftHolder.loadMovie(picLeft,i,leftHolder.getNextHighestDepth());
    leftHolder._x = -200;
    leftHolder._y = 15;
    var leftTween:Tween = new Tween(leftHolder, "_x",
    Strong.easeOut, leftHolder._x, 10, 2, true);
    this.createEmptyMovieClip("centerHolder",2);
    centerHolder.loadMovie(picRight,i+"b",centerHolder.getNextHighestDepth());
    centerHolder._x = 180;
    centerHolder._y = 250;
    var centerTween:Tween = new Tween(centerHolder, "_y",
    Strong.easeOut, centerHolder._y, 15, 2, true);
    text._x = 600;
    myData = new LoadVars();
    myData.onLoad = function(){
    text.carText.text = this.content;
    myData.load(txtToLoad);
    var textTween:Tween = new Tween(text, "_x", Strong.easeOut,
    text._x, 420, 2, true);
    myInterval = setInterval(wait, 4000);
    function wait() {
    var leftTweenFinished:Tween = new Tween(leftHolder, "_x",
    Strong.easeOut, leftHolder._x, -200, 1, true);
    var centerTween:Tween = new Tween(centerHolder, "_y",
    Strong.easeOut, centerHolder._y, 250, 1, true);
    var textTween2:Tween = new Tween(text, "_x", Strong.easeOut,
    text._x, 600, 1, true);
    clearInterval(myInterval);
    ***************************************************************************************** ***

    There is no way to tell a for loop to wait. That is not what
    they do.
    The entire for loop will execute (if possible, and it doesn't
    enter some kind of continuous infinite loop) completely before each
    time the frame is rendered.
    If you want to spread things out over time you need to use
    the setInterval -- but not inside a for loop! If you do that you
    immediately set however many intervals as your loop has. In this
    case you will also assign the ids for those intervals to the same
    variable, effectively overwriting the value so you will never be
    able to clear most of those intervals.
    So you need to rethink you whole structure. Set up some kind
    of counter and limit like this:
    var slidesToShow:Number=10;
    var curSlide:Number=0;
    Then have your setInterval increment the curSlide each time
    it is called and check to see if it has shown all of them. That is
    where your "loop" comes in.
    As for the other part of your question -- yes you actually
    have two different issues going on -- again you cannot make a for
    loop wait for anything. So no there is no way to pause it while you
    wait for your tween to end. But you can be notified when a tween
    ends.
    Check out the documentation about the tween class in the help
    files. There you will find the onMotionFinished event. So you can
    set up one of those to start whatever needs to be started when the
    tween has finished.
    You should also use the MovieClipLoader class to load your
    images, because you have no idea how long it will take to load
    them. Using that class you get a nice event (onLoadInit) that tells
    you when the asset is ready to be used.
    Finally I'm thinking you might want to use setTimeout instead
    of setInterval. It only goes once, while setInterval repeats
    forever. So I would think your algorithm would be something like
    this.
    1. load external asset
    2. when ready animate in and set onMotionFinished handler
    3. when motion is finished start loading next asset and
    setTimeout for 4 seconds.
    4. when 4 seconds is up or the clip is loaded (which ever
    takes longer) go to 2 and repeat.
    If this is going to be run locally on a hard drive or CD you
    won't have any problem with the length of time it takes to load the
    external assets, but if it is over the web it will take time.

  • Error message in .docx : 'Open XML file cannot be opened because there are problems with the contents. Details Unspecific error Location: 2'

    I have put a lot of work into a docx document on my Mac, but now can't open it as it gives the error message: 'the Open XML file cannot be opened because there are problems with the contents. Details, Unspecific
    error, Location: 2'
    When opening the original file the message said: 'this file contains word 2007 for Windows equations' etc. but I managed to track changes fine, and saved, closed and re-opened it numerous times without problem. Some graphs seemed moved, and various formulas
    were illegible, but no other weirdness was observed.
    I have microsoft 2008 installed on my Mac OS X version 10.6.8.
    I've tried to fix it using various solutions suggested here, but am afraid am too IT illiterate to have had any luck, please help I'm new to all this!
    I've uploaded it to https://www.dropbox.com/s/hkw9k6lyihzoxpc/SittwayPauktawSQUEACREPORT_KD%2BCH.docx

    Hi,
    This issue is related strictly to oMath tags and occurs when a graphical object or text box is anchored to the same paragraph that contains the equation.
    Please use the "Fix it" tool in the following KB article to resolve the problem. See:
    http://support.microsoft.com/kb/2528942
    Hope this helps.
    Regards,
    Steve Fan
    TechNet Community Support

  • Problem with the workbook after upgrade

    Hi all,
    We are facing some problems with the workbooks after BW 3.5 Upgrade.e.g. some templates are disturbed, some variables have been affected. So I have few doubts --
    1. What could be the possible reason behind this?
    2. What exactly got changed in the system which reflected this problems?
    3. What other problems might have occurred which we may not have noticed?
    4. How can I find out the number of workbooks affected due to this?

    Dear ,
    This is known issue:
    Please implement the below mentioned note as this will solve your issue,
    Note 1609237 :  Subsequent correction to 1567679
    Regards,
    Arvind

  • Attributes dissappear from the formula variable after upgrade

    Hi,
    We have upgraded from 3.X to 7.X. When i run the reporrt, i get the error saying that attribute XXXX for characterstic 0object in variable ZFormula variable couldn't found.
    When i went and checked in the formula variable, under replacement path
    Replace variable with
    Info Object
    Replace With
    Attribute value
    Attribute
    I couldnt find my XXXX attribute but with error mesage.
    I tried to create a same formula variable,but could't find the XXXX variable under ATTRIBTE.
    I coldnt find the proper solution or note. Did anyone had issue like this?
    Thanks
    Annie

    Hi,
    Thanks for the replies. But my issue is not with variants. Attributes are missing when I try to assign attribute of char in replacement path and also in my exception aggregation in query designer, reference char isu201D-1u201D.  I am not very sure how can it be u201C-1u201D. Is it upgrade issue?
    Thanks
    Annie

  • Error thread java : problem with the function "resume 0x***"  (forum sun)

    One problem with the function of jdb occured when I tried to use it to
    pilot the processor with differents threads. In fact, I use a simple example with 2 threads.
    I stop the two threads with two breakpoint, and I want to resume one or the other (with the function "resume 0x****"), the one wich I resumed stop again on the breackpoint and I decide again to resume one or the other. All of that to obtain a tree of execution.
    I give you the code of the class and the code of jdb.
    CLASS: (it's just a object Room with a variable degre that I increment and decrement with two threads increase and decrease)
    public class Test{
         public static void main(String[] args){
              Room r = new Room();
              decrease de = new decrease(r);
              increase in = new increase(r);
              de.start();
              in.start();
    class Room {
         private volatile int degre=20;
         public void more(){
         degre += 4;
         public void less(){      
         degre -= 3;
    class decrease extends Thread{
    private Room room;
    public decrease(Room r){
              room =r;
    public void run(){
    try{ 
         while (!interrupted()){ 
              room.less();
    catch(InterruptedException e) {}
    class increase extends Thread{
    private Room room;
    public increase(Room r){
         room =r;
    public void run(){ 
         try{ 
              while (!interrupted()){
                   room.more();
    catch(InterruptedException e) {}
    JDB:
    Initializing jdb ...
    stop at Test:7Deferring breakpoint Test:7.
    It will be set after the class is loaded.
    runrun Test
    Set uncaught java.lang.Throwable
    Set deferred uncaught java.lang.Throwable
    >
    VM Started: Set deferred breakpoint Test:7
    Breakpoint hit: "thread=main", Test.main(), line=7 bci=30
    7 in.start();
    main[1] stop at room:16
    Set breakpoint room:16
    main[1] stop at room:20
    Set breakpoint room:20
    main[1] resume
    All threads resumed.
    >
    Breakpoint hit: "thread=Thread-0", room.less(), line=20 bci=0
    20 degre -= 3;
    Thread-0[1] threads
    Group system:
    (java.lang.ref.Reference$ReferenceHandler)0x10d Reference Handler cond. waiting
    (java.lang.ref.Finalizer$FinalizerThread)0x10c Finalizer cond. waiting
    (java.lang.Thread)0x10b Signal Dispatcher running
    Group main:
    (decrease)0x146 Thread-0 running (at breakpoint)
    (increase)0x147 Thread-1 running (at breakpoint)
    (java.lang.Thread)0x148 DestroyJavaVM running
    Thread-0[1] resume 0x147
    Thread-0[1]
    Breakpoint hit: "thread=Thread-1", room.more(), line=16 bci=0
    16 degre += 4;
    Thread-1[1] resume 0x147
    Thread-1[1]
    Breakpoint hit: "thread=Thread-1", room.more(), line=16 bci=0
    16 degre += 4;
    Thread-1[1] print degre
    degre = 24
    Thread-1[1] resume 0x146 //It's here the problem, thread 0x146 have to stop on the //next breakpoint of decrease but nothing happen
    Thread-1[1] resume 0x147
    Thread-1[1]
    Breakpoint hit: "thread=Thread-1", room.more(), line=16 bci=0
    16 degre += 4;
    Thread-1[1] clear
    Breakpoints set:
    breakpoint Test:7
    breakpoint room:16
    breakpoint room:20
    PS: I tried many other examples with other class and other kind of breakpoints, but, in any cases, on thread doesn't manage to resume. When I try with general resume (no specification of the thread), It works but it isn't interresting for me because I want to decide wich thread continue his execution.

    Hi,
    I have read the FAQ of the JMF.
    The problem was the jar files of the JMF were not in the JRE\BIN\EXT
    folder of the Java runtime!
    now it works!
    thanks
    Reg

  • Problem with the importing wizard

    Hei,
    I have a dll which I want to import to the Labview project. So, I decided ti use the import wizard, but when parsing the header file, Labview freezes. I am using a couple of structures (3) and a handle. I have also read that the wizard has problems when dealing with complex data. What would be best solution for adding it to the project? To in a way "unbundle" the struct and then create a many simple variables and then parsed to dll.  (This would be a pain)
    How to deal with the handle or will wizard easy understand that?
    I am really looking for a painless solution  
    thanks for the help

    Can you post the header file for the DLL?
    Through a process of trial and error you could determine which functions causes problems with the wizard (comment out half the functions, attempt to import, repeat) and then manually create the LabVIEW VIs for the troublesome ones. If there aren't too many functions, you could do it all by hand, which isn't that hard if you have some understanding of C (and if you don't, you'll undoubtedly have other problems when the wizard doesn't do the right thing).

  • Problem with the default selection screen condition

    hi guys,
    I have got some problem with the default screen given by the PNP logical database, P0000 infotype automatically populated according to the condition given in default screen.
    Reg,
    Hariharan

    Don know what u r trying to acheive.
    1) when u have specified PNP in the logical databse field of attributes of program, the SAP wil proivde u default PNP screen and here u can also add ur paramters if u want.
    2) in the program u have to declare like
    INFOTYPES: 0000,0001. "Etc
    for all the infotypes u want to use in the program.
    3) it is the GET PERNR event which wil fil all the p0000 and p0001 (internal tables for al the infotypes declared via INFOTYPES syntax as shown above)
    4) after tht get pernr, u now have data in P tables and u can use it for further reporting.
    5) refer below dummy code -
    REPORT  ZPPL_PREVEMPLOYERS   message-id rp
                                 line-size 250
                                 line-count 65.
    *Program logic :- This Report is used to Download all the Previous
    * Employer (IT0023) records of the employees
    *eject
    *& Tables and Infotypes                                                *
    tables: pernr.
    infotypes: 0000,
               0001,
               0002,
               0023.
    *eject
    *& Constants                                                           *
    constants: c_1(1)       type c               value '1'   ,
               c_3(1)       type c               value '3'   ,
               c_i(1)       type c               value 'I'   ,
               c_x(1)       type c               value 'X'   ,
               c_eq(2)      type c               value 'EQ'  ,
               c_pl03       like p0001-werks     value 'PL03'.
    *eject
    *& Selection-Screen                                                    *
    parameters: p_file  like rlgrap-filename default 'C:TempABC.xls',
                p_test  as checkbox default c_x               .
    *eject
    *& Internal tables                                                     *
    * Internal Table for Output
    data: begin of t_output occurs 0    ,
           pernr like pernr-pernr       ,
           nachn like p0002-nachn       ,
           vorna like p0002-vorna       ,
           orgeh_stext like p1000-stext ,
           plans_stext like p1000-stext ,
           begda like p0023-begda       ,
           endda like p0023-endda       ,
           land1 like p0023-land1       ,
           arbgb like p0023-arbgb       ,
           ort01 like p0023-ort01   .
    data: end of t_output           .
    *eject
    *& Variables                                                           *
    data: o_stext like p1000-stext,
          p_stext like p1000-stext.
    *eject
    *& Initialization                                                      *
    Initialization.
    * Initialize Selection-Screen values
      perform init_selction_screen.
    *eject
    *& AT Selection-screen                                                 *
    at selection-screen .
    * Check if Test run selected, download file name should be entered
      if p_test is initial.  "
        if p_file is initial.
          message e016 with 'Please enter file name'
                            'specifying complete path'.
        endif.
      endif.
    *eject
    *& Start-of Selection                                                  *
    Start-of-selection.
    get pernr.
      clear t_output.
    * Read Infotype 0
      rp-provide-from-last p0000 space pn-begda pn-endda.
      check pnp-sw-found eq c_1.
    * Check if employee is active
      check p0000-stat2 in pnpstat2.      "pernr Active
    * Read Infotype 1
      rp-provide-from-last p0001 space pn-begda pn-endda.
      check pnp-sw-found eq c_1.
    * check if employee belongs to PL03
      check p0001-werks in pnpwerks.  "belongs to PL03
    * Check if emp belongs to Active Group
      check p0001-persg in pnppersg.
    * Read Infotype 2
      rp-provide-from-last p0002 space pn-begda pn-endda.
      check pnp-sw-found eq c_1.
    * Read Org Unit Text.
    CALL FUNCTION 'HR_READ_FOREIGN_OBJECT_TEXT'
         EXPORTING
              OTYPE                   = 'O'
              objid                   = p0001-orgeh
              begda                   = p0001-begda
              endda                   = p0001-endda
              reference_date          = p0001-begda
         IMPORTING
              object_text             = o_stext
          EXCEPTIONS
              nothing_found           = 1
              wrong_objecttype        = 2
              missing_costcenter_data = 3
              missing_object_id       = 4
              OTHERS                  = 5.
    *Read Position Text.
    CALL FUNCTION 'HR_READ_FOREIGN_OBJECT_TEXT'
         EXPORTING
              OTYPE                   = 'S'
              objid                   = p0001-plans
              begda                   = p0001-begda
              endda                   = p0001-endda
              reference_date          = p0001-begda
         IMPORTING
              object_text             = p_stext
         EXCEPTIONS
              nothing_found           = 1
              wrong_objecttype        = 2
              missing_costcenter_data = 3
              missing_object_id       = 4
              OTHERS                  = 5.
    * Gather all the required information related to the emp
      move: pernr-pernr to t_output-pernr,
            o_stext to t_output-orgeh_stext,
            p_stext to t_output-plans_stext,
            p0002-nachn to t_output-nachn,
            p0002-vorna to t_output-vorna.
    * Gather previous Employee details
      loop at p0023.
        move-corresponding p0023 to t_output.
        append t_output.
      endloop.
    *eject
    *& End-of Selection                                                    *
    end-of-selection.
      perform print_report.
    * Downlaod the file
      if not t_output[] is initial.
        if p_test eq space.
          perform download_file.
        endif.
      else.
        write: 'No records selected' color col_negative.
      endif.
    *eject
    *& Top-of-page                                                         *
    Top-of-page.
    * Print Header
      perform print_header.
    *eject
    *&      Form  download_file
    * Description :
    FORM download_file .
      DATA: full_file_name    TYPE string,
            z_akt_filesize    TYPE i     .
      full_file_name = p_file.
    *  download table into file on presentation server
      CALL METHOD cl_gui_frontend_services=>gui_download
        EXPORTING
          filename                = full_file_name
          filetype                = 'DAT'
          NO_AUTH_CHECK           = c_x
          codepage                = '1160'
        IMPORTING
          FILELENGTH              = z_akt_filesize
        CHANGING
          data_tab                = t_output[]
        EXCEPTIONS
          file_write_error        = 1
          no_batch                = 2
          gui_refuse_filetransfer = 3
          invalid_type            = 4
          no_authority            = 5
          unknown_error           = 6
          header_not_allowed      = 7
          separator_not_allowed   = 8
          filesize_not_allowed    = 9
          header_too_long         = 10
          dp_error_create         = 11
          dp_error_send           = 12
          dp_error_write          = 13
          unknown_dp_error        = 14
          access_denied           = 15
          dp_out_of_memory        = 16
          disk_full               = 17
          dp_timeout              = 18
          file_not_found          = 19
          dataprovider_exception  = 20
          control_flush_error     = 21
          not_supported_by_gui    = 22
          error_no_gui            = 23
          OTHERS                  = 24.
      IF  sy-subrc               NE        0.
        MESSAGE e016 WITH 'Download-Error; RC:' sy-subrc.
      ENDIF.
    ENDFORM.                    " download_file
    *eject
    *&      Form  print_report
    *Description:
    FORM print_report .
      data: i       type i,
            w_count type i.
      sort t_output.
    * Print the report
      loop at t_output.
        i = sy-tabix mod 2.
        if i eq 0.
          format color col_normal intensified on.
        else.
          format color col_normal intensified off.
        endif.
        write:/1     t_output-pernr          ,
               10     t_output-vorna(25)     ,
               35    t_output-nachn(25)      ,
               61   t_output-orgeh_stext     ,
               102  t_output-plans_stext     ,
               143  t_output-begda           ,
               154   t_output-endda          ,
               168   t_output-land1          ,
               178   t_output-arbgb(40)      ,
               219   t_output-ort01          ,
               249   space              .
      endloop.
      uline.
      Describe table t_output lines w_count.
      Skip 2.
      Write:/ 'Total No of Records Downloaded: ' color col_total,
              w_count.
    ENDFORM.                    " print_report
    *eject
    *&      Form  print_header
    *Description:
    FORM print_header .
      skip 1.
      Uline.
      format Intensified on color col_heading.
      write:/1   'Pers. #'        ,
             10   'Last Name'     ,
             35   'First Name'    ,
             61   'Org Unit'      ,
             102  'Position'      ,
             143  'Beg Date'      ,
            154   'End Date'      ,
            168   'Cntry Key'     ,
            178   'Prev Employer' ,
            219  'City'           ,
            249   space          .
      format intensified off color off.
      uline.
    ENDFORM.                    " print_header
    *eject
    *&      Form  init_selction_screen
    *Description:
    FORM init_selction_screen .
      refresh: pnpwerks,
               pnppersg,
               pnpstat2.
      clear:   pnpwerks,
               pnppersg,
               pnpstat2.
      pnpwerks-sign   = c_i.
      pnpwerks-option = c_EQ.
      pnpwerks-low    = c_pl03.
      append pnpwerks.
      pnppersg-sign   = c_i.
      pnppersg-option = c_EQ.
      pnppersg-low    = c_1.
      append pnppersg.
      pnpstat2-sign   = c_i.
      pnpstat2-option = c_EQ.
      pnpstat2-low    = c_3.
      append pnpstat2.
    ENDFORM.                    " init_selction_screen

  • Problem with the cache hit ratio

    Hello,
    I ma having a problem with the cache hit ratio I am geting. I am sure, 100% sure, that something has got to be wrong with the cache hit ratio I am fetching!
    1) I will post the code that I am using to retrieve the cache hit ratio. I've seen about a thousand different equations, all equivalent in the end.
    In oracle cache hit ratio seems to be:
    cache hits / cache lookups,
    where cache hits <=> logica IO - physical reads
    cache lookups <=> logical IO
    Now some people use the session logical Reads stat, from teh view v$sysstat; others use db block gets + db consistent gets; whatever. At the end of the day its all the same, and this is what i Use:
    SELECT (P1.value + P2.value - P3.value) AS CACHE_HITS, (P1.value + P2.value) AS CACHE_LOOKUPS, P4.value AS MAX_BUFFS_SIZEB
    FROM v$sysstat P1, v$sysstat P2, v$sysstat P3, V$PARAMETER P4
    WHERE
    P1.name = 'db block gets' AND
    P2.name = 'consistent gets' AND
    P3.name = 'physical reads' AND
    P4.name = 'sga_max_size'
    2) The problem:
    The cache hit ratio I am retrieving cannot be correct. In this case i was benchamarking a HUGELY inneficient query, consisting of the Union of 5 Projections over the same source table, and Oracle is configured with a relatively small SGA of 300 MB. They query plan is awful, the database will read the source database table 5 times.
    And I can see in the physical data statistics of the source tablespace, that total Bytes read is aproximatly 5 times the size of the text file that I used to bulk load data into the databse.
    Some of the relevant stats, wait events:
    db file scattered read     1129,93 seconds
    Elapsed time: 1311,9 seconds
    CPU time: 179,84
    SGA max Size: 314572800 Bytes
    And total bytes read: 77771964416 B (aproximatly 72 Gga bytes)
    the source txt loaded to the database was aprox 16 G
    Number of reads was like 4.5 times the source datafile.
    I would say this, given the difference between CPU time and Elapsed Time, it is clear that the query spent almost all of its time doin DB file scattered reads. How is it possible that i get the following cache hit ratio:
    Cache hit Ratio: 0,92
    Cache hits: 109680186
    Cache lookups: 119173819
    I mean only 8% of that Logical I/O corresponded to physical I/O? It is just not possible.
    3) Procedure of taking stats:
    Now to retrieve these stats I snapshot the system 2 times. One before the query, one after the query.
    But: this is not done in a single session. In total 3 sessions are created. One session two retrieve the stats before the query, one session to run the query, a last session to snapshot after the query.
    Could the problem, assuming there is one, be related to this:
    "The V$SESSTAT view contains statistics on a per-session basis and is only valid for the session currently connected. When a session disconnects all statistics for the session are updated in V$SYSSTAT. The values for the statistics are cleared until the next session uses them."
    What does this paragraph mean. Does it mean that the v$sysstat only shows you the stats of the last session that closed? Or does it mean thtat v$sysstat is increamented with the statistics of each v$sessionstat once a session terminates? If so, then my procedure for gathering those stats should be correct.
    Can anyone help me sort out the origin of such a high cache hit ratio, with so much I/O being done?

    sono99 wrote:
    Hi,s
    first of, let me start by saying that there were many things in your post that you mentioned that I could no understand. 1. Because i am not an Oracle Expert, i use whatever RDBMS whenever i need to. 2. Because another problem has come up and, right now, i cannot inform myself to be able to comprehend it all.Well, could it be that you need to understand the database you are working on in order to comprehend it? That is why we strongly advise you to read the concepts manual first, you need to understand the architecture that Oracle uses, as well as the basic concepts of how oracle does locking and maintains read consistency. It does these different than other database engines, and some things become nonsense if looked at from the viewpoint of a single user.
    >
    quote:
    It would be useful to see the execution plan jhust in case you have simplified the problem so much that a critical detail is missing.
    First, the query code:
    2009-10-20 15:11:59,141 INFO]: OUTPUT_GOBLER:>SQL> CREATE TABLE FAVFRIEND
    [2009-10-20 15:11:59,141 INFO]: OUTPUT_GOBLER:> 2 NOLOGGING TABLESPACE TARGET
    [2009-10-20 15:11:59,141 INFO]: OUTPUT_GOBLER:> 3 AS
    [2009-10-20 15:11:59,141 INFO]: OUTPUT_GOBLER:> 4 SELECT ID as USRID, FAVF1 as FAVF FROM PROFILE
    [2009-10-20 15:11:59,141 INFO]: OUTPUT_GOBLER:> 5 UNION ALL
    [2009-10-20 15:11:59,141 INFO]: OUTPUT_GOBLER:> 6 SELECT ID as USRID, FAVF2 AS FAVF FROM PROFILE
    [2009-10-20 15:11:59,141 INFO]: OUTPUT_GOBLER:> 7 UNION ALL
    [2009-10-20 15:11:59,141 INFO]: OUTPUT_GOBLER:> 8 SELECT ID as USRID, FAVF3 AS FAVF FROM PROFILE
    [2009-10-20 15:11:59,141 INFO]: OUTPUT_GOBLER:> 9 UNION ALL
    [2009-10-20 15:11:59,141 INFO]: OUTPUT_GOBLER:> 10 SELECT ID as USRID, FAVF4 AS FAVF FROM PROFILE
    [2009-10-20 15:11:59,141 INFO]: OUTPUT_GOBLER:> 11 UNION ALL
    [2009-10-20 15:11:59,141 INFO]: OUTPUT_GOBLER:> 12 SELECT ID as USRID, FAVF5 AS FAVF FROM PROFILE
    [2009-10-20 15:11:59,141 INFO]: OUTPUT_GOBLER:> 13 ;
    Now, Althought it is clear from the query that the statement is executed with the NOLOGGiNG, i have disabled the logging entirely for the tablespace.There are certain rules about nologging that may not be obvious. Again, this derives from the basic Oracle architecture, and if you use the wrong definitions of things like logging, you will be led down the primrose path to confusion.
    >
    Futhermore, yes, the RDBMS is a test RDBMS... I have droped the database a few times... And I am constantly deleting an re-inserting data into the source database table named PROFILE.>
    I also make sure do check all the datafile statistics, and for this query the amount of RedoLog, Undo "Log", Templife used is negligible, practically zero.Create table is DDL, which has implied commits before and afterwards. There is a lot going on, some of it dependent on the volume of data returned. The Oracle database writer writes things out when it feels like it, there are situations where it might just leave it in memory for a while. With nologging, Oracle may not care that you can't perform recovery if it is interrupted. So you might want to look into statspack or EM to tell you what is going on, the datafile statistics may not be all that informative for this case.
    >
    Most of the I/O is reading, a few of the I/O is writing.
    My idea is not to optimize this query, it is to understand how it performs. Well, have you read the Concepts manual?
    I have other implementations to test, namely I having trouble with one of them.
    Furthermore, I doubt the query Plan Oracle is using actually involves tablescans (as I I'd like it to do); because in the Wait Events, most of the wait time for this query is spent doing "db file scattered read". And I think this is different from a tablescan.Please look up the definition of [db file scattered read|http://download.oracle.com/docs/cd/B19306_01/server.102/b14211/instance_tune.htm#sthref703].
    >
    Do you really have to use sessions external to the query session ? Can you query v$mystat joined to v$statname from the session itself.
    No, I don't want to that!
    I avoid as much as possible having the code I execute being implemented in java. Why do you think java has anything to do with this? In your session, desc v$mystat and v$statname, these are views you can look at.
    When i can avoid it I don't query the database directly through JDBC, i use the RDBMS command line client, which is supposed to be very robust. Er, is that sqlplus?
    So yes, I only connect to the database with JDBC... in very last session.
    Of course, I Could Have put both the gather stats before query and gathers stats after query a single script: the script that would be also runing the query.
    But that would cause me a number of problems, namely some of the SQL i build has to be implemented dynamically. And I don't want to be replicating the snapshoting code into every query script I make. This way I have one sql with the snapshoting scripts; and multiple scripts for running each query. I avoid code replication in this manner.Instrumentation is a large subject; dynamic sql generation is something to be avoided if possible. Remember, Oracle is written with the idea that many people are going to be sharing code and the database, so it is optimized in that way. For SQL parsing in particular, if every SQL is different, you get a performance problem called "hard parsing." You can (and generally should, and sometimes can't avoid) use bind variables so that Oracle doesn't need to hard parse every SQL. In fact, this is one of those things that applies to other engines besides Oracle. I would recommend you read Tom Kyte's books, he explains what is going on in detail, including in some places the non-Oracle viewpoint.
    >
    Furthermore, Since the database is not a production database, it is there so I can do my tests. I don't have to be concerned with what other sessions may be doing to my system. There are only the sessions I control.No, there are sessions Oracle controls. If you are on unix, you can easily see this, but there are ways to see it on Windows, too. In some cases, your own sessions can affect themselves.
    >
    then what it the array fetch size ? If the array fetch size is large enough the number of block visits would be similar to the number of physical block reads.
    I don't know what the arraysize you mention is. i have not touched that parameter. So whatever it is, it's the default.You should find out! You can go to http://tahiti.oracle.com and type array fetch size into the search box. You can also go to http://asktom.oracle.com and do the same thing, with some more interesting detail.
    >
    By the way, I don't get the query results into my client, the query results are dumped into a target output table.
    So, if the arraysize has something to do with the number of rows that Oracle is returning the client in each step... I think it doesn't matter.You may hear this phrase a lot:
    "It depends."
    >
    As for the query plan, If i am not mistaken you can't get get query plans for queries that are: create table as select.What?
    JG@TTST> explain plan for create table jjj as select * from product_master;
    Explained.
    JG@TTST> select count(*) from plan_table;
      COUNT(*)
             3
    I can however commit the create table part and just call for the evalution of the Select part of the query; i believe it should be same.
    "Optimizer"     "Cost"     "Cardinality"     "Bytes"     "Partition Start"     "Partition Stop"     "Partition Id"     "ACCESS PREDICATES"     "FILTER PREDICATES"
    "SELECT STATEMENT"     "ALL_ROWS"     "2563"     "586110"     "15238860"     ""     ""     ""     ""     ""
    "UNION-ALL"     ""     ""     ""     ""     ""     ""     ""     ""     ""
    "TABLE ACCESS(FULL) SONO99.PROFILE"     ""     "512"     "117222"     "3047772"     ""     ""     ""     ""     ""
    "TABLE ACCESS(FULL) SONO99.PROFILE"     ""     "513"     "117222"     "3047772"     ""     ""     ""     ""     ""
    "TABLE ACCESS(FULL) SONO99.PROFILE"     ""     "513"     "117222"     "3047772"     ""     ""     ""     ""     ""
    "TABLE ACCESS(FULL) SONO99.PROFILE"     ""     "513"     "117222"     "3047772"     ""     ""     ""     ""     ""
    "TABLE ACCESS(FULL) SONO99.PROFILE"     ""     "513"     "117222"     "3047772"     ""     ""     ""     ""     ""
    This query plan was taken from sql developer, exported to txt, and the PROFILE table here has only 100k tuples.
    Right now I am more concerned with testing the MODEL query. Which Oracle doesn't seem to be able any more... but that is a matter for another thread.
    Regarding this plan. The Union ALL seems to be more than just a binary Operator... IT seems to be Neray.
    The union all on that execution plan seems to be taking as leaf tables 5 99sono.Profile tables, and be making a table scan to them all. So I'd say that the RDBMS should only scan each database block once and not 5 times.
    But: It doesn't seem to be so. IT seems like what oracle is doing is scanning completly each the table, and then moving on to next select statement in the UNION ALL. Because given the amount of source table that was read, 5 times greater than the size of the source table. Oracle didn't reuse read blocks.
    But this is just my feeling.Your feeling is uninteresting. Telling us what you really hope to accomplish might be more interesting.
    Anyway, in terms of consistent gets, how many consistent gets should the RDBMS be doing? 5
    One for each table block?It depends.
    >
    My best regards,
    Nuno (99sono xp).

  • Problem with the% deviation from Project Server 2010 field

    hello
    I have a problem with the% deviation from Project Server 2010 field.
    Within a file or project, this project contains tasks.
    Each task has completed the field% deviation.
    Within the row "Summary" in the field of% deviation does not perform the sum of all fields of tasks.
    Only occurs on certain projects, these projects have the view of PR Progress Report
    Anyone know happens?
    thank you very much

    Hi
    Sorry, I'll be more specific now.
    Within the field% deviation. Your settings in PWA is:
    The formula for field% Deviation:
    Str (IIf ([Job baseline] = 0; IIf ([Working] = 0, 0, 100); IIf ([Working] = 0; -100; Int (100 * ([Job] - [Work Online base]) / [Working baseline])))) + "%"
    Under the heading rows Calculation Summary:
    > Use formula.
    Within the field Allocation Calculation of rows:
    > It is labeled the "Apply unless you manually specify".
    The field [Job] and field [Job baseline] are fields Pack project server.
    The error is in project, in the list of tasks.
    In the top row, this row summary makes the sum of the ranks of the tasks of the file.
    But in my case only in the summary field the same value appears in the tasks.
    In all the cells in column% deviation appears the same value.
    I hope it helps.
    thank you very much

  • I just order 8 calendars from iPhoto and they came to me fine. Now I need to order two more but when I go thru the process I get a message  saying:unable to assemble calendar. There is a probleme with the photo with the file name"(Null)"   more........ .

    Would someone be able to explain to me the following issue with Iphoto?
    I ordered 8 same calendars for my soccer team and received them fine. Although a couple of pictures on it are a little off (out of focus). I need to order two more of the same calendars but when I go thru the process ireceive an error message saying:
    "Unable to to assemble  calendar" There is a problem with the photo with the file name "(Null)" The full resolution version of this photo either cannot be located or is corrupt. Please replace this photo or delete it from your calendar.
    How can  I fine this "corrupt" photo? How did it go thru with the first batch of calendars but won't go thru now?
    Thank you for your help.   

    Apply the two fixes below in order as needed:
    Fix #1
    Launch iPhoto with the Command+Option keys held down and rebuild the library.
    Since only one option can be run at a time start
    with Option #4 and then #1 as needed.
    Fix #2
    Using iPhoto Library Manager  to Rebuild Your iPhoto Library
    1 - download iPhoto Library Manager and launch.
    2 - click on the Add Library button, navigate to your Home/Pictures folder and select your iPhoto Library folder.
    3 - Now that the library is listed in the left hand pane of iPLM, click on your library and go to the File ➙ Rebuild Library menu option.
    4 - In the next  window name the new library and select the location you want it to be placed.
    5 - Click on the Create button.
    Note: This creates a new library based on the LIbraryData.xml file in the library and will recover Events, Albums, keywords, titles and comments.  However, books, calendars, cards and slideshows will be lost. The original library will be left untouched for further attempts at fixing the problem or in case the rebuilt library is not satisfactory.
    OT

Maybe you are looking for

  • Problem in setting condition for a period of time for SUMIFS

    Dear fellows, I have a list of transactions - column B is a value and column C is a date. I'm using SUMIF to calculate a total value per month. I set the date condition as column C;">="&B1;column B;"<="&EOMONTH(B1;0) it seems there is a mistake as th

  • Used Mac Mini for $290.00.

    Someone I know and trust has offered me a deal. Problem is, I don't have the bucks for both the Mini and a monitor. I do have a 10-year-old Apple 1705 collecting dust that will work with the purchase of an extra adapter besides the one that comes wit

  • 3D Chart effects in Illustrator CS3?

    Hi, I need to make some great looking charts for an annual report. I'd like them to be on a true 3D riser, like the chart has been rotated and had dimension. I've tried making the chart and using the 3D option filter in Illustrator, but I can't get t

  • How do I fix missconfiguration in Adobe Help Center

    When I opened the Adobe Help Center I received this message, so obviously the program didn't work. Anyone have an idea how to fix this? Program error message had the below email address to submit the report, but that didn'y work either, no supprise t

  • Save data and tcp connection

    Hi, I have a connection between a measurement roboter and LabVIEW. I transmit the data above an TCP connection (for example the coordinate plane of the sensor). I have different ports to transmit the data. Is it possible to save the transmitted data