Vous êtes sur la page 1sur 78

AIM

APPLICATION EXTENSION TECHNICAL


DESIGN
Form Personalization & CUSTOM.pll
Author:
Creation Date:
Last Updated:
Document Ref:

<Document Reference Number>

Version:

1.0

Approvals:
<Approver 1>
<Approver 2>

Last saved on 9/12/2013

2014 Hitachi Consulting Corporation.


All rights reserved.

Page i

Table of Contents
Document Control...........................................................................................................................................................v
Technical Overview 1 Launch a form using Form Personalization.............................................................................6
Approach...................................................................................................................................................................6
Module List...............................................................................................................................................................6
Forms Personalization Details........................................................................................................................................7
Personalization In OEXOEORD form (Sales Order Form) Source Form..........................................................7
Personalization In MSCOEGP form (MSC Order Gross Profit Form) Target Form........................................10
Sales Order Form (OEXOEORD) - Form Logic..........................................................................................................14
Navigation Logic.....................................................................................................................................................14
Block Relationship Diagram...................................................................................................................................14
Table and View Usage............................................................................................................................................14
Zone and Field Summary........................................................................................................................................14
Special Logic...........................................................................................................................................................15
Technical Overview 1.1 - Launch a form using CUSTOM.pll.....................................................................................16
Technical Overview 2 Modify form LOV dynamically using Form Personalization...............................................20
Approach.................................................................................................................................................................20
Module List.............................................................................................................................................................20
Forms Personalization Details......................................................................................................................................21
Personalization In OKCKSRCH form (Search Contracts Form).........................................................................21
Search Contracts Form (OKCKSRCH) - Form Logic..................................................................................................23
Navigation Logic.....................................................................................................................................................23
Block Relationship Diagram...................................................................................................................................23
Table and View Usage............................................................................................................................................23
Zone and Field Summary........................................................................................................................................23
Special Logic...........................................................................................................................................................24
Technical Overview 2.1 Modify form LOV dynamically using CUSTOM.pll.........................................................25
Technical Overview 3 Invoking concurrent program from form personalization and displaying the output............27
Approach.................................................................................................................................................................27
Module List.............................................................................................................................................................27
Forms Personalization Details......................................................................................................................................28
Personalization In OKSAUDET form (Service Contracts Form)........................................................................28
Service Contracts Form (OKSAUDET) - Form Logic.................................................................................................39
Navigation Logic.....................................................................................................................................................39
Block Relationship Diagram...................................................................................................................................41
Table and View Usage............................................................................................................................................41
Zone and Field Summary........................................................................................................................................42
Special Logic...........................................................................................................................................................42
Technical Overview 4 Using call custom library builtin in form personalization..................................................43
Approach.................................................................................................................................................................43

208443539.doc
Last saved on 9/12/2013

2014 Hitachi Consulting Corporation.


All rights reserved.

Page ii

Module List.............................................................................................................................................................43
Forms Personalization Details......................................................................................................................................44
Personalization In XX_TEST_PO form (Custom Form).....................................................................................44
Custom PO from Logic.................................................................................................................................................47
Navigation Logic.....................................................................................................................................................47
Block Relationship Diagram...................................................................................................................................47
Table and View Usage............................................................................................................................................47
Zone and Field Summary........................................................................................................................................48
Special Logic...........................................................................................................................................................48
Technical Overview 5 Using DO_KEY and GO_BLOCK builtin in form personalization................................49
Approach.................................................................................................................................................................49
Module List.............................................................................................................................................................49
Forms Personalization Details......................................................................................................................................50
Personalization In FNDSCAUS form (User Form) ............................................................................................50
The Personalization in User form is similar to that followed above Technical Overview 1 Launch a form using
Form Personalization. ...........................................................................................................................................50
.................................................................................................................................................................................50
Personalization In FNDSCRSP form (Responsibility Form)...............................................................................54
User from Logic............................................................................................................................................................59
Navigation Logic.....................................................................................................................................................59
Block Relationship Diagram...................................................................................................................................60
Table and View Usage............................................................................................................................................60
Zone and Field Summary........................................................................................................................................60
Special Logic...........................................................................................................................................................61
Technical Overview 6 Additional Features in CUSTOM.pll.....................................................................................62
<Report/Program Name> - Concurrent Program Logic...............................................................................................70
Calling Arguments..................................................................................................................................................70
Log Output..............................................................................................................................................................70
Table and View Usage............................................................................................................................................70
Program Logic (pseudo code).................................................................................................................................71
SQL Statements.......................................................................................................................................................71
Default Data Sources...............................................................................................................................................71
Validation Logic......................................................................................................................................................71
Incompatibility........................................................................................................................................................71
Performance Considerations....................................................................................................................................72
Other Considerations...............................................................................................................................................72
Integration Issues..........................................................................................................................................................73
Changes Required....................................................................................................................................................73
Shared Components.................................................................................................................................................73
Alert conditions.......................................................................................................................................................73
Incompatibilities......................................................................................................................................................73
Performance Issues..................................................................................................................................................73
Database Design............................................................................................................................................................74
Desired Table Changes............................................................................................................................................74

208443539.doc
Last saved on 9/12/2013

2014 Hitachi Consulting Corporation.


All rights reserved.

Page iii

New/Updated Seed Data.........................................................................................................................................74


Descriptive Flexfields..............................................................................................................................................74
Value Sets................................................................................................................................................................74
Grants/Synonyms....................................................................................................................................................75
Archiving.................................................................................................................................................................75
Database Diagram...................................................................................................................................................75
Tables, Indexes, Sequences.....................................................................................................................................75
Installation Requirements.............................................................................................................................................76
Implementation Notes...................................................................................................................................................77
Design Summary.....................................................................................................................................................77
Coding Summary.....................................................................................................................................................77
Testing Summary....................................................................................................................................................77
Installation...............................................................................................................................................................77
Open and Closed Issues for this Deliverable................................................................................................................78
Open Issues..............................................................................................................................................................78
Closed Issues...........................................................................................................................................................78

