Oracle Personalization, Execute A Procedure, Return Value To Screen? [Video] [ID 1130255.

1] Modified 29-JUL-2010 In this Document Goal Solution Documentation Example Setup Steps References Type HOWTO Status PUBLISHED

Applies to:
Oracle Inventory Management - Version: 11.5.10 and later [Release: 11.5 and later ] Information in this document applies to any platform.

Goal
How does one look up values from the database and populate fields using Personalization?

Solution

This should be possible using Personalization with a function on the database that retrieves values based on other data entered on the screen by the user. The function then returns these values to with a movie viewlet recording and screen shots follows.

Documentation
This is a tricky area and there is not a lot of documentation on the subject. This is one good overview note about personalization though the note does not have details on this topic: Note 743490.1 Applications. There are discussions about similar topics on external forums like this one mentioned only as a reference. Note that links change and this was valid as of June 2010. Here is the link: technical/296-stored-procedure-form-personalization. Rate this document

Example

Here is a simple example using a function in the database that queries values, then a personalization that sets the value queried from dual. In this example, the function is extremely simple but mo the code entered for the personalization text entered as the value for the account. This example is defined in the miscellaneous transactions form (INVTTMTX.fmb) and passes the item number to th
=select JBP_TEST_f1(''||${item.MTL_TRX_LINE.ITEM.value}||'') from dual

Note that the variable in this case is written as "${item.MTL_TRX_LINE.ITEM.value}". The text "MTL_TRX_LINE.ITEM." is the Block and Field where the item number is written. The syntax around th the callout is made to replace the value of the item before passing the text to the function. You can use similar naming for your own fields finding the name of the Block and Field using Help > Diag Here is the example routine used - this just does a simple select from dual but other advanced logic could be used:
create or replace function JBP_TEST_f1 (p_value in varchar2 default 'none') return varchar2 as l_return_variable varchar2(1000) := 'No Value'; begin select 'x' into l_return_variable from dual; return(p_value||'+'||l_return_variable); end; /

Setup Steps
Video - Viewlet recording of personalization (05:57)

1. In SQL, create the function:
create or replace function JBP_TEST_f1 (p_value in varchar2 default 'none') return varchar2 as l_return_variable varchar2(1000) := 'No Value'; begin select 'x' into l_return_variable from dual; return(p_value||'+'||l_return_variable); end; /

* Create the function and ensure it is valid. Here is an example SQL for checking for invalids:
select object_name, object_type, owner, status from dba_objects where status = 'INVALID' order by object_name

2. Open the form that you want to personalize, then choose Help > Diagnostics > Custom Code > Personalize. In this case, the miscellaneous transactions form is opened.

Enter the main information about when this personalization will be active.ITEM.3. 4.MTL_TRX_LINE.value}||'') from dual . =select JBP_TEST_f1(''||${item. Enter the action information detailing what the personalization will do.

PERSONALIZATION. All rights reserved.How To Change Default Behavior Of Serial Entry Form To "Individual" from "Range" using Personalization Feature NOTE:743490.5. STORED PROCEDURES Back to top Copyright (c) 2007. FORM PERSONALIZATION. the item number is passed from the screen to the database function. Save the changes and test the personalization. The value is then replaced for the References NOTE:460363. MISCELLANEOUS TRANSACTION. Legal Notices and Terms of Use | Privacy Statement .1 . The function returns the same value plus a value retrieved from the database.1 .Customization in Oracle Applications Related Products Oracle E-Business Suite > Logistics > Logistics > Oracle Inventory Management Keywords PERSONALIZE. Oracle. INVENTORY MANAGEMENT. CUSTOM CODE. In this case. 2010. 6.

Sign up to vote on this title
UsefulNot useful