Category Archives: Apps Technical

XAOATEST Code and Details

PLSQL Package used in XAOATEST Workflow:

Sample Script to Kickoff or Trigger the workflow:

Script to test the Workflow statuses:

If you are running this Script outside of Oracle Applications like Running from any Oracle IDE then run the Workflow Background Process for your Item type to save time ūüôā to Kickoff the workflow.

Related posts:

Creating workflow from scratch 2

Creating workflow from scratch Part 2

Once the Process is created then we need to design the Process:

NEW_WF011

To Design any Process in Workflow it should start with One start Function and we get it from WFSTD. Just we need to drag and drop the start and end functions from the Standard Functions:

NEW_WF012

Even when we import the Start function go to its properties and we need to mention it should be a start:

NEW_WF013

Note: Any Process can have only one Start but can have any number of ends depending upon the Business logic’s complexity.

Similarly change the properties of the end function:

NEW_WF014

Click on OK button.

Now we need to create a Custom Function that has the business logic. You can have the Function call your plsql function or Java Class or any external application. We can mention the PLSQL Function Name in the Function Name field in the properties of the Function.

NEW_WF015

We can mention the result type if any Result is returned from the plsql Function:

NEW_WF016

Click OK.

NEW_WF017

Once the function is created just drag and drop the function between START and END Functions. Once the Function is placed just by using right click of the mouse draw the Flow how the process to be. Always The Process would be starting from Start and No Functions can be in the Process without coupling to another in the flow. Always the flow should end using and END function.

NEW_WF018

Now Verify the workflow and save in the data base or the (desktop and upload using wfload).

NEW_WF019

NEW_WF020

Once the workflow is saved in the data base which usually takes time we can test it using below queries:

The data in WF_PROCESS_ACTIVITIES table explains the complete details of the workflow item type. Like how many Process, Functions, etc. with its versions.

PLSQL Code of the package and Trigger the workflow:

Related posts:

Creating a Workflow from scratch

Creating a New workflow using WFSTD:

Download the Standard Workflow for creating a new workflow item type:

To download the workflow file we can download using wfload or from Oracle Workflow Builder.

Navigation:

File –> Open –> Database –> Please give Apps user credentials. It usually takes time to load all the workflows.

Select Standard from the list of workflows and press OK button.

NEW_WF001

NEW_WF002

When the WFSTD is Loaded then save on your desktop as STANDARD.wft:

NEW_WF003

Right click on Standard and create a new Item Type

NEW_WF004

The Item Type Internal name can have at the max of 8 Characters:

NEW_WF005

There are 3 types of Persistence’s as Temporary, Permanent and Synchronization.

The access levels are important to modify the workflow and can be set at workflow builder help.

NEW_WF006

Click OK

NEW_WF007

Now save the Workflow file as XAOATEST.wft on your local desktop:

NEW_WF008

Once a new Item Type is created then a new process needs to be created where the logic needs to go in:

NEW_WF009

We need to create a new Runnable Process so that we can call it from PLSQL/Form/OAF/Java. Under a Process there can be any number of sub process depending upon the complexity of the workflow logic that needs to be implemented.

NEW_WF010

Next

 

Related posts:

Create Location Assignment API

TCA Create Location Assignment API

Name of the API : UPDATE CUSTOMER PROFILE
Base Tables Affected : HZ_LOC_ASSIGNMENTS
PL/SQL Procedure used : CREATE_LOC_ASSIGNMENT
Package Used : HZ_TAX_ASSIGNMENT_V2PUB
Mandatory Parameters :
Parameter Name Parameter Type Data Type
p_init_msg_list IN VARCHAR2:= FND_API.G_FALSE
p_location_id IN NUMBER
p_lock_flag IN VARCHAR2:= FND_API.G_FALSE
p_created_by_module IN VARCHAR2
p_application_id IN NUMBER
x_return_status IN OUT VARCHAR2,
x_msg_count OUT NUMBER
x_msg_data OUT VARCHAR2
x_loc_id OUT NUMBER

Procedure:

 General Tips for Running the Create Location Assignment API:

a) Save the API in a script file and then run the script from the SQL Prompt (Example : RUN create_loc_assignment.sql)
b) Set the organization id before running the script as :
EXEC fnd_client_info.set_org_context(‘<orgid>’); for 11i
OR For R12
EXEC mo_global.init (‘AR’);
EXEC mo_global.set_org_context(<org_id>, NULL, ‘AR’);
EXEC fnd_global.set_nls_context(‘AMERICAN’);
EXEC mo_global.set_policy_context(‘S’, <org_id>);
c) Enter the value of the Parameter Location_Id as a value which exists in HZ_LOCATIONS table.

Example For Running Create Location Assignment API:

 Sample Output of the Create Location Assignment Script:

x_return_status = S
Location Id = 29266
Created By Moudle = TCA_V2_API
x_msg_count = 0
x_msg_data =

Script To Verify whether the Create Location Assignment API is successful:

 

Related posts:

Update Customer Profile API

TCA Update Customer Profile API

Name of the API : UPDATE CUSTOMER PROFILE
Base Tables Affected : HZ_CUSTOMER_PROFILES
PL/SQL Procedure used : UPDATE_CUSTOMER_PROFILE
Package Used : HZ_CUSTOMER_PROFILE_V2PUB
Mandatory Parameters :
Parameter Name Parameter Type Data Type
p_init_msg_list IN VARCHAR2:= FND_API.G_FALSE,
p_customer_ profile_rec IN CUSTOMER_ PROFI LE_ REC_ TYPE,
p_object_version_number IN OUT NUMBER,
x_return_status OUT VARCHAR2,
x_msg_count OUT NUMBER,
x_msg_data OUT VARCHAR2

Procedure:

General Tips for Running the Update Customer Profile API:

a) Save the API in a script file and then run the script from the SQL Prompt (Example : RUN update_customer_profile.sql)
b) Set the organization id before running the script as :
EXEC fnd_client_info.set_org_context(‘<orgid>’); for 11i
OR For R12
EXEC mo_global.init (‘AR’);
EXEC mo_global.set_org_context(<org_id>, NULL, ‘AR’);
EXEC fnd_global.set_nls_context(‘AMERICAN’);
EXEC mo_global.set_policy_context(‘S’, <org_id>);

Example For Running Update Customer Profile API:

 Sample Output of the Update Customer Profile Script:

x_return_status = S
Object Version Number = 2
Credit Rating = Excellent
x_msg_count = 0
x_msg_data =

Script To Verify whether the Update Customer Profile API is successful:

 

Related posts: