Example -- double-click to rotate shape 36 degrees

This is my first attempt to cause Visio to handle double-click on a shape.
I need to rotate the shape 36 degrees each time it's double-clicked.
Here's what I have right now:
Enable developer tab in ribbon
Select shape
in developer tab, click "Show ShapeSheet"
In ShapeSheet, enable "Events" box to show
For "EventDblClick", enter the formula to handle double-clicks
Formula I'm trying:
=SETF(GetRef(Angle),MODULUS(GetVal(Angle)+36,360))
Result when I double-click:
"Shape protection, container, and/or layer properties prevent complete execution of this command."
However, I couldn't find any protection being applied to this shape.  Ideas or suggestions?  Pointers to existing solutions and walkthroughs welcome. 
My goal: Create a specific shape which rotates by 36 degrees on each double-click, and export it as a stencil.
10 years Windows storage drivers | Microsoft Patent Attorney | LCA - Patents | Microsoft (not giving legal advice)

I eventually discovered the problem.  It was a mistake of a someone new to this.  Here's the correct formula, which works quite well:
=SETF(GetRef(Angle),ANG360(GetVal(Angle)+RAD(36)))
In a nutshell, I was confused because the display in the datasheet showed the value in degrees, even though it appears to have required the value in radians.
Live and learn!
10 years Windows storage drivers | Microsoft Patent Attorney | LCA - Patents | Microsoft (not giving legal advice)

