Pages

OracleEBSpro is purely for knowledge sharing and learning purpose, with the main focus on Oracle E-Business Suite Product and other related Oracle Technologies.

I'm NOT responsible for any damages in whatever form caused by the usage of the content of this blog.

I share my Oracle knowledge through this blog. All my posts in this blog are based on my experience, reading oracle websites, books, forums and other blogs. I invite people to read and suggest ways to improve this blog.


Sunday, February 17, 2013

Oracle EBS – Set the Applications Context (FND_GLOBAL.APPS_INITIALIZE)


Setting the Applications Context (FND_GLOBAL.APPS_INITIALIZE)
Use the API FND_GLOBAL.APPS_INITIALIZE to set the applications context in standalone sessions that were not initialized through normal means. Typically, you would use this API in external custom programs that are establishing their own connections.
procedure APPS_INITIALIZE(user_id in number,resp_id in number, resp_appl_id in number security_group_id in number);
This procedure sets up global variables and profile values in a database session. Call this procedure to initialize the global security context for a database session. You can use it for routines such as PL/SQL or other programs that are not integrated with either the Oracle Applications concurrent processing facility or Oracle Forms (both of which already do a similar initialization for a database session). The typical use for this routine would be as part of the logic for launching a separate non–Forms session from an established Oracle Applications form session. You can also use this procedure to set up a database session for manually testing application code using SQL*Plus. This routine should only be used when the session must be established outside of a normal form or concurrent program connection.
Arguments (input)
USER_ID – The User ID number.
RESP_ID – The ID number of the responsibility.
RESP_APPL_ID – The ID number of the application to which the responsibility belongs.
SECURITY_GROUP_ID – The ID number of the security group. This argument is automatically defaulted by the API. The caller should not pass a value for it.
You can also use sql like the following to get the values from sqlplus (as apps):
select application_id, Responsibility_id, responsibility_name
from fnd_responsibility_vl
where responsibility_name like ‘<<RESPNAME>>’;
select user_id, user_name
from fnd_user
where user_name=’<<USER>>’

No comments:

Post a Comment