PLSQL BLOCK TO RUN A TYPE PROCEDURE
I have created a type called bank_account which has many member functions and procedures to open ,close,deposit and withdraw.I have created a type body where these member functions are defined.i have created a table based on this type.
Now my problem is that the plsql block that i have written to call the member function open gives the following error:
method dispatch on NULL SELF argument is disallowed
the plsql block is as given below:
SQL> run
1 declare
2 amount real;
3 a bank_account(this is the type);
4 begin
5 amount:=&amount;
6 a.open(amount);
7 dbms_output.put_line('account opened');
8* end;
Enter value for amount: 5
old 5: amount:=&amount;
new 5: amount:=5;
declare
ERROR at line 1:
ORA-30625: method dispatch on NULL SELF argument is disallowed
ORA-06512: at line 6
please help me to solve my problem
null
I have created a type called bank_account which has many member functions and procedures to open ,close,deposit and withdraw.I have created a type body where these member functions are defined.i have created a table based on this type.
Now my problem is that the plsql block that i have written to call the member function open gives the following error:
method dispatch on NULL SELF argument is disallowed
the plsql block is as given below:
SQL> run
1 declare
2 amount real;
3 a bank_account(this is the type);
4 begin
5 amount:=&amount;
6 a.open(amount);
7 dbms_output.put_line('account opened');
8* end;
Enter value for amount: 5
old 5: amount:=&amount;
new 5: amount:=5;
declare
ERROR at line 1:
ORA-30625: method dispatch on NULL SELF argument is disallowed
ORA-06512: at line 6
please help me to solve my problem
null
Similar Messages
-
Need to write a plsql block for calling another procedure.
Hi Guys,
I have a requirement to write a plsql block and to call another procedure which is having 5 parameters (each parameter having multiple values). Calling procedure generates one SQL query and it needs to be generated all combinations and print in another table.
I need to pass multiple values for first three parameters from my PLSQL block and run.
call sample proc:
procedure(
param1 varchar2,
param2 p_varchar2,
param3 p_varchar2,
param4 in varchar2,
param5 in number
is
begin
ls_sql_query := 'with client_query as (select * from table)';
end;
Thanks in advance!
Rgds,
LRKThis article is on exactly your subject. It is worth a careful read.
Ask Tom: On Popularity and Natural Selection
I paraphrase: "Always code a reference to every possible bind variable but do so in such a way that the optimizer removes the bind variable for us if we aren't going to actually use it in that particular execution of the SQL statement."
P.S. This is the same answer I gave when you asked the same question earlier. -
Using Execute Immediate in PLSQL block Vs Stand alone procedure
I am facing very unusual ( atleast unusual to me ) with usage of "Execute Immediate" statement.
I have a table dynamic_sql with one column plsql_block as VARCHAR2(4000);
I have stored some PLSQL blocks ('DECLARE ..... BEGIN.... END.... ) in this column .
Now I want to execute these PLSQL blocks one after other depending on certain conditions .
In order to archive this I wrote a PLSQL block as below
DECLARE
Cursor c1 is
select plsql_block from dynamic_sql
begin
for irec in c1
loop
<<< Condition >>>
begin
execute_immediate(irec.plsql_block);
exception
when others then
raise_application_error(-20001,'error ' ||irec.plsql_block||' '||sqlerrm);
end loop ;
end ;
With above PLSQL block , "execute immediate" is executing PLSQL block successfully without any error
But When I converted above PLSQL block into standalone procedure as shown below , I am getting error .
CREATE OR REPLACE procedure test AS
Cursor c1 is
select plsql_block from dynamic_sql
begin
for irec in c1
loop
<<< Condition >>>
begin
execute_immediate(irec.plsql_block);
exception
when others then
raise_application_error(-20001,'error ' ||irec.plsql_block||' '||sqlerrm);
end loop ;
end ;
BEGIN
test;
end ;
It is showing the value of irec.plsql_block but not showing sqlerrm...
I found this is very unusual as I am able to execute "execute immediate" statement with PLSQL block but not with similar procedure .
can anybody explain me why this is happening?
Thanks in Advance
AmitHello,
It doesn't make any sense to add SQLERRM for user defined exception, unless you want to raise application error for already defined error (e.g NOT_DATA_FOUND, ..)
Check following piece of code and its output,
CREATE OR REPLACE PROCEDURE myinsert1
AS
v_count NUMBER;
v_sql VARCHAR2 (300);
BEGIN
v_sql :=
'INSERT INTO ENTITY_EMPLOYEE VALUES(0,''TIM'',''LASTNAME'',10000)';
BEGIN
EXECUTE IMMEDIATE v_sql;
COMMIT;
EXCEPTION
WHEN OTHERS
THEN
DBMS_OUTPUT.PUT_LINE (SUBSTR (SQLERRM, 1, 300));
RAISE_APPLICATION_ERROR (-20002, 'My Error ' || SQLERRM, TRUE);
RAISE;
END;
END;
Output._
ORA-20002: My Error ORA-00001: unique constraint (ENTITY_EMPLOYEE_PK) violated
ORA-06512: at "MYINSERT1", line 21
ORA-00001: unique constraint (ENTITY_EMPLOYEE_PK) violated
ORA-06512: at line 2
Regrds -
Query for records on a block with Query Data Source Type : Procedure
Hi All,
The veriosn of form I'm using is:
Forms [32 Bit] Version 6.0.8.23.2
I have a block based on a procedure.
But when I enetr-query and search for records specific to ceratin criteria even then the result of the Query is all records.
Is Query not allowed on a block with Query Data Source Type : Procedure.
Hope my question is clear.
Thanks in advance.
Regards
ArifWhen you use a table based block, forms can construct any select with any where clause based on the given inputs. Using a procedure based block, forms cannot "know" which in or out parameter of the procedure corresponds to which item. Even if Forms could pass the value of an item to an argument automagically, the procedure would have to "do something" with the argument, and you´d have to code it.
So, any item that should be used in the where-clause must be mapped to an argument.
Perhaps it would be easier to use a table based block querying a view? For DDL, you could use an instead-of-trigger on the view.
Regards,
Gerd -
Am facing this error sqlcode :-6502 while running sql code in plsql block
Am facing this error sqlcode :-6502 while running sql code in plsql block.
am using query :
SELECT SUBSTR('123456DE789KL|987654321|B',1,INSTR('123456DE789KL|987654321|B','|')-1) FROM DUAL;
CAN any body tell me why.BD_Fayez wrote:
I've tried the following, but don't get any error.As I mentioned, most likely variable is too short:
SQL> declare
2 strSub varchar2(2);
3 begin
4 SELECT SUBSTR('123456DE789KL|987654321|B',1,INSTR('123456DE789KL|987654321|B','|')-1) into strSub FROM DUAL;
5 dbms_output.put_line(strSub);
6 end;
7 /
declare
ERROR at line 1:
ORA-06502: PL/SQL: numeric or value error: character string buffer too small
ORA-06512: at line 4
SQL> SY. -
Query data source type = procedure or from clause
1)I have a form where a block is based on a from clause. In the source name I entered a simple sql statement.
Isn't the items suppose to show without any other action or
WHAT ELSE DO I NEED TO DO IN ORDER TO SEE THE BLOCK ITEMS EQUIVALENT TO THE COLUMNS IN THE QUERY?
2) I have a form where a block is based on a procedure.
First I created a package in a program unit with the procedures query_procedure, insert_procedure, update_procedure, delete_procedure and lock_procedure.
Then I set the query data source name to the package query_procedure. The columns and arguments were automatically filled by Forms - they are fine as well.
Forms automatically created the block triggers insert-procedure,delete-procedure, update-procedure and lock-procedure.
Everything seems to be fine but when I run the form and execute the query I get frm 40505 - unable to perform query.
What am i doing wrong?
This is the package:
PACKAGE pkgdeptemp IS
type dept_emp is record (
empno number(4),
ename varchar2(10),
job varchar2(9),
hiredate date,
sal number(7,2),
deptno number(2),
dname varchar2(14));
success constant number :=0;
type dept_emp_ref is ref cursor return dept_emp;
type dept_emp_tab is table of dept_emp index by binary_integer;
procedure query_procedure (resultset in out dept_emp_ref, p_empno in number);
procedure lock_procedure (dmlset in out dept_emp_tab);
procedure insert_procedure (dmlset in out dept_emp_tab);
procedure update_procedure (dmlset in out dept_emp_tab);
procedure delete_procedure (dmlset in out dept_emp_tab);
END;
PACKAGE BODY pkgdeptemp IS
function get_success return number is
begin
return(success);
end;
procedure query_procedure (resultset in out dept_emp_ref, p_empno in number) is
begin
open resultset for
select e.empno, e.ename, e.job, e.hiredate, e.sal, e.deptno, d.dname
from emp e, dept d
where e.deptno = d.deptno
and e.empno = nvl(p_empno, e.empno);
end query_procedure;
procedure lock_procedure(dmlset in out dept_emp_tab) is
tempout number(4);
begin
for i in 1..dmlset.count loop
select empno
into tempout
from emp
where empno = dmlset(i).empno
for update;
end loop;
end lock_procedure;
procedure insert_procedure (dmlset in out dept_emp_tab) is
cursor c_dept (i binary_integer) is
select deptno
from dept
where deptno = dmlset(i).deptno;
tempout number(4);
begin
for i in 1..dmlset.count loop
open c_dept(i);
fetch c_dept into tempout;
if c_dept%notfound then
insert into dept(deptno,dname)
values(dmlset(i).deptno, dmlset(i).dname);
end if;
close c_dept;
insert into emp (empno,ename,job,hiredate,sal,deptno)
values (dmlset(i).empno, dmlset(i).ename, dmlset(i).job, dmlset(i).hiredate, dmlset(i).sal, dmlset(i).deptno);
end loop;
end insert_procedure;
procedure update_procedure (dmlset in out dept_emp_tab) is
cursor c_dept (i binary_integer) is
select deptno
from dept
where deptno = dmlset(i).deptno;
tempout number(4);
begin
for i in 1..dmlset.count loop
open c_dept(i);
fetch c_dept into tempout;
if c_dept%notfound then
insert into dept(deptno,dname)
values(dmlset(i).deptno, dmlset(i).dname);
else
update dept
set deptno=dmlset(i).deptno,
dname=dmlset(i).dname;
end if;
close c_dept;
update emp
set empno=dmlset(i).empno,
ename=dmlset(i).ename,
job=dmlset(i).job,
hiredate=dmlset(i).hiredate,
sal=dmlset(i).sal,
deptno=dmlset(i).deptno;
end loop;
end update_procedure;
procedure delete_procedure (dmlset in out dept_emp_tab) is
begin
for i in 1..dmlset.count loop
delete from emp where empno = dmlset(i).empno;
end loop;
end delete_procedure;
END;for ur q1:
create the text items manually in the layout editor or in the obj navigator then specify there properties manually in the the pallette.
database item = yes
column name = field name in ur select statement
for q2:
try running the form again and press F8 then if an error occur press F1 or shift F1 to show the error in ur code.
i suspect u forgot to specify a value for the in parameter the reason why u get an error that is specify the actual parameter for ur in argument then press F8.
enjoy! -
Unable to insert row in object table from plsql block
I have table called test based on an object type. When I issue an insert statement from sqlplus, the row is inserted. The exact same sql statement in a plsql block gives the error below. Any ideas? (it is not a constraint problem).
SQL> insert into test values( 3,2,1,1,'asp',1,'mach' );
1 row created.
SQL> begin
2 insert into test values( 3,2,1,1,'asp',1,'mach' );
3 end;
4 /
insert into test values( 3,2,1,1,'asp',1,'mach' );
ERROR at line 2:
ORA-06550: line 2, column 16:
PL/SQL: ORA-06552: PL/SQL: Compilation unit analysis terminated
ORA-06553: PLS-302: component 'DOCUMENT' must be declared
ORA-06550: line 2, column 4:
PL/SQL: SQL Statement ignored
(ddl)
CREATE OR REPLACE type document as object
DOC_ID NUMBER (38),
BATCH_ID NUMBER (38),
STATE NUMBER (2),
TRANSIENT NUMBER (2),
ASP VARCHAR2 (20),
USER_ID NUMBER (6),
MACHINE VARCHAR2 (30),
MEMBER PROCEDURE setState,
MEMBER function getState RETURN NUMBER
) not final;
create table test of document;Hi Adam
You need to instantiate your object type in your insert statement(while doing through PL/SQL block), so try like this
Insert into test values(document(1,2,'CO',55,'xyz','kkk','PENTIUM'));
The reason you were successful through SQLPLUS was that, SQLPLUS automatically instantiate the values into object type.
Qurashi -
Dynamic sql and block based on a stored procedure
Hi!
I'm triying to generate a block based on a stored procedure. I want the stored procedure to execute a dynamic sql, but I'm having getting the error "PLS-00455 cursor 'AULOCASLATE' cannot be used in dynamic SQL OPEN statement".
I have the following code:
CREATE OR REPLACE package pkg_f0015 is
type rClieInstSlate is record
(clie_id CMS_CLIENTS.ID%type
,client_nm varchar2(1000)
,cs_no CMS_CLIENTS.CS_NO%type
,dob CMS_CLIENT_NAMES.BIRTH_DT%type);
type tClieInstSlate is table of rClieInstSlate;
type uClieInstSlate is ref cursor return rClieInstSlate;
procedure prLocationSlateQry(
auLocaSlate in out uClieInstSlate, anCsNo in CMS_CLIENTS.CS_NO%type,
avClieNm in varchar2,
avSearchType in varchar2,
avLotyCd in CMS_LOCATION_TYPES.CD%type);
end pkg_f0015;
CREATE OR REPLACE PACKAGE BODY pkg_cms_f0015 is
procedure PRLocationSlateQry( auLocaSlate in out uClieInstSlate,
anCsNo in CMS_CLIENTS.CS_NO%type,
avClieNm in varchar2,
avSearchType in varchar2,
avLotyCd in CMS_LOCATION_TYPES.CD%type) IS
vSelect varchar2(5000);
vAddCond varchar2(1000);
vSupLevel varchar2(50);
begin
vSelect := 'select clie.ID,'||
' CLIENT_NAME,'||
' clie.CS_NO,'||
' clna.BIRTH_DT dob'
' from CMS_CLIENT_NAMES clna,'||
'CMS_CLIENTS clie'||
' where clna.CLIE_ID = clie.ID';
if avSearchType= 'C' then
vAddCond := ' and clie.CS_NO = nvl('||anCsNo||',clie.CS_NO)';
vSelect := vSelect || vAddCond;
open auLocaSlate for vSelect;
end if;
end PRLocationSlateQry;
end;
I wonder if what I want is possibleOK,
Now it works. Previously we had the parameter p_guid declared as RAW, which obviously is not any good. :)
Radovan
Edited by: biciste on Apr 28, 2009 4:57 PM -
Running a Stored Procedure in Oqacle SQL Developer
Hi All,
Could anybody elaborate on the procedure to execute a Stored Procedure in Oracle SQL Developer. I feel we need to configure the output for the DBMS_OUTPUT
Cheers,
Bellon the procedure to execute a Stored Procedure in Oracle SQL Developer.Select the procedure or package spec in the Connections panel. Right click with the mouse. This will bring up a panel with an anonymous block to run the code and property sheets to populate the parameters, etc.
Cheers, APC -
Output parameter in plsql Block fails
Hello. I am testing using an anonymous Plsql block with one in and out parameter. The in parameter work fine but when I add the out, the plsql block fails.
This is my environment on a Windows 7 client attaching to a Solaris server. I am using Powershell 3.0, but it is very similar to #c. I have a .net framework of 4.5.
PS L064217> $GAC = $Env:Oracle_Home + "\" + "ODP.NET\bin\4\Oracle.DataAccess.dll"
PS L064217> [Void] [Reflection.Assembly]::LoadFile($Gac)
PS L064217> [Reflection.Assembly]::LoadFile($Gac)
GAC Version Location
True v4.0.30319 C:\windows\Microsoft.Net\assembly\GAC_64\Oracle.DataAccess\v4.0_4.112.3.0__89b4
SQL*Plus: Release 11.2.0.3.0 Production on Wed Nov 28 19:09:57 2012
Copyright (c) 1982, 2011, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing optionsHere is a sample of my test code:
# Define Plsql Anonymous Block
$Table1 = 'AdvSearch_Statutes'
$Table2 = ($Table1).Substring(0, $Table1.Length-1) + '_Docs'
$Caml_Doc_Id = 'CHP201500010'
$Sql = " DECLARE "
$Sql += " vCamlId VARCHAR2(30) := ':Param1' "
$Sql += " vPath_Tx VARCHAR2(200); "
$Sql += " vDelRows_Nr PLS_INTEGER := 0; "
$Sql += " CURSOR Docs_Cur IS "
$Sql += " SELECT XPath "
$Sql += " FROM $Table2 "
$Sql += " WHERE Caml_Doc_Id = vCamlId; "
$Sql += " BEGIN "
$Sql += " OPEN Docs_Cur; "
$Sql += " LOOP "
$Sql += " FETCH Docs_Cur INTO vPath_Tx; "
$Sql += " EXIT WHEN Docs_Cur%NOTFOUND; "
$Sql += " IF (DBMS_XDB.ExistsResource(vPath_Tx)) "
$Sql += " THEN "
$Sql += " DelRows_Nr := DelRows_Nr + 1; "
$Sql += " DBMS_XDB.DeleteResource(vPath_Tx, DBMS_XDB.DELETE_RECURSIVE_FORCE); "
$Sql += " END IF; "
$Sql += " END LOOP; "
$Sql += " DELETE FROM $Table2 WHERE Caml_Doc_Id = vCamlId; "
$Sql += " vDelRows_Nr := vDelRows_Nr + SQL%ROWCOUNT; "
$Sql += " DELETE FROM $Table1 WHERE Caml_Doc_Id = vCamlId; "
$Sql += " vDelRows_Nr := vDelRows_Nr + SQL%ROWCOUNT; "
$Sql += " SELECT vDelRows_Nr INTO :Param2 FROM Dual; "
$Sql += " EXCEPTION "
$Sql += " WHEN OTHERS THEN ROLLBACK; "
$Sql += " END; "
# Set up the Connection and command objects using the prior defined information. Ensure that
# Bind by name is used.
$Conn = New-Object Oracle.DataAccess.Client.OracleConnection($Connect_Str)
$Cmd = New-Object Oracle.DataAccess.Client.OracleCommand($Sql, $Conn)
$Cmd.BindByName = $True
#Set up the parameters for use with the Sql command.
$Param1 = New-Object Oracle.DataAccess.Client.OracleParameter
$Param2 = New-Object Oracle.DataAccess.Client.OracleParameter
$Param1.DbType = 'AnsiString'
$Param1.OracleDbType = 'Varchar2'
$Param1.Direction = 'Input'
$Param1.ParameterName = ':Param1'
$Param1.Value = $Caml_Doc_Id
$Param2.DbType = 'Int32'
$Param2.OracleDbType = 'Int32'
$Param2.Direction = 'Output'
$Param2.ParameterName = ':Param2'
[Void] $Cmd.Parameters.Add($Param1)
[Void] $Cmd.Parameters.Add($Param2)
# Open connection to database and execute the command
Try
$Conn.Open();
$Result = $Cmd.ExecuteNonQuery();
If ($Param2.Value -Eq $Null) {$Counts = 0}
Else {$Count = ($Param2.Value).ToString()}
Write-Host "Return Code: $Result"
Write-Host "Rows Deleted: $Counts"
Catch [System.Exception]
$Param2
Write-Host $_.Exception.ToString() -ForeGroundColor "Red"
Finally
$Conn.Close();
$Conn.Dispose();
"`nSuccessful end of script"
}I have some output. It all seems to be okay. I am following a book rather closely, but after several attempts changing one thing or another, I still cannot find a way to send an out value. I have commented out the " SELECT vDelRows_Nr INTO :Param2 FROM Dual; " and that is the problem statement. Thank you for your help. The first portion is the plsql being echoed back, then I list out what Param2 is defined at. The last bit is the error returned.
PS L064217> .\Test_Odp_PLsqlBlock.ps1
DECLARE vCamlId VARCHAR2(30) := ':Param1' vPath_Tx VARCHAR2(200); vDelRows_Nr PLS_INTEGER := 0;
CURSOR Docs_Cur IS SELECT XPath FROM AdvSearch_Statute_Docs WHERE Caml_Doc_Id = vCamlId; BEGIN
OPEN Docs_Cur; LOOP FETCH Docs_Cur INTO vPath_Tx; EXIT WHEN Docs_Cur%NOTFOUND; IF (DBMS_XDB.ExistsR
esource(vPath_Tx)) THEN DelRows_Nr := DelRows_Nr + 1; DBMS_XDB.DeleteResource(vPath_Tx, DBMS_XDB.DEL
ETE_RECURSIVE_FORCE); END IF; END LOOP; DELETE FROM AdvSearch_Statute_Docs WHERE Caml_Doc_Id = vCamlId; v
DelRows_Nr := vDelRows_Nr + SQL%ROWCOUNT; DELETE FROM AdvSearch_Statutes WHERE Caml_Doc_Id = vCamlId; vDelRows_Nr
:= vDelRows_Nr + SQL%ROWCOUNT; SELECT vDelRows_Nr INTO :Param2 FROM Dual; EXCEPTION WHEN OTHERS THEN ROLLBACK;
END;
DbType : Int32
SourceColumnNullMapping : False
Direction : Output
IsNullable : False
Offset : 0
OracleDbTypeEx : Int32
OracleDbType : Int32
ParameterName : :Param2
Precision : 0
Scale : 0
Size : 0
ArrayBindSize :
SourceColumn :
SourceVersion : Current
Status : Success
ArrayBindStatus :
CollectionType : None
Value :
UdtTypeName :
Oracle.DataAccess.Client.OracleException ORA-01036: illegal variable name/number at Oracle.DataAccess.Client.OracleEx
ception.HandleErrorHelper(Int32 errCode, OracleConnection conn, IntPtr opsErrCtx, OpoSqlValCtx* pOpoSqlValCtx, Object sr
c, String procedure, Boolean bCheck)
at Oracle.DataAccess.Client.OracleCommand.ExecuteNonQuery()
at CallSite.Target(Closure , CallSite , Object )Edited by: CRoberts on Nov 28, 2012 7:30 PMAs test
use NUMBER instead of PLS_INTEGER in PL/SQL
and
use Decimal instead of Int32 for Oracle parameter datatype -
Hi
Needs some help, urgently.
i have to call/execute a plsql block in java program.
block is similar to this
declare
CURSOR l_csr IS
select empname, empid, empdate from emp
order by empid;
l_empid NUMBER;
l_empdate DATE;
l_empname varchar2(30);
o_dateProfileId NUMBER;
o_dayofweekprofileid NUMBER;
begin
open l_csr;
loop
FETCH l_csr INTO l_empid , l_empname , l_empdate;
EXIT WHEN l_csr%NOTFOUND;
DETERMINEEMPPROFILE(l_empdate,o_dateProfileId,o_dayofweekprofileid,l_empid ,FALSE);
IF(o_dateProfileId IS NOT NULL) THEN
SELECT totaljobs INTO l_max1 FROM dateprofile WHERE dateprofileid = o_dateprofileid;
ELSE
SELECT totaljobs INTO l_max1 FROM dayofweekprofile WHERE dayofweekprofileid = o_dayofweekprofileid;
END IF;
END LOOP;
EXCEPTION
WHEN OTHERS THEN DBMS_OUTPUT.PUT_LINE('SQLCODE = ' || SQLCODE);
END;
i need to call this in java program and take the results of l_max1.
can someone provide an example of hot to do this or sample code
appreciate any helpI'm assuming this is for Oracle. Take a look at this article [url=http://www.enterprisedt.com/publications/oracle/result_set.html
]here for an example of how to use java to parse a result set from an Oracle procedure. -
How to set posting block in BIlling Doc type configuration
Hi All,
Can anybody tell me, How to set posting block in BIlling Doc type configuration.I need to do this to seperate billing creation from from FI/CO posting in my company.
We right now run have the batch jobs which run VF06 & VFX3.
Appreciate any input or suggestions.
Regards,
VinayHi
If you want to check the Manual posting blocks you can configure them through FI/CO. Once you have configured the blocks with reasons it will automatically block for the payments.
goto SPRO-> Financial accounting->Account receivable & Payable ->Business Transactions-> Out going Payments-> Manual outgoing Payments-> Check payment block reason.
Cheers -
How to block or restrict document type
Hi friends
How to block or restrict document types .
My Business people will not use document types in featureHi,
The documentation about the authority check within posting is given in the online documentation for the posting ta eg. FB01:
Perhaps you would like to read the documentation from IMG on the authorization:
Financial Accounting > Financial Accounting Global Settings > Document > Document Header > Check Display Authorization for
Document type
Defining Authorizations for Document Types
Use
You can define a special authorization for every document type. To do this, you need to determine what document types in which
form employees are allowed to process. Authorizations are checked for the following activities:
Posting documents
Document display and line item display
Changing documents
Programs that evaluate documents.
The system does not check the authorization for document types that are not assigned an authorization group.
Procedure
In Customizing for Financial Accounting, carry out the activity Maintain Enter an authorization group in the document type. You then assign autho For each document type, you can specify whether users are required to enter.
The same for check of the authorizations of gl accounts.
PLease check in OMR4 and in OBA7 that for the document types the athorizations groups are maintained.
F_BKPF_BLA Accounting Document: Authorization for Document Type
F_BKPF_BES Accounting Document: Account Authorization for G/L Account.
For example:
The transaction FB01 includes the above objects - you can see this in Trx. SU24, also as transaction F-02 is a parameter transaction with the original being FB01 these objects would be valid for F-02 also.
Please also refer to the following NoteS
150496 F_BKPF_BLA: Authorization for document types
198238 FI reporting: Authorization check for documen
I hope this helps to solve the problem.
Regards
Ravinagh Boni -
How to invoke plsql block when press a button
new to htmldb,
let's say i have a form with some items , after i press a button, i want to invoke a plsql block, how can i do that?
Cheers,I have only played a bit with this. I had a region with search criterias and a region based on a procedure. I created a page button on the first region that branched to the same page. When I press the button the page is refreshed and the procedure is re-executed with what ever search criterias the user has keyed in. That is as far as I have come :-)
-
Ssrs and script from was blocked due to mime type mismatch
Hi
I'm trying to add a script to my header on my SSRS report. I've been following this link:
http://blogs.infosupport.com/reporting-services-javascript-injection/
I get error stating:
SEC7112: Script from http//####/HCCReportsServer?/ReportsLibrary/script.js was blocked due to mime type mismatch
My code:
="<a href=""javascript:eval(unescape('function addScript(scriptFile){var head = document.getElementsByTagName(\'HEAD\')[0]; var script = document.createElement(\'script\'); script.setAttribute(\'language\', \'JScript\'); script.setAttribute(\'type\', \'text/Javascript\'); script.setAttribute(\'src\', scriptFile); head.appendChild(script);} addScript(\'http://dc1-sqlrs-d02/HCCReportsServer?/ReportsLibrary/script.js\');'))"">inject</a>"
Please help. This is urgent to get it working for a demo.
ThanksHi Sunette,
Based on my understanding, you come across an SEC7112 error when you inject JavaScript into the Reporting Services.
In your scenario, you should remove the below setting in the web.config file(Location: C:\inetpub\wwwroot\wss\VirtualDirectories\<your port>).
<add name="X-Content-Type-Options" value="nosniff" />
As we tested in our environment(SQL Server 2012,SharePoint 2013,IE 11), we can inject JavaScript successfully. Please refer our test steps and results:
1. Delete “X-Content-Type-Options" with value "nosniff" within the web.config file (Location: C:\inetpub\wwwroot\wss\VirtualDirectories\80).
2. Design the report as below, then deploy the report to the SharePoint site.
3. Create the script.js file with code below, and upload to the SharePoint site.
function test()
alert("The CHANGEME textbox will actually change…");
//var doc = window.frames[1][1].document;
var el = document.getElementsByTagName('span');
for (var nr=0; nr<el.length; nr++)
if (el[nr].innerHTML == "CHANGEME")
el[nr].innerHTML = "I FEEL LIKE A CHANGED TEXTBOX";
4. Run the report. Click the “inject”->”test”, the final results should look like below:
If you have any question, please feel free to ask.
Best regards,
Qiuyun Yu
Qiuyun Yu
TechNet Community Support
Maybe you are looking for
-
How to add games,music,and movies on different computers
Every one in my family got an iPod for Christmas and we are still trying to figure out how to use them.There are three computers under one account and they are all authorized.How do we download the games and movies/tv shows that have been purchased w
-
My ID was changed fraudulently and I want to change it back.
My apple id was changed fraudulently and I got the email stating: Hello, The following information for your Apple ID XXXX was updated on 22/03/2013: Apple ID Email address(es) If these changes were made in error, or if you believe an unauthorised per
-
Implementing CFNA from a TCL script
Hello, I'm trying to create a parallel hunt group (with CFNA) in a TCL script. I can deliver the call to multiple DNs and if a handset is picked up the call is delivered correctly. However, if the call is not answered I want to then send the call to
-
Strange Error when pass variable to PHP
I am passing the following variable from java to a php variable but I am getting an extra character. For example: char c= ' " '; String s1 = "Hello World"; String s2 = c+s1+c;When I pass s2 to a php varibale using URLEncoder.encode(s2) php prints out
-
Guys, Hope you can help me with this. I have scorm package module in Moodle, Everything works except the videos in it. here is the behaviour I'm having: no error display but that screen only, looks like its loading but it isnt at all. any solution on