Removing mandatory field checks

Hi all
We are working on ESS/MSS packages customization and we have a requirement where in we need to make a mandatory field in one of the screens, non-mandatory e.g. zip code in address information. I have the Webdynpro code of mentioned screen in my NWDS. Any pointers are welcome.
with thanks
amit

Hi amit,
The state of a webdynpro element can be set  using
void setState(WDState value) in the implementation  of your view.
Check the
IWDAbstractInputField
in
<a href="https://help.sap.com/javadocs/NW04S/current/wd/index.html">WDAPI</a>
Attributes  available
static WDState NORMAL
          The normal state of a UI element.
static WDState REQUIRED
          Indicates that a UI element must provide a value for performing a certain action.
Thanks,
Swathi

Similar Messages

  • How to remove mandatory field for Last Name in Personal Data Editing Screen

    Hello All,
    CUrrently we are using BP_ ERP5ESS1.31 SP5 & SAP_ESS  603 SP5.
    All my ESS Services are Displaying fine and working from Portal.I am having the requirement like I need to make Last Name as Non-Mandatory field in Personal Data. While Editing the PD Screen, there  i will find the * mark for Last Name filed, i checked through the Global Personalization Make as Mandatory is Not Personalized its showing, i think its defualt prpoerty,so i am unable make any changes from Portal w.r.t Global Personalization.
    I checked in SPRO-- Personal Admin> Custmomizing User Interfaces>Change Screen Modifications, there i find the respective Module pool for those Infotypes and country Specific..
    I cheked forModulePool MP000200--> P0002 and Variable Key-40(For India)  P0002 - NACHIN -- LastName only OF Radio Button is Selected all other Rado buttons are not selected.
    I Checked in V_T588MFPROPS view there for 0002 Infotype P0002 -- NACHN Mandatory check box is Checked all other check boxes are Unchecked.
    How to make that Last Name field as Non-Mandatory in Personal Data Edit Screen, where i need to make the changes.'
    Please list out the Steps..Where i need to do the configuration. And i assigned all the required ESS roles on the backend.
    Thanks in Advance
    Adapag

    Hi,
    I don't think supressing through Global Personalization will change the business logic. Within the Business Logic it checks for the mandatory field.
    After the changes I guess you need to make the changes accordingly.
    The below link might be of some help.
    http://wiki.sdn.sap.com/wiki/pages/viewpage.action?spaceKey=profile&title=ESSPersonalInformationUIenhancementwithoutmodification&decorator=printable
    Please correct if I am wrong.
    Cheers-
    Pramod

  • Remove mandatory field from transaction KRMI

    Hi,
    In transaction KRMI, there are fields material and plant.
    Material is a mandatory field. However, the user wants to see all the materials for a plant - not specific materials. They only want to enter the plant.
    Is it possible to have material as an un-mandatory field? What are my options? Is guixt a possible solution?
    If nothing else works, I would have to rebuild the report or copy & customize it.
    Let me know.
    Thanks.

    Hi John,
    SAP GuiXT resides at the presentation layer and defines the layout of the R/3 screen by series of commands in SCRIPT file.
    SAP GuiXT is not the correct solution in your case, as this is machine dependent and you need to provide SCRIPT on each and every user machine.This can be only done in case your client has already implemented it.
    You should try to find Screen Exit , if the same is not avaliable then proceed with creation of Z transaction.
    Hope you understand it.

  • Remove Mandatory field in Cost center master data

    Dear All,
      I want to remove the mandatory person responsible in the cost center master data. How to do this
    Regards
    Vasantha

    hi Vasantha,
    as far as I know, this is not possible. If a field is mandatory or not in cost center master data is determined by the system.
    hope this helps
    ec

  • Remove Mandatory field from OAOA Transaction

    Hi,
    There is a field in OAOA transaction - Account determination under Asset Type window. This field has the mandatory with value.
    I don't want that field as mandatory.
    How to do it..

    That's not possible and makes no sense.

  • Mandatory field 'Business Area" in MIRO transaction

    Dear All,
    We are facing problem in MIRO transaction, while doing MIRO business area field is mandatory so we are not able to check our one substitution for Business area.
    Request you to help us to remove mandatory field "Business area" from MIRO transaction.
    Thanks,
    Shree

    Hi
    Since the tick is appearing in this field, either the field status group (at posting level or GL level) should have been made mandatory.  Can you please check the relevant FSG for the reconciliation account involved for that vendor.
    Also since you want this field as optional only for testing purpose, i have a alternative suggestion.
    Say, If your substitution is suppose to replace this field with business area A, then enter business area B there and check whether the substituition is replacing this with A again.
    Regards

  • Mandatory fields  in dynpro

    Hi!
    I have some mandatory fields in my dynpro, but i also have a option to fill data in the dynpro after filling 2 fields and clickin a button.
    The problem is that if I click the button, it says that I have to fill the mandatory fields. Is there a way to stop the control-function only for this button-click?
    i tried it with exit-commands, but so i don´t get the data from the 2 filled fields, because it only transports the user-command.
    thank you in advance!
    Andreas

    Hii Andreas..
    This is the Solution for u..
    You are using the Module AT EXIT-COMMAND to avoid the Mandatory field checks. But in this module the Screen fields are not Copied to Program Variables.
    Only the OK_CODE(SY-UCOMM) will be copied.
    But you can read the Values of the SCREEN FIELDS by Calling the FM
    <b>DYNP_VALUES_READ</b>
    (This Fm reads the Screen field values even before they are transported to program)
    EG:
    CALL FUNCTION 'DYNP_VALUES_READ'
    EXPORTING
    dyname = sy-cprog
    dynumb = sy-dynnr
    TABLES
    dynpfields = h_dynpfields
    EXCEPTIONS
    OTHERS = 1.
    Let me know if there are any issues.
    <b>Reward if Helpful</b>

  • How to remove the mandatory field setting in output control

    Hi everybody,
    While printing a Payment Voucher through F-58 and FBZ5(reprint), there are two output devices, the first one is - printer for forms and second is - payment advice printer.
    In our case we have configured the cheque printing and payment voucher printing seperately. The cheque goes to first printer(kept mandatory field) and the payment voucher goes to second printer. One of our plant does not print the cheque from SAP, they only print the payment voucher because the cheque is manually prepared. How do I avoid the cheque printing. Is there any way out to print only the payment voucher through F-58 and FBZ5
    Please guide me how to tackle it or how to remove the mandatory field setting in the output control screen?
    Regards
    Paul

    Hi
    As of my understanding, there is no relation ship between the Sales Organization and this mandatory partner function.
    Here are few suggestions.
    1. Since Partner functions are defualted and made mandatory in the Partner Determination Procedure so you have to remove this Mandatory option for PE from the Partner Determination Procedure that is AG if using standard one.
    2. If you are using a single partner function than , Copy and create a New partner procedure and a new account group . Where in one you can default PE as mandatory and in another one you make a optional where it can be choosen manually while creating the customer.
    Follow the path to check for entries :
    SPRO > sales & distribution > Basic Function > Partner Determination > set up partner determination > select for customer master > select the partner procedure you are using AG as standard > then partner function in procedure > here maintian the check as required like, Mandatory or No check for Non Mandatory .
    Thanks
    RB

  • Check for mandatory fields while creating EP users using code .. :|

    Hello All,
    I have a code using which I can create user accounts/EP users on Portal, am working on EP6 SP9 & SP12.
    <u>My query</u>:
    1. <i>From Portal's perspective</i> -> While creating EP users, there are few mandatory fields like user-id, FirstName, LastName, Email-id and Password. If any of the above fields is null/empty, Portal would give us an error message.
    2. <i>From coding perspective</i> -> Here, only the user-id is required. Even if I do not enter/fill any of the above mentioned mandatory fields (except user-id), user account is created.
    In case wherein FirstName/LastName is not mentioned, Portal shows the userid in the Welcome Frame, i.e. Welcome <user-id>. Tried this by commenting the statements contains the methods related to setting/accepting FirstNme and LastName of user.
    <b>I want to know if this is all rite?
    If no, then please guide me as to how can I set mandatory fields in my code.</b>
    Awaiting Reply.
    Thanks and Warm Regards,
    Ritu R Hunjan

    Hi Ritu,
    >>please guide me as to how can I set mandatory fields in my code??
    In ur jsp file or in the controls code add the following attribute
    <hbj:label id="userIdLabel"
               text="User ID"
               labelFor="userIdInput"
               design="HEADER3"
               required="true"/>
    and to check the mandatory entry for that field do this in the submit button
    <hbj:button id="insert"
                text="Submit"
                design="emphasized"
                onClick="save"
                onClientClick="if(!isMandatory()) htmlbevent.cancelSubmit=true;;"/>
    and in the javascript write the client validation code.
    Hope this helps.
    Regards,
    Joshua Kiran

  • Check duplicate data entry in multi record block,which is a mandatory field

    Dear all,
    I have a situation where i have to check duplicate data entry(on a particular field,which is a mandatory field,i.e. it cannot be skipped by user without entering value) while data key-in in a Multi Record block.
    As for reference I have used a logic,such as
    1>In a When-Validate-Record trigger of that block I am assigning the value of that current item in Table type variable(collection type)
    as this trigger fire every time as soon as i leave that record,so its assigning the value of that current time.And this process continues
    then
    2>In a When-Validate-Item trigger of that corresponding item(i.e. the trigger is at item level) has been written,where it compares the value of that current item and the value stored in Table type variable(collection type) of When-Validate-Record trigger.If the current item value is matched with any value stored in Table type variable I am showing a message of ('Duplicate Record') following by raise_form_trigger failure
    This code is working fine for checking duplicate value of that multi record field
    The problem is that,if user enter the value in that field,and then goes to next field,enter value to that field and then press 'Enter Query 'icon,the bolth Validate trigger fires.As result first when-validate record fires,which stores that value,and then when-validate-item fires,as a result it shows duplicate record message
    Please give me a meaningful logic or code for solving this problem
    Any other logic to solve this problem is also welcome

    @Ammad Ahmed
    first of all thanks .your logic worked,but still i have some little bit of problem,
    now the requirement is a master detail form where both master and detail is multirecord ,where detail cannot have duplicate record,
    such as..........
    MASTER:--
    A code
    A1
    A2
    DETAIL:--
    D code
    d1
    d2 <-valid as for master A1 , detail d1 ,d2 are not duplicate
    d2 <--invalid as as for master A1 , detail d2 ,d2 are duplicate
    validation rule:  A Code –D Code combination is unique. The system will stop users from entering duplicate D Code for a A Code. Appropriate error message will be displayed.*
    actually i am facing a typical problem,the same logic i have been applied in detail section ,its working fine when i am inserting new records.problem starts when i query,after query in ' a ' field say 2 records (i.e. which has been earlier saved) has been pasted,now if i insert a new record with the value exactly same with the already present value in the screen(i.e. value populated after query) its not showing duplicate.................could u tell me the reason?and help me out...............its urgent plzzzzzzzzz
    Edited by: sushovan on Nov 22, 2010 4:34 AM
    Edited by: sushovan on Nov 22, 2010 4:36 AM
    Edited by: sushovan on Nov 22, 2010 8:58 AM

  • Check mandatory fields before saving

    Hello,
    In my Z-program, how can I check all mandatory fields in a dynpro before saving?
    Is there any function to do that?
    Thanks!!!

    Hi alberto,
    1. If the fields are mandatory (as set in the field attributes while designing the screen),
    2. then we don't have to write any additional logic for the same.
       The system will AUTOMATICALLY check for it, and issue appropriate message.
    regards,
    amit m.

  • Check mandatory fields of view in ViewContainer

    Hi Experts!
    I created a view (main view) which containes a ViewContainer UI element. After a click on the main view  I want to check the mandatory fields (with method check_mandatory_fields onview). But therefore I need the reference to the view controller which is embedded in the ViewContainer element. How can I solve this???
    Thanks!

    Hi
    This is how I achieved it:
    In DoINIT of the view which is embedded inside view container UI element I got the reference of view controller and stored it as a component controller public attribute
      wd_comp_controller->mo_api_controller = wd_this->wd_get_api( ).
    Here mo_api_conroller is a comp controller public attr of type ref to if_wd_view_controller.
    Now you can call your method like this in the main view
    cl_wd_dynamic_tool=>check_mandatory_attr_on_view(
        EXPORTING view_controller  = wd_comp_controller->MO_API_CONTROLLER
                  display_messages = abap_true
        IMPORTING messages = lt_messages
    Hope this helps.
    Regards
    Manas Dua

  • Check Mandatory Fields when state is bound with context attribute

    Hello All,
    Currently i am facing  problem in my SAP SRM 7.0 standard component.
    Actually, i have to remove  mandatory(State = Required) for one of my inputfileds for this I have written below code, but it has been  remove only Red mark * infront of Inputfield, after that, i am trying to save other data, still it is asking me enter the required value.
         here my input field  bound with Context attribute, it is standard attribute.
    data:lo_input1 type ref to cl_wd_input_field.
       lo_input1 ?= VIEW->get_element( 'NAME_FIRST' ).
       lo_input1->set_state( '00' ).
    I am trying to delete state = required property from below component and view
    Component Name : /SAPSRM/WDC_MOFC_PERSON
           View  :  V_PERSON
    Can you help me on this?
    Thanks
    Sandeep.

    Hi Baskaran ,
    Thanks for ur reply ..
    Eveen in that component they have not used cl_wd_dynamic_tool class for mandatory attributes
    I want to share another thing with u that is
    I am trying it in another way
    with the following code which i have done in post exit  is
    let me explain u what i did
    __first of all i got the child node of rootuielementcontaine
    later
    i get the childnode of container_left and assigned it to another class of ref cl_wd_uielemnent
    now where i have struked is
    *CALL METHOD LR_CHILD2->GET_CHILD
    EXPORTING
       ID        = 'FORM_OF_ADDRESS_DROPDOWN'
       INDEX     =
    RECEIVING
       THE_CHILD = LR_C1.
    what the error i am getting is
    OBJECTS_OBJREF_NOT_ASSIGNED
    Please correct me if there is any wrong inn the code ...
    FORM_OF_ADDRESS_DROPDOWN--->ui element dropdown
    r__ DATA lr_container TYPE REF TO cl_wd_uielement_container.
    DATA lt_children  TYPE        cl_wd_uielement=>tt_uielement.
    DATA lr_view      TYPE REF TO if_wd_view.
    DATA lr_child     TYPE REF TO cl_wd_uielement.
       DATA lr_child1     TYPE REF TO cl_wd_uielement.
       DATA lr_child2     TYPE REF TO cl_wd_uielement.
    data : LR_CON1 TYPE REF TO CL_WD_TRANSPARENT_CONTAINER.
    data : LR_CON2 TYPE REF TO CL_WD_TRANSPARENT_CONTAINER.
    SANDEEP
    lr_container ?= view->get_element( 'ROOTUIELEMENTCONTAINER' ).
    lt_children = lr_container->get_children( ).
    CALL METHOD lr_container->get_child
       EXPORTING
         id        = 'DATACONTAINER'
         index     = 1
       RECEIVING
         the_child = lr_CHILD.
    LR_CON1 ?= LR_CHILD.
    CALL METHOD LR_CON1->GET_CHILD
      EXPORTING
        ID        = 'CONTAINER_LEFT'
        INDEX     = 1
      RECEIVING
        THE_CHILD = LR_CHILD1 .
    DATA : LR_CHILD2 TYPE REF TO CL_WD_TRANSPARENT_CONTAINER.
    LR_CHILD2 ?= LR_CHILD1 .
    *DATA : LR_C1 TYPE REF TO CL_WD_UIELEMENT.
    *CALL METHOD LR_CHILD2->GET_CHILD
    EXPORTING
       ID        = 'FORM_OF_ADDRESS_DROPDOWN'
       INDEX     =
    RECEIVING
       THE_CHILD = LR_C1.
    *DATA : LR_DD TYPE REF TO CL_WD_DROPDOWN_BY_KEY .
    *LR_DD ?= LR_C1 .
    *CALL METHOD LR_DD->SET_STATE
    EXPORTING
       VALUE  = '00'
    sandeep

  • Strange problem while checking Mandatory fields

    Hi ,
    I am checking mandatory fields with the method following method.
    CL_WD_DYNAMIC_TOOL=>CHECK_MANDATORY_ATTR_ON_VIEW( VIEW_CONTROLLER = my_controller ).
    It was working fine for mandatory fields and also showing one extra input field which is not mandatory with red border .
    Please tell me how to avoid this and What could be the problem.
    Thanks and Best Regards,
    Vijay

    Hi Vijay,
                the extra vield thats showing in re d will be a field that doesnt support blank entry. try commenting the method thats calling CL_WD_DYNAMIC_TOOL.
                CL_WD_DYNAMIC_TOOL=>CHECK_MANDATORY_ATTR_ON_VIEW will check only mandatory fields.. thats for sure.
       the error message thats showing on the optional fild is coming from some standard check
    Regards
    Sarath

  • FPM - Check Mandatory Fields

    Hi,
    Could you please let me know, how can I do the required fields check in FPM?
    I can do this requirement in a simple webdynpro application as below:
    lo_view_controller = wd_this->wd_get_api( ).
    cl_wd_dynamic_tool=>check_mandatory_attr_on_view(
    EXPORTING view_controller = lo_view_controller
    IMPORTING messages = lt_messages ).
    CHECK lt_messages[] IS INITIAL.
    Please let me know how can I do the same in FPM?
    Thanks,
    Vijay.

    There is really no guideline about that. You have decided to go for Dynamic UI elements and you have to find a way to validate them that is the price you would pay for doing things in Dynamic programming. You might have to rely on the looping of your UI elements and see if it is state is mandatory and go for validation in a dynamic way. Requires lots of programming and understanding of UI hierarchy.

Maybe you are looking for

  • Can I play Fifa, PES, Football Manager, in MacBook Pro 13 inch late 2011?

    Sometimes I play high graphic games, my MBP will getting so hot until 80 degree celcious. I'm afraid to instal fifa, PES in my MBP. Anyone can help? any tips? My macbook pro is 13 inch, late 2011, 2.8 GHz Intel Core i7, Mac OS X 10.7.3, Intel HD Grap

  • Can I intall a 32-bit version of Windows?

    I just purchased a C650D Laptop computer with 64-bit version of Windows 7.  I have a 32-bit version disc of Windows 7 at home from another computer.   Will I be able to use it to install a 32-bit version on the C650D?  Can I simply use the product co

  • PR table/Report

    Hi all, IS there any table/report which lists out the Planned orders and the converter Purchase requisitions from planned orders? I want a report/table which lists out Purchase requisitions and related Planned orders. Thanks, Avani.

  • How do I open a new window in safari on the iPad?

    How do I open multiple windows in safari using the new iOS7 on my iPad? It looks different than my iphone5

  • ]]] Bug when using XPATH?

    Hello, we're querying an XMLType_Instance with the following XPATH expressions: SELECT XMLQuery('for $forvar in /Hotel/HotelBSeite/HotelXVKSonderpreise/HotelXBeschreibung return $forvar' passing by value XMLEXP_CONTENT RETURNING CONTENT) FROM table;