Get value in a field in ALV OO

Hi experts, i have a new problem, i created a report with ALV OO, and a field has a matchcode but when i choose one value with double click or check icon, the value don't appear into the field, thanks for your help, i wait your answers =)

Hi David,
Please check our friend UWE reply in this thread
Re: F4 for fields in ALV Grid
Good luck
Narin

Similar Messages

  • How to get value in custom field(Part OF BOL) in search result view.

    Hi All,
    I am new to CRM WEBUI and i am facing issue in populating value in one field of search result view.
    Current requirement is .
    On product f4 , we get search help and search result view.
    one custom field need to be added in search result view ( for eg any description field).
    This description field is already  available in one of z relation  maintained in PRODUCT root object.
    Solution tried so Far:
    1. We enhance one Standard Product structure and add that description field .
    2. Add new  field( description) in result view context node as attribute by using bol attribute.
    3. Customize search result view and display that description field in result.
    By doing above three steps, field is available in  search result view.
    but issue is we are not able to get values.
    1st Approach: write code in getter and setter method . Pass the relation name and get the property of description  field
    in setter method, set the property.
    Issue : we were not able to sort the values on this description field. so scrap this 1st approach
    2nd Approach: In Event EH_Onsearch Help, we try to use collection wrapper to get current value of description
    by using relation name .
    We use component controller to set the value of description since  searchresult view-conext node->result node is bound to one comp controller node.
    but this solution also does not work..
    Please advice us  what approach we should use to get value in description field  and sorting should also work.
    Thanks in Advance.

    Hi Girish,
    1. We enhance one Standard Product structure and add that description field .
    2. Add new  field( description) in result view context node as attribute by using bol attribute.
    3. Customize search result view and display that description field in result.
    By doing above three steps, field is available in  search result view.
    but issue is we are not able to get values.
    1st Approach: write code in getter and setter method . Pass the relation name and get the property of description  field  and by using this approach we are able to get value but sorting was not working so we disable the sorting as it was not required by business.
    if u need sorting on that field.
    then u should go for value node approach and write code for getting value in get set method
    and for sorting also , need to write code.
    This is my understanding on this .
    Please reward if this solution is helpful

  • Get values in dropdown field based on f4 help in another field

    Hi Experts,
    How to Get values in dropdown field based on another field which is F4 Help. If I select one value in f4 help field(ex: 1) I need to get values in dropdown field (ex:a, b, c),If I select another value in f4 help (ex:2) I need to populate different values (ex: d). Can any one please provide sample code that can help more.
    Thanks,
    Ashok.
    Moderation: Kindly search and find the solution, before you post.

    Dear Ashok,
    You can take help from this program in SAP named BCALV_EDIT_08.
    Thanks.
    With regards.

  • Get value of two fields into one field

    Hellou,
    i need little help with javascript again
    Currently i'm using code below to get value from one field to other:
    getField("Text35").value = getField("Text1").valueAsString;
    Now i'm wondering how to change this code, so i could get values from two fields into one. For example i have field "firstname" and field "lastname", now i want to show this in field "name".
    Example, if field firstname have value John and field lastname value is Doe, i want to show it in field name like "John Doe".
    I hope that u understood what i want
    Thanks for helping me!

    getField("Text35").value = getField("Text1").valueAsString + " " +
    getField("Text2").valueAsString;

  • Help values for a field in ALV GRID

    Hi !
    i have a field in a structure, whose field have a table of values in its domain. How does this table values can apear in the ALV, when i click the corresponding field?
    Best regards,
    Rui

    Hi,
    Use the Field Catalogue Properties
    Ref_fieldname
    Ref_Tablename
    and assign the corresponding field & Table/Strucutre Name to the above fields....

  • How to get selected-value of dropdown-field in alv ?

    Hello experts,
    I have a alv-table with dropdown-field.
    When I open the dropdown I am able to select another value.
    Now I use method ON_CLICK with  ON_CELL_ACTION, and when
    I change value in my alv, system jumps into this mehtod.
    But how do I get now the selected dropdown value in this method ?
    I use following code in comp-wdini in order to declare the dropdown:
    Dropdownfield
      DATA: lr_dp TYPE REF TO cl_salv_wd_uie_dropdown_by_key.
      DATA: lr_node TYPE REF TO if_wd_context_node_info.
      DATA: lt_valueset TYPE wdr_context_attr_value_list.
      DATA: ls_valueset TYPE wdr_context_attr_value.
      DATA : lr_nodeinfo TYPE REF TO if_wd_context_node_info.
      DATA  wa TYPE cdbc_tj30t.
      DATA: lr_drdn_by_index TYPE REF TO cl_salv_wd_uie_dropdown_by_idx.
      SELECT *   FROM cdbc_tj30t INTO wa WHERE stsma = 'CRMOPPOR' AND
        spras = 'DE'.
        ls_valueset-value = wa-estat. " actual values
        ls_valueset-text = wa-txt30. " text displaying on the dropdown
        APPEND ls_valueset TO lt_valueset.
      ENDSELECT.
      LOOP AT lt_columns INTO ls_column.
        CASE ls_column-id.
          WHEN 'CONCATSTATUSER'.
            CREATE OBJECT lr_drdn_by_index
              EXPORTING
                selected_key_fieldname = ls_column-id.
            lr_drdn_by_index->set_valueset_fieldname( 'VALUESET' ).
            lr_drdn_by_index->set_type( if_salv_wd_c_uie_drdn_by_index=>type_key_value ).
            ls_column-r_column->set_cell_editor( lr_drdn_by_index ).
         ENDCASE.
      ENDLOOP.
    In view-ini I fill the table which is bound to my alv-table:
    LOOP AT lt_list_opportunities INTO lstru_list_opportunities
          WHERE status = ls_opportunity_status-estat AND
         valid_to <= ls_input-bdate AND valid_from >= ls_input-vdate.
        ls_opportunities-valueset = lt_valueset.
        MOVE-CORRESPONDING lstru_list_opportunities TO ls_opportunities.
        APPEND   ls_opportunities TO ltt_list_opportunities.
      ENDLOOP.
      lo_nd_opportunities = wd_context->get_child_node( name =
      wd_this->wdctx_opportunities ).
      lo_nd_opportunities->bind_table( new_items = ltt_list_opportunities ).
    HOW can I now get the slected dropdown values in ON_CLICK with  ON_CELL_ACTION method ?
    Thanks for answers !!
    Gerd

    Hello Abap,
    when I have selected the value in the dropdown-box, then the event should start, and then I should have the
    selected values of the dropdown box.
    Hope you can help me !
    Gerd

  • Displaying default value for a field in ALV table

    Hai all,
         I am having an ALV table in which I want to display Requisition number by default using a value which i generated randomly and it is stored in a variable.
    While displaying ALV table my req number field should display that value by default when ever user is inserting a row( all the coloumns n my alv are editable.
    Is it possible?? 
    Kindly give some suggestions.
    Thanks in Advance,
    Nalla.B

    Hai Kris,
        I took help from ur link and i declared a global attribute request_number.
    and i created an event handler ON_ALV_INSERT and did the follwing coding for giving default value wen ever am inserting new row.
    FIELD-SYMBOLS: <wa_row> LIKE LINE OF r_param->t_inserted_rows.
      DATA bill_details TYPE REF TO zdom_bill_detail.
      LOOP AT r_param->t_inserted_rows ASSIGNING <wa_row>.
        bill_details ?= <wa_row>-r_value.
        IF bill_details->REQ_NUMBER IS INITIAL.
      DATA lo_nd_bill_detail TYPE REF TO if_wd_context_node.
      DATA lo_el_bill_detail TYPE REF TO if_wd_context_element.
      DATA ls_bill_detail TYPE wd_this->Element_bill_detail.
    navigate from <CONTEXT> to <BILL_DETAIL> via lead selection
      lo_nd_bill_detail = wd_context->get_child_node( name = wd_this->wdctx_bill_detail ).
    lo_el_bill_detail = lo_nd_bill_detail->get_element( index = <wa_row>-index ).
          lo_el_bill_detail->set_attribute(
            EXPORTING
              name  = 'REQ_NUMBER'
              value = wd_comp_controller->request_number
    Wen am  setting the value of wd_comp_controller->request_number to my context attribute am getting NULL object ref error.
    lo_el_bill_detail->set_attribute(
        name =  `REQ_NUMBER`
        value = wd_comp_controller->request_number ).
    Pls give some suggestions,
    Thanks in Advance,
    Nalla.B

  • Restricting character values in Editable field in ALV

    Hi ,
    I am working on Editable ALV ..,
    Editable field is net amount field ,
    can you tell me how to restrict the user to enter the
    character values before he is going for saving.
    can i restrict the user while entering it self b'coz
    while saving message is getting but client want at user entry level itself..,
    code ::
      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-REF_TABLE = 'EKPO'.
      WA_FIELDCAT-REF_FIELD  = 'NETPR'.
      APPEND WA_FIELDCAT TO IT_FIELDCAT.
      CLEAR  WA_FIELDCAT.
    regards,
    abdul

    Hi,
    Yes, you can ristrict the data entered by user.
    1. declare the field of type P for net price, if will not accept character values. and  if user entered char value and press enter it 
        will through error.
    2. check in loop, if net price is of P type, etc....
    3. u cas pass routine to your REUSE_ALV_grid_display.
    i_callback_user_command           = 'USER_COMM'  
    in user_comm you can write ur logic.
    Ex: when Save.
           check ur fiels etc...
    4. remove the given reference table and field name.
    EX :   LS_FIELDCAT-REF_FIELDNAME = 'NAME1'.
                LS_FIELDCAT-REF_TABNAME = 'ZCYLI_QUAN'.
    hope this will solve your problem.

  • Unable to enter value in editable field of ALV (set_current_cell_via_id)

    In the Editable screen of ALV, I have to set the cursor on the 3rd field 'VBELN' ( which is editable ).
    Using the method set_current_cell_via_id of ALV grid the focus has been set on the particular field. The field Sales order 'VBELN' is already set as editable (EDIT = 'X').
    But still I am unable to enter values unless and until I click anywhere on the screen.
    Please help me with the solution.
    Thanks in Advance.

    No...Whenever my screen is called, the focus is set on the 'VBELN' field but I can not enter the value.
    See the code below:
    Display the ALV report.
          CALL METHOD grf_alv_popup->set_table_for_first_display
            EXPORTING
              is_layout                     = gs_layout
              it_toolbar_excluding          = gt_exclude
            CHANGING
              it_outtab                     = fp_output[]
              it_fieldcatalog               = gt_fieldcat_popup
            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.
    ls_row-row_id = 1.
    ls_col-fieldname = 'VBELN'.
          CALL METHOD grf_alv_popup->set_current_cell_via_id
            EXPORTING
              is_column_id = ls_col
              is_row_no    = ls_row.
    With the method set_current_cell_via_id, the field VBELN displays as highlighted but to enter the value I need to click on the screen first.

  • Drop down list of  values for a field in ALV rpt within a BADI

    Hi,
    I need help on this issue.
    TCODE LI21 is used to clear the differences in IM.  The business now wants to prompt for a reason code before they can post a new material document for this clearing.  I have create an implementation in BADI LE_WM_INV_WM_IM, which display the field for user to enter the reason code.   However, I am trying to get a dropdown list which contain the possible values for reason code so the user can choose from this list.  There are sample codes to do this but I can't apply to the codes in the implementation because call screen is not allowed.  Has anyone done this before or can advise me of the solution?
    Thanks.

    Hi,
    Use the Field Catalogue Properties
    Ref_fieldname
    Ref_Tablename
    and assign the corresponding field & Table/Strucutre Name to the above fields....

  • Decimal  values for a field in ALV

    Hi,
    I created an ALV report.
    It has a field which will display the calculated value as '103,839,389'. This should be dispalyed as '103,839,389.00' with decimal value, I mean with 2 decimal places, how can this be achieved?
    Thanks,
    Kumar

    hi check this..
    use these in populating the fieldcat..
    it_fieldcat-decimalsfieldname = fieldname
    it_fieldcat-decimalstabname   = tabname
    it_fieldcat- decimals_out   = 2.
    regards,
    venkat

  • How to get value of a Field if field name given in a String ?

    Hello,
    I've a String variable which contains a value such as X.Y.Z. The last one (Z) is a primitive type, others (X and Y) are my own classes.
    class C1
    C2 X;
    class C2
    C3 Y;
    class C3
    int Z;
    C1 var = new C1();
    When I encounter X.Y.Z in the String, I want to replace it with its value of var.X.Y.Z. How can I do ?
    thanks in advance....

    Thanks,
    But, X.Y.Z is a Field name not known during compilation, just know at runtime.
    The following working codes return the Field names(including sub-Fields in sub-classes) and their values in a Map:
    void getFieldValues(Object object, StringBuffer fieldName, Map oMap)
    throws java.lang.IllegalAccessException
      Field[] fields = object.getClass().getDeclaredFields();
      String  tmpString;
         for (int i = 0; i < fields.length; i++)
           if (!fields.getType().isPrimitive()) { tmpString = fieldName.toString();
    fieldName.append(fields[i].getName() + ".");
    getFieldValues(fields[i].get(object),fieldName,oMap);
    fieldName = new StringBuffer(tmpString);
    else oMap.put(fieldName.toString() + fields[i].getName(), fields[i].get(object));

  • How can i get value when the field name is user's defined

    Hi,
    I have a one java method:
    public ResultSet countUserDb(String id) {
    ResultSet rs = null;
    con = dbcon.connect();
    String queryString = ("select count as count from
    db_allocation where user_id='"+id+"'");
    Statement stmt = con.createStatement();
    rs = stmt.executeQuery(queryString);
    When i call it in a jsp file.
    ResultSet counter =db.countUserDb(request.getParameter("id"));
    if(counter.next())
    int x=rs.getInt("count");
    Tomcat said incorrect column name.How can i get the result set when the field name is user's defined.
    Best regards
    Ricky

    You should give the user defined name in the ResultSet.getXXX method to retrieve the column value.
    Example
    SQL:
    Select ename as employeename from emp;
    You should say :
    ResultSet.getString("employeename"); to get the value.
    Alternatively you can retrieve it using column number:
    ResultSet.getString(1);
    Chandar

  • Onblur get values for form field from table.

    Hello,
    I created one from with report for TableA.TableA has 5 column. Now after i enter first field ,on blur, i want 2 other fields should get populated.They should get the 2 values from TableB.Table A and Table B are connected through primary key foreigh key constraint.First field is primary key of TableA.
    How can i do this.I am writing a javascript function which i am calling from first form field.
    But in the function how to take values from the table for the other 2 fields.
    Can i just Select statements inside javascript function?
    Thanks
    Swapna.T

    Swapna,
    You can do this using AJAX. See link.
    Hope it helps
    Cheers,
    Hari

  • Get value of changed field of create_decision_popup window in lineedit mode

    Hi there,
    i'm calling a create_decision_popup popup in lineedit mode.
    So i could edit the values of the selected line.
    How could i acces the value of the changed fields after closing the popup window in the event_sel event.
    Here my code:
    v_popup = comp_controller->window_manager->create_decision_popup( iv_title = 'Window title'
                                                                        iv_selection_mode    = 'LINEEDIT'
                                                                        iv_display_table     = gt_table
                                                                        iv_visible_columns   = lt_visible_columns
                                                                        iv_visible_row_count = lv_row_count ).
    v_popup->set_on_close_event( iv_event_name = 'event_sel' iv_view = me ).
    v_popup->open( ).
    DATA: lr_outputnode TYPE REF TO  cl_bsp_wd_context_node.
    lr_outputnode ?= v_popup->get_context_node( 'OUTPUTNODE' )
    Thanks,
    Regards TomSd

    You want to edit the selected value from popup, so first populate the selected row in table and then edit in the table.
    Open the popup using :
    CALL METHOD me->comp_controller->window_manager->create_decision_popup
           EXPORTING
             iv_title             = 'Route'
             iv_description       = 'Route' 
             iv_selection_mode    = 'SINGLE'
             iv_visible_row_count = '10'
             iv_display_table     = gt_route
             iv_visible_columns   = lt_table
           RECEIVING
             rv_result            = gr_popup.
    gr_popup->set_on_close_event( iv_event_name = 'DEC_POPUP_CLOSED' iv_view = me ).
    gr_popup->open( ).
    Now on close event i.e. DEC_POPUP_CLOSED write the code to transfer the selected row into the table.
    lv_outputnode ?= gr_popup->get_context_node( 'OUTPUTNODE' ).
    lv_index = lv_outputnode->get_selectedrowindex( ).
         IF lv_index IS NOT INITIAL.
           READ TABLE gt_route INTO ls_route INDEX lv_index.
           lr_col ?= me->typed_context->zroute->collection_wrapper.
           CREATE DATA lr_tab_data.
           CREATE OBJECT lr_valuenode
             EXPORTING
               iv_data_ref = lr_tab_data.
           lr_valuenode->set_properties( is_attributes = ls_route ).
           lr_col->add( EXPORTING iv_entity    = lr_valuenode ).
           REFRESH: gt_route.
           CLEAR: gr_popup.
    endif.
    Now you can see the selected row in your table view and the popup will be closed.
    To make the row editable go to htm page on which table view is created, and then modify
    editMode              = "ALL"
    in  <chtmlb:configCellerator>

Maybe you are looking for

  • I am trying to dnld FF to a Win 7 sys using IE 10 but it will not dnld. I am logged in as admin

    <blockquote>Locking duplicate thread.<br> Please continue here: [[/questions/962268]] </blockquote> after clicking on dnld it simply fails, no reasons provided. when I retry it has the same results.

  • How do you use a drop down menu to populate other fields?

    I am creating a PDF that upon choosing from a list of People their address, phone, etc will automatically come in the remaining fields, or if a new person is choosen than you can add names address phone and it will save for future referrence ? Any he

  • Iframe src bound to backend bean url

    Hello there, I have a jspx page with an iframe. I would like to bind the src of that iframe to an url which is in my backend bean - populated by reading a property file. Here the code. .jspx <f:verbatim> <IFRAME src="http://my.oracle.com" frameborder

  • Reg: material reconcilation o/p error

    Dear experts,   Here am generated a report for material reconcilation. For that am getting error in my o/p. open rm qty and closing rm qty, here open rm qty is 2,500 and closing rm qty is 2436. for one lot no it displays 5 service invoice, job work i

  • Dreamweaver Help Table layout

    How do i get tables to sit right on tip of the page window 0.00px buy 0.00px by default it sits on 10.00px 15.00px frustrating the hell out of me can any on help...