208443539.doc
Last saved on 9/12/2013

2014 Hitachi Consulting Corporation.


All rights reserved.

Page iv

Document Control
Change Record
1

Author

Version

Change Reference

Reviewers

Name

Position

Distribution

Copy No.

Name

Location

1
2
3
4

Library Master

Project Library
Project Manager

Note To Holders:
If you receive an electronic copy of this document and print it out, please write your name on the equivalent of the
cover page, for document control purposes.
If you receive a hard copy of this document, please write your name on the front cover, for document control
purposes.

208443539.doc
Last saved on 9/12/2013

2014 Hitachi Consulting Corporation.


All rights reserved.

Page v

Technical Overview 1 Launch a form using Form Personalization


Notes: Form personalization can be used to invoke a target form from a source form by passing values from source
form as parameters to the target form. This is achieved by using a set of builtin and global variables. In the below
example Sales Order form is the source form and a custom form MSC Order Gross Profit form is the target form.
This document defines the technical components required to implement customization of Sales order form
personalization This Application Extension Technical Design document complements the Application Extension
Functional Design document for Sales order form personalization and you should consider the set to be the complete
detailed design.

Approach
This customization will be attained by using Oracles Form Personalization functionality to the Sales order form
(OEXOEORD) to invoke a custom form MSC Order Gross Profit from the menu
Personalizations must be thoroughly tested by the end users. Different methods of navigation and data entry may
result in undesired screen functionality due to the nature of forms personalization.

Module List
Forms
Sales order form personalization includes the following forms:
OEXOEORD

Sales Order form

--Source Form

MSCOEGP MSC Order Gross Profit form --Target Form


Navigate to Order Management Super User->Orders, Returns->Sales Orders
Navigate to MSC US OM Order Admin->MSC Order Gross Profit
Launch the forms personalization screen from the Help->Diagnostics->Custom Code->Personalize menu
option.

Page 6

Forms Personalization Details


Personalization In OEXOEORD form (Sales Order Form) Source Form
RULE Initializes global variable and Menu in Sales Order form. The variable will be passed to
the invoked MSC Order Gross Profit Form. These changes are instated every time the form is
opened.
Rule Seq: 10
Description: MSC Order Gross Profit Menu Creation And Defining Global Variable
Trigger Event: WHEN-NEW-FORM-INSTANCE
Trigger Object:
Condition:
Processing Mode: Not in Enter-Query Mode
Context Level Site

Action Type = Menu


Seq
10

Description
MSC Order Gross Profit
Menu

Menu Entry
SPECIAL15

Menu Label

Icon
Name

Enable
in
Block

MSC Order Gross Profit

Notes:
SPECIALn
Populate tools menu (SPECIAL 1-15)
Populate reports menu (SPECIAL 16-30)
Populate actions menu (SPECIAL 31-45)
MENUn
Populate tools menu (MENU1-15)
Use these before SPECIALn

Page 7

Action Type = Property


Seq
20

Description
Initialize XX_ORDER_NO
global variable

Object Type
Global Variable

Target Object
XX_ORDER_NO

Property Name
INITIAL VALUE

Value
=null

RULE Launch the MSC Order Gross Profit form using the Launch Function Built in and assign
value to global variable which is passed to parameter in the invoked form
Rule Seq: 20
Description: calling MSC Order Gross Profit form
Trigger Event: SPECIAL31
Trigger Object:
Condition:
Processing Mode: Not in Enter-Query Mode
Context Level Site

Page 8

Action Type = Property


Seq
10

Description
Initiate value for
Global variable

Object Type
Global Variable

Target Object
XX_ORDER_NO

Property
Name
VALUE

Value
=:ORDER.ORDER_NU
MBER

Action Type = Builtin


Seq
20

Description
Calling MSC Order Gross Profit
form

Builtin Type
Launch a Function

Function Code
MSCOEGP

Function Name
MSC Order Gross
Profit

Parameters

Notes: Launch a Function Built in is used to launch the required form.

Page 9

Personalization In MSCOEGP form (MSC Order Gross Profit Form) Target Form
RULE Initializes global variable and set window title based on the order number queried
Rule Seq: 10
Description: Initilize global variable value
Trigger Event: WHEN-NEW-FORM-INSTANCE
Trigger Object:
Condition:
Processing Mode: Not in Enter-Query Mode
Context Level Site

Action Type = Property


Seq

Description

Object
Type

Target Object

Property
Name

Value

Page 10

Set Window Title

Window

LINEPROFIT

TITLE

10

Initialize global
variable

Global
Variable

XX_ORDER_NO

INITIAL
VALUE

=(select 'MSC Order Gross Profit - '||


:GLOBAL.XX_ORDER_NO from dual)

RULES The global variable is assigned to the parameter in MSC Order Gross Profit form and
initializes the global variable value to null.
Rule Seq: 20
Description: Passing parameter to form
Trigger Event: WHEN-NEW-FORM-INSTANCE
Trigger Object:

Page 11

Condition: :GLOBAL.XX_ORDER_NO is not null


Processing Mode: Not in Enter-Query Mode
Context Level Site

Action Type = Property


Seq
10
20

Description
Assign value to
parameter
Global variable
value
reassigned to
null

Object
Type
Parameter
Global
Variable

Target Object
ORDER_NO

Property
Name
VALUE

Value
=:GLOBAL.XX_ORDER_NO

XX_ORDER_NO

VALUE

=null

Page 12

Page 13

Sales Order Form (OEXOEORD) - Form Logic


<Overview description of form logic>

Navigation Logic
Entry Mode
START
1.
2.
3.

User enters data into form or queries an existing sales order.


User invokes the MSC Order Gross Profit Form from Tools->MSC Order Gross Profit
The Order Gross Profit displays the data of the sales order open in the Sales order form.

END

Block Relationship Diagram


Table and View Usage
Table Name

Select

Insert

Update

Delete

Base Table

