Sunteți pe pagina 1din 40

Personalizations for Purchasing Burt Paulson Michael Filakosky

Purpose Potential to customize the form to meet business requirements and processes Changes applied at runtime based on triggering events Various Levels of Control Site, User, Responsibility Various options exist: Change object properties Execute certain Forms built-in functionality Display custom messages Activate/deactivate certain menu entries

Outline the Personalization Flow Triggering Event Engages (Form Object possibly given)

Evaluate the Condition


Plan out the flow: Considers Context 1. Event Takes Place 2. Condition is Evaluated 3. Is context proper? 4. Conditions are met engage Actions Performs Action(s)

Profile Options to Consider

Utilities: Diagnostics = Yes If no, will throw an error message that you do not have access to this function.

Utilities: Diagnostics = No If yes, removes the menu option all together wont even be an option.

Engaging the personalizations form.

Help/Diagnostics/Custom Code/Personalize -Invokes the Define Personalization Form

Outline the Personalization Flow Triggering Event Engages (Form Object possibly given)

Evaluate the Condition


Plan out the flow: Considers Context 1. Event Takes Place 2. Condition is Evaluated 3. Is context proper? 4. Conditions are met engage Actions Performs Action(s)

Triggering Events:

Triggering Events: When-New-Form-Instance - Engages as the forms opens When-New-Block-Instance - Engages as the user navigates into a new block When-New-Record-Instance Engages as a new record is created When-New-Item-Instance Fields on the form are items, Engages upon hitting a certain item When-Validate-Record Engages when record validation takes place example save

The triggering event is used to invoke the personalization. The range is very broad When New Form to more distinct When-New-Block-Instance

Triggering Objects:
Triggering events use trigger objects to engage. Consist of the various objects in the form, such as form blocks, items. Forms consist of blocks and within those blocks are items.

Example When the user clicks into the PO_LINES section, the personalization Actions are invoked.

Example When the user clicks into the QUANTITY field in the PO_LINES Block, then the personalizations actions are invoked.

Note: The slides to follow will build on this requirement. If an item is entered make the item revision field mandatory for an individual responsibility.

Outline the Personalization Flow Triggering Event Engages (Form Object possibly given)

Evaluate the Condition


Plan out the flow: Considers Context 1. Event Takes Place 2. Condition is Evaluated 3. Is context proper? 4. Conditions are met engage Actions Performs Action(s)

Conditions:
Can be used with triggering objects to ensure certain Conditions are met and considered prior to engaging an action.

Example above the logic is that when the user clicks into the quantity field and the Item number is not null (meaning user entered an item) then the condition is met = True.

If the user enters an item and then at any time clicks into the quantity field, then do the actions specified.

Outline the Personalization Flow Triggering Event Engages (Form Object possibly given)

Evaluate the Condition


Plan out the flow: Considers Context 1. Event Takes Place 2. Condition is Evaluated 3. Is context proper? 4. Conditions are met engage Actions Performs Action(s)

Context and Processing Mode:


Offers scope as to whether or not to engage the personalization and whether to engage If in query mode..

The possible levels: Industry Industry specific Site Applies to All Responsibility Limit the personalization to only this responsibility User Limits personalization to the user The above example, the context is limiting the personalization to the Purchasing, Vision Operations responsibility. Not in query mode.

Outline the Personalization Flow Triggering Event Engages (Form Object possibly given)

Evaluate the Condition


Plan out the flow: Considers Context 1. Event Takes Place 2. Condition is Evaluated 3. Is context proper? 4. Conditions are met engage Actions Performs Action(s)

Actions: Property

Property Used to set properties on various form items Change a form field prompt Hide a form field Make a form field mandatory Make a form field required
Building on the example on the previous slide When the user clicks in the quantity field When New Item Instance And a Item has been entered on the PO Line Condition And the user is using the Purchasing Vision Operations Responsibility Context Set the property on the Item Revision Field to be Required Mandatory True - Actions

Actions: Message
Displays custom message of choice.

