Problem with validating a field in VA01/VA02

Hi,
I was required to add validation for Material Group 3 (VBAP-MVGR3) in 'Additional Data A' tab (VA01/VA02). The corresponding screen number in 4459. In the PAI section, there is a module called 'vbap_bearbeiten'. In this module, there is an enhancement point called 'VBAP_BEARBEITEN_10 '. I created an implementation of this enhancement point to call a validation subroutine which i put in user exit MV45AFZZ. My problem is whenever a wrong entry is entered for that field, the whole screen in the 'Additional Data A' tab turned grey and disabled for user entry. Re-entry for the correct Material Group 3 is not allowed.
Initially, i used a different approach. I made a core change to screen 4459 by adding a statement like below in the PAI section :-
FIELD vbap-mvgr3 MODULE zsd_check_mvgr3 ON REQUEST.
In fact, the validation worked without any issue. User was prompted for an error message and then was allowed to re-enter a correct entry for that field if a wrong entry was entered initially. However, since this approach involved a core change, it was not allowed by my superior and he demands for using the enhancement framework approach.
Kindly please let me know if you have any idea of resolving this issue. Thanks much in advance.

Hi guys, thanks much for your feedback.
I tried to call my validation subroutine from USEREXIT_CHECK_VBAP (MV45AFZB). However, it did not work as well. Although the validation subroutine was successfully called in USEREXIT_CHECK_VBAP and error message dialog box was shown if entry was not correct, but when i clicked on the dialog box / pressed the 'enter' key, the 'Material Group 3' field was not opened for re-editing (it was still shown in grey and disallowed for user entry). In fact, through debugging, i found that USEREXIT_CHECK_VBAP was called again (after i pressed the 'enter' key) and it caused the program to enter an infinite loop.
On the other hand, i also tried to use USEREXIT_MOVE_FIELD_TO_VBKD (MV45ZFZZ). Unfortunately, i also met with the same issue as described above.  Kindly please let me know if there is a way to solve this issue. Thanks.

