Script to generate Page URL for Form Function

We can generate the page URL for Oracle form functions or OAF form functions just by passing the Function name.

Oracle Standard API will return the page URL directly.

Main Input parameters

  • Form Function Name/Id
  • Responsibility Id
  • Responsibility Application Id
  • Security Group Id
  • Form Function Parameters
Steps

  1. Get the Responsibility id, Responsibility Application id and Security Group Id
  2. Get the Function id for given Function Name
  3. Pass the above information to Oracle standard API: FND_RUN_FUNCTION.get_run_function_url 


 CREATE OR REPLACE FUNCTION XX_FORM_FUNCTION_URL

    RETURN VARCHAR2

AS

    l_url            VARCHAR2 (2000);

    L_RESP_ID        NUMBER := FND_PROFILE.VALUE ('RESP_ID');

    L_RESP_APPL_ID   NUMBER := FND_PROFILE.VALUE ('RESP_APPL_ID');

BEGIN

    SELECT FND_RUN_FUNCTION.get_run_function_url (

               fnd_function.get_function_id ('XX_OC_OEXOEORD_VW'),

               L_RESP_APPL_ID,

               L_RESP_ID,

               0,

               'STARTUP_MODE=SALES_ORDERS HEADER_ID=20747414')

      INTO l_url

      FROM DUAL;


    RETURN l_url;

EXCEPTION

    WHEN OTHERS

    THEN

        l_url := SQLERRM;

        RETURN l_url;

END;

*/

No comments:

Post a Comment