Message Used to set Various Message types Actions will engage based on the sequence they are in The various message types determine whether a user can continue or not Error user cannot continue Hint or Warn lets the user continue
Building on the example on the previous slide When the user clicks in the quantity field When New Item Instance And a Item has been entered on the PO Line Condition And the user is using the Purchasing Vision Operations Resp Context Set the property on the Item Revision Field to be Required Mandatory True Actions Display the message text noted above Actions - Message

Actions: Built-in
Engages specific call to built-in functions, procedures, etc..

An example of built-in will be given later in the presentation.

Actions: Menu
Gives the ability to create custom menus to engage certain activities.

Many form names are being used based on what is seen in the screen print. The logic is to first name the menu and then use the When New Item Instance on the SPECIAL to Call a built-in function. An example will be given later in the presentation.

Various Real-Time Purchasing Examples ASN Pending


Objective: If the user is updating the quantity on the purchase order and the supplier has already sent an ASN (meaning supplier has shipped the goods) and the record is in the rcv tables Give a warning to the user to let them know to not change the quantity since the ASN will Fail processing.

We see that when the user clicks into the quantity field, the condition is going to check to see If the po_line_id value is in a select statement that checks the rcv_shipment_lines table to see If there is an ASN awaiting.

Various Real-Time Purchasing Examples ASN Pending

${item.po_lines.po_line_id.value} in (SELECT po_line_id FROM RCV_SHIPMENT_LINES WHERE NVL(QUANTITY_SHIPPED, 0) > NVL(QUANTITY_RECEIVED, 0) AND NVL(ASN_LINE_FLAG, 'N') = 'Y' AND NVL(SHIPMENT_LINE_STATUS_CODE, 'EXPECTED') <> 'CANCELLED')

The Event is the user clicking into the quantity field in the Purchase Order lines. The condition is taking the value of the current po_line_id and then checking for that po_line_id in the rcv_shipments_table along with some conditions. - If the condition comes back as TRUE it means there is an ASN invoke some action.

Various Real-Time Purchasing Examples ASN Pending


If there is an ASN pending, engage a warning message to the user stating that there Is an ASN pending.

Note 1192970.1 - How To Warn User Changing Quantity On A PO That There Are Pending ASN?

Various Real-Time Purchasing Examples Set Buyer Null


Objective: Upon opening the autocreate form, the buyer defaults to the current user. How can this be made to default a null value?

When the autocreate form opens, the first field by default that the form goes to Is the block FIND_REQ_LINES.OPERATING_UNIT. Set the when-new-item-instance on That field so as soon as the form opens engage an action. When new form instance did Not work for some reason so this was the next step.

Various Real-Time Purchasing Examples Set Buyer Null

The action sets the target object to a null value. It is possible to set the values Of a field by using the equals sign as seen above.

Various Real-Time Purchasing Examples How to limit document types in Enter PO Form

When adjusting a list of values, consider a forms level trace to isolate the sql that Is used by default for the list of values.
select type_name, document_subtype from po_document_types where document_type_code = 'PA' and document_subtype in ('BLANKET','CONTRACT') or document_type_code = 'PO' and document_subtype in ('STANDARD', 'PLANNED') order by type_name

Here is the sql located from the trace.

Various Real-Time Purchasing Examples How to limit document types in Enter PO Form

Utilize the when new form instance so the action is taken as soon as the form Opens.

Various Real-Time Purchasing Examples How to limit document types in Enter PO Form

We will now link two actions to the When New Form Instance triggering event. First use the Builtin action and Builtin Type Create Record Group From Query -In the Argument utilize the adjust sql that will become the list of values
select type_name, document_subtype from po_document_types where document_type_code = 'PA' and document_subtype in ('BLANKET') or document_type_code = 'PO' and document_subtype in ('STANDARD') order by type_name

Notice the adjustment, CONTRACT and PLANNED are now gone.

Various Real-Time Purchasing Examples How to limit document types in Enter PO Form

