• RELEVANCY SCORE 4.22

    DB:4.22:Sample Program For Creating Alv Tree 97





    Hello Guys,

    Can some One Send me some sample program for creating ALV Tree.

    my Requirement is like below Diagram.

    ALV Tree | ALV GrId

    -

    |

    -

    |

    I want to also about event in ALV , As per requirement when user select (Double click or press any push button) a node of ALV Tree That Node (Contain Sales order and as a child billing Doc No) In the ALV Grid All the details about Sales order Will be display.

    Please guide me.

    Thanks

    Swati....

    DB:4.22:Sample Program For Creating Alv Tree 97


    Hi,

    Look at the below 2 simple DEMO porgrams

    BCALV_TREE_DEMO

    BCALV_TREE_SIMPLE_DEMO

    Regards

    Sudheer

  • RELEVANCY SCORE 4.11

    DB:4.11:Alv Tree Drag And Drop ss





    In my screen, I have 2 ALV tree structures.

    I am able to drag a line from the left tree to right tree but the problem is that once i drop it in the right tree i am not able to drag that into a different folgeron the right tree. It is not reacting to any user action like double click or drag.

  • RELEVANCY SCORE 4.10

    DB:4.10:What Is The Best Way To Update An Alv Tree? pp





    Hello all of you

    What is the best way to update an ALV tree?

    In my case, by double clicking on a branch, a table is updated and an icon should be updated in the alv tree.

    I use the class CL_SALV_TREE

    Thanks for your help

  • RELEVANCY SCORE 4.05

    DB:4.05:Handling Expand Event In Alv Tree (Cl_Gui_Alv_Tree) cj



    Hello Freinds,

    I wnat to write some logic on the click of expand icon in alv tree,how do i do this.

    regards

    saurabh

  • RELEVANCY SCORE 3.96

    DB:3.96:Alv Containers j8



    Hi,

    I have three containers in Alv grid display.And three internal tables.One for each caontainer.Now i want to use double click on a particular row on any one of the three conmntainers.And get a drill down alv ie another alv to be displayed .WHICH FETCHES VALUE FROM A FOURTH INTERNEL TABLE how can i do this.

    thanks and regards

    Ahasan

    DB:3.96:Alv Containers j8


    Hi,

    if you want a 4th ALV grid and want to use one of the control areas. and to populate this container you ll need to do the following

    1. register a double click event for the ALV on which you want to make the double click (DBLCLICK_ROW_COL for CL_GUI_ALV_GRID)

    2. call the alv grid similarly as you did for the above 3 in on of the control area while handling this event in the method of the class.

    the extract of the code is

    CLASS Lcl_application DEFINITION DEFERRED.
    data : g_alv type ref to cl_gui_alv_grid,
    event_receiver TYPE REF TO lcl_application.

    SET HANDLER event_receiver-handle_double_click FOR g_alv.

    CLASS lcl_application DEFINITION.

    PUBLIC SECTION.

    METHODS:
    handle_double_click
    FOR EVENT DOUBLE_CLICK OF cl_gui_alv_grid
    IMPORTING E_ROW E_COLUMN ES_ROW_NO.
    ENDCLASS. "lcl_application DEFINITION

    CLASS lcl_application IMPLEMENTATION.
    method handle_double_click.
    code for creation of the 4th ALV goes here...

    endmethod.
    endclass.

  • RELEVANCY SCORE 3.90

    DB:3.90:Oops Alv: Raise Double Click Event mx



    Hi,

    I have a class for handling ALV event. Within one method of event handler, another method of the event handler is called. The two methods are created by METHODS ... FOR EVENT ... OF CL_GUI_ALV_GRID. How can I raise the double click in the other method of the same event handling class?

    Best regards,

    ts

    DB:3.90:Oops Alv: Raise Double Click Event mx


    Hi TS,

    check out the code below.

    class user_defined_class

    Method m1 for event event_name of standard_class

    Method m2 for event event_name of standard_class.

    endclass.

    START-OF-SELECTION. DATA : event_ref TYPE REF TO standard_class cust_ref type REF TO user_defined_class CREATE OBJECT : event_ref, cust_ref.. *** Registering event SET HANDLER cust_ref-m1 FOR event_name. event_ref-trigger_method( ).

    trigger_method contains the statement Raise event event_name.

    So,when event is raised, m1 method of the user defined class will be called because, we have registered, method m1 only . To call m2, first you have deregister an existing event, for that

    set handler cust_ref-m1 for event_name activation space.

    Register m2 ,

    set handler cust_ref-m2 for event_name.

    Regards,

    Ravikiran.K

  • RELEVANCY SCORE 3.87

    DB:3.87:How To Provide Hotspot In Alv Tree???? mc



    Hi experts,

    I have provided a double click event in ALV tree display. As of now I am able to open the transactions when I click on some the fields in output. But now I want to have a hotspot on those fields. See plz help me with this.

    This is my catalog:

    ** get fieldcatalog
    CALL FUNCTION 'LVC_FIELDCATALOG_MERGE'
    EXPORTING
    i_structure_name = 'ZPP_STR_BAR'
    CHANGING
    ct_fieldcat = t_fieldcat.

    LOOP AT t_fieldcat INTO ls_fieldcat.
    CASE ls_fieldcat-fieldname.
    WHEN 'AUFNR'.
    ls_fieldcat-no_out = 'X'.
    ls_fieldcat-key = 'X'.
    ls_fieldcat-scrtext_s = text-t21.
    ls_fieldcat-tooltip = text-t01.
    WHEN 'TXT'.
    ls_fieldcat-outputlen = 40.
    ** ls_fieldcat-do_sum = 'X'.
    ls_fieldcat-scrtext_s = text-t22.
    ls_fieldcat-tooltip = text-t02.
    WHEN 'CHARG'.
    ls_fieldcat-outputlen = 16.
    ENDCASE.
    MODIFY t_fieldcat FROM ls_fieldcat.
    ENDLOOP.

    DB:3.87:How To Provide Hotspot In Alv Tree???? mc


    Hello,

    You can try the following :

    IF lv_fieldcat-fieldname = 'ORDNO'.

    lv_fieldcat-hotspot = 1.

    ENDIF.

    where ordno is the fieldname and fieldcat is the internal table for field catalog.

    Thanks..

  • RELEVANCY SCORE 3.86

    DB:3.86:Alv Tree Control x9



    Hi experts,

    How to create tree node with folder symbol dynamically in alv tree control.

    Thanks

    Ramesh VR

    DB:3.86:Alv Tree Control x9


    Hi experts,

    How to create tree node with folder symbol dynamically in alv tree control.

    Thanks

    Ramesh VR

  • RELEVANCY SCORE 3.86

    DB:3.86:Single Click On Tree Control Navigation 7a



    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

    DB:3.86:Single Click On Tree Control Navigation 7a


    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

  • RELEVANCY SCORE 3.84

    DB:3.84:How I Could Do An Alv Popup a9



    Hi, I have an ALV with some information. I want that when I do double-click in this ALV, generate a second ALV popup with information.

    I have ALV with events.

    Thanks.

    Moderator Message: Please search before posting.

    Edited by: Suhas Saha on Feb 2, 2012 2:59 PM

    DB:3.84:How I Could Do An Alv Popup a9


    Hi,

    You can use the FM "REUSE_ALV_POPUP_TO_SELECT"

    Regards,

    Nagaraj

  • RELEVANCY SCORE 3.77

    DB:3.77:Alv Tree Report 1j



    Hello gurus.

    Alv report in tree format.pls suggest me the solutions.

    DB:3.77:Alv Tree Report 1j


    Hi Dinesh ,

    There are many posts avaliable on this topic on SDN.

    Decide the approach which you wish to use and the search for the same in SDN.

    Hope this helps you.

  • RELEVANCY SCORE 3.74

    DB:3.74:Choose Multiple Line In Alv Tree xx



    Hi All

    there is option to select multi liness(node) in alv tree ?

    Regards

    Alex

    DB:3.74:Choose Multiple Line In Alv Tree xx


    Hi,

    Please try :

    linkfarm removed by moderator

    I have sufficiently warned you against posting link-farms. If you continue to ignore these warnings, you will be penalised.

    I hope this may helpfull.

    Thankyou,

    Thanks,

    AMS

    Edited by: kishan P on Sep 3, 2010 3:50 PM

  • RELEVANCY SCORE 3.73

    DB:3.73:Double Click In A Alv Grid zc


    Hi all,I have a problem with an ALV GRID Control: I print in the screen an ALV with the clauses 'starting at...ending at...' ; when I do double click in a line of the ALV I show the details but, the size of the ALV get smaller and smaller for everytime I do double-click...Any ideas about how to solve this?Thanks and Regard.Urtzi.

    DB:3.73:Double Click In A Alv Grid zc

    Hi all,Thanks a lot for your help, finally with your answers I've solved the problem!Regardsurtzi

  • RELEVANCY SCORE 3.72

    DB:3.72:Pop-Up Alv d8



    Hi,

    I am getting an alv grid output....and when i double click on a field i want a POP UP GRID ALV to be shown on that same screen.....

    Thanks in advance......

    DB:3.72:Pop-Up Alv d8


    You have to capture the double click event in the alv grid, then call function 'POPUP_FOR_INFORMATION' or some related to make the popup.

    To capture the event in the ALV:

    CLASS lcl_event_handler DEFINITION .

    PUBLIC SECTION .

    DATA: e_row_id TYPE REF TO lvc_s_row.

    DATA: e_column_id TYPE REF TO lvc_s_col.

    DATA: es_row_no TYPE lvc_s_roid.

    DATA: es_col_id TYPE REF TO lvc_s_col.

    *Double-click control

    METHODS handle_button_click

    FOR EVENT button_click OF cl_gui_alv_grid

    IMPORTING es_col_id es_row_no. " E_COLUMN_ID.

    PRIVATE SECTION.

    ENDCLASS. "lcl_event_handler DEFINITION

    CLASS lcl_event_handler IMPLEMENTATION .

    *Handle Hotspot Click

    METHOD handle_hotspot_click .

    PERFORM handle_hotspot_click USING e_row_id e_column_id.

    ENDMETHOD . "handle_hotspot_click

    *Handle Button Click

    METHOD handle_button_click .

    PERFORM handle_button_click USING es_col_id es_row_no.

    ENDMETHOD . "handle_Button_click

    ENDCLASS . "lcl_event_handler IMPLEMENTATION

    Then the form to make the popup:

    FORM handle_button_click USING es_col_id TYPE lvc_s_col

    es_row_no TYPE lvc_s_roid.

    ENDFORM. " handle_double_click

    Regards

  • RELEVANCY SCORE 3.68

    DB:3.68:Alv Interactive 18



    I am using ALV interactive report.

    When user double clicks on the first screen it pops to second screen with the right results. However when user double click on second screen it shouldnt perform any action, byt it further drills down.

    How can this be solved.

    THanks in Advance,

    Madhu

    DB:3.68:Alv Interactive 18


    Please mail me at ydderuhdam@yahoo.com.

    I will mail the code to you.

    Madhu.

  • RELEVANCY SCORE 3.63

    DB:3.63:Alv Oo - Event Receiver Issue fa



    Hi,

    in my ALV 00 program i have several simular ALV grids (with the same layout, fieldcat etc). The handling of the double click event in the different ALV grids is handled by different event receivers ( but type ref to the same event handler class).

    How can i see in the general event handler class, which event receiver reference has raised the event, so on which alv grid was the double click !

    As i said the ALV grids are lookalike, but only the data is different. So for the double click event i should read different data tables.

    Any one a solution ?

    regards,

    Hans

    DB:3.63:Alv Oo - Event Receiver Issue fa


    Hi,

    you should have different event reciever. to respond the different grids to show the different grids....

    regards

    vijay

  • RELEVANCY SCORE 3.63

    DB:3.63:Double Click Event In Alv Display zf



    Hi

    I am using Reuse_alv_grid_display for dis[playing ALV. Now I want to handle double click event on a perticular Single column.

    Pls provide code.

    DB:3.63:Double Click Event In Alv Display zf


    Hi,

    Check this example..If you double click on the purchase order field, it will take you to the corresponding PO in ME23N..

    TYPE-POOLS: slis.

    DATA: gt_fieldcat TYPE slis_t_fieldcat_alv.

    DATA: BEGIN OF wa_ekko,

    ebeln like ekko-ebeln,

    ekorg like ekko-ekorg,

    ekgrp like ekko-ekgrp,

    END OF wa_ekko.

    DATA: v_repid TYPE syrepid.

    v_repid = sy-repid.

    DATA it_ekko LIKE STANDARD TABLE OF wa_ekko WITH HEADER LINE.

    SELECT * UP TO 100 ROWS

    FROM ekko

    INTO CORRESPONDING FIELDS OF TABLE it_ekko.

    CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'

    EXPORTING

    i_program_name = v_repid

    i_internal_tabname = 'WA_EKKO'

    i_inclname = v_repid

    CHANGING

    ct_fieldcat = gt_fieldcat.

    Pass the program.

    v_repid = sy-repid.

    CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'

    EXPORTING

    i_callback_program = v_repid

    it_fieldcat = gt_fieldcat

    i_callback_user_command = 'USER_COMMAND'

    TABLES

    t_outtab = it_ekko.

    ----

    FORM display_detail *

    ----

    ........ *

    ----

    -- UCOMM *

    -- SELFIELD *

    ----

    FORM user_command USING ucomm LIKE sy-ucomm

    selfield TYPE slis_selfield.

    IF ucomm = 'IC1' AND selfield-fieldname = 'EBELN'.

    READ TABLE it_ekko INDEX selfield-tabindex.

    IF sy-subrc = 0.

    SET PARAMETER ID 'BES' FIELD it_ekko-ebeln.

    CALL TRANSACTION 'ME23N' AND SKIP FIRST SCREEN.

    ENDIF.

    ENDIF.

    ENDFORM.

    Thanks,

    Naren

  • RELEVANCY SCORE 3.56

    DB:3.56:Problem With Alv Toolbar fa



    Hi,

    I have added a button on my editable ALV Toolbar -delete as I wanted to put my own functionality for it .

    But this button is not getting displayed on my toolbar for the first time in the ALV . This ALV gets displayed on the double click of some other ALV .

    When I double click on a particular row for the first item on my main ALV , this button does not get displayed .

    When I double click it for the second item delete button gets displayed on the toolbar .

    Please could someone help me out with this .

    Regards,

    Sushanth H.S.

    DB:3.56:Problem With Alv Toolbar fa


    Try the below code....

    CLASS lcl_event_handler DEFINITION .
    PUBLIC SECTION .
    METHODS:
    *To add new functional buttons to the ALV toolbar
    handle_toolbar FOR EVENT toolbar OF cl_gui_alv_grid
    IMPORTING e_object e_interactive .
    ENDCLASS.

    CLASS lcl_event_handler IMPLEMENTATION .
    *Handle Toolbar
    METHOD handle_toolbar.
    PERFORM handle_toolbar USING e_object e_interactive .
    ENDMETHOD .
    ENDCLASS.

    FORM handle_toolbar USING i_object TYPE REF TO cl_alv_event_toolbar_set .
    DATA: ls_toolbar TYPE stb_button.
    CLEAR ls_toolbar.
    MOVE 3 TO ls_toolbar-butn_type.
    APPEND ls_toolbar TO i_object-mt_toolbar.
    CLEAR ls_toolbar.
    MOVE 'PER' TO ls_toolbar-function. "#EC NOTEXT
    MOVE icon_display_text TO ls_toolbar-icon.
    MOVE 'Passenger Info'(201) TO ls_toolbar-quickinfo.
    MOVE 'Passenger Info'(201) TO ls_toolbar-text.
    MOVE ' ' TO ls_toolbar-disabled. "#EC NOTEXT
    APPEND ls_toolbar TO i_object-mt_toolbar.
    CLEAR ls_toolbar.
    MOVE 'EXCH' TO ls_toolbar-function. "#EC NOTEXT
    MOVE 2 TO ls_toolbar-butn_type.
    MOVE icon_calculation TO ls_toolbar-icon.
    MOVE 'Payment in Other Currencies'(202) TO ls_toolbar-quickinfo.
    MOVE ' ' TO ls_toolbar-text.
    MOVE ' ' TO ls_toolbar-disabled. "#EC NOTEXT
    APPEND ls_toolbar TO i_object-mt_toolbar.
    ENDFORM .

    DATA gr_event_handler TYPE REF TO lcl_event_handler .
    .. ..
    *--Creating an instance for the event handler
    CREATE OBJECT gr_event_handler .
    *--Registering handler methods to handle ALV Grid events
    SET HANDLER gr_event_handler-handle_user_command FOR gr_alvgrid .
    SET HANDLER gr_event_handler-handle_toolbar FOR gr_alvgrid .

    call gr_alvgrid-set_table_for_first_display....

  • RELEVANCY SCORE 3.56

    DB:3.56:Double Click Event In Alv m1



    Hello everybody,

    I have an ALV report that uses the function module REUSE_ALV_GRID_DISPAY

    to display the screen. I was wondering if there is a way to implementthe

    double click event when using this FM. What I want the user to be abl to

    do is to double click on a line in the ALV and have another ALV grid

    display with a more detailed list. I know that the double click eventcan

    be implemented using the object oriented approach using a container bu I

    would like to avoid redoing the report to use the object oriented apprach.

    Any help would be greatly appreciated.

    DB:3.56:Double Click Event In Alv m1

    Hi Ashish,
    Here is the procedure to handle Interactive ALV.
    1.
    declare events table like this.
    data :
    i_events type slis_t_event,
    w_events like line of i_events.

  • RELEVANCY SCORE 3.56

    DB:3.56:Alv Interactive In Webdynpro ma



    Hi,

    I devloped ALV in TABScript, Output is perfect in the form of ALV

    In ALV , I want to set one colument as LinktoUrl such that , if I double click column to display next view based on that row.

    I can able to set one column as Linkto URL in TABLE but ALV how to set specific column as linktoURL.

    for ALV, Taken ViwcontainerUIelemnt , Such that I am unable to see any columns.

    How to Set specific column as interactivlink to goto next view.

    Thanks,

    Sam

    DB:3.56:Alv Interactive In Webdynpro ma


    yes try like this

    lo_cmp_usage = wd_this-wd_cpuse_ALV_COMP( ).

  • RELEVANCY SCORE 3.55

    DB:3.55:How To Know The Event Is From Which Object. 7p



    I put 3 alv objects in the same screen with same event object to detect the event double click. How can I know the double click is from which alv object?

    Message was edited by: Paul Lee

    DB:3.55:How To Know The Event Is From Which Object. 7p


    Hi Paul

    While defining your method in your local class you can tell it to turn the sender as a parameter:

    e.g.

    *Double-click control

    handle_double_click

    FOR EVENT double_click OF cl_gui_alv_grid

    IMPORTING e_row e_column bsender/b .

    Now in the implementation you get the reference of the sender instance in the parameter "sender".

    *--Serdar

  • RELEVANCY SCORE 3.55

    DB:3.55:Alv-Grid - Update Fields In Subscreens (Tabstrip) m9



    hi,

    I have an dynpro with an alv-grid and an tabstrip (3 tabs). An event of the alv is "double_click". Now if I double-click of a line in the alv it should update the fields of the subscreens (tabstrips). How can I do this?

    Thanks

    Markus S.

    DB:3.55:Alv-Grid - Update Fields In Subscreens (Tabstrip) m9


    Hi Markus,

    I think that solves ur prob.

    If ur problem solves Close this thread.

    Regards

    Vijay

  • RELEVANCY SCORE 3.55

    DB:3.55:Urgent: Tree Structure In Alv za



    Hi,

    any idea how to get tree structure in alv.

    actually i m making an alv on sales order.on click on the tree arrow of sales order number all item details should be displayed.

    POINTS WILL BE REWARDED

    DB:3.55:Urgent: Tree Structure In Alv za


    hi kush sharma,

    interestingly enough you answered all questions of vivek sharma and received all the points... Don't you find it strange? So will you stop the point hunting once?

    some other userids managed by you:

    shivram iyyer https://www.sdn.sap.com/irj/sdn/profile?userid=3749531

    G. james https://www.sdn.sap.com/irj/sdn/profile?userid=3747398

    thanks

    ec

  • RELEVANCY SCORE 3.55

    DB:3.55:How To Make The Content Of The Alv Tree Accessible? 7a



    I have created an alv tree using class interface CL_SALV_TREE. The code snippet to build the tree I have used is

    cl_salv_tree=factory(

    IMPORTING

    r_salv_tree = gr_tree

    CHANGING

    t_table = gt_tree ).

    I have provided header text and tooltips.

    DATA: lr_columns TYPE REF TO cl_salv_columns,

    lr_columns = gr_tree-get_columns( ).

    lr_column = lr_columns-get_column( 'TEXT1' ).

    lc_col_long_text = text-161.

    lc_col_tool_text = text-161.

    lr_column-set_long_text( lc_col_long_text ).

    lr_column-set_tooltip( lc_col_tool_text ).

    The content of the tree is filled dynamically by passing the internal table gt_tree as shown in the aforementioned code. And on double click it leads to another screen.

    Now the problem is that JAWS doesnt announce "Press F2" when it tabs to this content. As far as I know jaws announces if there is a tooltip or it announces the text itself. Also I know you can provide tooltip with the alv function module to the content but with the class cl_salv_tree_settings I am oblivious of such kind of provision or if any other.

    Kindly provide your inputs on the same.

    DB:3.55:How To Make The Content Of The Alv Tree Accessible? 7a


    Welcome to SDN.

    check out the following weblog.

    /people/sap.user72/blog/2005/09/14/a-new-approach-to-alv-programming

    by the way whats "bJAWS/b"

    Regards

    Raja

    Message was edited by: Durairaj Athavan Raja

  • RELEVANCY SCORE 3.54

    DB:3.54:Alv Tree Will Not Refresh kc



    Hi.

    I searched this forum and others but can't find a straight answer for this issue.

    I have a Tree that is attached to an ALV (screen is splitted with Docking-container, Tree on Left, ALV on Right, double-click on Tree node will display data in ALV).

    The user is able to change the view-mode between few business-related views by clicking buttons at the toolbar.

    When a button is hit I want to refresh my Tree, so I use the "FREE" methods to release the Tree object and the Docking-container, and also clear the global table of the Tree (the table that has all the nodes).

    After all this I re-build the objects and fill the Tree table and... nothing

    Well, the tree is displayed, and the nodes names are displayed, but no data in the Tree columns.

    Any ideas?

    Regards.

    Ayal Telem.

    DB:3.54:Alv Tree Will Not Refresh kc


    I fixed the issue.

    At the end what I initially did was sufficient:

    Using the "FREE" methods of the relevant Classes to free the Docking-container the Tree objects

    and re-building everything is working.

    The reason I had problem with it is due to specific program conditions, and has nothing to do with Trees.

    Enjoy you all.

    Ayal.

  • RELEVANCY SCORE 3.53

    DB:3.53:Alv Tree , Table Control And Tab Strip In Single Screen dz


    Hi Experts,I have designed a screen with Custom container on the left and some module pool screen elements like Text , tabstrip and tabular control on the right. In the PBO of the screen i have filled the custom Container with the ALV tree (CL_GUI_ALV_TREE).If i double click a node on the ALV tree, the values on the right hand module pool screens should change. TThough i change global Values linked to the module pool screen during the double click event of the ALV tree, the values are not refreshed to the screens. Problem here is for ALV tree events the PBO is not getting triggered. How can we do that? Is there any other way out ? Please help at the earliest. Thanks,Murali

  • RELEVANCY SCORE 3.52

    DB:3.52:Double Click On Alv Tree Is Triggered But Pai/Pbo Are Not Triggered. 1m



    Hi Experts,

    I am usoing CL_SALV_TREE class for displaying the tree. I have registered the event double click.

    data: lr_events type ref to cl_salv_events_tree.

    lr_events = tree-get_event( ).

    set handler at_double_click for lr_events.

    Double click is gettting triggered, but, as it is not raising an application event, its not calling the PAI/PBO of screen for the futher screen processing.

    Regards,

    Nitin.

    DB:3.52:Double Click On Alv Tree Is Triggered But Pai/Pbo Are Not Triggered. 1m


    Hi,

    I have assigned new function codeusing following class method.

    cl_gui_cfw=set_new_ok_code(

    exporting

    new_code = double_click

    importing

    rc = lv_rc ).

  • RELEVANCY SCORE 3.52

    DB:3.52:Alv Report Problem d1



    hi,

    i have problem in ALV.

    my requirement is in a ALV report if i double click on a row it has to take me to another transaction ( say for eg vf03).

    how should i do it.

    john.

    DB:3.52:Alv Report Problem d1


    Hi John

    What I understand about your query is that you require an interactive ALV that is,on clicking on any row of ALV

    a transaction should be called with a parameter passed to that transaction.

    You can use user_command to do that.

    * *****

    Form USER_COMMAND

    ------

    form user_command using r_ucomm like sy-ucomm rs_selfield type slis_selfield.

    case rs_selfield-fieldname.

    when 'VBRK'.

    set parameter id 'AUN' field rs_selfield-value.

    call transaction 'VF03' and skip first screen.

    when 'MATNR'.

    set parameter id 'MAT' field rs_selfield-value.

    call transaction 'MM03' and skip first screen.

    endcase.

    endform. "user_command

    This way you can even make individual cells work on double click to call diff transactions.

    Regards,

    Suruchi

  • RELEVANCY SCORE 3.51

    DB:3.51:Double Click In Alv Tree ss



    hi!

    I wrote an ALV report using some parts of the code from BCALV_TREE_DEMO.

    I added a new icon to the status of the screen.

    I want to add a function that when standing on the line with cursor and then pressing the new button, I will use the call transaction passing some of the values from the line which i selected to the call transaction.

    how can i do it?

    If someone has a code for it , it will be great.

    thanks

    Yifat

    DB:3.51:Double Click In Alv Tree ss


    HI Yifat

    If ur using ALV function module, then u should read the EVENTS table in SLIS type-pools. Then u need to write come in User_commens routines. U need to read the events table with USER_COMMAND events. Then use the set parameter and get parameter to pass the data from ALV To transaction.

    I Hope this will slove ur problem.

    Need ur reward points.

    Regards

    Ravi

  • RELEVANCY SCORE 3.51

    DB:3.51:Alv Tree Expand And Collapse fk



    Hi,

    I have a scenario where i need to print an alv tree in a sub screen on double clicking the line item. I have 10 line items .Based on the line item data the data in the alv tree should vary. I'm able to achieve this by deleting the previous nodes when ever a new item is double cliked. using the below method.

    CALL METHOD g_tree-delete_all_nodes.

    But the expand and collapse button of the alv tree do not work .Need your help here.

    Regards,

    christina.

    DB:3.51:Alv Tree Expand And Collapse fk


    Hi Christina,

    I don't understand the link between deleting/refilling the tree and expand/collapse.

    Personnally I would FREE the tree object and display a new one for each item change. This is because if you delete nodes and create new ones you will have to increment the node numbers and you don't know how much times...

    I you clear the object reference and create a new tree, you will be able to start from scratch with the node numbering.

  • RELEVANCY SCORE 3.51

    DB:3.51:Alv Tree View Using Abapoo 1c


    Hi,I want ot make simple report on ALV Tree view using ABAPOO.do help thanks in advance

    DB:3.51:Alv Tree View Using Abapoo 1c

    hi,check this thread ALV Tree viewhope this helps

  • RELEVANCY SCORE 3.50

    DB:3.50:Editing A Field On An Alv Tree Row 97



    H ithere:

    I have been trying desperately to figure out how to code the ability to edit a field on an ALV Tree. I am using CL_GUI_ALV_TREE. I am NOT using an ALV Grid. Big difference. Here is an example of what my ALV Tree looks like:

    Folder

    field1 field2 field3 field4

    My field 2 is a quantity field. Right now - the only way I can program the user to change that value is to either double-click on the entire row or highlight the field and click on a pushbutton I have added.

    I want to know if there is a way I can make that field2 open for input and allow the user to edit directly onto the tree.

    I already know how to do this using an ALV Grid - and couldn't find any options in ALV Tree that mirrors this process.

    Any help would be greatly appreciated.

    DB:3.50:Editing A Field On An Alv Tree Row 97


    H ithere:

    I have been trying desperately to figure out how to code the ability to edit a field on an ALV Tree. I am using CL_GUI_ALV_TREE. I am NOT using an ALV Grid. Big difference. Here is an example of what my ALV Tree looks like:

    Folder

    field1 field2 field3 field4

    My field 2 is a quantity field. Right now - the only way I can program the user to change that value is to either double-click on the entire row or highlight the field and click on a pushbutton I have added.

    I want to know if there is a way I can make that field2 open for input and allow the user to edit directly onto the tree.

    I already know how to do this using an ALV Grid - and couldn't find any options in ALV Tree that mirrors this process.

    Any help would be greatly appreciated.

  • RELEVANCY SCORE 3.49

    DB:3.49:Editing Of A Column Of Alv Tree(Oops) Node 71


    is it possible to edit a column of node of ALV tree.i am using ALV class "CL_GUI_ALV_TREE".After searching existing threads, for the same issue..i found the following.1) Editable Tree ALV ( displays pop up window where user can change values and then transfer these changes back to ALV tree)2) Editable Field in ALV TREE Display Using OOPs (this approach is not working for ALV Tree)But i want to edit directly coulmn of a node of ALV tree.is it possible in OOPS ALV Tree?if it possible, can any one provide the sample code,

    DB:3.49:Editing Of A Column Of Alv Tree(Oops) Node 71

    As you already noticed, this is not possible, but you may edit your fields outside the tree and bring your changes back to tree. I struggled with the same once but eventually used described alternative. If you use saplink you may check upgrade [chain and rename|http://code.google.com/p/saplink-chain-and-rename/downloads/list] where this approach is released. The code is free so you will be able to study and copy whatever you need from it.Editing in a pop up is also an alternative here.RegardsMarcin

  • RELEVANCY SCORE 3.47

    DB:3.47:How To Get Name Of Double Clicked Item In Alv Tree? z9



    Hi!

    How can i get name of double clicked Item in ALV Tree?

    I found only this:

    METHODS handle_item_double_click
    FOR EVENT item_double_click OF cl_gui_alv_tree
    IMPORTING node_key
    fieldname.

    METHOD handle_item_double_click.
    double_click_node_key = node_key.
    item_fieldname = fieldname.
    MESSAGE s398(00) WITH fieldname.
    CALL METHOD cl_gui_cfw=set_new_ok_code
    EXPORTING
    new_code = 'DBCL'.

    DB:3.47:How To Get Name Of Double Clicked Item In Alv Tree? z9


    Hi ,

    Use below method to get the node text. You get_outtab_line method to get the node_text.

    CALL METHOD atree_0100-get_outtab_line

    EXPORTING

    i_node_key = p_node

    IMPORTING

    e_outtab_line = wf_tree_data

    e_node_text = wf_node_text

    et_item_layout = int_item_layout

    es_node_layout = wf_s_node_layout.

    Alternatively, you can build an internal table of nodes and their corresponding texts as you are building the tree. When you double click get the node key and read the internal table for the text.

    Thanks and Best Regards,

  • RELEVANCY SCORE 3.45

    DB:3.45:Problems With Events "Double Click" And "Data_Changed_Finished" sf


    Why if I do double clik in a ALV cell the both events "Double click" and "data_changed_finished" are triggered ?If I change the value of a cell, the event "double click" isnt triggered.Thanks

    DB:3.45:Problems With Events "Double Click" And "Data_Changed_Finished" sf

    Why if I do double clik in a ALV cell the both events "Double click" and "data_changed_finished" are triggered ?If I change the value of a cell, the event "double click" isnt triggered.Thanks

  • RELEVANCY SCORE 3.45

    DB:3.45:Double Click In Alv. z8



    How do I execute Double click event in grid and list disaplay?

    DB:3.45:Double Click In Alv. z8


    hi

    check the program bBCALV_GRID_03/b.

    post ur ABAP related question in ABAP Forum for better response..

    Cheers,

    Abdul Hakim

  • RELEVANCY SCORE 3.41

    DB:3.41:Alv Tree Issue zj


    Hi to all,I've built an ALV TREE model going by the class cl_gui_alv_tree, with a simple two level items hierarchy and several columns, The double click method has been activated in it;Clicking wherever on one of this lines, I get thorugh over into another dynpro. In this dynpro next I bring up operations that may affect the structure of my first alv tree where in I double clicked, such as deleting or even adding lines, So going back again I'm due to delete alv tree hirarchy and build it up once again as is the only way to get all changes always proper delivered and visible, and it's working, very slowly, but it's working,Now may issue is:It happens the alv tree list comes often long, and my be I get to double click a line or a node stayng at the very botton which I could reach only by deep scrolling down the alv, Which is exactly the best method I could use when I come back from the second screen after double clicking, to reposition the alv somehow on the same line or at least on the same node where I clicked?As I get the alv fiirst destroyied and then build again to be shown with all the new changes, by now I can only have it started and positioned from the first line, how endeed woluld I mark and choose exactly the line where I want the list start to be shown?Beside I tried some method such as SELECT_ITEM or SET_SELECTED_ITEM before displaying the alv tree again but it's not working, Counld anyone please provide me some suggestion or code sample?Thankyou in advance for your help, Sergio,

    DB:3.41:Alv Tree Issue zj

    Hi Vengal,Thankyou for your advices, I had nodes already all expanded in this case , beside I turned the alv tree in an alv grid normal and then I could use some other method to set row and focus on this row the moment I had to show up again the list coming back from second screen,Thanks a lot,Sergio,

  • RELEVANCY SCORE 3.40

    DB:3.40:Hallo Every One aa



    Hallo I am tring to write apcode to

    2Structuring

    2.1Overview

    The application should be able to create BODs (bill of documents) using a drag drop based UI to be able to built up the object relations between cross discipline objects. The possibility to attach single documents and bill of documents to the cross discipline structure (as items) has to be provided as well as the creation of material links for specific BOD items.

    2.2Application architecture

    We will have to create a new SAP transaction (namespace /CENIT/). This transaction will call a module pool (also to be created in the /CENIT/ namespace and assigned to a new package). The module pool (dialog program) will be able to display a start screen (where it is possible to search for document structures) and a maintenance screen where the chosen structure can be created/enhanced/viewed. The main screen will use SAP Enjoy Controls techniques to display the data with a docking control, splitter control, tree control and ALV grid.

    2.2.1Data Structure

    2.2.1.1Input data

    The input data is placed on the start screen. We will need here the entrance information for a document structure (document type, document number, document part, document version). In addition to this information, the document search help CV01 has to be assigned to the input information. It should also be possible to create a new ORM structure using a new document number.

    2.2.1.2Output data

    The output will be displayed on the main screen. The main screen area will display a complete BOD explosion of the input. (Column Tree Control). We will need also 2 different areas where we will provide 2 ALV controls displaying document search / material search result data. Drag drop behaviour has to be implemented between the tree display (BOD explosion ) and the ALV areas. When dragging a document from the ALV to the tree, it should be added as new item. When dragging a material to a certain node of the tree display, it should be added as material link to the corresponding document.

    The header document of the BOD structure should have the document type ORM. This has to be checked before exploding the structure. The initial view of the tree structure will not display the exploded BOD. Only if the user is going to expand a certain node, the next level of the current BOD is displayed.

    Following column informations should be provided in the tree view:

    Document type

    Document number

    Document part

    Document version

    Document description

    Document status

    Linked material

    The document search (ALV grid) top right screen area has following search criteria:

    Document number

    Document type

    Document part

    Document version

    Document description

    Language

    Owner

    Document status

    The document search ALV result will provide all DRAW-fields as columns.

    The material search (ALV grid) bottom right screen area has following search criteria:

    Material number

    Material industry sector

    Material type

    Material description

    Plant

    The material search ALV result will provide all MARA / MARC fields as columns.

    Drag drop behaviour / event handling / double click behaviour:

    If a document info record is dragged from the result ALV grid to a specific tree node, there should come up a decision popup, asking if the document should be inserted as BOD item on the same level or underneath the dropped node.

    If a material master is dragged from the result ALV to a specific tree node, this material should automatically generate a object link to the corresponding document info record.

    If a document info record, which is BOD header is dragged to the tree, there should come up a decision popup, asking if only the stand-alone document has to be inserted as BOD item or if the complete structure has to be inserted.

    The tree display has to be right-click sensitive (context menu), containing following functions:

    oDelete current item

    oDisplay document info record

    Double-clicking the tree control or the corresponding ALV grid entry, the application has to be able to provide forward navigation to the document info record / material.

    will not display the exploded BOD. Only if the user is going to expand a certain node, the next level of the current BOD is displayed.

    Following column informations should be provided in the tree view:

    Document type

    Document number

    Document part

    Document version

    Document description

    Document status

    Linked material

    The document search (ALV grid) top right screen area has following search criteria:

    Document number

    Document type

    Document part

    Document version

    Document description

    Language

    Owner

    Document status

    The document search ALV result will provide all DRAW-fields as columns.

    The material search (ALV grid) bottom right screen area has following search criteria:

    Material number

    Material industry sector

    Material type

    Material description

    Plant

    The material search ALV result will provide all MARA / MARC fields as columns.

    Drag drop behaviour / event handling / double click behaviour:

    If a document info record is dragged from the result ALV grid to a specific tree node, there should come up a decision popup, asking if the document should be inserted as BOD item on the same level or underneath the dropped node.

    If a material master is dragged from the result ALV to a specific tree node, this material should automatically generate a object link to the corresponding document info record.

    If a document info record, which is BOD header is dragged to the tree, there should come up a decision popup, asking if only the stand-alone document has to be inserted as BOD item or if the complete structure has to be inserted.

    Thank you in advance .

    Waiting for your reply.

    DB:3.40:Hallo Every One aa


    I guess sarcasium is a little hard to express in words, huh?

    Regards,

    Rich Heilman

  • RELEVANCY SCORE 3.40

    DB:3.40:How To Refresh Data In Alv Tree zf



    Hi,

    I need to refresh data of an ALV TREE.

    I update data in execution but I can't refresh the ALV TREE.

    Any suggest?

    Thanks

    Salvatore

    DB:3.40:How To Refresh Data In Alv Tree zf


    I'm using CL_GUI_LIST_TREE class.

    I'm tryng to delete and then re-add all nodes but the ALV Tree doesn't change.

    Let me give you a simple example:

    I want to hide and shoe th ALV using a button.

    If I set the tree visible or not visible anything changes....

  • RELEVANCY SCORE 3.39

    DB:3.39:Tree Please!!!!! zk


    how makes a tree with double click?
    or how put ondblclick in the tree???

    DB:3.39:Tree Please!!!!! zk

    There is no standard JSF tree component.

  • RELEVANCY SCORE 3.37

    DB:3.37:Alv Tree - Trigger Double Clicking By Clicking On The Node Text. xf



    Hi All,

    I have developed an ALV tree and I am trying to do the double clicking functionality on the nodes of the tree.

    All is well so far, When the tree is displayed the double click event gets triggered only if I click exactly on the node.

    Where as I want this to be triggered even if I click on the node text. How do I achieve this, I have reffered programs like

    BCALV_TREE_02, but even here I dont see anything specific to this.

    Can you guys think of anything I am missing??

    Here is my code.

    call method g_alv_tree-add_node
    exporting
    i_relat_node_key = p_relat_key
    i_relationship = cl_gui_column_tree=relat_last_child
    i_node_text = l_node_text
    is_outtab_line = wa_data
    importing
    e_new_node_key = p_node_key.

    DB:3.37:Alv Tree - Trigger Double Clicking By Clicking On The Node Text. xf


    Hi All,

    I have developed an ALV tree and I am trying to do the double clicking functionality on the nodes of the tree.

    All is well so far, When the tree is displayed the double click event gets triggered only if I click exactly on the node.

    Where as I want this to be triggered even if I click on the node text. How do I achieve this, I have reffered programs like

    BCALV_TREE_02, but even here I dont see anything specific to this.

    Can you guys think of anything I am missing??

    Here is my code.

    call method g_alv_tree-add_node
    exporting
    i_relat_node_key = p_relat_key
    i_relationship = cl_gui_column_tree=relat_last_child
    i_node_text = l_node_text
    is_outtab_line = wa_data
    importing
    e_new_node_key = p_node_key.

  • RELEVANCY SCORE 3.36

    DB:3.36:Regarding Alv Double Click And Error ks



    hello all ,

    suppose you have error in your report at particular line no. you are displaying that line no. in alv now if you double click on line no in alv ,it will open that report in se38 with cursor postion at that line no contain error.i think there should be FM but i donot know its name.

    its urgent.

    plz help me.

    thanks in advance.

    DB:3.36:Regarding Alv Double Click And Error ks


    Pls share the solution wid us. How hav u solved the problem.

  • RELEVANCY SCORE 3.35

    DB:3.35:Event Handling In Oops Alv ck



    hi experts,

    event double click.

    when double click on vbeln it should go to va03 transaction . how would i do that in oops alv.

    DB:3.35:Event Handling In Oops Alv ck


    CLASS lcl_event_handler DEFINITION.

    PUBLIC SECTION.

    METHODS:

    handle_double_click FOR EVENT double_click OF cl_gui_alv_grid

    IMPORTING e_row e_column

    ENDCLASS. "lcl_event_handler DEFINITION

    ----

    CLASS lcl_event_hander IMPLEMENTATION

    ----

    *

    ----

    CLASS lcl_event_handler IMPLEMENTATION.

    METHOD handle_double_click.

    PERFORM handle_double_click USING e_row e_column es_row_no.

    ENDMETHOD.

    ENDCLASS. "lcl_event_handler IMPLEMENTATION

    data: gr_handler type lcl_event_handler .

    create object gr_handler.

    set handler gr_handler-handle_double_click for gr_alvgrid.

    form handle_double_click using i_row type lvc_s_row i_col lvc_s_col is_row_no type lvc_s_roid.

    Read table gt_list index is_row_no-row-id.

    if sy-subrc = 0 and i_col-fieldname='seatsocc'.

    call screen 200.

    endif.

    endform.

    Reward Points if helpful.

  • RELEVANCY SCORE 3.35

    DB:3.35:Double Click On The Node,Alv Tree, Subscreen df



    Hi,

    I have a small requirement in ALV Tree

    left side i get a tree and when i double click on one of it , i'm trying to display the subscreen. even though i am setting the paramaters to the screen but i'm unable to get those values in the subscreen.

    example

    Name Description subscreen 0101

    xyz xyz desc (double click on this) name = XYZ

    ABC abs desc descrip = xyz desc

    This is what the requirement is:

    Please help me out with the solution.

    Bhavana

    DB:3.35:Double Click On The Node,Alv Tree, Subscreen df


    Hi Ganesh,

    Thanks for your reply, i have done all the registering events etc etc but my problem is to call a subscreen but the example which you showed was for just a Normal Screen . after the perform same thing i want to call a subscreen, please help me with this.

    Rest all like registering the events etc etc i have done perfeclty.

    bhavana

  • RELEVANCY SCORE 3.34

    DB:3.34:Alv Tree fk



    hi

    i m new to ALV Tree can any one help in learning this.......

    thnx

    DB:3.34:Alv Tree fk


    Hi neha,

    1. Its quite simple.

    2. Basically there are TWO FMs,

    which do the job.

    3. just copy paste in new program

    and u will know the whole logic.

    4.

    REPORT abc.

    DATA : tr LIKE TABLE OF snodetext WITH HEADER LINE.

    *----

    data

    tr-id = '1'.

    tr-tlevel = 1.

    tr-name = 'amit'.

    APPEND tr.

    tr-id = '2'.

    tr-tlevel = 2.

    tr-name = 'mittal'.

    APPEND tr.

    tr-id = '3'.

    tr-tlevel = 2.

    tr-name = 'Hello'.

    APPEND tr.

    tr-id = '4'.

    tr-tlevel = 2.

    tr-name = 'Brother'.

    APPEND tr.

    tr-id = '5'.

    tr-tlevel = 4.

    tr-name = 'Brother'.

    APPEND tr.

    *----

    display

    CALL FUNCTION 'RS_TREE_CONSTRUCT'

    TABLES

    nodetab = tr

    EXCEPTIONS

    tree_failure = 1

    OTHERS = 4.

    CALL FUNCTION 'RS_TREE_LIST_DISPLAY'

    .

    regards,

    amit m.

  • RELEVANCY SCORE 3.34

    DB:3.34:Pf Status User-Command In Alv Grid 3j



    Hi Friends,

    I have one query for ALV grid.

    Actually my requirement is like that

    Whenever the user double click on grid the control moves to transaction 'VA01' tcode.

    I also wanted to set the gui status in ALV grid.

    How to do it??

    Plz tell me in detail.

    DB:3.34:Pf Status User-Command In Alv Grid 3j


    hi,

    simple chk this link.

    http://www.sapdevelopment.co.uk/reporting/alv/alvgrid.htm

    code is there.

    just cut and pste.

    reagrds

    Anver

  • RELEVANCY SCORE 3.33

    DB:3.33:Tree Structure Using Alv Oops Conceps d3



    Hi all,

    Kindly can any one help me regarding this issue it is very urgent,

    I created a tree structure for 5 levels

    PlantSales DisdrictCustomer-equipmentMatnr,Sernr

    I used containers and used add node method to create the sructure,

    the problem is to display as follows

    Plant plant text

    salesdistrict descripption

    Customer customername

    equipment equipment description

    I am able to display tree but at the same time I am not able to display descriptions

    How to do this Kindly help mee ... ASAP

    After this once I click on customer it has to go to XD03 when double clicking on customer it is not capturing the value as it is in tree hierarchy, how to handle this.

    Rewarding Advance

    Srilakshmi

    DB:3.33:Tree Structure Using Alv Oops Conceps d3


    Hi I have already used the given examples and displaying tree structure but

    my problem is

    in 1 row if i have Tplnr(plant) with hierarchy symbol , in the end of that row I have to display pltxt regarding to that tplnr.

    Then if I press on that hierarchy symbol I am getting sales district number

    but still I have to display the the text regarding to that sales district.

    Vice versa for customer,equipment.....

    this is not there in any examples kindly help me..

    regards,

    Srilakshmi

  • RELEVANCY SCORE 3.33

    DB:3.33:Handling Single Click In Alv Tree p7



    Hello Friends,

    Is there an event triggered,for single click on an alv tree.

    regards

    kaushik

    DB:3.33:Handling Single Click In Alv Tree p7


    hi ,

    it_fieldcat-hotspot = 'X'.

    regards,

    venkat.

    Edited by: venkat appikonda on Mar 13, 2008 8:11 PM

    Edited by: venkat appikonda on Mar 13, 2008 8:12 PM

  • RELEVANCY SCORE 3.32

    DB:3.32:Alv-Tree Node Click Not Working pd


    Hi All, I am displaying the data in ALV tree. When the user click on the node i want to capture some event and method in which i have to do some coding. Can you tell me which method and event i should use to achieve this functionality. its bit urgent.Immediate response will be apprecited. Regards,Ranjan

    DB:3.32:Alv-Tree Node Click Not Working pd

    Hi,Refer to the sample program SAPSIMPLE_TREE_CONTROL_DEMO.Regards,Renjith Michael.

  • RELEVANCY SCORE 3.32

    DB:3.32:Tree Structure And Triffic Lights c7


    Hi, I wanted to create tree structure in ALV and put some lights ( Exceptions ) in different colors when user browse the tree . How to develop this ALV using oops.Regards, Prasad

    DB:3.32:Tree Structure And Triffic Lights c7

    Check this code it may help u.TYPE-POOLS: slis,icon.DATA: x_fieldcat TYPE slis_fieldcat_alv, it_fieldcat TYPE slis_t_fieldcat_alv, l_layout TYPE slis_layout_alv.DATA: BEGIN OF itab OCCURS 0, vbeln LIKE vbak-vbeln, posnr LIKE vbap-posnr, icon(1), END OF itab.data:program type sy-repid.SELECT vbeln posnr FROM vbap UP TO 20 ROWS INTO TABLE itab.LOOP AT itab. IF sy-tabix = 1 OR sy-tabix = 2. itab-icon = '1'. ELSEIF sy-tabix = 10 OR sy-tabix = 20. itab-icon = '2'. ELSE. itab-icon = '3'. ENDIF. MODIFY itab INDEX sy-tabix.ENDLOOP.program = sy-repid.x_fieldcat-fieldname = 'VBELN'.x_fieldcat-seltext_l = 'VBELN'.x_fieldcat-hotspot = 'X'.x_fieldcat-tabname = 'ITAB'.x_fieldcat-col_pos = 1.APPEND x_fieldcat TO it_fieldcat.CLEAR x_fieldcat.x_fieldcat-fieldname = 'POSNR'.x_fieldcat-seltext_l = 'POSNR'.x_fieldcat-tabname = 'ITAB'.x_fieldcat-col_pos = 2.APPEND x_fieldcat TO it_fieldcat.CLEAR x_fieldcat.l_layout-lights_fieldname = 'ICON'.CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY' EXPORTING i_callback_program = program is_layout = l_layout it_fieldcat = it_fieldcat TABLES t_outtab = itab EXCEPTIONS program_error = 1 OTHERS = 2.IF sy-subrc 0. MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.ENDIF.Regards,

  • RELEVANCY SCORE 3.32

    DB:3.32:Click Event xc


    Hi, Can I use the event "click" ?? Do it exist ?I need use in an ALV the two events, "click" and "double click". I only know the second event.Thanks

  • RELEVANCY SCORE 3.31

    DB:3.31:Problem With Alv Tree p8



    I am facing a problem with ALV tree.

    I have two ALV trees and one ALV grid in my program.

    So it looks like this

    Alv_tree1-when double click one leaf node

    It open ALV_TREE2--when double click one leaf node, some data will be dispalyed in alv grid.

    The problem is when i select some Leaf nodes in ALV tree2 and push some button on toolbar(which i have created) it should be displayed in ALV grid. first time when i run the report it's working fine but

    when i go backk from ALV Grid to ALV tree2, if i change selections i am not getting the selected values in my internal table.

    i am calling the method

    CALL METHOD lcl_gui_alv_tree2-get_selected_nodes
    CHANGING
    ct_selected_nodes = lt_selected_nodes.

    DB:3.31:Problem With Alv Tree p8


    I have used flush and dispatch many times in my program this makes the problem

  • RELEVANCY SCORE 3.31

    DB:3.31:Module Pool Screen Fields Not Getting Populated mk



    Hi all,

    I'm having following issue. I'm working on one module pool program.

    On screen 100, on left had side i have a tree display and remaining part as subcreen(initially to display blank screen on right).

    When user double clicks on any node on tree i'm calling subscreen 101 which have tab strip control and subscreen for tab strip are 102 and 103.

    On Subscreen 102, i have alv grid display on half part and 4 Input fields below the grid.

    when user double clicks on ALV grid, the below fields should get populated with the values in alv grid row.

    I'm handling this through event "double click" of cl_gui_alv_grid.

    In this method I'm able to pass the values to the screen fields(4 Input fields), but those are not reflecting on screen, Old values are only showing on screen.

    I tried following ways

    1. Passing values directly to screen fields

    2. SET/GET Parameter

    3. FM "DYNPRO_VALUES_UPDATE".

    I hope the problem is due to the PBO of the screen 102 is not getting triggered.

    Can any body could throws your views to resolve this issue.

    Thanks in Advance

  • RELEVANCY SCORE 3.31

    DB:3.31:Double Click In Alv List xj



    Hi all,

    Here is the code:

    my aim is to double click the alv list and display the correspoonding data .can any one tell me how to solve this.

    DB:3.31:Double Click In Alv List xj


    in my_list_event interface that u pass to IT_EVENTS, u need to equate the subroutine name to the FORMNAME . So if u want ur subroutine to be called DOubleclick, then u pass it_events-formname = 'doubleclick' and append it to my_event_list.

    then somewhere at the end of the codelines, u can start the subroutine

    FORM doubleclick using rs_ucomm rs_selfield.

    ur logic...

    endform.

  • RELEVANCY SCORE 3.30

    DB:3.30:Problem In Double Click Event For Alv. pc



    Hi experts ,

    My scenario is one ALV is displayed in First screen and after double click on particular column second screen is displayed with the other ALV.

    I have created 2 custom containers.

    My problem is that for the first double click every thing is fine,then i come back to first screen from second screen when i double click on different item the previous item is displayed which was for the first double click .

    I debugg the program , passing of data to the internal table is fine.

    Help me in the problem

    Thanks

    Aisurya

  • RELEVANCY SCORE 3.30

    DB:3.30:Handling Dbl Click In Alv 8x



    Hi

    Can u tell me how to handle double click in alv?

    Thanks and Regards

    Anish

    DB:3.30:Handling Dbl Click In Alv 8x


    Do you mean interactive Alv? is its that. check this out.

    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 list

    DATA : 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_click

    ENDCLASS. "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

  • RELEVANCY SCORE 3.30

    DB:3.30:Screen Refresh js



    In screen ,have a ALV object and a field object, after double click the ALV object,i want ot transfer the value from ALV to the field, so in the double click event,i set the field value equal the value in ALV,and i debug it that it's OK, but the value of the field is not refresh on the screen ,so i want to know after i double click the ALV, how to refresh the screen automatically?

    Thanks!

    DB:3.30:Screen Refresh js


    before modification , i put the function in the double click method,

    after your suggestion, i put the function and modify the value of field in PAI ,so it woks.

  • RELEVANCY SCORE 3.29

    DB:3.29:Double Click 3k



    hallow i wont to learn about event double click in alv

    did some one have pdf or word docoument that explain that

    regards

    DB:3.29:Double Click 3k


    Hi..,

    bAssigning a function to double-click

    Procedure : /b

    The function code 'F2' for double-click or hotspot must have the ALV standard function code

    'IC1' in the interface. This applies for both the ALV standard interface and applicationspecifically

    enhanced interfaces.

    If double-click or hotspot should call another function code, you can assign the function code

    to be called to the field bIS_LAYOUT-F2CODE/b in the ALV importing structure bIS_LAYOUT/b. Any

    function (ALV standard or application-specific function) can be assigned to double-click or

    hotspot in this way.

    The ALV standard function 'List row details' can be assigned to double-click by

    assigning bIS_LAYOUT-F2CODE = 'ETA'/b and passing the layout structure to

    ALV module.

    regards,

    sai ramesh

  • RELEVANCY SCORE 3.29

    DB:3.29:Creating Context Menu In Alv Tree Defined Inside Docking Container mf



    Dear Experts.

    Can you please tell me which EVENTS should i use in CLASS: CL_GUI_SIMPLE_TREE to get a Context menu after right click on any tree node in ALV Tree which has been defined inside a Docking Container.

    Regards Arnab.

    DB:3.29:Creating Context Menu In Alv Tree Defined Inside Docking Container mf


    Hi,

    Check Program SAPSIMPLE_TREE_CONTEXT_MEN_DEM and check event node_context_menu_request

    Hope this helps you.

    Thanks,

    Prashanth

    Edited by: Prashanth KR on Jun 2, 2009 7:50 AM

  • RELEVANCY SCORE 3.29

    DB:3.29:Display Record Once I Click Alv O/P zk



    hi friends

    once i click or double click the output of alv record..it must be added in itab.

    finally i want all the records.. whatever item i already clicked in the internal table..(without using screen painter concept)

    thankz in advance

    gowrishankar

    DB:3.29:Display Record Once I Click Alv O/P zk


    hi friends

    once i click or double click the output of alv record..it must be added in itab.

    finally i want all the records.. whatever item i already clicked in the internal table..(without using screen painter concept)

    thankz in advance

    gowrishankar

  • RELEVANCY SCORE 3.29

    DB:3.29:Alv Oops Double-Click Event 13



    Hi,

    I want to handle the double-click event in ALV grid (OOPs).

    The output should be shown in the same fashion as it is shown in SE16 when we double-click on any record in the result set.

    i.e. if you have selected the ALV grid display for the Data browser in SE16 and when you double click on any record, the complete record is shown in a window.

    I want this in my ALV as well..

    Can anyone please suggest how to achieve this?

    Regards

    s.a.k

    DB:3.29:Alv Oops Double-Click Event 13


    Hi Naveen,

    Thanks a lot for the response..:)

    Regards

    s.a.k

  • RELEVANCY SCORE 3.28

    DB:3.28:Can We Schedule Oo Alv Tree In Background? 7m



    hi all

    can we schedule oo alv tree in background?

    Thanks

    venkat

    DB:3.28:Can We Schedule Oo Alv Tree In Background? 7m


    Hi,

    We can schedule OO ALV in background.

    follow this link ALV Tree in Background

    Regards,

    Pravin

  • RELEVANCY SCORE 3.28

    DB:3.28:The Double Click Action On Alv In Wda xf



    Hi,

    is there anyone knows how to create the double click action on alv in wda?

    Thanks.

    DB:3.28:The Double Click Action On Alv In Wda xf


    Hi,

    You have double click event in 2D ALV under CL_SALV_EVENTS_TABLE not in Webdynpro.......

    -Rick

  • RELEVANCY SCORE 3.28

    DB:3.28:Alv Tree - Edit Fields xj



    I am currently working on an ALV tree rapport by using class CU_GUI_ALV_TREE

    When the data is unpacked and packed out to the "lowest" level (C), I want that some of the field to be editable.

    A

    !__

    B

    !___

    C --- field1 edit1 edit2

    Field1 is just a display field - no problems there

    edit1 and edit2 - I can not get it to work.

    I have made the filed editable is the fieldcatelog - which does not give nothing

    Then I tried (and using) to use the method add_node - where I use the layout (IT_ITEM_LAYOUT). If I there make the edit1 and edit2 editable then the systems dumps.

    So that does not solve the problem.

    So is it another flag or method to make a field editable in ALV tree?

    If not - is the workaround to make a double click event (at line) and in this pop-up box make the fields editable?

    DB:3.28:Alv Tree - Edit Fields xj


    Hi Leif,

    I have not achieved that myself. Maybe you could use a different approach: display the fields into the tree, then use another subscree to show the field contents and allow the user to chage it.

    You could find useful these demo programs: SAPSIMPLE_TREE_CONTROL_DEMO, SAPCOLUMN_TREE_CONTROL_DEMO, SAPTLIST_TREE_CONTROL_DEMO, SAPTLIST_TREE_CONTROL_DEMO_HDR, because they show a tree and then, in another subscreen, they show some properties of the selected fields and so.

    I hope it helps. Best regards,

    Alvaro

  • RELEVANCY SCORE 3.28

    DB:3.28:Double Click Alv Record To Open Transaction With Out Setting Parameter Id. 7j



    In an ALV GRID report I want to navigate to the transaction by double clicking on a value in the ALV and skip the first screen.

    But if paramater Id is not given by SAP then how to do this task....The transaction which should be opened for the respective value after double click are VL33N HU03 VTRK VA03 ME23N.

  • RELEVANCY SCORE 3.28

    DB:3.28:Change A Value In The Header Of An Alv Grid 1z



    HI,

    In a screen, i have in the left part an ALV tree with a header.

    When i click on the tree, i display the detail in an ALV list in the right part of the screen , it's OK.

    Ib want so change a value in the header of the tree when i click on the tree .... How/b???

    Thank you for your assistance.

    DB:3.28:Change A Value In The Header Of An Alv Grid 1z


    HI,

    In a screen, i have in the left part an ALV tree with a header.

    When i click on the tree, i display the detail in an ALV list in the right part of the screen , it's OK.

    Ib want so change a value in the header of the tree when i click on the tree .... How/b???

    Thank you for your assistance.

  • RELEVANCY SCORE 3.27

    DB:3.27:Alv Table In Popup Via Alv Table x7



    Hello Friends,

    I have a requirement where i double click on one line item in an ALV table, considering the parameters in the selected line item, it should provide me the details in a POPUP which again should be an ALV view. Please suggest.

    Thanks,

    Suri

    DB:3.27:Alv Table In Popup Via Alv Table x7


    I dont think there is any example of Calling ALV from ALV...

    But its normal as calling any other component in a pop up from ALV.

    Only thing is u need to different component usages of the same ALV Component

    SALV_WD_TABLE.

    Heres a sample code.......this is just sample

    1) Declare a method in the MAIN VIEW as event handler for On_Lead_Select interface event of the ALV main Table

    2) Select a row in main ALV table tos ee details. Retrive the selected row in the event handler declared in 1) and get the Atrribute by which the details is to be filtered and shown

    data Node_AlvMain type ref to IF_WD_CONTEXT_NODE.

    Node_AlvMain = wd_Context-GET_CHILD_NODE( 'AlvMain' )

    Node_AlvMain-GET_ATTRIBUTE

    Exporting

    Name = 'Attr1'

    Importing

    Value = Value_for_Filter .

    3) Instantiate the POP Up ALV

    data l_pop_alv type ref to if_wd_component_usage.

    l_pop_alv = wd_this-get_CpUse_Alv_Popup( ).

    if l_pop_alv-hasActiveComponent( ) is initial.

    l_pop_alv-create_Component( ).

    endif.

    4) Get the Pop Up Alv Model thru its interface controller

    ref_ifc_ctr_alv_popup = wd_this-Get_Cpifc_Alv_Popup( ).

    m_popup_model = ref_ifc_ctr_alv_popup-GET_MODEL( ).

    CREATE THE POP UP VIEW AND EMBED IT INSIDE A WINDOW

    5) Filter the pop up details data in m_popup_model from the filter obtained in 2) above

    5) Call the Window that embeds the Pop up ALV view

    data ref_comp_ctr type ref to if_wd_controller

    data ref_win_man type ref to if_wd_window_manager

    data ref_win type ref to if_wd_window

    ref_comp_ctr ?= wd_this-wd_get_api( ).

    ref_comp = ref_comp_ctr-get_component( ).

    ref_win_man = ref_comp-GET_WINDOW_MANAGER( ).

    ref_win = ref_win_man-CREATE_WINDOW(

    window name = 'NAME OF WINDOW WHICH EMBEDS THE ALV POPUP VIEW

    View = cureent view controller)

    ref_win-open( ).

  • RELEVANCY SCORE 3.27

    DB:3.27:Execute Button In Interactive Alv dk



    hi,

    i have a requirement where in the alv is displayed and then i should select one of the lines out of alv grid and then click on execute button to perform some function which displays again ALV

    I am able toactivate the double click event like if i double click on selected record from ALV,i would be able to perform the further function but does not any body know how to create an execute button in ALV and then perform action on clicking execute button

    kanishak

    DB:3.27:Execute Button In Interactive Alv dk


    Hi,

    Refer wiki code by me on ALV with Checkbox and process selected records at run-time:-

    https://www.sdn.sap.com/irj/scn/wiki?path=/display/snippets/alv%252bgrid%252bdisplay%252bwith%252bcheckbox%252bto%252bprocess%252bselected%252brecords%252bat%252bruntime

    Hope this helps you.

    Regards,

    Tarun Gambhir

  • RELEVANCY SCORE 3.25

    DB:3.25:Alv Grid Changes Not Updated In Internal Table m7



    Hi Experts,

    I have displayed an ALV using OOPs ,

    Now when i do the Sub totaling(Standard functionality ) in the ALV Grid

    The order changes, Accordingly my internal table doesnt changes

    Because of which my double click event goes wrong.

    Thanks

    DB:3.25:Alv Grid Changes Not Updated In Internal Table m7


    Steps will be as follows :

    1. *-- Get the selected rows

    CALL METHOD o_grid1-get_selected_rows

    IMPORTING

    et_row_no = gw_row_no[].

    2. *-- Track the changes in the ALV Grid

    CALL METHOD o_grid1-check_changed_data

    IMPORTING

    e_valid = gv_valid.

    3. IF gv_valid = 'X'.

    PERFORM save. " Save changes into your internal table using the row no.

    ENDIF.

    4. Now, Display this table again.

  • RELEVANCY SCORE 3.25

    DB:3.25:Alv Reports f8



    Hi All,

    I want to change the records in ALV Grid Reports Using Double Click Mouse Event. Is it possible ?

    Thanks in advance.

    DB:3.25:Alv Reports f8


    Hi vijay ,

    u can use the double_click event if u are using oops in alv.

    for further ref use the thread below..where clearly code is also given.

    https://www.sdn.sap.com/irj/sdn/collaboration

    hope this helps u a bit,

    all the best,

    regards,

    sampath

    mark helpful answers

    null

  • RELEVANCY SCORE 3.25

    DB:3.25:Triggerring Alv-Pop Up ak


    Hi all, How to trigger a pop-up alv report upono double click on a row in a report developed using OO ALV.Do i need to trigger any method and call fm REUSE ALV POP UP? Please help!Helpful answers will be rewarded.Thanks,Sandeep

    DB:3.25:Triggerring Alv-Pop Up ak

    Hi...same functionality u can find in report : BCALV_GRID_03regardsvivek

  • RELEVANCY SCORE 3.24

    DB:3.24:Double Click Alv Not Change j3



    Hi all

    i had programing a simple tree with alv, check URL

    [http://bildupload.sro.at/p/350813.html]

    on the left side, you see database. Now, when you click ones of db, it should show the db with data fields in ALV. The first click work, but continue doens't work. Why?

    thx

  • RELEVANCY SCORE 3.24

    DB:3.24:Alv Tree/Grid Event Handling Question. s7



    Hi. I have a cl_gui_alv_tree_simple control and a cl_gui_alv_grid control separated by a splitter_container control.

    The idea is when i double-click a node in the alv tree, the contents of the alv grid changes based on my selection. I have already done this.

    I still, however, need to display header information. Unfortunately the HTML header (w/c is available in the alv FM) is not implemented in dialog style alv (is it?). So.. i decided to use dynpros.

    My problem is that the values of the dynpros are not updated because the program never triggers the pbo or the pai. So my question is..

    How do i trigger a user command from an event so that the pai can be triggered?. Is this possible?

    DB:3.24:Alv Tree/Grid Event Handling Question. s7


    Hello Emir

    Call the static method bcl_gui_cfw=set_new_okcode/b with your required ok-code. The short description of this methods says i"Be careful: This sets a new Fcode in Eventhandler for PAI",/i exactly what you want.

    Regards

    Uwe

  • RELEVANCY SCORE 3.23

    DB:3.23:Interactive Alv Webdynpro df



    Hi,

    I devloped ALV in TABScript, Output is perfect in the form of ALV

    In ALV , I want to set one colument as LinktoUrl such that , if I double click column to display next view based on that row.

    I can able to set one column as Linkto URL in TABLE but ALV how to set specific column as linktoURL.

    for ALV, Taken ViwcontainerUIelemnt , Such that I am unable to see any columns.

    How to Set specific column as interactivlink to goto next view.

    Thanks,

    Sam

    Moderator Message: Wrong forum.

    Edited by: kishan P on Nov 10, 2010 11:25 AM

    DB:3.23:Interactive Alv Webdynpro df


    Hi,

    I devloped ALV in TABScript, Output is perfect in the form of ALV

    In ALV , I want to set one colument as LinktoUrl such that , if I double click column to display next view based on that row.

    I can able to set one column as Linkto URL in TABLE but ALV how to set specific column as linktoURL.

    for ALV, Taken ViwcontainerUIelemnt , Such that I am unable to see any columns.

    How to Set specific column as interactivlink to goto next view.

    Thanks,

    Sam

    Moderator Message: Wrong forum.

    Edited by: kishan P on Nov 10, 2010 11:25 AM

  • RELEVANCY SCORE 3.23

    DB:3.23:Refreshing Alv sm



    Hi,

    I am displaying a tree in the left side of the screen and based on the node selected (Double clicking the data needs to be displayed in the ALV adjacent to it. bStructure of the internal table changes with node selection(Dynamic internal table)./b How to refresh the ALV?

    Thanks in advance.

    Message was edited by:

    sekhar J

    DB:3.23:Refreshing Alv sm


    Hi,

    In ALV, to refresh the table you have to call the method "refresh_table_display".

    It has the syntax very similar to creating the table.

    It has two parameters. In the first one, you can mention if you want to refresh only the data (the icons are not refreshed)

    or

    if you want to refresh only the icons around the grid (the data is not refreshed - this option is mostly not used in day to day applications).

    the synatx is :-

    call method grid (name of grid )-refresh_table_display

    exporting

    IS_STABLE = STRUCT OF TYPE LVC_S_STBL (THIS IS FOR DATA REFRESHING)

    I_SOFT_REFRESH = VARIABLE OF CHAR 01 (THIS IS FOR ICON REFRESHING).

    Hope this helps.

    Reward if helpful.

    Regards,

    Sipra

  • RELEVANCY SCORE 3.22

    DB:3.22:How To Catch Double Click Event In Alv For Wda kj



    Hi...

    I want to double click a line of ALV table in Web Dynpro,then catch the event,how can I do it?

    thanks.

    Jacky

    DB:3.22:How To Catch Double Click Event In Alv For Wda kj


    Hi,

    If you are still facing problem, you can go through the following --

    [Reg handling change in selection of ALV in WDA;

    Thanks.

    Kumar Saurav.

  • RELEVANCY SCORE 3.22

    DB:3.22:Alv Tree 3f


    Hi ,i have populated the ALV Tree and im trying to get the value of the selected field(in other words value of the field which i click),but im not sure which method to use.Please could any one help me on this regard?Thanks in advance.sorry for cross posting the other threads were deleted.

    DB:3.22:Alv Tree 3f

    Hi Thanx for the help, but the method call method me-tree_get_node_text exporting i_node_key = l_node_key importing e_node_text = e_node_text.is private so we need to call a public or protected method to use the above one.

  • RELEVANCY SCORE 3.22

    DB:3.22:Disable Double Click Event On Some Rows Of Alv pd



    I am using my ALV Grid using the following

    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY_LVC'

    EXPORTING

    I_CALLBACK_PROGRAM = SY-CPROG

    I_GRID_TITLE = 'Main Grid'

    I_CALLBACK_PF_STATUS_SET = 'SET_PF_STATUS'

    i_callback_user_command = 'USER_COMMAND'

    is_layout_lvc = gd_layout

    it_fieldcat_lvc = I_FIELDCAT[]

    TABLES

    t_outtab = EDIDC_DATA.

    I have implemented in usercommand some logic when a row of ALV Grid is Double clicked. On double clicking i generate a new ALV do some processing and the user then clicks back from the new ALV. On returning to my main GRID i want to DISABLE the double click event on the record that was originaly selected so the user is not able to double click on the same entry again in the GRID that was processed before.

    I have tried using style disabled hoping that, that might disable the double click event trigger for the row but does nt work.

    Any ideas please?

    Edited by: Salman Akram on Oct 22, 2010 2:17 PM

    DB:3.22:Disable Double Click Event On Some Rows Of Alv pd


    Hi Salman,

    As said by Uwe Schieferstein, you can create an internal table and check for that entry. The other way would be to create a column in your final internal table,say CHK of type C. Now, whenever a user double clicks on a row you add set the flag as X to that column. For example :

    *---------------------------------------------------------------------*
    * Form USER_COMMAND
    *---------------------------------------------------------------------*

    FORM USER_COMMAND USING R_UCOMM LIKE SY-UCOMM
    RS_SELFIELD TYPE SLIS_SELFIELD.

    CASE R_UCOMM.

    WHEN 'IC1'.
    "Assume final internal Table name as IT_FINAL and the Flag Column as CHK

    READ TABLE IT_FINAL INTO WA_FINAL INDEX S_SELFIELD-TABINDEX.

    IF WA_FINAL-CHK 'X'.

    PERFORM DISPLAY_SECONDARY_ALV."Say this is your secndary ALV list

    WA_FINAL-CHK = 'X'.

    MODIFY IT_FINAL FROM WA_FINAL INDEX S_SELFIELD-TABINDEX TRANSPORTING CHK.

    ENDIF.

    ENDCASE.

  • RELEVANCY SCORE 3.22

    DB:3.22:Alv Tree Is Not Getting Refreshed dp



    Hi Team,

    ALV tree is not getting refreshed in not displaying the entire tree structure.

    Please provide soln.

    Regards

    Navin

    DB:3.22:Alv Tree Is Not Getting Refreshed dp


    Hi Dude,

    Please try this code below.

    collect all the top level nodes in internal table GT_NODE_KEY .

    DATA: ALL_KEY TYPE LVC_NKEY.

    LOOP AT GT_NODE_KEY INTO ALL_KEY .

    *gt_final is final internal table for data tree.

    IF NOT GT_FINAL IS INITIAL.

    CALL METHOD TREE2-EXPAND_NODE

    EXPORTING

    I_NODE_KEY = ALL_KEY

    I_EXPAND_SUBTREE = 'X'.

    CALL METHOD CL_GUI_CFW=FLUSH.

    ENDIF.

    ENDLOOP.

    Regards,

    Ravi.

  • RELEVANCY SCORE 3.22

    DB:3.22:Alv Double Click Event ck



    Hi

    i have requirement in ALV Double Click Event

    DOUBLE_CLICK is an event in the ALV grid control and this is triggered when the user double clicks a selected cell. On double click of a particular sales document number in ALV Grid control, the display sales order details transaction should be displayed (TCODE: VA03).

    i have place the code like

    AT LINE-SELECTION.

    IF sy-lsind = 1.

    GET CURSOR FIELD fval VALUE val.

    IF fval = 't_header-vbeln'.

    CALL TRANSACTION 'VA03'.

    ENDIF.

    ENDIF.

    But this is not working.

    please give valuable input.

    Thanks

    Atul

    DB:3.22:Alv Double Click Event ck


    report zrich_0001.

    Global ALV Data Declarations

    type-pools: slis.

    Internal Tables

    data: begin of itab occurs 0,

    matnr type mara-matnr,

    maktx type makt-maktx,

    end of itab.

    start-of-selection.

    perform get_data.

    perform call_alv.

    *********************************************************************

    Form GET_DATA

    *********************************************************************

    form get_data.

    select maramatnr maktmaktx

    into corresponding fields of table itab

    from mara

    inner join makt

    on maramatnr = maktmatnr

    up to 20 rows.

    endform.

    ************************************************************************

    CALL_ALV

    ************************************************************************

    form call_alv.

    data: ifc type slis_t_fieldcat_alv.

    data: xfc type slis_fieldcat_alv.

    data: repid type sy-repid.

    repid = sy-repid.

    clear xfc. refresh ifc.

    clear xfc.

    xfc-reptext_ddic = 'Material Number'.

    xfc-fieldname = 'MATNR'.

    xfc-tabname = 'ITAB'.

    xfc-outputlen = '18'.

    append xfc to ifc.

    clear xfc.

    xfc-reptext_ddic = 'Material Description'.

    xfc-fieldname = 'MAKTX'.

    xfc-tabname = 'ITAB'.

    xfc-outputlen = '40'.

    append xfc to ifc.

    Call ABAP List Viewer (ALV)

    call function 'REUSE_ALV_GRID_DISPLAY'

    exporting

    i_callback_program = repid

    i_callback_user_command = 'HANDLE_USER_COMMAND'

    it_fieldcat = ifc

    tables

    t_outtab = itab.

    endform.

    ***********************************************************************

    FORM handle_User_Command *

    ***********************************************************************

    form handle_user_command using r_ucomm like sy-ucomm

    rs_selfield type slis_selfield.

    case r_ucomm.

    when 'IC1'.

    case rs_selfield-FIELDNAME.

    when 'MATNR'.

    set parameter id 'MAT' field rs_selfield-value.

    set parameter id 'WRK' field '0001'.

    call transaction 'MD04' and skip first screen.

    endcase.

    endcase.

    endform.

    Hello

    This is an ABAP-OO based ALV list that I posted recently. You either double-click on a customer in the first ALV grid or select one row and push the "DETAIL" button. The sales areas of the customer are displayed 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.

    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





    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.

    Set event handler

    SET HANDLER: lcl_eventhandler=handle_double_click FOR go_grid1.

    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

    CALL METHOD go_grid1-set_table_for_first_display

    EXPORTING

    i_structure_name = 'KNB1'

    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.

    CALL METHOD go_grid2-set_table_for_first_display

    EXPORTING

    i_structure_name = 'KNVV'

    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:

    *

    *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

    ----

    * Report Z_REPORTFROMKNA1ANDT005T

    *

    ----

    *

    *

    ----

    REPORT Z_REPORTFROMKNA1ANDT005T

    LINE-SIZE 180

    MESSAGE-ID ZZ.

    TABLES:EKKO.

    TYPE-POOLS : SLIS.

    ----

    Internal table for ALV

    ----

    DATA : IT_FIELDCAT TYPE SLIS_T_FIELDCAT_ALV, "Field catalog

    WA_FIELDCAT TYPE SLIS_FIELDCAT_ALV, "WA for Field catalog

    IT_EVENT TYPE SLIS_T_EVENT, "events

    WA_EVENT TYPE SLIS_ALV_EVENT, "WA for events

    IT_COMMENT TYPE SLIS_T_LISTHEADER, "Header details

    WA_COMMENT TYPE SLIS_LISTHEADER, "WA for header details

    WA_LAYOUT TYPE SLIS_LAYOUT_ALV, "Layout

    IT_SORT TYPE SLIS_T_SORTINFO_ALV, "Sort table

    WA_SORT TYPE SLIS_SORTINFO_ALV, "WA for sort table

    IT_KEYINFO TYPE SLIS_KEYINFO_ALV. "Pass key value

    DATA : V_REPID LIKE SY-REPID.

    V_REPID = SY-REPID.

    DATA : V_DATE LIKE SY-DATUM.

    color management.

    DATA : IT_COLOR TYPE TABLE OF LVC_S_SCOL. "Color management.

    ----

    Internal table declearation

    ----

    DATA:BEGIN OF IT_EKKO OCCURS 0,

    EBELN LIKE EKKO-EBELN,

    BUKRS LIKE EKKO-BUKRS,

    AEDAT LIKE EKKO-AEDAT,

    END OF IT_EKKO.

    DATA : BEGIN OF IT_EKPO OCCURS 0,

    EBELN LIKE EKPO-EBELN,

    EBELP LIKE EKPO-EBELP,

    MATNR LIKE EKPO-MATNR,

    MENGE LIKE EKPO-MENGE,

    MEINS LIKE EKPO-MEINS,

    NETPR LIKE EKPO-NETPR,

    NETWR LIKE EKPO-MENGE,

    chk(1) type c,

    END OF IT_EKPO.

    DATA : BEGIN OF IT_EKBE OCCURS 0,

    EBELN LIKE EKBE-EBELN,

    EBELP LIKE EKBE-EBELP,

    BELNR LIKE EKBE-BELNR,

    MENGE LIKE EKBE-MENGE,

    MATNR LIKE EKBE-MATNR,

    END OF IT_EKBE.

    DATA : BEGIN OF IT_FINAL OCCURS 0,

    EBELN LIKE EKPO-EBELN,

    EBELP LIKE EKPO-EBELP,

    MATNR LIKE EKPO-MATNR,

    MENGE LIKE EKPO-MENGE,

    MEINS LIKE EKPO-MEINS,

    NETPR LIKE EKPO-NETPR,

    NETWR LIKE EKPO-NETWR,

    LINE_COLOR(4) TYPE C, "Used to store row color attributes

    END OF IT_FINAL.

    SELECTION-SCREEN BEGIN OF BLOCK BLK WITH FRAME TITLE TEXT-001.

    SELECT-OPTIONS:S_EBELN FOR EKKO-EBELN.

    PARAMETERS : RB1 RADIOBUTTON GROUP G1 MODIF ID Z1,

    RB2 RADIOBUTTON GROUP G1 MODIF ID Z2,

    RB3 RADIOBUTTON GROUP G1 MODIF ID Z3.

    SELECTION-SCREEN END OF BLOCK BLK.

    AT SELECTION-SCREEN OUTPUT.

    PERFORM MODIFY_SCREEN.

    START-OF-SELECTION.

    PERFORM GET_DETAILS.

    PERFORM GET_ALV.

    ----

    * Form modify_screen

    ----

    text

    ----

    -- p1 text

    -- p2 text

    ----

    FORM MODIFY_SCREEN .

    IF RB1 = 'X'.

    LOOP AT SCREEN.

    IF SCREEN-GROUP1 = 'Z1' .

    SCREEN-INVISIBLE = 1.

    SCREEN-ACTIVE = 0.

    ELSE.

    SCREEN-INVISIBLE = 0.

    SCREEN-ACTIVE = 1.

    ENDIF.

    MODIFY SCREEN.

    ENDLOOP.

    ENDIF.

    ENDFORM. " modify_screen

    ----

    * Form GET_DETAILS

    ----

    Get the details

    ----

    FORM GET_DETAILS .

    DATA: LD_COLOR(1) TYPE C.

    SELECT EBELN

    BUKRS

    AEDAT

    FROM EKKO

    INTO TABLE IT_EKKO

    WHERE EBELN IN S_EBELN.

    IF SY-SUBRC = 0.

    SORT IT_EKKO BY EBELN.

    ELSE.

    MESSAGE E000 WITH 'DATA NOT FOUND'.

    ENDIF.

    IF NOT IT_EKKO[] IS INITIAL.

    SELECT EBELN

    EBELP

    MATNR

    MENGE

    MEINS

    NETPR

    NETWR

    chk

    FROM EKPO

    INTO TABLE IT_EKPO

    FOR ALL ENTRIES IN IT_EKKO

    WHERE EBELN = IT_EKKO-EBELN.

    IF SY-SUBRC = 0.

    SORT IT_EKPO BY EBELN.

    ENDIF.

    ENDIF.

    LOOP AT IT_EKPO.

    IT_FINAL-EBELN = IT_EKPO-EBELN.

    IT_FINAL-EBELP = IT_EKPO-EBELP.

    IT_FINAL-MATNR = IT_EKPO-MATNR.

    IT_FINAL-MENGE = IT_EKPO-MENGE.

    IT_FINAL-MEINS = IT_EKPO-MEINS.

    IT_FINAL-NETPR = IT_EKPO-NETPR.

    IT_FINAL-NETWR = IT_EKPO-NETWR.

    ON CHANGE OF IT_FINAL-EBELN.

    LD_COLOR = 7.

    CONCATENATE 'C' LD_COLOR '10' INTO IT_FINAL-LINE_COLOR.

    ENDON.

    APPEND IT_FINAL.

    CLEAR IT_FINAL.

    ENDLOOP.

    ENDFORM. " GET_DETAILS

    ----

    * Form GET_ALV

    ----

    text

    ----

    FORM GET_ALV .

    PERFORM GENERATE_FIELDCAT.

    PERFORM GENERATE_LAYOUT.

    PERFORM GENERATE_EVENTS.

    PERFORM GENERATE_SORT.

    PERFORM ALV_GRID_DISPLAY.

    ENDFORM. " GET_ALV

    ----

    * Form GENERATE_FIELDCAT

    ----

    Field catalog

    ----

    FORM GENERATE_FIELDCAT .

    IF RB1 = 'X' OR RB2 = 'X'.

    WA_FIELDCAT-FIELDNAME = 'EBELN'.

    WA_FIELDCAT-COL_POS = '1'.

    WA_FIELDCAT-JUST = 'R'.

    WA_FIELDCAT-SELTEXT_L = 'PO Number'.

    WA_FIELDCAT-LOWERCASE = 'X'.

    WA_FIELDCAT-DO_SUM = 'X'.

    APPEND WA_FIELDCAT TO IT_FIELDCAT.

    WA_FIELDCAT-FIELDNAME = 'EBELP'.

    WA_FIELDCAT-COL_POS = '2'.

    WA_FIELDCAT-JUST = 'C'.

    WA_FIELDCAT-SELTEXT_L = 'Item Number'.

    WA_FIELDCAT-LOWERCASE = 'X'.

    WA_FIELDCAT-edit = 'X'.

    APPEND WA_FIELDCAT TO IT_FIELDCAT.

    WA_FIELDCAT-FIELDNAME = 'MATNR'.

    WA_FIELDCAT-COL_POS = '3'.

    WA_FIELDCAT-JUST = 'C'.

    WA_FIELDCAT-SELTEXT_L = 'Material Number'.

    WA_FIELDCAT-LOWERCASE = 'X'.

    APPEND WA_FIELDCAT TO IT_FIELDCAT.

    WA_FIELDCAT-FIELDNAME = 'MENGE'.

    WA_FIELDCAT-COL_POS = '4'.

    WA_FIELDCAT-JUST = 'C'.

    WA_FIELDCAT-SELTEXT_L = 'PO Quantity'.

    WA_FIELDCAT-LOWERCASE = 'X'.

    APPEND WA_FIELDCAT TO IT_FIELDCAT.

    WA_FIELDCAT-FIELDNAME = 'MEINS'.

    WA_FIELDCAT-COL_POS = '5'.

    WA_FIELDCAT-JUST = 'C'.

    WA_FIELDCAT-SELTEXT_L = 'Order unit'.

    WA_FIELDCAT-LOWERCASE = 'X'.

    APPEND WA_FIELDCAT TO IT_FIELDCAT.

    WA_FIELDCAT-FIELDNAME = 'NETPR'.

    WA_FIELDCAT-COL_POS = '6'.

    WA_FIELDCAT-JUST = 'C'.

    WA_FIELDCAT-SELTEXT_L = 'Net price'.

    WA_FIELDCAT-LOWERCASE = 'X'.

    APPEND WA_FIELDCAT TO IT_FIELDCAT.

    WA_FIELDCAT-FIELDNAME = 'NETWR'.

    WA_FIELDCAT-COL_POS = '7'.

    WA_FIELDCAT-JUST = 'C'.

    WA_FIELDCAT-SELTEXT_L = 'Net order value'.

    WA_FIELDCAT-LOWERCASE = 'X'.

    APPEND WA_FIELDCAT TO IT_FIELDCAT.

    wa_fieldcat-fieldname = 'CHK'.

    wa_fieldcat-col_pos = '8'.

    wa_fieldcat-just = 'C'.

    wa_fieldcat-seltext_l = 'Check Box'.

    wa_fieldcat-lowercase = 'X'.

    wa_fieldcat-checkbox = 'X'.

    wa_fieldcat-edit = 'X'.

    append wa_fieldcat to it_fieldcat.

    ELSE.

    CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'

    EXPORTING

    I_PROGRAM_NAME = V_REPID

    I_INTERNAL_TABNAME = 'IT_EKKO'

    I_STRUCTURE_NAME = I_STRUCTURE_NAME

    I_CLIENT_NEVER_DISPLAY = 'X'

    I_INCLNAME = V_REPID

    I_BYPASSING_BUFFER = I_BYPASSING_BUFFER

    I_BUFFER_ACTIVE = I_BUFFER_ACTIVE

    CHANGING

    CT_FIELDCAT = IT_FIELDCAT

    EXCEPTIONS

    INCONSISTENT_INTERFACE = 1

    PROGRAM_ERROR = 2

    OTHERS = 3

    .

    IF SY-SUBRC 0.

    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

    ENDIF.

    CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'

    EXPORTING

    I_PROGRAM_NAME = V_REPID

    I_INTERNAL_TABNAME = 'IT_EKPO'

    I_STRUCTURE_NAME = I_STRUCTURE_NAME

    I_CLIENT_NEVER_DISPLAY = 'X'

    I_INCLNAME = V_REPID

    I_BYPASSING_BUFFER = I_BYPASSING_BUFFER

    I_BUFFER_ACTIVE = I_BUFFER_ACTIVE

    CHANGING

    CT_FIELDCAT = IT_FIELDCAT

    EXCEPTIONS

    INCONSISTENT_INTERFACE = 1

    PROGRAM_ERROR = 2

    OTHERS = 3

    .

    IF SY-SUBRC 0.

    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

    ENDIF.

    ENDIF.

    ENDFORM. " GENERATE_FIELDCAT

    *----

    * Form GENERATE_EVENTS

    *----

    Generate Events

    *----

    FORM GENERATE_EVENTS .

    CALL FUNCTION 'REUSE_ALV_EVENTS_GET'

    IMPORTING

    ET_EVENTS = IT_EVENT

    EXCEPTIONS

    LIST_TYPE_WRONG = 1

    OTHERS = 2.

    IF SY-SUBRC 0.

    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

    ENDIF.

    IF NOT IT_EVENT[] IS INITIAL.

    READ TABLE IT_EVENT INTO WA_EVENT WITH KEY NAME = 'TOP_OF_PAGE'.

    IF SY-SUBRC = 0.

    WA_EVENT-FORM = 'TOP_OF_PAGE'.

    MODIFY IT_EVENT FROM WA_EVENT INDEX SY-TABIX.

    ENDIF.

    READ TABLE IT_EVENT INTO WA_EVENT WITH KEY NAME = 'USER_COMMAND'.

    IF SY-SUBRC = 0.

    WA_EVENT-FORM = 'IT_USER_COMMAND'.

    MODIFY IT_EVENT FROM WA_EVENT INDEX SY-TABIX.

    ENDIF.

    ENDIF.

    ENDFORM. " GENERATE_EVENTS

    *----

    * Form TOP_OF_PAGE

    *----

    TOP_OF_PAGE

    *----

    FORM TOP_OF_PAGE.

    DATA : V_CONCATE(50) TYPE C.

    DATA : V_SPACE(10) TYPE C.

    CONCATENATE 'VIKRANTH' 'RAJESH' INTO V_CONCATE.

    WA_COMMENT-TYP = 'S'.

    WA_COMMENT-KEY = 'USER :'.

    WA_COMMENT-INFO = V_CONCATE.

    APPEND WA_COMMENT TO IT_COMMENT.

    WA_COMMENT-TYP = 'S'.

    WA_COMMENT-KEY = 'DATE:'.

    WA_COMMENT-INFO = SY-DATUM.

    APPEND WA_COMMENT TO IT_COMMENT.

    WA_COMMENT-TYP = 'S'.

    WA_COMMENT-KEY = 'TIME:'.

    WA_COMMENT-INFO = SY-TIMLO.

    APPEND WA_COMMENT TO IT_COMMENT.

    CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'

    EXPORTING

    IT_LIST_COMMENTARY = IT_COMMENT.

    CLEAR IT_COMMENT.

    ENDFORM. "TOP_OF_PAGE

    ----

    * Form ALV_GRID_DISPLAY

    ----

    Grid display

    ----

    FORM ALV_GRID_DISPLAY .

    IF RB1 = 'X'.

    PERFORM GRID_DISPLAY.

    ELSEIF RB2 = 'X'.

    PERFORM LIST_DISPLAY.

    ELSE.

    PERFORM HIERSEQ_DISPLAY.

    ENDIF.

    ENDFORM. " ALV_GRID_DISPLAY

    ----

    * Form GENERATE_LAYOUT

    ----

    LAYOUT

    ----

    FORM GENERATE_LAYOUT .

    WA_LAYOUT-COLWIDTH_OPTIMIZE = 'X'. "OPTIMIZING FIELD WIDTH

    WA_LAYOUT-ZEBRA = 'X'. "PUTTING ZEBRA COLORS

    WA_LAYOUT-TOTALS_TEXT = 'Total'.

    WA_LAYOUT-SUBTOTALS_TEXT = 'SUB TOTAL'.

    WA_LAYOUT-INFO_FIELDNAME = 'LINE_COLOR'.

    ENDFORM. " GENERATE_LAYOUT

    ----

    * Form GENERATE_SORT

    ----

    SORT

    ----

    FORM GENERATE_SORT .

    WA_SORT-FIELDNAME = 'EBELN'.

    WA_SORT-SPOS = '1'.

    WA_SORT-UP = 'X'.

    WA_SORT-SUBTOT = 'X'.

    APPEND WA_SORT TO IT_SORT.

    ENDFORM. " GENERATE_SORT

    ----

    * Form GRID_DISPLAY

    ----

    GRID DISPLAY

    ----

    FORM GRID_DISPLAY .

    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'

    EXPORTING

    I_INTERFACE_CHECK = ' '

    I_BYPASSING_BUFFER = ' '

    I_BUFFER_ACTIVE = ' '

    I_CALLBACK_PROGRAM = V_REPID

    I_CALLBACK_PF_STATUS_SET = ' '

    I_CALLBACK_USER_COMMAND = 'IT_USER_COMMAND'

    I_CALLBACK_TOP_OF_PAGE = ' '

    I_CALLBACK_HTML_TOP_OF_PAGE = ' '

    I_CALLBACK_HTML_END_OF_LIST = ' '

    I_STRUCTURE_NAME =

    I_BACKGROUND_ID = ' '

    I_GRID_TITLE = 'Purchase Order Details'

    I_GRID_SETTINGS = I_GRID_SETTINGS

    IS_LAYOUT = WA_LAYOUT

    IT_FIELDCAT = IT_FIELDCAT

    IT_EXCLUDING = IT_EXCLUDING

    IT_SPECIAL_GROUPS = IT_SPECIAL_GROUPS

    IT_SORT = IT_SORT

    IT_FILTER = IT_FILTER

    IS_SEL_HIDE = IS_SEL_HIDE

    I_DEFAULT = 'X'

    I_SAVE = ' '

    IS_VARIANT = IS_VARIANT

    IT_EVENTS = IT_EVENT

    IT_EVENT_EXIT = IT_EVENT_EXIT

    IS_PRINT = IS_PRINT

    IS_REPREP_ID = IS_REPREP_ID

    I_SCREEN_START_COLUMN = 0

    I_SCREEN_START_LINE = 0

    I_SCREEN_END_COLUMN = 0

    I_SCREEN_END_LINE = 0

    I_HTML_HEIGHT_TOP = 0

    I_HTML_HEIGHT_END = 0

    IT_ALV_GRAPHICS = IT_ALV_GRAPHICS

    IT_HYPERLINK = IT_HYPERLINK

    IT_ADD_FIELDCAT = IT_ADD_FIELDCAT

    IT_EXCEPT_QINFO = IT_EXCEPT_QINFO

    IR_SALV_FULLSCREEN_ADAPTER = IR_SALV_FULLSCREEN_ADAPTER

    IMPORTING

    E_EXIT_CAUSED_BY_CALLER = E_EXIT_CAUSED_BY_CALLER

    ES_EXIT_CAUSED_BY_USER = ES_EXIT_CAUSED_BY_USER

    TABLES

    T_OUTTAB = IT_FINAL

    EXCEPTIONS

    PROGRAM_ERROR = 1

    OTHERS = 2

    .

    IF SY-SUBRC 0.

    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

    ENDIF.

    ENDFORM. " GRID_DISPLAY

    ----

    * Form LIST_DISPLAY

    ----

    LIST DISPLAY

    ----

    FORM LIST_DISPLAY .

    CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'

    EXPORTING

    I_INTERFACE_CHECK = ' '

    I_BYPASSING_BUFFER = I_BYPASSING_BUFFER

    I_BUFFER_ACTIVE = ' '

    I_CALLBACK_PROGRAM = V_REPID

    I_CALLBACK_PF_STATUS_SET = ' '

    I_CALLBACK_USER_COMMAND = 'IT_USER_COMMAND'

    I_STRUCTURE_NAME = I_STRUCTURE_NAME

    IS_LAYOUT = WA_LAYOUT

    IT_FIELDCAT = IT_FIELDCAT

    IT_EXCLUDING = IT_EXCLUDING

    IT_SPECIAL_GROUPS = IT_SPECIAL_GROUPS

    IT_SORT = IT_SORT

    IT_FILTER = IT_FILTER

    IS_SEL_HIDE = IS_SEL_HIDE

    I_DEFAULT = 'X'

    I_SAVE = ' '

    IS_VARIANT = IS_VARIANT

    IT_EVENTS = IT_EVENT

    IT_EVENT_EXIT = IT_EVENT_EXIT

    IS_PRINT = IS_PRINT

    IS_REPREP_ID = IS_REPREP_ID

    I_SCREEN_START_COLUMN = 0

    I_SCREEN_START_LINE = 0

    I_SCREEN_END_COLUMN = 0

    I_SCREEN_END_LINE = 0

    IR_SALV_LIST_ADAPTER = IR_SALV_LIST_ADAPTER

    IT_EXCEPT_QINFO = IT_EXCEPT_QINFO

    I_SUPPRESS_EMPTY_DATA = ABAP_FALSE

    IMPORTING

    E_EXIT_CAUSED_BY_CALLER = E_EXIT_CAUSED_BY_CALLER

    ES_EXIT_CAUSED_BY_USER = ES_EXIT_CAUSED_BY_USER

    TABLES

    T_OUTTAB = IT_FINAL

    EXCEPTIONS

    PROGRAM_ERROR = 1

    OTHERS = 2

    .

    IF SY-SUBRC 0.

    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

    ENDIF.

    ENDFORM. " LIST_DISPLAY

    ----

    * Form HIERSEQ_DISPLAY

    ----

    HIERSEQ DISPLAY

    ----

    FORM HIERSEQ_DISPLAY .

    IT_KEYINFO-HEADER01 = 'EBELN'.

    IT_KEYINFO-ITEM01 = 'EBELN'.

    CALL FUNCTION 'REUSE_ALV_HIERSEQ_LIST_DISPLAY'

    EXPORTING

    I_INTERFACE_CHECK = ' '

    I_CALLBACK_PROGRAM = V_REPID

    I_CALLBACK_PF_STATUS_SET = ' '

    I_CALLBACK_USER_COMMAND = ' '

    IS_LAYOUT = WA_LAYOUT

    IT_FIELDCAT = IT_FIELDCAT

    IT_EXCLUDING = IT_EXCLUDING

    IT_SPECIAL_GROUPS = IT_SPECIAL_GROUPS

    IT_SORT = IT_SORT

    IT_FILTER = IT_FILTER

    IS_SEL_HIDE = IS_SEL_HIDE

    I_SCREEN_START_COLUMN = 0

    I_SCREEN_START_LINE = 0

    I_SCREEN_END_COLUMN = 0

    I_SCREEN_END_LINE = 0

    I_DEFAULT = 'X'

    I_SAVE = ' '

    IS_VARIANT = IS_VARIANT

    IT_EVENTS = IT_EVENT

    IT_EVENT_EXIT = IT_EVENT_EXIT

    I_TABNAME_HEADER = 'IT_EKKO'

    I_TABNAME_ITEM = 'IT_EKPO'

    I_STRUCTURE_NAME_HEADER = I_STRUCTURE_NAME_HEADER

    I_STRUCTURE_NAME_ITEM = I_STRUCTURE_NAME_ITEM

    IS_KEYINFO = IT_KEYINFO

    IS_PRINT = IS_PRINT

    IS_REPREP_ID = IS_REPREP_ID

    I_BYPASSING_BUFFER = I_BYPASSING_BUFFER

    I_BUFFER_ACTIVE = I_BUFFER_ACTIVE

    IR_SALV_HIERSEQ_ADAPTER = IR_SALV_HIERSEQ_ADAPTER

    IT_EXCEPT_QINFO = IT_EXCEPT_QINFO

    I_SUPPRESS_EMPTY_DATA = ABAP_FALSE

    IMPORTING

    E_EXIT_CAUSED_BY_CALLER = E_EXIT_CAUSED_BY_CALLER

    ES_EXIT_CAUSED_BY_USER = ES_EXIT_CAUSED_BY_USER

    TABLES

    T_OUTTAB_HEADER = IT_EKKO

    T_OUTTAB_ITEM = IT_EKPO

    EXCEPTIONS

    PROGRAM_ERROR = 1

    OTHERS = 2

    .

    IF SY-SUBRC 0.

    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

    ENDIF.

    ENDFORM. " HIERSEQ_DISPLAY

    ----

    * Form IT_USER_COMMAND

    ----

    text

    ----

    FORM IT_USER_COMMAND USING R_UCOMM LIKE SY-UCOMM

    RS_SELFIELD TYPE SLIS_SELFIELD.

    FREE IT_FIELDCAT.

    CASE R_UCOMM.

    WHEN 'IC1'.

    READ TABLE IT_FINAL INDEX RS_SELFIELD-TABINDEX.

    PERFORM GET_EKBE.

    PERFORM GET_FIELD_CATALOG.

    PERFORM GET_LIST.

    ENDCASE.

    ENDFORM. "IT_USER_COMMAND

    ----

    * Form GET_EKBE

    ----

    text

    ----

    FORM GET_EKBE .

    IF NOT IT_FINAL[] IS INITIAL.

    SELECT EBELN

    EBELP

    BELNR

    MENGE

    MATNR

    INTO TABLE IT_EKBE

    FROM EKBE

    FOR ALL ENTRIES IN IT_FINAL

    WHERE EBELN = IT_FINAL-EBELN

    AND EBELP = IT_FINAL-EBELP.

    ENDIF.

    ENDFORM. " GET_EKBE

    ----

    * Form GET_FIELD_CATALOG

    ----

    text

    ----

    FORM GET_FIELD_CATALOG .

    WA_FIELDCAT-FIELDNAME = 'EBELN'.

    WA_FIELDCAT-COL_POS = '1'.

    WA_FIELDCAT-JUST = 'R'.

    WA_FIELDCAT-SELTEXT_L = 'PO Number'.

    WA_FIELDCAT-LOWERCASE = 'X'.

    WA_FIELDCAT-DO_SUM = 'X'.

    APPEND WA_FIELDCAT TO IT_FIELDCAT.

    WA_FIELDCAT-FIELDNAME = 'EBELP'.

    WA_FIELDCAT-COL_POS = '2'.

    WA_FIELDCAT-JUST = 'R'.

    WA_FIELDCAT-SELTEXT_L = 'Item Number'.

    WA_FIELDCAT-LOWERCASE = 'X'.

    WA_FIELDCAT-DO_SUM = 'X'.

    APPEND WA_FIELDCAT TO IT_FIELDCAT.

    WA_FIELDCAT-FIELDNAME = 'BELNR'.

    WA_FIELDCAT-COL_POS = '3'.

    WA_FIELDCAT-JUST = 'R'.

    WA_FIELDCAT-SELTEXT_L = 'Material Document'.

    WA_FIELDCAT-LOWERCASE = 'X'.

    WA_FIELDCAT-DO_SUM = 'X'.

    APPEND WA_FIELDCAT TO IT_FIELDCAT.

    WA_FIELDCAT-FIELDNAME = 'MENGE'.

    WA_FIELDCAT-COL_POS = '4'.

    WA_FIELDCAT-JUST = 'R'.

    WA_FIELDCAT-SELTEXT_L = 'Quantity'.

    WA_FIELDCAT-LOWERCASE = 'X'.

    WA_FIELDCAT-DO_SUM = 'X'.

    APPEND WA_FIELDCAT TO IT_FIELDCAT.

    WA_FIELDCAT-FIELDNAME = 'MATNR'.

    WA_FIELDCAT-COL_POS = '5'.

    WA_FIELDCAT-JUST = 'R'.

    WA_FIELDCAT-SELTEXT_L = 'Material Number'.

    WA_FIELDCAT-LOWERCASE = 'X'.

    WA_FIELDCAT-DO_SUM = 'X'.

    APPEND WA_FIELDCAT TO IT_FIELDCAT.

    ENDFORM. " GET_FIELD_CATALOG

    ----

    * Form get_list

    ----

    text

    ----

    FORM GET_LIST .

    IF RB1 = 'X'.

    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'

    EXPORTING

    I_INTERFACE_CHECK = ' '

    I_BYPASSING_BUFFER = ' '

    I_BUFFER_ACTIVE = ' '

    I_CALLBACK_PROGRAM = V_REPID

    I_CALLBACK_PF_STATUS_SET = ' '

    I_CALLBACK_USER_COMMAND = ' '

    I_CALLBACK_TOP_OF_PAGE = ' '

    I_CALLBACK_HTML_TOP_OF_PAGE = ' '

    I_CALLBACK_HTML_END_OF_LIST = ' '

    I_STRUCTURE_NAME = I_STRUCTURE_NAME

    I_BACKGROUND_ID = ' '

    I_GRID_TITLE = 'SECONDARY LIST'

    I_GRID_SETTINGS = I_GRID_SETTINGS

    IS_LAYOUT = IS_LAYOUT

    IT_FIELDCAT = IT_FIELDCAT

    IT_EXCLUDING = IT_EXCLUDING

    IT_SPECIAL_GROUPS = IT_SPECIAL_GROUPS

    IT_SORT = IT_SORT

    IT_FILTER = IT_FILTER

    IS_SEL_HIDE = IS_SEL_HIDE

    I_DEFAULT = 'X'

    I_SAVE = ' '

    IS_VARIANT = IS_VARIANT

    IT_EVENTS = IT_EVENTS

    IT_EVENT_EXIT = IT_EVENT_EXIT

    IS_PRINT = IS_PRINT

    IS_REPREP_ID = IS_REPREP_ID

    I_SCREEN_START_COLUMN = 0

    I_SCREEN_START_LINE = 0

    I_SCREEN_END_COLUMN = 0

    I_SCREEN_END_LINE = 0

    I_HTML_HEIGHT_TOP = 0

    I_HTML_HEIGHT_END = 0

    IT_ALV_GRAPHICS = IT_ALV_GRAPHICS

    IT_HYPERLINK = IT_HYPERLINK

    IT_ADD_FIELDCAT = IT_ADD_FIELDCAT

    IT_EXCEPT_QINFO = IT_EXCEPT_QINFO

    IR_SALV_FULLSCREEN_ADAPTER = IR_SALV_FULLSCREEN_ADAPTER

    IMPORTING

    E_EXIT_CAUSED_BY_CALLER = E_EXIT_CAUSED_BY_CALLER

    ES_EXIT_CAUSED_BY_USER = ES_EXIT_CAUSED_BY_USER

    TABLES

    T_OUTTAB = IT_EKBE

    EXCEPTIONS

    PROGRAM_ERROR = 1

    OTHERS = 2

    .

    IF SY-SUBRC 0.

    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

    ENDIF.

    ENDIF.

    IF RB2 = 'X'.

    CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'

    EXPORTING

    I_INTERFACE_CHECK = ' '

    I_BYPASSING_BUFFER = I_BYPASSING_BUFFER

    I_BUFFER_ACTIVE = ' '

    I_CALLBACK_PROGRAM = V_REPID

    I_CALLBACK_PF_STATUS_SET = ' '

    I_CALLBACK_USER_COMMAND = ' '

    I_STRUCTURE_NAME = I_STRUCTURE_NAME

    IS_LAYOUT = IS_LAYOUT

    IT_FIELDCAT = IT_FIELDCAT

    IT_EXCLUDING = IT_EXCLUDING

    IT_SPECIAL_GROUPS = IT_SPECIAL_GROUPS

    IT_SORT = IT_SORT

    IT_FILTER = IT_FILTER

    IS_SEL_HIDE = IS_SEL_HIDE

    I_DEFAULT = 'X'

    I_SAVE = ' '

    IS_VARIANT = IS_VARIANT

    IT_EVENTS = IT_EVENTS

    IT_EVENT_EXIT = IT_EVENT_EXIT

    IS_PRINT = IS_PRINT

    IS_REPREP_ID = IS_REPREP_ID

    I_SCREEN_START_COLUMN = 0

    I_SCREEN_START_LINE = 0

    I_SCREEN_END_COLUMN = 0

    I_SCREEN_END_LINE = 0

    IR_SALV_LIST_ADAPTER = IR_SALV_LIST_ADAPTER

    IT_EXCEPT_QINFO = IT_EXCEPT_QINFO

    I_SUPPRESS_EMPTY_DATA = ABAP_FALSE

    IMPORTING

    E_EXIT_CAUSED_BY_CALLER = E_EXIT_CAUSED_BY_CALLER

    ES_EXIT_CAUSED_BY_USER = ES_EXIT_CAUSED_BY_USER

    TABLES

    T_OUTTAB = IT_EKBE

    EXCEPTIONS

    PROGRAM_ERROR = 1

    OTHERS = 2

    .

    IF SY-SUBRC 0.

    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

    ENDIF.

    ENDIF.

    ENDFORM. " get_list

    Thanks

    Vikranth Khimavath

    Message was edited by:

    Khimavath Vikranth

    Rich Heilman

    Posts: 13,007

    Questions: 38

    Registered: 4/27/04

    Forum points: 29,992

    Re: double click on field in ALV Report

    Posted: Dec 20, 2006 3:02 PM in response to: newtoAbap

    Reply

    E-mail this post

    My example above is a cut/paste example, it should be executing fine in any system. Run the program, then double click on a line, it should take you to MD04.

    If you still are having problems, please give details.

    Regards,

    Rich Heilman

    giri karna

    Posts: 142

    Questions: 2

    Registered: 12/5/06

    Forum points: 96

    Re: double click on field in ALV Report

    Posted: Dec 20, 2006 3:23 PM in response to: newtoAbap

    Reply

    E-mail this post

    Cut and paste the following code and go thru it.

    ----

    * Report ZPTEST_ALV1 *

    * *

    ----

    * *

    * *

    ----

    REPORT ZPTEST_ALV1.

    **TABLES DECLN

    TABLES: VBRK,VBRP,T001.

    TYPE-POOLS: SLIS.

    TYPE-POOLS: ICON.

    ***DATA DECLN.

    DATA: V_VBELN LIKE VBRK-VBELN,

    V_MATNR LIKE VBRP-MATNR.

    CONSTANTS: C_USER_COMMAND TYPE SLIS_FORMNAME VALUE 'F_USER_COMMAND',

    C_PF_STATUS TYPE SLIS_FORMNAME VALUE 'F_SET_PF_STATUS'.

    **ALV RELATED TABLES.

    *--Field Catalog

    DATA: IT_FIELDCAT TYPE STANDARD TABLE OF

    SLIS_FIELDCAT_ALV WITH HEADER LINE,

    IT_FIELDCAT1 TYPE STANDARD TABLE OF

    SLIS_FIELDCAT_ALV WITH HEADER LINE ,

    WA_FIELDCAT TYPE SLIS_FIELDCAT_ALV,

    *--Layout

    WA_LAYOUT TYPE SLIS_LAYOUT_ALV,

    IT_LAYOUT TYPE STANDARD TABLE OF

    SLIS_LAYOUT_ALV WITH HEADER LINE,

    *--Sort

    IT_SORT TYPE SLIS_T_SORTINFO_ALV,

    WA_SORT TYPE SLIS_SORTINFO_ALV ,

    **-Structure for excluding function codes

    WA_EXTAB TYPE SLIS_EXTAB,

    **-To hold function codes to be excluded in ALV toolbar

    IT_EXTAB TYPE SLIS_T_EXTAB.

    ***INTERNAL TABLE DECLN.

    DATA: BEGIN OF IT_VBRK OCCURS 0,

    VBELN LIKE VBRK-VBELN,

    WAERK LIKE VBRK-WAERK,

    VKORG LIKE VBRK-VKORG,

    FKDAT LIKE VBRK-FKDAT,

    BUKRS LIKE VBRK-BUKRS,

    NETWR LIKE VBRK-NETWR,

    END OF IT_VBRK.

    DATA: BEGIN OF ITAB OCCURS 0,

    VBELN LIKE VBRP-VBELN,

    POSNR LIKE VBRP-POSNR,

    FKIMG LIKE VBRP-FKIMG,

    VRKME LIKE VBRP-VRKME,

    NETWR LIKE VBRP-NETWR,

    MATNR LIKE VBRP-MATNR,

    ARKTX LIKE VBRP-ARKTX,

    END OF ITAB.

    DATA: IT_VBRP LIKE ITAB OCCURS 0 WITH HEADER LINE.

    ***selection screen.

    SELECTION-SCREEN: BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-001.

    SELECT-OPTIONS: S_VBELN FOR VBRK-VBELN,

    S_FKDAT FOR VBRK-FKDAT OBLIGATORY,

    S_MATNR FOR VBRP-MATNR.

    SELECTION-SCREEN: END OF BLOCK B1.

    **INITIALIZATION.

    INITIALIZATION.

    S_FKDAT-LOW = SY-DATUM - 200.

    S_FKDAT-HIGH = SY-DATUM.

    APPEND S_FKDAT.

    ***AT SELECTION-SCREEN.

    AT SELECTION-SCREEN.

    IF NOT S_VBELN IS INITIAL.

    SELECT SINGLE VBELN FROM VBRK

    INTO V_VBELN

    WHERE VBELN IN S_VBELN.

    IF SY-SUBRC 0.

    MESSAGE E001(ZZ2).

    ENDIF.

    ENDIF.

    IF NOT S_MATNR IS INITIAL.

    SELECT SINGLE MATNR FROM MARA

    INTO V_MATNR

    WHERE MATNR IN S_MATNR.

    IF SY-SUBRC 0.

    MESSAGE E001(ZZ2).

    ENDIF.

    ENDIF.

    ***START-OF-SELECTION.

    START-OF-SELECTION.

    PERFORM GET_DATA_VBRK.

    PERFORM GET_DATA_VBRP.

    ***END-OF-SELECTION.

    END-OF-SELECTION.

    *--Sort the Output Fields

    PERFORM SORT_FIELDS.

    *--Build Field catalog for the Output fields

    PERFORM GET_FIELD_CATALOG.

    ***MODIFY LAYOUT.

    PERFORM MODIFY_LAYOUT.

    *--Display ALV output

    PERFORM LIST_DISP TABLES IT_VBRK

    USING C_USER_COMMAND.

    ----

    * Form GET_DATA_VBRK

    ----

    text

    ----

    -- p1 text

    -- p2 text

    ----

    FORM GET_DATA_VBRK.

    SELECT VBELN

    WAERK

    VKORG

    FKDAT

    BUKRS

    NETWR

    INTO TABLE IT_VBRK

    FROM VBRK

    WHERE VBELN IN S_VBELN

    AND FKDAT IN S_FKDAT.

    ENDFORM. " GET_DATA

    ----

    * Form GET_DATA_VBRP

    ----

    text

    ----

    -- p1 text

    -- p2 text

    ----

    FORM GET_DATA_VBRP .

    SELECT VBELN

    POSNR

    FKIMG

    VRKME

    NETWR

    MATNR

    ARKTX

    FROM VBRP

    INTO TABLE IT_VBRP

    FOR ALL ENTRIES IN IT_VBRK

    WHERE VBELN = IT_VBRK-VBELN.

    SELECT VBELN

    POSNR

    FKIMG

    VRKME

    NETWR

    MATNR

    ARKTX

    FROM VBRP

    INTO TABLE ITAB

    FOR ALL ENTRIES IN IT_VBRK

    WHERE VBELN = IT_VBRK-VBELN.

    ENDFORM. " GET_DATA_VBRP

    ----

    * Form GET_FIELD_CATALOG

    ----

    text

    ----

    -- p1 text

    -- p2 text

    ----

    FORM GET_FIELD_CATALOG .

    CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'

    EXPORTING

    I_PROGRAM_NAME = SY-REPID

    I_INTERNAL_TABNAME = 'IT_VBRK'

    I_INCLNAME = SY-REPID

    CHANGING

    CT_FIELDCAT = IT_FIELDCAT[]

    EXCEPTIONS

    INCONSISTENT_INTERFACE = 1

    PROGRAM_ERROR = 2

    OTHERS = 3.

    IF SY-SUBRC 0.

    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

    ENDIF.

    ENDFORM. " GET_FIELD_CATALOG

    ----

    * Form SORT_FIELDS

    ----

    text

    ----

    -- p1 text

    -- p2 text

    ----

    FORM SORT_FIELDS .

    CLEAR WA_SORT.

    WA_SORT-SPOS = '01'.

    WA_SORT-FIELDNAME = 'VBELN' .

    WA_SORT-TABNAME = 'IT_VBRK'.

    WA_SORT-UP = 'X'.

    APPEND WA_SORT TO IT_SORT.

    CLEAR WA_SORT.

    WA_SORT-SPOS = '02'.

    WA_SORT-FIELDNAME = 'POSNR' .

    WA_SORT-TABNAME = 'IT_VBRP'.

    WA_SORT-UP = 'X'.

    APPEND WA_SORT TO IT_SORT.

    ENDFORM. " SORT_FIELDS

    ----

    * Form MODIFY_LAYOUT

    ----

    text

    ----

    -- p1 text

    -- p2 text

    ----

    FORM

    MODIFY_LAYOUT .

    WA_LAYOUT-DEFAULT_ITEM = 'X'.

    WA_LAYOUT-ZEBRA = 'X'.

    WA_LAYOUT-EXPAND_FIELDNAME = 'EXPAND'.

    WA_LAYOUT-COLWIDTH_OPTIMIZE = 'X'.

    WA_LAYOUT-SUBTOTALS_TEXT = 'SUBTOTAL'.

    append wa_layout to it_layout.

    ENDFORM. " MODIFY_LAYOUT

    ----

    * Form LIST_DISP

    ----

    text

    ----

    -- p1 text

    -- p2 text

    ----

    FORM LIST_DISP TABLES P_IT_VBRK

    USING P_USER_COMMAND TYPE SLIS_FORMNAME.

    *CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'

    EXPORTING

    I_CALLBACK_PROGRAM = SY-REPID

    I_CALLBACK_PF_STATUS_SET = 'POPUP'

    I_CALLBACK_USER_COMMAND = 'HANDLE_USER_COMMAND'

    IS_LAYOUT = WA_LAYOUT1

    IT_FIELDCAT = IT_FIELDCAT[]

    IT_EXCLUDING = IT_EXTAB[]

    TABLES

    T_OUTTAB = IT_VBRK

    EXCEPTIONS

    PROGRAM_ERROR = 1

    OTHERS = 2.

    IF SY-SUBRC 0.

    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

    ENDIF.

    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'

    EXPORTING

    I_CALLBACK_PROGRAM = SY-REPID

    I_CALLBACK_PF_STATUS_SET = 'POPUP'

    I_CALLBACK_USER_COMMAND = 'HANDLE_USER_COMMAND'

    IS_LAYOUT = WA_LAYOUT

    IT_FIELDCAT = IT_FIELDCAT[]

    TABLES

    T_OUTTAB = P_IT_VBRK

    EXCEPTIONS

    PROGRAM_ERROR = 1

    OTHERS = 2.

    ENDFORM. " LIST_DISP

    ----

    * Form POPUP

    ----

    text

    ----

    --P_EXTAB text

    ----

    FORM POPUP USING IT_EXTAB TYPE SLIS_T_EXTAB.

    *- Pf status

    SET PF-STATUS 'POPUP'.

    ENDFORM. " POPUP

    ----

    * Form F_USER_COMMAND

    ----

    FORM HANDLE_USER_COMMAND USING R_UCOMM LIKE SY-UCOMM

    RS_SELFIELD TYPE SLIS_SELFIELD.

    CASE R_UCOMM.

    WHEN 'IC1'.

    CLEAR IT_FIELDCAT1[].

    CLEAR IT_VBRP[].

    IF RS_SELFIELD-FIELDNAME = 'VBELN'.

    READ TABLE IT_VBRK INDEX RS_SELFIELD-TABINDEX.

    LOOP AT ITAB WHERE VBELN = IT_VBRK-VBELN.

    MOVE-CORRESPONDING ITAB TO IT_VBRP.

    APPEND IT_VBRP.

    ENDLOOP.

    PERFORM INTERACTIVE_REPORT.

    ENDIF.

    ENDCASE.

    ENDFORM. "HANDLE_USER_COMMAND

    ----

    * Form INTERACTIVE_REPORT

    ----

    text

    ----

    -- p1 text

    -- p2 text

    ----

    FORM INTERACTIVE_REPORT .

    CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'

    EXPORTING

    I_PROGRAM_NAME = SY-REPID

    I_INTERNAL_TABNAME = 'ITAB'

    I_INCLNAME = SY-REPID

    CHANGING

    CT_FIELDCAT = IT_FIELDCAT1[]

    EXCEPTIONS

    INCONSISTENT_INTERFACE = 1

    PROGRAM_ERROR = 2

    OTHERS = 3.

    IF SY-SUBRC 0.

    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

    ENDIF.

    *WA_LAYOUT-DEFAULT_ITEM = 'X'.

    WA_LAYOUT-ZEBRA = 'X'.

    WA_LAYOUT-EXPAND_FIELDNAME = 'EXPAND'.

    WA_layout-colwidth_optimize = 'X'.

    wa_layout-totals_text = 'TOTAL'.

    *

    *

    WA_FIELDCAT-FIELDNAME = 'VBELN'.

    WA_FIELDCAT-SELTEXT_L = 'BILLING DOC'.

    WA_FIELDCAT-TABNAME = 'IT_VBRP'.

    WA_FIELDCAT-COL_POS = 1.

    APPEND WA_FIELDCAT TO IT_FIELDCAT1.

    CLEAR WA_FIELDCAT.

    *

    *

    WA_FIELDCAT-FIELDNAME = 'POSNR'.

    WA_FIELDCAT-SELTEXT_L = 'ITEM'.

    WA_FIELDCAT-TABNAME = 'IT_VBRP'.

    WA_FIELDCAT-COL_POS = 2.

    APPEND WA_FIELDCAT TO IT_FIELDCAT1.

    CLEAR WA_FIELDCAT.

    *

    WA_FIELDCAT-FIELDNAME = 'FKIMG'.

    WA_FIELDCAT-SELTEXT_M = 'INV QTY'.

    WA_FIELDCAT-TABNAME = 'IT_VBRP'.

    WA_FIELDCAT-COL_POS = 3.

    APPEND WA_FIELDCAT TO IT_FIELDCAT1.

    CLEAR WA_FIELDCAT.

    *

    WA_FIELDCAT-FIELDNAME = 'VRKME'.

    WA_FIELDCAT-SELTEXT_M = 'SALES UNIT'.

    WA_FIELDCAT-TABNAME = 'IT_VBRP'.

    WA_FIELDCAT-COL_POS = 4.

    APPEND WA_FIELDCAT TO IT_FIELDCAT1.

    CLEAR WA_FIELDCAT.

    *

    WA_FIELDCAT-FIELDNAME = 'NETWR'.

    WA_FIELDCAT-SELTEXT_M = 'NET PRICE'.

    WA_FIELDCAT-TABNAME = 'IT_VBRP'.

    WA_FIELDCAT-DO_SUM = 'X'.

    WA_FIELDCAT-COL_POS = 5.

    APPEND WA_FIELDCAT TO IT_FIELDCAT1.

    CLEAR WA_FIELDCAT.

    *

    *

    *

    WA_FIELDCAT-FIELDNAME = 'MATNR'.

    WA_FIELDCAT-SELTEXT_M = 'MATERIAL'.

    WA_FIELDCAT-TABNAME = 'IT_VBRP'.

    WA_FIELDCAT-COL_POS = 6.

    APPEND WA_FIELDCAT TO IT_FIELDCAT1.

    CLEAR WA_FIELDCAT.

    *

    WA_FIELDCAT-FIELDNAME = 'ARKTX'.

    WA_FIELDCAT-SELTEXT_M = 'SALES ORDER'.

    WA_FIELDCAT-TABNAME = 'IT_VBRP'.

    WA_FIELDCAT-COL_POS = 7.

    APPEND WA_FIELDCAT TO IT_FIELDCAT1.

    CLEAR WA_FIELDCAT.

    *CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'

    EXPORTING

    I_CALLBACK_PROGRAM = SY-REPID

    IS_LAYOUT = WA_LAYOUT

    IT_FIELDCAT = IT_FIELDCAT1[]

    IT_SORT = IT_SORT

    TABLES

    T_OUTTAB = IT_VBRP

    EXCEPTIONS

    PROGRAM_ERROR = 1

    OTHERS = 2.

    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'

    EXPORTING

    I_CALLBACK_PROGRAM = SY-REPID

    IS_LAYOUT = WA_LAYOUT

    IT_FIELDCAT = IT_FIELDCAT1[]

    TABLES

    T_OUTTAB = IT_VBRP

    EXCEPTIONS

    PROGRAM_ERROR = 1

    OTHERS = 2.

    IF SY-SUBRC 0.

    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

    ENDIF.

    ENDFORM. " INTERACTIVE_REPORT

    Cheers.

    newtoAbap

    Posts: 19

    Questions: 6

    Registered: 11/11/06

    Forum points: 0

    ----

    * Report YRAMA_ALVUCOM *

    * *

    ----

    * *

    * *

    ----

    REPORT YRAMA_ALVUCOM .

    type-pools: slis.

    data: fcat1 type slis_t_fieldcat_alv,

    fcat2 type slis_fieldcat_alv,

    repid type sy-repid.

    repid = sy-repid.

    tables: qmsm,qmfe.

    " internal table declaration

    select-options: qnum for qmsm-qmnum.

    data: begin of itab occurs 0,

    qmnum like qmsm-qmnum,

    erdat like qmsm-erdat,

    fenum like qmfe-fenum,

    end of itab.

    start-of-selection.

    perform sel_data.

    perform disp_data.

    ----

    * Form sel_data

    ----

    text

    ----

    -- p1 text

    -- p2 text

    ----

    FORM sel_data .

    select qmsmqmnum qmsmerdat qmfe~fenum

    into corresponding fields of table itab

    from qmfe inner join qmsm

    on

    qmfeqmnum = qmsmqmnum where qmfe~qmnum in qnum.

    ENDFORM. " sel_data

    ----

    * Form disp_data

    ----

    text

    ----

    -- p1 text

    -- p2 text

    ----

    FORM disp_data.

    clear fcat2.

    refresh fcat1.

    clear fcat2.

    fcat2-reptext_ddic = 'Notification Number'.

    fcat2-fieldname = 'qmnum'.

    fcat2-tabname = 'itab'.

    append fcat2 to fcat1.

    clear fcat2.

    fcat2-reptext_ddic = 'Notification Date'.

    fcat2-fieldname = 'erdat'.

    fcat2-tabname = 'itab'.

    append fcat2 to fcat1.

    clear fcat2.

    fcat2-reptext_ddic = 'Item Record Number'.

    fcat2-fieldname = 'fenum'.

    fcat2-tabname = 'itab'.

    append fcat2 to fcat1.

    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'

    EXPORTING

    I_CALLBACK_PROGRAM = repid

    I_CALLBACK_USER_COMMAND = 'HANDLE_COMM_USR'

    IT_FIELDCAT = fcat1

    TABLES

    T_OUTTAB = itab .

    ENDFORM. " disp_data

    *perform HANDLE_COMM_USR.

    ----

    * Form HANDLE_COMM_USR

    ----

    text

    ----

    -- p1 text

    -- p2 text

    ----

    FORM HANDLE_COMM_USR using usr_ucomm like sy-ucomm rs_selfield type slis_selfield.

    case usr_ucomm.

    when 'IC1'.

    case rs_selfield-FIELDNAME.

    when 'QMNUM'.

    set parameter id 'QNUM' field rs_selfield-value.

    set parameter id 'NUM' field '002'.

    call transaction 'IW53' and skip first screen.

    endcase.

    endcase.

    ENDFORM. " HANDLE_COMM_USR

    Posts: 19

    Questions: 6

    Registered: 11/11/06

    Forum points: 0

    In my example, if you are implementing the USER_COMMAND, you must define the subroutine in your program, then in the function call, you need to pass the name of the FORM which is to handle the user_command.

    Call ABAP List Viewer (ALV)

    call function 'REUSE_ALV_GRID_DISPLAY'

    exporting

    i_callback_program = repid

    i_callback_user_command = 'HANDLE_USER_COMMAND'

    it_fieldcat = ifc

    tables

    t_outtab = itab.

    endform.

    ***********************************************************************

    FORM handle_User_Command *

    ***********************************************************************

    form handle_user_command using r_ucomm like sy-ucomm

    rs_selfield type slis_selfield.

    case r_ucomm.

    when 'IC1'.

    case rs_selfield-FIELDNAME.

    when 'MATNR'.

    set parameter id 'MAT' field rs_selfield-value.

    set parameter id 'WRK' field '0001'.

    call transaction 'MD04' and skip first screen.

    endcase.

    endcase.

    endform.

  • RELEVANCY SCORE 3.21

    DB:3.21:I Use Reuse_Alv_Hierseq_List_Display With Tree In Container . 1k



    Hi Expert ;

    I have a tree and alv on screen . I want use REUSE_ALV_HIERSEQ_LIST_DISPLAY alv.

    can I use this alv in container . If you say don't use this alv.

    I need hierarchic alv with my tree .

    Can you say what do it .

    Thanks All.

    DB:3.21:I Use Reuse_Alv_Hierseq_List_Display With Tree In Container . 1k


    Hi Expert ;

    I have a tree and alv on screen . I want use REUSE_ALV_HIERSEQ_LIST_DISPLAY alv.

    can I use this alv in container . If you say don't use this alv.

    I need hierarchic alv with my tree .

    Can you say what do it .

    Thanks All.

  • RELEVANCY SCORE 3.21

    DB:3.21:Alv Oo - Problem Handling Hotspot And Double Click In The Same Column dp



    Dear experts,

    can I use hotspot and double click event (class CL_GUI_ALV_GRID) in the same column? The hotspot event works just fine, but double click dont.

    Any ideas if is this possible?

    Thanks in advance for any help.

    Kind regards,

    sb.

    DB:3.21:Alv Oo - Problem Handling Hotspot And Double Click In The Same Column dp


    hotspot's goal is to avoid the double click, so mixing the 2 is probably not possible

  • RELEVANCY SCORE 3.21

    DB:3.21:Ok Codes 9d



    hi frnds

    I want to about ok-codes. for example in alv interactive okcode for event double click is ic1 I want the list of all okcodes(BDC AND ALV)

  • RELEVANCY SCORE 3.21

    DB:3.21:Alv Grid F4 Help 8j



    Hi,

    I am using ALV OOPs for grid display.for editable field I used ref_field and ref_tabname for f4 help.It works fine and gives me the list.But when i double click on one of the values it doesn't get copied to the cell in ALV. Can anyone tell me what might be the issue.

    thanks

    Suganya

    DB:3.21:Alv Grid F4 Help 8j


    Thanks Fred.

    I was able to solve the problem with your answer.

    I have rewarded points.

    thanks

    Suganya

  • RELEVANCY SCORE 3.21

    DB:3.21:Reg Events In Alv d8



    Hi,

    I created three radiobuttons in alv report including with line items.

    whenver double click line items , its going next screen.,

    Here my requirement is when i click one click radiobutton should selec

  • RELEVANCY SCORE 3.20

    DB:3.20:Get The Content Of Subtotal Line In Alv Fm 1k



    hi, everybody

    I meet a difficulty in ALV develop, descript the problem as following:

    when user double click the subtotal line of ALV, I need to get the content of this subtotal line.

    I use REUSE FM for ALV.

    when double click ALV, the callback subroutine USER_COMMEND will be called, with a structure SLIS_SELFIELD.

    SLIS_SELFIELD inclulde information about the line we double click on ALV. When double click on a subtotal line, SLIS_SELFIELD-SUMINDEX will be a value of subtotal index.

    The problem is , though we have got this index, I don't know how to use it. Can I read the subtotal line from a table with this index?

    Which table is for the subtotal line?

    Or is there any other way to read out the content of subtotal line?

    Any suggestion and hint is welcome.

    thanks a lot

    DB:3.20:Get The Content Of Subtotal Line In Alv Fm 1k


    If you are displaying sub totals, and using REUSE_ALV_GRID_DISPLAY, picking the line can be difficult.

    It will be of great help, if you use CL_GUI_ALV_GRID.

    , Go to development class SLIS, and you will find examples.

  • RELEVANCY SCORE 3.20

    DB:3.20:Double Click Event In Salv_Wd_Table 17



    Hi,

    is there a way to handle a double click on a row in a ALV of the type SALV_WD_TABLE ?

    Kind regards,

    Hans

    DB:3.20:Double Click Event In Salv_Wd_Table 17


    Thomas,

    thanks for the answer. Now i know for sure i haven't to search for a possibility

    with kind regards,

    Hans

  • RELEVANCY SCORE 3.20

    DB:3.20:4 Level Alv Based On Doubleclick 3f



    hi friends,

    i Want to make 4 level Alv Based on Doubleclick,

    Eg.

    1 level :- Based On selectionscreen (ALV)

    2nd level :- double click on any cell of 1st alv (ALV)

    3rd level :- double click on any cell of 2st alv (ALV)

    4th level :- double click on any cell of 3rd alv (Call Tranasaction)

    i make till second level using class lcl_event_receiver...

    i need ur help to go ahead..

    thankx..

    Swapnil.

    DB:3.20:4 Level Alv Based On Doubleclick 3f


    Hi Swapnil,

    I tried that and got the same in first attempt itself. i am not sure where you got strucked.

    Here is the sample code... try this..

    REPORT Z195_ALV_LEVELS.
    DATA: ispfli TYPE TABLE OF spfli.
    DATA: isflight TYPE TABLE OF sflight.
    DATA: iscarr TYPE TABLE OF scarr.
    DATA: imara TYPE TABLE OF mara.
    DATA: xspfli TYPE spfli.
    DATA: gr_table TYPE REF TO cl_salv_table.
    DATA: gr_table1 TYPE REF TO cl_salv_table.
    DATA: gr_table2 TYPE REF TO cl_salv_table.
    DATA: gr_table3 TYPE REF TO cl_salv_table.
    DATA: gr_functions TYPE REF TO cl_salv_functions_list.
    DATA: gr_events TYPE REF TO cl_salv_events_table.
    DATA: gr_selections TYPE REF TO cl_salv_selections.
    DATA: w_level TYPE sy-index.
    *----------------------------------------------------------------------*
    * CLASS lcl_handle_events DEFINITION
    *----------------------------------------------------------------------*
    *
    *----------------------------------------------------------------------*
    CLASS lcl_handle_events DEFINITION.
    PUBLIC SECTION.
    METHODS: on_user_command FOR EVENT added_function OF cl_salv_events
    IMPORTING e_salv_function,
    on_double_click FOR EVENT double_click OF cl_salv_events_table
    IMPORTING row column.
    ENDCLASS. "lcl_handle_events DEFINITION
    DATA: event_handler TYPE REF TO lcl_handle_events.

    START-OF-SELECTION.
    SELECT * INTO CORRESPONDING FIELDS OF TABLE ispfli FROM spfli UP TO 100 ROWS.
    CALL METHOD cl_salv_table=factory
    IMPORTING
    r_salv_table = gr_table
    CHANGING
    t_table = ispfli.
    gr_table-set_screen_status(
    pfstatus = 'SALV_TABLE_STANDARD'
    report = sy-repid
    set_functions = gr_table-c_functions_all ).
    gr_events = gr_table-get_event( ).
    CREATE OBJECT event_handler.
    SET HANDLER event_handler-on_user_command FOR gr_events.
    SET HANDLER event_handler-on_double_click FOR gr_events.
    * Set up selections.
    gr_selections = gr_table-get_selections( ).
    gr_selections-set_selection_mode( 1 ). "Single
    * Display
    gr_table-display( ).
    *----------------------------------------------------------------------*
    * CLASS lcl_handle_events IMPLEMENTATION
    *----------------------------------------------------------------------*
    *
    *----------------------------------------------------------------------*
    CLASS lcl_handle_events IMPLEMENTATION.
    METHOD on_user_command.
    * Get the selection rows
    DATA: lr_selections TYPE REF TO cl_salv_selections.
    DATA: lt_rows TYPE salv_t_row.
    DATA: ls_rows TYPE i.
    DATA: message TYPE string.
    CASE e_salv_function.
    WHEN 'MYFUNCTION'.
    * lr_selections = gr_table-get_selections( ).
    * lt_rows = lr_selections-get_selected_rows( ).
    * READ TABLE lt_rows INTO ls_rows INDEX 1.
    * READ TABLE ispfli INTO xspfli INDEX ls_rows.
    * CONCATENATE xspfli-carrid xspfli-connid xspfli-cityfrom xspfli-cityto
    * INTO message SEPARATED BY space.
    * MESSAGE i001(00) WITH 'You pushed the button!' message.
    ENDCASE.
    ENDMETHOD. "on_user_command
    METHOD on_double_click.
    IF w_level EQ 0.
    w_level = 1.
    PERFORM display_2ndlevel.
    ELSEIF w_level EQ 1.
    w_level = 2.
    PERFORM display_3rdlevel.
    ELSEIF w_level EQ 2.
    w_level = 3.
    PERFORM display_4thlevel.
    ELSEIF w_level EQ 3.
    w_level = 4.
    MESSAGE i001(00) WITH 'No further digging is possible'.
    ENDIF.
    * DATA: message TYPE string.
    * DATA: row_c(4) TYPE c.
    * row_c = row.
    * CONCATENATE 'Row' row_c 'Column' column INTO message SEPARATED BY space.
    * MESSAGE i001(00) WITH 'You double-clicked on ' message.
    ENDMETHOD. "on_double_click
    ENDCLASS. "lcl_handle_events IMPLEMENTATION
    *---------------------------------------------------------------------*
    * Form DISPLAY_2NDLEVEL
    *---------------------------------------------------------------------*
    * text
    *----------------------------------------------------------------------*
    * -- p1 text
    * -- p2 text
    *----------------------------------------------------------------------*
    FORM display_2ndlevel .
    SELECT * INTO CORRESPONDING FIELDS OF TABLE isflight FROM sflight UP TO 100 ROWS.
    CALL METHOD cl_salv_table=factory
    IMPORTING
    r_salv_table = gr_table1
    CHANGING
    t_table = isflight.
    gr_table1-set_screen_status(
    pfstatus = 'SALV_TABLE_STANDARD'
    report = sy-repid
    set_functions = gr_table1-c_functions_all ).
    gr_events = gr_table1-get_event( ).
    CREATE OBJECT event_handler.
    SET HANDLER event_handler-on_user_command FOR gr_events.
    SET HANDLER event_handler-on_double_click FOR gr_events.
    * Set up selections.
    gr_selections = gr_table1-get_selections( ).
    gr_selections-set_selection_mode( 1 ). "Single
    * Display
    gr_table1-display( ).

    ENDFORM. " DISPLAY_2NDLEVEL
    *---------------------------------------------------------------------*
    * Form DISPLAY_3RDLEVEL
    *---------------------------------------------------------------------*
    * text
    *----------------------------------------------------------------------*
    * -- p1 text
    * -- p2 text
    *----------------------------------------------------------------------*
    FORM display_3rdlevel .
    SELECT * INTO CORRESPONDING FIELDS OF TABLE iscarr FROM scarr UP TO 100 ROWS.
    CALL METHOD cl_salv_table=factory
    IMPORTING
    r_salv_table = gr_table2
    CHANGING
    t_table = iscarr.
    gr_table2-set_screen_status(
    pfstatus = 'SALV_TABLE_STANDARD'
    report = sy-repid
    set_functions = gr_table2-c_functions_all ).
    gr_events = gr_table2-get_event( ).
    CREATE OBJECT event_handler.
    SET HANDLER event_handler-on_user_command FOR gr_events.
    SET HANDLER event_handler-on_double_click FOR gr_events.
    * Set up selections.
    gr_selections = gr_table2-get_selections( ).
    gr_selections-set_selection_mode( 1 ). "Single
    * Display
    gr_table2-display( ).

    ENDFORM. " DISPLAY_3RDLEVEL
    *---------------------------------------------------------------------*
    * Form DISPLAY_4THDLEVEL
    *---------------------------------------------------------------------*
    * text
    *----------------------------------------------------------------------*
    * -- p1 text
    * -- p2 text
    *----------------------------------------------------------------------*
    FORM display_4thlevel .
    SELECT * INTO CORRESPONDING FIELDS OF TABLE imara FROM mara UP TO 100 ROWS.
    CALL METHOD cl_salv_table=factory
    IMPORTING
    r_salv_table = gr_table3
    CHANGING
    t_table = imara.
    gr_table3-set_screen_status(
    pfstatus = 'SALV_TABLE_STANDARD'
    report = sy-repid
    set_functions = gr_table3-c_functions_all ).
    gr_events = gr_table3-get_event( ).
    CREATE OBJECT event_handler.
    SET HANDLER event_handler-on_user_command FOR gr_events.
    SET HANDLER event_handler-on_double_click FOR gr_events.
    * Set up selections.
    gr_selections = gr_table3-get_selections( ).
    gr_selections-set_selection_mode( 1 ). "Single
    * Display
    gr_table3-display( ).

    ENDFORM. " DISPLAY_4THLEVEL

  • RELEVANCY SCORE 3.19

    DB:3.19:Doubt In Alv Tree xc



    Hi friends,

    I am working in alv tree. It is working fine. In click event , if i click one item it should call another one tcode (it is also an another one tree strucutre ). i called that tcode using call transaction. it is working .

    now my question how to place cursor in the corresponding item of the second tree.

    Thanks

    Senthil Kumar.r

  • RELEVANCY SCORE 3.17

    DB:3.17:Double Click For A Single ( Last Node ) In Alv Tree. z8



    Hi experts,

    i have a small problem in alv tree report using classes,

    my reequirement is i have to display the list of fields in tree, the tree is fine, but i want to add a code i,e. when i double click on the child node in a node, it should go to a transaction code (FAGL03) with selection screen variables as input to the transaction. can any one help me in this aspect , as i have tried and searched for similar threads , i didnt found any.

    i have to select only the single last childs (GL Account) in the parent node, so that it leads to the TRANSACTION for GL display.*******

    Regards,

    venkat

  • RELEVANCY SCORE 3.17

    DB:3.17:How To Make An Object Oriented Alv Respond To Double Click m1


    Hi all,HOw to make an Object oriented alv respond to double click.SAmple code will be helpful.Thanks in advance,Alex.

    DB:3.17:How To Make An Object Oriented Alv Respond To Double Click m1

    Please search for availabe information before posting.Thread locked.Thomas

  • RELEVANCY SCORE 3.17

    DB:3.17:Abt Alv Reports fm



    hi folks,

    1) what is the structure of FIELD_CATALOG_MERGE?

    2)up to how many secondery list develop in ALV reporting.?

    3) how to develop "double click to switch to nxt list", "how to display hotspot in ALV" reports?

    points will be rewarded

    warm regards

    vaseem.

    DB:3.17:Abt Alv Reports fm


    Hello Vaseem

    The function module LVC_FIELDCATALOG_MERGE can be used repeatedly to create a fieldcatalog consisting of several different structures/tables.

    Have a look at my sample report bZUS_SDN_REUSE_ALV_GRID_DISP/b in thread

    alv grid display

    Regards

    Uwe

  • RELEVANCY SCORE 3.17

    DB:3.17:Select Multiple Lines On Alv Tree dp



    I am working on alv tree using class cl_gui_alv_tree. I want to select multiple line on ctrl+click. how can i do that ?

    DB:3.17:Select Multiple Lines On Alv Tree dp


    hi,

    Plz refer to this link.

    http://www.sapdevelopment.co.uk/reporting/alv/alvgrid_rowsel.htm

    You will find sample code here.

    Regards

    Sumit Agarwal

  • RELEVANCY SCORE 3.16

    DB:3.16:Editable Column In Alv Column Tree Model af



    Hi Experts, I have created ALV tree using the class
    CL_COLUMN_TREE_MODEL

    DB:3.16:Editable Column In Alv Column Tree Model af

    samthajain wrote:

    Hi Experts, I have created ALV tree using the class
    CL_COLUMN_TREE_MODEL

  • RELEVANCY SCORE 3.16

    DB:3.16:Problem Related To Alv Report Tree fj



    Hi Experts,

    I am displaying some data ALV report tree format . Now i want to capture the data of selected node record and update a DB table when user press Approve button in the toolbar.

    Can any body suggest which way i can achieve that functionality ?

    Also, can we have a approve as pushbutton for every node means we can add it as column and then on double clicking that button triggering double click event and capturing node data.

    Right now i have been stucked on node data capturing when we go for approve. Please suggest.

    Thanks,

    Akash

    DB:3.16:Problem Related To Alv Report Tree fj


    Hi Experts,

    I am displaying some data ALV report tree format . Now i want to capture the data of selected node record and update a DB table when user press Approve button in the toolbar.

    Can any body suggest which way i can achieve that functionality ?

    Also, can we have a approve as pushbutton for every node means we can add it as column and then on double clicking that button triggering double click event and capturing node data.

    Right now i have been stucked on node data capturing when we go for approve. Please suggest.

    Thanks,

    Akash

  • RELEVANCY SCORE 3.16

    DB:3.16:Alv Double Click jx



    hello friends,

    i have issue when i double click on row in ALV i have to call transaction with that row data.

    suppose i double click on 11 then transaction will be called with data of that row.

    DB:3.16:Alv Double Click jx


    Hi,

    Check the below Link

    https://www.sdn.sap.com/irj/scn/wiki?path=/pages/viewpage.action%3fpageid=53583

    Hope this helps you.

    Regards,

    Anki Reddy

  • RELEVANCY SCORE 3.16

    DB:3.16:Interactive Alv cf



    HI,

    i wrote code for interactive alv using classes. first time when i double click on particular entry in basic list i am getting secondary list properly. from second time if i double click on another record in basic list, i am getting pevious secondary list.how can i resolve it?

    vr

    DB:3.16:Interactive Alv cf


    hi,

    use set_table_for_first_display method of class cl_gui_alv_grid for refreshing

  • RELEVANCY SCORE 3.16

    DB:3.16:Alv-Tree Problem a7



    Hi,

    I am displaying data in ALV Tree. In ALV tree, there is some line items for each of the node. When the user click on the line item and press the button which is on the application toolbar, some Ztable will be updated. Its working when i go back to the selection screen and execute again. But my requirement is, it has to reflected immidiately when the data is changed. Though i am displaying the updated data in the ALV tree, it has to reflected immediately when the user press the button which is there in the application tool bar. Please suggest me.

    Regards,

    Priyaranjan

    DB:3.16:Alv-Tree Problem a7


    hi,

    i think that you can solve this problem using this metods of the class alv_tree:

    CALL METHOD alv_tree-change_item

    EXPORTING

    i_node_key = i_node_key " Node that i have to change

    i_fieldname = 'KUNNR' " Field name

    i_data = lv_kunnr " Value

    i_u_data = 'X' " flag for changing value

    EXCEPTIONS

    node_not_found = 1

    OTHERS = 2.

    CALL METHOD alv_tree-frontend_update. " update the frontend

    cl_gui_cfw=flush( ).

    bye

  • RELEVANCY SCORE 3.16

    DB:3.16:Alv Tree In Field Catalog 3a



    Hi ,

    Can we create ALV tree in Field catalog and expand output table depending on the click on tree.

    Regards,

    Satya

    DB:3.16:Alv Tree In Field Catalog 3a


    Hai Prasad,

    If you use the Function Module, pass a layout which contains an attribute bEXPAND_ALL/b when set to 'X' the tree will be expanded when displayed.

  • RELEVANCY SCORE 3.16

    DB:3.16:Webvisor In A Subscreen 1d



    Hello gurus,

    I have a question. Is posible to introduce a component in a subscreen which can display a website? I have a dynpro with an ALV Tree and when i do double click over a node, this transation call an url from external browser (IE), but i would like to do a subscreen this dynpro and display in the subscreen the url directly without using an external browser.

    Thanks!!!

    DB:3.16:Webvisor In A Subscreen 1d


    Hello gurus,

    I have a question. Is posible to introduce a component in a subscreen which can display a website? I have a dynpro with an ALV Tree and when i do double click over a node, this transation call an url from external browser (IE), but i would like to do a subscreen this dynpro and display in the subscreen the url directly without using an external browser.

    Thanks!!!

  • RELEVANCY SCORE 3.16

    DB:3.16:How To Execute A Transaction In Specified User Defined Screen. 3a



    Hi,

    I have created an alv tree in that I'm calling a transaction after double click on node of that tree. Please help me for to show the called transaction in user defined specified screen.

    Thanks in advance.

    DB:3.16:How To Execute A Transaction In Specified User Defined Screen. 3a


    Hi,

    I have created an alv tree in that I'm calling a transaction after double click on node of that tree. Please help me for to show the called transaction in user defined specified screen.

    Thanks in advance.

  • RELEVANCY SCORE 3.16

    DB:3.16:Alv Interactive Without Using Classes 31



    hi friends,

    i want the code for the ALV interactive double click.when ever i double click on the particular field in the alv grid.it must take me to the other transaction where my before alv grid display screen must disappear.But this code must not use classes concept.

    Charita.

    DB:3.16:Alv Interactive Without Using Classes 31


    hi,

    try this simple ex for interactive ALV without using classes.

    on the 1st screen matno,mattyp will be displayed,when you doubleclick on a row,secondary list will be with displayed item details

    TYPE-POOLS:slis.

    TYPES:BEGIN OF ty_mara,

    matnr LIKE mara-matnr,

    mtart LIKE mara-mtart,

    END OF ty_mara.

    DATA:it_mara TYPE STANDARD TABLE OF ty_mara,

    wa_mara TYPE ty_mara.

    TYPES:BEGIN OF ty_mard,

    matnr LIKE mard-matnr,

    werks LIKE mard-werks,

    lgort LIKE mard-werks,

    END OF ty_mard.

    DATA:it_mard TYPE STANDARD TABLE OF ty_mard,

    wa_mard TYPE ty_mard.

    DATA:i_fcat TYPE slis_t_fieldcat_alv,

    w_fcat TYPE slis_fieldcat_alv,

    it_listheader TYPE slis_t_listheader,

    i_events TYPE slis_t_event,

    w_events TYPE slis_alv_event,

    i_layout TYPE slis_layout_alv,

    i_fcat2 TYPE slis_t_fieldcat_alv,

    w_fcat2 TYPE slis_fieldcat_alv,

    i_events2 TYPE slis_t_event,

    w_events2 TYPE slis_alv_event,

    v_repid LIKE sy-repid,

    title

    v_title1 TYPE lvc_title VALUE 'First list displayed',

    v_title2 TYPE lvc_title VALUE 'Second list displayed'.

    INITIALIZATION.

    v_repid = sy-repid.

    PERFORM build_fieldcat_mara.

    PERFORM event_call.

    PERFORM pop_event.

    START-OF-SELECTION.

    PERFORM get_data.

    PERFORM build_header USING it_listheader.

    PERFORM display_alv.

    ----

    * Form get_data

    ----

    text

    ----

    -- p1 text

    -- p2 text

    ----

    FORM get_data .

    SELECT matnr mtart FROM mara INTO TABLE it_mara.

    ENDFORM. " get_data

    ----

    * Form build_header

    ----

    text

    ----

    --P_I_HEADER text

    ----

    FORM build_header USING i_listheader TYPE slis_t_listheader.

    DATA: hline TYPE slis_listheader.

    hline-info = 'This is Interactive ALV'.

    hline-typ = 'H'.

    ENDFORM. " build_header

    ----

    * Form build_fieldcat

    ----

    text

    ----

    -- p1 text

    -- p2 text

    ----

    FORM build_fieldcat_mara.

    w_fcat-tabname = 'IT_MARA'.

    w_fcat-fieldname = 'MATNR'.

    w_fcat-col_pos = '1'.

    w_fcat-seltext_m = 'Material No.'.

    APPEND w_fcat TO i_fcat.

    CLEAR w_fcat.

    w_fcat-tabname = 'IT_MARA'.

    w_fcat-fieldname = 'MTART'.

    w_fcat-col_pos = '2'.

    w_fcat-seltext_m = 'Material Type'.

    APPEND w_fcat TO i_fcat.

    CLEAR w_fcat.

    ENDFORM. " build_fieldcat

    ----

    * Form event_call

    ----

    text

    ----

    -- p1 text

    -- p2 text

    ----

    FORM event_call .

    CALL FUNCTION 'REUSE_ALV_EVENTS_GET'

    EXPORTING

    i_list_type = 0

    IMPORTING

    et_events = i_events.

    ENDFORM. " event_call

    ----

    * Form pop_event

    ----

    text

    ----

    -- p1 text

    -- p2 text

    ----

    FORM pop_event .

    READ TABLE i_events INTO w_events WITH KEY name = 'TOP_OF_PAGE'.

    IF sy-subrc = 0.

    w_events-form = 'TOP_OF_PAGE'.

    MODIFY i_events FROM w_events TRANSPORTING form WHERE name = w_events-name.

    ENDIF.

    READ TABLE i_events INTO w_events WITH KEY name = 'USER_COMMAND'.

    IF sy-subrc = 0.

    w_events-form = 'USER_COMMAND'.

    MODIFY i_events FROM w_events TRANSPORTING form WHERE name = w_events-name.

    ENDIF.

    ENDFORM. " pop_event

    ----

    * Form display_alv

    ----

    text

    ----

    -- p1 text

    -- p2 text

    ----

    FORM display_alv .

    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'

    EXPORTING

    i_callback_program = v_repid

    i_callback_user_command = 'USER_COMMAND'

    i_callback_top_of_page = 'TOP_OF_PAGE'

    i_grid_title = v_title1

    IS_LAYOUT = I_LAYOUT

    it_fieldcat = i_fcat

    IT_SORT = IT_SORT

    I_SAVE = 'A'

    IS_VARIANT = IS_VARIANT

    it_events = i_events

    TABLES

    t_outtab = it_mara.

    ENDFORM. " display_alv

    ----

    * Form top_of_page

    ----

    text

    ----

    FORM top_of_page.

    CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'

    EXPORTING

    it_list_commentary = it_listheader.

    ENDFORM. "top_of_page

    ----

    * Form user_command

    ----

    text

    ----

    --R_UCOMM text

    ----

    FORM user_command USING r_ucomm LIKE sy-ucomm

    rs_selfield type slis_selfield.

    CASE r_ucomm.

    WHEN 'IC1'.

    READ TABLE it_mara INTO wa_mara INDEX rs_selfield-tabindex.

    PERFORM build_fieldcat_mard.

    PERFORM event_call_mard.

    PERFORM pop_event_mard.

    PERFORM get_mard.

    PERFORM build_header_mard USING it_listheader.

    PERFORM display_mard.

    ENDCASE.

    ENDFORM. "user_command

    ----

    * Form build_fieldcat_mard

    ----

    text

    ----

    -- p1 text

    -- p2 text

    ----

    FORM build_fieldcat_mard .

    w_fcat2-tabname = 'IT_MARD'.

    w_fcat2-fieldname = 'MATNR'.

    w_fcat2-col_pos = '1'.

    w_fcat2-seltext_m = 'Material No.'.

    APPEND w_fcat2 to i_fcat2.

    CLEAR w_fcat2.

    w_fcat2-tabname = 'IT_MARD'.

    w_fcat2-fieldname = 'WERKS'.

    w_fcat2-col_pos = '1'.

    w_fcat2-seltext_m = 'Plant'.

    APPEND w_fcat2 to i_fcat2.

    CLEAR w_fcat2.

    w_fcat2-tabname = 'IT_MARD'.

    w_fcat2-fieldname = 'LGORT'.

    w_fcat2-col_pos = '1'.

    w_fcat2-seltext_m = 'Storage'.

    APPEND w_fcat2 to i_fcat2.

    CLEAR w_fcat2.

    ENDFORM. " build_fieldcat_mard

    ----

    * Form event_call_mard

    ----

    text

    ----

    -- p1 text

    -- p2 text

    ----

    FORM event_call_mard .

    CALL FUNCTION 'REUSE_ALV_EVENTS_GET'

    EXPORTING

    i_list_type = 0

    IMPORTING

    et_events = i_events2.

    ENDFORM. " event_call_mard

    ----

    * Form pop_event_mard

    ----

    text

    ----

    -- p1 text

    -- p2 text

    ----

    FORM pop_event_mard .

    READ TABLE i_events2 INTO w_events2 WITH KEY name = 'TOP_OF_PAGE'.

    IF sy-subrc = 0.

    w_events2-form = 'TOP_OF_PAGE'.

    MODIFY i_events2 FROM w_events2 TRANSPORTING form WHERE

    name = w_events2-name.

    ENDIF.

    ENDFORM. " pop_event_mard

    ----

    * Form get_mard

    ----

    text

    ----

    -- p1 text

    -- p2 text

    ----

    FORM get_mard .

    SELECT matnr werks lgort FROM mard INTO TABLE it_mard

    for all entries in it_mara

    where matnr = wa_mara-matnr.

    ENDFORM. " get_mard

    ----

    * Form build_header_mard

    ----

    text

    ----

    --P_IT_LISTHEADER text

    ----

    FORM build_header_mard USING i_listheader TYPE slis_t_listheader.

    DATA:hline1 TYPE slis_listheader.

    hline1-typ = 'H'.

    hline1-info = 'CHECKING PGM'.

    ENDFORM. " build_header_mard

    ----

    * Form display_mard

    ----

    text

    ----

    -- p1 text

    -- p2 text

    ----

    FORM display_mard .

    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'

    EXPORTING

    i_callback_program = v_repid

    i_callback_top_of_page = 'TOP_OF_PAGE'

    i_grid_title = v_title2

    IS_LAYOUT = IS_LAYOUT

    it_fieldcat = i_fcat2

    IT_SORT = IT_SORT

    I_DEFAULT = 'X'

    I_SAVE = 'A'

    IS_VARIANT = IS_VARIANT

    it_events = i_events2

    TABLES

    t_outtab = it_mard

    .

    ENDFORM. " display_mard

    do award points for all helpful answers

    Regards