How to put an input field in ALV

hi
how to put an input field in ALV

Hi
There are 2 ways wherein you can make a field as input enabled.
One is by setting the edit = 'X' in the fieldcatalog for that field.
Loop at l_fcat.
if l_fcat-fieldname = 'FIELD'.
l_fcat-edit = 'X'.
modify l_fcat.
endif.
Endloop.
Second method is by using Styles by which you enable a field, disable a field or make it a pushbutton etc..Using Styles can be found in any basic document on ALV.
Regards
Navneet

Similar Messages

  • In BSP how to give the input field as mandatory?

    Hi friends,
    In BSP how to give the input field as mandatory?
    In BSP i want to validate the input field (example checking the material no is valid or not)
    if this material no doesnot exit means i want to pass error message.What is the code for that.
    Moosa

    hi
    try this
    in LAYOUT
    <htmlb:inputField id = "vname"  disabled = "False" value = "<%= v_visitor %>"/> <font color="red" size="2"><b><%= page->messages->assert_message( 'vname' ) %></b></font></td>
    in DO_HANDLE_EVENT
    in oninputprocessing
    CLASS CL_HTMLB_MANAGER DEFINITION LOAD.
    IF event_id = CL_HTMLB_MANAGER=>EVENT_ID.
      DATA: event TYPE REF TO CL_HTMLB_EVENT.
      event = CL_HTMLB_MANAGER=>get_event( runtime->server->request ).
      IF event->name = 'button' AND event->event_type = 'click'.
        DATA: button_event TYPE REF TO CL_HTMLB_EVENT_BUTTON.
        button_event ?= event.
      ENDIF.
        case event->id.
            when 'select'.
               if v_visitor = ''.
                 page->messages->add_message(
                 condition = 'vname'
                 message   = 'Visitor Name can not be blank'
                 severity  = page->messages->CO_SEVERITY_ERROR ).
              ELSE.
                    here u can write ur when ur field getting filled
            endif.
         endcase.
    endif.
    give marks if it is helpful
    thanks

  • How do we validate input fields on the selection screen

    How do we validate input fields on the selection screen

    hi balram,
    u can validate input fields using <b>AT SELECTION-SCREEN</b>  Event.
    PARAMETERS : p_werks TYPE marc-werks.
    AT SELECTION-SCREEN ON p_werks.
    SELECT SINGLE *
    FROM t001w
    WHERE werks = p_werks.
    IF sy-subrc <> 0.
    MESSAGE 'Invalid Plant' TYPE 'I'.
    ENDIF.
    Like this, we can validate user input for plant.
    check this link:
    http://help.sap.com/saphelp_nw04s/helpdata/en/9f/db9a2e35c111d1829f0000e829fbfe/frameset.htm
    http://help.sap.com/saphelp_nw2004s/helpdata/en/56/1eb6c705ad11d2952f0000e8353423/content.htm
    Reware me if useful......
    Harimanjesh AN

  • How to set cureent date as input field in alv

    Hi Experts
        I have created an Alv report.In that report i have an input field Created Date.
        how to set the current date default in the alv input.Plz guide

    Hi ,
    In the internal table declare a field of type D and pass the sy-datum.  this will solve ur problem.
    Hope information shall be useful.
    Regards
    Santosh Kumaar.M

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

  • Upper Lower Case for Input Fields of ALV

    Hi,
    i have an ALV has some input fields columns. All values of input fields are upper case after entering something into that input fields (etc. airline -> AIRLINE).
    how to add upper lower case control to ALV? (etc. airline -> airline, AIRLINE -> AIRLINE)
    Thanks.

    Dear Narullah,
    The elements of your table consists of data types you can maintain in the SE11.
    The data type are based on a domain which you can maintain in SE11 as well.
    Just go to SE11 and check the domain which is behind the table field. On the tab "Definition" of the domain just checkmark "Lower Case". Afterwards the system does not translate your input to upper case automatically.
    If you use a SAP domain, you need to copy it to customer namespace, set the lower case flag, create a new data type based on your own domain and use it in the structure of your internal table.
    Does this help?
    Regards,
    Hendrik

  • How to add an input field in the web UI of CRM 2007

    Hi everybody.
    I want add an Input field in the Web UI Screen. How it is possible.
    I want get the information with detailed descriptions if possible with screen shorts.
    What type of methods it will be generated and what are the code we entered in those methods.
    Take according to any example. But with detailed description.
    I am new for the CRM 2007. So, please give the screen shorts with proper data.
    Not only adding the field. If any data i entered in the adding field then that will be stored in the tables otherwise no use by adding the field.
    So, Can anybody please send a proper information according to this.
    Here another one How to Add our own table (Ztable) field in the Web UI Screen.
    How to add the same field in the BOL.
    Please expalin about those concepts with full of screen shorts messages.
    Thank You.
    Regards,
    Krishna.

    If you want to add extra standard fields (like one you mentioned), you can use Component Workbench and Copy the configuration and create your own configuration and make the "Available Fields" appear there.
    If the standrd field is not available, you can Add Context Node using wizard and make it visible.
    If its a custom field (a new one); you will have to use EEWB and add the fields and then make it visible in the UI using Component Workbench.
    Regards,
    Alin

  • How to put a check boc in alv grid

    hi gurus i  need to put a checkbox in alv grid output
    not a pop up window
    can anybody inform me
    thank you
    raghavendra

    Hi,
    check these threads
    How can I display a checkbox in ALV? http://www.sapfans.com/forums/viewtopic.php?t=88376
    http://www.sapfans.com/forums/viewtopic.php?t=40968
    http://www.sapfans.com/forums/viewtopic.php?t=6919
    Regards

  • How to make a Input Field with multiple lines?

    hey folks,
    i need to make a popup window or a dynpro with 2 input fields, where the user can write on multiple lines. why isnt there such an input field in the screen painter? how can i make this? if i can do this with a dynpro it would be nice but a popup with that feature would be better. didnt found any infos anywhere except for that thread, but its answer didnt work with my dynpro:
    How to make a input/output field with multiple lines
    thx for any helping answer

    i made it just like in that thread but there is an error message telling that gv_custom_container is not declared.
    *  MODULE status_0110 OUTPUT
    MODULE status_0110 OUTPUT.
      CREATE OBJECT custom_container
        EXPORTING
          container_name              = 'TEXT_CONTROL'
        EXCEPTIONS
          cntl_error                  = 1
          cntl_system_error           = 2
          create_error                = 3
          lifetime_error              = 4
          lifetime_dynpro_dynpro_link = 5.
      CREATE OBJECT text_editor
        EXPORTING
          parent                     = gv_custom_container
          wordwrap_mode              = cl_gui_textedit=>wordwrap_at_windowborder
          wordwrap_to_linebreak_mode = cl_gui_textedit=>false
        EXCEPTIONS
          error_cntl_create          = 1
          error_cntl_init            = 2
          error_cntl_link            = 3
          error_dp_create            = 4
          gui_type_not_supported     = 5.
      SET PF-STATUS 'STATUS_0110'.
      SET TITLEBAR 'TITLE'.
    ENDMODULE.                    "status_0110 OUTPUT
    Edited by: rafe b. on Oct 26, 2009 2:56 PM

  • How to validate the input field

    Hi,
    I have a input form which is draged from input port of a RFC.
    in this input form i have two input fields nad submit button.
    on of this input field should always take the character values only. it should not take any numeric value
    and other input field should always take numeric value only.
    i.e how to validate this two input fields.
    regards
    srinivas

    Hi,
    U can validate input fields using javascript.Write OnClientClick function for that submit button if ur using htmlb or onClick if u r using html.Refer the follows
    http://help.sap.com/saphelp_nw70/helpdata/en/03/900e41a346ef6fe10000000a1550b0/frameset.htm
    There are two ways to achieve ur task.
    1.By checking for all alphabets.in this u need check all the alphabetic characters one by one.Refer the following
    http://www.shiningstar.net/articles/articles/javascript/javascriptvalidations.asp?ID=ROLLA
    http://www.shiningstar.net/articles/articles/javascript/checkNumeric.asp?ID=AW
    2.By using regular expressions.its very easy and a single line code.here u need to specify single expression for whole alphabets.Refer this
    http://aspzone.com/blogs/john/articles/173.aspx
    Everything has been given for validating in javascript.i hope u also validating in javascript only.
    For more details on "Regular expressions" search google.
    Regards,
    Tamil K

  • How to put a dictionary field into an existing Search Help by calling FM

    Hi All
    I'm facing a problem when using  an existing search help in a screen input field. I'm not directly mentioning search help to that screen field. Instead of this i'm calling Function Module F4IF_FIELD_VALUE_REQUEST  like
          lv_tabname = 'Z_FBSTM_SHLP_EXIT'.
          lv_fieldname = 'SALES_AREA_CODE'.
          lv_searchhelp ='ZCP_SUBAREA_HELP'.
          lv_shlpparam = 'SALES_AREA_CODE'.
      ALL FUNCTION 'F4IF_FIELD_VALUE_REQUEST'
          EXPORTING
            tabname                   = lv_tabname
            fieldname                 = lv_fieldname
            searchhelp                = lv_searchhelp
            shlpparam                 = lv_shlpparam
                 dynpprog                  = sy-cprog
                 dynpnr                    = sy-dynnr
    In this  way i'm not getting proper output.
    can you help me out.....
    help will be rewarded.

    I am giving the code   als  for the F4 help just  change  you fields and   and  table  of tha field   you will get it  .... and see the  module  in which  place  i had  write in the screen
    <b>PROCESS ON VALUE-REQUEST( F4 ) statement</b>
    Code to demonstrate how to perform a manual value help(F4) on a particular field using the PROCESS ON VALUE-REQUEST statement and how to return values back to a table control on the screen. For standard screen fields simply move the value to the appropriate screen field name
    Screen flow logic........
    PROCESS BEFORE OUTPUT.
    *MODULE PBO_MODULE.
    PROCESS AFTER INPUT.
    *MODULE PAI_MODULE.
    PROCESS ON VALUE-REQUEST. "F4
      FIELD EKPO-EBELP MODULE help_ekpo.
    * populate screen field from within PROCESS ON VALUE-REQUEST(F4) call
    *&      Module  help_responsibility  INPUT
    *       text
    MODULE help_ekpo INPUT.
    **Transport values to table dynpro/screen table control
      DATA: l_stepl LIKE  sy-stepl,
            l_indx  LIKE  sy-stepl.
      DATA: dynpfields        LIKE dynpread OCCURS 5 WITH HEADER LINE.
    * Adjust for scroling within table control
      CALL FUNCTION 'DYNP_GET_STEPL'
        IMPORTING
          povstepl        = l_stepl
        EXCEPTIONS
          stepl_not_found = 0
          OTHERS          = 0.
      l_indx = tc_ekpotable-top_line + l_stepl - 1.
              "tc_ekpotable should already have been declared
      REFRESH dynpfields.
      CLEAR   dynpfields.
      dynpfields-fieldname  = 'EKPO-EBELN'.
      dynpfields-fieldvalue = '00010'   "wa_ekpo-ebeln.
      dynpfields-stepl      = l_stepl.
      APPEND dynpfields.
      dynpfields-fieldname  = 'EKPO-EBELP'.
      dynpfields-fieldvalue = '00020'   "wa_ekpo-ebelp.
      dynpfields-stepl      = l_stepl.
      APPEND dynpfields.
      CALL FUNCTION 'DYNP_VALUES_UPDATE'
        EXPORTING
          dyname     = 'SAPLZZ_EKKO'    "Program name
          dynumb     = '0100'           "Screen number
        TABLES
          dynpfields = dynpfields
        EXCEPTIONS
          OTHERS     = 0.
    ENDMODULE.                 " help_ekpo  INPUT
    reward  points if it is usefull ....
    Girish

  • How to disable a input field in OVS search

    Hi friends,
    I have crated a OVS search help for matnr.
    i have two input field like matnr and mat desc.. user can enter any value and hit SEARCH..
    im getting results.
    Now i want to hardoced a value of matnr = 001.. and make this field read only..
    how can we do it..
    i just took a example of matnr and mat desc. to make u understand easily...
    kindly help.
    Niraja

    Hi Niraja,
    You can initialize the value for MATNR in the phase 1 of the eventhandler method for OVS. Try refer the code segment below. Am initializing the values for MATNR & MAKTX fields in the lines:
    ls_search_input-matnr = 'D*'.
    ls_search_input-maktx = '*'.
    *     pass the values to the OVS component
          ovs_callback_object->set_input_structure(
              input = ls_search_input ).
    Regards,
    Uday
    Below is the complete code from my eventhandler method:
    method ON_OVS .
    " declare data structures for the fields to be displayed and for the table columns of the selection list
      types:
        begin of lty_stru_input,
    "   add fields for the display of your search input here
          matnr type string,
          maktx type string,
        end of lty_stru_input.
      types:
        begin of lty_stru_list,
    "   add fields for the selection list here
          matnr type string,
          maktx type string,
        end of lty_stru_list.
      data: ls_search_input  type lty_stru_input,
            lt_select_list   type standard table of lty_stru_list,
            ls_text          type wdr_name_value,
            lt_label_texts   type wdr_name_value_list,
            lt_column_texts  type wdr_name_value_list,
            lv_window_title  type string,
            lv_group_header  type string,
            lv_table_header  type string.
      field-symbols: <ls_query_params> type lty_stru_input,
                     <ls_selection>    type lty_stru_list.
      data: lv_matnr type mara-matnr,
            lv_maktx type makt-maktx.
      case ovs_callback_object->phase_indicator.
        when if_wd_ovs=>co_phase_0.  "configuration phase, may be omitted
    " in this phase you have the possibility to define the texts,  if you don't want to use the defaults (DDIC-texts)
          ls_text-name  = `MATNR`.  "must match a field name of search
          ls_text-value = `Material Number`. "wd_assist->get_text( `001` ).
          insert ls_text into table lt_label_texts.
          ls_text-name  = `MAKTX`.
          ls_text-value = `Material Description`.
          insert ls_text into table lt_label_texts.
          ls_text-name = `MATNR`.  "must match a field in list structure
          ls_text-value = `Col1 -> Material Number`. "wd_assist->get_text( `002` ).
          insert ls_text into table lt_column_texts.
          ls_text-name = `MAKTX`.  "must match a field in list structure
          ls_text-value = `Col2 -> Material Description`. "wd_assist->get_text( `002` ).
          insert ls_text into table lt_column_texts.
          ovs_callback_object->set_configuration(
                    label_texts  = lt_label_texts
                    column_texts = lt_column_texts
                    group_header = lv_group_header
                    window_title = lv_window_title
                    table_header = lv_table_header
                    col_count    = 2
                    row_count    = 10 ).
        when if_wd_ovs=>co_phase_1.  "set search structure and defaults
    " In this phase you can set the structure and default values of the search structure. If this phase is omitted, " the search fields will not be displayed, but the selection table is displayed directly.
    " Read values of the original context (not necessary, but you may set these as the defaults). A reference to " the context element is available in the callback object.
          ovs_callback_object->context_element->get_static_attributes
                                               ( importing static_attributes = ls_search_input ).
    " Setting the default values to be displayed in the selection screen
        ls_search_input-matnr = 'D*'.
        ls_search_input-maktx = '*'.
    "     pass the values to the OVS component
          ovs_callback_object->set_input_structure( input = ls_search_input ).
        when if_wd_ovs=>co_phase_2.
    "  If phase 1 is implemented, use the field input for the selection of the table
    "  If phase 1 is omitted, use values from your own context.
          assign ovs_callback_object->query_parameters->*
                                  to <ls_query_params>.
          lv_matnr = <ls_query_params>-matnr.
          lv_maktx = <ls_query_params>-maktx.
    replace all occurences of: '*' in lv_matnr with '%',
                               '*' in lv_maktx with '%'.
    select a~matnr
           b~maktx into corresponding fields of table lt_select_list up to 10 rows
                     from mara  as a inner join
                     makt as b on a~matnr = b~matnr where
                     ( a~matnr like lv_matnr and b~maktx like lv_maktx and b~spras = 'EN' ).
    "     call business logic for a table of possible values
    "     lt_select_list = ???
          ovs_callback_object->set_output_table( output = lt_select_list ).
        when if_wd_ovs=>co_phase_3.
    "   apply result
          assign ovs_callback_object->selection->* to <ls_selection>.
          if <ls_selection> is assigned.
            ovs_callback_object->context_element->set_attribute(
                                   name  = `MATNR`
                                   value = <ls_selection>-MATNR ).
            concatenate 'Description from MAKT:'
                        <ls_selection>-MAKTX
                        into <ls_selection>-MAKTX separated by space.
            ovs_callback_object->context_element->set_attribute(
                                   name  = `MAKTX`
                                   value = <ls_selection>-MAKTX ).
          endif.
      endcase.
    endmethod.

  • How to read the input field value into ABAP variable?

    Hi All,
    i need a read the value of an input field into an ABAP variable,and i am doing this in the following way
    lstring = request->get_form_field('myFlag').
    here 'myFlag' is the input field name,but this is not returning me any value into lstring.
    I have gone through the SDN and tried to do this.
    could you please help me out to resolve this issue.
    Thanks in Advance,
    Praveena

    Dear Praveena
    In which event are you putting this code. Place it in oninputprocessing event(Page with flow logic Model of coding). Then it will surely work.
    Regards
    Vijay.M

  • Create Input Field within ALV Toolbar

    Hi,
    I've created an ALV table using the CL_SALV_TABLE class. I'm now trying to include an input field within the ALV toolbar. I would also require this field to do an F4 to obtain its values. Can anyone help me?
    Thanks and regards,
    Adeline.

    Hi Adeline,
    as Rich explained: Not inside ALV toolbar. If you do not use full screen display but have a screen container for this, you may define a subscreen area on top of ALV container. Use CALL SUBSCREEN <area> INCLUDING <prog> <dynp> syntax to process the subscreen. Define PROCESS ON VALUE-REQUEST for F4. In PAI (PROCESS AFTER INPUT) you can modify the table displayed in the grid and do a new display.
    Regards,
    Clemens

  • How to clear the input fields

    when I click on search button, I get the search result, but along with those results, I see some input fields automatically assigned the values in the search input, which should not be.
    values are assigned to these fields because of controller context field values, once the values are populated these values are assigned everywhere where istle feild referring to.
    How to keep the user input without changes?
    Thanks!

    Naveen,
    You set contradictory requirements: on one hand you have mapping, where values are always synchronized; on other hand you whant them to be unique.
    Just break your existing mappings.
    1. Create separate attributes in view context(s) if you do not need to access them in component controller or you do not need to be synchronized between views.
    2. Create unique set of attributes in component controller for combination of attributes that really must be synchronized. Then map view context attributes accordingly.
    VS