We will now set the object type of LOV for the ALL_DOC_TYPE list of values to the new GROUP_NAME we created in sequence 10. So as the form is opened, the first action is to create the record group and the next action (seen above) is to assign the record group to the LOV (list of values). The value = the GROUP_NAME created in Sequence 10.

Various Real-Time Purchasing Examples After Autocreate Disallow PO Entry


Objective: After the user has autocreated a requisition into a purchase order, the Purchase Order form appears and the user can enter a new purchase order. Goal is to have all purchase orders tied to requisitions, so we want to disallow the entry of any new Purchase Orders

For this, a double sequence will be required to ensure full validation. The first sequence, 40, uses the When Validate Record, meaning when the user tries to save, and the SEGMENT1 is null the condition is met, so action is taken.

Various Real-Time Purchasing Examples After Autocreate Disallow PO Entry

For this condition with sequence 40, give an error message that is informative to the user Explaining that all purchase orders must tie back to a requisition.

Various Real-Time Purchasing Examples After Autocreate Disallow PO Entry

It was found that the user could still navigate to the Purchase Order Lines, and enter data and save. To overcome this use a When New Block Instance on PO_LINES Meaning that when the user clicks down into the PO Lines Block and there is no SEGMENT1 perform some action.

Various Real-Time Purchasing Examples After Autocreate Disallow PO Entry

The first action is to put the cursor back up into the PO_HEADERS block, SEGMENT1. As the user clicks into the lines, immediately the cursor is brought back to the header. This essentially stops data entry into the Purchase Order Lines region.

Various Real-Time Purchasing Examples After Autocreate Disallow PO Entry

The second action is to call the Message type and give the user an Error. By setting up these two rules, the only way to create purchase orders is to Use the Autocreate. Its not possible to create a new PO in this Purchase Order Entry form. The error message should be the same, but for testing consider making It different so that you know for sure this action was invoked.

Various Real-Time Purchasing Examples Enter Requisition Validate Supplier


Objective: When creating a requisition, if the supplier is not valid in the system then inform the user that they need to use an already defined supplier.

The When Validate Record on the LINES can be used with a condition that checks the supplier exists in the po_vendors table. Condition: :LINES.SUGGESTED_VENDOR_NAME is not null and :LINES.SUGGESTED_VENDOR_NAME
not in (select vendor_name from po_vendors where vendor_name = :LINES.SUGGESTED_VENDOR_NAME)

Various Real-Time Purchasing Examples Enter Requisition Validate Supplier

The action is to give an Error Message. Notice that its possible to use variables in the actual error message as well. Message Text ='This is not a valid Supplier ' ||nvl(:LINES.SUGGESTED_VENDOR_NAME,'NULL)

Various Real-Time Purchasing Examples Enter Requisition Validate Supplier

The result is seen above.

Various Real-Time Purchasing Examples Add New Menu To Open The Requisition Summary
Objective: How can a new menu be created so that users can call Up the Requisition Summary form while still in the enter purchase order Form.

Creating a new menu is a two sequence process.. Sequence 10 When New Form Instance invoked when the user opens the form.

Various Real-Time Purchasing Examples Add New Menu To Open The Requisition Summary

Creating the action which is assigning a Menu Label to one of the SPECIAL menu variables. After saving, exit the form and re-enter. Take note of the Menu Entry name which was used.

Various Real-Time Purchasing Examples Add New Menu To Open The Requisition Summary

Creating a new sequence giving the Menu Entry name from the previous Sequence. Example. SPECIAL14

Various Real-Time Purchasing Examples Add New Menu To Open The Requisition Summary

Creating a new action so that when SPECIAL14 menu is selected, it calls the requisition summary form (granted user has access to it in the responsibility)

Various Real-Time Purchasing Examples Add New Menu To Open The Requisition Summary

Exit and re-enter the PO form find that tools now has a new menu option.

Various Real-Time Purchasing Examples Add New Menu To Open The Requisition Summary

Selecting the menu calls up the Requisition Summary form.

S-ar putea să vă placă și