Events in CL_GUI_ALV_GRID - PAI

Hi All,
I designed the screen like below
I am using doc container with split one is for small ALV grid and next is for text editor. - Upper Portion of screen (Upper portion is splited vertically for alv grid and text editor)
in the bottom of screen i have tabstrip in each tab it display the detailed ALV grid. - Bottom of screen
When you click on upper portion of alv grid, the data is displayed in below tabs of ALV and long text in text editor.
Tabstrip data is based on the upper portion of alv, it is like itemdata and header data.
i used hotspot event in upper portion of alv to select the row and based on the row selected, bottom portion of data should display in the alv grids.
But when i select the row it is not triggering the PAI event and it is triggering the PERFORM handle_hotspot_click USING e_row_id e_column_id es_row_no .
how to trigger the PAI event when we click the double click or hot spot in alv grid.
in alv tree we have set_registered_events but not alv grid.
Please help me.
Thanks,
Srinivas Manai.

Hi ,
I guess the follwing code will be useful to you.
Define a class. In that define a method for event hotspot_click of cl_gui_alv_grid like below.
CLASS-METHODS:
      handle_hotspot_click
        FOR EVENT hotspot_click OF cl_gui_alv_grid
            IMPORTING e_row_id e_column_id es_row_no.
In the method implementation write the desired code.
Reward if useful
Regards,
Sravanthi.

