Reg editing alv in output mode

Hi,
Cud any one let me know how to edit alv ?
im using fcat-edit = 'x' option in function module approach....but even then im not able to edit columns/fields....?
how to edit columns/rows using function modules and OOPs methos in alv????
Thanks
Jay

Hi
i am sending you a code where the output field is edtable in the ALV oop
you can understand very easily
reward if usefull
*& Report  ZAMIT_ALV_OOP_EDITABLE
REPORT  ZAMIT_ALV_OOP_EDITABLE.
*data declaration
DATA: G_CONTROL TYPE REF TO CL_GUI_CUSTOM_CONTAINER,
      G_ALV     TYPE REF TO CL_GUI_ALV_GRID.
DATA: T_FCAT TYPE LVC_T_FCAT,
      WA_FCAT TYPE LVC_S_FCAT.
DATA: I_ZAMIT TYPE TABLE OF ZAMIT_SHIP_TAB WITH HEADER LINE.
DATA: I_INDEX TYPE I.
DATA: G_OK_CODE TYPE SY-UCOMM.
DATA: G_OK_CODE1 TYPE SY-UCOMM.
SELECT * FROM ZAMIT_SHIP_TAB INTO TABLE I_ZAMIT.
CALL SCREEN 9000.
SCREEN FORMS>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
*&      Module  STATUS_9000  OUTPUT
      text
MODULE STATUS_9000 OUTPUT.
  SET PF-STATUS 'PF9001'.
SET TITLEBAR 'xxx'.
ENDMODULE.                 " STATUS_9000  OUTPUT
*&      Module  CREATE_CONTROL  OUTPUT
      text
MODULE CREATE_CONTROL OUTPUT.
  CREATE OBJECT G_CONTROL
    EXPORTING
   PARENT                      =
      CONTAINER_NAME               = 'G_CUSTOM_CONTROL'
   STYLE                       =
   LIFETIME                    = lifetime_default
   REPID                       =
   DYNNR                       =
   NO_AUTODEF_PROGID_DYNNR     =
EXCEPTIONS
   CNTL_ERROR                  = 1
   CNTL_SYSTEM_ERROR           = 2
   CREATE_ERROR                = 3
   LIFETIME_ERROR              = 4
   LIFETIME_DYNPRO_DYNPRO_LINK = 5
   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.
ENDMODULE.                 " CREATE_CONTROL  OUTPUT
*&      Module  CREATE_ALV  OUTPUT
      text
MODULE CREATE_ALV OUTPUT.
  CREATE OBJECT G_ALV
    EXPORTING
   I_SHELLSTYLE      = 0
   I_LIFETIME        =
      I_PARENT          = G_CONTROL
   I_APPL_EVENTS     = space
   I_PARENTDBG       =
   I_APPLOGPARENT    =
   I_GRAPHICSPARENT  =
   I_NAME            =
   I_FCAT_COMPLETE   = SPACE
EXCEPTIONS
   ERROR_CNTL_CREATE = 1
   ERROR_CNTL_INIT   = 2
   ERROR_CNTL_LINK   = 3
   ERROR_DP_CREATE   = 4
   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.
ENDMODULE.                 " CREATE_ALV  OUTPUT
*&      Module  DISPLAY_ALV  OUTPUT
      text
MODULE DISPLAY_ALV OUTPUT.
  PERFORM PREPARE_FIELD_CATALOG.
  CALL METHOD G_ALV->SET_TABLE_FOR_FIRST_DISPLAY
    EXPORTING
   I_BUFFER_ACTIVE               =
   I_BYPASSING_BUFFER            =
   I_CONSISTENCY_CHECK           =
   I_STRUCTURE_NAME              = 'SFLIGHT'
   IS_VARIANT                    =
      I_SAVE                        = 'X'
   I_DEFAULT                     = 'X'
   IS_LAYOUT                     =
   IS_PRINT                      =
   IT_SPECIAL_GROUPS             =
   IT_TOOLBAR_EXCLUDING          = T_TOOLBAR[]
   IT_HYPERLINK                  =
   IT_ALV_GRAPHICS               =
   IT_EXCEPT_QINFO               =
   IR_SALV_ADAPTER               =
      CHANGING
        IT_OUTTAB                     = I_ZAMIT[]
        IT_FIELDCATALOG               = T_FCAT
   IT_SORT                       =
   IT_FILTER                     =
