Make rows editable

CASE e_ucomm .
      WHEN 'CHANGE' .
        CALL METHOD gr_alvgrid->get_selected_rows
          IMPORTING
            et_row_no = lt_selected_rows.
*        READ TABLE lt_selected_rows INTO ls_selected_row INDEX 1 .
*        IF sy-subrc NE 0 .
*          MESSAGE s000(su) WITH 'Select a row!'(203) .
*        ENDIF .
        LOOP AT lt_selected_rows INTO ls_selected_row.
          READ TABLE i_output INDEX ls_selected_row-row_id TRANSPORTING NO FIELDS.
          IF sy-subrc = 0 .
            ls_stylerow-fieldname = 'MINIMUM' .
            ls_stylerow-style = cl_gui_alv_grid=>mc_style_enabled .
            APPEND ls_stylerow TO lt_styletab .
          ENDIF .
          INSERT LINES OF lt_styletab INTO table ls_listrow-cellstyles .
          APPEND ls_listrow to i_output.
        ENDLOOP .
I have given the code as above to make by field 'MINIMUM' as editable in my final alv display. But when i execute it its not getting displayed in the editable mode.
Can u find th problem and tell me

My entire code,
CLASS lcl_event_receiver DEFINITION DEFERRED.
DATA event_receiver TYPE REF TO lcl_event_receiver.
*       CLASS lcl_event_receiver DEFINITION
CLASS lcl_event_receiver DEFINITION.
  PUBLIC SECTION.
    METHODS:
    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.
  PRIVATE SECTION.
ENDCLASS.                    "lcl_event_receiver DEFINITION
*       CLASS lcl_event_receiver IMPLEMENTATION
CLASS lcl_event_receiver IMPLEMENTATION.
  METHOD handle_toolbar.
    DATA: ls_toolbar TYPE stb_button.
    CLEAR ls_toolbar.
*    MOVE 3 TO ls_toolbar-butn_type.
*    APPEND ls_toolbar TO i_object->mt_toolbar.
*    CLEAR ls_toolbar.
    MOVE 'CHANGE' TO ls_toolbar-function.                   "#EC NOTEXT
    MOVE icon_change TO ls_toolbar-icon.
    MOVE 'Change rows' TO ls_toolbar-quickinfo.
*    MOVE 'Passenger Info'(201) TO ls_toolbar-text.
    MOVE ' ' TO ls_toolbar-disabled.                        "#EC NOTEXT
    APPEND ls_toolbar TO e_object->mt_toolbar.
    MOVE 'DELETE' TO ls_toolbar-function.                   "#EC NOTEXT
    MOVE icon_delete TO ls_toolbar-icon.
    MOVE 'Delete rows' TO ls_toolbar-quickinfo.
*    MOVE 'Passenger Info'(201) TO ls_toolbar-text.
    MOVE ' ' TO ls_toolbar-disabled.                        "#EC NOTEXT
    APPEND ls_toolbar TO e_object->mt_toolbar.
    MOVE 'NEW ENTRIES' TO ls_toolbar-function.              "#EC NOTEXT
    MOVE icon_create TO ls_toolbar-icon.
    MOVE 'New records' TO ls_toolbar-quickinfo.
    MOVE 'New Entry'(201) TO ls_toolbar-text.
    MOVE ' ' TO ls_toolbar-disabled.                        "#EC NOTEXT
    APPEND ls_toolbar TO e_object->mt_toolbar.
  ENDMETHOD.                    "handle_toolbar
  METHOD handle_user_command.
    DATA lt_selected_rows TYPE lvc_t_roid .
    DATA ls_selected_row TYPE lvc_s_roid .
*    DATA i_ucomm LIKE sy-ucomm.
    DATA ls_listrow LIKE LINE OF i_output .
    DATA ls_stylerow TYPE lvc_s_styl .
    DATA lt_styletab TYPE lvc_t_styl .
    DATA l_index TYPE i.
    CASE e_ucomm .
      WHEN 'CHANGE' .
        CALL METHOD gr_alvgrid->get_selected_rows
          IMPORTING
            et_row_no = lt_selected_rows.
*        READ TABLE lt_selected_rows INTO ls_selected_row INDEX 1 .
*        IF sy-subrc NE 0 .
*          MESSAGE s000(su) WITH 'Select a row!'(203) .
*        ENDIF .
        LOOP AT lt_selected_rows INTO ls_selected_row.
          l_index = sy-tabix.
          READ TABLE i_output INDEX ls_selected_row-row_id TRANSPORTING NO FIELDS.
          IF sy-subrc = 0 .
            ls_stylerow-fieldname = 'MINIMUM' .
            ls_stylerow-style = cl_gui_alv_grid=>mc_style_enabled .
            APPEND ls_stylerow TO lt_styletab .
          ENDIF .
          INSERT LINES OF lt_styletab INTO TABLE ls_listrow-cellstyles .
*          MODIFY i_output FROM wa_output INDEX l_tabix TRANSPORTING lt_listrow
          MODIFY i_output FROM ls_listrow INDEX l_index.
          PERFORM s_input_ready.
          PERFORM s_refresh_display.
        ENDLOOP .
    ENDCASE .
  ENDMETHOD.                    "handle_user_command
ENDCLASS.                    "lcl_event_receiver IMPLEMENTATION
*Building ALV layout
FORM s_build_layout .
  gs_layout-cwidth_opt = c_x.
  gs_layout-zebra = c_x.
  gs_layout-sel_mode = 'D'. "For rows, columns and cells
  gs_layout-grid_title = 'ASSORTMENT LIST'.
*  gs_layout-no_toolbar = 'X'.
  gs_layout-stylefname = 'CELLSTYLES'.
ENDFORM.                    " S_BULID_LAYOUT
*&      Form  S_DISPLAY_ALV
*       text
*  -->  p1        text
*  <--  p2        text
FORM ss_display_alv.
  IF gr_alvgrid IS INITIAL .
*----Creating custom container instance
    CREATE OBJECT gr_ccontainer
      EXPORTING
        container_name              = gc_custom_control_name
      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.
*--Exception handling
    ENDIF.
*----Creating ALV Grid instance
    CREATE OBJECT gr_alvgrid
      EXPORTING
        i_parent          = gr_ccontainer
      EXCEPTIONS
        error_cntl_create = 1
        error_cntl_init   = 2
        error_cntl_link   = 3
        error_dp_create   = 4
        OTHERS            = 5.
    IF sy-subrc <> 0.