Similar Messages

  • Unique problem with validation/ making field required

    I have searched the forums trying to find a way to make a field required based on the users selection of a check box, or something else. So far, everything says use nullTest = "error".
    I have tried to do this and get the following results: The red highlighting, which shows up around my other required fields, will not show up unless you click in the text box and then out of it. Weird! Then, when pressing the submit button, it will not actually give you an error message if there is nothing in that text box, as it will if there is nothing in the fields that I originally make required.
    Any thoughts, or fixes would be greatly appreciated.
    Thanks in advance for any help.

    We do the same thing here. We haven't had any issues with the submit not validating the field correctly though. Our only issue was the red highlighting. To get around this, we would call resetdata on the field. resetData clears out the value of the field so you need to store it off and then reset it.
    if (form1.BP1.ChangeActivities.Pos1.Department==1) then $.validate.nullTest = "error" else $.validate.nullTest = "disabled"
    endif
    $=$
    var x = $
    xfa.host.resetData("form1.BP1.ChangeParticulars.Pos1To.DeptNo")
    $ = x

  • Problem with validating text field

    Hi All
    i want to validate the text fields present in jsp page for a sturts application..
    i have a jsp page for input then struts form for validation as struts machinism provides and if error occurs it add error to error object.
    i want to display error message in text field when it occurs..
    plz help me to do it
    thanx in advacne

    I'm not getting your requirement clearly, by my understanding ... you need to retrieve database whenever a <select> field trigger "onchange" - am I right?
    If that is your requirement, it depends on what kind of solution you are looking into?
    1. AJAX+Servlet (dojo/jMaki/write your own)
    2. Java Server Faces (MyFaces/JSF)
    3. write yourself a custom TAG (JSTL) to do the purpose (AJAX+Servlet/purely Servlet)
    4. purely JSTL
    5 purely Servlet
    (please "Google" them by appending "<select> <option>"/ "populate combobox")
    Personally I would recommend 1st or 3rd approach, even 2nd approach (MyFaces/JSF) is cool, but if your whole application is not written in JSF, no point to mixed the solutions.
    If you want to try Ajax+TAG approach, refer following:
    http://ajaxtags.sourceforge.net/
    If you wish to use MyFaces approach, please refer following:
    http://avatar21.superihost.com/index.php?entry=entry051020-163838
    A forth/fifth approach will be much browser-portable, but the amount of coding will be more.
    Regards,
    Avatar Ng
    Message was edited by:
    Avatar_Ng
    Message was edited by:
    Avatar_Ng

  • Add custome field in VA01/VA02/VA03 without access key

    Hi,
    I need to add some custom fields in VA01/VA02/VA03 screen at item level. But i am unable to find out any screen exit/BADI  for the same.
    Can anyone tell me plz how i can achieve this without using access key.
    Thanks in advance.

    hello,
    you could try using GuiXt. With this adds on you could add: fields, button, input parameters, change standard screens layout etc.
    read this tutorial http://www.synactive.com/tutor_e/lesson00.html for the start.
    br,
    dez_

  • 1 year ago i installed Elements 12 on my PC with a serial number.  Today i have installed Elements 12 also on my laptop. But,...there is a problem with validation of the serial number on my laptop. Is there a need to validate Elements  or will this progra

    One year ago i installed Elements 12 on my PC with a serial number and it was OK.
    Today i have installed Elements 12 also on my laptop.
    But,...there is a problem with validation of the serial number on my laptop. Is there a need to validate Elements  or will this program real disapeare in 7 days?
    Hans

    Hi,
    Since you already have one copy activated the serial number must be logged in your account details - I would first check that the one logged and the one you are attempting to enter are the same.
    You can check your account details by going to www.adobe.com and clicking on Manage Account. You need to sign in with your Adobe Id and then click on View All under Plans & Products. Next click on View your products and after a while it should produce your list.
    If there is a problem with the serial number, only Adobe can help you there (we are just users). Please see the response in this thread
    First of all, I would have to say that getting in touch with you is a nightmare and I am not at all happy that I can't just email or live chat with someone who can help!  I am not a technical person, I just want to be able to use Photoshop Elements and ge
    Brian

  • Problem with a Dynpro field (type numc)

    hi everybody.
    I'm developping a ModulPool application in wich i have 2 RadioButtons with 2 textbox fields.
    What i pretend to do is, when the user clicks a radiobutton and strikes Intro, enable the corresponding textbox field and disable the other one.
    My code runs fine, but i have a little problem. When I loop the screen table, to set the appropiate value to the 'input' property, in this case, when i try to disable it (input = '0'), I get a zero character in that field. This field has NUMC type, i'm sure this is the problem
    'cos i've got no problem with the other field (type char). But i can't solve it.
    Anybody's got an idea?
    Thanks

    What you are seeing is the normal behavior of a numeric field represented by the SAPgui.  This is how all numeric fields are displayed via SAPgui.  If you don't want to see the 0,  then you just change the field type to CHAR and handle accordingly.
    Regards,
    Rich Heilman

  • Is it possible to create a editable pdf with validation(required field) using Adobe Acrobat pro version?

    Hi,
    the subject says it all. I have downloaded the trail version to see if its possible to create a editable pdf with validation(required field) using Adobe Acrobat pro version?
    Basically, I will have to create a pdf form where users fill it and send it back to me. there will be required fields (the textbox and check box) that user need to fill before saving the editable pdf?
    Is it possible. if so, can someone kind enough to point to me right directions?
    Thanks in advance.

    Thanks for reply. What I am trying to achieve is to give an option for the user to download the pdf form and once the user tries to save the pdf, it validates with the required field. I managed to create the editable pdf with required fields option. I just need that validation to be done when user click on save file. How can I achieve this? thanks so much for your help.

  • Problem with the quantity field

    hi every one
    i am facing a problem with the quantity field (vbap-kwmeng)
    as per my requirement i need to display this quantity field along with some other item fields from VBAP in an alv grid.
    among all the fields displayed in the alv grid only this quantity field is editable(end user can change this quantity)
    once end user changes this quantity and press save button i need to capture this new quantity in my internaltable.
    problem is input of length of quantity is 15 and the output length is 19
    so when i am pressing save
    say my quantity is 50 when i am pressing save '0.050' is coming because of the length difference
    how can i capture the original changed value.
    vamsi

    what about define two fields in  you inner table ,one as char and the other as vbap-kwmeng, you can show the char one in the ALV gird , when user input value and press SAVE ,you can move the value to vbap-kwmeng.
    you can test it,mybe some one has one better idea.

  • Problem with adding new field to the mass change screen in FBL5N

    Hi,
    We have a problem with adding the field XREF3 to the mass change screen. We followed steps described in the SAP Note 640908, but the result is that when we try to mass change some documents in FBL5N and enter some values in the mass change screen, a message appears: "Please enter at least one new value" and nothing is changed.
    If you have faced with such a problem, we would be grateful if you give us some tips.
    Regards,
    Miłosz Włodarczyk

    The problem has been resolved: we didn't activate a code in SE80.

  • Problem with Validation in Struts

    Dear All,
    I am facing a proble with validation in struts.
    I have got this code in my action class
    //Initial Code...
    ArrayList branches=new ArrayList();
    branches.add("B01", "Main Branch");
    branches.add("B02", "Second Branch");
    branches.add("B03", "Third Branch");
    DynaValidatorForm memberForm=(DynaValidatorForm)form;
    memberForm.set(branches);
    //Finalizing code.....This form is getting validated in validation.xml.
    This action is being forwarded to folllowing JSP.
    //Initial Code...
            <tr>
                <td align="right"><strong>Branch Name </strong></td>
                <td> </td>
                <td align="left">
                    <html:select property="branid">
                        <html:optionsCollection name="memberForm" property="branches" value="key" label="value"/>
                    </html:select>
                </td>
            </tr>
    //Later code...I have action mapping as..
            <action path="/member/save" input="member.page" name="memberForm" validate="true"
            scope="request" type="com.mlm.action.MemberAction" parameter="action">
                <forward name="success" path="/show.do?action=member" redirect="true"/>
            </action>Now, the problem is that when the form doesn't pass the validation then it gives an exception that..
    Can't find collection 'branches' in bean

    sauanu wrote:
    Ok, now I am giving full code of my module...
    Form-bean
    <form-beans>
    <form-bean name="memberForm" type="org.apache.struts.validator.DynaValidatorForm">
    <form-property name="id" type="java.lang.String"/>
    <form-property name="membname" type="java.lang.String"/>
    <form-property name="address" type="java.lang.String"/>
    <form-property name="branid" type="java.lang.String"/>
    <form-property name="branches" type="java.util.ArrayList"/>
    </form-bean>
    </form-beans>Validation is being done for all fileds except "branches". Validation type is "requried"
    My Jsp....
    <html:form action="/member/save?action=save">
    <html:hidden property="id"/>
    <tr>
    <td align="right"><strong>Member Name </strong></td>
    <td> </td>
    <td align="left">
    <html:text property="membname"/>
    </td>
    </tr>
    <tr>
    <td align="right"><strong>Address</strong></td>
    <td> </td>
    <td align="left">
    <html:text property="address"/>
    </td>
    </tr>
    <tr>
    <td align="right"><strong>Branch Name </strong></td>
    <td> </td>
    <td align="left">
    <html:select property="branid">
    <html:optionsCollection name="memberForm" property="branches" />
    </html:select>
    </td>
    </tr>
    <tr>
    <td align="right">
    <html:submit/>
    </td>
    <b><td>   </td></b>
    <td>
    <html:button value="Cancel" onclick="javascript:history.go(-1)" property="cancel"/>
    </td>
    </tr>
    </html:form>This is the code..
    I tried to find out the problem and I found that.. when the form does not pass the validation its input page gets displayed..
    Now, when the input is getting displayed.. "branches" field of the form contains null???Why?
    Edited by: sauanu on ?? ??????, ???? ??:?? ?????????Forget,about Validations.
    Who is forwarding the control to this JSP page or view ??
    Is it Action method code which metioned earlier doing it ??
    Or some other Action is involved if it is some other action please intialize Values of branches component in the respective action.
    Also,
    Also,
    ArrayList branches=new ArrayList();
    branches.add("B01", "Main Branch");
    branches.add("B02", "Second Branch");
    branches.add("B03", "Third Branch"); I believe you need to get a good understanding of Java Collection classes aswell.
    You can add things as entities in the above case lets create a simple java bean named Option.
    public class Option implements Serializable{
        private String label;
        private String value;
        public void setValue(String value){this.value = value;};
        public String getValue(){return this.value;}
        public void setLabel(String label){this.label = label;}
        public String getLabel(){return this.label;}
    } and inside the action which is forwarding to the respective view
    ArrayList branches=new ArrayList();
    Option option = new Option();
    option.setValue("B01");
    option.setLabel("Main Branch");
    branches.add(option);
    option = new Option();
    option.setValue("B02");
    option.setLabel("Second Branch");
    branches.add(option);
    option = new Option();
    option.setValue("B03");
    option.setLabel("Third Branch");
    branches.add(option);
          <html:select property="branid">
                   <html:options name="memberForm" collection="branches"   value="value" label="label" />
           </html:select>and one more thing is is that after the validation if it is not validated it'd be sent back to input page which destorys the request therefore try making scope of "memberForm" to session in your action mappings and check.
    Hope this might help :)
    REGARDS,
    RaHuL

  • PostCode - problem with validation

    Hello,
    I have problem with codes in Netbeans.I Have two code.
    The first is to mask formatter and i put in on Post int code
    try
    MaskFormatter PostCode = new MaskFormatter("##-###");
    PostCode.setValidCharacters("0123456789");
    RegisterPostCode = new JFormattedTextField(PostCode);
    catch (ParseException e) {
    }The Second check, the RegisterPostCode is not null
    class Steps implements ActionListener{
       int step = 0;  
          public void actionPerformed(ActionEvent e) {
          if (step == 0){
    String NotEmptyPostCode = RegisterPostCode.getText();
             if(NotEmptyPostCode == null || NotEmptyPostCode.length() == 0) {
       jLabel4.setText("This Field is empty");
             return;
    step++;
          }Problem is the second code doesnt work and I dont now how to create code to check the JFormatterField is compatible with the first code
    Please help.

    Hi! I have an HTML region and on my "before header process" I fetch only one record (the data is got from a package I've created on the DB).
    This region has a few items and when I press the save button (I created on the screen) the value of all the items are cleared if the validation ocurrs, I don't know why, is this because the page doesn;t perfom again my "before header process"?
    Thanks!

  • Creating customer fields in VA01/Va02 transaction in additonal tab 2

    hi,
        I have to create Customer fields in the item level to va01 / va02 transaction in additional tab 2 subscreen.
    Include MV45AFZZ is used for validation. help needed for adding customer fields. thanks in advance.

    The program SAPMV45A screen 8309 is the Additional Data B tab provided by SAP to add your custom fields . In order to capture the data from your custom fields you can use the user exit MV45AFZZ, USEREXIT_SAVE_DOCUMENT_PREPARE OR
    USEREXIT_SAVE_DOCUMENT depening on your functionality.
    You need to append the fields in VBAP. Then use the screen painter to add the fields in the screen.
    Thanks
    Vinod

  • How to gray out fields in VA01 & VA02

    Hi All,
    My requirement is to restrict manual entries of line items.
    While creating a  credit memo with refrence to billing document the items from billing document gets copied to this document.
    User wants to restrict entering more line items apart from these.
    Therefore the rows after the last line item should be grayed out i.e in display mode. (Not the columns).
    This should happen in VA01 & VA02 transaction.
    I have found the Userexit_field_modification in include MV45AFZZ.
    Also the screen nunmber is 4902 and table control TCTRL_U_ERF_GUTLAST whose screen input should be 0.
    Please let me know if there is some other way by which this can be achieved also if this is correct; then how should I proceed with the logic.
    Thanks in advance.
    Regards,
    Darpana.Ahire

    Hi,
    For doing so you can use the concept of the transaction variants. Using transaction variants, you can do the below:
    1) Make fields mandatory on screen
    2) Hide fields on the screen
    3) Default values on screen fields
    4) Make fields input disable on screen.
    Hence for doing this, go to SHD0 transaction and do the recording for the standard transaction. Once done Save the transaction variant.
    Finally from menu((tab page: Standard Variant in SHD0): Activate as Standard Transactions variant.
    Give the Name as your Transaction variant name.
    Once you active the transaction variant as the standard variant, then if the std transaction is called, the screens which you defined in the transaction variant will be called.
    No code changes need to be done. The transaction variant will only change the appearance of the screens
    Regards
    Shiva
    Edited by: Shiva Kumar Tirumalasetty on Sep 11, 2009 4:41 PM

  • Contract - problem with attachements (empty field in LOIO_OBJID)

    Hi Guys,
    We are using extended classic scenario of SRM 4.0 (SRM Server 500) and our latest support package is SAPKIBKS12. We have the following problem with contracts.
    Sometimes when an attachment is added to a contract the system does not fill the following fields in tabel BBP_PDATT.
    LOIO_CLASS: Normally filled with BBP_L_DOC
    LOIO_OBJID: Normaly filled with a GUID size datastring
    Whenever this happens and later on the contract is changed and released the system will raise an abort. We tried the following notes but no good result.
    891293,919467,932602,964065. Some other notes that might be possible are 1042826/1085700/1083063 but we also don't have good experience with these ones.
    Can anyone give us advice about two things.
    1) Is there a way to fill the empty fields in BBP_PDATT so that existing contract will work properly again?
    2) Does anyone know why this problem occurs and how to fix it for new contracts?
    Hope to hear from you,
    Arie

    Thankyou for the reply. I have made following changes but still not working. I am creating the inquiry and customer material is not getting populated. Please guide in resolving the issue.
    DATA : W_ENQUIRY_ITEM_INX LIKE BAPISDITMX OCCURS 0 WITH HEADER LINE.
    W_ENQUIRY_ITEM_INX-ITM_NUMBER  = THEAD-ITEMNO.
          W_ENQUIRY_ITEM_INX-UPDATEFLAG  = 'X'.
          W_ENQUIRY_ITEM_INX-CUST_MAT22 = 'X'.
    APPEND W_ENQUIRY_ITEM_INX.
    CALL FUNCTION 'BAPI_INQUIRY_CREATEFROMDATA2'
       EXPORTING
       SALESDOCUMENTIN               =
         INQUIRY_HEADER_IN             =  W_ENQUIRY_THEAD
      IMPORTING
        SALESDOCUMENT                 = W_NUMBER
       TABLES
        RETURN                        = W_RETURN
        INQUIRY_ITEMS_IN              =  W_ENQUIRY_ITEM
        INQUIRY_ITEMS_INX             =  W_ENQUIRY_ITEM_INX
         INQUIRY_PARTNERS              = T_INQUIRY_PARTNERS

  • Problem with non currency field calculations to become curr

    Hi guys,
    Is there a problem if I have a QUAN field and DEC field forming to become a CURR field? I mean a have this computation below:
    v_var1 = v_var2 * v_var3.
    where v_var1 type QUAN, v_var2 type DEC and v_var3 type CURR...
    would it incur any problem with the calculations?
    Thanks!

    Hi,
    Did you try ?
    Worked for me flawlessly
    tables bseg.
    parameters : qty like bseg-menge,
                       amt like bseg-dmbtr.
    data : result like bseg-dmbtr.
    result = qty * amt.
                write result.
    The only issue is that the result will be rounded upto 2 decimals.
    But if you declare result as
    data : result(13) type p decimals 3.
    Then there will be no issues.
    regards,
    Advait
    Edited by: Advait Gode on Oct 3, 2008 3:59 PM

