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

Similar Messages

  • 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

  • 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 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_

  • How to make Single row of an entire collumn of table control- Changeable

    Hi ,
        In Module Pool , in table control , I've all the rows in a specific column as "read only". However, with a specific "if statement" I want one row of that column as editable.
    For example ,
                       if  itab-name1 = 'PRITHVI'.
                    Make that row, editable.
                    Keep the rest of the column unaffected.
    I used the following code in my program in PBO:
    module STATUS_0005 output.
    Loop AT SCREEN .
      if screen-name = '%#AUTOTEXT009'
       AND I_MARKLIST-STUDENT_NAME1 = 'SUNIL SHARMA'.
        SCREEN-INPUT = '1'.
        MODIFY SCREEN.
        ENDIF.
        ENDLOOP.
    endmodule.
    I've tried this, but in vain .. ! Please give me suitable solutions ASAP.

    Hi,
    try like this..
    in the PBO of screen flow logic..
    loop at I_MARKLIST with control tc.
      MODULE CHANGE.
    endloop.
    IN THAT CHANGE MODULE WRITE...
    IF I_MARKLIST-STUDENT_NAME1 = 'SUNIL SHARMA'.
    LOOP AT SCREEN.
      IF SCREEN-NAME = '%#AUTOTEXT009'.
       SCREEN-INPUT = 1.
      ELSE.
       SCREEN-INPUT = 0.
       MODIFY SCREEN.
      ENDIF.
    ENDLOOP.
    ELSE.
    LOOP AT SCREEN.
      SCREE-INPUT = 0.
      MODIFY SCREEN.
    ENDLOOP.
    ENDIF.

  • 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

  • Single row editing for multiple tables in a single page

    Hi!
    I have split a table with many many columns into more tables with a lower number of columns. There is an ID column (sequence generated) that is Primary Key common for all tables. Obviously, the relationship between these tables is 1 to 1, so it’s not about having to build master-detail pages.
    What I need now is to edit all these tables in a single page: one single row from each table. The Automated Row Fetch & Automatic Row Processing (DML) processes used for the old table must be replaced by something else.
    Is there a way to use in a single page more pairs of such processes for more tables?
    I want to avoid manually writing processes with lot of PL/SQL code to handle row fetch & update.
    Keep in mind that the page will have an ID item that can be used to identify unique rows in all my tables.
    Thanks,
    Sorin

    I have split a table with many many columns into more tables with a lower number of columns
    IMHO that is a very bad idea. There is nothing wrong with having many columns in a table. If you would like to split them to better "categorize" them, just create views on the table and expose different subsets of the columns.
    I want to avoid manually writing processes with lot of PL/SQL code to handle row fetch & update.
    That is unavoidable given how you have designed the underlying tables.
    You could try creating a view that joins all the tables by the PK and creating a form based on that view. Then write a INSTEAD OF trigger on the view that "doles out" the DML on the view to each of the underlying tables.

  • How to make single rows in tables readonly

    Hi All,
    We have a table that is populated with data from a database read. One of columns in the read acts as a flag. If it is found that particular row is suppose to be readonly. During the read a check is done and if it is is found we call a simple javascript function that should make that row readonly.
    The Code looks like this:
    Code:
    function disableRow (rowIndex) {
      var table = document.all.mainTable;
      var rowAttend = eval("document.all['" + idAttendRow + eval(rowIndex) + " ']");
      var rowVolume = eval("document.all['" + idVolumeRow + eval(rowIndex) + " ']");
      if (table) {
        for (var c=0; c < rowAttend.cells.length; c++) {
          //rowAttend.cells[c].style.backgroundColor = "#1AA047";
          //rowAttend.cells[c].disabled = true;
          rowAttend.cells[c].readOnly = true;
        for (var c=0; c < rowVolume.cells.length; c++) {
          //rowVolume.cells[c].style.backgroundColor = "#1AA047";
          //rowAttend.cells[c].disabled = true;
          rowAttend.cells[c].readOnly = true;
    The colour and disable functions work fine but I can't make the readOnly work. Any help would be great. The cells are a combination of dropdowns and input fields.
    Cheers

    Hi Luke,
    You can't set readonly attribute for cells, because there's no such attribute for cells (tag <td>) in HTML DOM. It will not raise any javascript error, because javascript and HTML DOM allow you to add your customized attribute. In your case "readOnly" will treated as customized attribute.
    In HTML DOM, cells was treated as a container inside row (tag <tr>), it's not an input, that's why it doesn't have readonly property.
    However you can disable all DOM inside cells by set its disabled attribute into true, and that's what your previous code do. But becarefull, if you do this, you can't get all value inside that cell when you submit the Form.
    Usually if I'm facing this problem, I will update the disabled attribute into false, just before submit the form.
    Hope this help
    Regards
    David
    ps:
    1. If you want to disable all cells in one row, just disable the row, it will automatically disable all cells inside it, it will improve your javascript performance.
    2. Your javascript will only work for IE, if you want it to work with other browser, change "document.all[]" with "document.getElementById()"

  • How to make certain rows editable in hierachy alv

    HI,
    i have called one alv function module where i have done certain fields editable by making fieldcatalog-edit = 'X' and fieldcatalog-input = 'X'.But i have to make the selected rows (based on checkbox in the output list) editable.any idea?

    Hello Priya,
    1) If u want to make fields of an ALV to be editable based on certain conditons then see the following code.
    First create an extra field in ur internal table.
            celltab TYPE lvc_t_styl,
    After that pass this field to the layout.
      gw_layout-stylefname = 'CELLTAB'.
    Here the layout structure is defined as
    gw_layout TYPE lvc_s_layo
    now based on the condition u can set the fields editable or non editable.U can check the following code.
      DATA: ls_celltab TYPE lvc_s_styl.
      ls_celltab-fieldname = 'CHK'.
      ls_celltab-style = cl_gui_alv_grid=>mc_style_disabled.
      MODIFY gw_final-celltab FROM ls_celltab
      TRANSPORTING style
      WHERE fieldname = ls_celltab-fieldname.
      IF sy-subrc NE 0.
        INSERT ls_celltab INTO TABLE gw_final-celltab.
      ENDIF.
    Now if ur using OO-ALV then pass the layout to the method.
    If ur going by Function modules then u need to call the following function module.
      gw_layout-stylefname = 'CELLTAB'.
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY_LVC'
        EXPORTING
          i_callback_program       = sy-cprog
          i_callback_pf_status_set = 'PF_STATUS'
          i_callback_user_command  = 'USER_COMMAND'
          is_layout_lvc            = gw_layout
          it_fieldcat_lvc          = gi_fieldcat
        TABLES
          t_outtab                 = gi_final
        EXCEPTIONS
          program_error            = 1
          OTHERS                   = 2.
      IF sy-subrc <> 0.
        MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      ENDIF.
    2) If u want to read the changed contents from ALV grid back to ur program then use the following function modules.
        CALL FUNCTION 'GET_GLOBALS_FROM_SLVC_FULLSCR'
            IMPORTING
              e_grid = l_ref1.
          CALL METHOD l_ref1->check_changed_data
            IMPORTING
              e_valid = lv_valid.
    Shafi

  • Make a Field editable in webdynpro

    Hi experts,
        i have one webdynpro page ,which contains these 3 fields.
    2 number fields and one date field....
      2 number fields up to 2 decimal. Should be editable if user click on "modify" button. otherwise read-only.
    Date field. Should always be read-only. once user click on the "save" button, this field should be automatically set to the current date (user or system).
    can anybody please give the logic for modify action and save action....
    Thanks& regards,
    Praveena.

    Hi Praveena,
    Every innput field has a property called ENABLED.
    You can bind this property to some attribute in the context (of type wdy_boolean).
    and on the SAVE action yoh can set the context attribute to TRUE/FALSE as per requirement.
    and for Current Date
      DATA lo_nd_node1 TYPE REF TO if_wd_context_node.
      DATA lo_el_node1 TYPE REF TO if_wd_context_element.
      lo_nd_node1 = wd_context->get_child_node( name = wd_this->wdctx_node1 ).
      lo_el_node1 = lo_nd_node1->get_element( ).
      lo_el_node1->set_attribute(
      name =  `DATE`
      value = sy-datum ).
    Where node 1 is the node in the CONTEXT.
    DATE is the attribute in the node1 of type DATUM.
    write the above code on SAVE action.
    Hope this will help you.
    Thanks & Regards,
    Arvind

  • Make Invisible the table in webdynpro ABAP

    hello all,
    i have a requirement where i have two tables in a tray on one condition  i have to invisible the second table.
    can one suggest is it possible, if yes how?
    what i have done is in a tray i put 2 tables and the buttons.Is it the right way ??
    Please Help me.
    Thanks,
    BSREDDY

    Hi,
    Tray is used to have expand/collapse the data to be shown to utilise the space.
    Create a context attribute for visisbiity as WDUI_VISIBILITY and bind it to the visible property of the
    2nd table.
    based on the condition use the SET_ATTRIBUTE method of the if_wd_context_node and
    set it to 01(None) or Visible (02).
    lo_nd_previous->set_attribute(
        EXPORTING
          name =  'VISIBLE'
          value = 01 ).
    You can use the tabstrip inside the Tray, where each table is shown inside the tab.
    Do you want to show the 2tables at a time or only table to be shown.
    Where are the buttons placed.
    If you want to show the tables all the time to the user then use Tranparent containers otherwise you can
    use the Tray.
    Regards,
    Lekha.

  • 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

  • Iview from webDynpro ABAP with Adobe interactive form

    Hi gurus.
    Can I make an iview from a webDynpro ABAP that generates an Adobe Interactive Form, and generate this form from the portal as well?
    thanks in advanced,
    Dieuba

    Chintan thanks for your reply.
    Using Adobe Cycler Designer you can design an interactive Form (fields to be filled by the client, buttons, etc.) and you can integrate this with webDynpros ABAP and JAVA. I want to make an iview that connects with this webDynpro and also generates this form to be filled by the user, so it can send the data back to the sap system.

  • Editing rows and columns in alv reports in webdynpro abap

    how edit row and columns in webdynpro abap ?
    can i add colors to salv repotrs for below and above range of values  how ?
    if possible send source code for it.............

    hi
    check out this link for editing the columns of ALV
    https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/d0155eb5-b6ce-2b10-3195-d9704982d69b
    check out for this thread as well for coloring ALV
    Coloring of selected table cells: Ideas wanted
    regards,
    amit

  • Make entries in a table in webdynpro abap

    Hi all,
    We have a requirement to make multiple entries in a Table in webdynpro ABAP.
    We have created a table and inserted inputfield as cellEditor
    but at runtime it is being displayed in readonly mode we cannot enter anything in that inputfield.
    inputfield is binded with a context and table is not in readonly mode.
    Please help in this regards
    thanks & regards.....
    Gaurav Makin

    Hi Gaurav,
    Make sure the context node bound to the table has cardinality 0..N.
    When the app starts you probably need to read the table contents from the database or some other source and populate the contect node.
    The table will allow the user to edit values only for the rows that have a corresponding element in the context node.
    If the initial content is empty, i.e. no elements in the context node then the user will not be able to edit.
    You will need to either initialize the context node with a bunch of elements if the number of entries is fixed and known beforehand,  or provide a way for the user to create a new row.
    You can do this by adding a toolbar to the table with a create button with a CREATE action and the following method:
    method onactioncreate.
      data:
        lo_element type ref to if_wd_context_element,
        lo_node    type ref to if_wd_context_node.
      lo_node = wd_context->get_child_node( name = 'your node name here' ).
      lo_element = lo_node->create_element( ).
      lo_node->bind_element( new_item = lo_element set_initial_elements = abap_false ).
    endmethod.
    Regards... Lucio Menzel

Maybe you are looking for

  • Photoshop CS2 and Blackbook

    I am about to buy the black macbook and I have photoshop CS2, will it run on this computer? Thanks.

  • Help with urlDecode

    greetings, I have a form on my web site that will remember you information from the last time you filled it out. Upon submitting the form, I store the values in a cookie using javascript. When you load the form the next time, I use JSP to read in the

  • No Clearing document in FCKR

    Gurus, I was able to successfully create a cleared check via FCKR. The is marked as paid in my check register. However, it's not posting a clearing document automatically. It's creating a session with session name that I give-ERR and I have to execut

  • Serial Numbers on an RFID Tag

    I am new to RFID technology. My question is: Can 1 RFID tag be designed to capture and transmit 5 non-consecutive serial numbers contained in 1 container box? If you can tell me if this is possible with minimum effort or much effort, please let me kn

  • Can't Request free Mountain lion download!

    there's nothing to click on for me at http://www.apple.com/osx/uptodate/ to request code for the free download. Am I missing something or is this page loading wrong for me?