*--Exception handling
    ENDIF.
*----Preparing field catalog.
    PERFORM s_build_fldctlg.
    PERFORM s_status USING rt_extab.
*----Preparing layout structure
    PERFORM s_build_layout.
    PERFORM hide_standard." CHANGING ls_exclude." TYPE ui_functions.
    CALL METHOD gr_alvgrid->set_table_for_first_display
      EXPORTING
        i_save                        = 'X'
        is_layout                     = gs_layout
        it_toolbar_excluding          = pt_exclude
      CHANGING
        it_outtab                     = i_output[]
        it_fieldcatalog               = i_fldctlg
      EXCEPTIONS
        invalid_parameter_combination = 1
        program_error                 = 2
        too_many_lines                = 3
        OTHERS                        = 4.
    IF sy-subrc <> 0.
*--Exception handling
    ENDIF.
  ELSE .
  ENDIF .
ENDFORM.                    " S_DISPLAY_ALV
*&      Module  S_DISPLAY_ALV  OUTPUT
*       text
MODULE s_display_alv OUTPUT.
*  SET PF-STATUS 'MAIN100'.
*  SET TITLEBAR 'MAIN100'.
  PERFORM ss_display_alv.
  CREATE OBJECT event_receiver.
  SET HANDLER event_receiver->handle_user_command FOR gr_alvgrid.
  SET HANDLER event_receiver->handle_toolbar FOR gr_alvgrid.
  CALL METHOD gr_alvgrid->set_toolbar_interactive.
ENDMODULE.                 " S_DISPLAY_ALV  OUTPUT
FORM s_refresh_display .
  CALL METHOD gr_alvgrid->refresh_table_display
*                   EXPORTING
*                     is_stable      =
*                     i_soft_refresh =
    EXCEPTIONS
      finished       = 1
      OTHERS         = 2
  IF sy-subrc <> 0.
  ENDIF.
ENDFORM.                    " S_REFRESH_DISPLAY
*&      Form  S_INPUT_READY
*       text
*  -->  p1        text
*  <--  p2        text
form S_INPUT_READY .
CALL METHOD gr_alvgrid->set_ready_for_input
  EXPORTING
    i_ready_for_input = 1
endform.                    " S_INPUT_READY