EXCEPTIONS
   INVALID_PARAMETER_COMBINATION = 1
   PROGRAM_ERROR                 = 2
   TOO_MANY_LINES                = 3
   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.
ENDMODULE.                 " DISPLAY_ALV  OUTPUT
*&      Form  PREPARE_FIELD_CATALOG
      text
-->  p1        text
<--  p2        text
FORM PREPARE_FIELD_CATALOG .
  REFRESH T_FCAT.
  CLEAR WA_FCAT.
<b>  WA_FCAT-COL_POS = 1.
  WA_FCAT-COLTEXT = 'SHIPMENT NO.'.
  WA_FCAT-FIELDNAME = 'ZSHIP_NO'.
  WA_FCAT-REF_TABLE = 'I_ZAMIT'.
  WA_FCAT-edit       = 'X'.</b>
  APPEND WA_FCAT TO T_FCAT.
  CLEAR WA_FCAT.
  WA_FCAT-COL_POS = 2.
  WA_FCAT-COLTEXT = 'DOC TYPE'.
  WA_FCAT-FIELDNAME = 'ZDOC_TYP'.
  WA_FCAT-REF_TABLE = 'I_ZAMIT'.
WA_FCAT-KEY       = 'X'.
  APPEND WA_FCAT TO T_FCAT.
  CLEAR WA_FCAT.
  WA_FCAT-COL_POS = 3.
  WA_FCAT-COLTEXT = 'NAME_CR'.
  WA_FCAT-FIELDNAME = 'ZNAME_CR'.
  WA_FCAT-REF_TABLE = 'I_ZAMIT'.
WA_FCAT-KEY       = 'X'.
  APPEND WA_FCAT TO T_FCAT.
  CLEAR WA_FCAT.
  WA_FCAT-COL_POS = 4.
  WA_FCAT-COLTEXT = 'SHIP_TYP'.
  WA_FCAT-FIELDNAME = 'ZSHIP_TYP'.
  WA_FCAT-REF_TABLE = 'I_ZAMIT'.
WA_FCAT-KEY       = 'X'.
  APPEND WA_FCAT TO T_FCAT.
  CLEAR WA_FCAT.
  WA_FCAT-COL_POS = 5.
  WA_FCAT-COLTEXT = 'LEG_IND'.
  WA_FCAT-FIELDNAME = 'ZLEG_IND'.
  WA_FCAT-REF_TABLE = 'I_ZAMIT'.
WA_FCAT-KEY       = 'X'.
  APPEND WA_FCAT TO T_FCAT.
  CLEAR WA_FCAT.
ENDFORM.                    " PREPARE_FIELD_CATALOG
*&      Module  LEAVE  INPUT
      text
MODULE LEAVE INPUT.
  LEAVE PROGRAM.
ENDMODULE.                 " LEAVE  INPUT
*&      Module  USER_COMMAND_9000  INPUT
      text
MODULE USER_COMMAND_9000 INPUT.
  IF G_OK_CODE = 'CHANGE'.
    DATA: VALUE TYPE C,
          COL TYPE I ,
          ROW TYPE LVC_S_ROW,
          COLNO TYPE LVC_S_COL,
          ROWNO TYPE LVC_S_ROID.
    CALL METHOD G_ALV->GET_CURRENT_CELL
     IMPORTING
          E_ROW = I_INDEX
     CALL METHOD G_ALV->GET_CURRENT_CELL
       IMPORTING
         E_ROW     =
              E_VALUE   = VALUE
              E_COL     = COL
              ES_ROW_ID = ROW
              ES_COL_ID = COLNO
              ES_ROW_NO = ROWNO.
    READ TABLE I_ZAMIT  INDEX I_INDEX.
    CALL SCREEN 9001 STARTING AT 10 10 .
  ENDIF.
ENDMODULE.                 " USER_COMMAND_9000  INPUT
*&      Module  STATUS_9001  OUTPUT
      text
MODULE STATUS_9001 OUTPUT.
  SET PF-STATUS 'PF9002'.
