Cancel a click event on a mx:list

Hey All,
I have a listbox with a bunch of items. Now when a user
select a item in the ListBox I need to show an Alert that is going
to say 'Copy has been changed but not saved, are you sure you want
to continue?' And the user is asked to cancel or continue.
If the users cancels the request, then I need to put the
selectedIndex back to what it was before the user clicked the
ListBox.
What is the general procedure for doing this teh flex way??
Sure I can remember the selectedIndex ina global variable,
but that is rather ugly, so I was wondering what the flex way is.
Any examples???
Ries

Hey All,
I have a listbox with a bunch of items. Now when a user
select a item in the ListBox I need to show an Alert that is going
to say 'Copy has been changed but not saved, are you sure you want
to continue?' And the user is asked to cancel or continue.
If the users cancels the request, then I need to put the
selectedIndex back to what it was before the user clicked the
ListBox.
What is the general procedure for doing this teh flex way??
Sure I can remember the selectedIndex ina global variable,
but that is rather ugly, so I was wondering what the flex way is.
Any examples???
Ries

Similar Messages

  • Kill the MouseEven.CLICK event when mouse is held down?

    I have been studying games on Facebook and am trying to emulate mouse event handling. For example in ChefVille you can click on objects and drag them around. But if you hold the mouse down you pan the entire game environment and when you release the mouse button a click is NOT registered on the object below the mouse. In my tinkering the CLICK event is triggered on the release of the mouse button no matter how long I keep the button depressed. How do I keep the CLICK event from firing if the mouse is held down for some period of time?

    I don't know that you can cancel a CLICK event in the middle of it happening (CLICK = MOUSE_DOWN followed by MOUSE_UP), but you can trigger a Timer on the MOUSE_DOWN event and use its event handler to set a boolean variable that your CLICK event handler function can make use of to decide whether or not to process a CLICK event.

  • How to differentiate between Single click and double click event in List

    I am facing a problem while using list in awt.
    I want to execute some code on single click and other on double click but when double click event occurs it also executes the single click code.
    because i have added both actionlistener and itemlistener on the list.
    How to sort out this problem.
    please help me out.
    Thanks buddies.

    Hello Meeraj_Kanaparthi
    Thanks for helping i m giving u the code i have tried.
    Plz help me on this...
    Thanks........
    import java.awt.*;
    import java.awt.event.*;
    class CheckList extends Frame implements MouseListener
         List l1;
         int x;
         int y;
         CheckList()
         setSize(500,500);
         setLayout(new FlowLayout());
         l1=new List(10);
         add(l1);
         l1.add("Item 1");l1.add("Item 2");l1.add("Item 3");l1.add("Item 4");l1.add("Item 5");
         x=6;
         y=0;
         l1.addMouseListener(this);
    //     l1.addItemListener(this);
         show();
         public void execute(int y)
         if(y==1)
         {System.out.println("3");
              l1.remove(l1.getSelectedIndex());
         if(y==2)
         {System.out.println("4");
              l1.add("item " + x);
              x++;
         public void mousePressed(MouseEvent e)
              System.out.println("Pressed");
         public void mouseReleased(MouseEvent e)
              System.out.println("Released");
         public void mouseEntered(MouseEvent e) {}
         public void mouseExited(MouseEvent e) {}
         public void mouseClicked(MouseEvent e)
         if (e.getClickCount()==1)
              System.out.println("1");
              y=1;
         if (e.getClickCount() == 2)
         {System.out.println("2");
              y=2;
              execute(y);
         public void actionPerformed(ActionEvent ae)
         public void itemStateChanged(ItemEvent it)
         public static void main(String ag[])
         new CheckList();
    }

  • MouseOut event seems to cancel Click event

    Im using a state for rollovers of a button, and a state for
    the click of the same button, this causes a problem when the user
    clicks the button. Instead of the click state being activated
    instead i see a brief blinking of the click state and then suddenly
    the app reverts to the mouseOut state, how can I tell FLEX that the
    click event is more important then the mouseOut event?
    EXAMPLE
    <mx:Canvas mouseOver="currentState='rollOver'"
    mouseOut="currentState='rollOut'"
    click="currentState='clicked'">
    in this example, when you click the canvas you will end up at
    the "rollOut" state instead of the "clicked" state but it appears
    the clicked state may be displayed for a brief moment as the app
    kind of blinks before showing the "rollOut" state. Oh and I've
    tried to remove the event listener on click but it doesn't appear
    to be fired as the event listener is not removed. HELP!?!

    "octagonatron" <[email protected]> wrote in
    message
    news:g8feue$iee$[email protected]..
    > Im using a state for rollovers of a button, and a state
    for the click of
    > the
    > same button, this causes a problem when the user clicks
    the button.
    > Instead of
    > the click state being activated instead i see a brief
    blinking of the
    > click
    > state and then suddenly the app reverts to the mouseOut
    state, how can I
    > tell
    > FLEX that the click event is more important then the
    mouseOut event?
    >
    > EXAMPLE
    > <mx:Canvas mouseOver="currentState='rollOver'"
    > mouseOut="currentState='rollOut'"
    click="currentState='clicked'">
    >
    > in this example, when you click the canvas you will end
    up at the
    > "rollOut"
    > state instead of the "clicked" state but it appears the
    clicked state may
    > be
    > displayed for a brief moment as the app kind of blinks
    before showing the
    > "rollOut" state. HELP!?!
    How bout
    mouseOut="currentState!='clicked'?currentState='mouseOut':currentState='clicked'"
    or mouseOut="mouseOutHandler()"
    private function mouseOutHandler():void{
    if (currentState!='clicked') currentState='mouseOut';

  • ALV: Issue with double  click event after sorting the ALV

    Hello Experts,
    I have an internal table that populates an ALV grid. When the user doubleclicks a row, my method HANDLE_DOUBLE_CLICK returns the e_row-index value from the ALV Grid. I use this index value to read the internal table, then retrieve additional data.
    My problem is the user may sort the ALV grid before double clicking on a line. If this happens my internal table is not sorted to match the ALV grid, so reading the internal table with the e_row-index value returns the wrong information.
    When the double click event occurs, is it possible to capture the value in column 1 instead of a value for e_row-index?
    There is one more paramter in HANDLE_DOUBLE_CLICK for row id.   It is coming blank in debugging .  what is the purpose of this parameter and how i can make use of it ?
    Regards
    Vivek

    Hi,
    I am Posting The Code Which Uses Double Click Event.
    And This Code will provide the total information to you.
    REPORT  ZALVGRID_PG.
    TABLES: SSCRFIELDS.
    DATA: V_BELNR TYPE RBKP-BELNR.
    SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-001.
    SELECT-OPTIONS: IRNO FOR V_BELNR.
    PARAMETERS: P_GJAHR TYPE RBKP-GJAHR.
    SELECTION-SCREEN END OF BLOCK B1.
    DATA: WA TYPE ZALVGRID_DISPLAY,
          ITAB TYPE STANDARD TABLE OF ZALVGRID_DISPLAY.
    DATA: IDENTITY TYPE REF TO CL_GUI_CUSTOM_CONTAINER.
    DATA: GRID TYPE REF TO CL_GUI_ALV_GRID.
    DATA: L_IDENTITY TYPE REF TO CL_GUI_CUSTOM_CONTAINER.
    DATA: L_TREE TYPE REF TO CL_GUI_ALV_TREE_SIMPLE.
    TYPE-POOLS: SLIS,SDYDO.
    DATA: L_LOGO TYPE SDYDO_VALUE,
          L_LIST TYPE SLIS_T_LISTHEADER.
    END-OF-SELECTION.
    CLASS CL_LC DEFINITION.
      PUBLIC SECTION.
        METHODS: DC FOR EVENT DOUBLE_CLICK OF CL_GUI_ALV_GRID IMPORTING E_ROW E_COLUMN.
    ENDCLASS.
    CLASS CL_LC IMPLEMENTATION.
      METHOD DC.
        DATA: WA1 TYPE ZALVGRID_DISPLAY.
        READ TABLE ITAB INTO WA1 INDEX E_ROW-INDEX.
        BREAK-POINT.
        SET PARAMETER ID 'BLN' FIELD WA1-BELNR.
        CALL TRANSACTION 'FB02'.
      ENDMETHOD.                    "DC
    ENDCLASS.
    DATA: OBJ_CL TYPE REF TO CL_LC.
    START-OF-SELECTION.
      PERFORM SELECT_DATA.
      IF SY-SUBRC = 0.
        CALL SCREEN 100.
      ELSE.
        MESSAGE E000(0) WITH 'DATA NOT FOUND'.
      ENDIF.
      INCLUDE ZALVGRID_PG_STATUS_0100O01.
      INCLUDE ZALVGRID_PG_LOGOSUBF01.
      INCLUDE ZALVGRID_PG_SELECT_DATAF01.
    INCLUDE ZALVGRID_PG_USER_COMMAND_01I01.
    ***INCLUDE ZALVGRID_PG_STATUS_0100O01 .
    MODULE STATUS_0100 OUTPUT.
      SET PF-STATUS 'AB'.
    *  SET TITLEBAR 'xxx'.
      IF IDENTITY IS INITIAL.
        CREATE OBJECT IDENTITY
        EXPORTING
          CONTAINER_NAME = 'ALVCONTROL'.
        CREATE OBJECT GRID
        EXPORTING
          I_PARENT = IDENTITY.
        CALL METHOD GRID->SET_TABLE_FOR_FIRST_DISPLAY
          EXPORTING
             I_STRUCTURE_NAME              = 'ZALVGRID_DISPLAY'
          CHANGING
            IT_OUTTAB                     = ITAB.
        CREATE OBJECT OBJ_CL.
        SET HANDLER OBJ_CL->DC FOR GRID.
        ENDIF.
        IF L_IDENTITY IS INITIAL.
          CREATE OBJECT L_IDENTITY
          EXPORTING
            CONTAINER_NAME = 'LOGO'.
          CREATE OBJECT L_TREE
          EXPORTING
            I_PARENT = L_IDENTITY.
          PERFORM LOGOSUB USING L_LOGO.
          CALL METHOD L_TREE->CREATE_REPORT_HEADER
            EXPORTING
              IT_LIST_COMMENTARY    = L_LIST
              I_LOGO                = L_LOGO.
          ENDIF    .
    ENDMODULE.                 " STATUS_0100  OUTPUT
    ***INCLUDE ZALVGRID_PG_LOGOSUBF01 .
    FORM LOGOSUB  USING    P_L_LOGO.
      P_L_LOGO = 'ERPLOGO'.
    ENDFORM.                    " LOGOSUB
    ***INCLUDE ZALVGRID_PG_SELECT_DATAF01 .
    FORM SELECT_DATA .
      SELECT RBKP~BELNR
             RBKP~BLDAT
             RSEG~BUZEI
             RSEG~MATNR
             INTO TABLE ITAB
             FROM RBKP INNER JOIN RSEG
        ON RBKP~BELNR = RSEG~BELNR
        WHERE RBKP~BELNR IN IRNO
        AND RBKP~GJAHR = P_GJAHR.
    ENDFORM.                    " SELECT_DATA
    ***INCLUDE ZALVGRID_PG_USER_COMMAND_01I01 .
    MODULE USER_COMMAND_0100 INPUT.
      CASE SY-UCOMM.
        WHEN 'EXIT'.
          LEAVE PROGRAM.
        WHEN 'CANCEL'.
           EXIT.
           ENDCASE.
    ENDMODULE.                 " USER_COMMAND_0100  INPUT
    Warm Regards,
    PavanKumar.G
    Edited by: pavankumar.g on Jan 19, 2012 5:30 AM

  • ALV Class Double click event

    Hi All,
    I have created an alv report using alv class. I have handled the double click event in that i am calling transaction using row currenlty selected. But after doing subtotalling the list and then i double click a line it is passing wrong data.
    Points are awarded,
    Regards,
    Bharat Mistry
    Message was edited by: Bharat Mistry

    Hi Bharat,
    Read the internal table contents in double click event with e_row-index , then you will get the data of that particular row.
    check below code :
    local class to handle semantic checks
    CLASS lcl_event_receiver DEFINITION DEFERRED.
    DATA: g_event_receiver TYPE REF TO lcl_event_receiver.
    LOCAL CLASS Definition
    *§4.Define and implement event handler to handle event DATA_CHANGED.
    CLASS lcl_event_receiver DEFINITION.
      public section.
        METHODS:
          handle_double_click
                 FOR EVENT double_click OF cl_gui_alv_grid
                 IMPORTING e_row e_column.
    ENDCLASS.
    CLASS lcl_event_receiver IMPLEMENTATION.
      METHOD handle_double_click.
      read table gt_outtab index e_row-index into
    Regards
    Appana
    *Reward Points for helpful answers
    Message was edited by: L Appana

  • Multiple events in a single list

    Does anyone know how create mutliple change events in the same list? 
    Basically want to access different view files by clicking different lines from a single list. 
    I havent seen anything on this.  Is it even possible in Flex? 
    This is for a mobile application.
    Thaks!

    Well, I don't really like these theroretical discussions. Can you attach a simplified version of some of your code?
    There are many other ways to identify the particular control. You could for example search an array of references for the value of the "ctlref" event data node. This would make the code much more robust (your code will fail for example if you (or some other programmer updating your code in a few years!) notices a mispelling and edits the label without also changing the case structure cases).
    LabVIEW Champion . Do more with less code and in less time .

  • Listening for click event on an af:image tag

    Dear All,
    Can anybody help me why my code does not work.
    Use case, using an Image, i wanted to call a managed bean method whenever I clicked the image. So here is what I did, I added a clientlistner
    and wait for the click event. Also a server listener is attached to the image.
    <af:image >
         <af:clientListener type="click" method="handleImageClick"/>
         <af:serverListener type="ImageEvent"
                           method="#{viewScope.MyBean.handleImageEvent}"/>
    </af:image>...and here is my javascript...
    <f:facet name="metaContainer">
         <af:resource type="javascript">
           function handleImageClick(evt)
                var comp = evt.getSource();
                AdfCustomEvent.queue(comp, "ImageEvent",{ fvalue : comp.getSubmittedValue()},false);
                evt.cancel();
         </af:resource>
    </f:facet>..and here is my managed bean method.
    public void handleImageEvent(ClientEvent ce)
    }I jsut dont know why it does not call my managed bean method. Is there any mistake in my code?
    JDEV 11G PS5
    Thanks

    codigoadf wrote:
    the problem is in Javascript. remove "fvalue : comp.getSubmittedValue()" and will work fine.
    AdfCustomEvent.queue(comp, "ImageEvent",{ },false);comp.getSubmittedValue()?? comp is a imageAhhh yeah..I just copy pasted this code from google..
    Thanks for your help...it now works..

  • Can't get click event to load from ImageButton

    *Newbie Alert*
    I am trying to create dynamic image buttons that when clicked will redirect to anothr page as well as add a new item to a SharePoint list. My Image buttons create sucessfully but the click event is not loaded. I have added a break point visual studio and
    can see that the function is never loaded.
    My Image button creation code (within Page_load) is:
    ImageButton lnk = new ImageButton();
    lnk.ID = WPtitle;
    lnk.CommandName = WPtitle;
    lnk.CommandArgument = WPtitle;
    lnk.PostBackUrl = WPUrl;
    lnk.Visible = true;
    lnk.ImageUrl = WPImgUrl;
    tc.Controls.Add(lnk);
    lnk.Click += new System.Web.UI.ImageClickEventHandler(this.send_Click);
    and then my event is:
    public void send_Click(object sender, ImageClickEventArgs e)
    SPWeb site = SPContext.Current.Web;
    var clicklist = site.Lists["listname"];
    string WPTitle = ((ImageButton)sender).CommandArgument.ToString();
    SPListItem additem = clicklist.AddItem();
    additem["Title"] = "text";
    additem["Clicked"] = "1";
    additem.Update();
    Any help as to why this is not loading would be greatly appreciated.
    Thanks

    hi,
    you have assign a evenhandler after you add the button to the control list. just assign your event handler before you add the button to the control list.
    2nd option is
    bn.Click += MyClick;
    private void MyClick(object sender, EventArgs e) {
    MessageBox.Show("hello");
    Here you're registering a click event and specify the code that runs when the event fires.
    http://stackoverflow.com/questions/8207449/how-to-dynamically-add-a-code-behind-for-button
    if this helps you please mark as the answer.

  • Possible bug - Missing click event when handling change event

    Using Flex 4.5 SDK, I have a spark ComboBox and a Button next to it for applying a filter according to ComboBox selection.
    I listen to both the ComboBox's change event & the Button's click event (for different functions).
    When I manually delete the ComboBox text value from its TextInput (i.e. changing selected index to -1) and immediately click on the Button,
    the click event-handler function is not being called and only the ComboBox's change event-handler function is executed.
    (Selecting a value from the ComboBox's list and clicking on the button triggers both methods on the right order.)
    There's also a state definition for the module, but it isn't being changed during these operations...
    Is this a bug or a correct behavior? Am I missing something here?
    Any workaround suggestions?
    (I thought of listening also to mouse-down or mouse-up on the button instead, but haven't tried it yet...)
    *** UPDATE ***
    When using the Button's mouseDown event the behavior is as expected, so there's a simple workaround.
    However, it seems to me like there's a bug with the Button's click event listener or something...
    *** UPDATE #2 ***
    I created a test application for that and couldn't reproduce the problem.
    Then I figured out the problem and solved it.
    It's a bit emmbarrasing, but I actually disabled the button (enabled=false) as in a child method of the change handling code...
    (If there is no value, don't allow applying the filter - It makes sense! )
    Anyway... No issue after all.
    However, I choose to leave this post (and not delete it) as an example of identifying and resolving a strange behavior in a complex application.

    There's no need.
    Please read the section UPDATE #2.

  • Sharepoint 2010 Custom Visual Webpart button click event firing on page refresh

    I have developed a Visual Webpart to create a list in SP using vs2010 and  the button click event I have written the list create method. If I click the button list is created successfully.  And I refresh the page again list is creating(Again button
    click event is triggering).please help me to solve the issue.
     protected void Button1_Click(object sender,
    EventArgs e)
                SPWeb web
    = SPContext.Current.Web;
                //SPList list=web.Lists["Auto"];
                SPList list
    = web.Lists[DropDownList2.SelectedItem.Text];
                if
    (string.IsNullOrEmpty(TextBox1.Text)
    || string.IsNullOrEmpty(DropDownList1.Text))
    Label4.Text =
    "Fields Are Empty";
                else
    if (DropDownList1.SelectedItem.Text
    == "Single line of Text")
                    list.Fields.Add(TextBox1.Text,
    SPFieldType.Text,
    true);
    SPView viewname = list.Views["All Items"];
                    viewname.ViewFields.Add(TextBox1.Text);
    //viewname.Update();
                    list.Update();
    Label4.Text =
    "Field Created Successfully";
    TextBox1.Text =
    string.Empty;
    // Label4.Text = string.Empty;

    Hi,
    This is because the request is sent to the server when you refresh the page.
    A workaround for this is that we can “provide a refresh link that redirects to the same page (or if you have some action causing the refresh programmatically, you could just
    redirect to the page after that, with Response.Redirect)
    so that page is requested by the browser (with GET method, default with hyperlinks)”.
    More information:
    http://social.msdn.microsoft.com/Forums/sharepoint/en-US/45648b39-1229-405c-ac9e-60eb82905982/click-event-getting-fired-on-page-refresh
    Or we can use the Session to save a value which used as a flag for us to check whether it is a page refresh and perform accordingly.
    http://www.codeproject.com/Articles/28099/Refresh-Page-Issue-in-ASP-Net
    http://www.codeproject.com/Articles/10240/Detecting-Page-Refresh
    Thanks
    Patrick Liang
    TechNet Community Support

  • Handling double click event in oops alv

    I need to write a interactive alv where,can any one help me in handling double click event using oops.

    Hello,
    Demo program on interactive ALV using OOPS
    REPORT  ZALV_OOINTERACTIVE.*Class definition for handling double click
    CLASS event_class DEFINITION DEFERRED.*Internal table and work area declarations for dd02l and dd03l
    DATA : it_dd02l TYPE TABLE OF dd02l,
           wa_dd02l TYPE dd02l,
           it_dd03l TYPE TABLE OF dd03l,
           wa_dd03l TYPE dd03l.*data declarations for ALV Main list
    DATA : ty_lay1 TYPE lvc_s_layo,
           it_fieldcat TYPE lvc_t_fcat ,
           ty_fieldcat TYPE lvc_s_fcat ,
           c_alv1 TYPE REF TO cl_gui_alv_grid,
           c_cont1 TYPE REF TO cl_gui_custom_container,
           event_receiver TYPE REF TO event_class.*data declarations for ALV Interactive listDATA : ty_lay2 TYPE lvc_s_layo,
           it_fcat TYPE lvc_t_fcat ,
           ty_fcat TYPE lvc_s_fcat ,
           c_alv2 TYPE REF TO cl_gui_alv_grid,
           c_cont2 TYPE REF TO cl_gui_custom_container.
    **Select options for multiple values and NOT ranges
    SELECT-OPTIONS : s_table FOR wa_dd02l-tabname NO INTERVALS.
    Initialization event
    INITIALIZATION.*Start of selection event
    START-OF-SELECTION.*fetch data into table and field characteristics
      PERFORM fetch_data.*ALV display for output
      PERFORM alv_output.&----
    *&      Form  FETCH_DATA
          text
    -->  p1        text
    <--  p2        text
    FORM fetch_data .*Select the table details
      SELECT * FROM dd02l INTO CORRESPONDING FIELDS OF TABLE it_dd02l 
    WHERE tabname IN s_table
      AND tabclass = 'TRANSP'.
    ENDFORM.                    " FETCH_DATA----* CLASS lcl_event_receiver DEFINITION----CLASS event_class DEFINITION.*Handling double click
      PUBLIC SECTION.    METHODS:
        handle_double_click
        FOR EVENT double_click OF cl_gui_alv_grid IMPORTING e_row .ENDCLASS. "lcl_event_receiver DEFINITION
    ----* CLASS lcl_event_receiver IMPLEMENTATION
    ----CLASS event_class IMPLEMENTATION.  METHOD handle_double_click.    DATA : ls_dd02l LIKE LINE OF it_dd02l.*Reading the selected data into a variable
        READ TABLE it_dd02l INDEX e_row-index INTO ls_dd02l.*  *Select the field details of the selected table
        SELECT * FROM dd03l INTO CORRESPONDING FIELDS OF TABLE it_dd03l
        WHERE tabname EQ ls_dd02l-tabname.
    *calling the ALV containing the field values
        CALL SCREEN 101.  ENDMETHOD. "handle_double_clickENDCLASS. "lcl_event_receiver IMPLEMENTATION&----& Module pbo_100 OUTPUT&----
    *MODULE pbo_100 OUTPUT.
    *set pf-status 'XXX'.
    *set titlebar 'XXX'.
    ENDMODULE. " PBO_100 OUTPUT
    *& Module alv_100 OUTPUT
    &----MODULE alv_100 OUTPUT.*Check if there is no custom container in screen 100
      IF c_cont1 IS INITIAL.*Creating object of container
        CREATE OBJECT c_cont1
         EXPORTING
           container_name = 'CCONT'.
        IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
        ENDIF.*Creating object of alv
        CREATE OBJECT c_alv1
           EXPORTING
            i_parent = c_cont1.
        IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
        ENDIF.*alv layout
        PERFORM alv_100_layout.*alv field catalogue
        PERFORM alv_100_fieldcat.*Displaying the ALV grid
        CALL METHOD c_alv1->set_table_for_first_display
          EXPORTING
            is_layout       = ty_lay1
          CHANGING
            it_outtab       = it_dd02l[]
            it_fieldcatalog = it_fieldcat.    IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
        ENDIF.*Create object of the event class and setting handler for double click
        CREATE OBJECT event_receiver.
        SET HANDLER event_receiver->handle_double_click FOR c_alv1.  ENDIF.ENDMODULE. " ALV_100 OUTPUT&----& Module pai_100 INPUT&----
    *MODULE pai_100 INPUT.
    ENDMODULE. " pai_100 INPUT----* MODULE PBO_101 OUTPUT----MODULE pbo_101 OUTPUT.
    SET PF-STATUS 'XXX'.
    SET TITLEBAR 'XXX'.
    ENDMODULE. " PBO_101 INPUT----* MODULE ALV_101 OUTPUT----
    MODULE alv_101 OUTPUT.
    *Check if the Custom container exists.
      IF c_cont2 IS INITIAL.*Creating container object
        CREATE OBJECT c_cont2
          EXPORTING
            container_name = 'CDCONT'.
        IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
        ENDIF.*creating ALV grid for interactive list
        CREATE OBJECT c_alv2
          EXPORTING
           i_parent = c_cont2.
        IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
        ENDIF.*ALV layout
        PERFORM alv_101_layout.*ALV fieldcatalogue
        PERFORM alv_101_fieldcat.*Sorting the output by field position
        SORT it_dd03l BY position.*ALV for display field details
        CALL METHOD c_alv2->set_table_for_first_display
          EXPORTING
            is_layout       = ty_lay2
          CHANGING
            it_outtab       = it_dd03l[]
            it_fieldcatalog = it_fcat.
        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.ENDMODULE. " ALV_101 OUTPUT
    &----& Module PAI_101 INPUT&----
    *MODULE pai_101 INPUT.ENDMODULE. " PAI_101 INPUT
    *&      Form  ALV_OUTPUT
          text
    -->  p1        text
    <--  p2        text
    FORM alv_output .
      CALL SCREEN 100.ENDFORM.                    " ALV_OUTPUT
    *&      Form  ALV_100_LAYOUT
          text
    -->  p1        text
    <--  p2        text
    FORM alv_100_layout .  ty_lay1-grid_title = 'TABLES'.
      ty_lay1-zebra = 'X'.
      ty_lay1-no_toolbar = 'X'.ENDFORM.                    " ALV_100_LAYOUT
    *&      Form  ALV_100_FIELDCAT
          text
    -->  p1        text
    <--  p2        text
    FORM alv_100_fieldcat .
      CLEAR ty_fieldcat.
      ty_fieldcat-row_pos = 1.
      ty_fieldcat-col_pos = 1.
      ty_fieldcat-fieldname = 'TABNAME'.
      ty_fieldcat-tabname = 'GT_DD02L'.
      ty_fieldcat-coltext = 'TableName'.
      ty_fieldcat-outputlen = 10.
      APPEND ty_fieldcat TO it_fieldcat.
      CLEAR ty_fieldcat.  ty_fieldcat-row_pos = 1.
      ty_fieldcat-col_pos = 2.
      ty_fieldcat-fieldname = 'TABCLASS'.
      ty_fieldcat-tabname = 'GT_DD02L'.
      ty_fieldcat-coltext = 'CATEGORY'.
      ty_fieldcat-outputlen = 10.
      APPEND ty_fieldcat TO it_fieldcat.
      CLEAR ty_fieldcat.  ty_fieldcat-row_pos = 1.
      ty_fieldcat-col_pos = 3.
      ty_fieldcat-fieldname = 'AS4USER'.
      ty_fieldcat-tabname = 'GT_DD02L'.
      ty_fieldcat-coltext = 'CREATED'.
      ty_fieldcat-outputlen = 10.
      APPEND ty_fieldcat TO it_fieldcat.
      CLEAR ty_fieldcat.  ty_fieldcat-row_pos = 1.
      ty_fieldcat-col_pos = 4.
      ty_fieldcat-fieldname = 'AS4DATE'.
      ty_fieldcat-tabname = 'GT_DD02L'.
      ty_fieldcat-coltext = 'DATE'.
      ty_fieldcat-outputlen = 10.
      APPEND ty_fieldcat TO it_fieldcat.
      CLEAR ty_fieldcat.
      ty_fieldcat-row_pos = 1.
      ty_fieldcat-col_pos = 5.
      ty_fieldcat-fieldname = 'AS4TIME'.
      ty_fieldcat-tabname = 'GT_DD02L'.
      ty_fieldcat-coltext = 'TIME'.
      ty_fieldcat-outputlen = 10.
      APPEND ty_fieldcat TO it_fieldcat.
      CLEAR ty_fieldcat.  ty_fieldcat-row_pos = 1.
      ty_fieldcat-col_pos = 6.
      ty_fieldcat-fieldname = 'CONTFLAG'.
      ty_fieldcat-tabname = 'GT_DD02L'.
      ty_fieldcat-coltext = 'Delivery Class'.
      ty_fieldcat-outputlen = 15.
      APPEND ty_fieldcat TO it_fieldcat.
      CLEAR ty_fieldcat.ENDFORM.                    " ALV_100_FIELDCAT
    *&      Form  ALV_101_LAYOUT
          text
    -->  p1        text
    <--  p2        text
    FORM alv_101_layout .  ty_lay2-grid_title = 'FIELDS'.
      ty_lay2-zebra = 'X'.
      ty_lay2-no_toolbar = 'X'.ENDFORM.                    " ALV_101_LAYOUT
    *&      Form  ALV_101_FIELDCAT
          text
    -->  p1        text
    <--  p2        text
    FORM alv_101_fieldcat .  REFRESH it_fieldcat.
      REFRESH it_fcat.
      CLEAR ty_fcat.  ty_fcat-row_pos = 1.
      ty_fcat-col_pos = 1.
      ty_fcat-fieldname = 'FIELDNAME'.
      ty_fcat-tabname = 'GT_DD03L'.
      ty_fcat-coltext = 'Fieldname'.
      ty_fcat-outputlen = 10.
      APPEND ty_fcat TO it_fcat.
      ty_fcat-row_pos = 1.
      ty_fcat-col_pos = 2.
      ty_fcat-fieldname = 'CHECKTABLE'.
      ty_fcat-tabname = 'GT_DD03L'.
      ty_fcat-coltext = 'CHECKTABLE'.
      ty_fcat-outputlen = 10.
      APPEND ty_fcat TO it_fcat.  ty_fcat-row_pos = 1.
      ty_fcat-col_pos = 3.
      ty_fcat-fieldname = 'KEYFLAG'.
      ty_fcat-tabname = 'GT_DD03L'.
      ty_fcat-coltext = 'Key Flag'.
      ty_fcat-outputlen = 10.
      APPEND ty_fcat TO it_fcat.ENDFORM.                    " ALV_101_FIELDCAT

  • How to display link content on the the same sharepoint page on click event

    "How to display link content on the the same sharepoint page on click event"
    Detail:
    we are using a document library where all html files are stored/uploaded.  we would like to display/open the html file on the same sharepoint page where all the files are listed.
    Thanks.

    Use jQuery and set the target to self to the anchor tag
    Regards,
    Sairam Avacorp Technologies

  • Double Click Event not fired for IE 11 with compatibility mode for HTML elemnt table

    Hi,
    I am facing an issue with Double click event(not getting fired on double click of mouse) for IE 11 with compatibility mode on HTML element "table" for Windows 7 64 bit machine.It runs fine on IE 10 with compatible mode with Windws 7 64  bit
    machine -- double click event.
    Can you please help to resolve the issue?
    Thanks and Regards,
    Yogesh

    Hi,
    f12>Debug tab, click the 'start' button.....(select break on all exceptions from the dropdown on the Debug tab)
    click your table and correct any errors that are listed in the Console of the developer tool.... probably you are using attachEvent I/o addEventListener. You should be using addEventListener for IE9 and higher and other web browsers.(it the w3c standard
    (recommendation).
    Post questions about html, css and scripting for website developers to the MSDN IE Web Development forum. Include with your question a link to your website or a mashup that shows the issue.
    Rob^_^

  • Determining Tables on Double Click Event on Split Screen

    Hi,
    I have an OO split screen scenario where I display 2 different internal tables, 1 in the upper section of the split screen and the other in the lower section part. The layout structure used is the same for both internal tables since they display similar information. I am trying to establish that if I use the double click event to drill into specific line items, how do I determine which one of the split screens (and hence which internal table) have I double clicked on so that the correct internal tables details is read for further processing?
    Thanks

    Hi Uwe,
    Thanks very much for this. I have tried this out and it works perfect. However I'm trying to understand this further from the point of view that I did originally look at the event DOUBLE_CLICK in the class CL_GUI_ALV_GRID but didn't think I could use if further since there was no tie in with the optional parameter 'SENDER' you show. It only has 3 parameters listed for this so how does the 'SENDER' optional parameter work? Is this by reference/registration via the SET HANDLER statrement? I also debugged and looked at 'value' passed into the SENDER optional parameter... its not what I expected to see but contains what looked like the whole class object? Apologies but I'm coming more from years in the trenches of "classical" ABAP and seeing the light with ABAP OO!!
    Appreciate all your assistance.
    Thanks

Maybe you are looking for

  • Has anyone come across the 'insufficient data for an image' bug in Reader 9.5.1??

    We have an application that uses Reader to open scanned documents containing JP2K images and our users are intermittently getting this error however I can only find instances online of this bug from version 9.5.2 up. Has anyone seen this bug in 9.5.1

  • The English subtitle of "The Avengers" (not CC) is not working only on Mac.

    I might be just picky posting this issue, but it really intrigued(in bad way) me about why only iTunes on Mac OS X can't show the english subtitle, (not close caption, CC works fine) I have Apple TV (3rd gen), Windows 7 PC, and Mac mini (2012). The m

  • Permission denied in sap router

    Hello everybody, I have installed the SAPROUTER. when our remote user login by SAPSTRING 114.240.174.28 then user can login without any problem but when the user used the  /H/114.240.174.28/H/192.168.0.170/S/3299/H/ then they can not able to login, g

  • Spry.Utils.loadURL problem with IE7

    Hello there. First of all sorry for my english. I have a problem with Spry.Utils.loadURL function in Internet Explorer 7 only. In firefox works fine. So i have an asp file that returns a string with some stuff. I load this asp file with Spry.Utils.lo

  • How can I call a procedure?

    Hello, I have a procedure called p_doc_xks inside the package TS_X_DOC. I need to call this procedure passing an Integer ( num_valor ) and will return a String ( msg_resultado ). With these datas, is it possible someone help me? Thanks!