Similar Messages

  • How to make Rows editable in ALV

    Hello,
    I show some Records in my ALV and Column PersonalNumber is noneditable.
    and I have created Append Row Button. If I click on this Button, then new added PersonalNumber should
    be editable and old PersonalNumbers should be noneditable. How can we realize that?
    otherwise; How can we make some editable and some noneditable in ALV?
    Thanks!
    with my Best Regards
    Beserithan Malabakan

    Hi,
    Try this code for Editable ALV.
    DATA: LR_COLUMN_SETTINGS TYPE REF TO IF_SALV_WD_COLUMN_SETTINGS,
           LR_INPUT_FIELD TYPE REF TO CL_SALV_WD_UIE_INPUT_FIELD.
      LR_COLUMN_SETTINGS ?= L_VALUE.
      LR_COLUMN = LR_COLUMN_SETTINGS->GET_COLUMN( 'Your Field' ).
      CREATE OBJECT LR_INPUT_FIELD EXPORTING VALUE_FIELDNAME = 'Your Field'.
      LR_COLUMN->SET_CELL_EDITOR( LR_INPUT_FIELD ).
    If any doubts let me know.
    Thanks.
    Edited by: Viji on Feb 28, 2008 12:14 PM

  • How to make rows editable of a dynamic ALV

    Hi All,
       I'm displaying a dynamic internal table on an ALV.
    The probelm is that some of the rows of that ALV should be editable.
    I checked some of the forums, where I got a clue that I have to update this LVC_S_STYL structure for this requirement.
    I populated this structure also. But still that ALV is coming as non-editable.
    Kindly help me out in resolving this issue.
    Thanks and Regards,
              Abhijeet

    Check this article [Easy Reference to ALV |http://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/e8a1d690-0201-0010-b7ad-d9719a415907]. I am sure, you will find the solution here.

  • TO MAKE SINGLE ROW EDITABLE IN WEBDYNPRO ABAP

    HI
    I WANT TO MAKE A SINGLE ROW EDITABLE IN MY TABLE CONTROL IS IT POSSIBLE?
    IF YES THEN HOW?
    I KNOW ABOUT  READ ONLY FIELDS BUT I DO NOT KNOW HOW TO UTILIZE  IT

    Hi Rajan,
    Which particular row of the table do you want to set as editable? That would be important for formulating the way in which you should code.
    Suppose you are displaying the data of MARA using a table and want to make editable only rows in which the unit of measurement is equal to "CCM" then you can proceed as below.
    Create a context node (say MARA) with desired fields as attributes. (Cardinality 0..n, Selection 0..1, Initialize lead selection) In addition create an attribute (say READONLY) of type WDY_BOOLEAN under the same node (MARA) which you are using for binding to the table.
    First of all take all the cell editors of the table as type, "InputField" to make the entire table as editable. Then go to the each cell editor (TABLE_MATNR_EDITOR, TABLE_ERSDA_EDITOR,...) and bind the readOnly property of the cell to the attribute created earlier. (READONLY)
    Below is the coding in WDDOINIT through which you set the desired functionality
    METHOD wddoinit .
      DATA: lv_node TYPE REF TO if_wd_context_node,
            lt_mara TYPE ig_componentcontroller=>elements_mara,
            wa_mara TYPE ig_componentcontroller=>element_mara.
      SELECT matnr
             ersda
             ernam
             mtart
             matkl
             meins FROM mara INTO CORRESPONDING FIELDS OF TABLE lt_mara
                                     WHERE meins = 'GM' OR meins = 'CCM'.
      SORT lt_mara BY meins.
      lv_node = wd_context->get_child_node( name = wd_this->wdctx_mara ).
      LOOP AT lt_mara INTO wa_mara.
        IF wa_mara-meins = 'GM'.
          wa_mara-readonly = 'X'.
        ELSE.
          wa_mara-readonly = ' '.
        ENDIF.
        MODIFY lt_mara FROM wa_mara TRANSPORTING readonly.
      ENDLOOP.
      lv_node->bind_table( new_items = lt_mara ).
    ENDMETHOD.
    Regards,
    Uday

  • How to make Row of a table Editable.

    hi Experts,
    I have a table in which i am displaying data. Now in Each Row of table I have an Edit Button.
    I want to make to row that editable for which Edit button is pressed.
    How to proceed for that. ?
    Thanx.

    Hi Sourav,
    Please go thru the code mention below to make a row editable of a table.
    For this just take a attribute of type WDY_Boolean in ur node and bind the attribute to the UI Element Enable property.
    Call this logic on the Action of ur Edit Button
    METHOD onactiononclick .
      DATA lo_nd_node TYPE REF TO if_wd_context_node.
      DATA lo_el_node TYPE REF TO if_wd_context_element.
      DATA lt_node TYPE wd_this->elements_node.
      DATA ls_node LIKE LINE OF lt_node.
      navigate from <CONTEXT> to <NODE> via lead selection
      lo_nd_node = wd_context->get_child_node( name = wd_this->wdctx_node ).
      get element via lead selection
      lo_el_node = lo_nd_node->get_element(  ).
      get all declared attributes
      lo_nd_node->get_static_attributes_table(
        IMPORTING
          table = lt_node ).
      DATA: lv_index TYPE i.
      lo_el_node = wdevent->get_context_element( name = 'CONTEXT_ELEMENT'  ).
      lv_index = lo_el_node->get_index( ).
      LOOP AT lt_node INTO ls_node.
        IF sy-tabix = lv_index.
          ls_node-read_only = abap_true.
        ELSE.
          ls_node-read_only = abap_false.
        ENDIF.
        MODIFY lt_node INDEX sy-tabix FROM ls_node TRANSPORTING read_only.
      ENDLOOP.
      CALL METHOD lo_nd_node->bind_table
        EXPORTING
          new_items            = lt_node
          set_initial_elements = abap_true.
    ENDMETHOD.
    Regards
    Manoj Kumar
    Edited by: Manoj Kumar on Feb 17, 2009 1:58 PM

  • Make a particular row editable in ALVgrid oo

    hi all,
           i have a hotspot in my alv,when hotspot click haapen the particular row should b changed to editable, i have done till the hotspotclick event and the particular row could be poppulated , how it can be changed to editable on that particular row....
    thanks

    Hi,
        In order to make a row editable, it is required to implement an event handler class. It is required to implement the following events:
    CLASS lcl_event_handler DEFINITION .
    PUBLIC SECTION .
    METHODS:
    *--Controlling data changes when ALV Grid is editable
    handle_data_changed
    FOR EVENT data_changed OF cl_gui_alv_grid
    IMPORTING er_data_changed
    *--To be triggered after data changing is finished
    handle_data_changed_finished
    FOR EVENT data_changed_finished OF cl_gui_alv_grid
    IMPORTING e_modified
    ENDCLASS.
    CLASS lcl_event_handler IMPLEMENTATION .
    *--Handle Data Changed
    METHOD handle_data_changed .
    PERFORM handle_data_changed USING er_data_changed .
    ENDMETHOD.
    *--Handle Data Changed Finished
    METHOD handle_data_changed_finished .
    PERFORM handle_data_changed_finished USING e_modified .
    ENDMETHOD .
    ENDCLASS .
    DATA gr_event_handler TYPE REF TO lcl_event_handler .
    *--Creating an instance for the event handler
    CREATE OBJECT gr_event_handler .
    SET HANDLER gr_event_handler->handle_data_changed FOR gr_alvgrid .
    SET HANDLER gr_event_handler->handle_data_changed_finished
    FOR gr_alvgrid .
    Please search the forum: You will get a lot examples
    Regards,
    Tanmoy
    Edited by: Tanmoy Mondal on Aug 5, 2011 1:45 PM

  • Make  columns editable in a selected row of SALV

    Hello ,
    I have a requirement,im using SALV for listing  some records,On lead select of a row in SALV,i need to make two columns of that selected row editable and make the remaining in display mode.
    Useful answers would be rewarded.

    Hi Reema Elsy Easow,
                               Changing the type of a single field in a column is i think not possible. you can make whole column editable.
    I will suggest you a solution-- when a row is selected for editting , you can display that row  in another alv or table with single row and provide the record for editiing.
    Regards
    Sarath

  • How to make a row editable in a click to edit table programatically?

    I have a table in my page in which I can do inline addition as well as select and add addition (which will programatically add multiple rows). And my table is click to edit (there are few editable columns in the table).
    So, suppose if I add a row say R1 by inline addition, then this row is coming as highlighted as well as selected (i.e editable). But now suppose I add another row R2 through Select and Add (which will open a popup table from where I can select multiple rows, and clicking on OK, I will add those rows programatically in the table VO), it is coming as highlighted but it is not coming as selected i.e now R1 is selected and editable but R2 is highlighted. (I have done setCurrentRow programatically but that is only making the row highlighted and not editable. Is there any way to make the row editable also programatically?

    try setEditingMode method. See if it helps.
    http://docs.oracle.com/cd/E28389_01/apirefs.1111/e10684/oracle/adf/view/rich/component/rich/data/RichTable.html#setEditingMode_java_lang_String_

  • RE:ALV grid (oops concept)-to make selected row editable

    Hi,
    I have an object oriented alv which is having 5 rows of data.I have a pushbutton to make any row in editable mode.My requirement is i will select any row in oops alv grid and press
    the button to make the row editable.How can i do this in oops alv.
    thanks,
    Alex

    Hi,
    Use the Link [http://www.sapdev.co.uk/reporting/alv/alvgrid_editable.htm]
    Check demo pgm BCALV_EDIT_05.
    *& Report ZUS_SDN_ALVGRID_EDITABLE_8
    *& Description: editable ALV -> ENTER jumps to next row
    *& Dynpro flow logic: no screen elements, ok_code = GD_OKCODE
    PROCESS BEFORE OUTPUT.
    MODULE STATUS_0100.
    PROCESS AFTER INPUT.
    MODULE USER_COMMAND_0100.
    REPORT zus_sdn_alvgrid_editable_8.
    DATA:
    gd_repid TYPE syst-repid,
    gd_okcode TYPE ui_func,
    gt_fcat TYPE lvc_t_fcat,
    go_docking TYPE REF TO cl_gui_docking_container,
    go_grid TYPE REF TO cl_gui_alv_grid.
    DATA:
    gt_knb1 TYPE STANDARD TABLE OF knb1.
    CLASS lcl_eventhandler DEFINITION
    CLASS lcl_eventhandler DEFINITION.
    PUBLIC SECTION.
    CLASS-METHODS:
    handle_data_changed
    FOR EVENT data_changed OF cl_gui_alv_grid
    IMPORTING
    er_data_changed
    e_onf4
    e_onf4_before
    e_onf4_after
    e_ucomm
    sender.
    ENDCLASS. "lcl_eventhandler DEFINITION
    CLASS lcl_eventhandler IMPLEMENTATION
    CLASS lcl_eventhandler IMPLEMENTATION.
    METHOD handle_data_changed.
    define local data
    cl_gui_cfw=>set_new_ok_code( 'NEXT_ROW' ). " not possible on 4.6c
    CALL METHOD cl_gui_cfw=>set_new_ok_code
    EXPORTING
    new_code = 'NEXT_ROW'
    IMPORTING
    RC =
    " Triggers PAI of dynpro with ok_code = 'NEXT_ROW'
    ENDMETHOD. "handle_data_changed
    ENDCLASS. "lcl_eventhandler IMPLEMENTATION
    PARAMETERS:
    p_bukrs TYPE bukrs DEFAULT '2000' OBLIGATORY.
    START-OF-SELECTION.
    SELECT * FROM knb1 INTO TABLE gt_knb1
    WHERE bukrs = p_bukrs.
    Create docking container
    CREATE OBJECT go_docking
    EXPORTING
    parent = cl_gui_container=>screen0
    ratio = 90
    EXCEPTIONS
    OTHERS = 6.
    IF sy-subrc 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    Create ALV grid
    CREATE OBJECT go_grid
    EXPORTING
    i_parent = go_docking
    EXCEPTIONS
    OTHERS = 5.
    IF sy-subrc 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    " Triggers event DATA_CHANGED when ENTER is pushed
    CALL METHOD go_grid->register_edit_event
    EXPORTING
    i_event_id = cl_gui_alv_grid=>mc_evt_enter
    EXCEPTIONS
    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.
    SET HANDLER:
    lcl_eventhandler=>handle_data_changed FOR go_grid.
    Build fieldcatalog and set hotspot for field KUNNR
    PERFORM build_fieldcatalog_knb1.
    Display data
    CALL METHOD go_grid->set_table_for_first_display
    CHANGING
    it_outtab = gt_knb1
    it_fieldcatalog = gt_fcat
    EXCEPTIONS
    OTHERS = 4.
    IF sy-subrc 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    Link the docking container to the target dynpro
    gd_repid = syst-repid.
    CALL METHOD go_docking->link
    EXPORTING
    repid = gd_repid
    dynnr = '0100'
    CONTAINER =
    EXCEPTIONS
    OTHERS = 4.
    IF sy-subrc 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    ok-code field = GD_OKCODE
    CALL SCREEN '0100'.
    END-OF-SELECTION.
    *& Module STATUS_0100 OUTPUT
    text
    MODULE status_0100 OUTPUT.
    SET PF-STATUS 'STATUS_0100'.
    SET TITLEBAR 'xxx'.
    CALL METHOD go_grid1->refresh_table_display
    EXPORTING
    IS_STABLE =
    I_SOFT_REFRESH =
    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.
    ENDMODULE. " STATUS_0100 OUTPUT
    *& Module USER_COMMAND_0100 INPUT
    text
    MODULE user_command_0100 INPUT.
    go_grid->check_changed_data( ).
    CASE gd_okcode.
    WHEN 'BACK' OR
    'END' OR
    'CANC'.
    SET SCREEN 0. LEAVE SCREEN.
    " NOTE: ENTER button alone works apparently only if the cursor
    " is placed within the command window (left-upper corner)
    WHEN 'ENTER' OR
    'NEXT_ROW'.
    PERFORM set_cursor_next_row.
    WHEN OTHERS.
    ENDCASE.
    CLEAR: gd_okcode.
    ENDMODULE. " USER_COMMAND_0100 INPUT
    *& Form BUILD_FIELDCATALOG_KNB1
    text
    --> p1 text
    <-- p2 text FORM build_fieldcatalog_knb1 .
    define local data
    DATA:
    ls_fcat TYPE lvc_s_fcat.
    CALL FUNCTION 'LVC_FIELDCATALOG_MERGE'
    EXPORTING
    I_BUFFER_ACTIVE =
    i_structure_name = 'KNB1'
    I_CLIENT_NEVER_DISPLAY = 'X'
    I_BYPASSING_BUFFER =
    I_INTERNAL_TABNAME =
    CHANGING
    ct_fieldcat = gt_fcat
    EXCEPTIONS
    inconsistent_interface = 1
    program_error = 2
    OTHERS = 3.
    IF sy-subrc 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    LOOP AT gt_fcat INTO ls_fcat
    WHERE ( fieldname = 'ZUAWA' ).
    ls_fcat-edit = abap_true.
    ls_fcat-col_opt = abap_true.
    MODIFY gt_fcat FROM ls_fcat.
    ENDLOOP.
    ENDFORM. " BUILD_FIELDCATALOG_KNB1
    *& Form SET_CURSOR_NEXT_ROW
    text
    --> p1 text
    <-- p2 text FORM set_cursor_next_row .
    define local data
    DATA:
    ls_row TYPE lvc_s_row,
    ls_col TYPE lvc_s_col.
    CALL METHOD go_grid->get_current_cell
    IMPORTING
    E_ROW =
    E_VALUE =
    E_COL =
    es_row_id = ls_row
    es_col_id = ls_col
    ES_ROW_NO =
    ADD 1 TO ls_row-index. " next row
    CALL METHOD go_grid->set_current_cell_via_id
    EXPORTING
    is_row_id = ls_row
    is_column_id = ls_col
    IS_ROW_NO =
    ENDFORM. " SET_CURSOR_NEXT_ROW
    HTH
    Regards,
    Dhruv Shah

  • How to make all the rows editable in webdynpro alv output

    Hi,
    How to make all the rows editable in webdynpro alv output.
    Thanks
    Rakshar

    Hi Rakshar,
    Check this wiki:
    http://wiki.sdn.sap.com/wiki/display/WDABAP/HowtoeditconditionallyrowofaALVtableinWebDynprofor+ABAP
    Regards

  • Unlock a row in alv - make fields editable

    Hello,
    I have to solve the following problem: I am using ALV FM and I have to display a non-writable alv. When a user selects a line and clicks a button, this line must change to editable mode. I found the example below. At first glance, it seemed to be what I had looked for. But on the second glance I figured out, that it does the opposite of what I need.
    When I set "FIELDCAT-EDIT = space." and "LS_EDIT-STYLE = CL_GUI_ALV_GRID=>MC_STYLE_ENABLED." the whole table rests in locked mode. Could someone please tell me, how to lock all rows and set a single row editable?
    Thanks in advance
    REPORT ZTESTALV.
    TYPE-POOLS: SLIS.
    *- Fieldcatalog
    DATA: IT_FIELDCAT  TYPE LVC_T_FCAT,
          IT_FIELDCAT1  TYPE SLIS_T_FIELDCAT_ALV.
    *- For Events
    DATA:IT_EVENTS TYPE SLIS_T_EVENT.
    DATA:  X_FIELDCAT  TYPE LVC_S_FCAT,
            X_FIELDCAT1  TYPE SLIS_FIELDCAT_ALV.
    DATA:X_LAYOUT TYPE LVC_S_LAYO.
    "{ FOR DISABLE
    DATA: LS_EDIT TYPE LVC_S_STYL,
          LT_EDIT TYPE LVC_T_STYL.
    "} FOR DISABLE
    DATA: BEGIN OF IT_VBAP OCCURS 0,
          VBELN LIKE VBAP-VBELN,
          POSNR LIKE VBAP-POSNR,
          HANDLE_STYLE TYPE LVC_T_STYL, "FOR DISABLE
         END OF IT_VBAP.
    DATA: LS_OUTTAB LIKE LINE OF IT_VBAP.
    SELECT VBELN
           POSNR
           UP TO 10 ROWS
          INTO CORRESPONDING FIELDS OF TABLE IT_VBAP
          FROM VBAP.
    DATA:L_POS TYPE I VALUE 1.
    CLEAR: L_POS.
    L_POS = L_POS + 1.
    X_FIELDCAT-SELTEXT = 'VBELN'.
    X_FIELDCAT-FIELDNAME = 'VBELN'.
    X_FIELDCAT-TABNAME = 'ITAB'.
    X_FIELDCAT-COL_POS    = L_POS.
    X_FIELDCAT-EDIT = 'X'.
    X_FIELDCAT-OUTPUTLEN = '10'.
    x_fieldcat-ref_field = 'VBELN'.
    x_fieldcat-ref_table = 'VBAK'.
    APPEND X_FIELDCAT TO IT_FIELDCAT.
    CLEAR X_FIELDCAT.
    L_POS = L_POS + 1.
    X_FIELDCAT-SELTEXT = 'POSNR'.
    X_FIELDCAT-FIELDNAME = 'POSNR'.
    X_FIELDCAT-TABNAME = 'ITAB'.
    X_FIELDCAT-COL_POS    = L_POS.
    X_FIELDCAT-EDIT = 'X'.
    X_FIELDCAT-OUTPUTLEN = '5'.
    APPEND X_FIELDCAT TO IT_FIELDCAT.
    CLEAR X_FIELDCAT.
    L_POS = L_POS + 1.
    <b>"{FOR DISABLE HERE 6ROW IS DISABLED
    SY-TABIX = 6.
    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 = 10.
    INSERT LS_EDIT INTO TABLE LT_EDIT.
    LS_EDIT-FIELDNAME = 'POSNR'.
    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 = 6.
    INSERT LS_EDIT INTO TABLE LT_EDIT.
    INSERT LINES OF LT_EDIT INTO TABLE LS_OUTTAB-HANDLE_STYLE.
    MODIFY IT_VBAP INDEX SY-TABIX FROM LS_OUTTAB  TRANSPORTING
                                      HANDLE_STYLE .
    X_LAYOUT-STYLEFNAME = 'HANDLE_STYLE'.
    "} UP TO HERE</b>
    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY_LVC'
      EXPORTING
        I_CALLBACK_PROGRAM = SY-REPID
        IS_LAYOUT_LVC      = X_LAYOUT
        IT_FIELDCAT_LVC    = IT_FIELDCAT
      TABLES
        T_OUTTAB           = IT_VBAP[]
      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.
    Message was edited by:
            Achim Beckmann

    The problem is solved.

  • ALV for fields from multiple tables and make them editable

    Hi,
    I am working on a forecasting report. We have created few custom table e.g. store forcaset detail for whole year month wise. tables are say sales data, budget data, forcast data etc.
    Now i need to make a report based on monthwise based on above mention table.
    eg.o/p looks like:
    column name                     type desc monthapr monthmay .......
    table forcast                      Qty  sales    100          150
    table budget/sales             amt   amou    20.50    130.50
    table sales vs forcast       amt   amount  3000     50000
    -Now i don't know how to display data from multiple table in single ALV list that to with different field type.
    -2nd issue is i need to make only perticuler row editable so that user can chage data.
    -3rd when user change data and press calulate button - it should calculate data for future month - i got formula for that and disply the calulated data.
    - 4th if user like the forcast data then when press save - change data should update dbtable.
    Is this all possible with simple abap FM Or need to use ABAPOO.
    I will appericiate all expert help.
    Many thanks in advance.
    KDE.
    Edited by: kde_test on Jun 4, 2010 5:44 PM

    Hi,
    Solutions :
    1. You can use  FM REUSE_ALV_HIERSEQ_LIST_DISPLAY as guided by Ashutosh.
    You can also check out this
    [http://www.sap technical.com/Tutorials/ABAP/3DGraph/demo.htm]  change link to saptechnical without space
    2. [How to make certain rows in ALV grid editable...;
    3 & 4. Use two importing paramaters 'PF_STATUS_SET' 'USER_COMMAND' of  REUSE_ALV_GRID_DISPLAY.
    create two function codes 'CALC and 'SAVE' in pf-status and provide your required functionality to these function codes using User-Command.
    Sorry am unable to provide you with supporting code, but you can search for it and It can solve your problem
    Regards,
    Rohit

  • How to make row selection by checkbox in ADF table

    hello,
    using jdev11g TP4 , fusion web application
    when i drag my view object as ADF table into jsf page,
    i want to know how to make row selection by checkbox
    thanks
    greenApple
    Edited by: greenApple on Nov 10, 2008 11:33 AM

    Hi,
    the tree component has changed compared to 10.1.3. You no longer have a tableSelectmany component that renders as checkboxes. Instead you use the ctrl key and select the table rows
    Frank

  • SINGLE ROW EDITABLE in REUSE_ALV_GRID_DISPLAY

    Hi Experts,
    I have a requirement in which i need to make a single row editable in ALV . Can u please tell me the procedure to make a single row editable using REUSE_ALV_GRID_DISPLAY.
    <<removed by moderator>>
    Thanks,
    Shrikanth

    Hi Sree,
    There are many codes available on net do spend some time to search i have shown one sample code copy paste and execute and according to your issue you make the modifications.
    You can see Net price will be in editable mode.
    TABLES:     ekko.
    TYPE-POOLS: slis.                                 "ALV Declarations
    *Data Declaration
    TYPES: BEGIN OF t_ekko,
      ebeln TYPE ekpo-ebeln,
      ebelp TYPE ekpo-ebelp,
      statu TYPE ekpo-statu,
      aedat TYPE ekpo-aedat,
      matnr TYPE ekpo-matnr,
      menge TYPE ekpo-menge,
      meins TYPE ekpo-meins,
      netpr TYPE ekpo-netpr,
      peinh TYPE ekpo-peinh,
      field_style  TYPE lvc_t_styl, "FOR DISABLE
    END OF t_ekko.
    DATA: it_ekko TYPE STANDARD TABLE OF t_ekko INITIAL SIZE 0,
          wa_ekko TYPE t_ekko.
    *ALV data declarations
    DATA: fieldcatalog TYPE slis_t_fieldcat_alv WITH HEADER LINE.
    DATA: it_fieldcat TYPE lvc_t_fcat,     "slis_t_fieldcat_alv WITH HEADER LINE,
          wa_fieldcat TYPE lvc_s_fcat,
          gd_tab_group TYPE slis_t_sp_group_alv,
          gd_layout    TYPE lvc_s_layo,     "slis_layout_alv,
          gd_repid     LIKE sy-repid.
    *Start-of-selection.
    START-OF-SELECTION.
      PERFORM data_retrieval.
      PERFORM set_specific_field_attributes.
      PERFORM build_fieldcatalog.
      PERFORM build_layout.
      PERFORM display_alv_report.
    *&      Form  BUILD_FIELDCATALOG
          Build Fieldcatalog for ALV Report
    FORM build_fieldcatalog.
      wa_fieldcat-fieldname   = 'EBELN'.
      wa_fieldcat-scrtext_m   = 'Purchase Order'.
      wa_fieldcat-col_pos     = 0.
      wa_fieldcat-outputlen   = 10.
      wa_fieldcat-emphasize   = 'X'.
      wa_fieldcat-key         = 'X'.
      APPEND wa_fieldcat TO it_fieldcat.
      CLEAR  wa_fieldcat.
      wa_fieldcat-fieldname   = 'EBELP'.
      wa_fieldcat-scrtext_m   = 'PO Item'.
      wa_fieldcat-col_pos     = 1.
      APPEND wa_fieldcat TO it_fieldcat.
      CLEAR  wa_fieldcat.
      wa_fieldcat-fieldname   = 'STATU'.
      wa_fieldcat-scrtext_m   = 'Status'.
      wa_fieldcat-col_pos     = 2.
      APPEND wa_fieldcat TO it_fieldcat.
      CLEAR  wa_fieldcat.
      wa_fieldcat-fieldname   = 'AEDAT'.
      wa_fieldcat-scrtext_m   = 'Item change date'.
      wa_fieldcat-col_pos     = 3.
      APPEND wa_fieldcat TO it_fieldcat.
      CLEAR  wa_fieldcat.
      wa_fieldcat-fieldname   = 'MATNR'.
      wa_fieldcat-scrtext_m   = 'Material Number'.
      wa_fieldcat-col_pos     = 4.
      APPEND wa_fieldcat TO it_fieldcat.
      CLEAR  wa_fieldcat.
      wa_fieldcat-fieldname   = 'MENGE'.
      wa_fieldcat-scrtext_m   = 'PO quantity'.
      wa_fieldcat-col_pos     = 5.
      APPEND wa_fieldcat TO it_fieldcat.
      CLEAR  wa_fieldcat.
      wa_fieldcat-fieldname   = 'MEINS'.
      wa_fieldcat-scrtext_m   = 'Order Unit'.
      wa_fieldcat-col_pos     = 6.
      APPEND wa_fieldcat TO it_fieldcat.
      CLEAR  wa_fieldcat.
      wa_fieldcat-fieldname   = 'NETPR'.
      wa_fieldcat-scrtext_m   = 'Net Price'.
      wa_fieldcat-edit        = 'X'. "sets whole column to be editable
      wa_fieldcat-col_pos     = 7.
      wa_fieldcat-outputlen   = 15.
      wa_fieldcat-datatype     = 'CURR'.
      APPEND wa_fieldcat TO it_fieldcat.
      CLEAR  wa_fieldcat.
      wa_fieldcat-fieldname   = 'PEINH'.
      wa_fieldcat-scrtext_m   = 'Price Unit'.
      wa_fieldcat-col_pos     = 8.
      APPEND wa_fieldcat TO it_fieldcat.
      CLEAR  wa_fieldcat.
    ENDFORM.                    " BUILD_FIELDCATALOG
    *&      Form  BUILD_LAYOUT
          Build layout for ALV grid report
    FORM build_layout.
    Set layout field for field attributes(i.e. input/output)
      gd_layout-stylefname = 'FIELD_STYLE'.
      gd_layout-zebra             = 'X'.
    ENDFORM.                    " BUILD_LAYOUT
    *&      Form  DISPLAY_ALV_REPORT
          Display report using ALV grid
    FORM display_alv_report.
      gd_repid = sy-repid.
    call function 'REUSE_ALV_GRID_DISPLAY'
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY_LVC'
           EXPORTING
                i_callback_program      = gd_repid
               i_callback_user_command = 'USER_COMMAND'
                is_layout_lvc               = gd_layout
                it_fieldcat_lvc             = it_fieldcat
                i_save                  = 'X'
           TABLES
                t_outtab                = it_ekko
           EXCEPTIONS
                program_error           = 1
                OTHERS                  = 2.
      IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    ENDFORM.                    " DISPLAY_ALV_REPORT
    *&      Form  DATA_RETRIEVAL
          Retrieve data form EKPO table and populate itab it_ekko
    FORM data_retrieval.
      SELECT ebeln ebelp statu aedat matnr menge meins netpr peinh
       UP TO 10 ROWS
        FROM ekpo
        INTO  CORRESPONDING FIELDS OF TABLE it_ekko.
    ENDFORM.                    " DATA_RETRIEVAL
    *&      Form  set_specific_field_attributes
          populate FIELD_STYLE table with specific field attributes
    form set_specific_field_attributes .
      DATA ls_stylerow TYPE lvc_s_styl .
      DATA lt_styletab TYPE lvc_t_styl .
    Populate style variable (FIELD_STYLE) with style properties
    The NETPR field/column has been set to editable in the fieldcatalog...
    The following code sets it to be disabled(display only) if 'NETPR'
    is gt than 10.
      LOOP AT it_ekko INTO wa_ekko.
        IF wa_ekko-netpr GT 10.
          ls_stylerow-fieldname = 'NETPR' .
          ls_stylerow-style = cl_gui_alv_grid=>mc_style_disabled.
                                                 "set field to disabled
          APPEND ls_stylerow  TO wa_ekko-field_style.
          MODIFY it_ekko FROM wa_ekko.
        ENDIF.
      ENDLOOP.
    endform.                    " set_specific_field_attributes
    Cheers!!
    VEnk@

  • How to make column editable in Normal ALV report

    Hi experts,
                       I Have one push button In ALV tool bar like Fields to be change..when i click this..i need to get one pop up with all fields which is having in Filedcatalog..so i need to doule click on any field which i want to be midified..then in ALV that particular entire  column should be editable.Can anybody please help me what is procedure to get pop up with fields..
    Thanks & regards,
    Veena..

    here is the required code
    type-pools: slis.
    types: BEGIN OF TY_MKPF,
            MBLNR TYPE MKPF-MBLNR,
            MJAHR TYPE MKPF-MJAHR,
            VGART TYPE MKPF-VGART,
            BLART TYPE MKPF-BLART,
            BLAUM TYPE MKPF-BLAUM,
          END OF TY_MKPF.
    TYPES:         BEGIN OF TY_WA, "STRUCTURE FOR POP UP ALV
                   CHECK TYPE C,
                   FIELDNAME TYPE DFIES-FIELDNAME,
                   FIELDTEXT TYPE DFIES-FIELDTEXT,
    END OF TY_WA.
    data: lt_mkpf type table of ty_mkpf,
          ls_mkpf type mkpf,
          IT TYPE TABLE OF TY_WA,  "INTERNAL TABLE FOR POP UP ALV
          WA TYPE TY_WA,           "WA FOR POP UP ALV
          IT_FCATP TYPE SLIS_T_FIELDCAT_ALV, "FCAT FOR POP UP ALV
          WA_FCATP LIKE LINE OF IT_FCATP, "WA FOR POP UP ALV
          ok_code type sy-ucomm,
          lt_fcat type lvc_t_fcat,
          ls_fcat type lvc_s_fcat.
    data: o_alv type ref to cl_gui_alv_grid,
          o_doc type ref to cl_gui_docking_container.
    start-of-selection.
    select  MBLNR
            MJAHR
            VGART
            BLART
            BLAUM
    into corresponding fields of table lt_mkpf from mkpf up to 100 rows.
    *---create fieldcatalog
    clear ls_fcat.
    ls_FCAT-FIELDNAME = 'MBLNR'.
    *WA_FCAT-TABNAME = WA-TABNAME.
    ls_FCAT-REF_TABLE = 'MPKPF'.
    ls_FCAT-REF_FIELD = 'MBLNR'.
    APPEND ls_FCAT TO lT_FCAT.
    clear ls_fcat.
    ls_FCAT-FIELDNAME = 'MJAHR'.
    *WA_FCAT-TABNAME = WA-TABNAME.
    ls_FCAT-REF_TABLE = 'MPKPF'.
    ls_FCAT-REF_FIELD = 'MJAHR'.
    APPEND ls_FCAT TO lT_FCAT.
    clear ls_fcat.
    ls_FCAT-FIELDNAME = 'VGART'.
    *WA_FCAT-TABNAME = WA-TABNAME.
    ls_FCAT-REF_TABLE = 'MPKPF'.
    ls_FCAT-REF_FIELD = 'VGART'.
    APPEND ls_FCAT TO lT_FCAT.
    clear ls_fcat.
    ls_FCAT-FIELDNAME = 'BLART'.
    *WA_FCAT-TABNAME = WA-TABNAME.
    ls_FCAT-REF_TABLE = 'MPKPF'.
    ls_FCAT-REF_FIELD = 'BLART'.
    APPEND ls_FCAT TO lT_FCAT.
    clear ls_fcat.
    ls_FCAT-FIELDNAME = 'BLAUM'.
    *WA_FCAT-TABNAME = WA-TABNAME.
    ls_FCAT-REF_TABLE = 'MPKPF'.
    ls_FCAT-REF_FIELD = 'BLAUM'.
    APPEND ls_FCAT TO lT_FCAT.
    *---collect the field names of alv in a itab
    clear wa.
    WA-FIELDNAME = 'MBLNR'.
    WA-FIELDTEXT = 'Number of Material Document'.
    APPEND WA TO IT.
    clear wa.
    WA-FIELDNAME = 'MJAHR'.
    WA-FIELDTEXT = 'fiscical year'.
    APPEND WA TO IT.
    clear wa.
    WA-FIELDNAME = 'VGART'.
    WA-FIELDTEXT = 'Transaction/Event Type'.
    APPEND WA TO IT.
    clear wa.
    WA-FIELDNAME = 'BLART'.
    WA-FIELDTEXT = 'Document Type'.
    APPEND WA TO IT.
    clear wa.
    WA-FIELDNAME = 'BLAUM'.
    WA-FIELDTEXT = 'Document type of revaluation document'.
    APPEND WA TO IT.
    *----------create field catalog
    CLEAR WA_FCATP.
    WA_FCATP-FIELDNAME = 'CHECK'.
    WA_FCATP-SELTEXT_M = 'Selection Field'.
    WA_FCATP-TABNAME = 'IT'.
    APPEND WA_FCATP TO IT_FCATP.
    CLEAR WA_FCATP.
    WA_FCATP-FIELDNAME = 'FIELDNAME'.
    WA_FCATP-TABNAME = 'IT'.
    WA_FCATP-REF_TABNAME = 'DFIES'.   "CHECK IN SE11 TYPE GROUP SLIS
    WA_FCATP-REF_FIELDNAME = 'FIELDNAME'. "CHECK IN SE11 TYPE GROUPB u201CSLIS
    APPEND WA_FCATP TO IT_FCATP.
    CLEAR WA_FCATP.
    WA_FCATP-FIELDNAME = 'FIELDTEXT'.
    WA_FCATP-TABNAME = 'IT'.
    WA_FCATP-REF_TABNAME = 'DFIES'.   "CHECK IN SE11 TYPE GROUP SLIS
    WA_FCATP-REF_FIELDNAME = 'FIELDNAME'.  "CHECK IN SE11 TYPE GROUPB SLIS
    APPEND WA_FCATP TO IT_FCATP.
    CLEAR WA_FCATP.
    call screen 100.
    *&      Module  STATUS_0100  OUTPUT
    *       text
    MODULE STATUS_0100 OUTPUT.
      SET PF-STATUS '100'.
    *  SET TITLEBAR 'xxx'.
      if o_doc is not bound.
    CREATE OBJECT O_DOC
      EXPORTING
        RATIO                       = 95.
    CREATE OBJECT O_ALV
      EXPORTING
        I_PARENT          = o_doc.
      endif.
    CALL METHOD O_ALV->SET_TABLE_FOR_FIRST_DISPLAY
      CHANGING
        IT_OUTTAB                     = lt_mkpf
        IT_FIELDCATALOG               = lt_fcat.
    ENDMODULE.                 " STATUS_0100  OUTPUT
    *&      Module  USER_COMMAND_0100  INPUT
    *       text
    MODULE USER_COMMAND_0100 INPUT.
    CASE OK_CODE.
    WHEN 'BACK'.
    CLEAR :O_ALV,
           O_DOC.
    LEAVE TO SCREEN 0.
    when 'CHNG'.
    CALL FUNCTION 'REUSE_ALV_POPUP_TO_SELECT'
      EXPORTING
       I_TITLE                       = 'select fields to make it editable'
       I_ZEBRA                       = 'X'
       I_CHECKBOX_FIELDNAME          = 'CHECK'
        I_TABNAME                     = 'IT'
       IT_FIELDCAT                   = IT_FCATP
      TABLES
        T_OUTTAB                      = it.
    loop at it into wa where check = 'X'.
    *---change fieldcatalog dynamacally
    case wa-fieldname.
    when 'MBLNR'.
    read table lt_fcat into ls_fcat with key fieldname = wa-fieldname.
    if sy-subrc = 0.
    ls_fcat-edit = 'X'.
    endif.
    when 'MJAHR'.
    read table lt_fcat into ls_fcat with key fieldname = wa-fieldname.
    if sy-subrc = 0.
    ls_fcat-edit = 'X'.
    endif.
    when 'VGART'.
    read table lt_fcat into ls_fcat with key fieldname = wa-fieldname.
    if sy-subrc = 0.
    ls_fcat-edit = 'X'.
    endif.
    when 'BLART'.
    read table lt_fcat into ls_fcat with key fieldname = wa-fieldname.
    if sy-subrc = 0.
    ls_fcat-edit = 'X'.
    endif.
    when 'BLAUM'.
    read table lt_fcat into ls_fcat with key fieldname = wa-fieldname.
    if sy-subrc = 0.
    ls_fcat-edit = 'X'.
    endif.
    endcase.
    modify lt_fcat from ls_fcat index sy-tabix transporting edit.
    clear ls_fcat.
    endloop.
    *---change fieldcatalog dynamically
    CALL METHOD O_ALV->SET_FRONTEND_FIELDCATALOG
      EXPORTING
        IT_FIELDCATALOG = lt_fcat
    *CALL METHOD O_ALV->REFRESH_TABLE_DISPLAY
    **  EXPORTING
    **    IS_STABLE      =
    **    I_SOFT_REFRESH =
    **  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.
    ENDCASE.
    ENDMODULE.                 " USER_COMMAND_0100  INPUT
    Edited by: zjason on Dec 29, 2010 7:47 AM
    Edited by: zjason on Dec 29, 2010 7:52 AM
    Edited by: zjason on Dec 29, 2010 7:54 AM

Maybe you are looking for

  • NFe de devolução com referencia a Cupom Fiscal - Versão 3.10

    Olá pessoal, boa tarde! Tenho o seguinte cenário em uma instalação de IS-Retail. O sistema legado no PDV não emite notas fiscais eletrônicas para acobertar processos de devolução de vendas. Este processos, eram realizados no ECC para a versão 2.0 sem

  • My IPhone 3G reception fixed, a new problem - AT&T *real* data speeds

    I've read quite a few topics on this forum regarding the poor IPhone 3G reception, and unfortunately 99% of them are emotions, making it very laborious to distill useful info out of them. Therefore I'd like to post my personal experience so far with

  • Errors generating Java classes from XML schema

    I received the following errors when generating Java classes from the schema located at: http://imsproject.org/xsd/ims_qti_rootv1p1.xsd and http://imsproject.org/xsd/ims_xml.xsd XML Spy v4 claims that the schema is well-formed and valid. Could this b

  • How to display error message raised by stored procedure in ADF Faces ?

    Hi all, From my jspx page, I call a stored procedure wrapped by a custom service method in apps module. Based on certain condition in the stored procedure, e.g : NO DATA FOUND EXCEPTION, I raised a custom error from the stored procedure : RAISE_APPLI

  • AS3 sucks !!! Why can't access a simple movieClip ???

    Hi People, Please - it's as simple as that: I have a stageand there is a movieClip instance called "obiekt" in it. Inside "obiekt" movieClip there are two other clips. One instance is called "z1" and another one is called "z2". Presume I have a event