1. Get rid of all advertisements and get unlimited access to documents by upgrading to Premium Membership. Upgrade to Premium Now and also get a Premium Badge!

Oracle Forms API Overview

Discussion in 'Oracle Apps Technical' started by jagadekara, Mar 20, 2014.

  1. jagadekara

    jagadekara Forum Guru

    Messages:
    1,126
    Likes Received:
    145
    Trophy Points:
    1,805
    Location:
    Pulivendula
    Overview

    1) The Application Programming Interface or API is a PL/SQL packaged procedure which can be used as an alternative entry point into the system to the traditional online forms

    2) 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

    Calling API

    1) Ensure it is appropriate to allow that particular business operation

    2) Validate the data passed to the API

    3) Each API has a number of parameters, most of them mapped with DB column. Every parameter name starts with p_. If the parameter maps onto a database column, the remaining part of the name is usually the same as the column name

    4) When calling the APIs, it is strongly recommended that you use Named Notation, instead of Positional Notation

    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
    2) p_init_msg_list IN VARCHAR2
    The valid values for this parameter are:
    • True = FND_API.G_TRUE
    • False = FND_API.G_FALSE
    • Default = FND_API.G_FALSE
    If set to true, then the API makes a call to fnd_msg_pub.initialize to initialize the message stack. To set to true, use the value, "T". If set to false then the calling program must initialize the message stack. This action is required to be performed only once, even in the case where more
    than one API is called. To set to false, use the value, "F".
    3) p_commit IN VARCHAR2
    The valid values for this parameter are:
    • True = FND_API.G_TRUE
    • False = FND_API.G_FALSE
    • Default = FND_API.G_FALSE
    If set to true, then the API commits before returning to the calling program. To set to true, use the value, "T". If set to false, then it is the calling program’s responsibility to commit the transaction. To set to false, use the value, "F".

    Standard OUT Parameters

    1) x_return_status OUT NOCOPY VARCHAR2
    Indicates the return status of the API. The values returned are one of the following:
    • FND_API.G_RET_STS_SUCCESS
    Success: Indicates the API call was successful
    • FND_API.G_RET_STS_ERROR
    Expected Error: There is a validation error, or missing data error.
    • FND_API.G_RET_STS_UNEXP_ERROR
    Unexpected Error: The calling program can not correct the 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