ALV:  input field only in some rows

Hi:
I have done an ALV with FM 'REUSE_ALV_HIERSEQ_LIST_DISPLAY' .
With the   attribute "INPUT = 'X'" of the catalog of fields, a field will appear editable in all rows but I need a field that appears  editable in some rows but in others no. How?
thank´

i think it is not possible like that , u can increase the length of that field in fieldcatalog
wa_fieldname-outputlen = '100'.
and in layout u can use
wa_layout-colwidth_optimize = 'X'.

Similar Messages

  • How to set focus on a input field in a selected row of a table?

    In a previous discussion (http://scn.sap.com/thread/3564789) I asked how to access an input (sap.m.Input) field of a selected row in a table. In the answer that was supplied I was shown how to get the items of the table. Then using the selected index to get the selected item get the cells. Then I could set editable on the proper cell(s). This worked fine.
    Now I need to set the focus on one of the fields. I tried something like this:
                var oNewLink = table.getSelectedItem();
                var oNewLinkName = oNewLink.getCells()[1];
                oNewLinkName.focus();
    But this doesn't seem to work.
    I have searched through other discussions and have seen this technique for putting focus on a field if you have its ID:
    sap.ui.getCore().byId(id_of_the_input_field).$().focus();
    In my case though I do not have an ID since the row and its cells are generated. How can I set focus on the cell of a certain row in a table?

    Hello Venkatesh. Yes that code does work. First I tried it on a table cell that was already rendered and it did work. The next time I tried it on a table row that was being added and it did not work there. So I added an on after rendering function for the table and added that code there. That did not work until I added a delay (timeout) to do a context switch before calling the focus and that worked.
    Once last thing though sometimes when I call focus on an input field (actually in a table row cell) if the field has text in it already the flashing cursor is at the beginning of the text and other times it is at the end of the text (which is the desired way). It depends on where I click in the row. Is there anyway to make sure the flashing cursor is at the end of the text when the focus is applied to a field that contains text?

  • Alv Input Field Validation

    Hi Experts,
    In my initial screen there are some search criteria based on which i ve to display the data by using ALV.
    And i ve hardcoded some value and the data are coming  in ALV . But my question is how can i validate the data which is enter by the user in the search field so that data can bedisplay based on the search criteria in the alv output.
    Regards,
    Satya

    Hi ,
    use OVS (object value selector) method there , it wll take input and according to that f4 will be displayed.
    OVS Component:
    https ://OVS Input Help
    http://help.sap.com/saphelp_erp2005/helpdata/en/30/d7fa41c915da6fe10000000a1550b0/content.htm
    Packages : WDR_TEST_OVS2,WDR_OVS,WDR_TEST_OVS
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/user-interface-technology/webdynpro/wd%20java/wdjava%20archive/web%20dynpro%20valuehelp%20using%20object%20value%20selector.pdf
    /people/shruti.rathour/blog/2008/05/05/ovs-help-in-web-dynpro-abap
    Regards,
    Muneesh Gitta.

  • How to edit only some rows in ALV

    Hi Experts,
    I have editable ALV. I need to allow edit only for some rows, not generaly all of them.
    Do you have any idea how to do it?
    I use ALV through FM module REUSE_ALV_GRID_DISPLAY.
    Thenks&regards,
    Jirka

    Hi,
    You need to use events. Sample code from sdn.
    TYPE-POOLS:SLIS.
    DATA: X_FIELDCAT TYPE SLIS_FIELDCAT_ALV.
    DATA: IT_FIELDCAT TYPE SLIS_T_FIELDCAT_ALV.
    DATA:IT_EVENTS TYPE SLIS_T_EVENT.
    data: begin of it_chg occurs 0,
          index type sy-tabix,
          end of it_chg.
    DATA:  X_EVENTS    TYPE SLIS_ALV_EVENT.
    DATA: BEGIN OF ITAB OCCURS 0,
          NAME(10) TYPE C,
          ZTERM TYPE C,
          END OF ITAB.
    PERFORM FILL_TABLE.
    loop at itab where zterm = 'A'.
    it_chg-index = sy-tabix + 3. 
    " addition 3 IS FOR FIELD LABELS
    append it_chg.
    clear it_chg.
    endloop.
    DATA:L_POS TYPE I VALUE 1.
    CLEAR: L_POS.
    L_POS = L_POS + 1.
    **fieldcatalog
    X_FIELDCAT-FIELDNAME = 'NAME'.
    X_FIELDCAT-TABNAME = 'ITAB'.
    X_FIELDCAT-COL_POS    = L_POS.
    X_FIELDCAT-OUTPUTLEN = '10'.
    APPEND X_FIELDCAT TO IT_FIELDCAT.
    CLEAR X_FIELDCAT.
    L_POS = L_POS + 1.
    X_FIELDCAT-FIELDNAME = 'ZTERM'.
    X_FIELDCAT-TABNAME = 'ITAB'.
    X_FIELDCAT-COL_POS    = L_POS.
    X_FIELDCAT-OUTPUTLEN = '10'.
    APPEND X_FIELDCAT TO IT_FIELDCAT.
    CLEAR X_FIELDCAT.
    **events
    REFRESH:IT_EVENTS.
    CLEAR:X_EVENTS,IT_EVENTS.
    X_EVENTS-NAME = SLIS_EV_END_OF_LIST.
    X_EVENTS-FORM = 'MODIFY_LIST'.
    APPEND X_EVENTS TO IT_EVENTS.
    CLEAR X_EVENTS.
    END-OF-SELECTION.
      CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
        EXPORTING
          I_CALLBACK_PROGRAM = SY-REPID
          IT_FIELDCAT        = IT_FIELDCAT
          IT_EVENTS          = IT_EVENTS
        TABLES
          T_OUTTAB           = ITAB
        EXCEPTIONS
          PROGRAM_ERROR      = 1
          OTHERS             = 2.
      IF SY-SUBRC <> 0.
        MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
                WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    *&      Form FILL_TABLE
          text
    FORM FILL_TABLE.
      ITAB-NAME = 'vijay'.
      ITAB-ZTERM = 'A'.
      APPEND ITAB.
      clear itab.
      ITAB-NAME = 'ABC'.
      ITAB-ZTERM = 'B'.
      APPEND ITAB.
      clear itab.
      ITAB-NAME = 'TEST'.
      ITAB-ZTERM = 'C'.
      APPEND ITAB.
      clear itab.
      ITAB-NAME = 'DILIP'.
      ITAB-ZTERM = 'D'.
      APPEND ITAB.
      clear itab.
      ITAB-NAME = '123'.
      ITAB-ZTERM = 'E'.
      APPEND ITAB.
      clear itab.
      ITAB-NAME = 'GEN'.
      ITAB-ZTERM = 'A'.
      APPEND ITAB.
      clear itab.
      ITAB-NAME = 'ALV'.
      ITAB-ZTERM = 'F'.
      APPEND ITAB.
      clear itab.
      ITAB-NAME = 'ALVTEST'.
      ITAB-ZTERM = 'A'.
      APPEND ITAB.
      clear itab.
    ENDFORM.                    "FILL_TABLE
    *&      Form  MODIFY_LIST
          text
    FORM MODIFY_LIST.
    data: l_lines type i.
    describe table itab lines l_lines.
      L_LINES  = L_LINES + 3.
      "because we have 3 lines extra occupied by lables.
      "if we have header,i mean top of page add the no.of lines
      "how many ever top of page have + 3 for labels.
      DO L_LINES TIMES.
        read table it_chg with key INDEX = sy-index.
        if sy-subrc = 0.
    **This code is for reading the out put line
    **and modify accordinlg to our requiremnet.
    **don't chnage this.
          READ LINE SY-INDEX INDEX SY-LSIND.
          IF SY-SUBRC = 0.
            MODIFY LINE SY-INDEX INDEX SY-LSIND
                       FIELD FORMAT ITAB-NAME INPUT.
          ENDIF.
        ENDIF.
      ENDDO.
    ENDFORM.                    "MODIFY_LIST

  • More than one Input field [Parameter] in a single row on Selection-Screen.

    Hi All,
    I am having one scenario where i need to create 6 input fields on selection screen. 3 input fields in first row and remaining 3 input fields on the second row. So will you guys send me some sample code how to do this.
    Waiting for your reply.
    Regards,
    Santosh

    Hi Santhosh,
    check this snippet for parameters.
    SELECTION-SCREEN SKIP 3.
    SELECTION-SCREEN BEGIN OF BLOCK calc
                        WITH FRAME TITLE text-001 NO INTERVALS.
    SELECTION-SCREEN BEGIN OF LINE.
    PARAMETERS:
      p_param1(3) type c,
      p_param2(3) type c,
      p_param3(3) type c,
      p_param4(3) type c.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN END OF BLOCK calc.
    check this snippet for select-options.
    SELECTION-SCREEN SKIP 3.
    SELECTION-SCREEN BEGIN OF BLOCK calc
                        WITH FRAME TITLE text-001 NO INTERVALS.
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN :
    PUSHBUTTON 20(3) b1  USER-COMMAND b1,
    PUSHBUTTON  29(3) b4  USER-COMMAND b4,
    PUSHBUTTON  38(3) b7  USER-COMMAND b7,
    PUSHBUTTON  47(3) pm  USER-COMMAND pm.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN END OF BLOCK calc.
    Hope this would help you.
    Regards
    Narin Nandivada.

  • How to Update some column values in some rows in an advanced table

    Hi Gurus,
    Can any body help on this issue.
    I am having a results table which is showing all the queried parties data queried in a seeded page in OCO module.
    Lets assume the table contains 10 rows with the below columns
    Party Name, Registry ID, Address Country, Match Percentage, Certification Level, Certification Reason, Internal Indicator, Status .
    Certification Level, Certification Reason and Internal Indicator are the dropdowns.
    The user want to update some of these fields values for some rows randomly.
    After doing this if he click on Save button, Only thosed changed rows need to get update using a Custom Procedure.
    But here all the rows irrespective of the change getting updated.
    So  how to capture the modified rows.
    Appreciate any inputs..
    Thanks
    Palepu
    Edited by: Palepu on 9 Aug, 2012 4:25 PM

    Not sure if you got the answer. You need to capture the row which got changed using the below and get the column value using the getAttribute method. This works for single selection row, if it is multi selection then you will have to loop through all selected rows and find the VO attribute value.
    String rowReference = pageContext.getParameter(OAWebBeanConstants.EVENT_SOURCE_ROW_REFERENCE);
    Row currentRow = am.findRowByRef(rowReference);
    String param1= (String)currentRow.getAttribute("VOAttribute");
    Let me know if there are any issues.
    Thanks
    Shree

  • [SOLVED] missing input fields in KAccounts KCM

    I've setup a KVM-VM to test KDE's KF5/Plasma 5/etc.. No KDE4 packages are installed.
    When trying to create a new account in the KAccount KCM, I'm encountering several problems:
    Google: simply closing the window without authenicating triggers and endless loop opening the web authentication over and over again
    Jabber: no input fields at all
    KDE Talk: only ID input field shown, no password input field
    Non of these problems occur on an up-to-date Neon5 live DVD (based on Kubuntu). While the Google problem shouldn't be much of a hassle, the others simply prevent me from even creating any account. Is this a known problem? Did I miss to install some packages? Is there a daemon not running that I'd need? Please simply ask for details you may need.
    Thanks!
    Last edited by OlafLostViking (2015-04-29 14:13:21)

    Wow... thank you! I'd never expect the missing protocol implementation to be the problem of a non-existing password input field only (instead of the whole configuration module)... Thanks

  • How to drill down another one report on one field value of one row

    Hi,
    I have two reports that can link together on one field of respective database query command. The effect i want to reach is that when user clicks this field value on some row of one report, which i call source object, another report, target object, would use this value as input parameter and the page would jump to this linked report. I can see Format Editor provides Hyperlink feature when one field is edited, but i don't know how to associate another report as what i described here.
    What if one the following conditions is met:
    1.one of two objects, source object, is one chart object
    2.target object is  one chart object
    3.two objects are both chart objects
    Note: two objects is separately from different reports.
    Additionally, is it possible to code for hyperlink functionality under both .NET WinForm and WebForm? what if under RDC?
    Thank you
    Zhi
    Edited by: zhi li on Sep 24, 2008 11:53 AM
    Edited by: zhi li on Sep 24, 2008 11:57 AM
    Edited by: zhi li on Sep 24, 2008 11:58 AM

    I don't know if you can use the hyperlink to call a subreport but the following has worked for me in Crystal 10:
    1. In your main report create a group on the field you want to pass to the subreport.
    2. In the Group Footer, use the "Insert Section below" menu command so that you have a Group Footer 1a and a Group Footer 1b.
    3. Put your table fields in the Group Footer 1b section (this would be similar to your Details data).
    4. Put the sub report in the Group Footer 1a section. Set up the links to the subreport from a table field in your main report.
    5. Right-click on the sub-report, select "Format Sub-report". Click on the "x-2" button to the right of the Suppress option and enter "DrillDownGroupLevel = 0" in the "Formula Workshop-Formula Format Editor-Suppress" window and save it.
    When you double-click on your data field (i.e. the field in Group footer 1b) it should drill-down and run your subreport.

  • How to pass value from new pop up window to the input field

    Hi,
    i have a F4 help on a input type field and adjacent to that two more input fields, on clicking the help on the first input field a new pop up window opens, the value in this pop up window is to be selected to give the value in that field and the other two values should be appeared in the input type. suppose the pop up window has three fields "15   LIMA  PLANT   45802 ", so on clicking it in input field only 15 should go to the firstinput fields and "LIMA PLANT" and "45802" should go to new window
    do anyone know this?

    avoid duplicate threads
    F4 help in dropdownlistbox and values in input fields
    if you feel that the thread heading or content is not what you wanted, you can edit it and leave a note in the same thread that you have edited it.
    Raja

  • Zwaygi font not displaying in input fields (fine everywhere else)

    I am working on a two language website www.eprpinformation.org. The Myanmar version automatically changes the font family for body text to Zwaygi-One which work wonderfully well on IE, Chrome and Firefox.
    Except, that is, for input fields. For some reason these display the unknown font characters even though looking at the css for the input, the correct font family is being applied. Please see screenshot >> http://eprpinformation.org/images/firefox-zwaygi-font-issue.jpg.
    Any help would be appreciate.
    Mark

    If I paste some text in the search bar and text fields on the Help Desk page then a right-click and Inspect shows that the Zawgyi-One is used for Myanmar text (I pasted the Zawygi Font text: တိုင္းရင္းသား).
    I haven't made changes to the default font as that shouldn't be necessary.
    At least on Linux where I am it shows that for input field font-family: -moz-use-system-font; is used, so it is possible that the selected system font doesn't work properly with Myanmar characters.

  • Dynamic Input field creation - issue with bindValue in loop

    Hello,
    I am creating context node elements at runtime. My node looks like this -
    LocalNode
      Question
      Answer
    for(int i;i<wdContext.nodeLocalNode.size();i++)
    wdContext.nodeLocalNode().setLeadSelection(i);
      IWDTextView TV1 = (IWDTextView)view.createElement(IWDTextView.class,"TV"+i);
      TV1.setText(wdContext.currentLocalNodeElement().getQuestion());
       mainGrp.addChild(TV1);
       IWDInputField IP1 = (IWDInputField)view.createElement(IWDInputField.class,"TE"+i);                             
      IP1.bindValue("LocalNode.Answer");
       IP1.setValue(wdContext..currentLocalNodeElement().getAnswer());
       mainGrp.addChild(IP1);
    Please note: Question column is the textView and Answer column is the input field
    The output should be as follows-
    Question               Answer
    Header                  None
    How Many             7
    Comments             Maybe valid
    Do you agree        Yes
    Although the text view displays correctly, the input field only shows the last record value and the output currently displays as follows-
    Question               Answer
    Header                   Yes
    How Many             Yes
    Comments              Yes
    Do you agree         Yes
    What am I doing wrong here?
    How can I bind the corresponding values to the input field in a loop?
    Regards,
    Nisha

    Hi,
    Could you please provide the code .
    Regards,
    Sunil.

  • Higlighting the input field

    Hi Experts ,
    i want to higlight the input field based on some condition  , i tried using reporting attribute message ,
    but how to hide the MSG area ? higliting the input field is enough for me  .
    have a look at the below image .
    [http://i56.tinypic.com/119qnwn.jpg  |http://i56.tinypic.com/119qnwn.jpg  ]
    Regards
    Chinnaiya P

    Problem solved by my self .
    let me share the piece of code to hide  the msg area .
    if lv_field1 ne lv_field2.
    * get message manager
    DATA lo_api_controller     TYPE REF TO if_wd_controller.
    DATA lo_message_manager    TYPE REF TO if_wd_message_manager.
    lo_api_controller ?= wd_this->wd_get_api( ).
    CALL METHOD lo_api_controller->get_message_manager
      RECEIVING
        message_manager = lo_message_manager   .
    * report message
    CALL METHOD lo_message_manager->report_attribute_error_message
      EXPORTING
        message_text              = 'hiiia '
        element                   =  lo_el_context
        attribute_name            = 'FIELD2'
      receiving
        message_id                = msgid .
    * below code will reset the message .
    data: l_api_testcase1              type ref to if_wd_view_controller,
          l_api_wdr_test_msg_area      type ref to if_wd_window_controller,
          l_wd_message_area            type ref to if_wd_message_area.
      l_api_testcase1 ?= wd_this->wd_get_api( ).
      l_api_wdr_test_msg_area ?= l_api_testcase1->get_embedding_window_ctlr( ).
      l_wd_message_area = l_api_wdr_test_msg_area->get_message_area( ).
      l_wd_message_area->reset_messages( i_keep_current = 'X' ).
       endif .
    have a look to the solution arrived .
    [http://i54.tinypic.com/11gna4w.jpg|http://i54.tinypic.com/11gna4w.jpg]
    thanks for all those give your valuable suggesion
    Regards
    chinnaiya P
    Edited by: chinnaiya pandiyan on Jan 28, 2011 5:08 PM

  • Hotspot click for only some rows in ALV grid for a particular column ?

    Hi there,
            In ALV grid, we can make Hotspot enable for all rows in a specified column
    by specifying in the fieldcatalog with Hotspot attribute set as true.
    But I want to enable Hotspot only for certain rows in the particular column. I tried with MC_STYLE4_LINK , but I didnt got the required result.
    So , how could I achieve that in ALV grid.
    Points would be rewarded for helpful answers.
    Regards,
    Anil .

    Hi,
    You can do it for a column. Please refer to the code snippet below,
      DATA : it_fcat TYPE lvc_t_fcat,
             wa_fcat LIKE LINE OF it_fcat.
    CALL FUNCTION 'LVC_FIELDCATALOG_MERGE'
       EXPORTING
      I_BUFFER_ACTIVE              =
         i_structure_name             = 'SMMW_ALERTS_ICON_S'
      I_CLIENT_NEVER_DISPLAY       = 'X'
      I_BYPASSING_BUFFER           =
      I_INTERNAL_TABNAME           =
        CHANGING
          ct_fieldcat                  = it_fcat
       EXCEPTIONS
         inconsistent_interface       = 1
         program_error                = 2
         OTHERS                       = 3
    LOOP AT it_fcat INTO wa_fcat.
      IF wa_fcat-fieldname = 'STATUS'.
        wa_fcat-hotspot = 'X'.
        MODIFY it_fcat FROM wa_fcat.
        CLEAR wa_fcat.
      ENDIF.
    ENDLOOP.
    CALL METHOD l_obj_alv_grid->set_table_for_first_display
          EXPORTING
        i_structure_name              = 'SMMW_ALERTS_ICON_S'
       CHANGING
            it_outtab                     = lt_alerts_st
            it_fieldcatalog               = it_fcat.
    In the above replace the structure 'SMMW_ALERTS_ICON_S' with your structure and column 'STATUS' with your desired column.
    Hope this helps,
    Regards,
    Vinodh

  • Input Field in ALV Grid

    Hi All,
    I have a requirement to display one field in the ALV grid as input field,so that  the user can enter value in that field when the ALV is displayed.I need to use this entered user value later in th eprg for further processing.
    My worry is that i do not see any parameter such as "INPUT " or "EDIT " in the field catalog structure lvc_s_fcat for the ALV.
    How can i acheive having editable input field in the ALV grid?
    Please suggest.
    Thanks,
    Swati

    EDIT field in field catalog is there, you must have ommited it.
    ls_fieldcat-edit = 'X'.   "set your desired column to be edited
    Now you need to get entered value for further processing.
    Define a class as a event receiver for data_changed or data_changed_finished events. Here is how to implement the latter method:
    CLASS cl_alv_event_receiver DEFINITION.
      PUBLIC SECTION.
        METHODS:
          cell_changed FOR EVENT data_changed_finished OF cl_gui_alv_grid
                              IMPORTING e_modified et_good_cells.
    ENDCLASS.
    CLASS cl_alv_event_receiver IMPLEMENTATION.
       METHOD cell_changed.
          check e_modified = 'X'. "if content of cell was changed
           "here you check et_good_cells table, it will contain new values
           "it is of type lvc_t_modi
       ENDMETHOD.
    ENDCLASS.
    CREATE OBJECT cl_alv_event_receiver.
    "now just indicate the handler for this event
    SET HANDLER cl_avl_event_receiver->cell_changed FOR cl_gui_alv_grid.
    Each time some action was perfomed on edit field, the method will be invoked and you can check inside what was changed and what is the new value.
    Additionally after displaying your output table in alv, you need to register this event
    "register edit events
          CALL METHOD W_ROGRID->register_edit_event
            EXPORTING
              i_event_id = cl_gui_alv_grid=>mc_evt_modified.
    Now all you need is to update appropraite records to your internal table in your METHOD cell_changed.

  • OVS on read-only input field

    OVS will not allow me to change the value of a read-only input field.  If the input field is set to read-only, the OVS selection table does not display an 'OK' button, only close.
    Value cannot be copied (field is not editable)
      I do not want the field to be editable on the screen, but only allow input via the selected row in the OVS.  Any suggestions?
    Edited by: Bob DeNuto on Jul 31, 2008 1:22 AM

    Using Dictionary Search Help and OVS in this case will disable the Copy button and you don't have any control.
    Use Freely Programmed Value Help, this will solve your problem
    https://wiki.sdn.sap.com/wiki/display/WDABAP/Freelyprogrammedinput+help
    how to provide f4 help to the read only input field
    Abhi

Maybe you are looking for

  • Error message when installing Mavericks...

    After successfully downloading, the install program error messa 'this version has virus... remove and download new version." After 5 or 6 times of this, still nothing... help!

  • Firewire 800 issue with mac mini

    I just upgraded from a 3 year old mac mini with a firewire 400 port which I connected to my LaCie external hard drive via a firewire 400 cable. The LaCie has 3 USB ports that I connected my printers and scanner to as the 4 ports on the back of the ma

  • Error while processing "Prepare Data Transfer"

    Hi all, At the Processtype ERP Initial Package for HCM Personnel Administration (PA)  I start the stept "Prepare Data Transfer". This step abort at the point "Generate Conversion Objects" with the error message: Subactivity PC002_MT_RT_GEN task 00000

  • Alert for shopping cart awaiting approval

    I am trying to set up an alert for carts that are awaiting approval. I would like to send a notification to the approver to remind them that they still have work items to execute. With this in mind, can anyone please let me know all the configuration

  • 17-e110dx How to go about upgrading ram?

    How do I go about upgrading the ram in my HP Pavillion 17-e110dx? I would like to upgrade to 8gb and want to know what kind of ram to buy. A link would be appreciated. This question was solved. View Solution.