SET TITLEBAR 'xxx'.
ENDMODULE.                 " STATUS_9001  OUTPUT
*&      Module  USER_COMMAND_9001  INPUT
      text
MODULE USER_COMMAND_9001 INPUT.
  IF G_OK_CODE1 = 'SAVE'.
    MODIFY ZAMIT_SHIP_TAB FROM I_ZAMIT.
    SELECT * FROM ZAMIT_SHIP_TAB INTO TABLE I_ZAMIT.
    CALL METHOD G_ALV->REFRESH_TABLE_DISPLAY.
    CALL SCREEN 9000.
  ENDIF.
ENDMODULE.                 " USER_COMMAND_9001  INPUT

Similar Messages

  • How can we edit alv report output.

    hi all,
    how can we edit alv report output

    \[removed by moderator as it was just a copy and paste answer of someone else's work without giving a source\]
    Edited by: Jan Stallkamp on Aug 25, 2008 4:35 PM

  • Validation of data in editable ALV report output for particular field

    Hi Experts,
    I have one input enabled field in ALV output. How to validate the data once user enters  in that field and press enter? Is it possible to capture the value, hit the enter after user enters the data?
    Thanks,
    Surya Prakash

    Halo Prakash,
    1 First you should registeer the ENTER Event.
    call method g_grid->register_edit_event
                   exporting
                      i_event_id = cl_gui_alv_grid=>mc_evt_enter.
    2 Declare event handler method for Event data_changed of cl_gui_alv_grid.
    handle_data_changed
             for event data_changed of cl_gui_alv_grid
                 importing er_data_changed.
    3 Inside the Event handler method , you get the event parameter er_data_changed type ref to CL_ALV_CHANGED_DATA_PROTOCOL.
    loop at er_data_changed->mt_good_cells into ls_good.
          case ls_good-fieldname.
            when 'FIELD1'.
              call method check_FIELD1.
            when 'FIELD2 '.
              call method check_FIELD2
          endcase.
        endloop.
    4 Inside the Method check_FIELD1 and check_FIELD2 you can do the validation check .
    call method er_data_changed->get_cell_value( Passing the row no and field name).
    if the check  fails you can use add_protocol_entry to write the error.
    5 Finally call
    er_data_changed->display_protocol.
    Regards
    Arshad

  • Editable field in alv tree output using cl_gui_alv_tree

    Hi,
    i need Editable field with F4 help in alv tree output using cl_gui_alv_tree.
    regards,
    Naresh

    sadly, this is not possible. An ALV Tree cannot by editable.
    Regards

  • Editable field with F4 help in alv tree output using cl_gui_alv_tree

    HI
    i need Editable field with F4 help in alv tree output using cl_gui_alv_tree
    Regards
    Naresh

    Hi Naresh,
    Pass the field catalog with the additional parameter (ls_fcat-edit = 'X'.).
    for F4 help if the data element have the search help it automatically will come. other wise include the additional parameter in the field catalog (ls_fcat-F4AVAILABL = 'X')
    Reward if found helpful.
    Regards,
    Boobalan Suburaj

  • ALV grid disply with edit columns in output

    Hi all,
      i am using   CALL METHOD MY_GRID->SET_TABLE_FOR_FIRST_DISPLAY
    to display the output in alv format.there is  3 edit columns in output display.
       if i fill one field & then put 'ENTER' then other two fields of that row should be filled with the appropriate data from the program.still control should be in output display.
    which method i should use to go inside the program when i put 'ENTER' on any field of ALV output disply & how to use those methods inside the program.
    i need some materials regarding OOPS (class, method ) . now i want to put OOPS concept in alv display.
    correct answers will be rewarded.
    Thanks & regards

    Hi,
    Check,
    OOPS
    http://help.sap.com/saphelp_nw2004s/helpdata/en/ce/b518b6513611d194a50000e8353423/frameset.htm
    ABAP Objects
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/webcontent/uuid/35eaef9c-0b01-0010-dd8b-e3b0f9ed7ccb#section7 [original link is broken]
    check the below links lot of info and examples r there for OOPS
    http://www.sapgenie.com/abap/OO/index.htm
    http://www.geocities.com/victorav15/sapr3/abap_ood.html
    http://www.brabandt.de/html/abap_oo.html
    http://www.sapgenie.com/abap/OO/
    http://www.sapgenie.com/abap/OO/index.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/c3/225b5654f411d194a60000e8353423/content.htm
    http://www.esnips.com/doc/375fff1b-5a62-444d-8ec1-55508c308b17/prefinalppt.ppt
    <b>Reward if helpful.</b>

  • Can we edit alv output list.

    hi happy new year to everybody ......
    can anybody tell me that can we create aditable alv list ...
    how can we.....

    Hi,
    Yes you can create an Editable ALV.
    I am giving you an example of Editable ALV in OOPs.
    Example:
    Take a Custom container in Screen 100 and name it "LIST_AREA".
    REPORT  ZSB_ALV_EDITABLE_SAMPLE.
    TABLES: SFLIGHT.
    DATA: gc_container TYPE scrfname VALUE 'LIST_AREA',
          gc_custom_container TYPE REF TO CL_GUI_CUSTOM_CONTAINER,
          gc_grid      TYPE REF TO CL_GUI_ALV_GRID,
          gs_layout    TYPE LVC_S_LAYO,
          gt_fieldcat  TYPE LVC_T_FCAT.
    DATA: ok_code TYPE SY-UCOMM.
    DATA: gt_outtab TYPE TABLE OF SFLIGHT.
    *DYNPRO
    CALL SCREEN 100.
    *&      Module  STATUS_0100  OUTPUT
    MODULE STATUS_0100 OUTPUT.
      SET PF-STATUS '100'.
      CREATE OBJECT gc_custom_container
          EXPORTING
            container_name              = gc_container
          EXCEPTIONS
            cntl_error                  = 1
            cntl_system_error           = 2
            create_error                = 3
            lifetime_error              = 4
            lifetime_dynpro_dynpro_link = 5
            OTHERS                      = 6.
      CREATE OBJECT gc_grid
          EXPORTING
            i_parent          = gc_custom_container
          EXCEPTIONS
            error_cntl_create = 1
            error_cntl_init   = 2
            error_cntl_link   = 3
            error_dp_create   = 4
            OTHERS            = 5 .
    PERFORM prepare_field_catalog CHANGING gt_fieldcat .
    PERFORM prepare_layout CHANGING gs_layout .
    PERFORM get_alv_display.
    ENDMODULE.
    *&      Module  USER_COMMAND_0100  INPUT
    MODULE USER_COMMAND_0100 INPUT.
      OK_CODE = SY-UCOMM.
      IF OK_CODE = 'BACK'.
        SET SCREEN 0.
        LEAVE SCREEN.
        CLEAR OK_CODE.
      ENDIF.
    ENDMODULE.
    FORM prepare_field_catalog CHANGING gt_fieldcat TYPE LVC_T_FCAT.
      CALL FUNCTION 'LVC_FIELDCATALOG_MERGE'
       EXPORTING
        I_BUFFER_ACTIVE              =
         I_STRUCTURE_NAME             = 'SFLIGHT'
        I_CLIENT_NEVER_DISPLAY       = 'X'
        I_BYPASSING_BUFFER           =
        I_INTERNAL_TABNAME           =
        CHANGING
          ct_fieldcat                  = gt_fieldcat[].
    ENDFORM.
    FORM prepare_layout  changing p_gs_layout TYPE lvc_s_layo.
      p_gs_layout-zebra = 'X'.
      p_gs_layout-edit = 'X'.
    ENDFORM.                    " prepare_layout
    FORM get_alv_display .
    SELECT * FROM sflight INTO TABLE gt_outtab UP TO 10 ROWS.
    CALL METHOD gc_grid->set_table_for_first_display
    EXPORTING
        I_STRUCTURE_NAME              = 'SFLIGHT'
        IS_LAYOUT                     = gs_layout
      CHANGING
        it_outtab                     = gt_outtab
        IT_FIELDCATALOG               = gt_fieldcat
    ENDFORM.                    " get_alv_display
    Regards,
    Sachin

  • Compare editable alv output with database fields

    I generated 1 editable alv report with attaching flat file data,
    but i want to change the wrong fields in alv output and compare with database filds for validation.
    but when i do this . it takes previous entries of flat file.
    how can i solve it?

    Your title is much better than in the first post, however your problem description hasn't changed.
    Let me guess, you are importing a flat file, present the contents in an editable ALV grid, some values are being changed, and now the changed values do not reflect in the internal table, instead you are seeing the values as imported from the file?
    If yes -> FAQ, please search for the many previous discussions of this topic.
    Thomas

  • Reg. ALV output transported into Excel

    Dear All,
                   when i transported my ALV report output to excel file , amount column is suppressed from decimal places .
    i.e. in excel file ,  decimal values of amount column is not shown in some amounts.
    Please provide some inputs
    Thanks & Regards
    shailesh

    Hi ,
    Check this [LINK|ALV List output to Excel file; for  ALV output transported into Excel.
    hope it will help you .
    Regards,
    Saravana.S

  • Editable ALV - how to throw an error message for a specific line & field

    Hi all,
    I've implemented an editable ALV and also the ON_DATA_CHECK event to check the values, entered in the ALV. So this works fine and I can check the values.
    But now, I want to throw an error message corresponding to the field in the ALV, where the error occured.
    How can I throw this error message corresponding to a specific line/field in the ALV?
    I was using REPORT_ATTRIBUTE_ERROR_MESSAGE and REPORT_ELEMENT_ERROR_MESSAGE but without success.
    I'm also using a loop over the "CHANGES" in the ALV and within this loop, I use
    elem_alv = node_alv->get_element( index = <change>-element_index ) 
    to get the element for the message.
    CALL METHOD lo_message_manager->REPORT_ELEMENT_ERROR_MESSAGE
      EXPORTING
        MESSAGE_TEXT              = 'my message'
        ELEMENT                   = elem_alv
    *    ATTRIBUTES                =
    *    PARAMS                    =
    *    MSG_USER_DATA             =
    *    IS_PERMANENT              = ABAP_FALSE
    *    SCOPE_PERMANENT_MSG       = CO_MSG_SCOPE_CTXT_ELEMENT
    *    MSG_INDEX                 =
    *    CANCEL_NAVIGATION         =
    *    IS_VALIDATION_INDEPENDENT = ABAP_FALSE.
    2.) is it right, that for an editable ALV, I can't use the WDDOBEFOREACTION to do the checks?
    If I try to use this, I can't get the values of my ALV table to check it.
    Thanks,
    Andreas

    Hi Andreas,
    I have tried to replicate your problem and I am getting the desired output. I have a row by name TEMP_NEW in my ALV and I want to throw an error message whenever the user enters a value of 4 for that particular field. Please find my coding as below. The important thing is where we perform the actual comparison between the r_value and 4. r_value is defined in SALV_WD_S_TABLE_MOD_CELL as reference to type DATA. So suppose the user enters a value of say 3 in the TEMP_NEW field of the ALV then r_value would contain 3 but if you observe its type in debugging mode it would be as TYPE REF TO I and not TYPE I. So you cannot directly say something like:
    "if ls_modified_cells-r_value = 3" as this would lead to a syntax error. Define a field-symbol say <temp> and then use it to get the actual value into it by saying like:
    ASSIGN ls_modified_cells-r_value->* TO <temp>.
    Then you can use this <temp> for comparison in your IF statement like:
    IF  <temp> = 3.
    Find the entire coding as below:
    METHOD check_data.
      DATA: lr_node TYPE REF TO if_wd_context_node,
            lr_element TYPE REF TO if_wd_context_element,
            ls_modified_cells TYPE salv_wd_s_table_mod_cell.
      FIELD-SYMBOLS <temp> TYPE data.
    " get message manager
      DATA lo_api_controller     TYPE REF TO if_wd_controller.
      DATA lo_message_manager    TYPE REF TO if_wd_message_manager.
      lo_api_controller ?= wd_this->wd_get_api( ).
      CALL METHOD lo_api_controller->get_message_manager
        RECEIVING
          message_manager = lo_message_manager.
      lr_node = wd_context->get_child_node( name = 'NODE' ).
      LOOP AT r_param->t_modified_cells INTO ls_modified_cells.
        lr_element = lr_node->get_element( index = ls_modified_cells-index ).
        IF ls_modified_cells-attribute = 'TEMP_NEW'.
    " Get the value extracted into the field symbol from the reference variable
          ASSIGN ls_modified_cells-r_value->* TO <temp>.
    " Use the value present in this field-symbol for your comparison
          IF  <temp> = 4.
    " report message
            CALL METHOD lo_message_manager->report_attribute_error_message
              EXPORTING
                message_text   = 'Sample message text'
                element        = lr_element
                attribute_name = ls_modified_cells-attribute.
          ENDIF.
        ENDIF.
      ENDLOOP.
    ENDMETHOD.
    Hope this helps resolve your problem.
    Regards,
    Uday

  • Editable ALV, how to capture changed data

    Hi All,
    I have created an editable ALV. User can make some changes in the displayed record and press "Submit" button (custom button on application toolbar), the program should validate the data and write the file on application server if validations are successful otherwise controls stay on the same screen.
    I am handling this validation and writing file part in PAI of the screen.
    Problem: The program is capturing the data when user changes it for the first, but program is failing to capture the subsequent changes (user makes after the validation fails). Program processes always the first time changed data only. Please help me in getting this problem resolved.
    Step1 : Program shows output.
    Step2: User changes Company Code.
    Step3: User clicks on Submit Button.
    Step3.1: Program reads the new data and performs validation.
    Step3.2: New Company code is not valid, error displayed.
    Step4: User changes the company code again, presses submit button.
    Goto step 3.1 -> Here program does not read the new data, rather first time changes company code is again read and validated, and program shows the same error again, which is not a desired result

    Hi Ashish,
    you need a method HANDLE_DATA_CHANGED as handler for grid event DATA_CHANGED.
    Use
    LOOP AT er_data_changed->mt_mod_cells ASSIGNING <mod>.
    to check all changed data. In this event, add the error messages to ER_DATA_CHANGED object.
    set all required handlers, i.e.
    SET HANDLER:
          handle_data_changed          FOR ro_grid,
          handle_data_changed_finished FOR ro_grid,
          handle_toolbar_set           FOR ro_grid,
          handle_user_command          FOR ro_grid,
          handle_hotspot_click         FOR ro_grid,
          handle_f4                    FOR ro_grid,
          handle_f1                    FOR ro_grid.
       ro_grid->set_toolbar_interactive( ).
    Register ENTER and MODIFIED events.
        ro_grid->register_edit_event( cl_gui_alv_grid=>mc_evt_enter ).
        ro_grid->register_edit_event( cl_gui_alv_grid=>mc_evt_modified ).
    Regards,
    Clemens

  • Edit ALV GRID

    hi,
    I have successfully displayed data in the ALV GRID(in Read-ONLY mode) by using the function of class "CL_GUI_ALV_GRID"  . But I have not been able to display the data in the edit mode .I want that the user should be able to edit the data displayed in the ALV GRID (and final data should be stored in the transparent table), but I have not been able to add that functionality . Can anyone please tell me how to do the same (any function that I need to call ??)  .
    Thanx
    sagar

    Hi Sagar,
    there was a similar question in this forum and Vijay Babu Dudla wrote a nice sample report:
    editing alv output
    Best Regards,
    Stefan

  • Custom button on a editable alv grid

    Hi experts,
    I'm using an editable alv   like this:
    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY_LVC'
           EXPORTING
                i_callback_program            = gd_repid
                i_callback_user_command  = 'USER_COMMAND'
    *            I_STRUCTURE_NAME       = 'ZPEDAUTOMTAB'
                is_layout_lvc           = gd_layout
                it_fieldcat_lvc         = it_fieldcat
                i_save                  = 'X'
           TABLES
                t_outtab                = gt_zpedautomtab
           EXCEPTIONS
                program_error           = 1
                OTHERS                  = 2.
    Does anybody know if i can add a custom button to the header or anywhere else to program a custom action?
    If it is not; i can use another type of editable alv that lets me do that; if that exists.
    Tank-you.

    Hi
    Check the following template code and adjust accordingly:
    Call the ALV
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
        EXPORTING
          i_callback_program          = w_repid
          i_callback_pf_status_set    = 'PF_STATUS_SET'
          i_callback_user_command     = 'LINE_CLICK'
          i_callback_top_of_page      = 'TOP_ROUTINE'
          i_callback_html_end_of_list = 'EOL_LOG'
          i_grid_title                = text-ttl
          is_layout                   = my_layout
          it_fieldcat                 = it_fieldcatalog
          it_sort                     = it_sort
          i_save                      = g_save
          i_grid_settings             = lc_glay
          is_variant                  = w_variant
          is_print                    = my_print
        TABLES
          t_outtab                    = i_out
        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.
    *&      Form  top_routine
    FORM top_routine.
    { Local
      DATA:
        w_page(5) TYPE c,
        l_line TYPE slis_entry,
        lh_top TYPE slis_listheader,
        lt_top TYPE slis_t_listheader.
      DEFINE top_line.
        clear lh_top.
        lh_top-typ = &1.
        lh_top-key = &2.
        lh_top-info = &3.
        append lh_top to lt_top.
      END-OF-DEFINITION.
      WRITE sy-datum TO l_line.
      top_line 'S' text-t01 l_line.
      WRITE sy-uname TO l_line.
      top_line 'S' text-t02 l_line.
      CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
        EXPORTING
          it_list_commentary = lt_top.
    ENDFORM.  "top_routine
    *&      Form  pf_status_set
    FORM pf_status_set USING extab TYPE slis_t_extab.
      data: wa_extab like LINE OF extab.
      wa_extab-fcode = '&REFRESH'.
      append wa_extab to extab.
      wa_extab-fcode = 'MODE'.
      append wa_extab to extab.
      SET PF-STATUS 'ZSD_DA01' EXCLUDING extab.
    ENDFORM.  "pf_status_set
    *&      Form  line_click
    FORM line_click USING ucomm LIKE sy-ucomm
                           selfield TYPE slis_selfield.
      DATA: wl_ucomm LIKE sy-ucomm.
      DATA: es_l TYPE slis_layout_alv,
            es_fld TYPE slis_t_fieldcat_alv,
            es_sort TYPE slis_t_sortinfo_alv,
            es_mark TYPE slis_t_fieldcat_alv.
      wl_ucomm = sy-ucomm.
      CLEAR sy-ucomm.
      CASE wl_ucomm.
    Set printing mode
        WHEN 'MODE'.
          IF w_mode = 'O'.
            w_mode = 'T'.
            w_mode_txt = text-018.
          ELSE.
            w_mode = 'O'.
            w_mode_txt = text-019.
          ENDIF.
          SET PF-STATUS 'ZSD_DA01'.
    Exit Functions
        WHEN 'BACK' OR 'EXIT' OR 'CANCEL'.
          LEAVE TO SCREEN 0.
    Show Log
        WHEN 'LOG'.
          selfield-refresh = 'X'.
          PERFORM log_show.
    Issue output
        WHEN 'ISSUE'.
          selfield-refresh = 'X'.
          PERFORM print_deliveries.
    Select all
        WHEN 'SALL'.
          selfield-refresh = 'X'.
          LOOP AT i_out.
            i_out-box = 'X'.
            MODIFY i_out.
          ENDLOOP.
    Deselect all
        WHEN 'DSAL'.
          selfield-refresh = 'X'.
          LOOP AT i_out.
            i_out-box = ' '.
            MODIFY i_out.
          ENDLOOP.
      ENDCASE.
    Handle User clicks
      CASE selfield-fieldname.
    Display Vendor Master
        WHEN 'KUNNR' OR 'KUNAG'.
          IF NOT selfield-value IS INITIAL.
            READ TABLE i_out INDEX selfield-tabindex.
            IF selfield-fieldname = 'KUNAG'.
              SET PARAMETER ID 'KUN' FIELD i_out-kunag.
            ELSEIF selfield-fieldname = 'KUNNR'.
              SET PARAMETER ID 'KUN' FIELD i_out-kunnr.
            ENDIF.
            SET PARAMETER ID 'BUK' FIELD i_out-bukrs_vf.
            SET PARAMETER ID 'VKO' FIELD i_out-vkorg.
            SET PARAMETER ID 'VTW' FIELD i_out-vtweg.
            SET PARAMETER ID 'SPA' FIELD i_out-spart.
            CALL TRANSACTION 'XD03' AND SKIP FIRST SCREEN.
          ENDIF.
    Go To VL03N
        WHEN 'VBELN'.
          READ TABLE i_out INDEX selfield-tabindex.
          IF NOT i_out-vbeln IS INITIAL.
            SET PARAMETER ID 'VL' FIELD i_out-vbeln.
            CALL TRANSACTION 'VL03N' AND SKIP FIRST SCREEN.
          ENDIF.
    Go To VA03
        WHEN 'VGBEL'.
          READ TABLE i_out INDEX selfield-tabindex.
          IF NOT i_out-vgbel IS INITIAL.
            SET PARAMETER ID 'AUN' FIELD i_out-vgbel.
            CALL TRANSACTION 'VA03' AND SKIP FIRST SCREEN.
          ENDIF.
      ENDCASE.
    ENDFORM.  "line_click
    Please, reward if helpful
    Regards,
    George

  • Update the Billing orders after display/ modifiy in the Editable ALV

    Hi Experts,
    I have created one Editable ALV to display theBilling order with BP details,
    Once user get the ALV output he can modify the content and same will be updated once he hits UPDATE button.
    my requirement is after user hits the UPDATE button a background should be created and update of BO should happen also user user should able to see the status by checking the SPOOL.
    currently i am using the FM crm_order_maintain to update, kindly guide me how to process this step in background for all the entries which are selected in ALV by user.
    i think i can use SUBMIT with JOB_OPEN and JOB_CLOSE, but i need some same code & guidance.
    Thanks in Advance.
    Regards,
    Pradeep

    problem solved

  • Search help for date field in Editable ALV

    Hello Friends,
    I am using editable alv using 'reuse_* '.
    I have used date as input field. While creating fieldcatlog also i have  declared dat as a mkpf-budat.
    But i am not getting serach help for date in output.
    Is it possible with reuse or i have to go by object oriented ?

    Hi,
    Just pass the Edit option of the fieldcatalog for those specific fields...
    fcat-edit = 'X'.
    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
        EXPORTING
          i_callback_program       = sy-cprog
          i_callback_pf_status_set = 'PF_STATUS_SET'
          i_callback_user_command  = 'USER_COMMAND'    "<----  pass this
          i_callback_top_of_page   = 'TOP'
          is_layout                = it_layout
          it_fieldcat              = it_fcat
          i_default                = 'X'
          i_save                   = 'A'
          it_events                = it_event
        TABLES
          t_outtab                 = it_final
        EXCEPTIONS
          program_error            = 1
          OTHERS                   = 2.
    *&      Form  USER_COMMAND
    *       text
    *      -->R_UCOMM      text
    *      -->RS_SELFIELD  text
    FORM user_command USING r_ucomm LIKE sy-ucomm
                            rs_selfield TYPE slis_selfield.
      CASE r_ucomm.
        WHEN '&DATA_SAVE'.                "<-------check this
          PERFORM save_data.
      ENDCASE.
    ENDFORM.                    "USER_COMMAND

Maybe you are looking for

  • Oracle 10g on SLES9 AMD64

    Hi All, i have tried to set up a system SLES 9 AMD64 for testing Oracle 10g for AMD 64 . After installing the operating system, I added this package rpm -Uvh orarun-1.8-109.5.i586.rpm and enabled the user oracle. I you login as user oracle, the follo

  • How to create a Sales Lead and Sales Lead Contact using Web Services

    Hi, I am working on integration of sales lead with third party application. I want to create a sales lead and sales lead contact using web services. The question is What WSDLs should I use to create Sales Lead and sales lead Contact? And What are the

  • Passing parameters to web based oracle forms

    Hi, How can I pass parameters from web page to oracle form applet? OR is there anyway i can know (within a form) if that form is run from a client/server or from web. This is just to set some parameters depending on the condition: client/server or we

  • Scrollbar in ALV table

    Hi All, Is anybody using Scroll bars in ALV table? If yes please help me out. Iam not able to set scroll bar. Thank You, Suresh.

  • ZCM 10.3.3 - cannot register new installations

    This is a problem that recently has reared its ugly head. Installing ZCM 10.3.3 agent on XP Pro SP3 workstations appears to work; however, the workstations do not register with the ZCM server. Newly imaged workstations (with ZCM 10.3.3 installed some