2's complement of double

Hello,
I need to convert a signed double to a two's complement hex string that is 4 bytes long. How do I go about doing this?
Thanks.

msimone wrote:
I will try those. But honestly this was the quickest way for me to get it into the format that the hardware will accept. How do I take a negative number and get a two's complement of it? 
Thanks
Two's complement is a format. It's a way of storing values. You're not converting anything. Numbers are already stored in two's complement format, so you do not need to do anything.
Perhaps you should read up on two's complement: http://en.wikipedia.org/wiki/Two%27s_complement#Ca​lculating_two.27s_complement
Attachments:
two's complement.png ‏12 KB

Similar Messages

  • JAVA arithmetic problem with double ?

    If I try to work double precision numbers I get a unintelligible result, but what do I do wrong ?
    Are there any inaccuracy in the JAVA double precision numbers arithmetic or what's the problem with this very simple example code ? How can I get correct result ?
    Simple example code :
    ================
    for (double i = 0; i < 10; i = i + 0.01)
    System.out.println(i);
    On the output :
    ===========
    0.0
    0.01
    0.02
    0.03
    0.04
    0.05
    0.060000000000000005
    0.07
    0.08
    0.09
    0.09999999999999999
    0.10999999999999999
    0.11999999999999998
    0.12999999999999998
    0.13999999999999999
    0.15
    0.16
    0.17
    0.18000000000000002
    0.19000000000000003
    0.20000000000000004
    0.21000000000000005
    0.22000000000000006
    0.23000000000000007
    0.24000000000000007
    0.25000000000000006
    0.26000000000000006
    0.2700000000000001
    0.2800000000000001
    0.2900000000000001
    0.3000000000000001
    0.3100000000000001
    0.3200000000000001
    0.3300000000000001
    0.34000000000000014
    0.35000000000000014
    0.36000000000000015
    0.37000000000000016
    0.38000000000000017
    0.3900000000000002
    0.4000000000000002
    0.4100000000000002
    0.4200000000000002
    0.4300000000000002
    0.4400000000000002
    0.45000000000000023
    0.46000000000000024
    0.47000000000000025
    0.48000000000000026
    0.49000000000000027
    0.5000000000000002
    0.5100000000000002
    0.5200000000000002
    0.5300000000000002
    0.5400000000000003
    0.5500000000000003
    0.5600000000000003
    0.5700000000000003
    0.5800000000000003
    0.5900000000000003
    0.6000000000000003
    0.6100000000000003
    0.6200000000000003
    0.6300000000000003
    0.6400000000000003
    0.6500000000000004
    0.6600000000000004
    0.6700000000000004
    0.6800000000000004
    0.6900000000000004
    0.7000000000000004
    0.7100000000000004
    0.7200000000000004
    0.7300000000000004
    0.7400000000000004
    0.7500000000000004
    0.7600000000000005
    0.7700000000000005
    0.7800000000000005
    0.7900000000000005
    0.8000000000000005
    0.8100000000000005
    0.8200000000000005
    0.8300000000000005
    0.8400000000000005
    0.8500000000000005
    0.8600000000000005
    0.8700000000000006
    0.8800000000000006
    0.8900000000000006
    0.9000000000000006
    0.9100000000000006
    0.9200000000000006
    0.9300000000000006
    0.9400000000000006
    0.9500000000000006
    0.9600000000000006
    0.9700000000000006
    0.9800000000000006
    0.9900000000000007
    1.0000000000000007
    1.0100000000000007
    1.0200000000000007
    1.0300000000000007
    1.0400000000000007
    1.0500000000000007
    1.0600000000000007
    1.0700000000000007
    1.0800000000000007
    1.0900000000000007
    1.1000000000000008
    1.1100000000000008
    1.1200000000000008
    1.1300000000000008
    1.1400000000000008
    1.1500000000000008
    1.1600000000000008
    1.1700000000000008
    1.1800000000000008
    1.1900000000000008
    1.2000000000000008
    1.2100000000000009
    1.2200000000000009
    1.2300000000000009
    1.2400000000000009
    1.2500000000000009
    1.260000000000001
    1.270000000000001
    1.280000000000001
    1.290000000000001
    1.300000000000001
    1.310000000000001
    1.320000000000001
    1.330000000000001
    1.340000000000001
    1.350000000000001
    1.360000000000001
    1.370000000000001
    1.380000000000001
    1.390000000000001
    1.400000000000001
    1.410000000000001
    1.420000000000001
    1.430000000000001
    1.440000000000001
    1.450000000000001
    1.460000000000001
    1.470000000000001
    1.480000000000001
    1.490000000000001
    1.500000000000001
    1.5100000000000011
    1.5200000000000011
    1.5300000000000011
    1.5400000000000011
    1.5500000000000012
    1.5600000000000012
    1.5700000000000012
    1.5800000000000012
    1.5900000000000012
    1.6000000000000012
    1.6100000000000012
    1.6200000000000012
    1.6300000000000012
    1.6400000000000012
    1.6500000000000012
    1.6600000000000013
    1.6700000000000013
    1.6800000000000013
    1.6900000000000013
    1.7000000000000013
    1.7100000000000013
    1.7200000000000013
    1.7300000000000013
    1.7400000000000013
    1.7500000000000013
    1.7600000000000013
    1.7700000000000014
    1.7800000000000014
    1.7900000000000014
    1.8000000000000014
    1.8100000000000014
    1.8200000000000014
    1.8300000000000014
    1.8400000000000014
    1.8500000000000014
    1.8600000000000014
    1.8700000000000014
    1.8800000000000014
    1.8900000000000015
    1.9000000000000015
    1.9100000000000015
    1.9200000000000015
    1.9300000000000015
    1.9400000000000015
    1.9500000000000015
    1.9600000000000015
    1.9700000000000015
    1.9800000000000015
    1.9900000000000015
    2.0000000000000013
    2.010000000000001
    2.020000000000001
    2.0300000000000007
    2.0400000000000005
    2.0500000000000003
    Thanks for answerers !
    Joseph

    This result is entirely unsurprising, and the flaw lies in your program, not in Java.
    Java represents numbers in 2's complement [SEM] form (read the Java Language Specification (JLS), according to agreed standards. When you specify a fractional number that appears to be nice and easy to work with, you are thinking in decimal notation, not binary, and you are giving it a number that cannot be precisely represented. It is a little like asking you to write down exactly what pi is (all its digits ;-)).
    So the number you get is not precisely what you asked for (one very insignificant error). But then you compound it by adding an inaccurately represented number to an inaccurately represented number, and so on, until the bit errors combine to make a very inaccurate number.
    The correct way to approach what you are trying to do would be to perform the addition using integers, and multiply each time you want to scale it to a double.
    This has been asked many times - I would suggest you:
    - Search the forums
    - Check out the language spec
    - or do a degree in CompSci :-)
    A calculator is a little more accurate because it does not have to conform to agreed standards, and so can use special logic to minimise such errors. The average pocket calulator also works to a much lower level of accuracy (usu 8 digits), and therefore masks the errors to you. You'd find that you got the same effect if you played with it long enough.
    Hope this helps

  • Howto when i have very very large double array

    I have code my program about document retrieval.
    I create double array in size [10000]x[8000] for keep value for calculte someting in only memory (about metrix operation).
    I have set parameter to heap memory size at 1024m but it not enough, it has exception out of memory.
    I use Notebook that have RAM 1G. Is this cause for exception?
    Please help me to lead solution for my case.
    Thank you.

    anurag.kapur wrote:
    A couple of points:
    1. Your notebook has 1 GB of RAM and you are allocating 1024 MB (=1 GB) to the JVM heap, which is not possible, as you need some space for running various other Operating System processes as well.This is a good point. There are also things in the JVM itself other than the Java object heap that need space. Thread stacks, loaded classes, native libraries, etc.
    2. Why have you allocated 1024 MB to the JVM heap? Did you choose any random number (obviously with some degree of educated guess)?
    Your array size is 10000 * 8000 = 8 * 10^7
    Thus total heap memory required = 8 * 10^7 * 4 Bytes [The int data type is a 32-bit signed two's complement integer]
    = 320 * 10^6 Bytes
    = 320 MBExcept that peterdog1234 said that the array was an array of doubles, at 8 bytes each, so about 640MB are needed for the array. If the algorithms allow the loss of range and precision, maybe the array could be an array of floats, not doubles. That would keep the array in about 320MB. That would help with the space requirements, but might be slower as all the operations will have to expand the floats to be operated on as doubles, then converted back to floats for storage in the array. But on some architectures that's not too bad.
    I would use -XX:+PrintGCDetails to see how the heap has been partitioned into young generation (fast allocation and collection) and old generation (relatively long-lived data). You might have to reshape the heap to have at least 640MB in the old generation, and then whatever you can fit as the young generation, leaving some of your 1GB for the rest of the JVM, other programs running on the box, the operating system, etc. Maybe "-Xms768m -Xmx768m -XX:NewSize=64m -XX:MaxNewSize=64m" would be a good compromise. That gives you a 768MB Java object heap, with 64MB in the young generation and 704MB in the old generation, leaving 256MB (1GB-768MB) for "other things". Whether that works depends on now many other long-lived Java objects you have. But -XX:+PrintGCDetails will tell you that, too.

  • Une annonce à défilement horizontal se présente maintenant avec un double défilement horizontal ET vertical, ce qui en empêche la lecture..site concerné: www .educaval.forum-pro.fr

    depuis la dernière mise à jour de firefox, un problème apparait sur un forum personnel.

    I'm not sure that I understand how you see that scrolling text on that page.<br />
    Do you see that text double on two lines?
    Can you attach a [http://en.wikipedia.org/wiki/Screenshot screenshot]?
    Use a compressed image type like PNG or JPG to save the screenshot and make sure that you do not exceed the maximum file size (1 MB).<br />
    Make sure that you choose an unique name for the image to avoid problems with an already existing image with the same name.
    Clear the cache and remove the cookies from websites that cause problems<br />
    Outils > Options > Avancé > Réseau > Cache > Vider le cache maintenant<br />
    Outils > Options > Vie privée > Cookies > Afficher les cookies<br />
    Start Firefox in [[Safe Mode]] to check if one of your add-ons is causing your problem (switch to the DEFAULT theme: Outils > Modules Complémentaires).
    See [[Troubleshooting extensions and themes]] and [[Troubleshooting plugins]]

  • Cuevana extension problem, doesn't appear complements in preferences

    Everytime I open Firefox appear a window that says: cuevanatv.asia, I have read blogs where say that I have to delete cuevana extension but in preference doesn't appear the tab of complements.
    I also can't open Firefox in safe mode because when I try to open help appears again the tab of cuevanatv.asia.
    I already delete Firefox and installed again but that doesn't work.

    You can use one of these to start Firefox in <u>Safe Mode</u>:
    *On Windows, hold down the Shift key while starting Firefox with a double-click on the Firefox desktop shortcut
    *On Mac, hold down the Options key while starting Firefox
    *Help > Restart with Add-ons Disabled
    *https://support.mozilla.org/kb/Safe+Mode
    Create a new profile as a test to check if your current profile is causing the problems.
    See "Creating a profile":
    *https://support.mozilla.org/kb/profile-manager-create-and-remove-firefox-profiles
    *http://kb.mozillazine.org/Standard_diagnostic_-_Firefox#Profile_issues
    If the new profile works then you can transfer some files from an existing profile to the new profile, but be careful not to copy corrupted files.
    *http://kb.mozillazine.org/Transferring_data_to_a_new_profile_-_Firefox

  • FA complète + FA épurée

    Bonjour,
    Je suis en train de développer une interface qui devra être affichée sur deux écrans de PC de la manière suivante :
    - un premier écran affichera l'interface complète, à des fins de tests et maintenance ;
    - un deuxième écran affichera une interface similaire mais épurée de toutes les commandes et indicateurs qui ne sont pas utiles pour l'utilisation de base de l'IHM.
    Par exemple :
    - le bouton "Stop Application" se retrouvera sur l'interface complète ET sur l'interface déportée ;
    - le bouton "Start Test" se trouvera uniquement sur l'interface complète et ne devra pas être visible dans l'interface déportée.
    Ce que je voudrais éviter, c'est dédoubler les commandes et indicateurs (ça ne sert à rien d'avoir 2 boutons "Stop Application") pour ne pas surcharger le diagramme.
    J'ai pensé à une solution toute simple : customiser chaque commande qui doit être déportée, en dédoublant l'image du bouton de sorte à ce qu'elle apparaisse 2 fois sur la face-avant, mais 1 fois sur l'écran principal et 1 fois sur l'écran déporté.
    J'aimerais savoir si c'est le meilleur moyen de faire cela, ou s'il y a un autre moyen de "déporter" ou "doubler" la FA, sans doubler le diagramme ?
    Merci de vos retours,
    Cordialement,
    cecileAiro
    Solved!
    Go to Solution.

    Non au contraire Cécile,
    Les FGV (functional Global variable) sont selon moi bien meilleur car elles vous permettent de créer un moteur d'action (code dans chaque état) et aussi d'éviter les situations de compétition.
    Cependant dans votre cas il suffit de récupérer la référence d'un clone. Etant donné que c'est juste de la lecture, une variable globale suffit amplement.
    Pour être sûr que l'on se synchronise sur le terme de FGV voici deux liens:
    http://forums.ni.com/t5/LabVIEW/Community-Nugget-4​-08-2007-Action-Engines/td-p/503801
    http://www.ni.com/white-paper/7517/en
    et le meilleur pour la fin:  http://zone.ni.com/devzone/cda/epd/p/id/6375
    Cordialement,
    http://forums.ni.com/t5/LabVIEW/Community-Nugget-4​-08-2007-Action-Engines/td-p/503801
    Romain DUVAL || Application Engineer Specialist ||Certified LabVIEW Architect (CLA) || Certified TestStand Architect (CTA)
    National Instruments France

  • 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

  • INVOICE AND PURCHASE ORDER

    What is difference in fields between invoice and purchase order ?

  • Multiple text boxes on slide not advancing properly

    First let me say that this is my very first post - ever - anywhere.  I don't even know if I'm 'posting' correctly, so please forgive me if I'm doing this wrong.  I am brand new to Captivate (1 week), but am already under a work deadline to produce a

  • XSLT construct "for each" not working in transformation

    Hi everyone I am using for each inside a transformation it was working fine until added parameters.After included parameters "for each" is not happening the db is invoked only once even if there are muliple nodes. can anyone help me on this issue. Ho

  • Time code

    Hello all, Is there a way to get linear TC or SMPTE into logic, as in thru an audio track, so that it will use that in it's BWAV timestamp, without using a MTC syncronizer? The Motu 828MKII has a TC in, and DP will sync to LTC or SMPTE, but can't fin

  • Two charges were made for in-app purchase

    Hi, this has happened two time in the course of 1 month. I've made two in-app purchases from two different apps throughout the month. And both times, i was charged twice the amount of the price of the item, here's the story.. LINE app 800 coins - a m