Change Mandatory of all fields of subform

Hello,
Im working with the ES2 designer and trying to make the subform hidden and the elements of the subform which are mandatory = "error" to mandatory="visible" here is my sample:
the action is performed on a checkbox click
if(this.rawValue==1) {
    BADO_T1_3_b.presence = "hidden";
    for(var j=0;j<BADO_T1_3_Form.all.length;j++) {
        BADO_T1_3_Form.all.item(j).presence = "hidden";
        for(var i=0; i<BADO_T1_3_Form.all.item(j).nodes.length;i++) {
            BADO_T1_3_Form.all.item(j).nodes.item(i).mandatory = "disabled";
    xfa.host.setFocus("Formular1.#subform[7].BADO_T1_5_a");
else {
    BADO_T1_3_b.presence = "visible";
    BADO_T1_3_b.rawValue = 2;
    for(var j=0;j<BADO_T1_3_Form.all.length;j++) {
        BADO_T1_3_Form.all.item(j).presence = "visible";
        for(var i=0; i<BADO_T1_3_Form.all.item(j).nodes.length;i++) {
            BADO_T1_3_Form.all.item(j).nodes.item(i).mandatory = "error";
that works the subform gets hidden but after I want to submit the form I get an error that required fields are not filled
I created the subform on more than one page because I want to loop trought the subforms instead of working with every subform seperate
How to implement that to make all elements of a subform mandatory = "disabled"

Can you post your form to [email protected] so I can have a look at it..
Thanks
Srini

Similar Messages

  • Loop through all fields in a (2 page) form?

    Is it possible to do it in one go?
    suppose you have fields in 2 pages.. (2 subforms)
    would you have to write a script that would check for all fields in page 1
    and another to check for all fields in subform 2?
    or can you just loop through the parent of the 2 subforms?.. (the aim would be to check that all required fields have been filled in or are not equal to their default value)
    thank you in advance

    You can certainly write a script that'll find all fields on all pages and perform some action on them.
    I've included a sample form which contains two pages with fields on them. At the top of the first page, there's a "Find Fields" button which, when pressed, populates the list box next to it with the names of each field found across all pages. Clicking on an item in the list box will then set focus to that field.
    The script uses a recursive function called GetFieldNames in a Script Object called "Utils". In the function, lines 21 - 25 are as follows:
    else if (oNode.className == "field")
    // oNode is a field
    sFieldNames += (sFieldNames.length > 0 ? "\n" : "") + oNode.name;
    If you wanted to verify that all mandatory fields were filled, you could change them to this:
    else if (oNode.className == "field")
    // oNode is a field
    if (oNode.mandatory == "error" && (oNode.rawValue == null || oNode.rawValue.length == 0))
      sFieldNames += (sFieldNames.length > 0 ? "\n" : "") + oNode.name;
    That would find only fields that are required and haven't been filled accross all pages.
    Stefan
    Adobe Systems

  • How to make all fields mandatory in sales order T- code VA01 initial screen

    Dear all,
    how to make all fields mandatory in sales order T- code VA01 initial screen itself
    The fields are
    Sales Organization
    Distribution Channel
    Division
    Sales Office
    Sales Group
    Regards,
    Amar Reddy

    Hi,
    You can use Transaction Variant to achieve this functionality.Please go through the following link which helps you in creating the same.
    [Link|http://wiki.sdn.sap.com/wiki/display/Snippets/TransactionVariant-AStepbyStepGuidefor+Creation]
    Regards,
    Phani Prasad

  • Business area and profit centre field to make mandatory in all transactions

    Dear Team,
    My client wants to make the above mentioned fields mandatory while entering any business transactions. viz. MM,FI / SD transactions. He wants to capture the details Business area wise as well as Profit Centre wise.
    Please let me know whether
    1.  I need to make "Business Area" as well as "Profit Center" field mandatory in "ALL THE FIELD STATUS GROUPS"of particular field status varient. If not which particular field dtatus groups to use. &
    2.Whether "Profit Center" or "Cost Center" to make mandatory and to which GL.
    Please help.
    Waiting for your reply.
    Thanks and Regards
    Sagar

    Hi
    A good way to make this Check compulsory in case Document Splitting is active in your system.
    Follow the path
    IMG>Financial Accounting (New)>General Ledger Accounting (New)>Business Transactions>Document Splitting>Define Document Splitting Chracteristics for General Ledger Accounting.
    Here you can make splitting active for Both business Area and profit center.
    If any where in the posting system does not find either of Business Area or Profit Center, it would give an error
    Thanks & regards
    Sanil K Bhandari

  • How Can I Change Format Mask For All Fields that type's Number Depend on Parameter in Report Builder 10g ?

    I want Change format mask for all fields that type's number
    Such as
    if  :parameter_value = 1 then
       all fields format mask = ' 999,999,990.000' ;
    else
       all fields format mask = ' 999,999,990.00' ;
    end if;
    Regards

    So, i have bad news for you : you'll have to rebuild again.
    Meanwhile i have excellent news for you : there's an online tool made by Johannes Henseler called Sidecar xml which builds the necessary xml file for you, sort of what you find in the Digital Publishing Folio Editor website, but saves it in your Folio folder.
    Next time you import all your folder (with that file), it will place all the necessary information, and even reorder the articles.
    Build once, play many times.

  • Getting all fields that have been changed.

    hello there,
    how can i get the name of the fields that have been changed, their value pre-change and their values post-change on specific a block?
    The reason for this is, i have a new requirement for an existing form. The supervisor wants to see all fields and their respective values that
    a regular user changes so he can approve the change.
    thanks so much in advance.
    gleisson silva

    Write Databse trigger on base table
    CREATE OR REPLACE TRIGGER
    FOR EACH ROW
    :NEW AS NEW
    :OLD AS OLD
    ON UPDATE OF column1...
    BEGIN
    INSERT INTO DUMMY VALUES(:column_name,:new_value,:old_value);
    END;
    row-level trigger with update option.
    store Old values and new values in dummy table which is replicated to original table.

  • How to lock a form (all fields read only) using a button (JavaScript)

    Hi guys,
    I have a form with several input fields, check boxes. Using a button in the form, I would like to lock it using a JavaScript. Locking means in my case that all input fields, checkboxes, etc. are read only (cannot be changed anymore).
    I already use the following approach:
    data.form.MyInputField.access = "readOnly";
    The problem is, that this approach is not comforable from maintenance perspective. I would like a more generic or more simple way.
    Generic:
    loop over all fields and set them to "read only"
    Simple:
    xfa.form.lock; // but this does not work
    Do you have any ideas how to solve this requirement in another way as I currently do?
    Thanks,
    Thomas

    Now I used the following script:
    // set the whole form as container
    var objContainer = data.Report;
    // call the method to set all fields to read only (recursion)
    disableAllFields(objContainer);
    function disableAllFields(objContainer) {
         for (var i=0; i < objContainer.nodes.length; i++) {          
              switch (objContainer.nodes.item(i).className) {
                   case "field" :
                   case "exclGroup" :
                        objContainer.nodes.item(i).access = "readOnly";
                        break;
                   case "subform" :
                        disableAllFields(objContainer.nodes.item(i));
                        break;
                   default:
    It works but is there another possibilitiy such like
    form.lock;
    Thanks,
    Thomas

  • How to show a single error message for all fields

    Hi
    I have a JSF from containing around 10 controls(input, select etc.) .
    Now I need to display an error message in case any of the mandatory control has validation error.
    Message format would be like
    "*Please,Complete the fields marked with yellow!"* The message I need to show in a div tag with Yelow background.
    Currently, I am getting individual default error message in case validation fails and related field is bordered with Yellow.
    My code is below.
    *<h:panelGrid columns="3">*
    *<h:outputText value="#{msgProv.bi_firstname}" />*
    *<h:outputText>*
    *<rich:spacer width="100px"></rich:spacer>*
    *</h:outputText>*
    *<h:panelGroup>*
    *<h:inputText*
    *value="#{brokerInformationFields.firstName}"*
    *label="#{msgProv.bi_firstname}" id="firstName" required="true">*
    *<f:validateLength maximum="10" minimum="2" />*
    *<rich:ajaxValidator event="onblur" />*
    *</h:inputText>*
    *</h:panelGroup>*
    *<h:outputText value="#{msgProv.bi_lastname}" />*
    *<h:outputText>*
    *<rich:spacer width="100px"></rich:spacer>*
    *</h:outputText>*
    *<h:panelGroup>*
    *<h:inputText label="#{msgProv.bi_lastname}" id="lastName"*
    *value="#{brokerInformationFields.lastName}" required="true">*
    *<f:validateLength maximum="20" minimum="1"/>*
    *<rich:ajaxValidator event="onblur" />*
    *</h:inputText>*
    *</h:panelGroup>*
    *<h:commandLink action="#{brokerInformationActions.submit}">*
    *<h:graphicImage value="/images/axa/btn_submit_from.png" style="border:0px;"/>*
    *</h:commandLink>*
    I am using (JSF1.2,Rich Faces 3.3.0,Facelets.)
    And a Phase Listener from
    http://balusc.blogspot.com/2007/12/set-focus-in-jsf.html
    This Phase listener is to border the control with Yellow in case validation fail.
    Now my Query
    *1) How can I show a single message for all fields as I marked above in case of validation failure?*
    *2) Now, the control is becoming yellow borderd when user clicks the submit button and validation fails.*
    *User can move from one control to other using tab. That time proper validation message is appearing.*
    *but the border of the control is not changing to yellow.*
    *What's the correcion can be made to meet that requirement too.*
    regards
    Roy

    Hi Nabheet,
    Thanks for your response.
    The FM returns the error messages if they are standard ones. For example, if the posting period is closed - the FM will not allow the Workflow to proceed further.
    But in this case, I have a custom error - for a particular Profit center, Cost center and I/O fields are mandatory(not at time of parking, but should be filled before posting).
    Since this is not a standard error, this FM will not stop workflow from proceeding further. How can I have the custom error captured in this FM?
    Thanks.

  • Change width of all textfields?

    Hi,
    Let's say that I have 10 textfields on my SubForm.
    How can I change with javasctipt on initialisation of SubForm(s2) ALL textfields.w = "3in";
    s2.w = "3in";
    s2.Tekstveld2.w = "3in";
    tnx.

    Hi,
    Assuming you don't have any other fields in your subform it would be as simple as ... assuming your subform was called Subform1.
    for (var i = 0; i < Subform1.nodes.length; i++){
         Subform1.nodes.item(i).w= "3in";

  • How to change the index (?) (position of subforms inside other subforms) using code?

    Hi, let say I have something like this (flowed positioning):
    Main subform
         subform A
         subform B
         subform C
    And I want, by code to change them to:
    Main subform
         subform C
         subform A
         subform B
    How can I do that?
    Thanks.

    1. What is it you want to do exactly?
    Seems like you want to get the last subform, insert it at the first position and then have the subsequent subforms beneath the subform placed on first position...
    2. That's it?
    3. Can you have more subforms than only 3?
    4. Does all the three subforms has the same fields inside them?
    5. Or you just want to change the position of the flowed subforms?

  • Set mandatory Sales Organization field in VF04 transaction

    Dear All,
    How set mandatory Sales Organization field in VF04 transaction.
    Regards'
    Kumar

    Can't check second part (new transaction run with a variant) as per constrains in my system. Running a new tcode with a variant worked for me in the past.
    Unfortunately it doesn't work here in VF04. Even if we create new transaction with VF04's program system doesn't allow to enter our customized variant. It only allows one standard variant and we cant make changes in that standard variant. After checking all these possibilities I suggested to go for ABAP
    PS: This logic worked for me in past in other transactions but VF04's behaviour is quit different.
    Thank$

  • Why not all fields dimmed or show in display mode after system status TECO and CLSD for Project

    Dear All,
    When Sets the system status TECO or even CLSD all fields for WBS Elements are not goes to Display mode. User can still edit them or change then.
    The fields are:
    1. WBS Element Description, technical name: PRPS-POST1
    2. Person responsible number, technical name: PRPS-VERNR
    Other Progress and Customer enhancement tab pages for WBS Element all fields there also editable in TECO and CLSD system status.
    The client do not want to set LOCK system status for master data option.
    Is there any enhancement or standard way of doing that?
    Regards
    Saqib Usman

    Dear Saqib,
    Its a standard behavior of the system. In CLSD status, transactional data like Procurement gets restricted along with WBSE no and its scheduling details. But it allows to you change like WBSE desc./Responsible person.
    Also go thru the below link for clarification of WBSE system status:
    http://help.sap.com/saphelp_470/helpdata/en/ee/41f82246ee11d189470000e829fbbd/content.htm
    For locking all master data, as above experts suggest, you should use MDLK/LKD.
    Regards
    Shishir

  • All fields are not mapped in transformation 0IC_C03 to 2LIS_03_BF_TR

    I have replicated BI7 data sources of 2lis_03_BF,BX & UM from ECC. All the infosources are BI7 infosources.After installing the BI Content for 0IC_C03, infosource 2LIS_03_BF_TR is not active.When I am trying to activate the transformation it is showing a error in START ROUTINE & also all fields are not mapped.
    Please suggest a solution.
    Thanx in advance.
    Edited by: Aritra on Nov 28, 2011 11:37 AM

    Hi,
    i think you have done some modification manually(either added something and deleted something in transformation) thats why code isn't maching with standard sorce package.
    so to resolve this error just remove  changes you manually did. or remove that code and again create start routine and paste the code which u need.
    Thanks & Regards,
    NIKHIL

  • Issue with DEBMAS IDoc,not all fields are reflected in the IDoc Seg E1KNB1M

    For IDoc type DEBMAS, there is a segment E1KNB1M. This segment is relate to the customer correspondence details (XD02 -> company code data -> Correspondence).
    For any change to the customer master a DEBMAS IDoc is triggered which has data in segments including the E1KNB1M.
    In my case for few customers, the not all fields in the segment E1KNB1M contain data. Few fields contain data but the rest are filled with u2018\u2019. This is happening only in the production system, for the same customer in the quality system the data is there as required.
    I checked in debugging, and found that the data is correctly passed to the segment in program SAPLVV01 Include LVV01F01. And the segment contains data till the IDoc is triggered.  I.e. the fields are not getting cleared at any point.
    Can anyone suggest what is happening and how to fix this? Please note that the issue is only in the production system and not in the quality system ( for the same customer).

    BTT... Need some help on the above

  • Not All Fields are Displayed in RSA3 for a Generic Extractor ??

    Hi all,
        I have a created a Generic Extarctor based on a View and enhanced the Extract Structure with 3 ZZ Fields. Now it has 26 fields with width of 273. In RSA3, I could see inly 12 fields with width of 147 only.
       <b>No</b> field has checked as HIDE in DataSource.
       I have checked <b>Settings</b> --> <b>Layout</b>  --> <b>Current</b>, there are <b>NO</b> columns in Hidden Fields box which is on right side. All fields are there in left side box under Line 1.
       I could see all the fields in ROOSFIELD table for this DataSource.
      When I copy it into Spreadsheet from RSA3, I could see all the fields with data including ZZ fields (Appended Fields).
       What is the problem and how could I fix it, PLEASE ?
       Thanks in advance.
    Regards,
    Venkat,
    Message was edited by:
            Venkat Kodi

    Hi Venkat
    sorry for late response.
    Anyway did you solve your issue.
    Forget about the icon now and check again in ROOSFIELD table and check if the missing field for selection has any parameter value. If so (shoudl be a P value ) then maintain it and put a blank value save the changes.
    this should solve your issue.
    hope this could help you
    regards
    Boujema

Maybe you are looking for

  • Can ipod touch be synced with iPod?

    Can ipod touch be synced with iPod?

  • Store and display value in array

    Hello Experts! I need help with outputting a report that caculate the cost base on the quantities  from 1 to 100  ( SummaryOfCost = QtyCost * Qty ). I have tried to implement this with an array but always get "A subscript must be between 1 and the si

  • Reg: Replacing i-way with PI for SAP ECC 6.0 version

    Hello Experts currently we are using R/3 4.7 version and middle ware we are using is i-way and we are planning to upgrade to ECC 6.0 and i would like to know how compatible is i-way is with SAP ECC 6.0 and is there any neccessity to replace the same

  • LR as UI - Photoshop as Batch Machine

    I find quite some complaints about the conception of LR and the lack of good sharpening and noise reduction. While I basically agree to these comments I got very good results in using PS as a batch machine for the 'Export' of the LR pictures. Despite

  • Service has encountered an error. Kindly retry again.

    Hello, I have Premiere Elements 10. Every time I'm trying to create a Web DVD and select an option "Upload to Photoshop.com", after media is built I'm getting a message: "Failed. Service has encountered an error. Kindly retry again." What could be wr