Saturday, October 21, 2017

Mandatory Parameters In Oracle APPS API

API Stands for Application Programming Interface is PL/SQL packaged procedure which can be used as an alternative entry point into the system to the traditional online forms(forms, OAF pages,..).

The advantage being that the same logic used by the seeded online forms can also be used by other interfaces into the system, thus ensuring that the integrity of the data remains intact.

An API can have, IN, OUT and INOUT parameters.

In API parameters start with p_ and if the parameter is out parameter then it contains x_

Standard IN Parameters:--

1) p_api_version IN NUMBER
This must match the version number of the API. An unexpected error is returned if the calling program version number is incompatible with the current API version number

Example: p_api_version => 1.0

2) p_init_msg_list IN VARCHAR2
The valid values for this parameter are:
  -->  FND_API.G_TRUE
  -->  FND_API.G_FALSE

By default API will take FND_API.G_FALSE

Example:  p_init_msg_list => fnd_api.g_true

3) p_commit IN VARCHAR2
The valid values for this parameter are:
  *  FND_API.G_TRUE   --> True
  *  FND_API.G_FALSE  --> False

If set to true, then the API commits before returning to the calling program. 
If set to false, then it is the calling program’s responsibility to commit the transaction.

Example:- p_commit => fnd_api.g_true

4) p_validation_level IN VARCHAR2

The valid values for this parameter are:
  *  fnd_api.g_valid_level_full 

Default = FND_API.G_VALID_LEVEL_FULL
If set to full, then the API validates all the IN parameter values.

Standard OUT Parameters

1) x_return_status OUT NOCOPY VARCHAR2
Indicates the return status of the API. Every API must return one of the following states as parameter x_return_status after the API is called:

  • S (Success)
  • E (Error)
  • U (Unexpected error)

2) x_msg_count OUT NOCOPY NUMBER
Holds the number of messages in the message list.

3) x_msg_data OUT NOCOPY VARCHAR2
Holds the encoded message if x_msg_count is equal to one

No comments:

Post a Comment

SupplierAddressImportTemplate.xlsm South Africa Suburb Field mapping in POZ_SUPPLIER_ADDRESSES_INT

Suburb mpping in Supplier Address Import Template will be mapped to Address Element Attribute2 (HZ_LOCATIONS. ADDR_ELEMENT_ATTRIBUTE2)