Similar Messages

  • Problem in handling Before_User_Command Event in CL_GUI_ALV_GRID class

    Hi,
    I have created an ALV grid control and I am also handling the before_user_command event of cl_gui_alv_grid class.
    My aim is to use POPUP_TO_CONFIRM function module when the users click on the add/delete row button.
    Control is going to the event if I am clicking on any other button of the control except add/delete row buttons.
    And in the class attributes those operation description is saying they are local.
    Please let me know how make control to go to before_user_command event when users click on add/delete button.
    Thanks in advance,
    Suneel C

    Hi Suneel,
    For you requirement, I dont see why you cant include the functionality for the pop up within the USER_COMMAND event itself.
    Algorithm for the USER_COMMAND event:
    Step 1: Check E_UCOMM is 'ADD' or 'DELT'.
    Step 2: If yes, call FM for POPUP_TO_CONFIRM; else continue to other E_UCOMM
    Step 3: If ans is 'No', exit Method - else continue with Add/ Delete as required
    Cheers,
    Aditya

  • Is thr are any other events apart from PAI,PBO,POV,POH in ABAP Programming

    Gayathri

    Hi,
    PBO,PAI,POV and POH these are the only events available in  Module pool programming.
    <b>Below i give you the Classical  Report Events.</b>
    Initialization.
    at selection-screen.
    at selection-screen on value Request.
    Start-of-selection
    end-of-selection.
    Top-of-page
    End-of-page.
    <b>Events in Interactive Reports</b>.
    Addition to the Classical Report Events below Events are used in Interactive Reports.
    at line-selection.
    top-of-page During line selection.
    Reward Ponts if Helpful.
    Thanks & Regards,
    Ashok.

  • ALV OO toolbar event of  cl_gui_alv_grid - problem

    I have defined a Button in ALV grid toolbar in my program using Event Toolbar OF cl_gui_alv_grid.
    I have also disabled/Excluded some of the buttons on Standard Grid toolbar.
    My requirement is when i click on Button defined on ALV grid toolbar..i have to trigger a Perform in which code for submit the changes done on the grid is written..
    I tried to use event user_command and this method is not getting trigerred when i click on button defined on toolbar, Probably since i have mutiple grids in my output..
    suggest me appropriate event handler method or proper approach to go about this?

    Hello Ksiva
    Have you set the event handler for USER_COMMAND? You can do this either for all or a specific grid instance.
    SET HANDLER: lcl_eventhandler=>handle_user_command    FOR ALL INSTANCES.
    SET HANDLER: lcl_eventhandler=>handle_user_command    FOR go_grid1.
    Within your event handler method you can easily distinguish between the different grid instance.
    CLASS lcl_eventhandler DEFINITION.
    METHODS: handle_user_command FOR EVENT user_command
                                                         OF cl_gui_alv_grid
                        IMPORTING
                           e_ucomm
                           sender.    " !!! Optional parameter, instance which raised the event
    CLASS lcl_eventhandler IMPLEMENTATION.
    METHOD handle_user_command.
      CASE sender.
         WHEN go_grid1.
             " handle user command
         WHEN others.
               RETURN.
      ENDCASE.
    ENDMETHOD.
    Regards
      Uwe

  • About CL_GUI_ALV_GRID's event-handling & PAI/PBO

    Hi, all,
    I met a problem when using CL_GUI_ALV_GRID's event-handling.
    I created a simple event-handling-class with an event-handling-method for DOUBLE-CLICK event of CL_GUI_ALV_GRID. And the event-handling-method, only makes some changes to the contents of itab to be shown in ALV_GRID.
    The problem is: In my idea, after event-dispatch and event-handling in PAI, subsequent PBO will be called. Since SET_TABLE_FOR_FIRST_DISPLAY is called in PBO, I would saw the changed itab shown. BUT, I saw the contents of the itab remaining unchanged.
    * PAI module, DISPATCH the event
      CASE OK_CODE.
        WHEN OTHERS.
          CALL METHOD cl_gui_cfw=>dispatch.
      ENDCASE.
    I debugged, and found that, after event-handling-method, PBO module doesn't execute.
    That's my wondering, after the preceding PAI, shouldn't the subsequent PBO appear? OR is event-handling different from other user actions?
    Many thanks.

    Hi,
    for double click you need explicit handler ,
    just check it.
    REPORT  ZTEST1234    MESSAGE-ID ZZ                           .
    DATA: G_GRID TYPE REF TO CL_GUI_ALV_GRID,  "First
          G_GRID1 TYPE REF TO CL_GUI_ALV_GRID. "Second
    DATA: L_VALID TYPE C,
          V_FLAG,
          V_DATA_CHANGE,
          V_ROW TYPE LVC_S_ROW,
          V_COLUMN TYPE LVC_S_COL,
          V_ROW_NUM TYPE LVC_S_ROID.
    DATA: OK_CODE LIKE SY-UCOMM,
          SAVE_OK LIKE SY-UCOMM,
          G_CONTAINER1 TYPE SCRFNAME VALUE 'TEST', "First Container
          G_CONTAINER2 TYPE SCRFNAME VALUE 'TEST1',"Second container
          GS_LAYOUT TYPE LVC_S_LAYO.
    DATA:BEGIN OF  ITAB OCCURS 0,
         VBELN LIKE LIKP-VBELN,
         POSNR LIKE LIPS-POSNR,
         LFDAT like lips-vfdat,
         BOX(1),
         HANDLE_STYLE TYPE LVC_T_STYL,
         END OF ITAB.
    *       CLASS lcl_event_handler DEFINITION
    CLASS LCL_EVENT_HANDLER DEFINITION .
      PUBLIC SECTION .
        METHODS:
    **Hot spot Handler
        HANDLE_HOTSPOT_CLICK FOR EVENT HOTSPOT_CLICK OF CL_GUI_ALV_GRID
                          IMPORTING E_ROW_ID E_COLUMN_ID ES_ROW_NO,
    **Handler to Check the Data Change
        HANDLE_DATA_CHANGED FOR EVENT DATA_CHANGED
                             OF CL_GUI_ALV_GRID
                             IMPORTING ER_DATA_CHANGED
                                       E_ONF4
                                       E_ONF4_BEFORE
                                       E_ONF4_AFTER,
    **Double Click Handler
        HANDLE_DOUBLE_CLICK FOR EVENT DOUBLE_CLICK OF CL_GUI_ALV_GRID
                                         IMPORTING E_ROW E_COLUMN ES_ROW_NO.
    ENDCLASS.                    "lcl_event_handler DEFINITION
    *       CLASS lcl_event_handler IMPLEMENTATION
    CLASS LCL_EVENT_HANDLER IMPLEMENTATION.
    *Handle Hotspot Click
      METHOD HANDLE_HOTSPOT_CLICK .
        CLEAR: V_ROW,V_COLUMN,V_ROW_NUM.
        V_ROW  = E_ROW_ID.
        V_COLUMN = E_COLUMN_ID.
        V_ROW_NUM = ES_ROW_NO.
        MESSAGE I000 WITH V_ROW 'clicked'.
      ENDMETHOD.                    "lcl_event_handler
    *Handle Double Click
      METHOD  HANDLE_DOUBLE_CLICK.
        CLEAR: V_ROW,V_COLUMN,V_ROW_NUM.
        V_ROW  = E_ROW.
        V_COLUMN = E_COLUMN.
        V_ROW_NUM = ES_ROW_NO.
        IF E_COLUMN = 'VBELN'.
          SET PARAMETER ID 'VL' FIELD ITAB-VBELN.
          CALL TRANSACTION 'VL03N' AND SKIP FIRST SCREEN.
        ENDIF.
        IF E_COLUMN = 'POSNR'.
          MESSAGE I000 WITH 'Click on POSNR row number '  E_ROW.
          "with this row num you can get the data
        ENDIF.
      ENDMETHOD.                    "handle_double_click
    **Handle Data Change
      METHOD HANDLE_DATA_CHANGED.
        CALL METHOD G_GRID->REFRESH_TABLE_DISPLAY
          EXCEPTIONS
            FINISHED = 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.
      ENDMETHOD.                    "HANDLE_DATA_CHANGED
    ENDCLASS.                    "LCL_EVENT_HANDLER IMPLEMENTATION
    *&             Global Definitions
    DATA:      G_CUSTOM_CONTAINER TYPE REF TO CL_GUI_CUSTOM_CONTAINER,"Container1
                G_HANDLER TYPE REF TO LCL_EVENT_HANDLER, "handler
                G_CUSTOM_CONTAINER1 TYPE REF TO CL_GUI_CUSTOM_CONTAINER. "Container2
    *- Fieldcatalog for First and second Report
    DATA: IT_FIELDCAT  TYPE  LVC_T_FCAT,
          X_FIELDCAT TYPE LVC_S_FCAT,
          LS_VARI  TYPE DISVARIANT.
    *                START-OF_SELECTION
    START-OF-SELECTION.
      SELECT VBELN
             POSNR
             FROM LIPS
             UP TO 20 ROWS
             INTO CORRESPONDING FIELDS OF TABLE ITAB.
    END-OF-SELECTION.
      IF NOT ITAB[] IS INITIAL.
        CALL SCREEN 100.
      ELSE.
        MESSAGE I002 WITH 'NO DATA FOR THE SELECTION'(004).
      ENDIF.
    *&      Form  CREATE_AND_INIT_ALV
    *       text
    FORM CREATE_AND_INIT_ALV .
      DATA: LT_EXCLUDE TYPE UI_FUNCTIONS.
    "First Grid
      CREATE OBJECT G_CUSTOM_CONTAINER
             EXPORTING CONTAINER_NAME = G_CONTAINER1.
      CREATE OBJECT G_GRID
             EXPORTING I_PARENT = G_CUSTOM_CONTAINER.
    "Second Grid
      CREATE OBJECT G_CUSTOM_CONTAINER1
             EXPORTING CONTAINER_NAME = G_CONTAINER2.
      CREATE OBJECT G_GRID1
             EXPORTING I_PARENT = G_CUSTOM_CONTAINER1.
    * Set a titlebar for the grid control
      CLEAR GS_LAYOUT.
      GS_LAYOUT-GRID_TITLE = TEXT-003.
      GS_LAYOUT-ZEBRA = SPACE.
      GS_LAYOUT-CWIDTH_OPT = 'X'.
      GS_LAYOUT-NO_ROWMARK = 'X'.
      GS_LAYOUT-BOX_FNAME = 'BOX'.
      GS_LAYOUT-CTAB_FNAME = 'CELLCOLOR'.
      GS_LAYOUT-STYLEFNAME = 'HANDLE_STYLE'.
      CALL METHOD G_GRID->REGISTER_EDIT_EVENT
        EXPORTING
          I_EVENT_ID = CL_GUI_ALV_GRID=>MC_EVT_MODIFIED.
      CREATE OBJECT G_HANDLER.
      SET HANDLER G_HANDLER->HANDLE_DOUBLE_CLICK FOR G_GRID.
    *  SET HANDLER G_HANDLER->HANDLE_HOTSPOT_CLICK FOR G_GRID.
      SET HANDLER G_HANDLER->HANDLE_DATA_CHANGED FOR G_GRID.
    data: ls_outatb like line of itab,
          v_index type sy-tabix.
    DATA: LS_EDIT TYPE LVC_S_STYL,
            LT_EDIT TYPE LVC_T_STYL.
    LOOP AT ITAB INTO ls_outatb WHERE POSNR = '000010'.
        V_INDEX = SY-TABIX.
        LS_EDIT-FIELDNAME = 'VBELN'.
        LS_EDIT-STYLE = CL_GUI_ALV_GRID=>MC_STYLE_DISABLED.
        LS_EDIT-STYLE2 = SPACE.
        LS_EDIT-STYLE3 = SPACE.
        LS_EDIT-STYLE4 = SPACE.
        LS_EDIT-MAXLEN = 8.
        INSERT LS_EDIT INTO TABLE LT_EDIT.
        INSERT LINES OF LT_EDIT INTO TABLE ls_outatb-handle_style.
        MODIFY ITAB INDEX V_INDEX FROM ls_outatb  TRANSPORTING
                                          HANDLE_STYLE.
      ENDLOOP.
    * setting focus for created grid control
      CALL METHOD CL_GUI_CONTROL=>SET_FOCUS
        EXPORTING
          CONTROL = G_GRID.
    * Build fieldcat and set editable for date and reason code
    * edit enabled. Assign a handle for the dropdown listbox.
      PERFORM BUILD_FIELDCAT.
    * Optionally restrict generic functions to 'change only'.
    *   (The user shall not be able to add new lines).
      PERFORM EXCLUDE_TB_FUNCTIONS CHANGING LT_EXCLUDE.
    **Vaiant to save the layout
      LS_VARI-REPORT      = SY-REPID.
      LS_VARI-HANDLE      = SPACE.
      LS_VARI-LOG_GROUP   = SPACE.
      LS_VARI-USERNAME    = SPACE.
      LS_VARI-VARIANT     = SPACE.
      LS_VARI-TEXT        = SPACE.
      LS_VARI-DEPENDVARS  = SPACE.
      CALL METHOD G_GRID->REGISTER_EDIT_EVENT
        EXPORTING
          I_EVENT_ID = CL_GUI_ALV_GRID=>MC_EVT_MODIFIED.
    **Calling the Method for ALV output for First Grid
      CALL METHOD G_GRID->SET_TABLE_FOR_FIRST_DISPLAY
        EXPORTING
          IT_TOOLBAR_EXCLUDING = LT_EXCLUDE
          IS_VARIANT           = LS_VARI
          IS_LAYOUT            = GS_LAYOUT
          I_SAVE               = 'A'
        CHANGING
          IT_FIELDCATALOG      = IT_FIELDCAT
          IT_OUTTAB            = ITAB[].
    **Calling the Method for ALV output for Second Grid
       CALL METHOD G_GRID1->SET_TABLE_FOR_FIRST_DISPLAY
    *    EXPORTING
    *      IT_TOOLBAR_EXCLUDING = LT_EXCLUDE
        CHANGING
          IT_FIELDCATALOG      = IT_FIELDCAT
          IT_OUTTAB            = ITAB[].
    * Set editable cells to ready for input initially
      CALL METHOD G_GRID->SET_READY_FOR_INPUT
        EXPORTING
          I_READY_FOR_INPUT = 1.
    ENDFORM.                               "CREATE_AND_INIT_ALV
    *&      Form  EXCLUDE_TB_FUNCTIONS
    *       text
    *      -->PT_EXCLUDE text
    FORM EXCLUDE_TB_FUNCTIONS CHANGING PT_EXCLUDE TYPE UI_FUNCTIONS.
    * Only allow to change data not to create new entries (exclude
    * generic functions).
      DATA LS_EXCLUDE TYPE UI_FUNC.
      LS_EXCLUDE = CL_GUI_ALV_GRID=>MC_FC_LOC_COPY_ROW.
      APPEND LS_EXCLUDE TO PT_EXCLUDE.
      LS_EXCLUDE = CL_GUI_ALV_GRID=>MC_FC_LOC_DELETE_ROW.
      APPEND LS_EXCLUDE TO PT_EXCLUDE.
      LS_EXCLUDE = CL_GUI_ALV_GRID=>MC_FC_LOC_APPEND_ROW.
      APPEND LS_EXCLUDE TO PT_EXCLUDE.
      LS_EXCLUDE = CL_GUI_ALV_GRID=>MC_FC_LOC_INSERT_ROW.
      APPEND LS_EXCLUDE TO PT_EXCLUDE.
      LS_EXCLUDE = CL_GUI_ALV_GRID=>MC_FC_LOC_MOVE_ROW.
      APPEND LS_EXCLUDE TO PT_EXCLUDE.
      LS_EXCLUDE = CL_GUI_ALV_GRID=>MC_FC_LOC_COPY.
      APPEND LS_EXCLUDE TO PT_EXCLUDE.
      LS_EXCLUDE = CL_GUI_ALV_GRID=>MC_FC_LOC_CUT.
      APPEND LS_EXCLUDE TO PT_EXCLUDE.
      LS_EXCLUDE = CL_GUI_ALV_GRID=>MC_FC_LOC_PASTE.
      APPEND LS_EXCLUDE TO PT_EXCLUDE.
      LS_EXCLUDE = CL_GUI_ALV_GRID=>MC_FC_LOC_PASTE_NEW_ROW.
      APPEND LS_EXCLUDE TO PT_EXCLUDE.
      LS_EXCLUDE = CL_GUI_ALV_GRID=>MC_FC_LOC_UNDO.
      APPEND LS_EXCLUDE TO PT_EXCLUDE.
    ENDFORM.                               " EXCLUDE_TB_FUNCTIONS
    *&      Form  build_fieldcat
    *       Fieldcatalog
    FORM BUILD_FIELDCAT .
      DATA: L_POS TYPE I.
      L_POS = L_POS + 1.
      X_FIELDCAT-SCRTEXT_M = 'Delivery'(024).
      X_FIELDCAT-FIELDNAME = 'VBELN'.
      X_FIELDCAT-TABNAME = 'ITAB'.
      X_FIELDCAT-COL_POS    = L_POS.
      X_FIELDCAT-NO_ZERO    = 'X'.
      X_FIELDCAT-EDIT      = 'X'.
      X_FIELDCAT-OUTPUTLEN = '10'.
      APPEND X_FIELDCAT TO IT_FIELDCAT.
      CLEAR X_FIELDCAT.
      L_POS = L_POS + 1.
      X_FIELDCAT-SCRTEXT_M = 'Item'(025).
      X_FIELDCAT-FIELDNAME = 'POSNR'.
      X_FIELDCAT-TABNAME = 'ITAB'.
      X_FIELDCAT-COL_POS    = L_POS.
      X_FIELDCAT-OUTPUTLEN = '5'.
      APPEND X_FIELDCAT TO IT_FIELDCAT.
      CLEAR X_FIELDCAT.
        L_POS = L_POS + 1.
        X_FIELDCAT-SCRTEXT_M = 'Del Date'(015).
      X_FIELDCAT-FIELDNAME = 'LFDAT'.
      X_FIELDCAT-TABNAME = 'ITAB'.
      X_FIELDCAT-COL_POS    = L_POS.
      X_FIELDCAT-OUTPUTLEN = '10'.
      APPEND X_FIELDCAT TO IT_FIELDCAT.
      CLEAR X_FIELDCAT.
      L_POS = L_POS + 1.
    ENDFORM.                    " build_fieldcat
    *&      Module  STATUS_0100  OUTPUT
    *       text
    MODULE STATUS_0100 OUTPUT.
      SET PF-STATUS 'MAIN100'.
      SET TITLEBAR 'MAIN100'.
      IF G_CUSTOM_CONTAINER IS INITIAL.
    **Initializing the grid and calling the fm to Display the O/P
        PERFORM CREATE_AND_INIT_ALV.
      ENDIF.
    ENDMODULE.                 " STATUS_0100  OUTPUT
    *&      Module  USER_COMMAND_0100  INPUT
    *       text
    MODULE USER_COMMAND_0100 INPUT.
      CASE SY-UCOMM.
        WHEN 'BACK'.
          LEAVE TO SCREEN 0.
      ENDCASE.
    ENDMODULE.                 " USER_COMMAND_0100  INPUT
    Regards
    vijay

  • How to insert line with values in ALV (CL_GUI_ALV_GRID)?

    Hi,
    Does anyone know how to get control of new line inserted in ALV (I am using class CL_GUI_ALV_GRID) before the new line is shown to the user. What I want the user to see is not a completely blank line, but a new line with certain fields filled with data.
    I have tried with ALL events in CL_GUI_ALV_GRID but without any luck. If I create my own user command and insert it in the alv menu I get control, but not with the standards. Why?
    Please help
    Kind regards - Keld Gregersen

    Hi,
    I created a nice work around...
    CLASS lcl_event_handler DEFINITION.
    handle_toolbar
    FOR EVENT toolbar OF cl_gui_alv_grid
    IMPORTING e_object e_interactive,
    handle_user_command
    FOR EVENT user_command OF cl_gui_alv_grid
    IMPORTING e_ucomm.
    ENDCLASS. "lcl_event_handler DEFINITION
    CLASS lcl_event_handler IMPLEMENTATION.
    METHOD handle_toolbar.
    DATA:
    l_toolbar TYPE stb_button.
    Here I replace SAP standard functions with own functions
    READ TABLE e_object->mt_toolbar INTO l_toolbar
    WITH KEY function = '&LOCAL&APPEND'.
    IF sy-subrc = 0.
    l_toolbar-function = 'OWN_APPEND'.
    MODIFY e_object->mt_toolbar FROM l_toolbar INDEX sy-tabix.
    ENDIF.
    READ TABLE e_object->mt_toolbar INTO l_toolbar
    WITH KEY function = '&LOCAL&COPY_ROW'.
    IF sy-subrc = 0.
    l_toolbar-function = 'OWN_COPY_ROW'.
    MODIFY e_object->mt_toolbar FROM l_toolbar INDEX sy-tabix.
    ENDIF.
    ENDMETHOD. "handle_toolbar
    METHOD handle_user_command.
    CASE e_ucomm.
    WHEN 'OWN_APPEND'.
    CALL METHOD ref_alv->check_changed_data
    IMPORTING
    e_valid =
    CHANGING
    c_refresh = 'X'
    CREATE YOUR OWN CODE HERE
    CALL METHOD ref_alv->refresh_table_display
    EXPORTING
    is_stable = 'X'
    i_soft_refresh =
    EXCEPTIONS
    finished = 1
    others = 2
    ENDMETHOD. "handle_user_command
    ENDCLASS. "lcl_event_handler IMPLEMENTATION
    Kind regards
    Keld Gregersen

  • Get selected function in a context menu with cl_gui_alv_grid

    Hi,
    I'm trying to implement a context menu on a alv grid. I defined and implemented a method for the event CONTEXT_MENU_REQUEST to add function codes to context menu.  It works ok.
    The problem is retrieving the function selected in context menu. I tried to define in the class definition a method for event CONTEXT_MENU_SELECTED (that seems to be the event to use) but  i can't implement it because is defined as protected event in CL_GUI_ALV_GRID.
    How i can implement a method to catch this event and determine te function code defined in the context menu??
    Thanks.
    Edited by: Alfredo Pradas on Jan 4, 2008 5:35 PM
    Edited by: Alfredo Pradas on Jan 4, 2008 5:36 PM
    Edited by: Alfredo Pradas on Jan 4, 2008 5:37 PM

    The tool bar isn't the best mechanism to use for selecting Rows etc but should ideally be used for discrete functions like SAVE, UPDATE, DOWNLOAD TO EXCEL etc.
    For data manipulation look at ON DATA CHANGED, ON DATA CHANGED FINISHED and DOUBLE CLICK.
    Probably the easiest way is to use the double click event
    methods on_dubbelklik
        for event double_click of cl_gui_alv_grid
        importing
          !e_row
          !e_column
          !es_row_no .
    methods dubbelklik
        importing
          !e_row type lvc_s_row
          !e_column type lvc_s_col
          !es_row_no type lvc_s_roid .
    method constructor.
    create object grid_container1
            exporting
               container_name = 'CCONTAINER1'.
        create object  grid1
           exporting
              i_parent = grid_container1.
        set handler z_object->on_user_command for grid1.
        set handler z_object->on_toolbar for grid1.
        set handler z_object->handle_data_changed for grid1.
        set handler z_object->handle_data_changed_finished for grid1.
        set handler z_object->on_dubbelklik for grid1.
        call method grid1->register_edit_event
            exporting
               i_event_id = cl_gui_alv_grid=>mc_evt_enter.
      endmethod.
    method dubbelklik.
    perform dubbelklik in program (caller)  if found
         using
          e_row
          e_column
          es_row_no.
    endmethod.
    Now in the application program
    when a double click event is done the method calls routine dubbelklik in the calling program 
    The row / column nr and field name will be passed to your subroutine.
    (In my calling class for the grid I make the calling program one of the parameters);
    form dubbelklik using
            e_row   type lvc_s_row
            e_column type lvc_s_col
            es_row_no type lvc_s_roid.
      read table <dyn_table> index e_row into wa_elements.
    etc.
    where <dyn_table> is my grid data table.
    Any comparable method should work.
    Cheers
    jimbo

  • Dynpro-PAI doesn't recognize actual selections in ALV-Control

    Hi Control-Framework-Experts,
    I have a Dynpro with an ALV-Grid-Control (cl_salv_table).
    You can mark rows.
    There is User-ALV-Button (cl_salv_functions_list) and
    a event-handler (EVENT added_function OF cl_salv_events),
    which find out, what rows are selected and gives a corresponding Info-message.
    Example:
    The rows 1 and 2 are selected.
    User presses the ALV-Button
    ALV-Event-Handler Method is proceeded and the following message is shown
    "Selected Rows: 1   2".
    Everything works fine.
    Now the Problem. I want to put this function to a "normal" Dynpro-Standard-Toolbar-Event.
    The PAI-Module does the same coding as the ALV-Event-Handler-Method.
    But -> The Result is outdated.
    Example:
    The rows 1 and 2 are selected.
    User presses the ALV-Button
    ALV-Event-Handler Method is proceeded and the following message is shown
    "Selected Rows: 1   2".
    Now - Only Row 1 is selected.
    +The Dynpro-Standard-Toolbar-Button is pressed. +
    The PAI-Module (user_command_0100) tries to find out the selected rows -> Result:
    "Selected Rows: 1   2". (wrong)
    The PAI-Module only shows the result of the last Event-Handler-Call.
    What is the trick to synchronize Control and Dynpro?
    Regards
    Juergen
    Here ist the coding (sorry for some german inline-comments)
    program  zschoe01.
    data:      ok_code like sy-ucomm.
    * Dynpro-CustomControl
    data: gr_cont01 type ref to cl_gui_custom_container,
          gr_alv01  type ref to cl_salv_table.
    types: begin of ts_fauf,
             aufnr type aufnr,
             text type maktx,
           end of ts_fauf.
    data: gt_fauf type table of ts_fauf,
          gs_fauf type ts_fauf.
    *       CLASS lcl_event_handler DEFINITION
    class lcl_event_handler definition.
      public section.
    *   Klassenmethoden
    *   Trick, weil man sich so das Erzeugen eines gesonderten Objekts
    *   sparen kann
        class-methods:
    *     FCODE-Behandlung innerhalb des ALV01
          handle_alv01_user_command
            for event added_function of cl_salv_events
            importing e_salv_function.
    endclass.                    "lcl_event_handler DEFINITION
    *       CLASS lcl_event_handler IMPLEMENTATION
    class lcl_event_handler implementation.
    *     FCODE-Behandlung innerhalb des ALV01
      method       handle_alv01_user_command .
        data: lr_selections type ref to cl_salv_selections,
              lt_rows type salv_t_row,
              ls_row like line of lt_rows.
        data: lv_string type string,
              lv_char(6) type c.
    * Markierte Zeilen aus ALV-Anzeige ermitteln.
        lr_selections = gr_alv01->get_selections( ).
        lt_rows = lr_selections->get_selected_rows( ).
        if sy-subrc <> 0 or lt_rows[] is initial.
          message i001(00) with 'Nothing selected'.
        else.
          case e_salv_function.
            when 'SAVE'.
              clear lv_string.
              loop at lt_rows into ls_row.
    *           Aufzählung aller markierten Zeilen in einen langen String
                write ls_row to lv_char.
                concatenate lv_string lv_char into lv_string separated by space.
              endloop.
              message i001(00) with 'Selected Rows:' lv_string.
          endcase.
        endif.
      endmethod.                    "handle_alv01_user_command
    endclass.                    "lcl_event_handler IMPLEMENTATION
    start-of-selection.
      gs_fauf-aufnr = '4711'.
      gs_fauf-text  = 'Text1'.
      append gs_fauf to gt_fauf.
      gs_fauf-aufnr = '5616'.
      gs_fauf-text  = 'Another Text'.
      append gs_fauf to gt_fauf.
      call screen 100.
    *  MODULE status_0100 OUTPUT
    module status_0100 output.
      set pf-status '0100'.
      set titlebar '0100'.
    endmodule.                 " STATUS_0100  OUTPUT
    *  MODULE init_controls OUTPUT
    module init_controls output.
      perform init_controls.
    endmodule.                    "init_controls OUTPUT
    *&      Module  exit_commands_0100  INPUT
    *       text
    module exit_commands_0100 input.
    *   -> Transaktion verlassen
      leave to screen 0.
    endmodule.                 " exit_commands_0100  INPUT
    *&      Module  USER_COMMAND_0100  INPUT
    *       text
    module user_command_0100 input.
      case ok_code.
        when 'SAVE'.
    *     (Ctrl-S) gedrückt -> Same Coding as in lcl_event_handler
          data: lr_selections type ref to cl_salv_selections,
                lt_rows type salv_t_row,
                ls_row like line of lt_rows.
          data: lv_string type string,
                lv_char(6) type c.
    *     Markierte Zeilen aus ALV-Anzeige ermitteln.
          lr_selections = gr_alv01->get_selections( ).
          lt_rows = lr_selections->get_selected_rows( ).
          if sy-subrc <> 0 or lt_rows[] is initial.
            message i001(00) with 'Nothing selected'.
          else.
            clear lv_string.
            loop at lt_rows into ls_row.
    *          Aufzählung aller markierten Zeilen in einen langen String
              write ls_row to lv_char.
              concatenate lv_string lv_char into lv_string separated by space.
            endloop.
            message i001(00) with 'Selected Rows:' lv_string.
          endif.
      endcase.
    endmodule.                 " USER_COMMAND_0100  INPUT
    *&      Form  init_controls
    *       text
    form init_controls .
      data: lr_selections type ref to cl_salv_selections.
      data: lr_functions type ref to cl_salv_functions_list.
      data: lr_events type ref to cl_salv_events_table.
      data: lv_text             type string,
            lv_icon type string.
      if gr_cont01 is initial.
        create object gr_cont01
          exporting
    *       parent                      =
            container_name              = 'CUSTCTRL01'.
    *... §2 create an ALV table
        try.
            cl_salv_table=>factory(
              exporting
                r_container    = gr_cont01
                container_name = 'CUSTCTRL01'
              importing
                r_salv_table   = gr_alv01
              changing
                t_table        = gt_fauf ).
          catch cx_salv_msg.                                "#EC NO_HANDLER
        endtry.
    *... §3 Functions
    *... §3.1 activate ALV generic Functions
        lr_functions = gr_alv01->get_functions( ).
    *  lr_functions->set_default( abap_true ).
        lr_functions->set_all( abap_true ).
        try.
            lv_text = '__Who_is_selected?___'.
            lr_functions->add_function(
              name     = 'SAVE'
              text     = lv_text
              tooltip  = lv_text
              position = if_salv_c_function_position=>left_of_salv_functions ).
          catch cx_salv_wrong_call cx_salv_existing.
        endtry.
    *... §4.3 set the selection mode: multiple or single row selection
        lr_selections = gr_alv01->get_selections( ).
        lr_selections->set_selection_mode( if_salv_c_selection_mode=>row_column ).
    *... §5 register to the events of cl_salv_table
        lr_events = gr_alv01->get_event( ).
    *... §5.1 register to the event USER_COMMAND
    **   Eventhandlermethode auch wirklich zuordnen.
    **   Achtung: Syntax! Weil Klassenmethode, Aufruf mit =>
    **   (vgl. Objekte ->)
        set handler:
          lcl_event_handler=>handle_alv01_user_command for lr_events.
        gr_alv01->display( ).
      endif.
    endform.                    " init_controls

    Well I figured out why it wasn't performing like I expected.  My logic was wrong.  Seems reasonable.
    Was I right about this part though?
    My guess is the restore
    doesn't show up because the window isn't really maximized, because I
    made it smaller to maintain proportions.
    My updated VI is attached
    Message Edited by elset191 on 09-23-2009 02:50 PM
    Tim Elsey
    LabVIEW 2010, 2012
    Certified LabVIEW Architect
    Attachments:
    Untitled 1.vi ‏25 KB

  • Application events in ALV Grid Control

    Hello,
    Since SET_REGISTERED_EVENTS cannot be used for ALV Grid Control, how do I register a system event (data_changed) as an application event, so that PAI is processed.  I am using ALV grid not tree.
    Thanks

    ALV events can be defined as application events while creating Grid object.
    In addition to parent, Pass one more parameter:-I_APPL_EVENTS = 'X'.
        CREATE OBJECT grid
               EXPORTING
                 i_parent = g_custom_container
                 I_APPL_EVENTS = 'X'.

  • Replicating MENU_BUTTON, TOOLBAR events

    Hi All,
    I wanted to know if the events in CL_GUI_ALV_GRID - MENU_BUTTON and TOOLBAR - are available in the new ALV Object Model. If not, is there a way to replicate them.
    I couldn't find anything matching these events in the various CL_SALV* classes.
    Thanks and Regards,
    Vidya.

    SALV Model has Functions object which does the job similar to TOOLBAR Event.
    In SALV, Add the function in the ALV grid, get the function object and call the method ADD_FUNCTION.
    *... §3.1 activate ALV generic Functions
        data: lr_functions type ref to cl_salv_functions,
              l_text       type string,
              l_icon       type string.
        lr_functions = gr_table->get_functions( ).
        lr_functions->set_all( gc_true ).
    *... §3.2 include own functions
        l_text = 'My Button'.
        l_icon = icon_complete.
        try.
          lr_functions->add_function(
            name     = 'MYFUNCTION'
            icon     = l_icon
            text     = l_text
            tooltip  = l_text
            position = if_salv_c_function_position=>right_of_salv_functions ).
          catch cx_salv_existing cx_salv_wrong_call.
        endtry.
    To handle the added function, register the event USER_COMMAND.
        data: lr_events type ref to cl_salv_events_table.
        lr_events = gr_table->get_event( ).
        create object gr_events.
        set handler gr_events->on_user_command for lr_events.
    Event handler class
    class lcl_handle_events definition.
      public section.
        methods:
          on_user_command for event added_function of cl_salv_events
            importing e_salv_function.
    endclass.                    "lcl_handle_events DEFINITION
    class lcl_handle_events implementation.
      method on_user_command.
        perform show_function_info using e_salv_function text-i08.
      endmethod.                    "on_user_command
    endclass.                    "lcl_handle_events IMPLEMENTATION
    Check program SALV_DEMO_TABLE_FUNCTIONS for more information.
    Regards,
    Naimesh Patel

  • ABAP Object Event

    Hi All,
          Could anybody send me a document for ABAP Object events.
    And simple programs for Events.
    My id - [email protected]
    Thanks,
    Ponraj.s.

    Hi,
    Go thru this basic simple program with documentation which demonstrates how to handle events, for nodes in a tree using abap objects
    REPORT  YLIST_TREE MESSAGE-ID ZER_INFO.
    CLASS LCL_EVT_HDLR DEFINITION DEFERRED. " definition is given later
    CLASS CL_GUI_CFW DEFINITION LOAD. " global class to be loaded
    DATA:G_EVENT(50),    " to hold the event
         G_NODE_KEY TYPE TV_NODEKEY,  "holds the node key
         G_ITEM_NAME TYPE TV_ITMNAME,
         G_KEY TYPE TV_ITMNAME.
    DATA:G_EVT_HDLR TYPE REF TO LCL_EVT_HDLR,
         G_CUSTOM_CONTAINER TYPE REF TO CL_GUI_CUSTOM_CONTAINER,
         G_TREE TYPE REF TO CL_GUI_LIST_TREE,
         G_OK_CODE TYPE SY-UCOMM.
    TYPES:ITEM_TABLE_TYPE LIKE STANDARD TABLE OF MTREEITM
          WITH DEFAULT KEY.
          CLASS lcl_evt_hdlr DEFINITION
    CLASS LCL_EVT_HDLR DEFINITION.
      PUBLIC SECTION.
        METHODS:
    *---- methods for action handling for nodes
        NODE_DBL_CLK
         FOR EVENT NODE_DOUBLE_CLICK
         OF CL_GUI_LIST_TREE
         IMPORTING NODE_KEY,
        HANDLE_NODE_KEY_PRESS
         FOR EVENT NODE_KEYPRESS
         OF CL_GUI_LIST_TREE
         IMPORTING NODE_KEY KEY,
    *---- methods for action handling for Items
        ITEM_DBL_CLK
         FOR EVENT ITEM_DOUBLE_CLICK
         OF CL_GUI_LIST_TREE
         IMPORTING NODE_KEY ITEM_NAME,
        HANDLE_ITEM_KEY_PRESS
         FOR EVENT ITEM_KEYPRESS
         OF CL_GUI_LIST_TREE
         IMPORTING NODE_KEY ITEM_NAME KEY,
    *---- Common methods for action handling
    HANDLE_RIGHT_CLICK
      FOR EVENT RIGHT_CLICK
      OF CL_GUI_LIST_TREE,
        HANDLE_EXPAND_NO_CHILDREN
         FOR EVENT EXPAND_NO_CHILDREN
         OF CL_GUI_LIST_TREE
         IMPORTING NODE_KEY.
    ENDCLASS.                    "lcl_evt_hdlr DEFINITION
          CLASS lcl_evt_hdlr IMPLEMENTATION
    CLASS LCL_EVT_HDLR IMPLEMENTATION.
      METHOD NODE_DBL_CLK.
      this method handles the node double click event of the tree control
      and shows the key of the double clicked node in a dynpro field
        G_EVENT = 'NODE_DOUBLE_CLICK'.
        G_NODE_KEY = NODE_KEY.
        G_ITEM_NAME = ' '.
      ENDMETHOD.                    "node_dbl_clk
      METHOD ITEM_DBL_CLK.
        G_EVENT = 'ITEM_DOUBLE_CLICK'.
        G_NODE_KEY = NODE_KEY.
        G_ITEM_NAME = ITEM_NAME.
      ENDMETHOD.                    "ITEM_DBL_CLK
      METHOD HANDLE_NODE_KEY_PRESS.
        G_EVENT = 'NODE_KEYPRESS'.
        G_NODE_KEY = NODE_KEY.
        G_ITEM_NAME = ' '.
        G_KEY = KEY.
      ENDMETHOD.                    "HANDLE_NODE_KEY_PRESS
      METHOD HANDLE_ITEM_KEY_PRESS.
        G_EVENT = 'ITEM_KEYPRESS'.
        G_NODE_KEY = NODE_KEY.
        G_ITEM_NAME = ITEM_NAME.
        G_KEY = KEY.
      ENDMETHOD.                    "HANDLE_ITEM_KEY_PRESS
    METHOD HANDLE_RIGHT_CLICK.
       G_EVENT = 'RIGHT_CLICK'.
    ENDMETHOD.                    "handle_right_click
      METHOD HANDLE_EXPAND_NO_CHILDREN.
        G_EVENT = 'EXPAND_NO_CHILDREN'.
        G_NODE_KEY = NODE_KEY.
      ENDMETHOD.                    "handle_EXPAND_NO_CHILDREN
    ENDCLASS.                    "lcl_evt_hdlr IMPLEMENTATION
    *------   start-of-selection.
    START-OF-SELECTION.
    *data:  G_EVT_HDLR TYPE REF TO LCL_EVT_HDLR.
      CREATE OBJECT G_EVT_HDLR. "create an object for the class lcl_evt_hdlr
      SET SCREEN 100.
    MODULE pbo_100 OUTPUT
    MODULE PBO_100 OUTPUT.
      SET PF-STATUS 'BUT'.
      IF G_TREE IS INITIAL.
      the tree control has not yet been created
    create a tree control and insert nodes into it.
        PERFORM CREATE_AND_INIT_TREE.
      ENDIF.
    ENDMODULE.                    "pbo_100 OUTPUT
    MODULE pai_100 INPUT
    MODULE PAI_100 INPUT.
      DATA:RETURN_CODE TYPE I.
    CL_GUI_CFW=>DISPATCH must be called if events are registered
    that trigger PAI
    this method calls the event handler method of an event
      CALL METHOD CL_GUI_CFW=>DISPATCH
        IMPORTING
          RETURN_CODE = RETURN_CODE.
      IF RETURN_CODE <> CL_GUI_CFW=>RC_NOEVENT.
        " a control event occured => exit PAI
        CLEAR G_OK_CODE.
        EXIT.
      ENDIF.
    *at user-command.
    g_ok_code = sy-ucomm.
      CASE G_OK_CODE.
        WHEN 'BACK'. " Finish program
          IF NOT G_CUSTOM_CONTAINER IS INITIAL.
            " destroy tree container (detroys contained tree control, too)
            CALL METHOD G_CUSTOM_CONTAINER->FREE
              EXCEPTIONS
                CNTL_SYSTEM_ERROR = 1
                CNTL_ERROR        = 2.
            IF SY-SUBRC <> 0.
              MESSAGE A000.
            ENDIF.
            CLEAR G_CUSTOM_CONTAINER.
            CLEAR G_TREE.
          ENDIF.
          LEAVE PROGRAM.
      ENDCASE.
    CAUTION: clear ok code!
      CLEAR G_OK_CODE.
    ENDMODULE.                    "pai_100 INPUT
    *&      Form  create_and_init_tree
          text
    -->  p1        text
    <--  p2        text
    FORM CREATE_AND_INIT_TREE .
      DATA:NODE_TABLE TYPE TREEV_NTAB,
           ITEM_TABLE TYPE ITEM_TABLE_TYPE,
           EVENTS TYPE CNTL_SIMPLE_EVENTS,
           EVENT TYPE CNTL_SIMPLE_EVENT.
      create a container for the tree control.
      CREATE OBJECT G_CUSTOM_CONTAINER
       EXPORTING
        the container is linked to the custom control with the
        name 'TREE_CONTAINER' on the dynpro
         CONTAINER_NAME = 'TREE_CONTAINER'
       EXCEPTIONS
          CNTL_ERROR = 1
          CNTL_SYSTEM_ERROR = 2
          CREATE_ERROR = 3
          LIFETIME_ERROR = 4
          LIFETIME_DYNPRO_DYNPRO_LINK = 5.
      IF SY-SUBRC <> 0.
        MESSAGE A000.
      ENDIF.
      create a list tree control
      CREATE OBJECT G_TREE
       EXPORTING
        PARENT = G_CUSTOM_CONTAINER
        NODE_SELECTION_MODE = CL_GUI_LIST_TREE=>NODE_SEL_MODE_SINGLE
        ITEM_SELECTION = 'X'
        WITH_HEADERS = ' '
       EXCEPTIONS
        CNTL_SYSTEM_ERROR           = 1
         CREATE_ERROR                = 2
         FAILED                      = 3
         ILLEGAL_NODE_SELECTION_MODE = 4
         LIFETIME_ERROR              = 5.
      IF SY-SUBRC <> 0.
        MESSAGE A000.
      ENDIF.
    *------- KEY = enter
      CALL METHOD G_TREE->ADD_KEY_STROKE
        EXPORTING
          KEY               = CL_TREE_CONTROL_BASE=>KEY_ENTER
        EXCEPTIONS
          FAILED            = 1
          ILLEGAL_KEY       = 2
          CNTL_SYSTEM_ERROR = 3.
      IF SY-SUBRC <> 0.
        MESSAGE W006 WITH 'ADD_KEY_STROKE'.
      ENDIF.
       define the events which will be passed to the backend
    node double click
      EVENT-EVENTID = CL_GUI_LIST_TREE=>EVENTID_NODE_DOUBLE_CLICK.
      EVENT-APPL_EVENT = 'X'.
      APPEND EVENT TO EVENTS.
      EVENT-EVENTID = CL_GUI_LIST_TREE=>EVENTID_ITEM_DOUBLE_CLICK.
      EVENT-APPL_EVENT = 'X'.
      APPEND EVENT TO EVENTS.
      EVENT-EVENTID = CL_GUI_LIST_TREE=>EVENTID_NODE_KEYPRESS.
      EVENT-APPL_EVENT = 'X'.
      APPEND EVENT TO EVENTS.
      EVENT-EVENTID = CL_GUI_LIST_TREE=>EVENTID_ITEM_KEYPRESS.
      EVENT-APPL_EVENT = 'X'.
      APPEND EVENT TO EVENTS.
    EVENT-EVENTID = LCL_EVT_HDLR=>EVENT_RIGHT_CLICK.
    EVENT-APPL_EVENT = 'X'.
    APPEND EVENT TO EVENTS.
      EVENT-EVENTID = CL_GUI_LIST_TREE=>EVENTID_EXPAND_NO_CHILDREN.
      EVENT-APPL_EVENT = 'X'.
      APPEND EVENT TO EVENTS.
    *------ register the events
      CALL METHOD G_TREE->SET_REGISTERED_EVENTS
        EXPORTING
          EVENTS                    = EVENTS
        EXCEPTIONS
          CNTL_ERROR                = 1
          CNTL_SYSTEM_ERROR         = 2
          ILLEGAL_EVENT_COMBINATION = 3.
      IF SY-SUBRC <> 0.
        MESSAGE A000.
      ENDIF.
    assign event handlers in the application class to each desired events
      SET HANDLER G_EVT_HDLR->NODE_DBL_CLK FOR G_TREE.
      SET HANDLER G_EVT_HDLR->ITEM_DBL_CLK FOR G_TREE.
      SET HANDLER G_EVT_HDLR->HANDLE_NODE_KEY_PRESS FOR G_TREE.
      SET HANDLER G_EVT_HDLR->HANDLE_ITEM_KEY_PRESS FOR G_TREE.
    SET HANDLER G_EVT_HDLR->HANDLE_RIGHT_CLICK FOR G_TREE.
      SET HANDLER G_EVT_HDLR->HANDLE_EXPAND_NO_CHILDREN FOR G_TREE.
    add some nodes to the tree control
      PERFORM BUILD_NODE_AND_ITEM_TABLE USING NODE_TABLE ITEM_TABLE.
      CALL METHOD G_TREE->ADD_NODES_AND_ITEMS
        EXPORTING
          NODE_TABLE                     = NODE_TABLE
          ITEM_TABLE                     = ITEM_TABLE
          ITEM_TABLE_STRUCTURE_NAME      = 'mtreeitm'
        EXCEPTIONS
          FAILED                         = 1
          CNTL_SYSTEM_ERROR              = 3
          ERROR_IN_TABLES                = 4
          DP_ERROR                       = 5
          TABLE_STRUCTURE_NAME_NOT_FOUND = 6.
      IF SY-SUBRC <> 0.
        MESSAGE A000.
      ENDIF.
    ENDFORM.                    " create_and_init_tree
    *&      Form  build_node_and_item_table
          text
         -->P_NODE_TABLE  text
         -->P_ITEM_TABLE  text
    FORM BUILD_NODE_AND_ITEM_TABLE  USING
              NODE_TABLE TYPE TREEV_NTAB
              ITEM_TABLE TYPE ITEM_TABLE_TYPE.
      DATA:NODE TYPE TREEV_NODE,
           ITEM TYPE MTREEITM.
    build the node table
    node with key 'root'.
      CLEAR NODE.
      NODE-NODE_KEY = 'Root'.  " key of the node
      CLEAR NODE-RELATKEY.    " root node has no parent node
      CLEAR NODE-RELATSHIP.
      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.    " the width of the item is adjusted to its "
      " content (text)
      APPEND NODE TO NODE_TABLE.
    node with key 'child1'.
      CLEAR NODE.
      NODE-NODE_KEY = 'Child1'. "key of the node
      NODE-RELATKEY = 'Root'.
      NODE-RELATSHIP = CL_GUI_LIST_TREE=>RELAT_LAST_CHILD.
      NODE-ISFOLDER = 'X'.
      APPEND NODE TO NODE_TABLE.
    node with key 'Subchild1' for child1.
      CLEAR NODE.
      NODE-NODE_KEY = 'SubChild1'.
      NODE-RELATKEY = 'Child1'.
      NODE-RELATSHIP = CL_GUI_LIST_TREE=>RELAT_LAST_CHILD.
      NODE-ISFOLDER = 'X'.
      APPEND NODE TO NODE_TABLE.
    node with key 'subchild2' for child1.
      CLEAR NODE.
      NODE-NODE_KEY = 'SubChild2'.
      NODE-RELATKEY = 'Child1'.
      NODE-RELATSHIP = CL_GUI_LIST_TREE=>RELAT_LAST_CHILD.
      APPEND NODE TO NODE_TABLE.
    node with key 'subchild3' for child1.
      CLEAR NODE.
      NODE-NODE_KEY = 'SubChild3'.
      NODE-RELATKEY = 'Child1'.
      NODE-RELATSHIP = CL_GUI_LIST_TREE=>RELAT_LAST_CHILD.
      APPEND NODE TO NODE_TABLE.
    node with key 'child2'.
      CLEAR NODE.
      NODE-NODE_KEY = 'Child2'. "key of the node
      NODE-RELATKEY = 'Root'.
      NODE-RELATSHIP = CL_GUI_LIST_TREE=>RELAT_LAST_CHILD.
      NODE-ISFOLDER = 'X'.
      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_nc is
      " fired. The programmerr can
      " add the children of the
      " node within the event handler of the expand_nc
      " event  (see callback handle_expand_nc).
      APPEND NODE TO NODE_TABLE.
    items of the nodes
    item with key 'root'.
      CLEAR ITEM.
      ITEM-NODE_KEY = 'Root'.
      ITEM-ITEM_NAME = '1'.
      ITEM-CLASS = CL_GUI_LIST_TREE=>ITEM_CLASS_TEXT. " text item
      ITEM-ALIGNMENT = CL_GUI_LIST_TREE=>ALIGN_AUTO. "the width of the item
      "is adjusted to its content
      ITEM-FONT = CL_GUI_LIST_TREE=>ITEM_FONT_PROP. "use proportional font
      " for the item
      ITEM-TEXT = 'object'.
      APPEND ITEM TO ITEM_TABLE.
    item with key 'child1'.
      CLEAR ITEM.
      ITEM-NODE_KEY = 'Child1'.
      ITEM-ITEM_NAME = '11'.
      ITEM-CLASS = CL_GUI_LIST_TREE=>ITEM_CLASS_TEXT.
      ITEM-ALIGNMENT = CL_GUI_LIST_TREE=>ALIGN_AUTO.
      ITEM-FONT = CL_GUI_LIST_TREE=>ITEM_FONT_PROP.
      ITEM-TEXT = 'dynpros'.
      APPEND ITEM TO ITEM_TABLE.
    item with key 'child2'.
      CLEAR ITEM.
      ITEM-NODE_KEY = 'Child2'.
      ITEM-ITEM_NAME = '12'.
      ITEM-CLASS = CL_GUI_LIST_TREE=>ITEM_CLASS_TEXT.
      ITEM-ALIGNMENT = CL_GUI_LIST_TREE=>ALIGN_AUTO.
      ITEM-FONT = CL_GUI_LIST_TREE=>ITEM_FONT_PROP.
      ITEM-TEXT = 'programme'.
      APPEND ITEM TO ITEM_TABLE.
    items of node  with key 'Subchild1'.
      CLEAR ITEM.
      ITEM-NODE_KEY = 'SubChild1'.
      ITEM-ITEM_NAME = '111'.
      ITEM-CLASS = CL_GUI_LIST_TREE=>ITEM_CLASS_TEXT.
      ITEM-LENGTH = 11.
      ITEM-TEXT = 'include'.
      APPEND ITEM TO ITEM_TABLE.
    items of node with key 'SubChild2'.
      CLEAR ITEM.
      ITEM-NODE_KEY = 'SubChild2'.
      ITEM-ITEM_NAME = '112'.
      ITEM-CLASS = CL_GUI_LIST_TREE=>ITEM_CLASS_TEXT.
      ITEM-LENGTH = 4.  " the width of the item is 4 chars
      ITEM-IGNOREIMAG = 'X'.  " see documentation of structure treev_item
      ITEM-USEBGCOLOR = 'X'.
      ITEM-T_IMAGE = '@01@'.
      APPEND ITEM TO ITEM_TABLE.
      CLEAR ITEM.
      ITEM-NODE_KEY = 'SubChild2'.
      ITEM-ITEM_NAME = '113'.
      ITEM-CLASS = CL_GUI_LIST_TREE=>ITEM_CLASS_TEXT.
      ITEM-LENGTH = 4.  " the width of the item is 4 chars
      ITEM-USEBGCOLOR = 'X'.
      ITEM-TEXT = '0100'.
      APPEND ITEM TO ITEM_TABLE.
      CLEAR ITEM.
      ITEM-NODE_KEY = 'SubChild2'.
      ITEM-ITEM_NAME = '114'.
      ITEM-CLASS = CL_GUI_LIST_TREE=>ITEM_CLASS_TEXT.
      ITEM-LENGTH = 11.
      ITEM-USEBGCOLOR = 'X'.
      ITEM-TEXT = ' mueller'.
      APPEND ITEM TO ITEM_TABLE.
      CLEAR ITEM.
      ITEM-NODE_KEY = 'SubChild2'.
      ITEM-ITEM_NAME = '115'.
      ITEM-CLASS = CL_GUI_LIST_TREE=>ITEM_CLASS_TEXT.
      ITEM-ALIGNMENT = CL_GUI_LIST_TREE=>ALIGN_AUTO.
      ITEM-FONT = CL_GUI_LIST_TREE=>ITEM_FONT_PROP.
      ITEM-TEXT = ' comment to dynpro 100'.
      APPEND ITEM TO ITEM_TABLE.
    items of node with key 'SubChild3'.
      CLEAR ITEM.
      ITEM-NODE_KEY = 'SubChild3'.
      ITEM-ITEM_NAME = '121'.
      ITEM-CLASS = CL_GUI_LIST_TREE=>ITEM_CLASS_TEXT.
      ITEM-LENGTH = 20.
      ITEM-IGNOREIMAG = 'X'.
      ITEM-USEBGCOLOR = 'X'.
      ITEM-T_IMAGE = '@02@'.
      ITEM-TEXT = '  0200 harryhirsch'.
      APPEND ITEM TO ITEM_TABLE.
      CLEAR ITEM.
      ITEM-NODE_KEY = 'SubChild3'.
      ITEM-ITEM_NAME = '122'.
      ITEM-CLASS = CL_GUI_LIST_TREE=>ITEM_CLASS_TEXT.
      ITEM-ALIGNMENT = CL_GUI_LIST_TREE=>ALIGN_AUTO.
      ITEM-FONT = CL_GUI_LIST_TREE=>ITEM_FONT_PROP.
      ITEM-TEXT = ' comment to dynpro 200'.
      APPEND ITEM TO ITEM_TABLE.
    ENDFORM.                    " build_node_and_item_table
    also i have sent a material to ur id
    I hope you will get a clear idea on events
    Regards,
    Sowjanya

  • Summing up a Column in ALV report

    Hi All,
    I have developed an ALV Report which will display Invoices and other details.
    Now i need to display the sum of NETWR column, if user wish to select that column and click the "SUM" icon.
    As of now, if i select the NETWR column and click 'SUM" column, i am getting Runtime error.
    How to resolve this issue?
    Regards
    Pavan

    Hi Pavan,
    ALV GRID CONTROL:
    This task is performed by the SAP Control Framework.
    The R/3 System allows you to create custom controls using ABAP Objects. The application server is the Automation Client, which drives the custom controls (automation server) at the front end.
    If custom controls are to be included on the frontend, then the SAPGUI acts as a container for them.
    Custom controls can be ActiveX Controls or JavaBeans.
    The system has to use a Remote Function Call (RFC) to transfer methods for creating and using a control to the front end.
    ABAP objects are used to implement the controls in programs.
    An SAP Container can contain other controls (for example, SAP ALV Grid Control, Tree Control, SAP Picture Control, SAP Splitter Control, and so on). It administers these controls logically in one collection and provides a physical area for the display.
    Every control exists in a container. Since containers are themselves controls, they can be nested within one another. The container becomes the parent of its control. SAP containers are divided into five groups:
    SAP custom container: Displays within an area defined in Screen Painter on screens or sub screens.
    Class: CL_GUI_CUSTOM_CONTAINER
    SAP dialog box container: Displays in a modeless dialog box or as a full screen. Class:
    CL_GUI_DIALOGBOX_CONTAINER
    SAP docking container: Displays as docked, resizable sub-window with the option of displaying it as a modeless dialog box. Class: CL_GUI_DOCKING_CONTAINER
    SAP splitter container: Displays and groups several controls in one area - that is, splits the area into cells Class: CL_GUI_SPLITTER_CONTAINER
    SAP easy splitter container: Displays controls in two cells, which the user can resize using a split bar. Class: CL_GUI_EASY_SPLITTER_CONTAINER.
    In the control, you can adjust the column width by dragging, or use the 'Optimum width' function to adjust the column width to the data currently displayed. You can also change the column sequence by selecting a column and dragging it to a new position.
    Standard functions are available in the control toolbar. The details display displays the fields in the line on which the cursor is positioned in a modal dialog box.
    The sort function in the ALV Control is available for as many columns as required. You can set complex sort criteria and sort columns in either ascending or descending order.
    You can use the 'Search' function to search for a string (generic search without *) within a selected area by line or column.
    You can use the 'Sum' function to create totals for one or more numeric columns. You can then use the "Subtotals" function to set up control level lists: You can use the 'Subtotal' function to structure control level lists: select the columns (non-numeric columns only) that you want to use and the corresponding control level totals are displayed.
    For 'Print' and 'Download' the whole list is always processed, not just the sections displayed on the screen.
    You can define display variants to meet your own specific requirements. For information on saving variants, see 'Advanced Techniques'.
    The ALV grid control is a generic tool for displaying lists in screens. The control offers standard functions such as sorting by any column, adding numeric columns, and fixed lead columns .
    Data collection is performed in the program (with SELECT statements, for example) or by using a logical database. The data records are saved in an internal table and passed on to the ALV control along with a field description.
    The field description contains information about the characteristics of each column, such as the column header and output length. This information can defined either globally in the Dictionary (structure in the Dictionary) or in the field catalog in the program itself. You can also merge both techniques.
    The ALV link is a standard function of Query and QuickViewer. If multiline queries or Quick View lists have been defined, they will automatically be compressed to a single line and output in the ALV control as a long, single line list.
    Use Screen Painter to create a sub screen container for the ALV grid control. The control requires an area where it can be displayed in the screen. You have to create a container control that determines this area.
    Use the corresponding icon in the Screen Painter layout to create the container control. The size of area "MY_CONTROL_AREA" determines the subsequent size of the ALV control.
    The valid GUI status must be set at the PBO event in the flow logic of the ALV subscreen container.
    The OK_CODE processing for the cancel functions must be programmed at the PAI event.
    The reference variables for the custom container and the ALV grid control must be declared.
    To create reference variables, use ABAP statement TYPE REF TO .
    The global classes you need to do this are called cl_gui_custom_container (for the custom container control) and cl_gui_alv_grid (for the ALV grid control).
    The global classes are defined in the Class Builder. You can use the Class Builder to display information for the methods, their parameters, exceptions, and so on.
    Use ABAP statement CREATE OBJECT to create the objects for the container and the ALV control. Objects Are instances of a class.
    When an object is created (CREATE), method CONSTRUCTOR of the corresponding class is executed. The parameters of method CONSTRUCTOR determine which parameters have to be supplied with data when the object is created. In the above example, object alv_grid is given the name of the container control (g_custom_container) in exporting parameter i_parent, which links the two controls. For information on which parameters method CONSTRUCTOR possesses and which of these parameters are required, see the Class Builder.
    Objects should only be created once during the program. To ensure that this is the case, enclose the CREATE OBJECT statement(s) in an IF IS INITIAL. ... ENDIF clause. The objects must be generated before the control is displayed for the first time - that is, during the PBO event of the ALV subscreen container.
    To display the requested dataset in the ALV control, the data must be passed on to the control as an internal table, and a field description must exist indicating the order in which the columns will be output.
    In the simplest case, the field description can use a structure from the Dictionary. The Dictionary also determines the technical field attributes like type and length, as well as the semantic attributes like short and long texts. The ALV control uses this information to determine the column widths and headers. The column sequence is determined by the field sequence in the structure.
    If no suitable structure is active in the Dictionary, or you want to output internal program fields in the control, then you will have to define information like the output length and column header in the field catalog.
    In a typical program run, the dataset is read first (SELECT ....), the internal table is filled with the data to display (... INTO TABLE ...), and ABAP statement CALL SCREEN is then used to call the ALV sub screen container.
    The data transfer to the ALV control takes place during the call of method
    set_table_for_first_display from class cl_gui_alv_grid. The method call must be programmed at the PBO event of the ALV subscreen container.
    The name of the Dictionary structure that supplies the field description is specified in exporting parameter i_structure_name. The name of the internal table that contains the data records to display is specified in changing parameter it_outtab.
    The field description for the ALV control can be ta ken from an active Dictionary structure (fully automatic), by passing a field catalog (manual), or through a mixture of the two options (merge).
    The field catalog is in internal table with type lvc_t_fcat. This type is defined globally in the Dictionary.
    Each line in the field catalog table corresponds to a column in the ALV control.
    The field characteristics (= column characteristics) are defined in the field catalog. The field catalog is in internal table with type lvc_t_fcat. Each line that is explicitly described in the ALV control corresponds to a column in the field catalog table.
    The link to the data records to output that are saved in internal table is established through field name . This name must be specified in column "fieldname" in the field catalog.
    This field can be classified through a Dictionary reference (ref_table and ref_field) or by specifying an ABAP data type (inttype).
    Column headers and field names in the detail view of an ALV control line can be determined in the field catalog in coltext and seltext, respectively.
    The position of a field during output can be determined with col_pos in the field catalog.
    If you want to hide a column, fill field no_out with an "X" in the field catalog. Hidden fields can be displayed again in a user display variant.
    Icons can be displayed in the ALV control. If you want a column to be interpreted as an icon, then the icon name must be known to the program (include .) and icon = "X" must be specified for this column in the field catalog.
    The above example shows a semi-automatic field description: Part of the field description comes from the Dictionary structure (sflight), while another part is explicitly defined in the field catalog (gt_fieldcat).
    The field catalog (internal table) is filled in the program and is passed on together with the name of the Dictionary structure during the method call. The information is merged accordingly in method set_table_for_first_display.
    For a user to save display variants, parameters is_variant and i_save must be passed on during method call set_table_for_first_screen. To assign display variants uniquely to a program, at least the program name must be supplied in the transferred structure (gs_variant).
    Program names can be up to 30 characters long.
    If you only pass on the current parameters for is_variant, then existing variants can be loaded, but no new ones can be saved. If you use parameter i_save, you must pass on a variant structure with is_variant.
    I_SAVE = SPACE No variants can be saved.
    I_SAVE = 'U' The user can only save user-specific variants.
    I_SAVE = 'X' The user can only save general (shared) variants.
    I_SAVE = 'A' The user can save both user-specific and general (shared) variants.
    You can use parameter is_layout of method set_table_for_first_display, for example, to define the header in the ALV control and the detail display.
    To do this, define a query area in the program in accordance with Dictionary structure lvc_s_layo, and pass on the text to display in field -grid_title or -detailtitl.
    If you want to create print lists with zebra stripes, set field -zebra to "X". You can display a print preview for print lists by requesting standard function "Print".
    All parameters of method SET_TABLE_FOR_FIRST_DISPLAY from global class
    CL_GUI_ALV_GRID are defined in the Class Builder.
    Events are defined in global class cl_gui_alv_grid; you can use these events to implement user interaction within the program. To respond to a double -click on a table line, you must respond to event DOUBLE_CLICK.
    You receive control in the program, allowing you to implement interactive reporting - such as a full screen details list. The events for cl_gui_alv_grid are located in the Class Builder.
    To define an implement a local class in the program, you use a handler method. In this handler method, you program the functionality to trigger by a double -click in the output table.
    To activate a handler method at runtime, a class or an object from that class registers itself with an event using command SET HANDLER. The names of the IMPORTING parameters in the handler method correspond to the names of the EXPORTING parameters of the related event.
    In the above example, the local class is LCL_ILS and the handler method is ON_DBLCLICK. An object - ALV_DBLCLICK - is created and registers itself for event DOUBLE_CLICK.
    You can query parameter e_row-index to determine which output line was requested by the double -click. This parameter corresponds to the line number of the output table (internal table with the data records to output). If you need information for the selected line, you have to read it with READ TABLE itab INDEX e_row-index.
    This subsequent read in the output table generally corresponds to the HIDE area in conventional reporting. You first have to make sure that the user has double -clicked a line in the output table (similar to the valid line selection with the HIDE technique).
    A field group can contain global data objects, but not data objects that have been defined locally in a subroutine or function module.
    You can use INSERT to specify both fields and field symbols. This makes it possible to dynamically insert a data object referred to by a field symbol into a field group at runtime. Any field symbols that have not been assigned are ignored, which means no new field is inserted into the field group.
    The EXTRACT statement writes all the fields of a field group as one record to a sequential dataset (transport takes place with similarly named fields). If a HEADER field group is defined, then its fields are placed ahead of each record as sort keys. You can then sort the dataset with SORT and process it with LOOP ...ENDLOOP. In this case, no further EXTRACT is possible.
    The INSERT statement is not a declarative statement: This means field groups can also be expanded in the program flow section.
    As soon as the first dataset of a field group has been extracted with EXTRACT, that field group can no longer be expanded with INSERT. In particular, the HEADER field group cannot be expanded after the first EXTRACT (regardless of the field group).
    When the GET events are processed, the logical database automatically writes hexadecimal zeros in all the fields of a node when it returns to an upper-level node in the hierarchy. Since the HEADER normally contains sort fields for all field groups, these hexadecimal zeros in the HEADER serve as a type of hierarchy key: The more zeros there are, the further up in the control level hierarchy you go.
    &#61550;&#61472;The SORT statement sorts the extract dataset in accordance with the defined field sequence in field group HEADER. The addition BY ... sets a new sort key.
    Each must be either a field of field group HEADER or a field group that consists only of fields of the field group HEADER. You can use the additions ASCENDING and DESCENDING to determine whether the fields are sorted in ascending (default) or descending order.
    Fields containing X'00' in the logical databases are always displayed before all other values during a SORT.
    Processing of an extract dataset always takes places within a LOOP. The contents of the extract dataset field are placed in program fields with the same names.
    The group change always involves the fields of the HEADER. Single record processing for extract datasets is performed using language element AT ( = field group).
    CNT() is not a statement, but instead a field that is automatically create d and filled when is a non-numeric field from field group HEADER and is part of the sort key. At the end of the group, CNT() contains the number of different values that the field recorded in this group level.
    SUM() is not a statement, but instead a field that is automatically created and filled when is a numeric field of an extract dataset. At the end of the group, SUM() contains the control total of field .
    *** and CNT are only available at the end of the group level or at AT LAST.
    Single record processing for extract datasets AT WITH is only performed when field group is immediately followed by field group in the temporary dataset.
    Loops over an extract dataset cannot be nested. However, several contiguous loops are permitted.
    The sequence of the control level changes within the LOOP must correspond to the sort sequence.
    Totals can only be calculated within control footer processing.
    Extracts allow only appends (EXTRACT), sorting (SORT) and sequential processing (LOOP).
    Once a SORT or LOOP has occurred, the intermediate dataset is frozen and cannot be expanded with EXTRACT. Operations that insert into or delete from EXTRACT datasets are not supported.
    Extracts allow for several record types (FIELD-GROUPS) with fields that can be set dynamically (INSERT is not a declarative statement!). Internal tables have a single, statically-defined line type.
    Internal tables use the sequence of table fields according to the declaration for the hierarchy of the control leve l. The control level structure for internal tables is therefore static, and is independent of which criteria were used to sort the internal table.
    Extracts do not depend on the field sequence for control level processing: a re-sort or a completely different control level process can take place. The control level structure for extract datasets is therefore dynamic. It corresponds exactly to the sort key of the extract dataset. The sort key is the sequence of fields from the field group HEADER, and is used to sort the extract dataset.
    Extracts rely on the compiler to determine which combinations of group levels and a cumulating field the control level totals desire. The desired control level totals are determined by the processing of LOOP ... ENDLOOP blocks. Internal tables build the control level total with the SUM statement.
    This procedure leads to high resource depletion for totaling control levels in internal tables.
    Regards,
    Chandru

  • Date validation in ALV Grid output

    Hi Experts,
    I have created an OOP ALV output. There are a couple of date fields on the report output which are editable. I have referred the standard DATS type and hence I ma getting F4 help for date on the report output.
    Now, If the user enters an invalid date manually (without F4), the CHECK_CHANGED_DATA method of the CL_GUI_ALV_GRID does not read this invalid value and hence I am not able to validate the date.
    I do not want to create a custom search help for date.
    Please suggest how to validate the date in this case.
    Thanks.
    Regards,
    Rudresh

    Hi Rudresh,
    In PBO module, set handler for event 'DATA_CAHNGED'
    In PAI module always call 'check_changed_data( )' after a custom button click like below.
    Inside handler method of event 'DATA_CAHNGED' do validation for date.
    *PBO
    module status_0100 output.
    *Setting handler for event data_changed
            set handler g_o_main->data_changed for g_o_grid.
    endmodule.  
    *PAI
    module user_command_0100 input.
      clear: ok_code.
      ok_code = sy-ucomm.
      case ok_code.
        when 'SAVE'.  " Function code of ur custom button
          g_o_grid->check_changed_data( ).  " Raises event 'DATA_CAHNGED'
    endmodule. 
    *Class method
    method data_changed. " Handler method
    " Use table        er_data_changed->mt_good_cells[]  or er_data_changed->mt_mod_cells to get entered date
      endmethod.
    Thanks
    Edited by: Sap Fan on Sep 29, 2009 8:51 AM
    Edited by: Sap Fan on Sep 29, 2009 9:46 AM

  • Issue in alv oops report

    hi all,
    i have requirement to d update , delete  and insert a customized table through report .. i created the report  and able to insert the record and delete , the fields displayed in the report output  are  order number, description and functional location in the report output . the order number  is editable field .
    my issue when we enter any order in new row i want to display the other fields automatically when we press enter  key in keyboard..
    Kindly let send the code

    First of all you should have an event handler method for data changed event of cl_gui_alv_grid
    then you will have to use cl_gui_alv_grid->check_changed_data( ) method  for triggering the data changed event
    register the event_enter of grid using
      l_grid->register_edit_event(
          EXPORTING
            i_event_id = cl_gui_alv_grid=>mc_evt_entr ).
    Inside the event handler method you have access er_data_changed .
    then use
      LOOP AT er_data_changed->mt_good_cells INTO l_good.
      er_data_changed->get_cell_value(
                EXPORTING
                    i_row_id = l_good-row_id
                    i_fieldname = 'ORDER'
                   IMPORTING
                     e_value = l_order ) .
    if l_order is not initial.
    select the other field values from l_order
    then use
              er_data_changed->modify_cell(
                           i_row_id    = l_good-row_id
                           i_fieldname = 'DESCRIPTION'
                           i_value     = l_description ).
    endif.

  • Getting Error when createing Table control in Module Pool.

    Hi expert ,
    i am creating a module pool program . i want to crate line item value for that i have created table control  on screen 200 .
    but when i am activation to that giving error below mention.
    The field "ZFBDCHALLAN-EBELN" is not assigned to a loop. "LOOP ...ENDLOOP" must appear in "PBO" and "PAI".
    thanks
    chandra

    Its mandatory to have loop endloop in both events
    PBO and PAI
    loop your internal table similarly.
    Please check it should be below format
    PROCESS BEFORE OUTPUT.
    * Set PF Status for screen 100.
      MODULE status_0200.
    * This module will initialize the field
      MODULE init_0100.
      LOOP AT t_custmat_asg INTO w_custmat_asg
          WITH CONTROL tc_1
          CURSOR tc_1-current_line.
    * It will count the record in internal table
        MODULE set_linecount.
    * Screen Modifications
        MODULE status_check.
      ENDLOOP.
    PROCESS AFTER INPUT.
    * Module AT EXIT-COMMAND
      MODULE exit_0200 AT EXIT-COMMAND.
      LOOP AT t_custmat_asg .
        CHAIN.
          FIELD :
          w_custmat_asg-check,
                  w_custmat_asg-kunnr,
                  w_custmat_asg-name1,
                  w_custmat_asg-asgtyp,
                  w_custmat_asg-productcls,
                  w_custmat_asg-sctegry,
                  w_custmat_asg-ctegry,
                  w_custmat_asg-parent,
                  w_custmat_asg-frmdate,
                  w_custmat_asg-todate,
                  w_custmat_asg-frecster,
                  w_custmat_asg-salesrep,
                  w_custmat_asg-flag,
                  w_custmat_asg-username,
                  w_custmat_asg-udate.
    * Validation For Forecaster.
          MODULE validate_forecaster.
    * Validation For Salesrep.
          MODULE valiate_salesrep.
    * Validation for Customer
          module validate_customer.
    * Validate null value
          module validate_null_vals.
    * Validation For Data Changed On The Screen
          MODULE data_changed_0200 ON CHAIN-REQUEST.
        ENDCHAIN.
      ENDLOOP.
    Regards
    Satish Boguda

Maybe you are looking for

  • Links to PDFs Created with Illustrator Won't Work

    I am using CS3. I create a document in Illustrator, save it as a PDF, and create a link to the PDF either through our website developer or through a newsletter program I am using. If I create the PDF using other programs (such as MSWord or Excel), th

  • Mass Change of Devices

    Dear Experts: Is there any way to mass process several devices in IQ08. I have a bunch of devices for which I would like to enter the same data in a particular field. I cannot find a mass process option. (In the PM module, there is a similar transact

  • Break link to style

    I've just had a situation where the font in a masthead has changed. I am guessing that when the masthead was built, a default paragraph style was in place so that the masthead represented style overrides, and that somehow the overrides have been remo

  • Why can't i chat on whats app, while receiving message it does not appear.

    When I try to open message on whatsapp , it does not open and it goes back to main window. Please guide me. Jaspal

  • FIM 2010 CM deployment for Smart Card Management

    I have FIM installed and was initially getting an Object does not exist on server error whenever i went to Manage Profile Tepmplates or with a user accoutn tried the request a smart card link.. I enabled verbose logging and this is the error Error lo