Validation of Item Values before saving the form

Hi,
I have requirement in Oracle Forms, we give header information as per the requirement and the lines info of the specific header. In lines whe have two feild as type and amount. If the type is 'E' then we need to sum up the amount value as credit and if type is 'F' we need to sum up of those feild values as Debit and before saving the form we need to check the sum of Credit and Debit is equal or not if equal then we should allow to save the form else it should not. We can have multiple lines under single header..Can any body help on this..Its very emergency..
Thanks,
Maggi.

Hi,
In Customer-exit ILOM0001 read table IMPT_BUF[] from sap stack. It contains all enteries of measuring points.
Use below mentioned code in above exits for your reference.
FIELD-SYMBOLS : <fs_impt> type ANY TABLE.
data : tab_impt type TABLE OF impt.
ASSIGN ('(SAPLIMR0)IMPT_BUF[]') to <fs_impt>.
if sy-subrc is INITIAL.
  tab_impt = <fs_impt>.
endif.
table TAB_IMPT is filled wilth all entries of measuring point while creating and changing functional location.
Thanks,
Vijay

Similar Messages

  • Restrict Duplicate entry of record before saving the form

    Hi!!
    I need to validate duplicate entry of ITEM CODE before saving the FORM. Which means, if I have entered an ITEM CODE in a row, the same ITEM CODE should not be allowed to be entered in any other rows. It should throw an error message and should ask to enter another ITEM CODE instead. I did not get the correct logic from the threads.
    Regards
    Mitto

    hey i have a requirement that to restrict duplicate entry in both block(both multi record).the blocks are DEPT(MATER)
    EMP(DETAIL)
    the associated fieds in master block DEPT.DEPT_NO,in detail EMP.EMP_ID .
    I have done' Kevin D Clarke’s calculated item ' both in master and detail block
    its working fine for master block but in case of detail block its only respond to the current session(i.e. if the new value is inserted or save it will restrict another record to be inserted of that last record's value),it does not restrict duplicate value enter ,checking with other existing records(which are saved in earlier session,though after query it is shown on the form)
    can anyone guide me why its not working

  • Changing Item Values before saving Purchase Requisition in me51n, set_data function

    Hello,
            I have written a user exit, which is called whenever changes are made to a purchase requisition. User Exit is MEREQ001 , function module EXIT_SAPLMEREQ_010 . My requirement here is that the Requisitioner should be 135 for every PR item under certain conditions. Therefore whenever there is any change made to the PR, before saving the PR item, I need to set the Requisitioner to 135, give a status message saying that the Requisitioner is set to 135 and save the Pr with the changed values. Following is the code I have written in EXIT_SAPLMEREQ_010. However, the set_data function called below does not change the PR values. Pls help
    data: lt_item type mmpur_requisition_items,
           wa_item type mmpur_requisition_item,
           wa_itemdet type mereq_item,
           wa_itemref type ref to if_purchase_requisition_item,
           w_message type i.
    constants: c_135 type afnam value '135'.
    call method im_req_header->get_items
         receiving
                 re_items = lt_item.
        loop at lt_item into wa_item.
         wa_itemref = wa_item-item.
         wa_itemdet = wa_itemref->get_data( ).
         if wa_itemdet-afnam ne c_135.
           w_message = 1.
           wa_itemdet-afnam = c_135.
           call method wa_itemref->set_data( wa_itemdet ).
         endif.
       endloop.
      IF w_message = 1.
        MESSAGE 'Requisitioner defaulted to 135 for all items' TYPE 'I'.
      ENDIF.

    Hi Sachin,
               I am able to get a reference to if_purchase_requisition_item in my code (wa_itemref ) and am also able to access each of the line items in the PR in the work area wa_itemdet.
    At this point in the code ( wa_itemdet-afnam = c_135 ) , the work area value is set to '135', However, call method wa_itemref->set_data( wa_itemdet ), does not change the values of the work area wa_itemdet . Pls help

  • Is there a way that you can have two different text fields (email, phone) that one at least one of them must be completed before submitting the form? Can it be done using javascript in the validation tab? if so, how?

    Is there a way that you can have two different text fields (email, phone) that one at least one of them must be completed before submitting the form? Can it be done using javascript in the validation tab? if so, how?

    Here is one solution:
    // mouse up action for submit button;
    function GetField(cName) {
    // get field object for cName field with error checking;
    var oField = this.getField(cName);
    if(oField == null) app.alert("Error accessing field named " + cName + "\nPleae verigy field name, spelling and capitalizeation.", 1, 0);
    return oField;
    } // end GetField function;
    var oPhone = GetField("phone");
    oPhone.required = oPhone.value == oPhone.defaultValue;
    var oEmail = GetField("email");
    oEmail.required = oEmail.value == oEmail.defaultValue;
    if(oPhone.required && oEmail.required) {
    app.alert("Missing required fields.", 1, 0);
    } else {
    app.alert("Submitting form", 3, 0);
    // additional code for submission;

  • Ho to Generate the Numeric Values Automatically before saving the records

    Hello to everybody,
    I have a data block naming “BILL” consisting of the following 3 field.
    1. Sr_No
    2. Bill_Amount
    3. Description
    This Data Block consist 10 records at a time.
    I want that whenever I insert records in the above data block.
    Serial No should automatically be generated.
    For this I have applied the following code in “WHEN-NEW-ITEM-INSTANCE” trigger.
    <CODE>
    SELECT NVL(MAX(Sr_No),0)+1 INTO :BILL.Sr_No FROM BILL;
    </CODE>
    Whenever I insert records in the BILL data block, the first row automatically generates the “Sr_No”, but when I move to the next record, (remember currently I have not saved the record), the same value which appeared in the previous record appears in the Sr_No field.
    For example, when I insert records for the first time in the BILL, the Sr_No field automatically generates value “1”, but when I move to the next record while not saving the first record the next row still generating value “1”, while it should be value “2” and so on.
    Note that I want that before saving the previous record when I move to the next row, the Sr_No should generate the next continuous value like in example.
    Please help me to solve out this problem.

    You have practically scratched you left ear with your right foot while jumping on the left foot :-)
    Seriously, you guys don't need to go to all this trouble.
    If you want a serial number incrementation, all you need to do is to either select the max value + 1 from the table or select the next value from a sequence in an PRE-INSERT trigger on block level, and that's it!!!!
    Tony

  • Adobe validations of field before submit the form

    Hi forum
    I have an Interactive Form, but i can validate the fields before submit the form and display a popup message, is this possible ??
    Thnks
    Josué Cruz

    Hi josue,
    Use the regular button and for that in the click event write all the validation scripting and at the end use the following code
    In JavaScript: xfa.connectionSet.MyWSDLDataConnection.execute(0);
    In FormCalc: $connectionSet.MyWSDLDataConnection.execute(0)
    Regards
    Pradeep Goli

  • How check value befor commit my form

    hi master
    sir
    how check value befor commit my form if that value right than commit otherwise show message box and not save
    please give me idea
    thanking you
    aamir

    Have you not tried using When-Validate-Item Trigger.
    Like if i have an Item Which can only take dates between sysdate and sysdate-3 your code in when-validate of the item should be
    If :BlockName.ItemName NOT BETWEEN SYSDATE-3 AND SYSDATE THEN
    MESSAGE('Pleaes Enter valid date);
    RAISE FORM_TRIGGER_FAILURE;
    END IF;
    This will fire, and commit will fail.

  • User Exits for transaction VF01 before saving the billing document

    Can any one say is there any user exit which exits before saving the billing document since i want to check the net value of the billing with the net value of sales order so that it should not go beyond the total amount specified in sales order.

    J_3RSINV
    SDVFX001  User exit header line in delivery to accounting
    SDVFX002  User exit for A/R line in transfer to accounting
    SDVFX003  User exit cash clearing in transfer to accounting
    SDVFX004  User exit G/L line in transfer to accounting
    SDVFX005  User exit reserves in transfer to accounting
    SDVFX006  User exit tax line in transfer to accounting
    SDVFX007  User exit: Billing plan during transfer to Accounting
    SDVFX008  User exit: Processing of transfer structures SD-FI
    SDVFX009  Billing doc. processing KIDONO (payment reference numbe
    SDVFX010  User exit item table for the customer lines
    SDVFX011  Userexit for the komkcv- and kompcv-structures
    V05I0001  User exits for billing index
    V05N0001  User Exits for Printing Billing Docs. using POR Procedu
    V60A0001  Customer functions in the billing document
    V60P0001  Data provision for additional fields for display in lis
    V61A0001  Customer enhancement: Pricing
    These are the Exits Available in the Package
    Jus try finding which will suffice ur Requirement.
    Regards,
    Mithun

  • How to validate plan data before saving the data

    I have a total row in my planning layout which is a summation of plan data in 2 other rows. While saving the data, I should check whether the total is 200 and if not the data should not be saved. How can I achieve this! Any help would be appreciated.
    Regards,
    Tipo.

    Hi,
    I'm also facing the same problem in my development...I tried above all the ways,but we cannot stop saving the wrong data.In this case you have to write the java script for save button, before saving the data if it is correct then go for the next step to save other wise throw an error message or without save the data .
    You need to write the JAVA script for save button,in this code you need to read the data form the layout and check the total value, i am not sure if layout is dynamic how we can achieve this???.
    My development also stopped for this issue,In my case i  have two layouts ,one is for actual and another one is for Planing layout(Function - Distribution equally),using the fox code i succeed to read and throw an error message for incorrect data but i can not stop to saving for incorrect total data.
    Once you solved this problem please post the message in SDN.This type of requirements is very tough and we need to share to our friends.
    Thanks.

  • Check the values while saving the values in SM30

    Hi all,
    I have created a Table maintennace for a ztable in SM30.
    I want to check the values while saving the values in the SM30.
    Can aynbody please give any idea how can i acieve this.
    Thanks,
    Tarangini

    Hi Tarangini,
    Go to the Table Maintenence Generator screen in Change mode. from this Screen go to the
    Enviorment->Modifications->Events.
    New screen will open and click on the New Entries button.
    then from the F4 Help of the first column, select ur appropriate Event and in the second column give the name of the Subroutine.
    and from the Third column u can do the coding for the subroutine as shown below.
    FORM BEFORE_DATA_SAVE.
    IF SY-UNAME EQ 'USER1' OR SY-UNAME EQ 'USER2'.
    ELSE.
       message 'No Authorization for Change...' type 'E'.
    ENDIF.
    ENDFORM.
    Regards
    Jagesh

  • Why my screen is blinking just before launching the form?

    Hello
    I am developing an Adobe interactive form from LiveCycle designer from Webdynpro ABAP.
    I wrote some very very simple validation Java Script at the form fields level at INITIALIZATION event, fine.
    When i am launching the form in the browser (i mean, TESTing the webdynpro application in SE80), am getting couple of BLINKING popups.......at the same time, the screen also BLINKING.........finally, the form is launching!!
    Why am getting BLINKING (popups, laptop screen) just before launcing the form on the screen/browser? Any mistakes in Java Script? When i did/click CHECK SYNTAX button, i did not see any red issues(except couple of warning).
    Thank you

    Hello Srinivas,
        Even I see this on my screen several times. This might be because of any javascript error resulted from your script.
    To see this dialog box, you should enable your javascript debugger. Open Adobe Reader,got menu, Edit -> Preferences, click the javascript tab on the left hand
    side.
    Now on the right hand side,
    In Javascript section -- check Enable Acrobat Javascript.
    In Javascript debugger section -- check the button Show console on errors and messages.
    This should help you in displaying the javascript debugger. If you still dont see the debugger,
    put some syntax errors temporarily in your form initialize event javascript, try to open the form using adobe reader.
    If it still doesn't show, Use Ctrl - J to show the debugger.
    Regards,
    kc

  • Prin preview of item text before saving PO

    Hello,
    when I create a PO I can use the print preview of the PO before actually creating/saving the PO. However if I do this I can't see the item text. The item text is only visible in the print preview after the PO is saved.
    Do you know if it is possible to change this so I can see the item text before saving in teh print preview?
    Thanks
    Sofia

    You need to take ABAPer help and see the Print pre-view parameters maintained for the Script/Smartform for the PO Output Type you are using..
    If possible try to include the Item text into those parameters..
    As far as I know only for MEDRUCK script, we can see the print pre-view..

  • Partially saving the form in repository

    Hi All,
    I have a PDF form in my livecycle repository. When the user requests for a pdf form from a webpage, it gets retreived from the livecycle repository.
    Now the requirement is the user can partially fill it and save it back to the repository. Again he can retrieve the partially filled pdf form anytime and can fill it.
    while saving the partially filled form the client side validations should not fire.
    Is this possible in workbench?
    Pls. Help
    Thanks
    Abhiram

    Abhiram,
    You have described a document management solution. While LiveCycle has connectors to document and content management systems, it does not manage documents natively.
    The LiveCycle repository is not intended for storing application content. It is for storing form-related assets used as input to applications, primarily. Files of type .pdf, .xdp, .xsd, .xml and image formats for example. The Foundation operation readApplicationAsset is for getting assets to be consumed by an application.
    Once a .pdf or .xdp is rendered and delivered to a Reader/Acrobat client and filled, the completed or partially-completed PDF could then be saved locally, submitted to a non-LiveCycle application (such as a content management system) or returned to LiveCycle application for further processing (whether it is saving the form to a network folder, a content management system or a home-grown document management system).
    Steve

  • In VF01, before saving the billing document, can we use "issue output to"

    In VF01 transaction before saving the billing document, can we use "issue output to" under Billing Document in Menu.
    i.e., can we enable the option "Billing Document -> Issue output to -> Issue output to"

    Hi,
    No as a standard, unless the billing document is created and released to accounting, you can't use issue output to.
    Regards,

  • System assigning Contact Number before saving the contact

    Hi ,
    In CRM Dev client and CRM QA system is assigning Number for the
    contact (Business Partner) before saving the contact in webui.
    Because of this, system is updating the Contact created time in BUT000
    as the Number assignement time and not the actual contact saved
    time.
    (Whereas in CRM PROD client its not behaving as indicated above and
    its assigning Number after saving and its fine).
    Pl suggest the possibilities to avoid early number assignment and surprised its happening in only Dev and QA.
    Regards
    Babu

    Hi,
    Please take a look at this thread.
    CRM 7.0 Stop Early Number Assignment for  BP create
    Regards,
    Parul

Maybe you are looking for