Editable cell in "REUSE_ALV_HIERSEQ_LIST_DISPLAY"

Hello experts,
    Do anyone know how to make an editable row in a HIERSEQ ALV LIST.
I am using FM REUSE_ALV_HIERSEQ_LIST_DISPLAY for displaying my ALV.
Rgds
Sandeep

Hi,
Please refer to the standard demo program
BCALV_TEST_HIERSEQ_LIST_EVENTS
Thanks,
Sriram Ponna.

Similar Messages

  • How to select a color of cell in REUSE_ALV_HIERSEQ_LIST_DISPLAY

    Hi.
    I need to select a color of a cell in REUSE_ALV_HIERSEQ_LIST_DISPLAY.
    I have found an example, but 
    It shows how to select a color of sell in REUSE_ALV_LIST_DISPLAY.
    Can you give me an example of code?
    Thanks.

    Here ia a simple example of the method how to paint a cell / line / column using REUSE_ALV_HIERSEQ_LIST_DISPLAY  function.
      Programm:    zalv_hierseq_color
      Paint a line, a colomn, or a cell
      using REUSE_ALV_HIERSEQ_LIST_DISPLAY
      Victor Stupin, Russia 2009
    REPORT zalv_hierseq_color.
    TABLES: spfli.
    TYPE-POOLS: slis.
    SELECTION-SCREEN BEGIN OF BLOCK rad1.
    PARAMETERS:
            p_row TYPE i,
            p_col TYPE i.
    SELECTION-SCREEN SKIP.
    SELECTION-SCREEN ULINE.
    SELECTION-SCREEN COMMENT /1(50) comm1.
    SELECTION-SCREEN COMMENT /1(50) comm2.
    SELECTION-SCREEN COMMENT /1(50) comm3.
    SELECTION-SCREEN END OF BLOCK rad1.
    INITIALIZATION.
      comm1 = 'Paint a line: fill ONLY p_row (p_col is empty)'.
      comm2 = 'Paint a colomn: fill ONLY p_col (r_row is empty)'.
      comm3 = 'Paint a cell: fill P_COL and R_ROW'.
      DATA:
            t_fieldcat TYPE slis_t_fieldcat_alv,
            fs_fieldcat LIKE LINE OF t_fieldcat,
            fs_layout TYPE slis_layout_alv ,
            w_color(4) ,
            w_row TYPE i,
            w_fieldname(20),
            w_prog TYPE sy-repid.
      DATA:
      BEGIN OF t_spfli OCCURS 0,
            color(4),
            checkbox ,
            cell     TYPE slis_t_specialcol_alv,
            carrid   TYPE spfli-carrid,
            connid   TYPE spfli-connid,
            cityfrom TYPE spfli-cityfrom,
            cityto   TYPE spfli-cityto,
            distance TYPE spfli-distance,
            keyln    TYPE int4,
            box      TYPE char1,
            lineno   TYPE int4,
      END OF t_spfli.
      DATA:
      fs_cell LIKE LINE OF t_spfli-cell.
      DATA: gt_item    LIKE TABLE OF t_spfli WITH HEADER LINE,
            gt_header  LIKE TABLE OF t_spfli WITH HEADER LINE,
            gs_keyinfo TYPE slis_keyinfo_alv.
    START-OF-SELECTION.
      SELECT *
      FROM spfli
      INTO CORRESPONDING FIELDS OF TABLE t_spfli.
      fs_fieldcat-row_pos = 1.
      fs_fieldcat-col_pos = 1.
      fs_fieldcat-tabname = 'GT_HEADER'.
      fs_fieldcat-fieldname = 'CARRID'.
      fs_fieldcat-ref_tabname = 'SPFLI'.
      fs_fieldcat-key = 'X'.
      fs_fieldcat-hotspot = 'X'.
      APPEND fs_fieldcat TO t_fieldcat.
      CLEAR fs_fieldcat .
      fs_fieldcat-row_pos = 1.
      fs_fieldcat-col_pos = 2.
      fs_fieldcat-tabname = 'GT_HEADER'.
      fs_fieldcat-fieldname = 'CONNID'.
      fs_fieldcat-ref_tabname = 'SPFLI'.
      fs_fieldcat-key = 'X'.
      fs_fieldcat-hotspot = 'X'.
      APPEND fs_fieldcat TO t_fieldcat.
      CLEAR fs_fieldcat .
      fs_fieldcat-row_pos = 1.
      fs_fieldcat-col_pos = 3.
      fs_fieldcat-tabname = 'GT_HEADER'.
      fs_fieldcat-fieldname = 'DISTANCE'.
      fs_fieldcat-key = ' '.
      fs_fieldcat-edit = 'X'.
      APPEND fs_fieldcat TO t_fieldcat.
      CLEAR fs_fieldcat.
      fs_fieldcat-row_pos = 1.
      fs_fieldcat-col_pos = 4.
      fs_fieldcat-tabname = 'GT_HEADER'.
      fs_fieldcat-fieldname = 'CITYFROM'.
      fs_fieldcat-ref_tabname = 'SPFLI'.
      fs_fieldcat-key = ' '.
      APPEND fs_fieldcat TO t_fieldcat.
      CLEAR fs_fieldcat .
      fs_fieldcat-row_pos = 1.
      fs_fieldcat-col_pos = 5.
      fs_fieldcat-tabname = 'GT_ITEM'.
      fs_fieldcat-fieldname = 'CARRID'.
      fs_fieldcat-ref_tabname = 'SPFLI'.
      fs_fieldcat-key = 'X'.
      fs_fieldcat-hotspot = 'X'.
      APPEND fs_fieldcat TO t_fieldcat.
      CLEAR fs_fieldcat .
      fs_fieldcat-row_pos = 1.
      fs_fieldcat-col_pos = 6.
      fs_fieldcat-tabname = 'GT_ITEM'.
      fs_fieldcat-fieldname = 'CONNID'.
      fs_fieldcat-ref_tabname = 'SPFLI'.
      fs_fieldcat-key = 'X'.
      fs_fieldcat-hotspot = 'X'.
      APPEND fs_fieldcat TO t_fieldcat.
      CLEAR fs_fieldcat.
      fs_fieldcat-row_pos = 1.
      fs_fieldcat-col_pos = 7.
      fs_fieldcat-tabname = 'GT_ITEM'.
      fs_fieldcat-fieldname = 'DISTANCE'.
      fs_fieldcat-key = ' '.
      fs_fieldcat-edit = 'X'.
      APPEND fs_fieldcat TO t_fieldcat.
      CLEAR fs_fieldcat.
      fs_fieldcat-row_pos = 1.
      fs_fieldcat-col_pos = 8.
      fs_fieldcat-tabname = 'GT_ITEM'.
      fs_fieldcat-fieldname = 'CITYFROM'.
      fs_fieldcat-ref_tabname = 'SPFLI'.
      fs_fieldcat-key = ' '.
      APPEND fs_fieldcat TO t_fieldcat.
      p_col = p_col + 4.
      LOOP AT t_fieldcat INTO fs_fieldcat WHERE tabname = 'GT_ITEM'.
        IF fs_fieldcat-col_pos EQ p_col.
          fs_fieldcat-emphasize = 'C600'.
          w_fieldname = fs_fieldcat-fieldname.
          IF p_row IS INITIAL AND p_col GT 0.  " <---- paint only column if p_row is empty
            MODIFY t_fieldcat FROM fs_fieldcat TRANSPORTING emphasize.
          ENDIF.
        ENDIF.
      ENDLOOP.
      fs_cell-fieldname = w_fieldname .
      fs_cell-color-col = 6.
      fs_cell-nokeycol = 'X'.
      APPEND fs_cell TO t_spfli-cell.
      IF p_row IS NOT INITIAL AND p_col IS NOT INITIAL.  " <---- paint a cell
        MODIFY t_spfli INDEX p_row TRANSPORTING cell.
      ENDIF.
      fs_layout-info_fieldname = 'COLOR'.
      fs_layout-coltab_fieldname = 'CELL'.
      fs_layout-f2code = '&ETA'.
      gs_keyinfo-header01 = 'KEYLN'.
      gs_keyinfo-item01   = 'KEYLN'.
      LOOP AT t_spfli INTO gt_item.
        gt_item-keyln = 1.
        gt_item-lineno = gt_item-lineno + 1.
        APPEND gt_item.
      ENDLOOP.
      READ TABLE t_spfli INDEX 1 INTO gt_header.
      gt_header-keyln = 1.
      gt_header-lineno = 0.
      APPEND gt_header.
      CALL FUNCTION 'REUSE_ALV_HIERSEQ_LIST_DISPLAY'
        EXPORTING
          is_layout                      = fs_layout
          it_fieldcat                    = t_fieldcat
          i_tabname_header               = 'GT_HEADER'
          i_tabname_item                 = 'GT_ITEM'
          is_keyinfo                     = gs_keyinfo
        TABLES
          t_outtab_header                = gt_header
          t_outtab_item                  = gt_item
    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.

  • Problem with 'Word edit cell.vi' , Inputs transduced with the value of every row repeated

    Hello,
    Im using LV2013 with office 2013 report tool kit. I am trying to use Word edit cell to input values in table previously created in template .doc.
    Indeed, i trying the example Generate report from template and didnt works well. I search for solution and I see it was a problem with previous version but it seems not solve totally in this version for word office 2010. 
    http://digital.ni.com/public.nsf/allkb/4041ECB5D02BA57D862579A00002FE8D
    I checked this thread but i didnt get it to works. http://forums.ni.com/t5/LabVIEW/Problem-with-append-table-and-Word-2010/m-p/2190960#M702610
    Any way to solve it?.
    Thanks for help.
    Fred
    Attachments:
    error.png ‏32 KB
    Untitled 1.vi ‏19 KB
    exampleTemplate.doc ‏37 KB

    Hello, I solve it adding this to Word_insert_Table.
    http://forums.ni.com/t5/LabVIEW/Report-Generation-MS-Word-Table-Bug/td-p/1605170
    Thanks.
    Open [LabVIEW installation folder]\vi.lib\addons\_office\_wordsub.llb\Word_Insert_Table.vi
    There is a nested for loop that interprets the provided string array data and reformats it into a long ASCII string for the copy buffer. It should look like this:
    Change the nested loop to look like this:
    The changes I've made are twofold:
    1. Within the inner loop, replace the "\n" char with a Tab character
    2. Just after the inner loop, add a new "concatenate strings" function that adds "\n".

  • Unable to edit Cells in Hyperion Planning:

    Hi,
    Users are unable to edit cell values in particular webform.Even with Administartor access also unable to edit.
    After Selecting Particular combination in that form am unable to select another combinations.When i used serch option in the menu.The Planning system is loging out.Please help on these Issue.

    Thanks for all replies. Now, i am able to edit the cell on single click.

  • Listbox set to NOT editable cells; EditRow property seems to override

    Hi All,
    I have several listboxes that I programmatically set to Editable Cells or not, depending on the runtime status. When I have it turned OFF, I do not want the user to be able to edit the text values in the cells.
    However, I have a RTM for the listbox with an "Edit" option. That menu item sets the EditRow property (after setting Key Focus) to the selected row. This makes the text editable, even if I have it turned OFF!!
    This is not the behaviour I expected. Is this a bug?

    Could you provide the code that you are seeing this occur in? Its almost impossible to see if this is a bug without some example. The simpler the example the better.
     It is possible that it is a bug, but it's also possible that you are setting the cell to edit mode after you set it to lock. I am wondering why you are doing that? Its most likely that you want to edit some cells but keep others locked from editing, and I do not think that is a bug, however, it might be a good product suggestion to keep certain cells permanently locked from the user, which is probably not the case with the lock function you are using (which most likely can be over ridden by other property nodes).
    Regards,
    Andrew
    National Instruments
    RIO Embedded Hardware PSE
    CompactRIO Developers Guide

  • Edit Cell Events in ALV Grid

    Hi All,
    I am using the REUSE_ALV_GRID_DISPLAY Function Module to display data in grid and make a column editable using EDIT = 'X' in the fieldcat.Depending on the value in the Column some other column value should change.But the grid values are not getting refreshed.Is there any way to catch the event when the user enters the value in the grid and presses the ENTER button.
    I have an idea of how to handle this situation in case of objects but using Function how can I do this?
    Thanx in advance.

    hi, Samson
    At first, I must to say I'm very glad to hear that my suggestion is helpful to you.
    About the problem on 'DATA_CHANGED'.
    You mentioned that 'through a Function Call in which all the other events like TOP OF PAGE'.
    I guess the FM is 'REUSE_ALV_EVENTS_GET', right?
    hehe,  if so, dono't worry, my friend.
    you can do like following:
      CALL FUNCTION 'REUSE_ALV_EVENTS_GET'
           EXPORTING
                I_LIST_TYPE     = 0
           IMPORTING
                ET_EVENTS       = ITAB_EVENTS
           EXCEPTIONS
                LIST_TYPE_WRONG = 1
                OTHERS          = 2.
      CLEAR STR_EVENTS.
      STR_EVENTS-NAME = SLIS_EV_DATA_CHANGED.
      STR_EVENTS-FORM = <b>'DATA_CHANGED'</b>.
      APPEND STR_EVENTS TO ITAB_EVENTS.
      CALL FUNCTION 'REUSE_ALV_EVENTS_GET'
           EXPORTING
                I_LIST_TYPE     = 0
           IMPORTING
                ET_EVENTS       = ITAB_EVENTS
           EXCEPTIONS
                LIST_TYPE_WRONG = 1
                OTHERS          = 2.
    FORM <b>DATA_CHANGED</b> USING RR_DATA_CHANGED TYPE REF TO CL_ALV_CHANGED_DATA_PROTOCOL.
    ENDFORM.
    Through you can't find the entry about DATA_CHANGE in 'REUSE_ALV_EVENTS_GET' return, you can add a entry manually by yourself. SAP will care this event.
    The FORM will be triggered when the edited cell lost focus.
    You can have a try, hope it will be helpful.
    thanks

  • Tree view with editable cells?

    Hi,
    I have written a GTK+-2 based graphical visualizer for the NEC2 antenna simulation and analysis tool http://www.qsl.net/5b4az/pages/nec2.html and I am now considering a companion graphical editor for the NEC2 input file. This file is normally produced with a text editor and specifies antenna geometry and then commands to calculate various data regarding antenna characteristics (gain, input impedance etc).
    Luckily the original NEC2 was written in FORTRAN and the input was punched cards with a fixed format, so the current file format is line-based and with a fixed number of parameters per line: you can get an idea by looking into examples files in http://www.qsl.net/5b4az/pkg/nec2/examples/
    What I need is an idea on how to code a graphical line editor with editable cells for each parameter and the ability to add or delete lines as needed. The data in the cells may be numerical or textual or both and there may be inter-relations between cells, e.g. one cell may have a value that is a fixed proportion of another cell's value etc.
    Tips please? Thanks!

    tranquility wrote:
    Well, just about any language with bindings for gtk will work in a very similar manner. If I understand correctly, you might want to investigate the GTK treeview and GTK CellRenderer classes. Try to check the tutorials too.
    Hope this helps.
    Yes, thanks! Unfortunately though there is no easy way to have a spin button type editable cell, which would have been best for my needs. However, I found an example in a tutorial for the TreeView which could make a basis for a home brew second-best solution! 

  • Need help in ALV grid editable cells

    Hi,
    I have created a ALV Grid program in which i made certain cells as editable cells.Now my question is if suppose i have 2 rows in my output then if i change the 2nd rows some cells, then some calculation has to perform till this it is fine but nw i want to modify the 3rd rows some cells as per the changes in 2nd row.
    How to do it with ALV oops concepts.
    I have refered BCALV_EDIT_02 and BCALV_EDIT_03 these std programs.
    Thanks & Regards
    Madhuri

    Hello Madhuri
    I recommend to do any post-processing of the changed data OUTSIDE your event handler method (HANDLE_DATA_CHANGED).
    Within the event handler method do all required validations and the trigger PAI by calling method CL_GUI_CFW=>SET_NEW_OK_CODE (for an example refer to my sample report ZUS_SDN_TWO_ALV_GRIDS in alv)
    Now at PAI of your screen you can do any kind of post-processing, calculation, etc. within the itab used for the ALV list.
    Regards
      Uwe

  • Word edit cell

    Hi all,
    I create a vi that inserts in a word template table values .
    This work's fine but the table have 4 columns and if i update less than 4 column (example 3) the other is filled with the last column inserted (the last column is replied in the remains column).
    I attach the code created.
    Another question is why, also if i add an 2d array in the table, if i don't repeat the insertion for each column (for loop) the only column recorded is the first?
    I attach the part of code
    Bytelabs.it
    Attachments:
    edit cell to insert data in a exist table on word template.jpg ‏24 KB

    These are expected behaviors. I suggest you to implement an high level API that do what you are planning to do.
    Best regards,
    Enrico

  • InDesign crashes in time of table editing (cell's merge)

    InDesign crashes in time of table editing (cell's merge). Not always, but 1 out of 3 times.

    What version of ID? Is it fully patched? What operating system.

  • Editable cell in ALV OO with F4 Help

    Hi Abapers,
    i have an ALV with an editable cell wich an F4 help is available on it. When clicking on the F4 button i'm getting the list of possible values but when choosing a value it is not updating the alv cell. (F4 help is on a Z* field wich i created already with its matchcode).
    Does anyone have a piece of code wich can help ?
    Thanks in advance,
    Soufiane

    Hi,
    Check the following code:
    *Type pools for alv
    TYPE-POOLS : slis.*structure for t582a tbale
    TYPES : BEGIN OF ty_table,
            infty TYPE infty,
            pnnnn TYPE pnnnn_d,
            zrmkz TYPE dzrmkz,
            zeitb TYPE dzeitb,
            dname TYPE dianm,
             davo TYPE davo,
            davoe TYPE davoe,
            END OF ty_table.*Structure for infotype text
    TYPES : BEGIN OF ty_itext,
            infty TYPE infty,
            itext TYPE intxt,
            sprsl TYPE sprsl,
            END OF ty_itext.*Structure for output display
    TYPES : BEGIN OF ty_output,
            infty TYPE infty,
            itext TYPE intxt,
            pnnnn TYPE pnnnn_d,
            zrmkz TYPE dzrmkz,
            zeitb TYPE dzeitb,
            dname TYPE dianm,
            davo TYPE davo,
            davoe TYPE davoe,
           END OF ty_output.*internal table and work area declarations
    DATA : it_table TYPE STANDARD TABLE OF ty_table INITIAL SIZE 0,
           it_output TYPE STANDARD TABLE OF ty_output INITIAL SIZE 0,
           it_pbo TYPE STANDARD TABLE OF ty_output INITIAL SIZE 0,
           it_ittext TYPE STANDARD TABLE OF ty_itext INITIAL SIZE 0,
           wa_table TYPE ty_table,
           wa_output TYPE ty_output,
           wa_ittext TYPE ty_itext.*Data declarations for dropdown lists for f4
    DATA: it_dropdown TYPE lvc_t_drop,
          ty_dropdown TYPE lvc_s_drop,
    *data declaration for refreshing of alv
          stable TYPE lvc_s_stbl.*Global variable declaration
    DATA: gstring TYPE c.
    *Data declarations for ALV
    DATA: c_ccont TYPE REF TO cl_gui_custom_container,         "Custom container object
          c_alvgd         TYPE REF TO cl_gui_alv_grid,         "ALV grid object
          it_fcat            TYPE lvc_t_fcat,                  "Field catalogue
          it_layout          TYPE lvc_s_layo.                  "Layout*ok code declaration
    DATA:
      ok_code       TYPE ui_func.
    initialization eventINITIALIZATION.start of selection event
    START-OF-SELECTION.*select the infotypes maintained
      SELECT infty
              pnnnn
              zrmkz
              zeitb
              dname
              davo
              davoe
              FROM t582a UP TO 10 ROWS
              INTO CORRESPONDING FIELDS OF TABLE it_table.* *Select the infotype texts
      IF it_table[] IS NOT INITIAL.
        SELECT itext
                 infty
                 sprsl
                 FROM t582s
                 INTO CORRESPONDING FIELDS OF TABLE it_ittext
                 FOR ALL ENTRIES IN it_table
                 WHERE infty = it_table-infty
                 AND sprsl = 'E'.
      ENDIF.
    *Apppending the data to the internal table of ALV output
      LOOP AT it_table INTO wa_table.    wa_output-infty = wa_table-infty.
        wa_output-pnnnn = wa_table-pnnnn.
        wa_output-zrmkz = wa_table-zrmkz.
        wa_output-zeitb = wa_table-zeitb.
        wa_output-dname = wa_table-dname.
        wa_output-davo = wa_table-davo.
        wa_output-davoe = wa_table-davoe.* For texts    READ TABLE it_ittext INTO wa_ittext WITH KEY infty = wa_table-infty.
        wa_output-itext = wa_ittext-itext.
        APPEND wa_output TO it_output.
        CLEAR wa_output.  ENDLOOP.* Calling the ALV screen with custom container  CALL SCREEN 0600.*On this statement double click  it takes you to the screen painter SE51.
    *Enter the attributes
    *Create a Custom container and name it CCONT and OK code as OK_CODE.
    *Save check and Activate the screen painter.
    *Now a normal screen with number 600 is created which holds the ALV grid.
    PBO of the actual screen ,
    Here we can give a title and customized menus
    *create 2 buttons with function code 'SAVE' and 'EXIT'.
    GIVE A SUITABLE TITLE&---------------------------------------------------------------------
    *&      Module  STATUS_0600  OUTPUT
          text
    MODULE status_0600 OUTPUT.
      SET PF-STATUS 'DISP'.
      SET TITLEBAR 'ALVF4'.
    ENDMODULE.                 " STATUS_0600  OUTPUT
    calling the PBO module ALV_GRID.
    *&      Module  PBO  OUTPUT
          text
    MODULE pbo OUTPUT.*Creating objects of the container
      CREATE OBJECT c_ccont
           EXPORTING
              container_name = 'CCONT'.*  create object for alv grid
      create object c_alvgd
      exporting
      i_parent = c_ccont.*  SET field for ALV
      PERFORM alv_build_fieldcat.* Set ALV attributes FOR LAYOUT
      PERFORM alv_report_layout.
      CHECK NOT c_alvgd IS INITIAL.* Call ALV GRID  CALL METHOD c_alvgd->set_table_for_first_display
        EXPORTING
          is_layout                     = it_layout
          i_save                        = 'A'
        CHANGING
          it_outtab                     = it_output
          it_fieldcatalog               = it_fcat
        EXCEPTIONS
          invalid_parameter_combination = 1
          program_error                 = 2
          too_many_lines                = 3
          OTHERS                        = 4.
      IF sy-subrc <> 0.
        MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                   WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      ENDIF.ENDMODULE.                 " PBO  OUTPUT&----
    *&      Form  alv_build_fieldcat
          text
         <--P_IT_FCAT  text
    *subroutine to build fieldcatFORM alv_build_fieldcat.  DATA lv_fldcat TYPE lvc_s_fcat.
      CLEAR lv_fldcat.  lv_fldcat-row_pos   = '1'.
      lv_fldcat-col_pos   = '1'.
      lv_fldcat-fieldname = 'INFTY'.
      lv_fldcat-tabname   = 'IT_OUTPUT'.
      lv_fldcat-outputlen = 8.
      lv_fldcat-scrtext_m = 'Infotype'.
      lv_fldcat-icon = 'X'.
      APPEND lv_fldcat TO it_fcat.
      CLEAR lv_fldcat.  lv_fldcat-row_pos   = '1'.
      lv_fldcat-col_pos   = '2'.
      lv_fldcat-fieldname = 'PNNNN'.
      lv_fldcat-tabname   = 'IT_OUTPUT'.
      lv_fldcat-outputlen = 15.
      lv_fldcat-scrtext_m = 'Structure'.
      lv_fldcat-icon = ''.
      APPEND lv_fldcat TO it_fcat.
      CLEAR lv_fldcat.  lv_fldcat-row_pos   = '1'.
      lv_fldcat-col_pos   = '3'.
      lv_fldcat-fieldname = 'ITEXT'.
      lv_fldcat-tabname   = 'IT_OUTPUT'.
      lv_fldcat-outputlen = 60.
      lv_fldcat-scrtext_m = 'Description'.
      lv_fldcat-icon = ''.
      APPEND lv_fldcat TO it_fcat.
      CLEAR lv_fldcat.
      lv_fldcat-row_pos   = '1'.
      lv_fldcat-col_pos   = '5'.
      lv_fldcat-fieldname = 'ZRMKZ'.
      lv_fldcat-tabname   = 'IT_OUTPUT'.
      lv_fldcat-outputlen = 1.
      lv_fldcat-scrtext_m = 'PERIOD'.
      lv_fldcat-icon = ''.
      APPEND lv_fldcat TO it_fcat.
      CLEAR lv_fldcat.  lv_fldcat-row_pos   = '1'.
      lv_fldcat-col_pos   = '6'.
      lv_fldcat-fieldname = 'ZEITB'.
      lv_fldcat-tabname   = 'IT_OUTPUT'.
      lv_fldcat-outputlen = 5.
      lv_fldcat-scrtext_m = 'Time constraint'.
      lv_fldcat-edit = 'X'.
    *To avail the existing F4 help these are to
    *be given in the field catalogue
      lv_fldcat-f4availabl = 'X'.
      lv_fldcat-ref_table = 'T582A'.
      lv_fldcat-ref_field = 'ZEITB'.  APPEND lv_fldcat TO it_fcat.
      CLEAR lv_fldcat.  lv_fldcat-row_pos   = '1'.
      lv_fldcat-col_pos   = '7'.
      lv_fldcat-fieldname = 'DNAME'.
      lv_fldcat-tabname   = 'IT_OUTPUT'.
      lv_fldcat-outputlen = 15.
      lv_fldcat-scrtext_m = 'Dialogmodule'.
      lv_fldcat-icon = ''.
      APPEND lv_fldcat TO it_fcat.
      CLEAR lv_fldcat.  lv_fldcat-row_pos   = '1'.
      lv_fldcat-col_pos   = '8'.
      lv_fldcat-fieldname = 'DAVO'.
      lv_fldcat-tabname   = 'IT_OUTPUT'.
      lv_fldcat-outputlen = 15.
      lv_fldcat-scrtext_m = 'Start'.
      lv_fldcat-edit = 'X'.
      APPEND lv_fldcat TO it_fcat.
      CLEAR lv_fldcat.  lv_fldcat-row_pos   = '1'.
      lv_fldcat-col_pos   = '9'.
      lv_fldcat-fieldname = 'DAVOE'.
      lv_fldcat-tabname   = 'IT_OUTPUT'.
      lv_fldcat-outputlen = 15.
      lv_fldcat-scrtext_m = 'End'.
      lv_fldcat-icon = ''.
      APPEND lv_fldcat TO it_fcat.
      CLEAR lv_fldcat.
    *To create drop down for the field 'DAVO'
    with our own f4 help
      ty_dropdown-handle = '1'.
      ty_dropdown-value = ' '.
      APPEND ty_dropdown TO it_dropdown.
      ty_dropdown-handle = '1'.
      ty_dropdown-value = '1'.
      APPEND ty_dropdown TO it_dropdown.
      ty_dropdown-handle = '1'.
      ty_dropdown-value = '2'.
      APPEND ty_dropdown TO it_dropdown.
      ty_dropdown-handle = '1'.
      ty_dropdown-value = '3'.
      APPEND ty_dropdown TO it_dropdown.  CALL METHOD c_alvgd->set_drop_down_table
        EXPORTING
          it_drop_down = it_dropdown.
      LOOP AT it_fcat INTO lv_fldcat.
        CASE lv_fldcat-fieldname.
    To assign dropdown in the fieldcataogue
          WHEN 'DAVO'.
            lv_fldcat-drdn_hndl = '1'.
            lv_fldcat-outputlen = 15.
            MODIFY it_fcat FROM lv_fldcat.
        ENDCASE.
      ENDLOOP.ENDFORM.                    " alv_build_fieldcat&----
    *&      Form  alv_report_layout
          text
         <--P_IT_LAYOUT  text
    *Subroutine for setting alv layout
    FORM alv_report_layout.
      it_layout-cwidth_opt = 'X'.
      it_layout-col_opt = 'X'.
      it_layout-zebra = 'X'.ENDFORM.                    " alv_report_layout* PAI module of the screen created. In case we use an interactive ALV or
    *for additional functionalities we can create OK codes
    *and based on the user command we can do the coding.
    *&      Module  PAI  INPUT
          text
    MODULE pai INPUT.*To change the existing values and refresh the grid
    *And only values in the dropdown or in the default
    *F4 can be given , else no action takes place for the dropdown
    *and error is thrown for the default F4 help and font changes to red
    and on still saving, value is not changed  c_alvgd->check_changed_data( ).Based on the user input
    *When user clicks 'SAVE;
      CASE ok_code.    WHEN 'SAVE'.*A pop up is called to confirm the saving of changed data
          CALL FUNCTION 'POPUP_TO_CONFIRM'
            EXPORTING
              titlebar       = 'SAVING DATA'
              text_question  = 'Continue?'
              icon_button_1  = 'icon_booking_ok'
            IMPORTING
              answer         = gstring
            EXCEPTIONS
              text_not_found = 1
              OTHERS         = 2.
          IF sy-subrc NE 0.
          MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
                  WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
          ENDIF.*When the User clicks 'YES'
          IF ( gstring = '1' ).
            MESSAGE 'Saved' TYPE 'S'.
    *Now the changed data is stored in the it_pbo internal table
            it_pbo = it_output.
    *Subroutine to display the ALV with changed data.
            PERFORM redisplay.
          ELSE.
    *When user clicks NO or Cancel
            MESSAGE 'Not Saved'  TYPE 'S'.
          ENDIF.
    **When the user clicks the 'EXIT; he is out
        WHEN 'EXIT'.
          LEAVE PROGRAM.
      ENDCASE.  CLEAR: ok_code.ENDMODULE.                 " PAI  INPUT
    *&      Form  REDISPLAY
          text
    -->  p1        text
    <--  p2        text
    FORM redisplay .*Cells of the alv are made non editable after entering OK to save  CALL METHOD c_alvgd->set_ready_for_input
        EXPORTING
          i_ready_for_input = 0.*Row and column of the alv are refreshed after changing values  stable-row = 'X'.
      stable-col = 'X'.*REfreshed ALV display with the changed values
    *This ALV is non editable and contains new values
      CALL METHOD c_alvgd->refresh_table_display
        EXPORTING
          is_stable = stable
        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.ENDFORM.                    " REDISPLAY
    Regards,
    Bhaskar

  • ItemFocusOut not catching  "TAB" key in Datagrid edited cell?

    In DataGrid, "keyUp" can catch "TAB" key when it is pressed,
    but the Keyboard event has less information needed. I tried
    itemFocusOut, but it seems DataGridEvent would not catch it. Any
    tips on how to make "TAB" key generate DataGridEvent or similar
    event?
    Platforms with this issue: WIN-XP/JDK-1.6/Air-1.5/FLEX
    SDK-3.2
    Thanks!
    -Herbert

    Let me rephrase like this:
    In our application, a DataGrid’s edited cell has
    “itemEditEnd” and “itemEditBeginning”
    handlers defined. However when a “TAB” key is pressed
    to navigate from one editable cell to another editable cell, none
    of the above handlers can catch this special key stroke event.
    Our intention is to make “TAB” key to emit an
    event that can be caught by above handlers. Or, in other words, we
    would like make “TAB” key to be similar(in the sense of
    generating events) to that of “Enter” key when pressed.

  • LabVIEW 8.2 Multicolumn Listbox Edit Cell Event Bug

    I've observed an odd behavior with the "Edit Cell?" event with multicolumn listboxes. If the "Edit Position" is set when clicking on the listbox and the "Edit Cell?" event is trapped with discard set to false, when clicking outside of the list box, previous edits are lost.   I have attached a simple example of this bug.
    Attachments:
    Listbox Edit Cell Event Bug.vi ‏19 KB

    Thank you for the update Fran.
    I lost my bet and you earned your stars.
    So it sounds like the issue was the multiple event structures alone.
    I just like to keep track of what the final fixes are.
    Ben
    Message Edited by Ben on 12-06-2006 04:50 PM
    Ben Rayner
    I am currently active on.. MainStream Preppers
    Rayner's Ridge is under construction

  • Editable cells in HTML display

    Hi all, I have an internal table. I will convert it into html data and display on screen. Now what I want is , one of those fields should be editable and I need to get that entered value back again.
    How can I achieve this. Can you please help me out here?
    If you provide me with an example , that would be great.
    Thanks and Regards,
    Balakrishna.N

    Hi Bala,
    Dont know about HTML but if you are using HTMLB then use iterator for displaying editable column .
    Retrieving value of editable cell of tableview.
    above link discusses how to read value of editable cell and update itab.
    Search the forum there is sufficient info available.
    Regards,
    Anubhav

  • Edit cell in sap.m.table

    Hi, how I could enable or editaable a cell in sap.m.table? This is my soruce code: var productTable = new sap.m.Table("orderItemsDisplay",{ growing:true, visible: true, growingThreshold: 5,        columns : [ new sap.m.Column({            minScreenWidth: "Tablet"        })        ] });    productTable.bindItems("/order/products", new sap.m.ColumnListItem({        cells : [            new sap.m.Input("idQuantityDisplay",{        value: "{Quantity}",        width:"3em",        enabled:false        })                ]        })); In my controller I set this sap.ui.getCore().byId("idQuantityDisplay").setEditable(true) but it dosen't works. THanks!!

    Hi Jose,
              Here is the code for Editing cells.
    var oTable = new sap.ui.table.Table({
        selectionMode: sap.ui.table.SelectionMode.None
      oTable.addColumn(new sap.ui.table.Column({
        label: 'First Name',
        template: new sap.ui.commons.TextField({
          value: '{fname}'
      oTable.addColumn(new sap.ui.table.Column({
        label: 'Last Name',
        template: new sap.ui.commons.TextField({
          value: '{lname}'
      oTable.bindRows('/');
    var model = new sap.ui.model.json.JSONModel();
      model.setData([
        {fname: 'Joe', lname: 'Bloggs'},
        {fname: 'Kele', lname: 'Kyle'},
        {fname:'Kom', lname: 'Mary'}
      oTable.setModel(model);
      oTable.placeAt('content');
    Regards
    Moulika

Maybe you are looking for