MTL_SYSTEM_ITEMS

Zone and Field Summary


Zone 1
Base Table:
Where/Order By:
Field/Column

Type

Rqd?

Field 1
COLUMN_NAME

Char

Yes

Default

Validation

QuickPick

Validated against
<column>
from <table>
where <column> =
<value>

Display MEANING
from <Application Short
Name>_LOOKUPS where
LOOKUP_TYPE = '<lookup type>

Zone 2
Base Table:
Where/Order By:

Page 14

Field
Field 1
COLUMN_NAME

Type
Char

Rqd?

Default

No

Validation
(

(QuickPick validation)

QuickPick
Display MEANING
from <Application Short
Name>_LOOKUPS where
LOOKUP_TYPE = '<lookup type>

Special Logic
Zone 1
<Description of special zone-level logic (if any)>
Field Name
<Description of special field logic>

Page 15

Technical Overview 1.1 - Launch a form using CUSTOM.pll


1. Initialize the menu in WHEN-NEW-FORM-INSTANCE event in CUSTOM.pll

2. Invoke the new function by handling the event SPECIAL15 which is initialized above.
fnd_function.execute is used to launch a new function.

Page 16

ZOOM Event in CUSTOM.pll


1. Initialize the zoom event in the required forms in CUSTOM.pll function
ZOOM_AVAILABLE

Page 17

2. Handle the event in procedure EVENT


Fnd_function.execute is used to invoke the new function.

Page 18

CUSTOM.pll code

custom pll ZOOM.sql

Page 19

Technical Overview 2 Modify form LOV dynamically using Form


Personalization
Notes: The values in the LOV of a form field can be modified dynamically during run time using form
personalization. A new record group is created and assigned to the field dynamically during run time.
This document defines the technical components required to implement customization of Search Contracts Form.
This Application Extension Technical Design document complements the Application Extension Functional Design
document for Search Contracts Form and you should consider the set to be the complete detailed design.

Approach
This customization will be attained by using Oracles Form Personalization functionality to the Service Contracts
Search Form (OKCKSRCH) to restrict the values in LOV of Category Field to Service Agreement
Personalization must be thoroughly tested by the end users. Different methods of navigation and data entry may
result in undesired screen functionality due to the nature of forms personalization.

Module List
Forms
Search Contracts Form personalization includes the following forms:
OKCKSRCH

Search Contracts form

Navigate to Service Contracts Manager->Contract Administration->Launchpad->View Menu->Find


Launch the forms personalization screen from the Help->Diagnostics->Custom Code->Personalize menu
option.

Page 20

Forms Personalization Details


Personalization In OKCKSRCH form (Search Contracts Form)
RULE Create new record group using built ins and assigns the new record group to existing
LOV.
Rule Seq: 10
Description: Restrict the value of category field
Trigger Event: WHEN-NEW-FORM-INSTANCE
Trigger Object:
Condition:
Processing Mode: Not in Enter-Query Mode
Context Level Site

Action Type = Builtin


Seq
10

Description
Create New Record
Group

Builtin Type
Create Record
Group from
Query

Argument
select b.code, tl.meaning, b.cls_code
from okc_subclasses_b b,
okc_subclasses_tl tl where b.code = tl.code
and tl.language = USERENV('LANG') and
b.cls_code ='SERVICE' and b.code
='SERVICE'
order by upper(tl.meaning)

Group Name
XX_SUBCLASS_RG

Notes: The number of fields in the above select query must match with the number of fields in the existing
record group query of the field

Page 21

Action Type = Property


Seq
20

Description
Assign the new Record
group to existing LOV
of the field

Object Type
LOV

Target Object
LOV_SUBCLASS

Property Name
GROUP_NAME

Value
XX_SUBCLASS_RG

Notes: The target object above refers to the name of the LOV attached to required form field. This can be identified
only in the .fmb file of the form.

Page 22

Search Contracts Form (OKCKSRCH) - Form Logic


<Overview description of form logic>

Navigation Logic
Entry Mode
START
1.
2.

User opens the Search Contracts form


The new record group gets created and assigned to the LOV dynamically when the form opens since it
is handled in WHEN-NEW-FORM-INSTANCE

END

Block Relationship Diagram


Table and View Usage
Table Name

Select

Insert

Update

Delete

Base Table

MTL_SYSTEM_ITEMS

Zone and Field Summary


Zone 1
Base Table:
Where/Order By:
Field/Column

Type

Rqd?

Field 1
COLUMN_NAME

Char

Yes

Default

Validation

QuickPick

Validated against
<column>
from <table>
where <column> =
<value>

Display MEANING
from <Application Short
Name>_LOOKUPS where
LOOKUP_TYPE = '<lookup type>

Zone 2
Base Table:
Where/Order By:

Page 23

Field
Field 1
COLUMN_NAME

Type
Char

Rqd?

Default

No

Validation
(

(QuickPick validation)

QuickPick
Display MEANING
from <Application Short
Name>_LOOKUPS where
LOOKUP_TYPE = '<lookup type>

Special Logic
Zone 1
<Description of special zone-level logic (if any)>
Field Name
<Description of special field logic>

Page 24

Technical Overview 2.1 Modify form LOV dynamically using CUSTOM.pll


1. Download CUSTOM.pll file.
2. FTP tool path, switch to the $AU_TOP/resource/ directory, and download CUSTOM.pll.
3. Open the CUSTOM.pll in form builder and capture the event in the package.

4. In the above screen the LOV change is handled in event WHEN-NEW-FORMINSTANCE.

Page 25

The function POPULATE_GROUP_WITH_QUERY is used.

The parameters for this function are

The name of record group that has to be modified.

The new select query. The number of fields in select query must match with
original record group query.

This function returns value 0 if the query has been assigned successfully to the record
group.

Note:
In case of form personalization the Name of the LOV attached to field is used but in custom.pll the record
group name of the field is used.

CUSTOM.pll code

custom pll - Record


group.sql

Page 26

Technical Overview 3 Invoking concurrent program from form


personalization and displaying the output
Notes: Whenever the View Output button is clicked in the SRS Form an URL gets generated which redirects the
browser to the location where output of the concurrent program is present. This functionality is replicated using
form personalization where one can submit a program directly from forms Tools Menu and view the output at that
instant.
This below logic also explains how Launch URL built in can be used in form personalization.
This document defines the technical components required to implement customization of Service Contracts Form.
This Application Extension Technical Design document complements the Application Extension Functional Design
document for Service Contracts Form and you should consider the set to be the complete detailed design.

Approach
This customization will be attained by using Oracles Form Personalization functionality to the Service Contracts
Form (OKSAUDET) to submit a concurrent program from forms Tools menu and view the output.
Personalization must be thoroughly tested by the end users. Different methods of navigation and data entry may
result in undesired screen functionality due to the nature of forms personalization.

Module List
Forms
Service Contracts Form personalization includes the following forms:
OKSAUDET

Service Contracts form

Navigate to Service Contracts Manager->Contract Administration->Launchpad


Launch the forms personalization screen from the Help->Diagnostics->Custom Code->Personalize menu
option.

Page 27

Forms Personalization Details


Personalization In OKSAUDET form (Service Contracts Form)
RULE Here we define the required global variables to hold the value of request ID of the
submitted program and the URL generated. We also initialize the menus required.
One is to submit the program and the other on is to view the output.
Rule Seq: 10
Description: Calling report (test)- Enable Menu & initialize global variables
Trigger Event: WHEN-NEW-FORM-INSTANCE
Trigger Object:
Condition:
Processing Mode: Not in Enter-Query Mode
Context Level Site

Action Type = Menu


Seq
10
15

Description
<Optional>
<Optional>

Menu Entry
MENU 10
MENU 11

Menu Label

Icon
Name

Enable
in
Block

Test_conc. Prog
View Output (Test)

Page 28

Action Type = Property


Seq
20
25

Description
<optional>
<optional>

Object Type
Global Variable
Global Variable

Target Object
XX_REQ_ID
XX_URL

Property Name
INITIAL VALUE
INITIAL VALUE

Value
=NULL
=NULL

Page 29

Notes: The global variable for URL is just created for our reference to ensure that the program has been submitted
and URL has been generated. This is not mandatory.

RULE The concurrent program is submitted from the form by invoking a custom package
inside which the logic to submit a Concurrent program has been added. This function being
invoked from form returns the request ID.

Page 30

Rule Seq: 20
Description: Calling report (test)
Trigger Event: MENU 10
--the event which has been initialized in previous step must be used as
trigger event here
Trigger Object:
Condition:
Processing Mode: Not in Enter-Query Mode
Context Level Site

Action Type = Property


Seq

Description

10

<optional>

Object
Type
Global
Variable

Target
Object
XX_REQ_ID

Property
Name
VALUE

Value

Description

=(select xx_test_fp.sub_prog_fn from


dual)

The package invoked


here returns the request
ID of the concurrent
program submitted.

Note 1: The custom function xx_test_fp.sub_prog_fn submits a concurrent program and returns the request id of the
submitted program. Find below the code.
CREATE OR REPLACE PACKAGE BODY APPS.xx_test_fp
AS
FUNCTION sub_prog_fn
RETURN NUMBER
IS
l_req_id NUMBER;
BEGIN

Page 31

sub_prog_pr (l_req_id);
RETURN (l_req_id);
END;
PROCEDURE sub_prog_pr (req_id OUT NUMBER)
AS
PRAGMA AUTONOMOUS_TRANSACTION;
V_SUCCESS
BOOLEAN;
v_phase
VARCHAR2 (30);
v_status
VARCHAR2 (30);
v_dev_phase VARCHAR2 (30);
v_dev_status VARCHAR2 (30);
v_message
VARCHAR2 (240);
BEGIN
fnd_global.
apps_initialize (user_id => 15064, resp_id => 51605, resp_appl_id => 275);
req_id :=
FND_REQUEST.SUBMIT_REQUEST (
APPLICATION => 'MSCPA',
PROGRAM
=> 'MSCPRJTRAEXP',
DESCRIPTION => 'MSC Projects Travel Expense Invoice Lines - CSV
Report',
START_TIME => SYSDATE,
SUB_REQUEST => FALSE,
ARGUMENT1 => 'JAN-13',
ARGUMENT2 => 'FEB-13');
COMMIT;
IF req_id = 0
THEN
DBMS_OUTPUT.PUT_LINE ('Standard Program is Not Submitted');
END IF;
END;
END;
/

Page 32

Action Type = Message


Seq
20

Description
<optional>

Message Type
Show

Message Text
=:GLOBAL.XX_REQ_ID

Note: The above message section is not mandatory and is used for our reference to ensure that the request has been
submitted

Page 33

RULE In the previous sequence the program has been submitted and the request ID generated
is stored in the global variable XX_REQ_ID. This request ID value can be used to generate the
URL which redirects to the output of the submitted request. This is done in the current sequence
and triggered when the menu option View Output (Test) is clicked.
Rule Seq: 30
Description: View output of report(test)
Trigger Event: MENU 11
--the event which has been initialized in previous step for View Output
(Test) must be used as trigger event here
Trigger Object:
Condition:
Processing Mode: Not in Enter-Query Mode
Context Level Site

Action Type = Property


Seq

Description

10

<optional>

Object
Type
Global
Variable

Target
Object
XX_URL

Property
Name
VALUE

Value

Description

=(select
APPS.XX_GET_URL_PUB
(:GLOBAL.XX_REQ_ID)
from dual)

The function invoked here returns


the URL and the request ID stored
in the global variable XX_REQ_ID
is passed as IN parameter to this
function.

Page 34

Note: The second function returns the URL for the output by taking the request id of the submitted program as in
parameter. Find below the code for XX_GET_URL_PUB.
CREATE OR REPLACE FUNCTION APPS.xx_get_url_pub(P_request_id number)
RETURN VARCHAR2
AS
l_request_id NUMBER := P_request_id;
-- The request id
l_two_task VARCHAR2 (256);
l_gwyuid
VARCHAR2 (256);
l_url
VARCHAR2 (1024);
BEGIN
-- Get the value of the profile option named, Gateway User ID (GWYUID)
l_gwyuid := fnd_profile.VALUE ('GWYUID');
/* Alternate SQL to get the value
SELECT profile_option_value
INTO l_gwyuid
FROM fnd_profile_options o, fnd_profile_option_values ov
WHERE profile_option_name = 'GWYUID' AND o.application_id = ov.application_id
AND o.profile_option_id = ov.profile_option_id;
*/
-- Get the value of the profile option named, Two Task(TWO_TASK)
l_two_task := fnd_profile.VALUE ('TWO_TASK');
/* Alternate SQL to get the value
SELECT profile_option_value
INTO l_two_task
FROM fnd_profile_options o, fnd_profile_option_values ov
WHERE profile_option_name = 'TWO_TASK' AND o.application_id = ov.application_id
AND o.profile_option_id = ov.profile_option_id;
*/

Page 35

-l_url :=
fnd_webfile.get_url (file_type => fnd_webfile.request_out, -- for log file. Use
request_out to view output file
ID
=> l_request_id,
gwyuid
=> l_gwyuid,
two_task
=> l_two_task,
expire_time => 500
-- minutes, security!.
);
RETURN (l_url);
END;
/
Action Type = Message
Seq
20

Description
<optional>

Message Type
Show

Message Text
=:GLOBAL.XX_URL

Note: The above message section is not mandatory and is used for our reference to ensure that the URL has been
generated.
Action Type = Builtin
Seq
31

Description
<optional>

Builtin Type
Launch a URL

Argument
=:GLOBAL.XX
_URL

Target
_BLANK

Page 36

Note: The target field lets the HTML target window to be set. By default the target is set to _BLANK , which will
open a new browser window. You can select from 4 pre-defined targets.
Using target="_top"
target="_top" within a link tag causes the new page to load in the full body of the window, which is useful if you
ever want to break out of the frameset you have created and have a frameless page.
Using target="_parent"
target="_parent" is similar to target="_top" but will refer to the immediate parent of a frame. In more advanced
frame usage there may be several nested frames and this allows more control over which frames are specified. (It's
actually something developers rarely need to use).
Using target="_blank"
target="_blank" causes the link to open in a totally new browser window, leaving the page with the refering link still
open behind it. Unlike Javascript pop ups, however, the developer has no control over the size of the resulting
window - it just depends what the browser happened to do the last time they shut their browser down!
Using target="_self"
target="_self" loads the page within the same frame as the link tag.
Action Type = Property
Seq

Description

10
10

<optional>
<optional>

Object Type
Global Variable
Global Variable

Target
Object
XX_REQ_ID
XX_URL

Property
Name
VALUE
VALUE

Value
=NULL
=NULL

Description
Reset value of global variables
Reset value of global variables

Page 37

Page 38

Service Contracts Form (OKSAUDET) - Form Logic


<Overview description of form logic>

Navigation Logic
Entry Mode
START
1.
2.

User opens the Service Contracts form


When clicked on Tools -> Test_conc. Prog the concurrent program gets submitted and request ID is
displayed.

Page 39

3.

When Tools -> View Output(Test) is clicked the URL is displayed and a new window is opened in the
browser displaying the output of the request submitted in previous step.

Page 40

END

Block Relationship Diagram


Table and View Usage
Table Name
MTL_SYSTEM_ITEMS

Select

Insert

Update

Delete

Base Table

Page 41

Zone and Field Summary


Zone 1
Base Table:
Where/Order By:
Field/Column

Type

Rqd?

Field 1
COLUMN_NAME

Char

Yes

Type

Rqd?

Default

Validation

QuickPick

Validated against
<column>
from <table>
where <column> =
<value>

Display MEANING
from <Application Short
Name>_LOOKUPS where
LOOKUP_TYPE = '<lookup type>

Zone 2
Base Table:
Where/Order By:
Field
Field 1
COLUMN_NAME

Char

Default

No

Validation
(

(QuickPick validation)

QuickPick
Display MEANING
from <Application Short
Name>_LOOKUPS where
LOOKUP_TYPE = '<lookup type>

Special Logic
Zone 1
<Description of special zone-level logic (if any)>
Field Name
<Description of special field logic>

Page 42

Technical Overview 4 Using call custom library builtin in form


personalization
Notes: In general 5 trigger events are implicitly handled by CUSTOM.pll.
1.

WHEN-NEW-FORM-INSTANCE

2.

WHEN-NEW-BLOCK-INSTANCE

3.

WHEN-NEW-RECORD-INSTANCE

4.

WHEN-NEW-ITEM-INSTANCE

5.

WHEN-VALIDATE-RECORD

These events get triggered similar to when the form triggers are invoked and the code written in the events
are executed.
Using form personalization the CUSTOM.pll can be triggered using user defined events.
This document defines the technical components required to implement customization on a custom Form. This
Application Extension Technical Design document complements the Application Extension Functional Design
document for demonstrating the use of call custom library built-in in form personalization and you should consider
the set to be the complete detailed design.

Approach
This customization will be attained by using Oracles Form Personalization functionality to a custom form and
trigger a user defined event in CUSTOM.pll and submit a concurrent program
Personalization must be thoroughly tested by the end users. Different methods of navigation and data entry may
result in undesired screen functionality due to the nature of forms personalization.

Module List
Forms
Below demonstration includes the following forms:
XX_TEST_PO Custom form to display PO details

XX_TEST_PO.fmb

Navigate to MSC India Purchasing Inquiry->Test Form


Launch the forms personalization screen from the Help->Diagnostics->Custom Code->Personalize menu
option.

Page 43

Forms Personalization Details


Personalization In XX_TEST_PO form (Custom Form)
RULE Initialize menu in the form from where the CUSTOM.pll event has to be triggered
Rule Seq: 10
Description: Submit Conc. Prog (menu initiaslize)
Trigger Event: WHEN-NEW-FORM-INSTANCE
Trigger Object:
Condition:
Processing Mode: Not in Enter-Query Mode
Context Level Site

Action Type = Menu


Seq
10

Description
<Optional>

Menu Entry
MENU 10

Menu Label

Icon
Name

Enable in Block

Submit Report

Page 44

RULE During the menu event the CUSTOM.pll event has to be triggered. This is handled in
this sequence.
Rule Seq: 20
Description: Submit Concurrent Program
Trigger Event: MENU 10
--the event which has been initialized in previous step must be used as
trigger event
here
Trigger Object:
Condition:
Processing Mode: Not in Enter-Query Mode
Context Level Site

Action Type = Builtin

Page 45

Seq
10

Description
<optional>

Builtin Type
Call Custom Library

Argument
XX_TEST_EVENT

Note: The argument given here must be handled in the CUSTOM.pll procedure EVENT.

Page 46

Custom PO from Logic


<Overview description of form logic>

Navigation Logic
Entry Mode
START
1. User opens the custom form
2. When clicked on Tools -> Submit Report the CUSTOM.pll event gets triggered.

END

Block Relationship Diagram


Table and View Usage
Table Name
MTL_SYSTEM_ITEMS

Select

Insert

Update

Delete

Base Table

Page 47

Zone and Field Summary


Zone 1
Base Table:
Where/Order By:
Field/Column

Type

Rqd?

Field 1
COLUMN_NAME

Char

Yes

Type

Rqd?

Default

Validation

QuickPick

Validated against
<column>
from <table>
where <column> =
<value>

Display MEANING
from <Application Short
Name>_LOOKUPS where
LOOKUP_TYPE = '<lookup type>

Zone 2
Base Table:
Where/Order By:
Field
Field 1
COLUMN_NAME

Char

Default

No

Validation
(

(QuickPick validation)

QuickPick
Display MEANING
from <Application Short
Name>_LOOKUPS where
LOOKUP_TYPE = '<lookup type>

Special Logic
Zone 1
<Description of special zone-level logic (if any)>
Field Name
<Description of special field logic>

Page 48

Technical Overview 5 Using DO_KEY and GO_BLOCK builtin in form


personalization
Notes: The DO_KEY built-in allows developers to control form functionality by starting or executing a query,
clearing a form, etc. GO_ITEM and GO_BLOCK will control the form to move to the ITEM or BLOCK as
indicated.
This document defines the technical components required to implement customization on the User form. This
Application Extension Technical Design document complements the Application Extension Functional Design
document for demonstrating the use of DO_KEY and GO_BLOCK built-in in form personalization and you
should consider the set to be the complete detailed design.

Approach
This customization will be attained by using Oracles Form Personalization functionality to the User form and
demonstrate the use of the DO_KEY and GO_BLOCK built-ins.
Personalization must be thoroughly tested by the end users. Different methods of navigation and data entry may
result in undesired screen functionality due to the nature of forms personalization.

Module List
Forms
Below demonstration includes the following forms:
FNDSCAUS.fmb

User creation form

FNDSCRSP.fmbResponsibility creation form


Navigate to System Administrator->Security->User->Define
Navigate to System Administrator->Security->Responsibility->Define
Launch the forms personalization screen from the Help->Diagnostics->Custom Code->Personalize menu
option.

Page 49

Forms Personalization Details


Personalization In FNDSCAUS form (User Form)
The Personalization in User form is similar to that followed above Technical Overview 1
Launch a form using Form Personalization.
1.

Initialize a menu and global variable.

Page 50

2.

During the Menu trigger event assign the responsibility ID of the current record to the variable.

Page 51

Page 52

3.

Zoom in to the Responsibility screen.

Page 53

Personalization In FNDSCRSP form (Responsibility Form)


RULE Initialize the global variable value in destination form
Rule Seq: 1
Description: Set the initlal Value of global variable
Trigger Event: WHEN-NEW-FORM-INSTANCE
Trigger Object:
Condition:
Processing Mode: Not in Enter-Query Mode
Context Level Site

Action Type = Property


Seq
5

Description
<optional>

Object Type
Global Variable

Target Object
XX_RESP_ID

Property Name
INITIAL VALUE

Value
=NULL

RULE The Responsibility form is changed into Query mode using the DO_KEY built-in.
Notes: The DO_KEY built-in allows developers to control form functionality by starting or executing a query,
Rule Seq: 2
Description: Change into query mode
Trigger Event: WHEN-NEW-FORM-INSTANCE
Trigger Object:
Condition: :GLOBAL.XX_RESP_ID IS NOT NULL
--This global variable was assigned a value
in the personalization done in User form. It holds the responsibility ID of the responsibility that has to be
queried in the current form. This functionality is handled implicitly in form personalization.
Processing Mode: Not in Enter-Query Mode
Context Level Site

Page 54

Action Type = Builtin


Seq
1
2

Description
<optional>
<optional>

Builtin Type
GO_BLOCK
DO_KEY

Argument
RESPONSIBILITY
ENTER_QUERY

Note:
GO_BLOCK
The argument given here must be the name of the Block the control should pass to.
DO_KEY
It is ususally used to execute a form builtin.
Here the argument is the builtin that has to be executed. When ENTER_QUERY is used the form goes into query
mode.

Page 55

RULE In the previous step the block has changed to query mode. This step involves querying
the data for the responsibility ID stored in the Global variable.
Rule Seq: 3
Description: Query the data
Trigger Event: WHEN-NEW-RECORD-INSTANCE
Trigger Object: RESPONSIBILITY
Condition: :GLOBAL.XX_RESP_ID IS NOT NULL
Processing Mode: Only in Enter-Query Mode
Context Level Site

Action Type = Property


Seq
1

Description
<optional>

Object
Type
Item

Target Object
RESPONSIBILITY.RESPONSIBILITY_ID

Property
Name
VALUE

Value
=:GLOBAL.XX_RESP_ID

Notes: The responsibility ID field in form is assigne the global variable value. Based on this field the data is queried.

Page 56

Action Type = Builtin


Seq
2

Description
<optional>

Builtin Type
DO_KEY

Argument
EXECUTE_QUERY

Action Type = Property


Seq
3

Description
<optional>

Object Type
Global Variable

Target Object
XX_RESP_ID

Property Name
VALUE

Value
=NULL

Notes: the global variable value is reset.

Page 57

Page 58

User from Logic


<Overview description of form logic>

Navigation Logic
Entry Mode
START
3. User form is opened.
4. On zooming into the responsibility form the corresponding responsibility is queried in the responsibility
form.

Page 59

END

Block Relationship Diagram


Table and View Usage
Table Name

Select

Insert

Update

Delete

Base Table

MTL_SYSTEM_ITEMS

Zone and Field Summary


Zone 1
Base Table:
Where/Order By:
Field/Column

Type

Rqd?

Field 1
COLUMN_NAME

Char

Yes

Default

Validation

QuickPick

Validated against
<column>

Display MEANING
from <Application Short

Page 60

Field/Column

Type

Rqd?

Default

Validation

QuickPick

from <table>
where <column> =
<value>

Name>_LOOKUPS where
LOOKUP_TYPE = '<lookup type>

Zone 2
Base Table:
Where/Order By:
Field
Field 1
COLUMN_NAME

Type
Char

Rqd?

Default

No

Validation
(

(QuickPick validation)

QuickPick
Display MEANING
from <Application Short
Name>_LOOKUPS where
LOOKUP_TYPE = '<lookup type>

Special Logic
Zone 1
<Description of special zone-level logic (if any)>
Field Name
<Description of special field logic>

Page 61

Technical Overview 6 Additional Features in CUSTOM.pll


1. Download CUSTOM.pll file.
2. FTP tool path, switch to the $AU_TOP/resource/ directory, and download CUSTOM.pll.

Feature 1: Changing the prompt of a form field

Note:
The parameters that has to be passed for SET_ITEM_PROPERTY are
a. The block.field name
b. The property that has to be changed, in this case prompt_text
c. The new prompt that has to be set.
**All features in form builtin SET_ITEM_PROPERTY and GET_ITEM_PROPERTY can be handled
here

Feature 2: Defaulting value of a field

Page 62

Note:
The parameters that has to be passed for COPY are
a. The value that has to be set. It can be hard coded text or value present in another form field.
b. The block.field name to which the value has to be defaulted.

Feature 3: Changing width of the LOV column

Note:
SET_LOV_COLUMN_PROPERTY(lov_name VARCHAR2,
colnum NUMBER,
property NUMBER,
value VARCHAR2);

Feature 4: Handling multiple records in a block in single trigger event


Note:
One disadvantage of form personalization is that looping and handling multiple records of a block is not possible.
This can be overcome using CUSTOM.pll.

Page 63

Feature 5: Invoking response from user for the message displayed using FND_MESSAGE
Note:
The custom messages invoked by the user in forms can be modified to prompt the user to provide a response and
control the form functionality based on response from the user.

Page 64

Note:

FND_MESSAGE.QUESTION - Displays a message and up to three buttons in an Oracle Forms


modal window.
function FND_MESSAGE.QUESTION
(button1 IN varchar2 default YES,
button2 IN varchar2 default NO,
button3 IN varchar2 default CANCEL,
default_btn IN number default 1,
cancel_btn IN number default 3,
icon IN varchar2 default question
) return number;

Arguments
Button1: message name that identifies the text for rightmost button.
Button2: message name that identifies the text for middle button.
Button3: message name that identifies the text for leftmost button.
default_btn: Specify the number of the button that will be pressed when the user presses the
default keyboard accelerator (usually the return or enter key). [Passing NULL makes button 1 be
the default.]
cancel_btn: Specify the number of the button that will be pressed when the user presses the
cancel keyboard accelerator (usually the escape key).[Passing NULL makes no buttons get
pressed by the cancel keyboard button.]
Icon: Specify the icon to display in the decision point box.
If you do not specify an icon, a standard FND_MESSAGE.QUESTION icon is displayed.
Standard icons include STOP, CAUTION, QUESTION, NOTE, and FILE. In addition, you can
use any icon in the AU_TOP/resource directory on your platform.

Feature 6: Modify the where clause of a block dynamically


Note:
The where clause of the block can be dynamically set based on conditions using SET_BLOCK_PROPERTY
builtin.

Page 65

SET_BLOCK_PROPERTY (block_name VARCHAR2,


property NUMBER,
value VARCHAR);

Feature 7: Set profile values from CUSTOM.pll


Note:
FND_PROFILE.PUT: This can be used to put a value to the specified user profile option.
Example:
FND_Profile.Put(PROFILE_NAME, New_Value)
FND_Profile.Put(USERNAME, Usr_Name)
FND_Profile.Put(RESP_ID, Resp_ID)
FND_Profile.Put(RESP_APPL_ID, Resp_App_ID)
FND_Profile.Put(USER_ID, User_ID)

Page 66

FND_PROFILE.SAVE:
Sets the value of a profile option permanently to the database, at any level.
This routine will NOT actually commit the changes. The caller must commit.
Returns TRUE if successful, FALSE if failure.
Syntax:
FND_PROFILE.SAVE(<Profile_Option_Name>, <Profile_Option_Value>, <Level
SITE/APPL/RESP/USER>, <Level_Value>, <Level_Value_App_id>);
Parameters Explanation:
Profile_Option_Name : Profile name you are setting
Profile_Option_Value : Profile value you are setting
Level : Level that you're setting at. It could be 'SITE', 'APPL','RESP', or 'USER'
Level_Value : Level value that you are setting at,
e.g. user id for 'USER' level. This is not used at site level
Level_Value_App_id : Only used for 'RESP' level. Application_Id of the responsibility.

Feature 8: Using predefined oracle application messages in CUSTOM.pll


Notes:
pl/sql package FND_MESSAGE can be used to show to show predefined oracle applications message through
forms.
The predefined oracle messages can be viewed in screen
Application Developer > Application > Messages

Page 67

FND_MESSAGE.SET_NAME - Retrieves your message from Message Dictionary and sets it


on the message stack. You call it once for each message you use in your clientside PL/SQL
procedure. You must call this procedure before you call FND_MESSAGE.SET_TOKEN.

FND_MESSAGE.SET_NAME (application IN varchar2, name IN varchar2);

Arguments:
Application: Application name of the message
Name: Message name

FND_MESSAGE.SET_TOKEN - Substitutes a message token with a value you specify.


Oracle E-Business suite allows the substitution of tokens within a message string to enable the
programmer to add dynamic content to the message at run time.
In order to insert a token into a message it is necessary to prefix the token with an ampersand.
FND_MESSAGE.SET_TOKEN('<token name present in message>', '<write the message string here>' )

Page 68

CUSTOM.pll code

CUSTOMpll code.sql

Page 69

<Report/Program Name> - Concurrent Program Logic


<Overview description>

Calling Arguments
<PROGNAME> is called from the Standard Report Submission form with the following arguments:
Argument

Prompt

Value Set

Default Value

ORG_ID
USER_ID
DATE

Organization id
Application User ID
Selection Date

Generic
Generic
FND_Date4_required

:$PROFILE$.mfg_organization_id
:$PROFILE$.user_id
:$$DATE$$

Example of call from a form:

Log Output
.........1.........2.........3.........4.........5.........6.........7.......
..8
_____________________________________________________________________________
___
_____________________________________________________________________________
___

Table and View Usage


Table Name
MTL_SYSTEM_ITEMS

Select

Insert

Update

Delete

Page 70

Program Logic (pseudo code)


BEGIN

Get command line parameters


Write Report Header
Select rows

END

(see SQL statement 1)

FOR EACH row returned


Build output record(s) (see data sources)
Write row(s) to <table>
ENDFOR

SQL Statements
1 - Data Selection

SELECT
<data>
FROM <tables>
WHERE <select criteria>
AND
<join conditions>

Default Data Sources


Table

Column

Source Value

<table name>

<column name

<table>.<column>

<column 2>

'Literal string'

<column 3>

(Description of derived value)

Validation Logic
Error Conditions:

Warning Conditions:

Incompatibility

Page 71

Performance Considerations

Other Considerations
Restart Strategy

Crash Recovery

Page 72

Integration Issues
Changes Required
Within Product
Custom menus
Other Products
No changes required

Shared Components
INV
None
BOM
None
ENG
None
MPS/MRP
None
WIP
None

Alert conditions
None.

Incompatibilities
None.

Performance Issues
None.

Page 73

Database Design
This section summarized new and changed database objects and data required to support Transact Move Orders
Form Personalization. However, the complete database design is documented in the Database Extensions Design
document.

Desired Table Changes


None

New/Updated Seed Data


Rows added to <App Prefix>_LOOKUPS:
Code

Lookup Type

Meaning

Descriptive Flexfields
Application:
Form Name:
Base Table:
Segment Name

Prompt

Size

Value Set

Default Value

Prompt

Size

Value Set

Default Value

Application:
Form Name:
Base Table:
Segment Name

Value Sets
Value Set

Size

Type

Rqd

Validation/Values

<App Prefix>_ITEM_SELECT

15

Char

Yes

<App Prefix>_SPECIAL_CODE

10

Char

No

ALL
All Items
ONE
Specific Item
Code
Meaning
From <App Prefix>_LOOKUPS
Where lookup_type = 'SPECIAL'

Page 74

Grants/Synonyms
Owner

Object

Grantees

<App Prefix>

<App Prefix>_LOOKUPS

MFG
INV

Archiving
No need to archive.

Database Diagram
No new tables

Tables, Indexes, Sequences


No new tables

Page 75

Installation Requirements
Installation scripts must be prepared to perform the following actions in an automated way:
Note:

Run the FNDLoad script to download the forms personalization FNDLoad files (text in red must be the
function name for the forms personalization that needs to be downloaded)

FNDLOAD apps/<pwd> 0 Y DOWNLOAD $FND_TOP/patch/115/import/affrmcus.lct OEXOEORD.ldt


FND_FORM_CUSTOM_RULES form_name= OEXOEORD

Note:

Run the FNDLoad script to upload the forms personalization FNDLoad files. This will install the forms
personalization changes into the application.

FNDLOAD apps/<pwd> 0 Y UPLOAD $FND_TOP/patch/115/import/affrmcus.lct OEXOEORD.ldt

Note:

Validate the FNDLoad files were installed correctly via the application.

Page 76

Implementation Notes
This document describes exactly how Transact Move Orders Form Personalization was developed and implemented
at School Specialty.

Design Summary
Functional Design

Functional Design Approval

Technical Design
This technical design document (MD.070_Transact_Move_Orders_Form_Personalization.doc) is based on
the function design (MD.050_Transact_Move_Orders_Form_Personalization.doc) document.
Design Review

Final Acceptance

Coding Summary
Development was done to work with Release 11.5.10.2 of Oracle Applications. All coding follows the standards
defined in the Build Standards document for EBS Phase 2.
Program Files
The files required for this customization are as follows:
File

Description

Coded By

Testing Summary
The customizations were tested in SSI 's test environment before being moved to production.

Installation
All Forms Personalization changes must be done in a development environment and then migrated via FNDLoad
scripts to staging and production.

Page 77

Open and Closed Issues for this Deliverable


Open Issues

ID

Issue

Resolution

Responsibility

Target
Date

Impact
Date

Responsibility

Target
Date

Impact
Date

Closed Issues

ID

Issue

Resolution

Page 78

Vous aimerez peut-être aussi