Double imprecision?

is there imprecision with double data types? last night I was doing a topcoder.com competition (which is over now) where the 500 point problem involved double variables which you had to multiply divide. even in the question it said: "Watch out for double imprecision. The expected number of sales per month, without rounding, is exactly 36091." when I tried that porblem, mine would get all the results right but would get 36091.0001 or something like that. where can I find more information on this?

Hi Rahde,
I think you mean "double precision". The term is a holdover from FORTRAN where doubles had twice as many bytes as floats. You can represent larger (and smaller) numbers with doubles.
If you write a function like a zeroth-order Bessel function of the first kind J0 with floats, the values will degrade quickly for large arguments. Doubles will represent the function faithfully longer.
People who do scientific computing will usually write their code using doubles.
A Google search using "double precision" will turn up a lot. This isn't bad:
http://systems.webopedia.com/TERM/D/double_precision.html
HTH - MOD

Similar Messages

  • Problem with the  addition of  double numbers

    when we try to add the two double numbers say,
    119.52, 10.00
    here we should get 129.52
    but it is giving as 129.51999999999998
    This is happening only for sum numbers.
    Here i want to round this to two digits after decimal point
    if i round the above value i will get 129.52 and the problem will be solved.
    But we don't know exactly on what basis we are getting the sum as 129.51999999999998.
    Assume that, tomorrow when we are adding some other numbers we may got like
    129.51444444444448
    when we round this we get 129.51
    but actually we have to get 129.52.
    If anyone know why the system is giving that wrong sum , please give solution to avoid this.
    In My application , i want the exact sum amount so if i add some numbers i should get exact sum.
    like 119.52+10=129.52
    i want exactly this. How to get this.

    As another poster said, this is a topic worth reading up on, as there are subtleties involved in this kind of imprecise math. A couple of points to get you started though...
    * Java's double type has a precision of something like 16 (20? 24?) decimal places. (You should be able to find the correct number in the lang. spec., or someone may be kind enough to post it here.) I don't remember the formal definition, but what this means, approximately, is that any number that can be represented will be accurate to within +/-0.5*10^-16 of its value. That is, if the actual value is 2e5, then the absolute value of the error in the representation will be less than 0.5e-11. (I might be off be a factor of 2 and/or an order of magnitude here, but you get the general idea.) The good news is, no value will be in error by more than that amount. The bad news is, any value could be in error by up to that amount. These are the two key points.
    * Compare the precision implicit in your data and needed in your results to that of Java, along with the number of intermediate calculations you'll do to get a final result. For instance, if you're doing financial calcs in the tens of billions of dollars, and you need accuracy to the penny, that's one part in 10^-12. Assuming any given value is off by no more than one part in 10^-16, and assuming all errors are in the same direction, if you do 10^4 cumulative additions, you'll be off by a penny. Again, these are rough, and I may have missed something, but this is the kind of thing to look at to determine how the inherent imprecision will affect you.
    * Don't round any intermediate results. Keep the precision you have. However, when you're comparing (as jschell demonstrated) make a copy of the value and round that copy before doing the comparison. Use the first two points above to determine whether that rounding will meet your needs for precision. Same goes for displaying.
    * Finally, if the 10^-16 (or whatever it was) precision of a double is not sufficient, you can get arbitrary precision with BigDecimal. There are a couple of caveats, however. 1) It's a lot slower than using primitives ans 2) Arbitrary precision does not mean infinite precision. You can specify as many decimal places as you want (subject to time and memory constraints), but you even if you specify 1,000 decimal places, you can still be off by 5 in the 1001st place.

  • Trouble with doubles (adding, setting precision)

    Firstly,
    I have a loop that adds 0.3 three times. For some reason it comes out as .8999999999999!
    Why is this?
    Second, does anyone know where I can download a class or view source code that allows you to set decimal precision of a double? I started writing one myself but it's more complex than I thought and I'd rather just use someone elses if I could...

    The precision of calculations and how numerical
    floating point numbers are handled in computers are is
    very relevant for business situations. Actually the
    problems with decimal numbers themselves often need to
    be understood by those creating the business rules (ie
    like the sales people, audit departements, CEOs, etc.)
    The precision of the java double itself is unlikely to
    ever have an impact on that though.
    For example, if a business person asks you to
    calculate a mortgage payement then they must
    understand exactly the impact that the imprecision of
    such decimal calculations will have on the business.
    And they must understand it enough so that they can
    decide the correct way for handling it. The rules
    for handling this case, at least in the
    mortgage/banking industry, is going to be far less
    the possible precision that a java double can have.
    (The reason of course being that how this is handled
    d impacts the credits of the lender and the debits of
    the lendee.)
    Given the above it matters little what data types are
    used to handle the calculation itself. But rather
    that the calculation is done in such a way that the
    business people understand it and that they understand
    the limitations of it as well.Okay, I don't disagree with any of that. Still not sure about your overall point though.
    * P-L said "don't add doubles in a loop because it compounds rounding errors."
    * I said "but if the number of addtions multiplied by the maximum error is still within your error tolerance, it's okay." In other words, Java's double's precision is not necessarily going to be a problem.
    * You said some things that seem to agree with that final point, but your "that is fine if your job consists of nothing but evaluating computers, but for the rest of us the errors in the data that we are using..." comment makes it sound like you're disagreeing with my point: "The errors in Java's double may not cause you problems. Know it's limitations, and how they relate to your requirements."
    Are you looking for an argument, now that "one exit point" has fizzled? :-) Or am I just being particularly dense today?
    ¶

  • Why use int over double?

    i am using the book beginning java 2. and there is a example showing how the math class works
    the program calculates the radius of a circle in feet and inches given that the area is 100 square feet:
    public class MathCalc
    public static void main(String[]args)
    double radius = 0.0;
    double circlearea= 0.0;
    int feet = 0;
    int inches = 0;
    radius = Math.sqrt(circleArea/Math.PI);
    feet = (int)Math.floor(radius);
    inches = (int)Math.round (12.0 * (radius-feet));
    System.out.println( Feet + "feet" + inches + "inches");
    the output will be 5 feet 8 inches.
    my question is why bother with using 'int', why not simply use 'double' for all your variables?
    in feet and inches 'int' has been used as the result would have been a floating value. so casting as been used. But doesnt that complicate things?cant one just use long for all variables and forgot about worrying whether the value will fit or not.
    thanks
    Ali

    i am using the book beginning java 2. and there is a
    example showing how the math class works
    the program calculates the radius of a circle in feet
    and inches given that the area is 100 square feet:
    public class MathCalc
    public static void main(String[]args)
    double radius = 0.0;
    double circlearea= 0.0;
    int feet = 0;
    int inches = 0;
    radius = Math.sqrt(circleArea/Math.PI);
    feet = (int)Math.floor(radius);
    inches = (int)Math.round (12.0 *
    d (12.0 * (radius-feet));
    System.out.println( Feet + "feet" + inches +
    "inches");
    the output will be 5 feet 8 inches.
    my question is why bother with using 'int', why not
    simply use 'double' for all your variables?There are several reasons to use int (when appropriate) rather than double. More generally, there are several reasons to use integer arithmetic instead of floating point.
    First, integer arithmetic is precise whereas floating point arithmetic is always subject to imprecision. E.g. 6 / 2 always equals 3, 6.0 / 2.0 may equal something like 3.000000000000001.
    Second, (related to the above) the results of integer arithmetic operations will not vary from one machine to the next. The results of the same floating point operation may vary from one machine to the next.
    Third, integer arithmetic is always faster than floating point.
    >
    in feet and inches 'int' has been used as the result
    would have been a floating value. so casting as been
    used. But doesnt that complicate things?The results are cast back to an int because it would look silly and meaningless to print a result of, for instance, 5.00000001 feet, 8.00045 inches.
    cant one just
    use long for all variables and forgot about worrying
    whether the value will fit or not. No. You should never disregard whether the results of arithmetic operations will overflow the size of the word you are using. Even though a long type can contain a pretty huge number, you can still easily overflow it and get nonsensical results.
    Also, a 32 bit word is the native size for most of the machines most of us use. This means that arithmetic operations are fastest on int types (for most of us). This shouldn't be a primary design consideration but it should be taken into account.

  • LR 5.5 double-click behavior on WB sliders (and other sliders in Basic tab)

    i recently upgraded to LR 5.5 from 5.4.
    sometimes i check the auto-WB recommendation by using the ability to Shift + double-click on a WB slider (in Dev. Module).  (this feature was introduced in LR 5, i believe, maybe LR 4.)
    before the upgrade, whether the WB sliders were already at a custom setting or still on the "as-shot" setting, you could Shift + double-click on either the Temp or Tint slider and get the "auto" recommendation.  Then, you could undo and redo, toggling back and forth between the auto setting and whatever you had before that.
    now, however, when i Shift + double-click, before the slider registers the double-click and produces the auto setting, it responds to the first part of the double-click.  that means that FIRST it moves the slider a little one way or the other, and THEN goes to the auto setting.
    this behavior makes it impossible to toggle back and forth between the auto setting and whatever it was before that.  instead, it now toggles between auto and that little adjustment that was registered in the first part of the double-click.
    for example:
    the Temp slider is set to a custom value of 5200 on a certain photo.
    i'm curious what is the auto recommendation, so i Shift + double-click on the slider.
    the slider registers the first part of my double-click, moving for an instant to 5384, before understanding that i actually double-clicked and producing the auto setting.
    this is annoying in any case, but it's a problem because now when i undo and redo to toggle between my custom setting (5200) and the auto recommendation, it's instead toggling between the auto and 5384.  (or whatever value happened to register in the first part of the double-click.)
    this changed behavior also affects the other sliders in the Basic tab where you can Shift + double-click to check an auto value.  personally, i never use this feature on the other sliders, but i do use it quite a bit on the WB sliders as a step in arriving at my custom WB.
    also, i just noticed that it also happens sometimes on black-and-white images, when adjusting the Black and White Mix sliders.  (these sliders can also revert to their auto value if you adjust one and then Shift + double-click.  this is beneficial for when you don't want to return the whole group of sliders to auto mix.
    note:
    i do not adjust the sliders by dragging.  instead, i mouse over a slider, and use up or down arrow keys to adjust in regular increments (or Shift + arrow key for a larger increment).  i find this is a much better way to work for a number of reasons, and especially with large numbers of images.  if i want to make a finer adjustment, i just click in the value field of a slider and use arrow keys to go in single-unit increments.  (or use Option + arrow key for a smaller-than-default increment.)
    For color Temp, camera settings already use 50-degree increments (5600, 5650, 5700, etc.), so they appear in LR with those kinds of rounded numbers, never 5611 or whatever.  using the arrow keys to adjust color temp also goes in 50-degree increments, and using Shift+arrow key goes in 200-degree increments.  For Tint, however, the camera does use single-unit increments, like 7 or 11.  the arrow key method of adjusting Tint goes in increments of 5 or 20, which for Tint is usually too broad of an adjustment.  
    sorry for the long post.  anyone else having this problem?  as someone who does a lot of toggling back-and-forth to compare things, i find this fairly small change in behavior incredibly disruptive.
    my system:
    late 2013, 15-inch rMBP;  2.3 GHz i7;  500gb SSD; 16gb RAM
    OS 10.9.2  (not yet on 10.9.3 as there seem to be problems)
    no Adobe CC items.

    bob,
    you are correct—what you said does work.
    {for the sake of clarity and consistency, when i say double-click on the "slider", i mean on the value-marker, the triangular point that actually moves (or what ssprengel is calling the "slider-thumb/handle" if i'm understanding him correctly)—not the range on which it moves, nor the label to the left side of the range.}
    but have i gone crazy??  has the behavior not changed at all??  i could have sworn that in the past, i was double-clicking (with or w/o shift key) on the value-marker of the slider, instead of on the label as you mention (although that instruction does sound familiar now, too).  this is not a rare action for me, but something i've done countless times on the WB sliders, and also on the Black and White Mix sliders to return them to their auto value.
    actually—now that i think about it, i do this action a ton on the HSL sliders, also:  use the arrow keys (or Shift+arrow) to adjust HSL values, which go in increments of 5 (arrow) or 20 (shift+arrow).  sometimes to return to zero i use the arrow keys again, but sometimes just double-click on the slider.
    Or, if i want to see a very large, imprecise adjustment, i don't use the arrow keys but just click once towards the extemes of the range: +83 or -100 or whatever.  and then to return to zero, i just double-click on that same spot—meaning on the slider/value-marker, wherever it happened to land on my first click.
    however, in the last couple major releases (LR4 and now LR5), i've noticed that feature doesn't work quite as well as it used to.  it used to be very easy to click once, get an extreme value, then very soon afterwards double-click and return to zero.  you could do it easily, without even looking carefully at the sliders (so you could look instead at the picture changing).  now, however, i find that i usually have to double-click two or three times before the slider responds and goes back to zero.  sometimes i have to reposition the mouse very slightly and double-click again for that action to happen (and not because my mouse strayed from the slider).
    i have noticed this to be true across many changing conditions:
    major releases and smaller updates of LR;
    different OS (10.6.8 snow leopard through 10.7, 10.8, and 10.9 mavericks);
    different machines: 2007 MBP and late 2013 rMBP;
    even different mice: used to have an old Kensington mouse; now using Logitech G500s, a fairly high-end gaming mouse (even though i don't do any gaming).
    when i first noticed this less-responsive behavior, i thought it was due to my mouse and/or computer being old, maybe outdated.  the kensington mouseworks software didn't really work, even on the older 2007 MBP.  so i chalked it up to mouse issues.  but it's exactly the same with my new, much more sophisticated mouse, whose software does work on my late 2013 rMBP.
    (and now, with LR5.5, there's the issue i mentioned originally, where the first part of the double-click records a value shift before LR realizes i was actually double-clicking.)
    why am i bothering to say all this??
    first, it's an additional problem, but similar to what i originally posted about.  second, it offers (at least some) support for my original idea—that in the past, i was, in fact, double-clicking on the slider itself, not on the label, to get auto or as-shot values.
    does anyone else have any thoughts on this?  am i the only one who "remembers" double-clicking on the slider, not the label, to get the auto or as-shot WB, or reset HSL sliders, or return to auto values of individual sliders in Black and White Mix?

  • Best way to determine if a number is evenly divisible by a double?

    I need to determine if some number is divisible by some other number. A simple solution is:
    public boolean isDivisibleBy(double dividend, double divisor)
       return dividend % divisor == 0;
    }Unfortunately this does not work if the divisor is not an integer (e.g. 1.0 % 0.1 results in 0.1).
    I am trying to find a solution with good performance, but hopefully doesn't make the code too messy. I assume someone has solved this problem before, but apparently my Google-fu is weak. :-(
    Anyone have a solution they'd care to share?

    Sorry, I realized my post did not ask my real question (but you answered too quick for me to edit it ;-) ).
    What I'm unsure of is what metric I should use. I was hoping perhaps the maximum imprecision would be determined by the IEEE double standard. I take it from your reply this is not the case? So I should just choose whatever limit I feel will be sufficiently small for my application?
    Edit: I've experimentally found 1.0E-16 to be sufficient for the imprecision in my test cases. Since the smallest imaginable divisor for my application would be several orders of magnitude larger than that, I think I will be fine just by picking an arbitrary number.
    Still, I would be interested to know if the definition of the remainder function would provide any insight into the maximum imprecision which would be possible.
    Anyway, thanks for the help.
    Edited by: dsiegmann on Dec 11, 2007 4:18 PM

  • Reporting Level The Value will Double....

    Hi Friends,
                      IN BI 7.O I Build MultiProvider Based on DSO And CUBE.Here My DSO is Standard  and the same DSO  Fields are Mapped  in to CUBE also.Here My Query Also Standard Query Under DSO,But I copied to Multiprovider.When i execute the Query the Value will be Double.Please let me know the solution for this.
    Thanx & Regards,
    Raghavendra Bellam.

    Hi,
    As you are aware that a Multiprovider perform a union operation on data from all the objects underneath it.
    If your Query selection fullfil the criteria from the cube as well as DSO the key figure value would be double.
    One solution is to provide a variable/Filter for the infoprovider in the query to get result from only one of them.
    Hope this solves.
    Regards,
    Karan

  • Sales quote layout rows doubled in crystal report layout

    Dear All,
    Sales quote layout rows doubled in crystal report layout.
    In sales quote layout the rows are doubled. Even in the standard layout. If the quote contains only two rows. Then it is doubled as 4 rows in the crystal report layout.
    It is happening in the particular database. Other database are working fine. I request you people to help me to overcome this issue.
    Regards,
    Siva

    Hi Siva,
    If this is regarding CR in SAP B1 then please repost to the SAP Business One Application space.
    -Abhilash

  • SSRS Report Returning Double Quote string from a Single Quote String

    Hi, I'm getting weird thing in resultset from SSRS report when executed. When I pass parameter to a report, which passes String that has single quote value to a split function , it returns rows with double quote. 
    For example  following string:
    'N gage, Wash 'n Curl,Murray's, Don't-B-Bald
    Returns: 
    ''N gage, Wash ''n Curl,Murray''s, Don''t-B-Bald
    through SSRS report.
    Here is the split function Im using in a report.
    CREATE Function [dbo].[fnSplit] (
    @List varchar(8000), 
    @Delimiter char(1)
    Returns @Temp1 Table (
    ItemId int Identity(1, 1) NOT NULL PRIMARY KEY , 
    Item varchar(8000) NULL 
    As 
    Begin 
    Declare @item varchar(4000), 
    @iPos int 
    Set @Delimiter = ISNULL(@Delimiter, ';' ) 
    Set @List = RTrim(LTrim(@List)) 
    -- check for final delimiter 
    If Right( @List, 1 ) <> @Delimiter -- append final delimiter 
    Select @List = @List + @Delimiter -- get position of first element 
    Select @iPos = Charindex( @Delimiter, @List, 1 ) 
    While @iPos > 0 
    Begin 
    -- get item 
    Select @item = LTrim( RTrim( Substring( @List, 1, @iPos -1 ) ) ) 
    If @@ERROR <> 0 Break -- remove item form list 
    Select @List = Substring( @List, @iPos + 1, Len(@List) - @iPos + 1 ) 
    If @@ERROR <> 0 Break -- insert item 
    Insert @Temp1 Values( @item ) If @@ERROR <> 0 Break 
    -- get position pf next item 
    Select @iPos = Charindex( @Delimiter, @List, 1 ) 
    If @@ERROR <> 0 Break 
    End 
    Return 
    End
    FYI: I'm getting @List value from a table and passing it as a string to split function. 
    Any help would be appreciated!
    ZK

    Another user from TSQL forum posted this code which is returning the same resultset but when I execute both codes in SQL server it works and return single quote as expected.
    https://social.msdn.microsoft.com/Forums/sqlserver/en-US/8d5c96f5-c498-4f43-b2fb-284b0e83b205/passing-string-which-has-single-quote-rowvalue-to-a-function-returns-double-quoate?forum=transactsql
    CREATE FUNCTION dbo.splitter(@string VARCHAR(MAX), @delim CHAR(1))
    RETURNS @result TABLE (id INT IDENTITY, value VARCHAR(MAX))
    AS
    BEGIN
    WHILE CHARINDEX(@delim,@string) > 0
    BEGIN
    INSERT INTO @result (value) VALUES (LEFT(@string,CHARINDEX(@delim,@string)-1))
    SET @string = RIGHT(@string,LEN(@string)-CHARINDEX(@delim,@string))
    END
    INSERT INTO @result (value) VALUES (@string)
    RETURN
    END
    GO
    ZK

  • Double click on field in ALV Report

    hi everyone
    i have written a program which displays data in an alv grid report, now i need to extend my program a bit more.
    when i double click on any field value the corresponding record should be displayed
    can anyone suggest if i need to call any fn module for this, if so wht's the fn module
    if anyone can give an example that would be fine
    Cheers,
    rama

    Hi,
    *& Report  Z_REPORTFROMKNA1ANDT005T
    REPORT  Z_REPORTFROMKNA1ANDT005T
                      LINE-SIZE 180
                      MESSAGE-ID ZZ.
    TABLES:EKKO.
    TYPE-POOLS : SLIS.
          Internal table for ALV
    DATA : IT_FIELDCAT TYPE SLIS_T_FIELDCAT_ALV,     "Field catalog
           WA_FIELDCAT TYPE SLIS_FIELDCAT_ALV,       "WA for Field catalog
           IT_EVENT TYPE SLIS_T_EVENT,               "events
           WA_EVENT TYPE SLIS_ALV_EVENT,             "WA for events
           IT_COMMENT TYPE SLIS_T_LISTHEADER,        "Header details
           WA_COMMENT TYPE SLIS_LISTHEADER,          "WA for header details
           WA_LAYOUT TYPE SLIS_LAYOUT_ALV,           "Layout
           IT_SORT TYPE SLIS_T_SORTINFO_ALV,         "Sort table
           WA_SORT TYPE SLIS_SORTINFO_ALV,           "WA for sort table
           IT_KEYINFO TYPE SLIS_KEYINFO_ALV.         "Pass key value
    DATA : V_REPID LIKE SY-REPID.
    V_REPID = SY-REPID.
    DATA : V_DATE LIKE SY-DATUM.
    color management.
    DATA  : IT_COLOR TYPE TABLE OF LVC_S_SCOL.       "Color management.
          Internal table declearation
    DATA:BEGIN OF IT_EKKO OCCURS 0,
      EBELN LIKE EKKO-EBELN,
      BUKRS  LIKE EKKO-BUKRS,
      AEDAT  LIKE EKKO-AEDAT,
    END OF IT_EKKO.
    DATA : BEGIN OF IT_EKPO OCCURS 0,
      EBELN LIKE EKPO-EBELN,
      EBELP LIKE EKPO-EBELP,
      MATNR LIKE EKPO-MATNR,
      MENGE LIKE EKPO-MENGE,
      MEINS LIKE EKPO-MEINS,
      NETPR LIKE EKPO-NETPR,
      NETWR LIKE EKPO-MENGE,
      chk(1) type c,
    END OF IT_EKPO.
    DATA : BEGIN OF IT_EKBE OCCURS 0,
           EBELN LIKE EKBE-EBELN,
           EBELP LIKE EKBE-EBELP,
           BELNR LIKE EKBE-BELNR,
           MENGE LIKE EKBE-MENGE,
           MATNR LIKE EKBE-MATNR,
      END OF IT_EKBE.
    DATA : BEGIN OF IT_FINAL OCCURS 0,
      EBELN LIKE EKPO-EBELN,
      EBELP LIKE EKPO-EBELP,
      MATNR LIKE EKPO-MATNR,
      MENGE LIKE EKPO-MENGE,
      MEINS LIKE EKPO-MEINS,
      NETPR LIKE EKPO-NETPR,
      NETWR LIKE EKPO-NETWR,
      LINE_COLOR(4) TYPE C,     "Used to store row color attributes
    END OF IT_FINAL.
    SELECTION-SCREEN BEGIN OF BLOCK BLK WITH FRAME TITLE TEXT-001.
    SELECT-OPTIONS:S_EBELN FOR EKKO-EBELN.
    PARAMETERS : RB1 RADIOBUTTON GROUP G1 MODIF ID Z1,
                 RB2 RADIOBUTTON GROUP G1 MODIF ID Z2,
                 RB3 RADIOBUTTON GROUP G1 MODIF ID Z3.
    SELECTION-SCREEN END OF BLOCK BLK.
    AT SELECTION-SCREEN OUTPUT.
      PERFORM MODIFY_SCREEN.
    START-OF-SELECTION.
      PERFORM GET_DETAILS.
      PERFORM GET_ALV.
    *&      Form  modify_screen
          text
    -->  p1        text
    <--  p2        text
    FORM MODIFY_SCREEN .
    IF RB1 = 'X'.
       LOOP AT SCREEN.
         IF SCREEN-GROUP1 = 'Z1' .
           SCREEN-INVISIBLE = 1.
           SCREEN-ACTIVE = 0.
         ELSE.
           SCREEN-INVISIBLE = 0.
           SCREEN-ACTIVE = 1.
         ENDIF.
         MODIFY SCREEN.
       ENDLOOP.
    ENDIF.
    ENDFORM.                    " modify_screen
    *&      Form  GET_DETAILS
          Get the details
    FORM GET_DETAILS .
      DATA: LD_COLOR(1) TYPE C.
      SELECT EBELN
             BUKRS
             AEDAT
        FROM EKKO
        INTO TABLE IT_EKKO
       WHERE EBELN IN S_EBELN.
      IF SY-SUBRC = 0.
        SORT IT_EKKO BY EBELN.
      ELSE.
        MESSAGE E000 WITH 'DATA NOT FOUND'.
      ENDIF.
      IF NOT IT_EKKO[] IS INITIAL.
        SELECT EBELN
               EBELP
               MATNR
               MENGE
               MEINS
               NETPR
               NETWR
              chk
          FROM EKPO
          INTO TABLE IT_EKPO
           FOR ALL ENTRIES IN IT_EKKO
         WHERE EBELN = IT_EKKO-EBELN.
        IF SY-SUBRC = 0.
          SORT IT_EKPO BY EBELN.
        ENDIF.
      ENDIF.
      LOOP AT IT_EKPO.
        IT_FINAL-EBELN = IT_EKPO-EBELN.
        IT_FINAL-EBELP = IT_EKPO-EBELP.
        IT_FINAL-MATNR = IT_EKPO-MATNR.
        IT_FINAL-MENGE = IT_EKPO-MENGE.
        IT_FINAL-MEINS = IT_EKPO-MEINS.
        IT_FINAL-NETPR = IT_EKPO-NETPR.
        IT_FINAL-NETWR = IT_EKPO-NETWR.
        ON CHANGE OF IT_FINAL-EBELN.
          LD_COLOR = 7.
          CONCATENATE 'C' LD_COLOR '10' INTO IT_FINAL-LINE_COLOR.
        ENDON.
        APPEND IT_FINAL.
        CLEAR IT_FINAL.
      ENDLOOP.
    ENDFORM.                    " GET_DETAILS
    *&      Form  GET_ALV
          text
    FORM GET_ALV .
      PERFORM GENERATE_FIELDCAT.
      PERFORM GENERATE_LAYOUT.
      PERFORM GENERATE_EVENTS.
      PERFORM GENERATE_SORT.
      PERFORM ALV_GRID_DISPLAY.
    ENDFORM.                    " GET_ALV
    *&      Form  GENERATE_FIELDCAT
          Field catalog
    FORM GENERATE_FIELDCAT .
      IF RB1 = 'X' OR RB2 = 'X'.
        WA_FIELDCAT-FIELDNAME = 'EBELN'.
        WA_FIELDCAT-COL_POS = '1'.
        WA_FIELDCAT-JUST = 'R'.
        WA_FIELDCAT-SELTEXT_L = 'PO Number'.
        WA_FIELDCAT-LOWERCASE = 'X'.
        WA_FIELDCAT-DO_SUM = 'X'.
        APPEND WA_FIELDCAT TO IT_FIELDCAT.
        WA_FIELDCAT-FIELDNAME = 'EBELP'.
        WA_FIELDCAT-COL_POS = '2'.
        WA_FIELDCAT-JUST = 'C'.
        WA_FIELDCAT-SELTEXT_L = 'Item Number'.
        WA_FIELDCAT-LOWERCASE = 'X'.
        WA_FIELDCAT-edit = 'X'.
        APPEND WA_FIELDCAT TO IT_FIELDCAT.
        WA_FIELDCAT-FIELDNAME = 'MATNR'.
        WA_FIELDCAT-COL_POS = '3'.
        WA_FIELDCAT-JUST = 'C'.
        WA_FIELDCAT-SELTEXT_L = 'Material Number'.
        WA_FIELDCAT-LOWERCASE = 'X'.
        APPEND WA_FIELDCAT TO IT_FIELDCAT.
        WA_FIELDCAT-FIELDNAME = 'MENGE'.
        WA_FIELDCAT-COL_POS = '4'.
        WA_FIELDCAT-JUST = 'C'.
        WA_FIELDCAT-SELTEXT_L = 'PO Quantity'.
        WA_FIELDCAT-LOWERCASE = 'X'.
        APPEND WA_FIELDCAT TO IT_FIELDCAT.
        WA_FIELDCAT-FIELDNAME = 'MEINS'.
        WA_FIELDCAT-COL_POS = '5'.
        WA_FIELDCAT-JUST = 'C'.
        WA_FIELDCAT-SELTEXT_L = 'Order unit'.
        WA_FIELDCAT-LOWERCASE = 'X'.
        APPEND WA_FIELDCAT TO IT_FIELDCAT.
        WA_FIELDCAT-FIELDNAME = 'NETPR'.
        WA_FIELDCAT-COL_POS = '6'.
        WA_FIELDCAT-JUST = 'C'.
        WA_FIELDCAT-SELTEXT_L = 'Net price'.
        WA_FIELDCAT-LOWERCASE = 'X'.
        APPEND WA_FIELDCAT TO IT_FIELDCAT.
        WA_FIELDCAT-FIELDNAME = 'NETWR'.
        WA_FIELDCAT-COL_POS = '7'.
        WA_FIELDCAT-JUST = 'C'.
        WA_FIELDCAT-SELTEXT_L = 'Net order value'.
        WA_FIELDCAT-LOWERCASE = 'X'.
        APPEND WA_FIELDCAT TO IT_FIELDCAT.
       wa_fieldcat-fieldname = 'CHK'.
       wa_fieldcat-col_pos = '8'.
       wa_fieldcat-just = 'C'.
       wa_fieldcat-seltext_l = 'Check Box'.
       wa_fieldcat-lowercase = 'X'.
       wa_fieldcat-checkbox = 'X'.
       wa_fieldcat-edit = 'X'.
       append wa_fieldcat to it_fieldcat.
      ELSE.
        CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
         EXPORTING
           I_PROGRAM_NAME               = V_REPID
           I_INTERNAL_TABNAME           = 'IT_EKKO'
        I_STRUCTURE_NAME             = I_STRUCTURE_NAME
        I_CLIENT_NEVER_DISPLAY       = 'X'
           I_INCLNAME                   = V_REPID
        I_BYPASSING_BUFFER           = I_BYPASSING_BUFFER
        I_BUFFER_ACTIVE              = I_BUFFER_ACTIVE
          CHANGING
            CT_FIELDCAT                  = IT_FIELDCAT
         EXCEPTIONS
           INCONSISTENT_INTERFACE       = 1
           PROGRAM_ERROR                = 2
           OTHERS                       = 3
        IF SY-SUBRC <> 0.
          MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
                  WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
        ENDIF.
        CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
         EXPORTING
           I_PROGRAM_NAME               = V_REPID
           I_INTERNAL_TABNAME           = 'IT_EKPO'
      I_STRUCTURE_NAME             = I_STRUCTURE_NAME
      I_CLIENT_NEVER_DISPLAY       = 'X'
           I_INCLNAME                   = V_REPID
      I_BYPASSING_BUFFER           = I_BYPASSING_BUFFER
      I_BUFFER_ACTIVE              = I_BUFFER_ACTIVE
          CHANGING
            CT_FIELDCAT                  = IT_FIELDCAT
         EXCEPTIONS
           INCONSISTENT_INTERFACE       = 1
           PROGRAM_ERROR                = 2
           OTHERS                       = 3
        IF SY-SUBRC <> 0.
          MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
                  WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
        ENDIF.
      ENDIF.
    ENDFORM.                    " GENERATE_FIELDCAT
    *&      Form  GENERATE_EVENTS
          Generate Events
    FORM GENERATE_EVENTS .
      CALL FUNCTION 'REUSE_ALV_EVENTS_GET'
        IMPORTING
          ET_EVENTS       = IT_EVENT
        EXCEPTIONS
          LIST_TYPE_WRONG = 1
          OTHERS          = 2.
      IF SY-SUBRC <> 0.
        MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
                WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
      IF NOT IT_EVENT[] IS INITIAL.
        READ TABLE IT_EVENT INTO WA_EVENT WITH KEY NAME = 'TOP_OF_PAGE'.
        IF SY-SUBRC = 0.
          WA_EVENT-FORM = 'TOP_OF_PAGE'.
          MODIFY IT_EVENT FROM WA_EVENT INDEX SY-TABIX.
        ENDIF.
    <b>   READ TABLE IT_EVENT INTO WA_EVENT WITH KEY NAME = 'USER_COMMAND'.
        IF SY-SUBRC = 0.
          WA_EVENT-FORM = 'IT_USER_COMMAND'.
          MODIFY IT_EVENT FROM WA_EVENT INDEX SY-TABIX.
        ENDIF.</b>
      ENDIF.
    ENDFORM.                    " GENERATE_EVENTS
    *&      Form  TOP_OF_PAGE
          TOP_OF_PAGE
    FORM TOP_OF_PAGE.
      DATA : V_CONCATE(50) TYPE C.
      DATA : V_SPACE(10) TYPE C.
      CONCATENATE 'VIKRANTH' 'RAJESH' INTO V_CONCATE.
      WA_COMMENT-TYP = 'S'.
      WA_COMMENT-KEY = 'USER :'.
      WA_COMMENT-INFO = V_CONCATE.
      APPEND WA_COMMENT TO IT_COMMENT.
      WA_COMMENT-TYP = 'S'.
      WA_COMMENT-KEY = 'DATE:'.
      WA_COMMENT-INFO = SY-DATUM.
      APPEND WA_COMMENT TO IT_COMMENT.
      WA_COMMENT-TYP = 'S'.
      WA_COMMENT-KEY = 'TIME:'.
      WA_COMMENT-INFO = SY-TIMLO.
      APPEND WA_COMMENT TO IT_COMMENT.
      CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
        EXPORTING
          IT_LIST_COMMENTARY = IT_COMMENT.
      CLEAR IT_COMMENT.
    ENDFORM.                    "TOP_OF_PAGE
    *&      Form  ALV_GRID_DISPLAY
          Grid display
    FORM ALV_GRID_DISPLAY .
      IF RB1 = 'X'.
        PERFORM GRID_DISPLAY.
      ELSEIF RB2 = 'X'.
        PERFORM LIST_DISPLAY.
      ELSE.
        PERFORM HIERSEQ_DISPLAY.
      ENDIF.
    ENDFORM.                    " ALV_GRID_DISPLAY
    *&      Form  GENERATE_LAYOUT
          LAYOUT
    FORM GENERATE_LAYOUT .
      WA_LAYOUT-COLWIDTH_OPTIMIZE = 'X'.           "OPTIMIZING FIELD WIDTH
      WA_LAYOUT-ZEBRA = 'X'.                       "PUTTING ZEBRA COLORS
      WA_LAYOUT-TOTALS_TEXT = 'Total'.
      WA_LAYOUT-SUBTOTALS_TEXT = 'SUB TOTAL'.
      WA_LAYOUT-INFO_FIELDNAME = 'LINE_COLOR'.
    ENDFORM.                    " GENERATE_LAYOUT
    *&      Form  GENERATE_SORT
          SORT
    FORM GENERATE_SORT .
      WA_SORT-FIELDNAME = 'EBELN'.
      WA_SORT-SPOS = '1'.
      WA_SORT-UP = 'X'.
      WA_SORT-SUBTOT = 'X'.
      APPEND WA_SORT TO IT_SORT.
    ENDFORM.                    " GENERATE_SORT
    *&      Form  GRID_DISPLAY
          GRID DISPLAY
    FORM GRID_DISPLAY .
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
    EXPORTING
      I_INTERFACE_CHECK                 = ' '
      I_BYPASSING_BUFFER                = ' '
      I_BUFFER_ACTIVE                   = ' '
       I_CALLBACK_PROGRAM                = V_REPID
      I_CALLBACK_PF_STATUS_SET          = ' '
      I_CALLBACK_USER_COMMAND           = 'IT_USER_COMMAND'
      I_CALLBACK_TOP_OF_PAGE            = ' '
      I_CALLBACK_HTML_TOP_OF_PAGE       = ' '
      I_CALLBACK_HTML_END_OF_LIST       = ' '
      I_STRUCTURE_NAME                  =
      I_BACKGROUND_ID                   = ' '
       I_GRID_TITLE                      = 'Purchase Order Details'
      I_GRID_SETTINGS                   = I_GRID_SETTINGS
       IS_LAYOUT                         = WA_LAYOUT
       IT_FIELDCAT                       = IT_FIELDCAT
      IT_EXCLUDING                      = IT_EXCLUDING
      IT_SPECIAL_GROUPS                 = IT_SPECIAL_GROUPS
       IT_SORT                           = IT_SORT
      IT_FILTER                         = IT_FILTER
      IS_SEL_HIDE                       = IS_SEL_HIDE
      I_DEFAULT                         = 'X'
      I_SAVE                            = ' '
      IS_VARIANT                        = IS_VARIANT
       IT_EVENTS                         = IT_EVENT
      IT_EVENT_EXIT                     = IT_EVENT_EXIT
      IS_PRINT                          = IS_PRINT
      IS_REPREP_ID                      = IS_REPREP_ID
      I_SCREEN_START_COLUMN             = 0
      I_SCREEN_START_LINE               = 0
      I_SCREEN_END_COLUMN               = 0
      I_SCREEN_END_LINE                 = 0
      I_HTML_HEIGHT_TOP                 = 0
      I_HTML_HEIGHT_END                 = 0
      IT_ALV_GRAPHICS                   = IT_ALV_GRAPHICS
      IT_HYPERLINK                      = IT_HYPERLINK
      IT_ADD_FIELDCAT                   = IT_ADD_FIELDCAT
      IT_EXCEPT_QINFO                   = IT_EXCEPT_QINFO
      IR_SALV_FULLSCREEN_ADAPTER        = IR_SALV_FULLSCREEN_ADAPTER
    IMPORTING
      E_EXIT_CAUSED_BY_CALLER           = E_EXIT_CAUSED_BY_CALLER
      ES_EXIT_CAUSED_BY_USER            = ES_EXIT_CAUSED_BY_USER
        TABLES
          T_OUTTAB                          = IT_FINAL
    EXCEPTIONS
       PROGRAM_ERROR                     = 1
       OTHERS                            = 2
      IF SY-SUBRC <> 0.
        MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
                WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    ENDFORM.                    " GRID_DISPLAY
    *&      Form  LIST_DISPLAY
          LIST DISPLAY
    FORM LIST_DISPLAY .
      CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
       EXPORTING
        I_INTERFACE_CHECK              = ' '
        I_BYPASSING_BUFFER             = I_BYPASSING_BUFFER
        I_BUFFER_ACTIVE                = ' '
         I_CALLBACK_PROGRAM             = V_REPID
        I_CALLBACK_PF_STATUS_SET       = ' '
    <b>     I_CALLBACK_USER_COMMAND        = 'IT_USER_COMMAND'</b>
        I_STRUCTURE_NAME               = I_STRUCTURE_NAME
         IS_LAYOUT                      = WA_LAYOUT
         IT_FIELDCAT                    = IT_FIELDCAT
        IT_EXCLUDING                   = IT_EXCLUDING
        IT_SPECIAL_GROUPS              = IT_SPECIAL_GROUPS
         IT_SORT                        = IT_SORT
        IT_FILTER                      = IT_FILTER
        IS_SEL_HIDE                    = IS_SEL_HIDE
        I_DEFAULT                      = 'X'
        I_SAVE                         = ' '
        IS_VARIANT                     = IS_VARIANT
         IT_EVENTS                      = IT_EVENT
        IT_EVENT_EXIT                  = IT_EVENT_EXIT
        IS_PRINT                       = IS_PRINT
        IS_REPREP_ID                   = IS_REPREP_ID
        I_SCREEN_START_COLUMN          = 0
        I_SCREEN_START_LINE            = 0
        I_SCREEN_END_COLUMN            = 0
        I_SCREEN_END_LINE              = 0
        IR_SALV_LIST_ADAPTER           = IR_SALV_LIST_ADAPTER
        IT_EXCEPT_QINFO                = IT_EXCEPT_QINFO
        I_SUPPRESS_EMPTY_DATA          = ABAP_FALSE
      IMPORTING
        E_EXIT_CAUSED_BY_CALLER        = E_EXIT_CAUSED_BY_CALLER
        ES_EXIT_CAUSED_BY_USER         = ES_EXIT_CAUSED_BY_USER
        TABLES
          T_OUTTAB                       = IT_FINAL
       EXCEPTIONS
         PROGRAM_ERROR                  = 1
         OTHERS                         = 2
      IF SY-SUBRC <> 0.
        MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
                WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    ENDFORM.                    " LIST_DISPLAY
    *&      Form  HIERSEQ_DISPLAY
          HIERSEQ DISPLAY
    FORM HIERSEQ_DISPLAY .
      IT_KEYINFO-HEADER01 = 'EBELN'.
      IT_KEYINFO-ITEM01 = 'EBELN'.
      CALL FUNCTION 'REUSE_ALV_HIERSEQ_LIST_DISPLAY'
        EXPORTING
      I_INTERFACE_CHECK              = ' '
         I_CALLBACK_PROGRAM             = V_REPID
      I_CALLBACK_PF_STATUS_SET       = ' '
      I_CALLBACK_USER_COMMAND        = ' '
         IS_LAYOUT                      = WA_LAYOUT
         IT_FIELDCAT                    = IT_FIELDCAT
      IT_EXCLUDING                   = IT_EXCLUDING
      IT_SPECIAL_GROUPS              = IT_SPECIAL_GROUPS
         IT_SORT                        = IT_SORT
      IT_FILTER                      = IT_FILTER
      IS_SEL_HIDE                    = IS_SEL_HIDE
      I_SCREEN_START_COLUMN          = 0
      I_SCREEN_START_LINE            = 0
      I_SCREEN_END_COLUMN            = 0
      I_SCREEN_END_LINE              = 0
      I_DEFAULT                      = 'X'
      I_SAVE                         = ' '
      IS_VARIANT                     = IS_VARIANT
         IT_EVENTS                      = IT_EVENT
      IT_EVENT_EXIT                  = IT_EVENT_EXIT
          I_TABNAME_HEADER               = 'IT_EKKO'
          I_TABNAME_ITEM                 = 'IT_EKPO'
      I_STRUCTURE_NAME_HEADER        = I_STRUCTURE_NAME_HEADER
      I_STRUCTURE_NAME_ITEM          = I_STRUCTURE_NAME_ITEM
          IS_KEYINFO                     = IT_KEYINFO
      IS_PRINT                       = IS_PRINT
      IS_REPREP_ID                   = IS_REPREP_ID
      I_BYPASSING_BUFFER             = I_BYPASSING_BUFFER
      I_BUFFER_ACTIVE                = I_BUFFER_ACTIVE
      IR_SALV_HIERSEQ_ADAPTER        = IR_SALV_HIERSEQ_ADAPTER
      IT_EXCEPT_QINFO                = IT_EXCEPT_QINFO
      I_SUPPRESS_EMPTY_DATA          = ABAP_FALSE
    IMPORTING
      E_EXIT_CAUSED_BY_CALLER        = E_EXIT_CAUSED_BY_CALLER
      ES_EXIT_CAUSED_BY_USER         = ES_EXIT_CAUSED_BY_USER
        TABLES
          T_OUTTAB_HEADER                = IT_EKKO
          T_OUTTAB_ITEM                  = IT_EKPO
       EXCEPTIONS
         PROGRAM_ERROR                  = 1
         OTHERS                         = 2
      IF SY-SUBRC <> 0.
        MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
                WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    ENDFORM.                    " HIERSEQ_DISPLAY
    <b>
    *& Form IT_USER_COMMAND
    text
    FORM IT_USER_COMMAND USING R_UCOMM LIKE SY-UCOMM
                               RS_SELFIELD TYPE SLIS_SELFIELD.
      FREE IT_FIELDCAT.
      CASE R_UCOMM.
        WHEN '&IC1'.
          READ TABLE IT_FINAL INDEX RS_SELFIELD-TABINDEX.
          PERFORM GET_EKBE.
          PERFORM GET_FIELD_CATALOG.
          PERFORM GET_LIST.
      ENDCASE.
    ENDFORM.                               "IT_USER_COMMAND</b>
    *&      Form  GET_EKBE
          text
    FORM GET_EKBE .
      IF NOT IT_FINAL[] IS INITIAL.
        SELECT EBELN
               EBELP
               BELNR
               MENGE
               MATNR
          INTO TABLE IT_EKBE
          FROM EKBE
           FOR ALL ENTRIES IN IT_FINAL
         WHERE EBELN = IT_FINAL-EBELN
           AND EBELP = IT_FINAL-EBELP.
      ENDIF.
    ENDFORM.                    " GET_EKBE
    *&      Form  GET_FIELD_CATALOG
          text
    FORM GET_FIELD_CATALOG .
      WA_FIELDCAT-FIELDNAME = 'EBELN'.
      WA_FIELDCAT-COL_POS = '1'.
      WA_FIELDCAT-JUST = 'R'.
      WA_FIELDCAT-SELTEXT_L = 'PO Number'.
      WA_FIELDCAT-LOWERCASE = 'X'.
      WA_FIELDCAT-DO_SUM = 'X'.
      APPEND WA_FIELDCAT TO IT_FIELDCAT.
      WA_FIELDCAT-FIELDNAME = 'EBELP'.
      WA_FIELDCAT-COL_POS = '2'.
      WA_FIELDCAT-JUST = 'R'.
      WA_FIELDCAT-SELTEXT_L = 'Item Number'.
      WA_FIELDCAT-LOWERCASE = 'X'.
      WA_FIELDCAT-DO_SUM = 'X'.
      APPEND WA_FIELDCAT TO IT_FIELDCAT.
      WA_FIELDCAT-FIELDNAME = 'BELNR'.
      WA_FIELDCAT-COL_POS = '3'.
      WA_FIELDCAT-JUST = 'R'.
      WA_FIELDCAT-SELTEXT_L = 'Material Document'.
      WA_FIELDCAT-LOWERCASE = 'X'.
      WA_FIELDCAT-DO_SUM = 'X'.
      APPEND WA_FIELDCAT TO IT_FIELDCAT.
      WA_FIELDCAT-FIELDNAME = 'MENGE'.
      WA_FIELDCAT-COL_POS = '4'.
      WA_FIELDCAT-JUST = 'R'.
      WA_FIELDCAT-SELTEXT_L = 'Quantity'.
      WA_FIELDCAT-LOWERCASE = 'X'.
      WA_FIELDCAT-DO_SUM = 'X'.
      APPEND WA_FIELDCAT TO IT_FIELDCAT.
      WA_FIELDCAT-FIELDNAME = 'MATNR'.
      WA_FIELDCAT-COL_POS = '5'.
      WA_FIELDCAT-JUST = 'R'.
      WA_FIELDCAT-SELTEXT_L = 'Material Number'.
      WA_FIELDCAT-LOWERCASE = 'X'.
      WA_FIELDCAT-DO_SUM = 'X'.
      APPEND WA_FIELDCAT TO IT_FIELDCAT.
    ENDFORM.                    " GET_FIELD_CATALOG
    *&      Form  get_list
          text
    FORM GET_LIST .
      IF RB1 = 'X'.
        CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
         EXPORTING
        I_INTERFACE_CHECK                 = ' '
        I_BYPASSING_BUFFER                = ' '
        I_BUFFER_ACTIVE                   = ' '
           I_CALLBACK_PROGRAM                = V_REPID
        I_CALLBACK_PF_STATUS_SET          = ' '
        I_CALLBACK_USER_COMMAND           = ' '
        I_CALLBACK_TOP_OF_PAGE            = ' '
        I_CALLBACK_HTML_TOP_OF_PAGE       = ' '
        I_CALLBACK_HTML_END_OF_LIST       = ' '
        I_STRUCTURE_NAME                  = I_STRUCTURE_NAME
        I_BACKGROUND_ID                   = ' '
           I_GRID_TITLE                      = 'SECONDARY LIST'
        I_GRID_SETTINGS                   = I_GRID_SETTINGS
        IS_LAYOUT                         = IS_LAYOUT
           IT_FIELDCAT                       = IT_FIELDCAT
        IT_EXCLUDING                      = IT_EXCLUDING
        IT_SPECIAL_GROUPS                 = IT_SPECIAL_GROUPS
        IT_SORT                           = IT_SORT
        IT_FILTER                         = IT_FILTER
        IS_SEL_HIDE                       = IS_SEL_HIDE
        I_DEFAULT                         = 'X'
        I_SAVE                            = ' '
        IS_VARIANT                        = IS_VARIANT
        IT_EVENTS                         = IT_EVENTS
        IT_EVENT_EXIT                     = IT_EVENT_EXIT
        IS_PRINT                          = IS_PRINT
        IS_REPREP_ID                      = IS_REPREP_ID
        I_SCREEN_START_COLUMN             = 0
        I_SCREEN_START_LINE               = 0
        I_SCREEN_END_COLUMN               = 0
        I_SCREEN_END_LINE                 = 0
        I_HTML_HEIGHT_TOP                 = 0
        I_HTML_HEIGHT_END                 = 0
        IT_ALV_GRAPHICS                   = IT_ALV_GRAPHICS
        IT_HYPERLINK                      = IT_HYPERLINK
        IT_ADD_FIELDCAT                   = IT_ADD_FIELDCAT
        IT_EXCEPT_QINFO                   = IT_EXCEPT_QINFO
        IR_SALV_FULLSCREEN_ADAPTER        = IR_SALV_FULLSCREEN_ADAPTER
      IMPORTING
        E_EXIT_CAUSED_BY_CALLER           = E_EXIT_CAUSED_BY_CALLER
        ES_EXIT_CAUSED_BY_USER            = ES_EXIT_CAUSED_BY_USER
          TABLES
            T_OUTTAB                          = IT_EKBE
         EXCEPTIONS
           PROGRAM_ERROR                     = 1
           OTHERS                            = 2
        IF SY-SUBRC <> 0.
          MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
                  WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
        ENDIF.
      ENDIF.
      IF RB2 = 'X'.
        CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
         EXPORTING
      I_INTERFACE_CHECK              = ' '
      I_BYPASSING_BUFFER             = I_BYPASSING_BUFFER
      I_BUFFER_ACTIVE                = ' '
           I_CALLBACK_PROGRAM             = V_REPID
      I_CALLBACK_PF_STATUS_SET       = ' '
      I_CALLBACK_USER_COMMAND        = ' '
      I_STRUCTURE_NAME               = I_STRUCTURE_NAME
      IS_LAYOUT                      = IS_LAYOUT
           IT_FIELDCAT                    = IT_FIELDCAT
      IT_EXCLUDING                   = IT_EXCLUDING
      IT_SPECIAL_GROUPS              = IT_SPECIAL_GROUPS
      IT_SORT                        = IT_SORT
      IT_FILTER                      = IT_FILTER
      IS_SEL_HIDE                    = IS_SEL_HIDE
      I_DEFAULT                      = 'X'
      I_SAVE                         = ' '
      IS_VARIANT                     = IS_VARIANT
      IT_EVENTS                      = IT_EVENTS
      IT_EVENT_EXIT                  = IT_EVENT_EXIT
      IS_PRINT                       = IS_PRINT
      IS_REPREP_ID                   = IS_REPREP_ID
      I_SCREEN_START_COLUMN          = 0
      I_SCREEN_START_LINE            = 0
      I_SCREEN_END_COLUMN            = 0
      I_SCREEN_END_LINE              = 0
      IR_SALV_LIST_ADAPTER           = IR_SALV_LIST_ADAPTER
      IT_EXCEPT_QINFO                = IT_EXCEPT_QINFO
      I_SUPPRESS_EMPTY_DATA          = ABAP_FALSE
    IMPORTING
      E_EXIT_CAUSED_BY_CALLER        = E_EXIT_CAUSED_BY_CALLER
      ES_EXIT_CAUSED_BY_USER         = ES_EXIT_CAUSED_BY_USER
          TABLES
            T_OUTTAB                       = IT_EKBE
         EXCEPTIONS
           PROGRAM_ERROR                  = 1
           OTHERS                         = 2
        IF SY-SUBRC <> 0.
          MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
                  WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
        ENDIF.
      ENDIF.
    ENDFORM.                    " get_list
    Thanks
    Vikranth Khimavath
    Message was edited by:
            Khimavath Vikranth

  • Double click and get and store the value in variable.

    Hi,
    My intention is when i double click a particular record on a tabular, i want to capture or store the particular value of record into a variable and call that variable in print/preview button PLSQL code.
    Below i show the screenshot which contain a tabular and print preview button. After populating the data. the user will double click on the agent code LC354 and click the print/preview button it should display report for only the
    agent code of LC354(this is what i want). But normally when i click the print preview button it wil show the report of agent code of LC354 and LC325(this what i dont want).
    http://imageshack.us/photo/my-images/811/printpb.png/
    My problem is how to capture the value((*LC354*)) of particular record after double click the agent code(*LC354*)?
    i tried to store agent code in variable AG_CNT in mouse double click trigger with following plsql code. but it dosent work.
    declare
    AG_CNT varchar2(10);
    begin
    *AG_CNT* :=GET_ITEM_PROPERTY('RFQ_AGENT_DETAILS.AGENT_CODE',CURRENT_RECORD);
    end;after that pass that AG_CNT value in *:AG_CODE*. below code is in print/preview button.
         cursor c1 is select nvl(count(ENQUIRY_NO),0) from scott.EXP_QUOTE_STATUS
         where ltrim(rtrim(upper(job_status))) like 'APPROVED%' and ENQUIRY_NO = :REQ_FOR_QUOT.ENQUIRY_NO
    AND AGENT_CODE=*:AG_CODE* ;how to do this?
    skud.

    Hi skud
    i juast want to store the agent code to variable.if i did get ur point...
    Why don't u just use a simple assign statment for example...
    DECLARE
    V_VALUE  NUMBER;
    BEGIN
    V_VALUE := LC354 ; -- IF it was a value as LC354 static i mean
    -- or u could use any value
    V_VALUE := :ur_form_item_name; --- if it was dynamic
    END;That's it .
    Hope this helps...
    Regards,
    Ammatu Allah.

  • How to print/post double-quotes on reportserver

    Hi, I am using rwservlet and cannot send double quotes. I can escape single quotes with another single quote, but double doublequotes do not work. I have tried url-encoding and html encoding, and even their combination, but report server just refuses to generate the PDF with a string with a double quote.
    this is my URL:
    http://rs-server:7778/reports/rwservlet?cmdkey&report=somereport.jsp&desformat=pdf&TESTSTRING=aaaaaaaa&destype=cache&ACTUSER=19
    now I would need in TESTSTRING to have double quotes
    PS: tried BI Oracle Business Intelligence 10g (10.1.2) and forms and reports 10g

    PostScript printer - send it to the printer port e.g. LPT1: with a simple copy.
    Non-PostScript printer - you'll need to buy a PostScript RIP, or perhaps use Acrobat Distiller to convert the PostScript to PDF, then print the PDF with Acrobat's API - see the Acrobat SDK. (This is not possible with the free Reader).

  • When i double click itunes it doesn't open it just comes up with an error saying " The itunes library.itl file cannot be found or created. The default location for this file is in the 'itunes' folder in the 'music' folder". How can i fix this?

    When i double click itunes it doesn't open it just comes up with an error saying " The itunes library.itl file cannot be found or created. The default location for this file is in the 'itunes' folder in the 'music' folder. How can i fix this problem?

    Anyone can help to advice how to solve this issue ?

  • Double clicking on a region to open it no longer works...

    After installing OS 10.8.2 I have problems with Logic 9.1.8. If I double click on a region in the Arrange window, it used to open on the lower part of the Arrange window so I could edit notes, velocity settings etc. Now, when double-clicking, the lower part opens for very short time (0,1 second) and then disappears. I have deleted prefs files, restarted the iMac etc., but nothing helps. - What should i do? Is there any other way to open a region in the lower part of the Arrange window?
    I just discovered that I have the same problem when double clicking on instruments. They open for a very short while (0,2 sec) and then close. This means that I can't adjust parameters in the pop-up window (instrument, filter etc.). Very strange. I remember I had this problem some weeks ago, but it disappeared. Not now.

    A few ideas..
    Have you checked your mouse/trackpad settings in System Preferences.... in case something got messed up there... as it sounds like an input device issue in some ways
    Also, check Logic Preferences/General/Editing and make sure that Double Clicking a Midi region Opens... is set to Piano Roll (Even if it is.. try unchecking it.. close prefs.. and recheck it again..)
    Finally, you said you had trashed the pref files.. which one(s) did you trash? Did you also trash the CS one too.. as it could be related to a control surface issue.. I mention this because a client of mine had an issue after installing an iPad Controller for Logic...  If you have an iPad/iPhone.. make sure the iPad/iPhone is powered off (Not just asleep) and test after that too...

  • InDesign crashes every time you double click to open an .indd file on Windows system

    InDesign crashes every single time you double click to open an InDesign file and has done so since replacement of the original version of InDesign introduced in the Creative Cloud launch.  Does anyone else have this problem?  I'd say it was unique to my system if I hadn't experienced the issue repeatedly on several different systems now.  You have to relaunch InDesign which then opens the file from recovery, so it saw the file you tried to launch in the first place.  This leads me to believe the problem lies with the file association registry of InDesign inside Windows systems.  I find it unbelievable that this problem still exists and remains unreported and that a solution hasn't been implemented by Adobe to rectify the issue.
    The double click is a fundamental tenant of opening files on a Windows system in the same way a single click is on a Mac.  Does InDesign crash ever time a Mac user clicks to open their files, I think not.
    Anyone got any ideas other than the obvious which is Adobe actually got their figure out and fixed it.
    Cheers,
    Pat Doyle

    Hi Michael,
    I'll give it a go.  Don't really like messing with the registry on Windows boxes.  Yes you can do it, but it can end up being a case of the operation was a success, but the patient died.
    Just was rather hoping someone else had already experienced this problem and posted the registry tweak.  Didn't want spend hours reinventing the wheel.  Not because I'm lazy, but I have so many demands on my time that resolving a minor issue that effects me only seems like it should be pretty low priority.
    The system I'm using is brand new, but the problem seems to have followed me regardless which may indicate that it is seated in my synchronization information somehow.  Really don't know how that could happen as I'm not an Adobe engineer or have the remotest idea where to even start looking.  So I think I'll mark your suggestion as the "Answer" and just learn to live with it.
    Windows eh! Can't live with - can't live without it.  I'm sure Mac can be just as temperamental. Just have to chalk this one up as being just another ghost in the machine.
    Thanks for all the advice you have kindly offered, much appreciated.
    Cheers,
    Pat Doyle

Maybe you are looking for

  • Restrict User Access to Planning Books- Creation of Roles

    Hi All I want to restrict the users to access/see only limited number of planning books in SDP94 menu For this, I tried creating a role and assigned authorization C_APO_PB with required planning book values However I am not sure how to create the rol

  • SAP SD- ABAP-  Package

    Hi Everyone. This question is more specific to SD- ABAP. I have a small doubt. When saving tables (v/03) SAP asks for packages. If we are aware of the package, we can give it. However, at times I have found it blank. How we can come to know which pac

  • Indesign wont print duplex booklet

    im having an issue printing duplex booklet straight out of indesign i have enabled two sided printing on my BROTHER MFC-J6510DW printer dialogue, but when you send it, it doesn't print duplex. for now i have had to add a PPD patch file so i can print

  • Account Name on Devices Not Matching in iCloud

    In iTunes I went to Account>iTunes in the Cloud>Manage Devices.  I noticed that the names for our iPhones are merely "iPhone".  (e.g., "John iPhone 5" is listed as "iPhone (iPhone)" in Manage Devices.)  The only way I can tell in Manage Devices which

  • HT1380 I have an Ipod universal dock, but now need adapters. how can I order 16 to 20 adapters only?

    1. I have an Ipod universal dock, but now need adapters. how can I order 16 to 20 adapters only? 2. Does apple has a lead which has iphone pin on one end and HDMI on the other so that I can connect my universal apple dock to my BOSE V-30 for better s