Single click in abap objects

hi,
    can any1 pls explain me the single click event LINK_CLICK in abap object.
does this single click event mean that if i click anywhere on my alv report it will trigger the event.
   pls explain me about this LINK_CLICK event in details pls

answered the similar question last week. You can see here Event
Link_click or ALV_Object Model HYPERLINK.
This example demonstrates how to use a Hiperlink field in ALV. These example was based on 'SALV_DEMO_TABLE_COLUMNS' that contains Hiperlink, icon, Hotspot...
The Code is:
REPORT zsalv_mar NO STANDARD PAGE HEADING.
      CLASS lcl_handle_events DEFINITION
CLASS lcl_handle_events DEFINITION.
  PUBLIC SECTION.
    METHODS:
      on_link_click FOR EVENT link_click OF cl_salv_events_table
        IMPORTING row column.
ENDCLASS.                    "lcl_handle_events DEFINITION
      CLASS lcl_handle_events IMPLEMENTATION
CLASS lcl_handle_events IMPLEMENTATION.
  METHOD on_link_click.
    DATA: l_row_string TYPE string,
          l_col_string TYPE string,
          l_row        TYPE char128.
    WRITE row TO l_row LEFT-JUSTIFIED.
    CONCATENATE text-i02 l_row INTO l_row_string SEPARATED BY space.
    CONCATENATE text-i03 column INTO l_col_string SEPARATED BY space.
    MESSAGE i000(0k) WITH 'Single Click' l_row_string l_col_string.
  ENDMETHOD.                    "on_single_click
ENDCLASS.                    "lcl_handle_events IMPLEMENTATION
DATA: gr_events TYPE REF TO lcl_handle_events.
TYPES: BEGIN OF g_type_s_outtab.
INCLUDE TYPE alv_tab.
TYPES:   t_hyperlink TYPE salv_t_int4_column,
       END   OF g_type_s_outtab.
DATA: gt_outtab TYPE STANDARD TABLE OF g_type_s_outtab.
DATA: gr_table   TYPE REF TO cl_salv_table.
TYPES: BEGIN OF g_type_s_hyperlink,
         handle    TYPE salv_de_hyperlink_handle,
         hyperlink TYPE service_rl,
         carrid    TYPE s_carrid,
       END   OF g_type_s_hyperlink.
DATA: gt_hyperlink TYPE STANDARD TABLE OF g_type_s_hyperlink.
SELECTION-SCREEN BEGIN OF BLOCK gen WITH FRAME.
PARAMETERS: p_amount TYPE i DEFAULT 30.
SELECTION-SCREEN END OF BLOCK gen.
START-OF-SELECTION.
  PERFORM select_data.
  PERFORM display.
*&      Form  select_data
      text
-->  p1        text
<--  p2        text
FORM select_data .
  DATA: line_outtab  TYPE g_type_s_outtab,
        ls_hype      TYPE g_type_s_hyperlink,
        lt_hyperlink TYPE salv_t_int4_column,
        ls_hyperlink TYPE salv_s_int4_column,
        v_tabix      TYPE sytabix.
  SELECT *
    FROM alv_tab
    INTO CORRESPONDING FIELDS OF TABLE gt_outtab
        UP TO p_amount ROWS.
  LOOP AT gt_outtab INTO line_outtab.
    v_tabix = sy-tabix.
    ls_hype-handle    = sy-tabix.
    ls_hype-hyperlink = line_outtab-url.
    ls_hype-carrid    = line_outtab-carrid.
    INSERT ls_hype INTO TABLE gt_hyperlink.
    ls_hyperlink-columnname = 'URL'.
    ls_hyperlink-value      = sy-tabix.
    APPEND ls_hyperlink TO lt_hyperlink.
    line_outtab-t_hyperlink = lt_hyperlink.
    MODIFY gt_outtab FROM line_outtab INDEX v_tabix.
    CLEAR line_outtab.
    CLEAR lt_hyperlink.
    CLEAR ls_hyperlink.
  ENDLOOP.
ENDFORM.                    " select_data
*&      Form  display
      text
-->  p1        text
<--  p2        text
FORM display .
  TRY.
      cl_salv_table=>factory(
        IMPORTING
          r_salv_table = gr_table
        CHANGING
          t_table      = gt_outtab ).
    CATCH cx_salv_msg.                                  "#EC NO_HANDLER
  ENDTRY.
  DATA: lr_functions TYPE REF TO cl_salv_functions_list.
  lr_functions = gr_table->get_functions( ).
  lr_functions->set_default( abap_true ).
*... set the columns technical
  DATA: lr_columns TYPE REF TO cl_salv_columns_table,
        lr_column  TYPE REF TO cl_salv_column_table.
  lr_columns = gr_table->get_columns( ).
  lr_columns->set_optimize( abap_true ).
*... §4.7 set hyperlink column
  DATA: lr_hyperlinks TYPE REF TO cl_salv_hyperlinks,
        ls_hyperlink  TYPE g_type_s_hyperlink.
  DATA: lr_functional_settings TYPE REF TO cl_salv_functional_settings.
  TRY.
      lr_columns->set_hyperlink_entry_column( 'T_HYPERLINK' ).
    CATCH cx_salv_data_error.                           "#EC NO_HANDLER
  ENDTRY.
  TRY.
      lr_column ?= lr_columns->get_column( 'URL' ).
      lr_column->set_cell_type( if_salv_c_cell_type=>link ).
      lr_column->set_long_text( 'URL' ).
    CATCH cx_salv_not_found.                            "#EC NO_HANDLER
  ENDTRY.
  lr_functional_settings = gr_table->get_functional_settings( ).
  lr_hyperlinks = lr_functional_settings->get_hyperlinks( ).
  LOOP AT gt_hyperlink INTO ls_hyperlink.
    TRY.
        lr_hyperlinks->add_hyperlink(
          handle    = ls_hyperlink-handle
          hyperlink = ls_hyperlink-hyperlink ).
      CATCH cx_salv_existing.                           "#EC NO_HANDLER
    ENDTRY.
  ENDLOOP.
  DATA: lr_events TYPE REF TO cl_salv_events_table.
  lr_events = gr_table->get_event( ).
  CREATE OBJECT gr_events.
  SET HANDLER gr_events->on_link_click FOR lr_events.
  gr_table->display( ).
ENDFORM.                    " display