Similar Messages

  • Double clicking on an email header opens in a tab with the email reference but the header of a totally different email, the body of the email is blank, how fix?

    Emails sitting in my inbox for a few days no longer open normally. Double clicking on them opens a tab referring to the header of the clicked email but below is a header and details from a totally different email and the body of the email is blank. For example double clicking an email from Tesco results in 'Tesco' displaying in the tab but the header below shows 'From: TalkTalk'
    Clicking 'Options' and selecting 'Show remote content' does not overcome the problem.
    Incoming emails open normally when they first come in.
    This peculiarity seemed to apply only to a few emails at first but it is now becoming general.
    Uninstalling and reinstalling Thunderbird (ver 31.6) and the problem remains. O/S is Windows 7
    How can I overcome this?

    Right click the problem folder and select Properties. Then Repair Folder. You may lose messages if the corruption is too bad.
    Then read this article on maintaining your email.
    http://kb.mozillazine.org/Keep_it_working_%28Thunderbird%29

  • Opening humantask in BPM WorkSpace with double click runs 2 instances

    Hello BPM experts,
    I have this standard scenario:
    User opens a task by double clicking on a task row in BPM Workspace task list. Then the task is opened both in popup and in the worspace window (below the task list table).
    My question is how can I make workspace open only 1 form instance?
    Example:
    -double click would open only popup with form in it (no task is opened under the worklist)
    -single click would open only form in bpm workspace window (as it is now)
    Any ideas and help is appreciated!

    Hi,
    Why do you double click on it??
    Anyway that is the way it is..
    I thought it is opening two different windows.
    just click once and you should be able to see only in the bottom part of the same window.
    If you double click it will open another window and it will show in the bottom part also.
    Hope helps ...
    Thanks,
    nir

  • I cannot unlock my screen rotation . I double clicked the home button but no amount of swiping left to right brings up the media control screen,  I have a 4s

    I cannot unlock my screen rotation.  I double clicked on the home button but no amount of swiping left to right brings up a media control screen .  Help!!!

    Make sure that Control Center is enabled. Settings>Control Center. Then, swipe up from the bottom of the screen to access various settings, including Rotation lock.

  • Why won't a cursor show up in the shape when I double click it?

    I thought you could just double click the shape to type in it...The cursor shows up outside the shape in the main part of the document or it highlights unrelated text from a text box, but it won't put a cursor in the shape.  After trying 50 times, I will finally get the cursor in the box. 

    PeterBreis0807 wrote:
    For every vague question, there is a vague answer.
    --> Fair enough
    What version of Pages?
    --> v. 4.3
    What shape?
    --> any shape, square, rounded corner square, circle, arrow...
    Inline or floating?
    --> etried both modes, but want floating
    Do you have an image in the shape?
    --> empty shape, want text
    What else is on the page?
    --> 3 text boxes, ea sized to fit 2 words
    Do you have a screen grab?
    --> prefer not to post pic, but it is basically default shapes colored white and made ~2x3" with plain text inside, dragged into rows where text boxes are titles.
    Anyway, there is really nothing out of the ordinary with the doc.  When Pages Help says "Double click the shape and type the text you want," it does not work to just double click in the middle of the shape, like I would guess.  I had to double click near the edge of the shape.

  • I cannot unlock the screen rotation of my iPhone 5. I double click on bottom button, slides to right, but sliding to left doesn't show the rotation icon

    I cannot unlock the screen rotation of my iPhone 5. I double click on bottom button, recently used icons appear. It slides to the right, but sliding to left doesn't show the rotation icon.

    You swipe up from the very bottom of your home screen to access the control center - if your on IOS 7
    The way your trying was the old way.

  • Double-clicking a transparent vector shape pretends like it's going to let you change the fill type

    One thing that's irritating/confusing/non-intuitive about the new vector layers is that, if your vector layer has no fill, then double-clicking on the layer will bring up the controls for whatever type of fill you had before changing it to "no fill". That part is a bit confusing, but not too bad. The bigger problem is that, if you then try to change the fill from those controls, the vector shape remains unchanged after you click OK. So in other words, if my vector shape currently has no fill, and I double click it and select a new color from the color picker, obviously I want the shape to have that new color when I click OK, but instead nothing happens.
    For those who like to answer questions that were not asked , I am aware that you can (finally!) change the fill type by clicking the appropriate fill button in the Options bar. I'm not talking about that right now.
    I think the option to change the type of fill should be available in the color picker window, the gradient fill window, and the pattern fill window, so you can switch fill types on the fly.

    Thanks for the feedback.
    The best (and recommended) way to change the fill of a shape layer is to use the option bar panels for the vector tools. These are going to give you the best up-to-date shape layer controls.
    But we left in the legacy behavior of double-clicking on the layer thumbnail to change the fill options as a way of easing the transition to the new shape layers. We didn't make any changes to these dialogs or their overall behavior, which is why they don't allow you to change the fill type and why the layer appearance doesn't update if the fill is set to None in the options bar.

  • My new iphone 5 screen does not rotate from portrait to landscape.  It is stuck in portrait.  I checked and its not locked (double clicked home button scrolled over and the circle arrow does NOT  have lock inside it).

    My screen refuses to rotate (the home screen).  I already double clicked home button and scrolled over, the circle arrow does NOT have the lock inside it.  I went thru all the settings and can find nothing to try and fix this.  Do I need to send the phone back?  Is it broken?  I just got it yesterday.  It has not been damaged in any way.  Please help.

    |rob| wrote:
    taramdunn wrote:
    My screen refuses to rotate (the home screen).
    The home screen doesn't rotate to landscape mode.  Only apps do.
    Good eye Rob, I didn't even catch that.

  • Example of creating  ALV double click event that can be used in ANY Program

    Once you get the hang of OO you can really create useful generalized code that can be used in a huge number of situtations.
    Double click on ALV is often wanted
    Right  here goes to implement a generalized double click action that returns the row, column and column name back to the caller.
    In your CLASS  in the DEFINITION part code as follows.
    CLASS zcl_dog DEFINITION.
    PUBLIC SECTION.
    METHODS:
      constructor
          IMPORTING       z_object type ref to zcl_dog,
                         i_parent     type ref to  cl_gui_custom_container,
    PRIVATE SECTION.
    on_dubbelklik FOR EVENT double_click OF cl_gui_alv_grid
          IMPORTING e_row
                    e_column
                    es_row_no,
    dubbleklik
          IMPORTING
                     e_row  type  LVC_S_ROW
                     e_column   TYPE LVC_S_COL
                     es_row_no  type lvc_s_ROID
                     program type sy-repid.
    code here any extra any methods you need.
    In the CONSTRUCTOR method of the implementation
    CLASS zcl_dog IMPLEMENTATION.
    METHOD constructor.
       CREATE OBJECT grid_container1
           EXPORTING
                   container_name = 'CCONTAINER1'.
        CREATE OBJECT  grid1
            EXPORTING
                  i_parent = grid_container1.
        SET HANDLER z_object->on_user_command for grid1.
        SET HANDLER z_object->on_toolbar for grid1.
        SET HANDLER Z_OBJECT->handle_data_changed_finished FOR grid1.
        SET HANDLER Z_OBJECT->on_dubbelklik FOR grid1.
    endmethod.
    METHOD on_dubbelklik.
    CALL METHOD me->dubbleklik
    exporting
                     e_row  = e_row
                     e_column =  e_column
                     es_row_no = es_row_no
                     program  = sy-repid.
    break-point 1.
    method dubbleklik.
      perform dubbleklik IN PROGRAM (program)
        using
        e_row
        e_column
        es_row_no.
      ENDMETHOD.
    endclass.
    This will now perform a routine called dubbleklik  in your application program whenever you double click a cell in the grid.
    In the application program just code the following
    DATA:  z_object type ref to zcl_dog,  "Instantiate our class
           grid_container1 type ref to cl_gui_custom_container,
    CREATE OBJECT z_object EXPORTING z_object = z_object.
    call ANY method in the class  which eventually displays the grid
    CALL METHOD z_object->build_dynamic_structures
            CHANGING it_fldcat = it_fldcat.
    form dubbleklik using
            e_row   type LVC_S_ROW
            e_column type LVC_S_col
            es_row_no type lvc_s_roid.
    break-point 1.
    endform.
    When you double click a cell you'should be at the break point in your routine in the application program.
    You've got the cell that was clicked so by reading your table you can examine the data and take the appropriate action.
    Cheers
    Jimbo

    I suggest you purchase a case and have a dedicated support engineer work with you directly:
    http://www.sdn.sap.com/irj/boc/gettingstarted
    Or
    http://store.businessobjects.com/store/bobjects/Content/pbPage.CSC_map_countyselector/pgm.67024400?resid=jFmmLgoBAlcAAALO-iYAAAAP&rests=1278687224728
    If this is a bug you'll get a refund, if not post your enhancement request in the Idea Place. Or the Rep will suggest a better way to create your report.

  • When I double click on a photo in Photoshop 10, Organizer, it is replaced by another photo.

    I am using a free downloaded trial version of Adobe Photoshop Elements 10 on my new computer with Windows 7.  Not every time, but often enough, when I double click on a photo in the catalog, it will replace that photo with another photo.  Then I have to search all over to find the original photo.  Additionally, I was in an album and right clicked on a photo, then asked that it be rotated 90 degrees right, and instead the photo was replaced by another photo.  I've been through my entire catalog twice and cannot find the original photo.  Now, as I page down through the photos, it seems to be mixing in different photos about every other photo. 
    Am I doing something wrong? 
    Is this a Windows 7 issue?
    I realize I'm just using a trial version and that this problem may not exist in the real thing (if indeed it's a problem and not a user issue), but if I can't get the trial to work any better than this, I will not be purchasing the actual version. 
    Any help?

    I don't know what happened but as soon as I posted this request for help it immediately is working fine.  Thanks whatever.

  • Problem in moving Rotated Shape object

    Hi All,
    I want to move the rotated shape object based on the mouse movement
    m able to move the object which is not rotated, but m facing the problem when i move the rotated object its moving position is not correct . I am expecting to maintain both shape objects movement is same, i mean if i did mouse movement to right rotated object moves upwards and normal object moves towards right insted of moving both r moving towards to right.
    Pls help me
    the following code is m using to moving the object
    The one which in red color is not rotated and the one which is in black color has rotated.
    import java.awt.Color;
    import java.awt.Graphics;
    import java.awt.Graphics2D;
    import java.awt.RenderingHints;
    import java.awt.Shape;
    import java.awt.event.MouseEvent;
    import java.awt.event.MouseListener;
    import java.awt.event.MouseMotionListener;
    import java.awt.geom.AffineTransform;
    import java.awt.geom.Point2D;
    import java.awt.geom.Rectangle2D;
    import javax.swing.JFrame;
    import javax.swing.JPanel;
    import com.clinapps.LDPConstants;
    public class MoveRotatedObj extends JFrame
         public MoveRotatedObj()
              JPanel pane = new Dorairaj();
              add(pane);
         public static void main(String[] args)
              MoveRotatedObj f = new MoveRotatedObj();
              f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
              f.setSize(400, 400);
              f.setLocation(200, 200);
              f.setVisible(true);
         static class Dorairaj extends JPanel
              implements
                   MouseListener,
                   MouseMotionListener
              Shape o = null;
              Rectangle2D rect = new Rectangle2D.Double(
                   10, 10, 100, 100);
              Graphics2D g2 = null;
              boolean flag = true;
              int x=10,y=10,x1, y1, x2, y2;
              AffineTransform af = new AffineTransform();
              AffineTransform originalAt = new AffineTransform();
              int origin = 0;
              public Dorairaj()
                   addMouseListener(this);
                   addMouseMotionListener(this);
              protected void paintComponent(Graphics g)
                   super.paintComponent(g);
                   g2 = (Graphics2D) g;
                   g2.draw(new Rectangle2D.Double(0,0,500,500));
                   g2.translate(origin, origin);
                   g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING,
                        RenderingHints.VALUE_ANTIALIAS_ON);
                   rect = new Rectangle2D.Double(
                        x, y, 150, 100);
                   g2.setColor(Color.RED);
                   g2.draw(rect);
                   g2.setColor(Color.black);
                   originalAt = g2.getTransform();
                   g2.rotate(Math.toRadians(270), 200, 200);               
                   g2.draw(rect);
                   g2.setTransform(originalAt);
              * Invoked when a mouse button has been pressed on a component.
              public void mousePressed(MouseEvent e)
                   e.translatePoint(-origin, -origin);
                   x1 = e.getX();
                   y1 = e.getY();
              public void mouseDragged(MouseEvent e)
                   x2 = e.getX();
                   y2 = e.getY();
                   x = x + x2 - x1;
                   y = y + y2 - y1;
                   x1 = x2;
                   y1 = y2;
                   repaint();
              public void mouseMoved(MouseEvent e)
              * Invoked when the mouse button has been clicked (pressed and released)
              * on a component.
              public void mouseClicked(MouseEvent e)
                   repaint();
              * Invoked when a mouse button has been released on a component.
              public void mouseReleased(MouseEvent e)
              * Invoked when the mouse enters a component.
              public void mouseEntered(MouseEvent e)
              * Invoked when the mouse exits a component.
              public void mouseExited(MouseEvent e)
    Edited by: DoraiRaj on Sep 16, 2009 12:51 PM
    Edited by: DoraiRaj on Sep 16, 2009 1:00 PM
    Edited by: DoraiRaj on Sep 16, 2009 1:07 PM

    Thanks for replay and suggestion morgalr,
    I mean MoveRotatedObj1 is MoveRotatedObj only jsut m maintaing a copy on my system like MoveRotatedObj1.
    finally i solved my problem like this ,
    Is this correct approach m followinig or not pls let me know .
    import java.awt.Color;
    import java.awt.Graphics;
    import java.awt.Graphics2D;
    import java.awt.RenderingHints;
    import java.awt.Shape;
    import java.awt.event.MouseEvent;
    import java.awt.event.MouseListener;
    import java.awt.event.MouseMotionListener;
    import java.awt.geom.AffineTransform;
    import java.awt.geom.Point2D;
    import java.awt.geom.Rectangle2D;
    import javax.swing.JFrame;
    import javax.swing.JPanel;
    import com.clinapps.LDPConstants;
    public class MoveRotatedObj extends JFrame
    public MoveRotatedObj()
      JPanel pane = new Dorairaj();
      add(pane);
    public static void main(String[] args)
      MoveRotatedObj f = new MoveRotatedObj();
      f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
      f.setSize(400, 400);
      f.setLocation(200, 200);
      f.setVisible(true);
    static class Dorairaj extends JPanel
      implements
       MouseListener,
       MouseMotionListener
      Shape o = null;
      Rectangle2D rect = new Rectangle2D.Double(
       10, 10, 100, 100);
      Rectangle2D rect1 = new Rectangle2D.Double(
       10, 10, 100, 100);
      Graphics2D g2 = null;
      boolean flag = true;
      double lx, ly;
      int x = 10, y = 10, x1, y1, x2, y2;
      int l = 20, m = 20;
      int angle = 270;
      AffineTransform af = new AffineTransform();
      AffineTransform originalAt = new AffineTransform();
      int origin = 0;
      public Dorairaj()
       addMouseListener(this);
       addMouseMotionListener(this);
      protected void paintComponent(Graphics g)
       super.paintComponent(g);
       g2 = (Graphics2D) g;
       g2.draw(new Rectangle2D.Double(
        0, 0, 500, 500));
       g2.translate(origin, origin);
       g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING,
        RenderingHints.VALUE_ANTIALIAS_ON);
       rect = new Rectangle2D.Double(
        x, y, 150, 100);
       g2.setColor(Color.RED);
       g2.draw(rect);
       rect1 = new Rectangle2D.Double(
        l, m, 150, 100);
       g2.setColor(Color.black);
       originalAt = g2.getTransform();
       g2.rotate(Math.toRadians(angle), 200, 200);
       g2.draw(rect1);
       g2.setTransform(originalAt);
      public void mousePressed(MouseEvent e)
       e.translatePoint(-origin, -origin);
       x1 = e.getX();
       y1 = e.getY();
      public void mouseDragged(MouseEvent e)
       boolean left, right, up, bottm;
       int dx, dy;
       left = right = up = bottm = false;
       x2 = e.getX();
       y2 = e.getY();
       dx = x2 - x1;
       dy = y2 - y1;
       x = x + dx;
       y = y + dy;
       up = dy < 0;
       bottm = dy > 0;
       left = dx < 0;
       right = dx > 0;
       if (left || right)
        // b += dx;
        m += dx;
       if (up || bottm)
        // a -= dy;
        l -= dy;
       x1 = x2;
       y1 = y2;
       repaint();
      public void mouseMoved(MouseEvent e)
      public void mouseClicked(MouseEvent e)
       repaint();
      public void mouseReleased(MouseEvent e)
      public void mouseEntered(MouseEvent e)
      public void mouseExited(MouseEvent e)
    }

  • The solitaire games suddenly began to require a double-click instead of a single-click

    I downloaded the latest version of Flash and suddenly had to double click to play solitaire.

    I was talking about 'custom question slides', not about the default question slides. Here is an old example, with the Shape buttons now available it would have been a lot better and easier:
    http://kb2.adobe.com/community/publishing/857/cpsid_85716.html
    Each interactive object has a Reporting accordion, can have a score.
    Lilybiri

  • 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?

  • 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.

