Conditional row editing in REUSE_ALV_GRID_DISPLAY

Hi All,
I am using REUSE_ALV_GRID_DISPLAY for ALV display. In ALV, one column is made editable by supplying edit mode in layout. Here i want to edit this column only for few records and not for all records.
How can i achieve this. I know the way out in ALV-OOPS but i want to do this in classical ALV only.
Best Regards
Munish Garg

Hi,
Add one check box in your alv report. so based on ur selection of the check box you can edit the column rest of all in non editable mode.
Adding columns dynamically into an ALV report..
Ram.

Similar Messages

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

  • 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

  • Report with Row Edit capability

    When creating a report, what are the components that enable row edit capability. A few basic reports I generate do not have this capability. How would I change an existing report to allow row edits and then linking to a form to edit content.
    Thanks,
    BT

    <p>BT,</p>
    <p>If you're looking for reports which contain for every row an extra column with a link to a form to edit content, you will find an example in the Demonstration Application ( look for About the Customers Page). If you're looking for a report with editable fields then you'll need collections, see the following example Taking up Collections.</p>
    <p>If you're changing existing reports, adding an extra column is an easy solution but you will have to build forms if they not exists already. In the case of collections you'll have to rewrite all you're reports queries and build separate DML processes as well.
    Unfortunately, making a report editable is not just a toggle.</p>
    <p>With kind regards,</p>
    <p>Jornica</p>

  • 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

  • Issue using cross dissolve in my 'top row' edit

    Hi, in the opening of my video I have an opaque map with footage of a swimming pool behind.
    To create this, I have used the swimming pool footage on my bottom row of the timeline and the map (a still image) on the top row. I am trying to add a cross dissolve to the end of the map footage so the transition between the map disappearing and the pool being shown in full is not so sharp.
    However, I cannot add a cross dissolve to the top row edit in the same way I can to the bottom row.
    I have recreated the problem below.
    1 - When adding to the top row, the cross dissolve highlights the whole clip.
    2 - when I drop the cross dissolve in, it appears at the start and end of the clip and creates a black box behind the clip on the timeline. When this box appears, I get a quicktime error when I try to share the film. I can then delete either of the cross dissolves, but I cannot delete the black box
    3 - when I add the cross dissolve to my bottom row, I have no such problems. The dissolve drops easily between two clips.
    This is not an issue with the length of my top row clips. I have tested and checked.
    This seems to be a bug when adding cross dissolve to a top row edit.
    Has anybody else experienced this? Any ideas why this happens?
    Thanks, Dan

    ledanjohnson wrote:
    Thanks for putting me right on the background box Luis.
    I re-rendered, but this hasn't fixed my problem.
    However I now think that the problem is with the map image. When I remove it, I can share my file.
    Two things to try:
    1) Don't rerender; turn off background rendering; delete render files once more and try
    2) You may be right that the problem may be with the map image. So: what format, and size is it?
    Does the export work if you replace it with some other image (but otherwise do the same edit you wanted)?
    If you want, send me the file by e-mail and I will try it here. (My address is in my profile)

  • JSF multi row editable detail form -- moving backwards or forward

    Innocently trying to create an intuitive editable master detail JSF form. Similar to what you would want in any application and something that can be done in less than a minute in Oracle Forms
    The master form is a just a simple editable single master form based on the dept table. and the detail is the emp table. I have create the model using the wizard and made sure a link view is created.
    The details form is a multirow form with all the editable columns
    I added two button for the details form (create, remove)
    I entered the master record (no commit yet)
    then i moved the cursor to the details form and created a few records, i found an error in the second row in the detail form, therefore, innocently, i selected that row and pushed the Remove button. shocked to find out that the first row in the details form is deleted regardless of which row is selected. Additionally, when a row is created using the create button, the row is created above the first row of the details form (as if the first row in the details form is always current).
    Such requirement should be easily satisified by a Framework?
    Ammar Sajdi
    Oracle
    Amman

    thank you frank for your response
    Actually, my DETAILS form DOES include the Select Option, and i was really expecting (and accepting) the fact that i need to point to the row i need to delete. Actually, 20 years back i was 8080 assembly language programmer, and used to handle thing at very very low level. However, i do select a row, and i can see the Radio activated for that row, unfortunately though, the seemingly selected item in the DETAILS form is not the one that is removed, it is instead, the first row that is actually removed. It seems as if the form rows are not synchronized with the ROW selector you mentioned,, The first row is somehow internally selected (always)
    This is the interesting part.
    I created another project with a single multi row editable table (without master details) only a master, and guess what, it is working beautifully! exactly as you descirbed. Select a row, press delete and there you go, the record no longer exists
    Ammar Sajdi
    visit me
    www.e-ammar.com/Oracle.htm
    regards

  • Multi row edit without having to use htmldb field

    Hi guys,
    a question: have someone ever implemented a multi-row edit report, like the one on Oracle HTML DB Handbook, without having to use htmldb field?
    If so how? Only describe the steps or provide me some links. I think is enough.
    Other little question:
    When you use the syntax like:
    htmldb_application.g_f05(i) (inside a for loop), can i use another naming style instead of using gf05 ?
    Let's assume that g_f05 is sal, for me would me more clear use a synthax like htmldb_application.sal(i).
    I think would be a good improvement in the future version of APEX.
    I
    thank you very much

    hey,
    i think that what i saw in the sample application / section admin can't work for my needs, such i'have a quite complex query (pl/sql f body ret sqlquery).(infact the demo is based on a simple query, while i need to use a psqlf.b.r.q)
    However what i need is only a row selector, using a report based on a psqlf.b.r.q.
    By me i've to use the htmldb_item.
    Maybe for my purpose a collection can simplify the problems, however this is briefly what i'm trying to do:
    I've 2 set of data.
    D1 and D2.
    D1 is based on complex filter(which i think it can't be managed from a normal query at all / you have to use pfbrq)
    D2 is not(quite simple).
    D1 AND D2 have the same type and nr of columns.
    The user can choose from a radio group this 3 mode of view.
    1 - The user see D1 (UNCHECKED) UNION D2 (CHECKED).
    2 - The user see only D2. CHECKED.
    3 - The user see only D1 UNCHECKED.
    Both D1/D2 can be displayed in the same report.
    If Data of D1 are already in D2 they are checked.
    (i think here a not in select can do quite well the job).
    Hope that somebody understand what i've tried to explain, or maybe has had the same type of problem.
    Thank's a lot
    Message was edited by:
    Marcello Nocito
    Message was edited by:
    Marcello Nocito

  • JSP Multi Row Edits and Struts Validator

    Hello,
    I followed this howto: http://www.oracle.com/technology/products/jdev/tips/mills/JSP_Multi_Row_Edits.html and implemented multi row editing. Now I'd like to use Struts Validator for validating data in multiple rows. Is there any howto document on this subject?
    Thanks,
    Anna

    I think I will have to look inside the JHeadStart source code that extends DataAction, understand how that code works, and finally get the pieces I'm interested in...

  • New rows editable in ALV

    Hi Friends ,
    I want to make newly inserted blank rows editable in OO ALV  and already existing rows should be in display mode only.Can anybody help me to do it ?
    Thanks ,
    Joby

    Hi Joby,
    data decl ....   put list of fld names here which are reqd to be editable .....
           l_wa_style-fieldname = 'QUAN_ENTER'.
    * Make the field editable
          l_wa_style-style = cl_gui_alv_grid=>mc_style_enabled.
          insert l_wa_style into table wa_final_popup-style.
          clear l_wa_style.
          l_wa_style-fieldname = 'CHK_BOX'.
    * Make the field editable
          l_wa_style-style = cl_gui_alv_grid=>mc_style_enabled.
          insert l_wa_style into table wa_final_popup-style.
          clear l_wa_style.
    types:
    * To hold the final output of the Pop-up
    begin of x_final,
            chk_box       type char1,     " Checkbox
            vbeln         type vbeln_va,  " SD Document No.
            posnr         type posnr_va,  " Item Number
            matnr         type matnr,     " Material Number
            available_qty type kwmeng,    " Available Qty
            quan_enter    type kwmeng.    " Qty Entered
    types   style         type lvc_t_styl." For style
    types end of x_final.
    layout preperation ....
    *&      Form  SUB_PREPARE_LAYOUT
    * Populate the lay-out
    * No Parameters
    form sub_prepare_layout .
    *Populate the Grid Layout details
      wa_layout-cwidth_opt = 'X'.
      wa_layout-zebra      = 'X'.
      wa_layout-cwidth_opt = 'X'.
      wa_layout-no_toolbar = 'X'.
      wa_layout-no_rowmark = 'X'.
      wa_layout-stylefname = 'STYLE'.
    endform.                    " SUB_PREPARE_LAYOUT
    Regards,
    Amitava

  • 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

  • Dynamic coloring of rows using FM (Reuse_alv_grid_display.)

    I need to color the rows depending on the condition dynamically . I am using FM Reuse_alv_grid_display for ALV . I have the code using Oops Concept, But i need to know how can we do using the Function Module. Please Clarify

    Hi,
    In the final internal table you declare one fieldsline_col(4) type c.
    Data: begin of itab occurs 0, "final internal table.
          line_col(4) type c,.
         end of itab.
    IF .......your condition.
        loop at itab.
          if itab-WERKS = '1000'.
            itab-line_col = 'C600'.
          endif.
          modify itab.
          clear itab.
        endloop.
    Next build your FIELDCATALOG ......
        gt_layout-zebra = 'X'.
        gt_LAYOUT-DETAIL_POPUP = ' '.
        gt_layout-info_fieldname = 'LINE_COL'.
    Next pass this to your FM.
    I hope this will help you.
    Thanks.
    If your issue is solved award points and close the thread if not revert back.
    Message was edited by: Deepak333 k
    Message was edited by: Deepak333 k

  • Disable row edit

    Hi All,
    I found this:
    http://blog.classsoftware.com/index.cfm/2007/6/11/Flex-Datagrid-Edit-Cell-on-Row-Click
    How can I do the other way around?
    I have a column that is enable for edit but base in some condition I want to disable the edit for entire row in my datagrid.
    Thanks
    Johnny

    How Alex?
    I add ITEM_EDIT_BEGINNING event in my advanced datagrid to call a function like:
    private function disableRow(event:AdvancedDataGridEvent):void{
       if(event.dataField=="FIELD_03"){
           var temp:String = event.itemRenderer.data["FIELD_02"]; //Here I capture value of my 2nd column
           if (temp == "MyCondition")
              //Here I want to block the editing                   
    Thanks for your help and reply.
    Johnny

Maybe you are looking for

  • You can ignore this question

    You can ignore this message. I posted a question but then realized I was just confused and I figured out the answer. However, I don't see a way to delete this message. But please ignore it. Hi. I just upgraded to ITunes 11. I also have an IPod Touch.

  • Bluetooth slows down wifi internet connectiom

    i just bought a magic mouse that uses bluetooth but when i turn on bluetooth on my imac my internet connection slows down, way....down my question is what do you do so that the bluetooth do not intervere my wifi signal...realy need your advise cause

  • F.13  does not clear all   documents

    Hi F.13    does  clearing of  some documents.   There are many  which  balance to zero.   I  have  set  following for  customer ZUONR, VBUND, WRBTR Thanks kamala

  • SCORM import to LMS fails

    I get an error when trying to import a SCORM package created by Captivate 3 into my Kallidus LMS. Anyone seen something like this? The Kallidus LMS uses a "content import wizard", and it seems to load almost everything, but at the end cuts out with a

  • Web archives and static content

    Most (at least all that I have seen) of the documentation and discussions surrounding Web Archives seem to assume that the web applications static content (images, ..etc) will always reside within the WAR. If your application contains a large amount