Similar Messages

  • Apply multiple effects to multiple objects with single click box

    I would like to click on a click box and have one object appear and another object disappear. I guess what I'd like to do is apply effects to multiple objects with a single click box. Is that possible?
    Thank you.

    Welcome to our community
    Sure it can be done but you won't use effects to do it.
    When you insert an object in Captivate, you have an option to enable or disable Visibility. You also have an option to name the object. So you would give the object a meaningful name and clear the Visibility option to "hide" it until needed.
    Then you would create an Advanced Action that would hide some objects and show others.
    After that, you would assign the Advanced Action to a Click Box or a Button or some other event.
    Cheers... Rick
    Helpful and Handy Links
    Captivate Wish Form/Bug Reporting Form
    Adobe Certified Captivate Training
    SorcerStone Blog
    Captivate eBooks

  • Single click object selection painfully slow

    Hi,
    I don't have any particular speed issue with illustrator CS6 in general.
    However there is a massive speed problem when I'm trying to select on object on the artboard with a single click.
    Is anyone else having the same issue? Is it simply a setting that may be wrong somewhere for me?
    When selecting a object by creating a "rectangle" over the object it works fine and normal speed.
    When clicking the object to select it, nothing happens for about 3/4 seconds, then the loading little rainbow circle appears and loads for another 3/4 seconds...
    I really don't understand what's happening.
    If anyone could help me that would be greatly appreciated (it's driving me insane)...
    Thanks

    Nevermind...
    Finally found the reason after hours searching on the Adobe forum or google, and battling with different settings in illustrator...
    For those who may encounter the same issue, I'm running "RightZoom" on my Mac to fully maximize my windows.
    For some reasons they don't seem to like each other! Well, Illustrator doesn't like RightZoom...
    To fix the issue, simply open RightZoom and deactive it for the time you're using Illustrator CS6. Job done, working super fine
    You can re-activate "RightZoom" whilst you're done with Illustrator.
    Hope it can save someone the hassle I had!

  • Version 4 Bug - Multiple Object Editors of Same Object on Single Click

    Hi Jeff,
    thanks for your reply. You have missed that rule because you don't use SQL Developer for development. But never mind, lets go through it...
    1) Of course I have both options activated (all preferences were imported from previous version). The difference between previous version is that when you click on the SAME table multiple times - in the old version, it opened the table just once and in case you had another tab active, it swithed to the tab where the table was opened. So to have it clear, in the old version when you have table A and table B, both opened in separate tab and the focus was on table B, when you clicked on table A (in the tree) it activated tab with table A. It didn't create new tab with table A. Of course - why would I want to have multiple tabs opened with the same table??? In current version clicking on the same table multiple times, opens multiple tabs with the same table.
    This is also the reason why it sometimes openes a table multiple times even when you click it just once. This you cannot simulate because you are probably connecting to some local DB when you have perfect connection. Activate the autopin function and connect to different DBs all over the world and you will see what I mean. Right now, I have opened a connection and got 3 tabs opened, just after a single click on a table.
    2) Fetch size is again taken from previous version of SQL Developer and is set to 50. PgUp and PgDown are not working at all. I am talking about scrolling with a mouse wheel. In the old version it is working normally as expected. In this version if you scroll using a mouse wheel, the scroll speed is about 1 or even 0.5 lines per wheel round - so you can even not use a mouse wheel for scrolling! On all other places in this new release (connection tree, packages, ...) the scrolling is working normally, in the table it is unusable.
    3) I don't say it is on every table and every click. I cannot tell you how often is it because I am not using the new version. I am quite sure this is dependent on the connection speed maybe connectin quality. The difference between previous version is that in the previous version, refresh always worked. This particular issue cannot be solved by testing and searching for some rule when it happens. You must check the code and see when you display it!
    4) My screen resolution is 1920x1200, but that is only because I have an external monitor connected to my laptop. My laptop resolution is only 1366x768. Switch to this resolution and open the View menu.
    New worksheet - yes, this is exactly what I mean. I have planty of connections, for sure over 100 - but this is irelevant. Whenever you do a menu which can grow, you need to do it scrollable!!!
    I am not sure what you mean by Flyout menus, but I am scared only to hear about it

    Screen resolution, no scrolling on menus - that's a bug. Severity 2, a bad one, as you have noticed, and we'll try to make sure it's addressed for version 4.0.
    The other issue isn't as straightforward as you insinuate. I know you don't care about the particulars or why you might see this issue, so I won't bore you. But, we are aware that this is still coming up more frequently that it should, and we're on a big bug hunt to eradicate the behavior completely. It's not a simple thing, so it will more likely be incremental improvements. That being said, we are seeing it MUCH less than in previous versions of the tool.

  • Abap object oriented

    Hi experts.,
    i am very new in  abap oo . please give me documentation and if possible sample   code.
    thanks in advance,

    Some documentation related with OOPs Abao :
    oops_beginers
    http://help.sap.com/saphelp_nw04/helpdata/en/ce/b518b6513611d194a50000e8353423/frameset.htm
    ALV Gird Control (BC-SRV-ALE)
    SAP Container
    SAP Control Framework
    or Thread New To OOPs ABAP
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/webas/abap/abap%20code%20samples/abap%20objects/abap%20code%20sample%20to%20learn%20basic%20concept%20of%20object-oriented%20programming.doc
    General Tutorial for OOPS
    check all the below links
    http://www.sapgenie.com/abap/OO/index.htm
    http://www.geocities.com/victorav15/sapr3/abap_ood.html
    http://www.brabandt.de/html/abap_oo.html
    Check this cool weblog:
    /people/thomas.jung3/blog/2004/12/08/abap-persistent-classes-coding-without-sql
    /people/thomas.jung3/blog/2004/12/08/abap-persistent-classes-coding-without-sql
    http://help.sap.com/saphelp_nw04/helpdata/en/c3/225b6254f411d194a60000e8353423/frameset.htm
    http://www.sapgenie.com/abap/OO/
    http://www.sapgenie.com/abap/OO/index.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/c3/225b5654f411d194a60000e8353423/content.htm
    http://www.esnips.com/doc/375fff1b-5a62-444d-8ec1-55508c308b17/prefinalppt.ppt
    http://www.esnips.com/doc/2c76dc57-e74a-4539-a20e-29383317e804/OO-abap.pdf
    http://www.esnips.com/doc/5c65b0dd-eddf-4512-8e32-ecd26735f0f2/prefinalppt.ppt
    http://www.allsaplinks.com/
    http://www.sap-img.com/
    http://www.sapgenie.com/
    http://help.sap.com
    http://www.sapgenie.com/abap/OO/
    http://www.sapgenie.com/abap/OO/index.htm
    http://www.sapgenie.com/abap/controls/index.htm
    http://www.esnips.com/doc/2c76dc57-e74a-4539-a20e-29383317e804/OO-abap.pdf
    http://www.esnips.com/doc/0ef39d4b-586a-4637-abbb-e4f69d2d9307/SAP-CONTROLS-WORKSHOP.pdf
    http://www.sapgenie.com/abap/OO/index.htm
    http://help.sap.com/saphelp_erp2005/helpdata/en/ce/b518b6513611d194a50000e8353423/frameset.htm
    http://www.sapgenie.com/abap/OO/
    these links
    http://help.sap.com/saphelp_47x200/helpdata/en/ce/b518b6513611d194a50000e8353423/content.htm
    For funtion module to class
    http://help.sap.com/saphelp_47x200/helpdata/en/c3/225b5954f411d194a60000e8353423/content.htm
    for classes
    http://help.sap.com/saphelp_47x200/helpdata/en/c3/225b5c54f411d194a60000e8353423/content.htm
    for methods
    http://help.sap.com/saphelp_47x200/helpdata/en/08/d27c03b81011d194f60000e8353423/content.htm
    for inheritance
    http://help.sap.com/saphelp_47x200/helpdata/en/dd/4049c40f4611d3b9380000e8353423/content.htm
    for interfaces
    http://help.sap.com/saphelp_47x200/helpdata/en/c3/225b6254f411d194a60000e8353423/content.htm
    Check these links.
    http://www.henrikfrank.dk/abapuk.html
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/webas/abap/abap%20code%20samples/abap%20objects/abap%20code%20sample%20to%20learn%20basic%20concept%20of%20object-oriented%20programming.doc
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/webas/abap/abap%20code%20samples/alv%20grid/abap%20code%20sample%20to%20display%20data%20in%20alv%20grid%20using%20object%20oriented%20programming.doc
    Go through the below links,
    For Materials:
    1) http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCABA/BCABA.pdf -- Page no: 1291
    2) http://esnips.com/doc/5c65b0dd-eddf-4512-8e32-ecd26735f0f2/prefinalppt.ppt
    3) http://esnips.com/doc/2c76dc57-e74a-4539-a20e-29383317e804/OO-abap.pdf
    4) http://esnips.com/doc/0ef39d4b-586a-4637-abbb-e4f69d2d9307/SAP-CONTROLS-WORKSHOP.pdf
    5) http://esnips.com/doc/92be4457-1b6e-4061-92e5-8e4b3a6e3239/Object-Oriented-ABAP.ppt
    6) http://esnips.com/doc/448e8302-68b1-4046-9fef-8fa8808caee0/abap-objects-by-helen.pdf
    7) http://esnips.com/doc/39fdc647-1aed-4b40-a476-4d3042b6ec28/class_builder.ppt
    8) http://www.amazon.com/gp/explorer/0201750805/2/ref=pd_lpo_ase/102-9378020-8749710?ie=UTF8
    OO ABAP links:
    1) http://www.erpgenie.com/sap/abap/OO/index.htm
    2) http://help.sap.com/saphelp_nw04/helpdata/en/ce/b518b6513611d194a50000e8353423/frameset.htm
    go through these links
    http://www.erpgenie.com/abap/index.htm
    http://sic.fh-lu.de/sic/bic.nsf/(vJobangebote)/EC8AD2AE0349CE92C12572200026FDB8/$File/Intern%20or%20Working%20Student%20as%20ABAB%20OO%20Developer.pdf?Open
    http://help.sap.com/saphelp_nw2004s/helpdata/en/43/41341147041806e10000000a1553f6/frameset.htm
    http://help.sap.com/saphelp_47x200/helpdata/en/ce/b518b6513611d194a50000e8353423/frameset.htm
    ABAP_OBJECTS_ENJOY_0 Template for Solutions of ABAP Object Enjoy Course
    ABAP_OBJECTS_ENJOY_1 Model Solution 1: ABAP Objects Enjoy Course
    ABAP_OBJECTS_ENJOY_2 Model Solution 2: ABAP Objects Enjoy Course
    ABAP_OBJECTS_ENJOY_3 Model Solution 3: ABAP Objects Enjoy Course
    ABAP_OBJECTS_ENJOY_4 Model Solution 4: ABAP Objects Enjoy Course
    ABAP_OBJECTS_ENJOY_5 Model Solution 5: ABAP Objects Enjoy Course
    DEMO_ABAP_OBJECTS Complete Demonstration for ABAP Objects
    DEMO_ABAP_OBJECTS_CONTROLS GUI Controls on Screen
    DEMO_ABAP_OBJECTS_EVENTS Demonstration of Events in ABAP Objects
    DEMO_ABAP_OBJECTS_GENERAL ABAP Objects Demonstration
    DEMO_ABAP_OBJECTS_INTERFACES Demonstration of Interfaces in ABAP Objects
    DEMO_ABAP_OBJECTS_METHODS Demonstration of Methods in ABAP Objects
    DEMO_ABAP_OBJECTS_SPLIT_SCREEN Splitter Control on Screen
    check the below links lot of info and examples r there
    http://www.sapgenie.com/abap/OO/index.htm
    http://www.geocities.com/victorav15/sapr3/abap_ood.html
    http://www.brabandt.de/html/abap_oo.html
    Check this cool weblog:
    /people/thomas.jung3/blog/2004/12/08/abap-persistent-classes-coding-without-sql
    /people/thomas.jung3/blog/2004/12/08/abap-persistent-classes-coding-without-sql
    http://help.sap.com/saphelp_nw04/helpdata/en/c3/225b6254f411d194a60000e8353423/frameset.htm
    http://www.sapgenie.com/abap/OO/
    http://www.sapgenie.com/abap/OO/index.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/c3/225b5654f411d194a60000e8353423/content.htm
    http://www.esnips.com/doc/375fff1b-5a62-444d-8ec1-55508c308b17/prefinalppt.ppt
    http://www.esnips.com/doc/2c76dc57-e74a-4539-a20e-29383317e804/OO-abap.pdf
    http://www.esnips.com/doc/5c65b0dd-eddf-4512-8e32-ecd26735f0f2/prefinalppt.ppt
    http://www.allsaplinks.com/
    http://www.sap-img.com/
    http://www.sapgenie.com/
    http://help.sap.com
    http://www.sapgenie.com/abap/OO/
    http://www.sapgenie.com/abap/OO/index.htm
    http://www.sapgenie.com/abap/controls/index.htm
    http://www.esnips.com/doc/2c76dc57-e74a-4539-a20e-29383317e804/OO-abap.pdf
    http://www.esnips.com/doc/0ef39d4b-586a-4637-abbb-e4f69d2d9307/SAP-CONTROLS-WORKSHOP.pdf
    http://www.sapgenie.com/abap/OO/index.htm
    http://help.sap.com/saphelp_erp2005/helpdata/en/ce/b518b6513611d194a50000e8353423/frameset.htm
    http://www.sapgenie.com/abap/OO/
    these links
    http://help.sap.com/saphelp_47x200/helpdata/en/ce/b518b6513611d194a50000e8353423/content.htm
    For funtion module to class
    http://help.sap.com/saphelp_47x200/helpdata/en/c3/225b5954f411d194a60000e8353423/content.htm
    for classes
    http://help.sap.com/saphelp_47x200/helpdata/en/c3/225b5c54f411d194a60000e8353423/content.htm
    for methods
    http://help.sap.com/saphelp_47x200/helpdata/en/08/d27c03b81011d194f60000e8353423/content.htm
    for inheritance
    http://help.sap.com/saphelp_47x200/helpdata/en/dd/4049c40f4611d3b9380000e8353423/content.htm
    for interfaces
    http://help.sap.com/saphelp_47x200/helpdata/en/c3/225b6254f411d194a60000e8353423/content.htm
    For Materials:
    1) http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCABA/BCABA.pdf -- Page no: 1291
    2) http://esnips.com/doc/5c65b0dd-eddf-4512-8e32-ecd26735f0f2/prefinalppt.ppt
    3) http://esnips.com/doc/2c76dc57-e74a-4539-a20e-29383317e804/OO-abap.pdf
    4) http://esnips.com/doc/0ef39d4b-586a-4637-abbb-e4f69d2d9307/SAP-CONTROLS-WORKSHOP.pdf
    5) http://esnips.com/doc/92be4457-1b6e-4061-92e5-8e4b3a6e3239/Object-Oriented-ABAP.ppt
    6) http://esnips.com/doc/448e8302-68b1-4046-9fef-8fa8808caee0/abap-objects-by-helen.pdf
    7) http://esnips.com/doc/39fdc647-1aed-4b40-a476-4d3042b6ec28/class_builder.ppt
    8) http://www.amazon.com/gp/explorer/0201750805/2/ref=pd_lpo_ase/102-9378020-8749710?ie=UTF8
    1) http://www.erpgenie.com/sap/abap/OO/index.htm
    2) http://help.sap.com/saphelp_nw04/helpdata/en/ce/b518b6513611d194a50000e8353423/frameset.htm
    ALVOOPS
    http://www.abap4.it/download/ALV.pdf
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/e8a1d690-0201-0010-b7ad-d9719a415907
    http://www.erpgenie.com/abap/controls/alvgrid.htm
    OOPS with ABAP
    https://www.sdn.sap.com/irj/sdn/wiki?path=/pages/viewpage.action&pageid=37566
    /people/rich.heilman2/blog/2005/07/27/dynamic-internal-tables-and-structures--abap
    http://www.sapgenie.com/abap/OO/
    For understanding COntrol Frameworks in OO ABAP, check this.
    http://www.sapgenie.com/abap/controls/index.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/ce/b518b6513611d194a50000e8353423/content.htm
    http://www.sapgenie.com/abap/OO/
    http://www.sapgenie.com/abap/OO/index.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/c3/225b5654f411d194a60000e8353423/content.htm
    http://www.esnips.com/doc/375fff1b-5a62-444d-8ec1-55508c308b17/prefinalppt.ppt
    http://www.esnips.com/doc/2c76dc57-e74a-4539-a20e-29383317e804/OO-abap.pdf
    http://www.esnips.com/doc/5c65b0dd-eddf-4512-8e32-ecd26735f0f2/prefinalppt.ppt
    http://www.allsaplinks.com/
    http://www.sap-img.com/
    http://www.sapgenie.com/
    http://help.sap.com
    http://www.sapgenie.com/abap/OO/
    http://www.sapgenie.com.
    http://www.sapgenie.com/abap/OO/index.htm
    http://www.sapgenie.com/abap/controls/index.htm
    http://www.esnips.com/doc/2c76dc57-e74a-4539-a20e-29383317e804/OO-abap.pdf
    http://www.esnips.com/doc/0ef39d4b-586a-4637-abbb-e4f69d2d9307/SAP-CONTROLS-WORKSHOP.pdf
    http://www.sapgenie.com/abap/OO/index.htm
    http://help.sap.com/saphelp_erp2005/helpdata/en/ce/b518b6513611d194a50000e8353423/frameset.htm
    http://www.sapgenie.com/abap/OO/
    http://www.sapgenie.com/abap/OO/index.htm
    http://www.geocities.com/victorav15/sapr3/abap_ood.html
    http://www.brabandt.de/html/abap_oo.html
    ALVOOPS
    http://www.erpgenie.com/abap/controls/alvgrid.htm
    OOPS with ABAP
    https://www.sdn.sap.com/irj/sdn/wiki?path=/pages/viewpage.action&pageid=37566
    /people/rich.heilman2/blog/2005/07/27/dynamic-internal-tables-and-structures--abap
    http://www.sapgenie.com/abap/OO/
    For understanding COntrol Frameworks in OO ABAP, check this.
    http://www.sapgenie.com/abap/controls/index.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/ce/b518b6513611d194a50000e8353423/content.htm
    http://www.sapgenie.com/abap/OO/
    http://www.sapgenie.com/abap/OO/index.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/c3/225b5654f411d194a60000e8353423/content.htm
    http://www.esnips.com/doc/375fff1b-5a62-444d-8ec1-55508c308b17/prefinalppt.ppt
    http://www.esnips.com/doc/2c76dc57-e74a-4539-a20e-29383317e804/OO-abap.pdf
    http://www.esnips.com/doc/5c65b0dd-eddf-4512-8e32-ecd26735f0f2/prefinalppt.ppt
    http://www.allsaplinks.com/
    http://www.sap-img.com/
    http://www.sapgenie.com/
    http://help.sap.com
    http://www.sapgenie.com/abap/OO/
    http://www.sapgenie.com.
    http://www.sapgenie.com/abap/OO/index.htm
    http://www.sapgenie.com/abap/controls/index.htm
    http://www.esnips.com/doc/2c76dc57-e74a-4539-a20e-29383317e804/OO-abap.pdf
    http://www.esnips.com/doc/0ef39d4b-586a-4637-abbb-e4f69d2d9307/SAP-CONTROLS-WORKSHOP.pdf
    http://www.sapgenie.com/abap/OO/index.htm
    http://help.sap.com/saphelp_erp2005/helpdata/en/ce/b518b6513611d194a50000e8353423/frameset.htm
    http://www.sapgenie.com/abap/OO/
    http://www.sapgenie.com/abap/OO/index.htm
    http://www.geocities.com/victorav15/sapr3/abap_ood.html
    http://www.brabandt.de/html/abap_oo.html
    Regarding  ALV Grid  Control using OOPs concepts
    Regarding  ALV Grid  Control using OOPs concepts
    OOPS – OO ABAP
    http://esnips.com/doc/5c65b0dd-eddf-4512-8e32-ecd26735f0f2/prefinalppt.ppt
    http://esnips.com/doc/2c76dc57-e74a-4539-a20e-29383317e804/OO-abap.pdf
    http://esnips.com/doc/0ef39d4b-586a-4637-abbb-e4f69d2d9307/SAP-CONTROLS-WORKSHOP.pdf
    http://esnips.com/doc/92be4457-1b6e-4061-92e5-8e4b3a6e3239/Object-Oriented-ABAP.ppt
    http://esnips.com/doc/448e8302-68b1-4046-9fef-8fa8808caee0/abap-objects-by-helen.pdf
    http://esnips.com/doc/39fdc647-1aed-4b40-a476-4d3042b6ec28/class_builder.ppt
    http://www.amazon.com/gp/explorer/0201750805/2/ref=pd_lpo_ase/102-9378020-8749710?ie=UTF8
    http://help.sap.com/saphelp_nw04/helpdata/en/c3/225b5654f411d194a60000e8353423/content.htm
    http://help.sap.com/saphelp_nw2004s/helpdata/en/c3/225b5654f411d194a60000e8353423/content.htm
    DIRLL DOWN AND INTERACTIVE REPORT
    http://www.sap-img.com/abap/difference-between-drilldown-report-and-interactive-report.htm
    PAGE BREAK FOR ALV LIST
    check out this link
    http://www.abap4.it/download/ALV.pdf
    good book on ABAP objects(OOPS)
    http://www.esnips.com/doc/bc475662-82d6-4412-9083-28a7e7f1ce09/Abap-Objects---An-Introduction-To-Programming-Sap-Applications
    How to check Cluster Table Data
    https://forums.sdn.sap.com/click.jspa?searchID=5215473&messageID=3520315
    http://www.sap-img.com/abap/the-different-types-of-sap-tables.htm
    http://help.sap.com/saphelp_47x200/helpdata/en/81/415d363640933fe10000009b38f839/frameset.htm
    Check this cool weblog:
    /people/thomas.jung3/blog/2004/12/08/abap-persistent-classes-coding-without-sql
    /people/thomas.jung3/blog/2004/12/08/abap-persistent-classes-coding-without-sql
    http://help.sap.com/saphelp_nw04/helpdata/en/c3/225b6254f411d194a60000e8353423/frameset.htm
    http://www.sapgenie.com/abap/OO/
    http://www.sapgenie.com/abap/OO/index.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/c3/225b5654f411d194a60000e8353423/content.htm
    http://www.esnips.com/doc/375fff1b-5a62-444d-8ec1-55508c308b17/prefinalppt.ppt
    http://www.esnips.com/doc/2c76dc57-e74a-4539-a20e-29383317e804/OO-abap.pdf
    http://www.esnips.com/doc/5c65b0dd-eddf-4512-8e32-ecd26735f0f2/prefinalppt.ppt
    http://www.allsaplinks.com/
    http://www.sap-img.com/
    http://www.sapgenie.com/
    http://help.sap.com
    http://www.sapgenie.com/abap/OO/
    http://www.sapgenie.com/abap/OO/index.htm
    http://www.sapgenie.com/abap/controls/index.htm
    http://www.esnips.com/doc/2c76dc57-e74a-4539-a20e-29383317e804/OO-abap.pdf
    http://www.esnips.com/doc/0ef39d4b-586a-4637-abbb-e4f69d2d9307/SAP-CONTROLS-WORKSHOP.pdf
    http://www.sapgenie.com/abap/OO/index.htm
    http://help.sap.com/saphelp_erp2005/helpdata/en/ce/b518b6513611d194a50000e8353423/frameset.htm
    http://www.sapgenie.com/abap/OO/
    these links
    http://help.sap.com/saphelp_47x200/helpdata/en/ce/b518b6513611d194a50000e8353423/content.htm
    For funtion module to class
    http://help.sap.com/saphelp_47x200/helpdata/en/c3/225b5954f411d194a60000e8353423/content.htm
    for classes
    http://help.sap.com/saphelp_47x200/helpdata/en/c3/225b5c54f411d194a60000e8353423/content.htm
    for methods
    http://help.sap.com/saphelp_47x200/helpdata/en/08/d27c03b81011d194f60000e8353423/content.htm
    for inheritance
    http://help.sap.com/saphelp_47x200/helpdata/en/dd/4049c40f4611d3b9380000e8353423/content.htm
    for interfaces
    http://help.sap.com/saphelp_47x200/helpdata/en/c3/225b6254f411d194a60000e8353423/content.htm
    For Materials:
    1) http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCABA/BCABA.pdf -- Page no: 1291
    2) http://esnips.com/doc/5c65b0dd-eddf-4512-8e32-ecd26735f0f2/prefinalppt.ppt
    3) http://esnips.com/doc/2c76dc57-e74a-4539-a20e-29383317e804/OO-abap.pdf
    4) http://esnips.com/doc/0ef39d4b-586a-4637-abbb-e4f69d2d9307/SAP-CONTROLS-WORKSHOP.pdf
    5) http://esnips.com/doc/92be4457-1b6e-4061-92e5-8e4b3a6e3239/Object-Oriented-ABAP.ppt
    6) http://esnips.com/doc/448e8302-68b1-4046-9fef-8fa8808caee0/abap-objects-by-helen.pdf
    7) http://esnips.com/doc/39fdc647-1aed-4b40-a476-4d3042b6ec28/class_builder.ppt
    8) http://www.amazon.com/gp/explorer/0201750805/2/ref=pd_lpo_ase/102-9378020-8749710?ie=UTF8
    1) http://www.erpgenie.com/sap/abap/OO/index.htm
    2) http://help.sap.com/saphelp_nw04/helpdata/en/ce/b518b6513611d194a50000e8353423/frameset.htm
    COLOURING Single Columan
    http://www.sapfans.com/forums/viewtopic.php?t=52107
    Check this thread to get more idea about ALVs.
    Interactive ALV
    Rewards if useful.............
    Minal

  • Single click on tree control navigation

    Hello I have a tree control where I have include the navigation, I know that there is a method
    HANDLE_NODE_DOUBLE_CLICK FOR G_TREE
    but is there an method for only one click, I want to change my alv grid data when I click on several nodes in my tree control

    Hello Muhammet
    I have re-written my sample report ZUS_SDN_TWO_ALV_GRIDS into ZUS_SDN_TREE_AND_GRID_CONTROL which is now display a tree control together with the ALV grid.
    When you analyze this new report you will see that every step of the program logic is as I described in my previous e-mails.
    *& Report  ZUS_SDN_TWO_ALV_GRIDS
    *& Screen '0100' contains no elements.
    *& ok_code -> assigned to GD_OKCODE
    *& Flow logic:
    *  PROCESS BEFORE OUTPUT.
    *    MODULE STATUS_0100.
    *  PROCESS AFTER INPUT.
    *    MODULE USER_COMMAND_0100.
    *& Thread: single click on tree control navigation
    *& <a class="jive_macro jive_macro_thread" href="" __jive_macro_name="thread" modifiedtitle="true" __default_attr="1143770"></a>
    REPORT  zus_sdn_tree_and_grid_control.
    TYPE-POOLS: abap, cntl.
    TYPES: node_table_type LIKE STANDARD TABLE OF mtreesnode
             WITH DEFAULT KEY.
    * CAUTION: MTREESNODE is the name of the node structure which must
    * be defined by the programmer. DO NOT USE MTREESNODE!
    CONSTANTS:
      BEGIN OF c_nodekey,
        root   TYPE tv_nodekey VALUE 'Root',                    "#EC NOTEXT
        child1 TYPE tv_nodekey VALUE 'Child1',                  "#EC NOTEXT
    *    child2 type tv_nodekey value 'Child2',                  "#EC NOTEXT
        new1   TYPE tv_nodekey VALUE 'New1',                    "#EC NOTEXT
        new2   TYPE tv_nodekey VALUE 'New2',                    "#EC NOTEXT
    *    new3   type tv_nodekey value 'New3',                    "#EC NOTEXT
    *    new4   type tv_nodekey value 'New4',                    "#EC NOTEXT
      END OF c_nodekey.
    DATA:
      gd_okcode        TYPE ui_func,
      gd_repid         TYPE syst-repid,
      go_docking       TYPE REF TO cl_gui_docking_container,
      go_splitter      TYPE REF TO cl_gui_splitter_container,
      go_cell_left     TYPE REF TO cl_gui_container,
      go_cell_right    TYPE REF TO cl_gui_container,
      go_tree          TYPE REF TO cl_gui_simple_tree,
      go_grid1         TYPE REF TO cl_gui_alv_grid,
    **  go_grid2         TYPE REF TO cl_gui_alv_grid,
      gs_layout        TYPE lvc_s_layo.
    DATA:
      gt_knb1          TYPE STANDARD TABLE OF knb1,
      gt_knvv          TYPE STANDARD TABLE OF knvv.
    *       CLASS lcl_eventhandler DEFINITION
    CLASS lcl_eventhandler DEFINITION.
      PUBLIC SECTION.
        CLASS-METHODS:
          handle_double_click FOR EVENT double_click OF cl_gui_alv_grid
            IMPORTING
              e_row
              e_column
              es_row_no
              sender.
    ENDCLASS.                    "lcl_eventhandler DEFINITION
    *       CLASS lcl_eventhandler IMPLEMENTATION
    CLASS lcl_eventhandler IMPLEMENTATION.
      METHOD handle_double_click.
    *   define local data
        DATA:
          ls_knb1      TYPE knb1.
        CHECK ( sender = go_grid1 ).
        READ TABLE gt_knb1 INTO ls_knb1 INDEX e_row-index.
        CHECK ( ls_knb1-kunnr IS NOT INITIAL ).
    **    CALL METHOD go_grid1->set_current_cell_via_id
    **      EXPORTING
    ***        IS_ROW_ID    =
    ***        IS_COLUMN_ID =
    **        is_row_no    = es_row_no.
    *   Triggers PAI of the dynpro with the specified ok-code
        CALL METHOD cl_gui_cfw=>set_new_ok_code( 'DETAIL' ).
      ENDMETHOD.                    "handle_double_click
    ENDCLASS.                    "lcl_eventhandler IMPLEMENTATION
    *       CLASS LCL_APPLICATION DEFINITION
    CLASS lcl_application DEFINITION.
      PUBLIC SECTION.
        CLASS-DATA:
          md_event       TYPE string     READ-ONLY,
          md_node_key    TYPE tv_nodekey READ-ONLY.
        CLASS-METHODS:
          handle_node_double_click
            FOR EVENT node_double_click
            OF cl_gui_simple_tree
            IMPORTING node_key,
          handle_expand_no_children
            FOR EVENT expand_no_children
            OF cl_gui_simple_tree
            IMPORTING node_key.
    ENDCLASS.                    "LCL_APPLICATION DEFINITION
    *       CLASS LCL_APPLICATION IMPLEMENTATION
    CLASS lcl_application IMPLEMENTATION.
      METHOD  handle_node_double_click.
        " this method handles the node double click event of the tree
        " control instance
        " show the key of the double clicked node in a dynpro field
        md_event = 'NODE_DOUBLE_CLICK'.
        md_node_key = node_key.
        " Trigger PAI and set ok-code = 'DETAIL'
        CALL METHOD cl_gui_cfw=>set_new_ok_code
          EXPORTING
            new_code = 'DETAIL'
    *      IMPORTING
    *        rc       =
        MESSAGE md_node_key TYPE 'I'.
      ENDMETHOD.                    "HANDLE_NODE_DOUBLE_CLICK
      METHOD handle_expand_no_children.
        " this method handles the expand no children event of the tree
        " control instance
        DATA: node_table TYPE node_table_type,
              node TYPE mtreesnode.
        " show the key of the double clicked node in a dynpro field
        md_event = 'EXPAND_NO_CHILDREN'.
        md_node_key = node_key.
        IF node_key = 'Child1'.
    * add two nodes to the tree control (the children of 'Child1')
    * Node with key 'New1'
          CLEAR node.
          node-node_key = c_nodekey-new1.
          node-relatkey = c_nodekey-child1.
          node-relatship = cl_gui_simple_tree=>relat_last_child.
          node-isfolder = ' '.
          node-text = 'New1'(ne1).
          APPEND node TO node_table.
    * Node with key 'New2'
          CLEAR node.
          node-node_key = c_nodekey-new2.
          node-relatkey = c_nodekey-child1.
          node-relatship = cl_gui_simple_tree=>relat_last_child.
          node-n_image = '@10@'.
          node-expander = ' '.
          node-text = 'New2'(ne2).
          APPEND node TO node_table.
          CALL METHOD go_tree->add_nodes
            EXPORTING
              table_structure_name           = 'MTREESNODE'
              node_table                     = node_table
            EXCEPTIONS
              failed                         = 1
              error_in_node_table            = 2
              dp_error                       = 3
              table_structure_name_not_found = 4
              OTHERS                         = 5.
          IF sy-subrc <> 0.
    **        MESSAGE A000.
          ENDIF.
        ENDIF.
      ENDMETHOD.                    "HANDLE_EXPAND_NO_CHILDREN
    ENDCLASS.                    "LCL_APPLICATION IMPLEMENTATION
    START-OF-SELECTION.
      SELECT        * FROM  knb1 INTO TABLE gt_knb1 UP TO 100 ROWS
             WHERE  bukrs  = '1000'.
      PERFORM init_controls.
    * Display data
      gs_layout-grid_title = 'Customers: Sales Areas'.
      CALL METHOD go_grid1->set_table_for_first_display
        EXPORTING
          i_structure_name = 'KNVV'
          is_layout        = gs_layout
        CHANGING
          it_outtab        = gt_knvv
        EXCEPTIONS
          OTHERS           = 4.
      IF sy-subrc <> 0.
    *   MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *              WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    * Link the docking container to the target dynpro
      gd_repid = syst-repid.
      CALL METHOD go_docking->link
        EXPORTING
          repid                       = gd_repid
          dynnr                       = '0100'
    *      CONTAINER                   =
        EXCEPTIONS
          OTHERS                      = 4.
      IF sy-subrc <> 0.
    *   MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *              WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    * NOTE: dynpro does not contain any elements
      CALL SCREEN '0100'.
    * Flow logic of dynpro (does not contain any dynpro elements):
    *PROCESS BEFORE OUTPUT.
    *  MODULE STATUS_0100.
    *PROCESS AFTER INPUT.
    *  MODULE USER_COMMAND_0100.
    END-OF-SELECTION.
    *&      Module  STATUS_0100  OUTPUT
    *       text
    MODULE status_0100 OUTPUT.
      SET PF-STATUS 'STATUS_0100'.  " contains push button "DETAIL"
    *  SET TITLEBAR 'xxx'.
    * Refresh display of detail ALV list
      CALL METHOD go_grid1->refresh_table_display
    *    EXPORTING
    *      IS_STABLE      =
    *      I_SOFT_REFRESH =
        EXCEPTIONS
          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.
    ENDMODULE.                 " STATUS_0100  OUTPUT
    *&      Module  USER_COMMAND_0100  INPUT
    *       text
    MODULE user_command_0100 INPUT.
      TRANSLATE gd_okcode TO UPPER CASE.
      CASE gd_okcode.
        WHEN 'BACK' OR
             'END'  OR
             'CANC'.
          SET SCREEN 0. LEAVE SCREEN.
    *   User has pushed button "Display Details"
        WHEN 'DETAIL'.
          MESSAGE gd_okcode TYPE 'I'.
          PERFORM entry_show_details.
        WHEN OTHERS.
      ENDCASE.
      CLEAR: gd_okcode.
    ENDMODULE.                 " USER_COMMAND_0100  INPUT
    *&      Form  ENTRY_SHOW_DETAILS
    *       text
    *  -->  p1        text
    *  <--  p2        text
    FORM entry_show_details .
    * define local data
      DATA:
        ld_row      TYPE i,
        ls_knb1     TYPE knb1.
      IF ( gt_knvv IS INITIAL ).
        SELECT        * FROM  knvv INTO TABLE gt_knvv
        FOR ALL ENTRIES IN gt_knb1
           WHERE  kunnr  = gt_knb1-kunnr.
      ELSE.
        REFRESH: gt_knvv.
      ENDIF.
    ENDFORM.                    " ENTRY_SHOW_DETAILS
    *&      Form  INIT_CONTROLS
    *       text
    *  -->  p1        text
    *  <--  p2        text
    FORM init_controls .
    * Create docking container
      CREATE OBJECT go_docking
        EXPORTING
          parent = cl_gui_container=>screen0
          ratio  = 90
        EXCEPTIONS
          OTHERS = 6.
      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 splitter container
      CREATE OBJECT go_splitter
        EXPORTING
          parent            = go_docking
          rows              = 1
          columns           = 2
    *      NO_AUTODEF_PROGID_DYNNR =
    *      NAME              =
        EXCEPTIONS
          cntl_error        = 1
          cntl_system_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.
    * Get cell container
      CALL METHOD go_splitter->get_container
        EXPORTING
          row       = 1
          column    = 1
        RECEIVING
          container = go_cell_left.
      CALL METHOD go_splitter->get_container
        EXPORTING
          row       = 1
          column    = 2
        RECEIVING
          container = go_cell_right.
    * Create ALV grids
      CREATE OBJECT go_grid1
        EXPORTING
          i_parent = go_cell_right
        EXCEPTIONS
          OTHERS   = 5.
      IF sy-subrc <> 0.
    *   MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *              WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    * Set event handler
      SET HANDLER:
        lcl_eventhandler=>handle_double_click FOR go_grid1.
      PERFORM create_and_init_tree.
    ENDFORM.                    " INIT_CONTROLS
    *&      Form  CREATE_AND_INIT_TREE
    *       text
    *  -->  p1        text
    *  <--  p2        text
    FORM create_and_init_tree .
      DATA: lt_node_table TYPE node_table_type,
            lt_events TYPE cntl_simple_events,
            ls_event TYPE cntl_simple_event.
    * create a tree control
      CREATE OBJECT go_tree
        EXPORTING
          parent                      = go_cell_left
          node_selection_mode         = cl_gui_simple_tree=>node_sel_mode_single      " single node selection is used
        EXCEPTIONS
          lifetime_error              = 1
          cntl_system_error           = 2
          create_error                = 3
          failed                      = 4
          illegal_node_selection_mode = 5.
      IF sy-subrc <> 0.
    **    MESSAGE a000.
      ENDIF.
    * define the events which will be passed to the backend
      " node double click
      ls_event-eventid = cl_gui_simple_tree=>eventid_node_double_click.
    **  ls_event-appl_event = 'X'. " process PAI if event occurs
      " NOTE: Do NOT register as application event !!!!!
      APPEND ls_event TO lt_events.
      CALL METHOD go_tree->set_registered_events
        EXPORTING
          events                    = lt_events
        EXCEPTIONS
          cntl_error                = 1
          cntl_system_error         = 2
          illegal_event_combination = 3.
      IF sy-subrc <> 0.
    **    MESSAGE a000.
      ENDIF.
      SET HANDLER:
        lcl_application=>handle_node_double_click   FOR go_tree,
        lcl_application=>handle_expand_no_children  FOR go_tree.
    * add some nodes to the tree control
    * NOTE: the tree control does not store data at the backend. If an
    * application wants to access tree data later, it must store the
    * tree data itself.
      PERFORM build_node_table USING lt_node_table.
    * node_table_structure_name     = 'MTREESNODE'
    *   A programmer using the tree control must create a structure in the
    *   dictionary. This structure must include the structure TREEV_NODE
    *   and must contain a character field with the name 'TEXT'.
      CALL METHOD go_tree->add_nodes
        EXPORTING
          table_structure_name           = 'MTREESNODE'
          node_table                     = lt_node_table
        EXCEPTIONS
          failed                         = 1
          error_in_node_table            = 2
          dp_error                       = 3
          table_structure_name_not_found = 4
          OTHERS                         = 5.
      IF sy-subrc <> 0.
    **    MESSAGE a000.
      ENDIF.
    ENDFORM.                    " CREATE_AND_INIT_TREE
    *&      Form  build_node_table
    *       text
    *  -->  p1        text
    *  <--  p2        text
    FORM build_node_table
      USING
        node_table TYPE node_table_type.
      DATA: node LIKE mtreesnode.
    * Build the node table.
    * Caution: The nodes are inserted into the tree according to the order
    * in which they occur in the table. In consequence, a node must not
    * occur in the node table before its parent node.
    * Node with key 'Root'
      node-node_key = c_nodekey-root.
      " Key of the node
      CLEAR node-relatkey.      " Special case: A root node has no parent
      CLEAR node-relatship.     " node.
      node-hidden = ' '.        " The node is visible,
      node-disabled = ' '.      " selectable,
      node-isfolder = 'X'.      " a folder.
      CLEAR node-n_image.       " Folder-/ Leaf-Symbol in state "closed":
      " use default.
      CLEAR node-exp_image.     " Folder-/ Leaf-Symbol in state "open":
      " use default
      CLEAR node-expander.      " see below.
      node-text = 'Root'(roo).
      APPEND node TO node_table.
    * Node with key 'Child1'
      node-node_key = c_nodekey-child1.
      " Key of the node
      " Node is inserted as child of the node with key 'Root'.
      node-relatkey = c_nodekey-root.
      node-relatship = cl_gui_simple_tree=>relat_last_child.
      node-hidden = ' '.
      node-disabled = ' '.
      node-isfolder = 'X'.
      CLEAR node-n_image.
      CLEAR node-exp_image.
      node-expander = 'X'. " The node is marked with a '+', although
      " it has no children. When the user clicks on the
      " + to open the node, the event
      " expand_no_children is fired. The programmer can
      " add the children of the
      " node within the event handler of the
      " expand_no_children event
      " (see method handle_expand_no_children
      " of class lcl_application)
      node-text = 'Child1'(ch1).
      node-style = cl_gui_simple_tree=>style_emphasized_positive.
      APPEND node TO node_table.
    ENDFORM.                    " build_node_table
    Regards
      Uwe

  • Re : select-options in abap-objects program

    Dear friends,
                      I want to give select-options in abap-objects program. How to give that.
                                 Thanking You
    with regards,
    Mani

    In the transaction SE24, enter your class name, click modify.
    in the tab named "Types" you have to declare two types. By example, if you want to receive one select-options that in your program that uses this class is declared like:
    " P_SAKNR FOR SKAT-SAKNR".
    you've got to declare two types in the class:
    a- TYPES:  begin of E_S_SAKNR,
                          sign(1),
                          option(2),
                          low(10),
                          high(10),
                      end of E_S_SAKNR.
    b - TYPES E_T_SAKNR type standard table of E_S_SAKNR.
    so, in the class method that you want to receive P_SAKNR as importing parameter. You got to do this:
    method TEST importing ET_SAKNR type E_T_SAKNR.
    now, in the implementation of this method you should be able to use ET_SAKNR as the same way as you usually use a parameter or a select-option. You could use it in a select with the operator IN by example..

  • Event handling in abap objects

    hello friends,
                        i want to use the event RAISE_LINK_CLICK for single click.
    but i dont want 2 use this event for alv table.
                       i am displaying vendor name in my top of page,if the user click of the vendor name a new window should pop-up displaying the vendor details.
            my code for top of page is
                      DATA: lr_grid TYPE REF TO cl_salv_form_layout_grid,
              lr_grid_1 TYPE REF TO cl_salv_form_layout_grid,
              lr_flow TYPE REF TO cl_salv_form_layout_flow,
              lr_label TYPE REF TO cl_salv_form_label,
              lr_text TYPE REF TO cl_salv_form_text,
              l_text TYPE string.
        CREATE OBJECT lr_grid.
        lr_grid_1 = lr_grid->create_grid( row = 1 column = 1 ).
        lr_text = lr_grid_1->create_text( row = 1 column = 1 colspan = 2 text = <b>vendor_name</b> ).
        lr_grid_1 = lr_grid->create_grid( row = 2 column = 1 ).
        lr_flow = lr_grid_1->create_flow( row = 2 column = 1 ).
        lr_text = lr_flow->create_text( text = 'Reconcillation Statement'(t02) tooltip = 'Reconcillation Statement'(t02) ).
        alv->set_top_of_list( lr_grid ).
            do uc the VENDOR NAME in bold,wen the user clicks on it the pop should appear.
            so how to use the event RAISE_LINK_CLICK for this purpose,or is there another way through

    Hi Amit,
    I answered the similar question last week. You can see here  or .
    This example demonstrates how to use a Hiperlink field in ALV. These example was based on 'SALV_DEMO_TABLE_COLUMNS' that contains Hiperlink, icon, Hotspot...
    The Code is:
    REPORT zsalv_mar NO STANDARD PAGE HEADING.
    *       CLASS lcl_handle_events DEFINITION
    CLASS lcl_handle_events DEFINITION.
      PUBLIC SECTION.
        METHODS:
          on_link_click FOR EVENT link_click OF cl_salv_events_table
            IMPORTING row column.
    ENDCLASS.                    "lcl_handle_events DEFINITION
    *       CLASS lcl_handle_events IMPLEMENTATION
    CLASS lcl_handle_events IMPLEMENTATION.
      METHOD on_link_click.
        DATA: l_row_string TYPE string,
              l_col_string TYPE string,
              l_row        TYPE char128.
        WRITE row TO l_row LEFT-JUSTIFIED.
        CONCATENATE text-i02 l_row INTO l_row_string SEPARATED BY space.
        CONCATENATE text-i03 column INTO l_col_string SEPARATED BY space.
        MESSAGE i000(0k) WITH 'Single Click' l_row_string l_col_string.
      ENDMETHOD.                    "on_single_click
    ENDCLASS.                    "lcl_handle_events IMPLEMENTATION
    DATA: gr_events TYPE REF TO lcl_handle_events.
    TYPES: BEGIN OF g_type_s_outtab.
    INCLUDE TYPE alv_tab.
    TYPES:   t_hyperlink TYPE salv_t_int4_column,
           END   OF g_type_s_outtab.
    DATA: gt_outtab TYPE STANDARD TABLE OF g_type_s_outtab.
    DATA: gr_table   TYPE REF TO cl_salv_table.
    TYPES: BEGIN OF g_type_s_hyperlink,
             handle    TYPE salv_de_hyperlink_handle,
             hyperlink TYPE service_rl,
             carrid    TYPE s_carrid,
           END   OF g_type_s_hyperlink.
    DATA: gt_hyperlink TYPE STANDARD TABLE OF g_type_s_hyperlink.
    SELECTION-SCREEN BEGIN OF BLOCK gen WITH FRAME.
    PARAMETERS: p_amount TYPE i DEFAULT 30.
    SELECTION-SCREEN END OF BLOCK gen.
    START-OF-SELECTION.
      PERFORM select_data.
      PERFORM display.
    *&      Form  select_data
    *       text
    *  -->  p1        text
    *  <--  p2        text
    FORM select_data .
      DATA: line_outtab  TYPE g_type_s_outtab,
            ls_hype      TYPE g_type_s_hyperlink,
            lt_hyperlink TYPE salv_t_int4_column,
            ls_hyperlink TYPE salv_s_int4_column,
            v_tabix      TYPE sytabix.
      SELECT *
        FROM alv_tab
        INTO CORRESPONDING FIELDS OF TABLE gt_outtab
            UP TO p_amount ROWS.
      LOOP AT gt_outtab INTO line_outtab.
        v_tabix = sy-tabix.
        ls_hype-handle    = sy-tabix.
        ls_hype-hyperlink = line_outtab-url.
        ls_hype-carrid    = line_outtab-carrid.
        INSERT ls_hype INTO TABLE gt_hyperlink.
        ls_hyperlink-columnname = 'URL'.
        ls_hyperlink-value      = sy-tabix.
        APPEND ls_hyperlink TO lt_hyperlink.
        line_outtab-t_hyperlink = lt_hyperlink.
        MODIFY gt_outtab FROM line_outtab INDEX v_tabix.
        CLEAR line_outtab.
        CLEAR lt_hyperlink.
        CLEAR ls_hyperlink.
      ENDLOOP.
    ENDFORM.                    " select_data
    *&      Form  display
    *       text
    *  -->  p1        text
    *  <--  p2        text
    FORM display .
      TRY.
          cl_salv_table=>factory(
            IMPORTING
              r_salv_table = gr_table
            CHANGING
              t_table      = gt_outtab ).
        CATCH cx_salv_msg.                                  "#EC NO_HANDLER
      ENDTRY.
      DATA: lr_functions TYPE REF TO cl_salv_functions_list.
      lr_functions = gr_table->get_functions( ).
      lr_functions->set_default( abap_true ).
    *... set the columns technical
      DATA: lr_columns TYPE REF TO cl_salv_columns_table,
            lr_column  TYPE REF TO cl_salv_column_table.
      lr_columns = gr_table->get_columns( ).
      lr_columns->set_optimize( abap_true ).
    *... §4.7 set hyperlink column
      DATA: lr_hyperlinks TYPE REF TO cl_salv_hyperlinks,
            ls_hyperlink  TYPE g_type_s_hyperlink.
      DATA: lr_functional_settings TYPE REF TO cl_salv_functional_settings.
      TRY.
          lr_columns->set_hyperlink_entry_column( 'T_HYPERLINK' ).
        CATCH cx_salv_data_error.                           "#EC NO_HANDLER
      ENDTRY.
      TRY.
          lr_column ?= lr_columns->get_column( 'URL' ).
          lr_column->set_cell_type( if_salv_c_cell_type=>link ).
          lr_column->set_long_text( 'URL' ).
        CATCH cx_salv_not_found.                            "#EC NO_HANDLER
      ENDTRY.
      lr_functional_settings = gr_table->get_functional_settings( ).
      lr_hyperlinks = lr_functional_settings->get_hyperlinks( ).
      LOOP AT gt_hyperlink INTO ls_hyperlink.
        TRY.
            lr_hyperlinks->add_hyperlink(
              handle    = ls_hyperlink-handle
              hyperlink = ls_hyperlink-hyperlink ).
          CATCH cx_salv_existing.                           "#EC NO_HANDLER
        ENDTRY.
      ENDLOOP.
      DATA: lr_events TYPE REF TO cl_salv_events_table.
      lr_events = gr_table->get_event( ).
      CREATE OBJECT gr_events.
      SET HANDLER gr_events->on_link_click FOR lr_events.
      gr_table->display( ).
    ENDFORM.                    " display
    Regards.
    Marcelo Ramos

  • Double click and single click Event

    Hi
      I want to add a Single Clcik event and Double click event  both on the same movie clip in as3 , its working but call both the event same time so how to fix it , please help us if u have any solution ..(

    did you double click enable your object AND add a doubleclick listener?  if so, what's the problem?

  • Single click on flash is not working for IE

    Any one know why single clicking on flash movies is not
    working in IE but works in other browsers?
    IE will only work with a double click. Any work around for
    this IE problem

    The single click issue is (I believe) related to an Active X
    change Microsoft made in an IE "patch."
    This might be what you're looking for:
    http://www.amarasoftware.com/flash-problem.htm
    There are many variations on this fix, but I believe you have
    to get the object and embed statements out of your HTML file and
    put them in a Javascrript file that is called by your HTML file.
    I have successfully made the change to a few pages, but not
    CF pages.
    Hope that helps.
    Rick

  • Abap objects and alv

    using abap objects and alv  There should be  push button (Switch drill down button) at the top of the report. While pressing Switch drill down button it should display a popup window like
    material
    material gorup
    plant
    For example if a material group is selected, the report should be displayed with respect to material group.
    For example if it is Plant, the report should be displayed with respect to Plant.
    Standard Drill down should be first with respect to material it should be displayed…after clicking it with respect to vendor it should be displayed…after that w.r.t month.
    There should be  push button ( topno button) at the top of the report.
    you have to choose a key figure field and press topno.if  PO value is chosen and if you press topno and give value as 3,the top three po value should be displayed.
    Totals for Po value, order quantity and GR quantity should be displayed..
    please, can anybody send me the code for above criteria immediatly.

    Go through the Standard programs.. BCALV_GRID_*
    BCALV_GRID_05 suits ur req.
    Regards
    Bhavani

  • Begin-of-transaction in ABAP Objects

    Hi,
    I have a question regarding the (implicit or explicit) begin of a transaction (read: SAP LUW) in ABAP Objects. In this piece of code
    CREATE OBJECT mapping.
    TRY.
      mapping->delete_all_embraced_mappings( ).
      mapping->merge_with_begda_overlap( ).
      mapping->merge_with_endda_overlap( ).
      mapping->store( ).
      COMMIT WORK.
    CATCH /my/mapping_exception.
      ROLLBACK WORK.
    ENDTRY. 
    I need a all-or-nohting logic, i.e. I'd like all the methods <i>delete..(), merge..()</i> and <i>store()</i> to run in a single transaction. If any of the methods throws a <i>/my/mapping_exception</i> I want all DB changes (carried out in the methods) rolled back.
    Now, how can a mark the <b>begin-of-transaction</b> (the counterpart of the commit work)? I couldn't find information about this in the docu or in the SDN. To prevent misunderstandings: I am building a web application with ABAP Objects, so no dialog steps, PBO-PAIs, function modules, performs etc. are involved!
    Regards,
    Sebastian Kamp

    Maybe by using
    SET UPDATE TASK LOCAL
    I think this command acts as a BeginOfTransaction command, it especifies that, till the next CommitWork, all the process has to be done as part of a Transaction.
    You could try something like this:
      TRY
          SET UPDATE TASK LOCAL
          <YOUR_PROCESS_HERE>
          COMMIT WORK
       CATCH
       ENDTRY
    Hope it helps.

  • Event handling in global class (abap object)

    Hello friends
    I have 1 problem regarding events in abap object... how to handel an event in global class in se24 .
    Regards
    Reema jain.
    Message was edited by:
            Reema Jain

    Hello Reema
    The following sample report shows how to handle event in principle (see the § marks)..
    The following sample report show customer data ("Header"; KNB1) in the first ALV list and sales areas ("Detail"; KNVV) for the selected customer (event double-click) in the second ALV list.
    *& Report  ZUS_SDN_TWO_ALV_GRIDS
    REPORT  zus_sdn_two_alv_grids.
    DATA:
      gd_okcode        TYPE ui_func,
      go_docking       TYPE REF TO cl_gui_docking_container,
      go_splitter      TYPE REF TO cl_gui_splitter_container,
      go_cell_top      TYPE REF TO cl_gui_container,
      go_cell_bottom   TYPE REF TO cl_gui_container,
      go_grid1         TYPE REF TO cl_gui_alv_grid,
      go_grid2         TYPE REF TO cl_gui_alv_grid,
      gs_layout        TYPE lvc_s_layo.
    DATA:
      gt_knb1          TYPE STANDARD TABLE OF knb1,
      gt_knvv          TYPE STANDARD TABLE OF knvv.
    "§1. Define and implement event handler method
    "     (Here: implemented as static methods of a local class)
    *       CLASS lcl_eventhandler DEFINITION
    CLASS lcl_eventhandler DEFINITION.
      PUBLIC SECTION.
        CLASS-METHODS:
          handle_double_click FOR EVENT double_click OF cl_gui_alv_grid
            IMPORTING
              e_row
              e_column
              es_row_no
              sender.
    ENDCLASS.                    "lcl_eventhandler DEFINITION
    *       CLASS lcl_eventhandler IMPLEMENTATION
    CLASS lcl_eventhandler IMPLEMENTATION.
      METHOD handle_double_click.
    *   define local data
        DATA:
          ls_knb1      TYPE knb1.
        CHECK ( sender = go_grid1 ).
        READ TABLE gt_knb1 INTO ls_knb1 INDEX e_row-index.
        CHECK ( ls_knb1-kunnr IS NOT INITIAL ).
        CALL METHOD go_grid1->set_current_cell_via_id
          EXPORTING
    *        IS_ROW_ID    =
    *        IS_COLUMN_ID =
            is_row_no    = es_row_no.
    *   Triggers PAI of the dynpro with the specified ok-code
        CALL METHOD cl_gui_cfw=>set_new_ok_code( 'DETAIL' ).
      ENDMETHOD.                    "handle_double_click
    ENDCLASS.                    "lcl_eventhandler IMPLEMENTATION
    START-OF-SELECTION.
      SELECT        * FROM  knb1 INTO TABLE gt_knb1
             WHERE  bukrs  = '1000'.
    * Create docking container
      CREATE OBJECT go_docking
        EXPORTING
          parent                      = cl_gui_container=>screen0
          ratio                       = 90
        EXCEPTIONS
          OTHERS                      = 6.
      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 splitter container
      CREATE OBJECT go_splitter
        EXPORTING
          parent            = go_docking
          rows              = 2
          columns           = 1
    *      NO_AUTODEF_PROGID_DYNNR =
    *      NAME              =
        EXCEPTIONS
          cntl_error        = 1
          cntl_system_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.
    * Get cell container
      CALL METHOD go_splitter->get_container
        EXPORTING
          row       = 1
          column    = 1
        RECEIVING
          container = go_cell_top.
      CALL METHOD go_splitter->get_container
        EXPORTING
          row       = 2
          column    = 1
        RECEIVING
          container = go_cell_bottom.
    * Create ALV grids
      CREATE OBJECT go_grid1
        EXPORTING
          i_parent          = go_cell_top
        EXCEPTIONS
          OTHERS            = 5.
      IF sy-subrc <> 0.
    *   MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *              WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    "§2. Set event handler (after creating the ALV instance)
      SET HANDLER: lcl_eventhandler=>handle_double_click FOR go_grid1.  " Or:
    " SET HANDLER: lcl_eventhandler=>handle_double_click FOR all instances.
      CREATE OBJECT go_grid2
        EXPORTING
          i_parent          = go_cell_bottom
        EXCEPTIONS
          OTHERS            = 5.
      IF sy-subrc <> 0.
    *   MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *              WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    * Display data
      gs_layout-grid_title = 'Customers'.
      CALL METHOD go_grid1->set_table_for_first_display
        EXPORTING
          i_structure_name = 'KNB1'
          is_layout        = gs_layout
        CHANGING
          it_outtab        = gt_knb1
        EXCEPTIONS
          OTHERS           = 4.
      IF sy-subrc <> 0.
    *   MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *              WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
      gs_layout-grid_title = 'Customers Details (Sales Areas)'.
      CALL METHOD go_grid2->set_table_for_first_display
        EXPORTING
          i_structure_name = 'KNVV'
          is_layout        = gs_layout
        CHANGING
          it_outtab        = gt_knvv  " empty !!!
        EXCEPTIONS
          OTHERS           = 4.
      IF sy-subrc <> 0.
    *   MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *              WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    * Link the docking container to the target dynpro
      CALL METHOD go_docking->link
        EXPORTING
          repid                       = syst-repid
          dynnr                       = '0100'
    *      CONTAINER                   =
        EXCEPTIONS
          OTHERS                      = 4.
      IF sy-subrc <> 0.
    *   MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *              WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    * NOTE: dynpro does not contain any elements
      CALL SCREEN '0100'.
    * Flow logic of dynpro (does not contain any dynpro elements):
    *PROCESS BEFORE OUTPUT.
    *  MODULE STATUS_0100.
    *PROCESS AFTER INPUT.
    *  MODULE USER_COMMAND_0100.
    END-OF-SELECTION.
    *&      Module  STATUS_0100  OUTPUT
    *       text
    MODULE status_0100 OUTPUT.
      SET PF-STATUS 'STATUS_0100'.  " contains push button "DETAIL"
    *  SET TITLEBAR 'xxx'.
    * Refresh display of detail ALV list
      CALL METHOD go_grid2->refresh_table_display
    *    EXPORTING
    *      IS_STABLE      =
    *      I_SOFT_REFRESH =
        EXCEPTIONS
          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.
    ENDMODULE.                 " STATUS_0100  OUTPUT
    *&      Module  USER_COMMAND_0100  INPUT
    *       text
    MODULE user_command_0100 INPUT.
      CASE gd_okcode.
        WHEN 'BACK' OR
             'END'  OR
             'CANC'.
          SET SCREEN 0. LEAVE SCREEN.
    *   User has pushed button "Display Details"
        WHEN 'DETAIL'.
          PERFORM entry_show_details.
        WHEN OTHERS.
      ENDCASE.
      CLEAR: gd_okcode.
    ENDMODULE.                 " USER_COMMAND_0100  INPUT
    *&      Form  ENTRY_SHOW_DETAILS
    *       text
    *  -->  p1        text
    *  <--  p2        text
    FORM entry_show_details .
    * define local data
      DATA:
        ld_row      TYPE i,
        ls_knb1     TYPE knb1.
      CALL METHOD go_grid1->get_current_cell
        IMPORTING
          e_row = ld_row.
      READ TABLE gt_knb1 INTO ls_knb1 INDEX ld_row.
      CHECK ( syst-subrc = 0 ).
      SELECT        * FROM  knvv INTO TABLE gt_knvv
             WHERE  kunnr  = ls_knb1-kunnr.
    ENDFORM.                    " ENTRY_SHOW_DETAILS
    Regards
    Uwe

  • Regarding single click in alv's

    hi guru's
    i have a small problem.
    iam using a alv grid display. after clicking on the row in alv , i need to navigate to a transaction mm03. 
    My problem is the navigation is happening in double-click. how can i use the single click option.
    my program consists of:
    CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
        EXPORTING
          i_program_name         = sy-repid
          i_structure_name       = l_c_struc
          i_inclname             = sy-repid
        CHANGING
          ct_fieldcat            = fp_l_i_fieldcat
    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
        EXPORTING
          i_callback_program      = sy-cprog
          i_callback_user_command = l_c_user_command
          i_grid_title            = text-004
          is_layout               = fp_wa_layout
          it_fieldcat             = fp_i_fieldcatalog
          i_save                  = l_c_a
          it_events               = fp_i_event
        TABLES
          t_outtab                = fp_i_makt
    FORM at_user_command USING fp_ucom     TYPE sy-ucomm
                               fp_selfield TYPE slis_selfield.  "#EC *
        CASE fp_ucom.
          WHEN '&IC1'.
            READ TABLE i_makt INTO wa_final
                                        INDEX fp_selfield-tabindex.
            IF sy-subrc EQ c_0.
              SET PARAMETER ID 'MAT' FIELD wa_final-matnr.
              CALL TRANSACTION 'MM03' AND SKIP FIRST SCREEN.
            ENDIF.
          WHEN OTHERS.
            MESSAGE i009.
        ENDCASE.
    ENDFORM.                  
    please give me a detailed description as iam new to abap programming.

    HI USE THIS EXAMPLE ,
    use the hot spot for this option.
    *& Report  Z_TEST001
    REPORT  Z_TEST001.
    TYPE-POOLS:  slis.
    tables: rseg.
    DATA: begin of TAB_ARSEG occurs 0.
            INCLUDE STRUCTURE RSEG.
    DATA: END OF TAB_ARSEG.
    DATA: T_FIELDCAT TYPE slis_t_fieldcat_alv.
    DATA: c_user_command TYPE slis_formname VALUE 'USER_COMMAND'.
    START-OF-SELECTION.
    <<<  YOUR CODE  >>> ***********************
    select * from rseg into table tab_arseg .
    END-OF-SELECTION.
    perform build_fieldcat.
    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
    EXPORTING
        i_buffer_active                   = space
        i_callback_program                = sy-repid
       I_CALLBACK_USER_COMMAND            = c_user_command
      I_STRUCTURE_NAME                  =
      IS_LAYOUT                         =
       IT_FIELDCAT                        = T_FIELDCAT[]
      TABLES
        T_OUTTAB                          = TAB_ARSEG
    EXCEPTIONS
       PROGRAM_ERROR                      = 1
       OTHERS                             = 2.
    IF SY-SUBRC ne 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    **&      Form  USER_COMMAND
    FORM USER_COMMAND USING F_UCOMM LIKE SY-UCOMM
                    I_SELFIELD TYPE SLIS_SELFIELD.
      DATA: F_SUBRC LIKE SY-SUBRC,
            s_arseg like tab_arseg.
      READ TABLE tab_arseg INDEX i_selfield-tabindex INTO s_arseg.
        CASE F_UCOMM.
            WHEN '&IC1'.
            CASE i_SELFIELD-SEL_TAB_FIELD.
            WHEN 'TAB_ARSEG-BELNR'.
              CHECK NOT S_ARSEG-BELNR IS INITIAL.
              SET PARAMETER ID 'RBN' FIELD S_ARSEG-BELNR.
              SET PARAMETER ID 'GJR' FIELD S_ARSEG-GJAHR.
              CALL TRANSACTION 'MM03' AND SKIP FIRST SCREEN.
            ENDCASE.
        ENDCASE.
    ENDFORM.
    **&      Form  build_fieldcat
    FORM build_fieldcat .
    DATA: FIELDCAT TYPE SLIS_FIELDCAT_ALV.
      CLEAR FIELDCAT.
      FIELDCAT-FIELDNAME     = 'BELNR'.
      FIELDCAT-TABNAME       = 'TAB_ARSEG'.
      FIELDCAT-REF_TABNAME   = 'RSEG'.
      FIELDCAT-REF_FIELDNAME = 'BELNR'.
      fieldcat-hotspot   = 'X'.
      FIELDCAT-COL_POS       = 1.
      APPEND FIELDCAT TO t_fieldcat.
      CLEAR FIELDCAT.
      FIELDCAT-FIELDNAME     = 'GJAHR'.
      FIELDCAT-TABNAME       = 'TAB_ARSEG'.
      FIELDCAT-REF_TABNAME   = 'RSEG'.
      FIELDCAT-REF_FIELDNAME = 'GJAHR'.
      FIELDCAT-COL_POS       = 2.
      APPEND FIELDCAT TO t_fieldcat.
    ENDFORM.                    " build_fieldcat
    REGARDS,
    VENKAT.

  • Why and how to use events in abap objects

    Dear all,
      Please explain me why and how to use events in abap objects with real time example
    regards
    pankaj giri

    Hi Pankaj,
    I will try to explain why to use events... How to use is a different topic.. which others have already answered...
    This is same from your prev. post...
    Events :
    Technically speaking :
    " Events are notifications an object receives from, or transmits to, other objects or applications. Events allow objects to perform actions whenever a specific occurrence takes place. Microsoft Windows is an event-driven operating system, events can come from other objects, applications, or user input such as mouse clicks or key presses. "
    Lets say you have an ALV - An editable one ...
    Lats say - Once you press some button  you want some kind of validation to be done.
    How to do this ?
    Raise an Event - Which is handled by a method and write the validation code.
    Now you might argue, that I can do it in this way : Capture the function code - and call the validate method.
    Yes, in this case it can be done.. But lets say .. you change a field in the ALV and you want the validation to be done as soon as he is done with typing.
    Where is the function code here ? No function code... But there is an event here - The data changed event.
    So you can raise a data changed event that can be handled and will do the validation.
    It is not user friendly that you ask the user to press a button (to get the function code) for validation each time he enters a data.
    The events can be raised by a system, or by a program also. So in this case the data changed event is raised by a system that you can handle.
    Also, Lets say on a particular action you want some code to trigger. (You can take the same example of validation code). In this case the code to trigger is in a separate class. The object of which is not available here at this moment. (This case happens very frequently).
    Advantage with events : Event handlers can be in a separate class also.
    e.g : In the middle of some business logic .. you encounter a error. You want to send this information to the UI (to user - in form of a pop up) and then continue with some processing.
    In many cases - A direct method call to trigger the pop up is not done. Because (in ideal cases) the engine must not interact with UI directly - Because the UI could be some other application - like a windows UI but the error comes from some SAP program.
    So - A event is raised from the engine that is handled in the UI and a pop up is triggered.
    Here -- I would have different classes (lets say for different Operating Systems). And all these classes must register to the event ERROR raised in application.
    And these different classes for different Operation systems will have different code to raise a pop-up.
    Now you can imagine : If you coded a pop-up for Windows (in your application logic) .. it will not work for Mac or Linux. But of you raise a event.. that is handled separately by a different UI classes for Win, Linux or Mac  they will catch this event and process accordingly.
    May be I complicated this explanation .... but I couldn't think of a simpler and concrete example.
    Cheers.
    Varun.

Maybe you are looking for

  • Error in Spam / saint update TP_STEP_FAILURE and DDIC_ACTIVATION

    Dear All, While updating spam/ saint update I am facing  this error  Details of Error: The installation was stopped, since an error occurred during the phase DDIC_ACTIVATION, which the Add-On Installation Tool is unable to resolve without your input.

  • After Effects CS5.5 exporting a 3D object

    I have this cube, just like that in the screen  below: the full cube! http://3.bp.blogspot.com/-KoMd2lI3ws4/U1lSFl4srfI/AAAAAAAADco/f9pVy493tW0/s1600/SH03.jpg ...but when I export it, I have just a part of it! What's happening? http://2.bp.blogspot.c

  • How to process stucked holding messages in the Adapter Engine.

    Hi experts, This question is may be familier to all... There are thousands of messages are in holding status in the Adapter engine in RWB. I tried to found system error in these messages. There is no system error from the last in my investigation. I

  • Browser Back Button and form navigation

    Some times when you use browser back button and adf-taskflow navigation buttons, validation on form fails, witout having made any change even with enabled token validation. Reproduction steps on HR schema: 1. Create QueryDepartment and EditDepartment

  • Upgrade - Transport Directory Strategy

    Hello All, We are having the below 4.7 Landscape, DEV -> QAS -> PRD We are having central Transport Directory. /usr/sap/trans is present in PRD which is mounted to DEV and QAS. Now, we are doing DEV Upgrade. So, we have created a Temporary Developmen