Maybe you are looking for

  • Issue in Multi Provider

    Hi all, i need to create multiprovider combining cube and ods. i created MP and when i view the data in listcube, data is populated from cube . ods data didnt populated in MP. eventhough i mapped common chars from two infoproviders MP, data is not po

  • Formula interpreter logical operator

    Dasylab 10 I'm capturing voltage from a daq, using formula interpreter to make calculations and then generating a XY graph. As the values are being generated I am wanting to display in a digital display the Y peak value and the corresponding X value.

  • Swing component's margin in a frame

    Hello all, When you set the bounds of a Swing component in a frame, it will automatically apply those bounds to the VISIBLE part of the frame, so that, a Y value of 0, for example, will not be at the very top of the frame, but right underneath the ti

  • [svn] 3896: BLZ-266: Ajax FABridge doesn' t pull in channel info for messaging destination

    Revision: 3896 Author: [email protected] Date: 2008-10-26 16:02:33 -0700 (Sun, 26 Oct 2008) Log Message: BLZ-266: Ajax FABridge doesn't pull in channel info for messaging destination qa: yes doc: no bug: BLZ-266 checkintests: passed Details: /resourc

  • Wireless dhcp problem [fixed]

    ok, go easy with me... im a complete n00b when it comes to wireless stuff... I found my matching wireless module (zd1211), compiled and installed. loading it show it loads fine but nothing in the "used by" column (is that normal?). then i was trying