9 Replies Latest reply on May 16, 2011 4:48 AM by 862078

    Is there a way to restrict the blanket release qty or amount to agreed amt

    user12048986
      Hi,

      We have a requirement to restrict the blanket release qty or amt of the item to the amount that is agreed on the blanket Purchase Order line. Is there a setup at supplier or in purchasing that dictates this

      Thanks,
      user12048986
        • 1. Re: Is there a way to restrict the blanket release qty or amount to agreed amt
          user12048986
          I figured that we can restrict the amount on the release by setting the flag 'Allow Price Override' and specify the price limit. But still trying to figure out how we can release only the agreed quantity on the Blanket Purchase Order

          Any ideas!
          • 3. Re: Is there a way to restrict the blanket release qty or amount to agreed amt
            user12048986
            So I have searched metalink for this and this feature has been requested by many customers and Oracle has this as a Enchancement request.

            Can a form personalization work on this? To restrict the amount released based on the value entered for the amount agreed on the po line but how can we get the value from PO form to be passed to Release form

            Any ideas please!
            • 4. Re: Is there a way to restrict the blanket release qty or amount to agreed amt
              747405
              Hello,
              I've made a few "forms perso" and I think you can deal with this case, depending of course of the business rules you want to apply.
              If you want to apply the field "COMMITTED_AMOUNT" as a global limit for all your release you can test the following :

              All your code will be done in "Not in Enter-Query Mode"

              1/ Create some variables on the WHEN-NEW-FORM-INSTANCE event : this committed amount, and also the amount already consumed,
              2/ Initialize the variables on the WHEN-NEW-ITEM-INSTANCE event, on the PO_SHIPMENTS.SOURCE_LINE_NUM object,
              condition will be :PO_RELEASES.PO_Release_Id IS NOT NULL
              3/ On the WHEN-VALIDATE-RECORD event of the PO_SHIPMENTS object, you will update your variables depending of the item on the current line by some SQL statement, using the variable.VALUE = (your SQL),
              condition will be :PO_RELEASES.PO_Release_Id IS NOT NULL AND :SYSTEM.RECORD_STATUS IN ('CHANGED', 'INSERT', 'NEW')
              4/ Still on the WHEN-VALIDATE-RECORD event of the PO_SHIPMENTS object, you should in your condition compare the amount already ordered (including your current shipment line) to your limit, then in the action display a message to warn the user.
              On this step I use also a variable XX_NB_MSG_DISP because as the WHEN-VALIDATE-RECORD is trigerred several time during the validation, you will display the message several times :°/
              Then condition will looks like something like this :
              :PO_RELEASES.PO_Release_Id IS NOT NULL
              AND :SYSTEM.RECORD_STATUS IN ('CHANGED', 'INSERT', 'NEW')
              AND :GLOBAL.XX_NB_MSG_DISP = '0'
              AND ((:GLOBAL.XX_ORDERED_AMOUNT > :GLOBAL.COMMITTED_AMOUNT)

              At this point the message is only a warning, but it is already a little piece of code, tell me if you succeed in doing something with those explanations. Honestly I do not have time to do any tests about this...

              You can also use the PO_APPROVE event to do a global control, but this is less user-friendly.

              Hope it helps,
              Take care,
              Xavier
              • 5. Re: Is there a way to restrict the blanket release qty or amount to agreed amt
                user12048986
                Hi Xavier,

                Thank you for your time to layout all the steps. I tried these steps and got confused on how to define and initialize these variables in two different event triggers. Is it possible to call the PO LINES committed amount value on the realeases form as this form will no look at that table. If possible I guess I need to even more dig in and see how to call that value and compare it to the release quantity.

                If possible could you send me the link where I can find this

                Thanks,
                PP
                • 6. Re: Is there a way to restrict the blanket release qty or amount to agreed amt
                  747405
                  Hello,
                  yes it is possible, through an SQL STATEMENT.

                  On the WHEN-VALIDATE-RECORD event of the PO_SHIPMENTS object, you can calculate the value of the variable in the action tab, with the following settings :
                  object = standard/global variable
                  target = XX_COMMITTED_AMOUNT (always use XX at the beginning of the name of your variables)
                  property = Value
                  Value = "=SELECT committed_amount FROM po_lines_all WHERE po_line_id = :PO_SHIPMENTS.po_line_id"

                  Calculate the amount already ordered (variable XX_ORDERED_AMOUNT) will be a little more complicated, and moreover you'll have to add the amount on the current line (which can be in your SQL depending if you're inserting or creating a line).

                  It should looks like this (in the simplest way) :
                  Value (for XX_ORDERED_AMOUNT) = "SELECT SUM((Quantity - Quantity_Canceled)* Price_override) FROM po_line_locations_all WHERE po_line_id = :PO_SHIPMENTS.po_line_id"

                  Good courage, and take care,
                  Keep us informed if it is clear enough,

                  Xavier
                  • 8. Re: Is there a way to restrict the blanket release qty or amount to agreed amt
                    747405
                    You're welcome, thanx for the feedback
                    Take care
                    Xavier
                    • 9. Re: Is there a way to restrict the blanket release qty or amount to agreed amt
                      862078
                      Hi,

                      I am trying to restrict the release quantity <= the quantity agreed on BPA., but I could not follow the steps mentioned clearly.
                      Is there a way one of you could explain the steps as I have not worked extensively on form personalization.

                      Thanks in advance
                      Shruthi