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

Similar Messages

  • How to validate the input field data in VC using RFC FM

    HI,
    Could any body please give me the solution for the following issue?
    When ever I enter a value in the input field of an iView, this value has to be validated from the backend BW system.  Is this validation is possible using RFC function module?
    If yes, please explain me.

    Hi Deepak,
    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
    Regards,
    Naren

  • How to keep the input field from PDF Form to RTF

    Hi,
    I'm looking to keep the input fields from my pdf form document to Rtf so I can use them in my Rtf document.
    Regards,
    Alan

    Good day Alan,
    I'm afraid that's not possible as form fields in a PDF file have no equivalent either in a Word format (.docx/.doc) or within the Rich Text Format (.rtf).  That data is simply stripped during the conversion as there's no equivalent available.
    Kind regards,
    David
    Acrobat Community Manager
    Adobe Systems

  • How to change the input field's color in SE51

    Hi:
    I need to change the color of input fields in module pool.
    I tried to modify its screen-color but it did not work.
    Need your suggestion.
    Regards
    Shashi

    hi,
    Check this similar thread
    Regarding the input field color
    thanks

  • How to make the input field of an uplaod button to readonly

    Hi all,
              I have to upload an excel file using upload button.But the problem here is i want the user to use only browse button to upload a file..but he should not enter mannulally in the input field.Is it possible to gray out the input filed but the browse button should be in active state.
    Regards
    Padma N

    Hi,
    I dont think you can make the readonly only for the inputfield which is part of the FileUpload UI.
    I guess your issue is related with user entering invalid urls and system hangs.
    Regards
    Ayyapparaj

  • 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

  • How to make the description field as mandatory in IW31 T.code

    Hi All,
    My requirement is make the Description field as mandatory in T.code: IW31
    That field is CAUFVD-KTEXT.
    How to make this field as mandatory,
    I tried with BADI: IWO1_SCREEN_MODIFY
    And some customer exists also (ZXWOCU04, ZXWOCU09) but unfortunately I couldnu2019t reach my functionality
    Can any please help me to reach out my functionality?
    Thanks and Regards,
    Rambabu.

    Dear Friend,
    go to spro - plant maintenance and customer service - maintenance and service processing - maintenance and service orders - define field selection for order header data(pm) -Field Selection for Order Header Data and Reference Object
    here keep CAUFVD-KTEXT is mandatory for your order types.
    Regards,
    pardhu

  • How to make the text fields as mandatory (in 'notes and attachment' tab)?

    Hi,
    We have defined some Fixed Values for texts under IMG>SRM>SRM Server>Cross Application Basic Settings>Text Schema>Define Fixed Values for Texts, for a certain transaction type of RFx responses for a text schema.
    Because of this, the bidder can choose one of these fixed values for texts. This is perfectly working fine.
    Now the question is, we want to make the texts fields as mandatory. i.e. The bidder should not be able to submit the responses if certain texts are blank.
    Is there be any BadI for this?
    GH

    You can use BBP_DOC_CHECK_Badi for this field validation using a filter value RFx/Bid (I ont remember exact word).
    Regards,
    Jagadish.

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

  • How to disable the input fields and labels.

    Hi,
         I have a requirement, when i click on button all the fields and labels in the form will be disable .

    Hi,
    You code wizard, in popup select set radio button and select the attribute and click on Ok, It will generate code automatically. Else find the below code
    DATA lo_el_context TYPE REF TO if_wd_context_element.
    lo_el_context = wd_context->get_element( ).
    CALL METHOD lo_el_context->set_attribute
    EXPORTING
    name = `DISABLE`  " Here disable is the name of attribute which u created in context of type wdy_boolean
    value =  'X' .
    Hope this helps u.,
    Thanks & Regards,
    Kiran.

  • How to make input field as mandatory field in sub screen

    Hi All,
           I need to display the input selection parameters in tab strip sub screen. The input screen is not giving an error while processing with blank values, but I made the input field as required in sub screen input filed settings. Can some one please help me how to make the input field as mandatory field in sub screen.
    Thanks in advance.
    Regards,
    Kannan

    Hi Kannan,
        Try this out.
    1. Goto screen painter
    2. Enter the program name and screen number ( screen # 1000 -  in case if its  a custom report prg)
    3. Double click on the field which u`ve got to make mandatory.You`ll get Screen painter attributes window.
    4. U`ll find three tabs here - Dict, Program, Display
    5. Go to Program tab, and change the first attribute - Input field`s input value as "Required".
    6. Save and activate it.
    7. Now execute ur program and this should make ur field as mandatory on the screen.
    This works with input fields, but I`m not sure about the input field in tab strip control.
    Hope this helps
    Regards,
    Farhana

  • 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 enable/disable the input fields based on the data entered/user action in the web dynpro abap?

    How to enable/disable the input fields based on the data entered in the web dynpro application abap?  If the user enters data in one input field then only the next input field should be enabled else it should be in disabled state. Please guide.

    Hi,
    Try this code.
    First create a attribute with the name readonly of type wdy_boolean and bind it read_only property of input field of which is you want to enable or disable.
    Next go to Init method.
    Set the readonly value as 'X'.
    DATA lo_el_context TYPE REF TO if_wd_context_element.
         DATA ls_context TYPE wd_this->element_context.
         DATA lv_visible TYPE wd_this->element_context-visible.
    *   get element via lead selection
         lo_el_context = wd_context->get_element( ).
    *   @TODO handle not set lead selection
         IF lo_el_context IS INITIAL.
         ENDIF.
    *   @TODO fill attribute
    *   lv_visible = 1.
    *   set single attribute
         lo_el_context->set_attribute(
           name =  `READONLY`
           value = 'X').
    After that Go to the Action  ENTER.
    First read the input field ( first input field, which is value entered field) , next give a condition
    if input value is not initial  then set the readonly value is '  '.
    DATA lo_nd_input TYPE REF TO if_wd_context_node.
         DATA lo_el_input TYPE REF TO if_wd_context_element.
         DATA ls_input TYPE wd_this->element_input.
         DATA lv_vbeln TYPE wd_this->element_input-vbeln.
    *   navigate from <CONTEXT> to <INPUT> via lead selection
         lo_nd_input = wd_context->get_child_node( name = wd_this->wdctx_input ).
    *   @TODO handle non existant child
    *   IF lo_nd_input IS INITIAL.
    *   ENDIF.
    *   get element via lead selection
         lo_el_input = lo_nd_input->get_element( ).
    *   @TODO handle not set lead selection
         IF lo_el_input IS INITIAL.
         ENDIF.
    *   get single attribute
         lo_el_input->get_attribute(
           EXPORTING
             name =  `VBELN`
           IMPORTING
             value = lv_vbeln ).
    if lv_vbeln IS not INITIAL.
        DATA lo_el_context TYPE REF TO if_wd_context_element.
        DATA ls_context TYPE wd_this->element_context.
        DATA lv_visible TYPE wd_this->element_context-visible.
    *  get element via lead selection
        lo_el_context = wd_context->get_element( ).
    *  @TODO handle not set lead selection
        IF lo_el_context IS INITIAL.
        ENDIF.
    *  @TODO fill attribute
    *  lv_visible = 1.
    *  set single attribute
        lo_el_context->set_attribute(
          name =  `READONLY`
          value = ' ' ).

  • How can we change the input field on a view stop showing zeros

    Hello,
           To make screen look consistent with other character input field. How can we change the input field on the view stop displaying zeros even though the data type is NUMC and data type should not be change?
    Edited by: sap_learner on Mar 25, 2010 5:44 PM
    Edited by: sap_learner on Mar 25, 2010 5:49 PM
    Edited by: sap_learner on Mar 25, 2010 5:55 PM

    hello Manas Dua,
                           Thanks for your help. I am able to resolve my problem.
    My code will help  the future comers to resolve this kind of issues.
    *The code is applied to method WDDOINIT of the default view.
      DATA lo_nd_terms_input    TYPE REF TO if_wd_context_node.
      DATA lo_nd_terms_input_i TYPE REF TO if_wd_context_node_info.
      DATA lv_zeros             TYPE wdy_attribute_format_prop.
      lv_zeros-null_as_blank = 'X'.
      lo_nd_terms_input = wd_context->get_child_node( name = wd_this->wdctx_input ).
      lo_nd_terms_input_i = lo_nd_terms_input->get_node_info( ).
      lo_nd_terms_input_i->set_attribute_format_props(
        EXPORTING
          name              = `ENTER THE ATTRIBUTE NAME`
          format_properties = lv_zeros     ).
    Edited by: sap_learner on Mar 26, 2010 5:02 PM

Maybe you are looking for

  • Need help on Socket and HTTP

    Hi, I need help ... please ... I have to use socket and not HTTPURLConnection I try to connect with a socket to a web server (apache2) and request one page but two times. The first time it works well but the second one it doesn't ... I get a null mes

  • Item Purchase Requisition Block

    For cash-relevant sales order line items that are assigned a u201Cdirect from vendoru201D item category and the deposit paid < 100% of the total line item value, then automatically set the purchase requisition block should be applied.  For the above

  • Acrobat Reader DC: Find the hand and select tools

    Here is a problem and a solution. In Adobe Reader DC you may want to use the hand tool and the select tool. But you won't get them to show in the main toolbar, no matter how deep you dig in the Show/Hide menu. SOLUTION: hover your mouse in the lower

  • SDM Deployment issue

    Hi Guys, I am trying to deploy the .jar file for an EJB as a part of adapter module ejb deployment and i am getting the following error have an ejb file in .jar and when i try to deploy it using sdm i am getting the following error. any body has the

  • How to actually switch to showing lowercase letters on keyboard in iOS 7?

    Is this possible or what? I have not yet found a soultion to this.