Maybe you are looking for

  • 10.5.3 upgrade burn iso file

    OK prior to the 10.5.3 upgrade I could burn ISO's to DVD without any problems either using "Burn" or the "disk utility". Now all I get is that the device, an OPTIARC DVD RW AD-5630A, fails to respond properly. To me this just sounds like a driver iss

  • Can you move RAID sets around in Xsan?

    Hi All, My apologies if this is a dumb question--I haven't been able to find this anywhere. Given a SAN, if I shut it down, physically swap two RAID sets, and fire it back up, will Xsan still see everything just fine, or will I have just ruined my SA

  • When I connect my IPod, a message comes up stating itunes has detected and ipod but it could not be properly identified

    I have installed, uninstalled and installed itunes and restarted my computer and reset my ipod and it is still not "identifying" my ipod. What am I doing wrong?

  • Please let us edit our own posts!

    For example, I made a post with a tip for setting default zoom level in safari, and I want to add an addendum to my post for some additional hint to people having trouble implementing my suggestion. But I can't edit my original post. I can only reply

  • My iMac G5 (iSight) doesnt startup correctly!

    I have problems with my iMac G5 20'! I'm trying to start up but after the apple logo in the middle, there come's only a bluescreen. I couldn't do anything, only after a few minutes there appears a mouse corsor and i can move itz but there is no login