Wednesday, October 31, 2012

API for adding responsibility to user

DECLARE
CURSOR c1
IS
select responsibility_id, application_id
from fnd_responsibility_vl a where
a.responsibility_name in
(and not exists (
select 1
from FND_USER_RESP_GROUPS_DIRECT
where user_id=
and responsibility_id=a.responsibility_id);
l_number NUMBER := 0;
BEGIN
FOR c1_rec IN c1
LOOP
BEGIN

SELECT 1

INTO l_number

FROM FND_USER_RESP_GROUPS_DIRECT a

WHERE a.responsibility_id = c1_rec.responsibility_id

AND a.user_id = 7081;

EXCEPTION

WHEN NO_DATA_FOUND

THEN

l_number := 2;

WHEN OTHERS

THEN

l_number := 0;

END;



IF l_number = 2

THEN

DBMS_OUTPUT.

put_line (

'resp id --'



c1_rec.responsibility_id



'---Application id--> '



c1_rec.application_id);

fnd_user_resp_groups_api.

Insert_Assignment (

user_id => 7081,

responsibility_id => c1_rec.responsibility_id,

responsibility_application_id => c1_rec.application_id,

start_date => SYSDATE,

end_date => NULL,

description => NULL);

END IF;

END LOOP;



COMMIT;

END;

Wednesday, October 24, 2012

Supplier Conversion

http://prasanthapps.blogspot.co.uk/2011/04/supplier-conversion-in-r12.html

Tuesday, October 23, 2012

java.sql.SQLException: Attempt to set a parameter name that does not occur in the SQL: Variable

There should not be any Bind variables defined in View Object if it is not used in SQL Query.

To remove the Bind Variables from the View Object.

1.Go to Edit view Object.-->Bind Variables
2.Select any variable defined and select remove button.

class apps.oracle.ak.prativa.testing.TlkApInvoicesHeaderTmpImpl should be declared abstract; it does not define method setLastUpdateLogin(oracle.jbo.domain.Number) in class oracle.apps.fnd.framework.server.OAEntityImpl

To overcome this issue, simply copy past the below lines into your EOImpl


public void setLastUpdateLogin( oracle.jbo.domain.Number n ) {}

public void setLastUpdatedBy( oracle.jbo.domain.Number n ) {}

public void setLastUpdateDate( oracle.jbo.domain.Date n ) {}

public void setCreationDate( oracle.jbo.domain.Date n ) {}

public void setCreatedBy( oracle.jbo.domain.Number n ) {}



Friday, October 19, 2012

Errors and resolution in OAF

Error


======

You have insufficient privileges for the current operation. Please contact your System Administrator.



You cannot run a page which is not SelfSecured when the MAC fails.



Solution:

=========

Set the profiles of the below three to 'None'



FND Validation Level

FND Function Validation Level

Framework Validation Level





Error:

======

when I am running, the fwktutorial.jsp, i am getting the links for hello world, etc. However when i click on the links, i am getting the follwoing error;

error:

Unexpected URL parameters have been detected and will be ignored.





Solution:

=========

Go to Tools-->Embedded OC4J Preferences-->Global-->Startup-->Select Default Local IP Address.

How to find the DBC File


It has different paths in 11i and R12.



Path in 11i:

$FND_TOP/secure





Path in R12:

$INST_TOP/appl/fnd/12.0.0/secure

Wednesday, October 10, 2012

Existing State Of Package Body "Apps.CS_WF_ACTIVITIES_PKG" Has Been Invalidated

Existing State Of Package Body "Apps.CS_WF_ACTIVITIES_PKG" Has Been Invalidated [ID 422925.1]

Tuesday, October 9, 2012

SQL to see profile option value

elect lpad(fpo.profile_option_name,55) pon

, lpad(fpot.user_profile_option_name,55) upon

, fpot.description d

, lpad(fpo.start_date_active,15) sda

, lpad(fpo.end_date_active,15) eda

, lpad(fpo.creation_date,15) cd

, lpad(fu.user_name,20) cb

, 'Site' lo

, 'SITE' lov

, fpov.profile_option_value pov

from FND_PROFILE_OPTIONS_TL fpot

, FND_PROFILE_OPTIONS fpo

, FND_PROFILE_OPTION_VALUES fpov

, FND_USER fu

where fpot.user_profile_option_name like '&&profile_like'

and fpot.profile_option_name = fpo.profile_option_name

and fpo.application_id = fpov.application_id

and fpo.profile_option_id = fpov.profile_option_id

and fpo.created_by = fu.user_id

and fpot.language = Userenv('Lang')

and fpov.level_id = 10001 /* Site Level */

union all

select lpad(fpo.profile_option_name,55) pon

, lpad(fpot.user_profile_option_name,55) upon

, fpot.description d

, lpad(fpo.start_date_active,15) sda

, lpad(fpo.end_date_active,15) eda

, lpad(fpo.creation_date,15) cd

, lpad(fu.user_name,20) cb

, 'Apps' lo

, fa.application_name lov

, fpov.profile_option_value pov

from FND_PROFILE_OPTIONS_TL fpot

, FND_PROFILE_OPTIONS fpo

, FND_PROFILE_OPTION_VALUES fpov

, FND_USER fu

, FND_APPLICATION_TL fa

where fpot.user_profile_option_name like '&&profile_like'

and fpot.profile_option_name = fpo.profile_option_name

and fpo.profile_option_id = fpov.profile_option_id

and fpo.created_by = fu.user_id

and fpot.language = Userenv('Lang')

and fpov.level_id = 10002 /* Application Level */

and fpov.level_value = fa.application_id

union all

select lpad(fpo.profile_option_name,55) pon

, lpad(fpot.user_profile_option_name,55) upon

, fpot.description d

, lpad(fpo.start_date_active,15) sda

, lpad(fpo.end_date_active,15) eda

, lpad(fpo.creation_date,15) cd

, lpad(fu.user_name,20) cb

, 'Resp' lo

, frt.responsibility_name lov

, fpov.profile_option_value pov

from FND_PROFILE_OPTIONS_TL fpot

, FND_PROFILE_OPTIONS fpo

, FND_PROFILE_OPTION_VALUES fpov

, FND_USER fu

, FND_RESPONSIBILITY_TL frt

where fpot.user_profile_option_name like '&&profile_like'

and fpot.profile_option_name = fpo.profile_option_name

and fpo.profile_option_id = fpov.profile_option_id

and fpo.created_by = fu.user_id

and frt.language = Userenv('Lang')

and fpot.language = Userenv('Lang')

and fpov.level_id = 10003 /* Responsibility Level */

and fpov.level_value = frt.responsibility_id

and fpov.level_value_application_id = frt.application_id

union all

select lpad(fpo.profile_option_name,55) pon

, lpad(fpot.user_profile_option_name,55) upon

, fpot.description d

, lpad(fpo.start_date_active,15) sda

, lpad(fpo.end_date_active,15) eda

, lpad(fpo.creation_date,15) cd

, lpad(fu.user_name,20) cb

, 'User' lo

, fu2.user_name lov

, fpov.profile_option_value pov

from FND_PROFILE_OPTIONS_TL fpot

, FND_PROFILE_OPTIONS fpo

, FND_PROFILE_OPTION_VALUES fpov

, FND_USER fu

, FND_USER fu2

where fpot.user_profile_option_name like '&&profile_like'

and fpot.profile_option_name = fpo.profile_option_name

and fpo.profile_option_id = fpov.profile_option_id

and fpo.created_by = fu.user_id

and fpov.level_id = 10004 /* User Level */

and fpov.level_value = fu2.user_id

and fpot.language = Userenv('Lang')

order by upon, lo, lov

Tuesday, October 2, 2012

Convert Oracle Report 6i to BIP

http://bipublisher.blogspot.com/2009/05/bi-publisher-reports6i-to-bip.html