Error in executing authorization scheme code
I run my application on APEX.ORACLE.COm and I immediatly get the following error:
ORA-06550: line 13, column 28: PL/SQL: ORA-00942: table or view does not exist ORA-06550: line 12, column 14: PL/SQL: SQL Statement ignored ORA-06550: line 16, column 19: PLS-00364: loop index variable 'C1' use is invalid ORA-06550: line 16, column 5: PL/SQL: Statement ignored ORA-06550: line 17, column 15: PLS-00364: loop index variable 'C1' use is invalid ORA-06550: line 17, column 5: PL/SQL: Statement ignored ORA-06550: line 25, column 28: PL/SQL: ORA-00942: table or view does not exist ORA-06550: line
Error ERR-1082 Error in executing authorization scheme code.
Here are the login credentials:
Workspace: RGWORK
Application: Online Certification Application Prototype - 21405
User: TESTER
Password: test123
The application s/b public . I am not able to identify the invalid authorization scheme. I checked all the authorization schemes in the Shared Components > Security > Authorization Schemes and can't find the culprit.
Can someone assist please?
Thank you,
Robert
My Blog: http://apexjscss.blogspot.com
Your Authorization Scheme "Access control - administrator" has this line of code that uses a table that isn't there (or RGTEST has no access to):
select id, application_mode
from apex_adm.apex_access_setup
This Authorization Scheme is used in the Admin tab.
If you run the page in debug mode you'll see (amongst a lot of other stuff):
0.19: Authorization Check: "11204012643155257465" User: "nobody" Component: "tab"
0.20: Show ERROR page...
That pointed me to the Tab section...and there it was!
Similar Messages
-
ERR-1082 Error in executing authorization scheme code.
Hi All,
i have a different problem in apex....
I am using below function to authenticate the apex users after SSO login. I have created authentication schemes for admin and users separately depending on that users will have access to the specific tabs.
Now users are facing below error
ORA-01403: no data found Error ERR-1082 Error in executing authorization scheme code.
while they log in or submit the page. And the weired thing is randomly they are getting this error. 2 or 3 times in a week. and when i compile the authentication function that error will be resolved.
this is function structure. Inside the function validation code is written.
function F_auth_user( muser_name in varchar2, mauth_level in number, mgroup_name in varchar2) return boolean
Some of the details: application users : 200 application size : 30MB
May i know that how can i prevent this occurrence of error.Yes that is authorization schemes .
Evidence is user can be able to login properly after compiling the function. otherwise the same error happening while navigating through out the applications.
Function code:
create or replace function F_auth_user(
muser_name in varchar2,
mauth_level in number,
mgroup_name in varchar2) return boolean is
ct number;
muser_id number;
begin
select id into muser_id from t_employees where upper(email)=upper(muser_name);
if muser_id is null or mauth_level is null or mgroup_name is null then
return false;
end if;
if upper(mgroup_name) = 'ANY' then
select count(*) into ct from t_employees emp, t_positions pos,
t_employee_groups eg
where emp.position = pos.id and
pos.MgtLevel >= mauth_level and
emp.position = pos.id and
emp.id = muser_id;
elsif upper(mgroup_name) = 'USER' then
select count(*) into ct from t_employees emp, t_positions pos,
t_employee_groups eg
where emp.position = pos.id and
pos.MgtLevel >= mauth_level and pos.MgtLevel!=6 and pos.MgtLevel!=4 and
emp.position = pos.id and
emp.id = muser_id ;
elsif upper(mgroup_name) = 'ADMIN' then
select count(*) into ct from t_employees emp, t_positions pos,
t_employee_groups eg
where emp.position = pos.id and
pos.MgtLevel >= mauth_level and pos.MgtLevel!=6 and
emp.position = pos.id and
emp.id = muser_id ;
else
select count(*) into ct from T_employees emp, T_positions pos,
t_emp_group_mapping egm, t_employee_groups eg
where emp.position = pos.id and
emp.id = egm.employee_id and
pos.MgtLevel >= mauth_level and
emp.position = pos.id and
emp.id = muser_id and
egm.group_id = eg.id and
trim(eg.group_name) = mgroup_name;
end if;
if ct > 0 then
return true;
end if;
return false; -
Error ERR-1082 Error in executing authorization scheme code.
Hi,
i imported my application from test to prod environment
when run application i received the error (on login page)
ORA-06550: line 13, column 19: PL/SQL: ORA-00942: table or view does not exist ORA-06550: line 12, column 13: PL/SQL: SQL Statement ignored ORA-06550: line 16, column 18: PLS-00364: loop index variable 'C1' use is invalid ORA-06550: line 16, column 4: PL/SQL: Statement ignored ORA-06550: line 17, column 14: PLS-00364: loop index variable 'C1' use is invalid ORA-06550: line 17, column 4: PL/SQL: Statement ignored ORA-06550: line 25, column 19: PL/SQL: ORA-00942: table or view does not exist ORA-06550: line
Error ERR-1082 Error in executing authorization scheme code.
Any help?
Thanks in advance
CostantinoHi Scott,
Thank you for the quick reply.
What I did was to install APEX 3.1 to 11g db, and installed packaged application which called Software Management. It is working fine to log into the application and other operations, but I got the same error which reported on this thread once I applied the existing authorization schemes. So I thought if I missed to import the apex_access_setup and apex_access_control tables. I am looking for the solution to enable the default authorizations...
I would appreciate if you could give me any suggestions.
Thanks,
Rui -
Error while executing BBP_UPDATE_PORG Tr Code with ADD Option
Hi All,
I changed the Back end Vendor Master Data - Purchasing View (Example Accounting Number) and run the BBPUPDVD Tr code in SRM. The Business Partner (Vendor) data is updated correctly in SRM System from Back End System.
We have set of purchasing organisations like one local (SRM) Purchasing Organisation and respective Back end Purchasing Organisation (account number). When ever I run BBPUPDVD, the SRM system updates the backend vendor master data with back end purchasing organisation into SRM Standard tables. Then I am running BBP_UPDATE_PORG Tr code to have updated data into SRM Local Purchasing Organisation. I am receiving error message.
Example Scenario:
step 1: Present values in Vendor Master Vendor Number 100250, Purchaing Organisation : 1010 A/c Number: 100250-1010
and I changed the account number as 10025o-test for vendor 100250 and pur organisation 1010.
step 2: I run the BBPUPDVD in SRM System.
Step 3: I checked the values in BBPMAININT - vendor data (for backend vendor number 100250 and backend pur organisation - 1010). The SRM system replicates the values correct.
Step 4: I executed BBP_UPDATE_PORG and replaced the local (SRM) business partner (for local vendor number - 100250 and local purchasing organisation) - REPLACE Option. Then SRM replaces the SRM Business Partner (local) Data with Back end Vendor Master Data and also Back End vendor master data is deleted in SRM System. Now I have updated business partner details in SRM System as SRM Local an no SRM Back End Vendor Master Data in SRM System. This step is working fine.
Step 5: One more time I am executing BBP_UPDATE_PORG Tr code with Add option to have SRM Back End Details (in SRM System) from SRM Local Details (SRM System). Then the system is error message in SM13 Tr code.
Kind Note: There is no SRM Back End Vendor details in SRM System which I want to have with the help of executing BBP_UPDATE_PORG Tr code with Add option.
For analysis I went to ST22 (dump Analysis), the SRM gave an error message like:
Runtime Error DYNPRO_SEND_IN_BACKGROUND
Date and Time 09/15/2008 10:56:58
ShrtText
Screen output without connection to user.
What happened?
Error in ABAP application program.
The current ABAP program "SAPLBBP_PARTNER_MAINT" had to be terminated because
one of the
statements could not be executed.
This is probably due to an error in the ABAP program.
Information on where terminated
The termination occurred in the ABAP program "SAPLBBP_PARTNER_MAINT" in "BBP_PORG_INSERT".
The main program was "RSM13000 ".
The termination occurred in line 59 of the source code of the (Include) program "LBBP_PARTNER_MAINTU11"
of the source code of program "LBBP_PARTNER_MAINTU11" (when calling the editor 590).
The program "SAPLBBP_PARTNER_MAINT" was started in the update system.
56
57 * update database
58 IF NOT LT_FRG0060_NEW[] IS INITIAL.
>>>>> INSERT BBPM_BUT_FRG0060 FROM TABLE LT_FRG0060_NEW.
60 ENDIF.
61
62 IF NOT LT_FRG0061_NEW[] IS INITIAL.
63 INSERT BBPM_BUT_FRG0061 FROM TABLE LT_FRG0061_NEW.
64 ENDIF.
Kindly guide me or provide solution.
We are in SRM 4.0 and ECC 5.0.
Thanks a lot in advance.
Regards,
Sudarsan
Edited by: KOYYA SUDARSANA NAIDU on Sep 15, 2008 9:09 PM
Edited by: KOYYA SUDARSANA NAIDU on Sep 17, 2008 8:46 PMHi All,
I changed the Back end Vendor Master Data - Purchasing View (Example Accounting Number) and run the BBPUPDVD Tr code in SRM. The Business Partner (Vendor) data is updated correctly in SRM System from Back End System.
We have set of purchasing organisations like one local (SRM) Purchasing Organisation and respective Back end Purchasing Organisation (account number). When ever I run BBPUPDVD, the SRM system updates the backend vendor master data with back end purchasing organisation into SRM Standard tables. Then I am running BBP_UPDATE_PORG Tr code to have updated data into SRM Local Purchasing Organisation. I am receiving error message.
Example Scenario:
step 1: Present values in Vendor Master Vendor Number 100250, Purchaing Organisation : 1010 A/c Number: 100250-1010
and I changed the account number as 10025o-test for vendor 100250 and pur organisation 1010.
step 2: I run the BBPUPDVD in SRM System.
Step 3: I checked the values in BBPMAININT - vendor data (for backend vendor number 100250 and backend pur organisation - 1010). The SRM system replicates the values correct.
Step 4: I executed BBP_UPDATE_PORG and replaced the local (SRM) business partner (for local vendor number - 100250 and local purchasing organisation) - REPLACE Option. Then SRM replaces the SRM Business Partner (local) Data with Back end Vendor Master Data and also Back End vendor master data is deleted in SRM System. Now I have updated business partner details in SRM System as SRM Local an no SRM Back End Vendor Master Data in SRM System. This step is working fine.
Step 5: One more time I am executing BBP_UPDATE_PORG Tr code with Add option to have SRM Back End Details (in SRM System) from SRM Local Details (SRM System). Then the system is error message in SM13 Tr code.
Kind Note: There is no SRM Back End Vendor details in SRM System which I want to have with the help of executing BBP_UPDATE_PORG Tr code with Add option.
For analysis I went to ST22 (dump Analysis), the SRM gave an error message like:
Runtime Error DYNPRO_SEND_IN_BACKGROUND
Date and Time 09/15/2008 10:56:58
ShrtText
Screen output without connection to user.
What happened?
Error in ABAP application program.
The current ABAP program "SAPLBBP_PARTNER_MAINT" had to be terminated because
one of the
statements could not be executed.
This is probably due to an error in the ABAP program.
Information on where terminated
The termination occurred in the ABAP program "SAPLBBP_PARTNER_MAINT" in "BBP_PORG_INSERT".
The main program was "RSM13000 ".
The termination occurred in line 59 of the source code of the (Include) program "LBBP_PARTNER_MAINTU11"
of the source code of program "LBBP_PARTNER_MAINTU11" (when calling the editor 590).
The program "SAPLBBP_PARTNER_MAINT" was started in the update system.
56
57 * update database
58 IF NOT LT_FRG0060_NEW[] IS INITIAL.
>>>>> INSERT BBPM_BUT_FRG0060 FROM TABLE LT_FRG0060_NEW.
60 ENDIF.
61
62 IF NOT LT_FRG0061_NEW[] IS INITIAL.
63 INSERT BBPM_BUT_FRG0061 FROM TABLE LT_FRG0061_NEW.
64 ENDIF.
Kindly guide me or provide solution.
We are in SRM 4.0 and ECC 5.0.
Thanks a lot in advance.
Regards,
Sudarsan
Edited by: KOYYA SUDARSANA NAIDU on Sep 15, 2008 9:09 PM
Edited by: KOYYA SUDARSANA NAIDU on Sep 17, 2008 8:46 PM -
Problem calling a packaged function from an authorization scheme
I wrote a package and body called pkg_auth with a function returning a boolean called is_authorized with 2 parameters (username and functional area).
i.e.
CREATE OR REPLACE PACKAGE pkg_auth
AS
FUNCTION is_authorized(p_username VARCHAR2, p_functional_area VARCHAR2) RETURN BOOLEAN;
END;
additionally i created a public synonym for it and granted execute access on it to apex_public_user and htmldb_public_user;
i then created an authorization scheme called 'access_control_db' defined as Scheme Type 'PLSQL Function Returning Boolean' and placed the following:
pkg_auth.is_authorized(v('APP_USER'),'DATABASE')
in the Expression 1 field.
and the following:
Not permitted to edit database information.
in the error field.
However when I apply this authorization scheme to a buton I receive the following error when I go to the page containing that button:
ORA-06550: line 1, column 44: PLS-00221: 'IS_AUTHORIZED' is not a procedure or is undefined ORA-06550: line 1, column 44: PL/SQL: Statement ignored
Error ERR-1082 Error in executing authorization scheme code.
Any help would be most appreciated.Hello,
Does putting 'return' infront -
return pkg_auth.is_authorized(v('APP_USER'),'DATABASE')fix your problem?
John.
Blog: http://jes.blogs.shellprompt.net
Work: http://www.apex-evangelists.com
Author of Pro Application Express: http://tinyurl.com/3gu7cd
REWARDS: Please remember to mark helpful or correct posts on the forum, not just for my answers but for everyone! -
Authorization scheme not working.
My requirement is I want to allow access only to few people for some pages, buttons.
I am using Authorization scheme with scheme Type as "Exists SQL Query"
Working Query
SELECT p.EMP_ID FROM people p where emp_alias=:APP_USER and p.EMP_alias = 'ABC'
Not Working query
SELECT p.EMP_ID FROM people p where emp_alias=:APP_USER AND p.EMP_alias in ('ABC','XYZX)
Error: ORA-00907: missing right parenthesis
ERR-1082 Error in executing authorization scheme code.
Can anyone say what am I missing.Thank you, adding braces and putting OR condition worked.
SELECT p.EMP_ID FROM people p WHERE emp_alias = :APP_USER AND (p.EMP_alias = 'ABC' OR p.EMP_alias = 'XYZX')
But not sure, how it is working some times and not working some times, if I have new lines, it doesnt work and if I have multiple conditions, it doesnt work.
This doesnt work..
SELECT p.EMP_ID FROM people p WHERE p.EMP_alias= :APP_USER and (emp_alias='ABC' or emp_alias='XYZ') and (p.EMP_ROLE='DBA' or p.EMP_ROLE ='DBAMGR') -
Trying to use authorization schema but getting ORA-00907: missing right par
Hi,
I am fairly new to HMTLDB. I am busy going through the Issue Tracker Tutorial. I am on the last part of Tutorial. This part involves authorizing a user based on their roles in the company.
I now keep getting the following when I load my pages
ORA-00907: missing right parenthesis
Error ERR-1082 Error in executing authorization scheme code.
How do I go about debugging this error not sure where to start?if this helps I am using this PDF
http://www.oracle.com/technology/products/database/application_express/pdf/issue_tracking_tutorial_1.6_0.pdf
if you open the PDF file I am stuck on page 72-74. The page I am trying to open while i am logged on as FUNKYMONKEY is Page 4 which is in the documentation -
While executing the t-code OMT3R getting error
Hi,
I am a basis consultant, one of my user getting the following error.
while executing the t-code OMT3R, he is getting the error "Do not make any changes (SAP entry)" (Message no. SV117).
His system configuration is :
SAP ECC6.0
SAP_ABA 700 0011 SAPKA70011
SAP_BASIS 700 0011 SAPKB70011
ST-PI 2005_1_700 0002 SAPKITLQI2
PI_BASIS 2005_1_700 0011 SAPKIPYJ7B
SAP_BW 700 0012 SAPKW70012
SAP_AP 700 0008 SAPKNA7008
LCAPPS 2005_700 0001 SAPKIBHD01
(LCAPPS) 2005_700
SAP_APPL 600 0008 SAPKH60008
can anybody tell me the cause of the problem. please give me a solution to the issue.
Thanks
Madhuri.Dear All,
The Issue has resoloved for Referec look in to the SAP_Note- SAP Note 162991
Thanks a lot for your great support on this issue. -
Page Restriction - Authorization Scheme
I have an application 8736 this application as 3 tabs
TAB1: information TAB2: department TAB3: Admin
TAB3 as a form in which SHOULD be only be view by users which authorisation rights. I have been trying to do this for sometimes now and it is not work. I have a table called users
TABLE:users
username access_level
john919 2
sarah765 0
For the page in TAB3 if you have an access level of 2. You should be able to view this page and if not they you should get an error message saying "sorry you cant view this page".
In this case "john919" should be able to view the page in tab "Tab3" and "sarah765 " SHOULD NOT.
I have this query in the Authorization Scheme and the scheme type: pl/sql function returning boolean
DECLARE
v_access_level NUMBER (2);
BEGIN
IF (:APP_PAGE_ID = 61)
THEN
SELECT MAX (ADMIN_LEVEL)
INTO v_access_level
FROM USERS
WHERE USER_NAME = :APP_USER;
IF v_access_level = 2
THEN
RETURN TRUE;
ELSE
RETURN FALSE;
END IF;
ELSE
RETURN TRUE;
END IF;
END
I have never try this before and I have being asking around and alot of people tell me this should check the admin_level in the USERS table using the current username of the person looking in to see if they have access to this page. SO far this is as fail me. Please helpIf you only have one access level per user then try changing your authorization scheme code to
DECLARE
v_access_level NUMBER (2);
BEGIN
SELECT ADMIN_LEVEL
INTO v_access_level
FROM USERS
WHERE USER_NAME = :APP_USER;
IF v_access_level = 2
THEN
RETURN TRUE;
ELSE
RETURN FALSE;
END IF;
END;
now apply this scheme to tab3 -
Authorization Scheme -- Best Practices?
Hi All --
We have a reporting application containing approximately 300 pages and 60 or so menu items all using authorization schemes (exists SQL method) as a means to determine whether or not a use can see the menu items and/or access the pages. We've been seeing an issue where a user logging into the application experiences poor performance upon login and have traced it to our access checks and the number of "exists" queries run when a user logs in and before our menu is displayed.
What would be considered best practice in a case such as this? Does anyone have any ideas on how to increase the performance on these authorizaton checks?
Thanks,
Leigh Johnson
Fastenal CompanyLeigh - No, the asktom post Joel referred to is posted above: http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:62048567543425
We just want to know if this post if from you folks or not.
About the authorization schemes for each page, I would think that whatever scheme you code to authorize a link to a page, e.g., on a menu, would be the same scheme you'd want to attach to the page itself.
So the authorization has to take place first at the point you render (or suppress) a link to a page and again at the point the page is requested (the latter being necessary because a user can bypass the menu links and try to access pages directly by entering the page ID in the URL.
So again, if you have X links on the menu page, each requiring a distinct query for authorization, you'll have to pay the price to do all that authorization once per session because of the design of the menu page. More precisely, the authorization scheme code, e.g., their EXISTS queries, have to be executed once per session per resource access attempted. For performance purposes, the results of these checks are cached for the duration of the session (because you set them up to be evaluated once per session and not on every page view).
One thing that might help you is region caching (or page caching) for the menu. You'd use the Cache By User option, of course. Then if the same named user logged in and out numerous times during the "cache valid" period, which is adjustable, the user would see the cached menu "instantly". Authorization checks will not have been performed during these page requests however, so you'd want to be sure that it makes sense to present cached versions of these links. However, the corresponding authorization schemes that you'd attach to the pages themselves would be evaluated when the user clicked on a "cached" link, so you'll get the protection you need, ultimately.
Scott -
Error while executing procedure in TOAD which contains parameter and dblink
Hi all,
I am getting error while executing the following code in TOAD and APEX.
It contains parameter( start_date and end_date) and dblink(@TO_FUT).
When I hardcode the parameter values, It works fine.
When I dont give hardcoded values in the procedure, the error comes.
When I comment the lines whereever parameter comes, still the error comes.
I am not sure whether it is parameter issue or dblink issue or some other issue
Is anybody having any clue about this error?
Your help is very much appreciated.
The code:
CREATE OR REPLACE PROCEDURE PROC_ENR_ACC(START_DATE DATE,END_DATE DATE)
AS
BEGIN
EXECUTE IMMEDIATE 'TRUNCATE TABLE OUTPUT_TABLE';
INSERT INTO OUTPUT_TABLE
(FIRST_NAME ,LAST_NAME,HID ,EFF_DT,CID,PLAN, FLAG)
SELECT
TEMP1.FIRST_NAME,
TEMP1.LAST_NAME,
TEMP1.HID,
TEMP1.EFF_DT,
TEMP1.CID,
TEMP1.PLAN,
NVL((SELECT 'Y'
FROM FADMIN.MEMI_TABLE@TO_FUT MEMI
WHERE MEMI.MEME_CK = TEMP1.MEME_CK
AND MEMI.TXN_EFF_DT = TEMP1.EFF_DT
AND MEMI.PBP = TEMP1.PLAN
AND MEMI.MEMI_TXN_CD IN ('AC','RE')
AND MEMI.MEMI_SEQ_NO = (SELECT MAX (MI.MEMI_SEQ_NO)
FROM FADMIN.MEMI_TABLE@TO_FUT MI
WHERE MI.MEME_CK = MEMI.MEME_CK
AND MI.TXN_EFF_DT = MEMI.TXN_EFF_DT
AND MI.PBP = MEMI.PBP
AND MI.MEMI_TXN_CD IN ('AC','RE')
AND MI.MEMI_INTF_STS = 03 )),'N') AS FLAG
FROM
( SELECT
M1.FIRST_NAME ,
M1.LAST_NAME ,
M1.HID ,
M1.EFF_DT,
M1.CID,
M1.PLAN ,
(SELECT MEME.MEME_CK
FROM FADMIN.MEME_TABLE@TO_FUT MEME, FADMIN.GRGR_TABLE@TO_FUT GRGR
WHERE MEME.M_HIN = M1.HID
AND MEME.GRGR_CK = GRGR.GRGR_CK
AND GRGR.GRGR_ID = M1.GRGR_ID
)AS MEME_CK
FROM FADMIN.METR_TABLE@TO_FUT M1,
( SELECT M3.HID, M3.EFF_DT FROM FADMIN.METR_TABLE@TO_FUT M3
WHERE M3.TYPE IN ('60','61')
AND M3.REPLY IN ('117','118')
AND TRUNC (M3.METR_TRANS_DT) BETWEEN START_DATE AND END_DATE
AND M3.SYIN_INST = (SELECT MAX (M4.SYIN_INST)
FROM FADMIN.METR_TABLE@TO_FUT M4
WHERE M4.HID = M3.HID
AND M4.TYPE IN ('60','61')
AND M4.REPLY IN ('117','118')
AND TRUNC (M4.EFF_DT) = TRUNC (M3.EFF_DT))
) TEMP
WHERE M1.TYPE IN ('60','61')
AND M1.REPLY ='011'
AND TRUNC (M1.METR_TRANS_DT) BETWEEN START_DATE AND END_DATE
AND M1.SYIN_INST = (SELECT MAX (M2.SYIN_INST)
FROM FADMIN.METR_TABLE@TO_FUT M2
WHERE M2.HID = M1.HID
AND M2.TYPE IN ('60','61')
AND M2.REPLY ='011'
AND TRUNC (M2.EFF_DT) = TRUNC (M1.EFF_DT))
AND M1.HID = TEMP.HID (+)
AND M1.EFF_DT = TEMP.EFF_DT (+)
AND TEMP.HID IS NULL
UNION
SELECT
M1.FIRST_NAME ,
M1.LAST_NAME ,
M1.HID ,
M1.EFF_DT,
M1.CID,
M1.PLAN ,
(SELECT MEME.MEME_CK
FROM FADMIN.MEME_TABLE@TO_FUT MEME, FADMIN.GRGR_TABLE@TO_FUT GRGR
WHERE MEME.M_HIN = M1.HID
AND MEME.GRGR_CK = GRGR.GRGR_CK
AND GRGR.GRGR_ID = M1.GRGR_ID
)AS MEME_CK
FROM FADMIN.METR_TABLE@TO_FUT M1
WHERE M1.TYPE IN ('60','61')
AND M1.REPLY IN ('016', '017', '022', '023')
AND TRUNC (M1.METR_TRANS_DT) BETWEEN START_DATE AND END_DATE
AND M1.SYIN_INST = (SELECT MAX (M2.SYIN_INST)
FROM FADMIN.METR_TABLE@TO_FUT M2
WHERE M2.HID = M1.HID
AND M2.TYPE IN ('60','61')
AND M2.REPLY IN ('016', '017', '022', '023')
AND TRUNC (M2.EFF_DT) = TRUNC (M1.EFF_DT))
)TEMP1 ;
END;
The error:
ORA-00918: column ambiguously defined
ORA-02063: preceding line from TO_FUT
ORA-06512: at "PROC_ENR_ACC", line 5
ORA-06512: at line 5Okay
Here's the code formatted
CREATE OR REPLACE PROCEDURE PROC_ENR_ACC (START_DATE DATE, END_DATE DATE)
AS
BEGIN
EXECUTE IMMEDIATE 'TRUNCATE TABLE OUTPUT_TABLE';
INSERT INTO OUTPUT_TABLE (FIRST_NAME,
LAST_NAME,
HID,
EFF_DT,
CID,
PLAN,
FLAG)
SELECT TEMP1.FIRST_NAME,
TEMP1.LAST_NAME,
TEMP1.HID,
TEMP1.EFF_DT,
TEMP1.CID,
TEMP1.PLAN,
NVL (
(SELECT 'Y'
FROM MEMI_TABLE MEMI
WHERE MEMI.MEME_CK = TEMP1.MEME_CK
AND MEMI.TXN_EFF_DT = TEMP1.EFF_DT
AND MEMI.PBP = TEMP1.PLAN
AND MEMI.MEMI_TXN_CD IN ('AC', 'RE')
AND MEMI.MEMI_SEQ_NO = (SELECT MAX (MI.MEMI_SEQ_NO)
FROM MEMI_TABLE MI
WHERE MI.MEME_CK = MEMI.MEME_CK
AND MI.TXN_EFF_DT = MEMI.TXN_EFF_DT
AND MI.PBP = MEMI.PBP
AND MI.MEMI_TXN_CD IN ('AC', 'RE')
AND MI.MEMI_INTF_STS = 03)
),'N') FLAG
FROM (SELECT M1.FIRST_NAME,
M1.LAST_NAME,
M1.HID,
M1.EFF_DT,
M1.CID,
M1.PLAN,
(SELECT MEME.MEME_CK
FROM MEME_TABLE MEME, GRGR_TABLE GRGR
WHERE MEME.M_HIN = M1.HID
AND MEME.GRGR_CK = GRGR.GRGR_CK
AND GRGR.GRGR_ID = M1.GRGR_ID) MEME_CK
FROM METR_TABLE M1,
(SELECT M3.HID, M3.EFF_DT
FROM METR_TABLE M3
WHERE M3.TYPE IN ('60', '61')
AND M3.REPLY IN ('117', '118')
AND TRUNC (M3.METR_TRANS_DT) BETWEEN START_DATE AND END_DATE
AND M3.SYIN_INST = (SELECT MAX (M4.SYIN_INST)
FROM METR_TABLE M4
WHERE M4.HID = M3.HID
AND M4.TYPE IN ('60', '61')
AND M4.REPLY IN ('117', '118')
AND TRUNC (M4.EFF_DT) = TRUNC (M3.EFF_DT))
) TEMP
WHERE M1.TYPE IN ('60', '61') AND M1.REPLY = '011'
AND TRUNC (M1.METR_TRANS_DT) BETWEEN START_DATE AND END_DATE
AND M1.SYIN_INST = (SELECT MAX (M2.SYIN_INST)
FROM METR_TABLE M2
WHERE M2.HID = M1.HID
AND M2.TYPE IN ('60', '61')
AND M2.REPLY = '011'
AND TRUNC (M2.EFF_DT) = TRUNC (M1.EFF_DT))
AND M1.HID = TEMP.HID(+)
AND M1.EFF_DT = TEMP.EFF_DT(+)
AND TEMP.HID IS NULL
UNION
SELECT M1.FIRST_NAME,
M1.LAST_NAME,
M1.HID,
M1.EFF_DT,
M1.CID,
M1.PLAN,
(SELECT MEME.MEME_CK
FROM MEME_TABLE MEME, GRGR_TABLE GRGR
WHERE MEME.M_HIN = M1.HID
AND MEME.GRGR_CK = GRGR.GRGR_CK
AND GRGR.GRGR_ID = M1.GRGR_ID) MEME_CK
FROM METR_TABLE M1
WHERE M1.TYPE IN ('60', '61')
AND M1.REPLY IN ('016', '017', '022', '023')
AND TRUNC (M1.METR_TRANS_DT) BETWEEN START_DATE AND END_DATE
AND M1.SYIN_INST = (SELECT MAX (M2.SYIN_INST)
FROM METR_TABLE M2
WHERE M2.HID = M1.HID
AND M2.TYPE IN ('60', '61')
AND M2.REPLY IN ('016', '017', '022', '023')
AND TRUNC (M2.EFF_DT) = TRUNC (M1.EFF_DT))
) TEMP1;
END;
/When posting code if you put {noformat}{noformat} (with the curly brackets and in lower case) above and below it you can preserve formatting.
To your original question...
Is the link name supposed to be variable?
What do you mean by 'hard coding' the values, do you mean in the procedure itself so you'd actually PROC_ENR_ACC();?
What happens when you run this?DECLARE
start_date DATE;
end_date DATE;
BEGIN
start_date := '01-JAN-2009';
end_date := '01-FEB-2009';
PROC_ENR_ACC(start_date, end_date);
END;
I need to know exactly how to recreate your error...
Cheers
Ben
http://www.munkyben.wordpress.com
+Don't forget to mark replies helpful or correct+ ;) -
Authorization Scheme vs. "Authorization Scheme"
Hi,
I've just completed building four Authorization Schemes for my app; is_admin, is_pm, is_user, is_read mapping to my concept of roles for admin, pm, user and read-only. Pretty self-explanatory and I set them up across my app so they could perform their various duties. For example, I have a page that all four roles can view, but each role sees a subset of the entire page. Most of what gets hidden as you go down the line of authorization are buttons to add/edit/delete content and some small regions of specialized content.
Each scheme calls a function which in turns make a query to get the appropriate result. So for my main page there are 24 checks to see if the current user has the rights to view certain things. 24? Wow!
So I started thinking (and searching this blog) to find a better way to do that. I didn't really come up with a "better way" but I did have an idea that I'm sure isn't new. I create four sessions variables and set their values ahead of time using the Authorization Scheme code and I'm good to go! Right?
So, some questions:
1. Do I create these variables as Items on a page 0?
2. Are these region level items or page level items?
3. Is my original way of using the Authorization Schemes the right way to do what I'm doing?
Thanks in advance for any advice here!
Cheers,
JonJon,
I assume you have a 'employee' table which has columns
username varchar2(50);
emp_role varchar2(1);
Take emp_role as say,'A' for admin,'M' for pm,'U' for user etc...So each user will have a role associated to him.
So you can define the authorization schemes in the application's shared components as
AUTH_PM ->scheme type :Exists sql query ->Evaluation point ->once per page view
select 1 from employee where username = lower(:app_user) and emp_role ='M'
AUTH_ADMIN->scheme type :Exists sql query ->Evaluation point ->once per page view
select 1 from employee where username = lower(:app_user) and emp_role ='A'
AUTH_AD_PM->scheme type :Exists sql query ->Evaluation point ->once per page view
select 1 from employee where username = lower(:app_user) and emp_role in ('A','M) ......etc for all the combinations you are looking for.
Now,AUTH_PM on "delete" button will allow only the users with pm roles only to view the delete button.
Similarly,AUTH_AD_PM on a region will make the region visible to the users with pm and admin roles only.
Thanks,
Anandi -
No Authorization error in executing a planning sequence
Hi,
We are using BI 7.0 Integrated Planning.
We have implemented Mark Bernaud's file upload solution. We have used a planning sequence that uploads the file and stores it in a cube. Using it, we are able to upload files without any problem when executing with a SAP User Id which has all the authorizations (the user id has SAP_ALL specified in its list of profiles). Now, we have a requirement where we need to execute the file upload using a user id which has limited authorizations. When we are trying to execute the file upload with the userid that has limited authorizations, we are getting the following authorization error.
'You are not authorized to execute sequence PL_SEQ_FL_UPLOAD'
where PL_SEQ_FL_UPLOAD is the name of planning sequence we are using. We have also included the authorization variable in the filters being used as suggested in one of the blogs but this didn't help.
Could anyone please let us know the authorization objects to be added to the user id to enable access to this file upload.
Many Thanks,
Narendra.Thank you very much Diogo,
The objects you suggested were already there. We have successfully traced the error by switching on the trace using ST01. We found the reason for the error to be that display authorization is not provided for S_RS_PLSQ whereas execute authorization is already present for that.
Once again thanks Diogo.
Many Thanks,
Narendra -
ABAP runtime error while executing T.code : PC00_M40_CALC
Hi,
I have applied SAP note 1568264 - Budget Changes 2011 as released by
SAP and i also applied the pre-requiste SAP notes mentioned in the
above SAP note
1) SAP Note 1558475- Amendments to IT calculation notified under
circular:08/2010.
2) SAP Note 1572614- Tax calculations inconsistent for emp. without a
vaild PAN.
3) SAP Note 1575366- HINCALC0:Tax calculation inconsistent in case of
invalid PAN.
After applying the SAP notes, when i am trying to execute the T.Code :
PC00_M40_CALC, i am getting an "Abap runtime error"
" Error in the ABAP Application Program
The current ABAP program "????????????????????????????????????????" had to be
terminated because it has
come across a statement that unfortunately cannot be executed.
The following syntax error occurred in program "HINCALC0 " in include "PCTAXIN0
" in
line 905:
""ENDUZ-" expected, not "EDU_""
The include has been created and last changed by:
Created by: "SAP "
Last changed by: "S2K_BASIS "
Error in the ABAP Application Program
The current ABAP program "????????????????????????????????????????" had to be
terminated because it has
come across a statement that unfortunately cannot be executed. "
Kindly suggest me what has to be done on priority basis.
Regards
VishThe dump error is generally encountered if your system is at a lower Support Pack level. For implementing Note 1568264 (Budget Changes 2011), you need to be at the below mentioned pre-requisite level corresponding to your Release:
Prerequisites:
Release Support Package
604 HRSP29
600 HRSP63
500 HRSP80
470 HRSPB4
46C HRSPG9
The correct sequence to implement the Notes is:
SAP Note 1558475- Amendments to IT calculation notified under
circular:08/2010.
SAP Note 1572614- Tax calculations inconsistent for emp. without a
vaild PAN.
SAP Note 1575366- HINCALC0:Tax calculation inconsistent in case of
invalid PAN.
SAP Note 1568264- Budget Changes 2011
This should solve the issue unless there is some problem while implementing the Notes.
Regards,
Nishtha -
Runtime error while executing t-code NWP1
Hi!
One of our users is getting the runtime error CONVT_NO_NUMBER when she tries to execute the t-code NWP1. This is only with this user whereas her colleagues are able to execute it without any issues. Her decimal notation value in her UMR is specified as 1234,567.89, I changed it to other settings but still no luck. Does it have anything to do with her user parameters because this issue is only for this one user. Please help and thank you very much in advance
Regards,
AjDid you compare her user with another one that is working properly?....
Does it have anything to do with her user parameters because this issue is only for this one user
Most likely, that's way I suggest to compare the user... also you can try recreating the user to see if theres something wrong with her user master record.
Regards
Juan
Maybe you are looking for
-
Making buttons rollovers and hyperlinks work in an interactive PDF!
Hello! I'm actually real life tearing my hair out here, I wonder if anyone can help?? I'm desperately desperately trying to make a simple document, that has a few menus where text will link to certain pages, and that has a few links to websites via h
-
Error in Dashboard using XML connection
Hi Experts, I have developed one Dashboard using XML connection but getting bellow attached error can any one guide me how to solve it. I know that error is related to cross domain.xml please explain the what is cross domain.xml and guide me to solv
-
Inserting text after a picture
hi I hve inserted a picture fro my camera role into pages, i now with to continue on with text however it will not let me type, when pressing the screen for the bar i get a paste option, i have already pasted the picture and dont need to paste it aga
-
Flash Builder Upgrade Question
Probably a stupid question, but if you have Flex 3 Standard, what are the upgrade choices? -FB4 Standard Upgrade (No ColdFusion Builder included) $99 -ColdFusion Builder 1 (+FB4 Standard free) $299 -FB4 Premium Upgrade (includes ColdFusion Builder 1?
-
How do you fix a white screen on a ipod touch
how do you fix a white screen on a ipod touch