Maybe you are looking for

  • Syncing a pair of OSX Lion Servers in different locations

    Hi Folks, I have 8+ TB of data sitting on various hard drives (yes I know its nuts).  I want to purchase a pair of Mac Mini Lion Servers with the Promise Pegasus 12TB (6x2TB) R6 RAID Systems on each and load all of the data on both of them and then p

  • Wedding photography running out of space. Need help with thousands of photos, and workflow

    So my studio does wedding photography. Me and my partner both take photos.  We have about 30,000 photos just from the last 2 years.  We are running out of space big time. We both have 1 terabyte magnetic hard drives in our computers. I have about 80g

  • Search error in Content server

    Hi All, We have Migrated documents from IPM 10 g to IPM 11g. Now currently we are working in Production environment. But whenever I search for documents in UCM I am getting Following error Unable to retrieve search results. Error occurred while proce

  • Standard tcode is taking more time

    Hi, When i am trying to delete or save any shipments through standard tcodes VT01N and VT02N. It is taking more time to process. Please tell me the solution to increase the performance.

  • XMLP Desktop Problem in Microsoft Word

    Dear All, I receive error message "Installation Error" when I am trying to load XML data in Microsft word. I use Windows XP SP2 and Office 2003. I tried to reinstall Office and XMLP desktop but no results. Please advise what to do. Sincerely, Giviut