Step by step debugging pl/sql procedure
How can we debug a pl/sql procedure step by step
We know about this, for a workaround you can try editing jdev-Darwin.conf and adding a line like the following:
# Add our debug classes to the bootclasspath
AddVMOption -Xbootclasspath/a:../../rdbms/jlib/ojdi.jar
In short, ojdi.jar needs to be on the bootclasspath on the mac. I'm not sure how well this will work, but it's one of the changes we're planning for our 10.1.2 release of JDeveloper
Rob
Team JDev
Similar Messages
-
Debugging PL/SQL procedures with JDeveloper ?
Hi,
does anyone know if it is possible to debug PL/SQL procedures and packages with JDeveloper ? I'm using a 9.0.1.2.0 database but JDeveloper returns the error "The target VB_TEST could not be started because the database version does not support debugging." when I try to debug a PL/SQL procedure.
If it is not possible, does anyone know a good alternative ?Oracle Script Debugger is not available anymore at technet.I need to retrive data from PL/SQL stored procedures. I am using the DynamicSQL component (2nd workaround) to retrive data from PL/SQL stored procedures. <br><br>
I am having some problems.<br><br>
This is the code I am running in Fuego Studio 5.5 SP 11 Build #71108:<br><br>
dynamicSQL as Fuego.Sql.DynamicSQL<br>
iterator as Iterator(Any[Any])<br>
sentence as String<br>
implname as String<br><br>
dynamicSQL = Fuego.Sql.DynamicSQL()<br>
implname = "conexionORBPAU"<br>
sentence = "var result REFCURSOR; " + <br>
"exec :result_cursor := pkg_audbpm_bpaasig_indicador.prgetsingle(9999);";<br>
iterator = executeQuery(DynamicSQL, sentence, implname, inParameters : []);<br><br>
And, this is the error:<br><br>
java.sql.SQLException: Falta el parametro IN o OUT en el indice:: 1 <br>
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:112)<br> at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:146)<br>
oracle.jdbc.driver.OraclePreparedStatement.processCompletedBindRow(OraclePreparedStatement.java:1681)<br>
at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3280)<br>
at oracle.jdbc.driver.OraclePreparedStatement.executeQuery(OraclePreparedStatement.java:3329)<br>
at fuego.jdbc.FaultTolerantPreparedStatement.executeQuery(FaultTolerantPreparedStatement.java:579)<br>
at fuegoblock.sql.DynamicSQL.executeQuery(DynamicSQL.java:340)<br>
...<br><br>
This is the code of the PL/SQL in the Oracle DB:<br><br>
CREATE OR REPLACE PACKAGE PKG_AUDBPM_BPAASIG_INDICADOR IS<br>
TYPE cursor_type IS REF CURSOR;<br>
FUNCTION prGetSingle<br>
(<br>
p_ID_ASIG_INDICADOR IN NUMBER<br>
)<br>
RETURN cursor_type;<br><br>
END PKG_AUDBPM_BPAASIG_INDICADOR;<br><br>
is my code OK? Any ideas?<br><br>
Thanks in advance.<br> -
I have a PL/SQL, HTML, JavaScript procedure that is giving me a HTTP 404 error when I press the 'SUBMIT' button. I have tried to trap it in the procedure but am unable.
Does anyone know what parameter(s) need to be turned on in the Apache server to debug the PL/SQL procedure? I have heard that turning on this parameter will only affect the database I'm in and is not global.
It is suppose to show all the variable and whatever else is pertinent.
Thank you,thanks a ton! I'll give this a try. Does the dbs_debug_jdwp.connect_tcp(ip,port) have to be in the called procedure?
-
Debugging PL/SQL procedures
Why cannot execute the PL/SQL procedure on the SQL Script Page?
You're sure that the compile went ok? At least in your post, you're missing a ";"
CREATE OR REPLACE PROCEDURE "CREARATE" (
importo IN NUMBER,
pagoid IN NUMBER,
oidconv IN NUMBER,
anno IN NUMBER
AS
noid NUMBER;
data_scad DATE;
CURSOR scadenza
IS
SELECT TO_DATE ((giorno || '/' || anno), 'DD/MM/YYYY') AS giorno
FROM ratexpag
WHERE (tipopag = pagoid);
BEGIN
SELECT MAX (oid_2)
INTO noid
FROM pagamento_convenzionetable;
IF noid IS NULL THEN
noid := 0;
END IF;
LOCK TABLE pagamento_convenzionetable IN EXCLUSIVE MODE;
OPEN scadenza;
WHILE NOT (scadenza%NOTFOUND)
LOOP
FETCH scadenza
INTO data_scad;
noid := noid + 1;
INSERT INTO pagamento_convenzionetable
(oid_2, anno_contabile, data_scadenza, importo_preventivo
VALUES (noid, anno, data_scad, importo
INSERT INTO convenzione_pagamento_convenzi
(convenzioneoid, pagamento_convenzioneoid
VALUES (oidconv, noid
END LOOP;
-- COMMIT TRANSACTION --
COMMIT;
CLOSE scadenza;
END;
[pre]
C. -
How do I debug pl/sql procedures from a bc4j application
Hi,
I would like to use jdevelopers pl/sql debugging capabilities to debug some code that is executed by triggers in the database, when inserting records through my bc4j client application.
I already found the remote debugging feature of jdeveloper, but that requires setting up a separate debugger listener, and it also requires me to put the following statement in the session:
DBMS_DEBUG_JDWP.CONNECT_TCP ('hostname_or_ip', port_number)
Where and how can I put this line of pl/sql code to make it execute each time I launch the bc4j application?
Or is it possible to use one debugger process (the one that's also using the java breakpoints) to debug both pl/sql and java code?
Greetings,
IvoI have the same problem.
I have a PL/SQL function that returns a number. This function receives 2 parameters. I use StoredProcedureCall plus ValueReadQuery.
Session aSession = SessionManager.getManager().getDefaultSession();
StoredProcedureCall call = new StoredProcedureCall();
call.setProcedureName("CIO_UTILS.COUNT_USER_ROLES_IN_MODULE");
call.addNamedArgument("p_persid");
call.addNamedArgument("p_module");
call.addUnamedOutputArgument("rolesnum", Integer.class);
ValueReadQuery query = new ValueReadQuery();
//query.bindAllParameters();
query.setCall(call);
query.addArgument("p_persid");
query.addArgument("p_module");
Vector parameters = new Vector();
parameters.addElement(persid);
parameters.addElement(theModule);
Integer rolesnum = (Integer) aSession.executeQuery(query,parameters);
aSession.release();
if(rolesnum.intValue()<=0)return false; else return true;
However, I receive the following error:
Exception [TOPLINK-4002] (Oracle TopLink - 10g Release 3 (10.1.3.0.0) (Build 060118)): oracle.toplink.exceptions.DatabaseException
Internal Exception: java.sql.SQLException: ORA-06550: line 1, column 96:
PLS-00312: a positional parameter association may not follow a named association
ORA-06550: line 1, column 7:
PL/SQL: Statement ignored
Error Code: 6550
Call:BEGIN CIO_UTILS.COUNT_USER_ROLES_IN_MODULE(p_persid=>'SANCRA2791', p_module=>'PSL_MONITORING', ?); END;
bind => [=> rolesnum]
If comment the line
"call.addUnamedOutputArgument("rolesnum", Integer.class);"
Toplink is trating it as a procedure, and I also receive an error from PL/SQL.
There should have to be a way of make it to receive the resoult somehow, but I do not know what.
Thanks in advance. -
I am using Toad for Oracle. Is there any way within PL/SQL code to define a section or block of code as code that should only run when you are debugging PL/SQL procedures/functions?
I think the OP wants something more like this (tested in 11g, should work from 10.2 onwards if I remember correctly):
Connected to:
Oracle Database 11g Enterprise Edition Release 11.1.0.6.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL> create or replace procedure procedurewithdebug
2 as
3 begin
4 dbms_output.put_line('Start of procedure');
5
6 $if $$debug $then
7 dbms_output.put_line('Extra code section only called when $$debug is TRUE');
8 $end
9
10 dbms_output.put_line('End of procedure');
11 end procedurewithdebug;
12 /
Procedure created.
SQL> set serverout on
SQL> exec procedurewithdebug
Start of procedure
End of procedure
PL/SQL procedure successfully completed.
SQL> call dbms_preprocessor.print_post_processed_source('PROCEDURE','WILLIAM','PROCEDUREWITHDEBUG');
procedure procedurewithdebug
as
begin
dbms_output.put_line('Start of procedure');
dbms_output.put_line('End of procedure');
end procedurewithdebug;
Call completed.
SQL> alter session set plsql_ccflags = 'debug:true';
Session altered.
SQL> alter procedure procedurewithdebug compile;
Procedure altered.
SQL> exec procedurewithdebug
Start of procedure
Extra code section only called when $$debug is TRUE
End of procedure
PL/SQL procedure successfully completed.
SQL> call dbms_preprocessor.print_post_processed_source('PROCEDURE','WILLIAM','PROCEDUREWITHDEBUG');
procedure procedurewithdebug
as
begin
dbms_output.put_line('Start of procedure');
dbms_output.put_line('Extra code section only called when $$debug is TRUE');
dbms_output.put_line('End of procedure');
end procedurewithdebug;
Call completed.
SQL> alter session set plsql_ccflags = 'debug:false';
Session altered.
SQL>
SQL> alter procedure procedurewithdebug compile;
Procedure altered.
SQL> exec procedurewithdebug
Start of procedure
End of procedure
PL/SQL procedure successfully completed.Note this does not automatically detect whether a procedure is compiled for debug - you have to set a compilation directive explicitly. (There is nothing special about '$$debug' either - I could have used '$$banana'.)
As a variation, you can also use package constants:
SQL> create or replace package environment_settings
2 as
3 debug constant boolean := TRUE;
4 end environment_settings;
5 /
Package created.
SQL> create or replace procedure procedurewithdebug
2 as
3 begin
4 dbms_output.put_line('Start of procedure');
5
6 $if environment_settings.debug $then
7 dbms_output.put_line('Extra code section only called when environment_settings.debug is TRUE');
8 $end
9
10 dbms_output.put_line('End of procedure');
11 end procedurewithdebug;
12 /
Procedure created.
SQL> exec procedurewithdebug
Start of procedure
Extra code section only called when environment_settings.debug is TRUE
End of procedure
PL/SQL procedure successfully completed.
SQL> create or replace package environment_settings
2 as
3 debug constant boolean := FALSE;
4 end environment_settings;
5 /
Package created.
SQL> exec procedurewithdebug
Start of procedure
End of procedure
PL/SQL procedure successfully completed.Note that PL/SQL isn't just skipping the line like an ordinary IF statement, the PL/SQL compiler is actually excluding the section at compile time:
SQL> call dbms_preprocessor.print_post_processed_source('PROCEDURE','WILLIAM','PROCEDUREWITHDEBUG');
procedure procedurewithdebug
as
begin
dbms_output.put_line('Start of procedure');
dbms_output.put_line('End of procedure');
end procedurewithdebug;
Call completed.Edited by: William Robertson on Mar 26, 2009 7:18 AM -
Unable to automatically step into the server. the remote procedure cannot be debugged.
Hi,
I am trying to deploy report using ssis script c# code.I am using the proxy for ReportingService2010 and following code is giving the error.
code:
ReportingService2010 rs = new ReportingService2010();
rs.Credentials = System.Net.CredentialCache.DefaultCredentials;
rs.CreateFolder("MSI Report Demo", "/", null);
Error:
unable to automatically step into the server. the remote procedure cannot be debugged. This usually indicates that debugging has not been enabled on the server.
Please share the idea on it.
Thanks in advance.
-Gautamjust make a trust between to domain and it works .
-
Debug PL/SQL Stored Procedure
I am using JDevloper 10.1.3.4. As I am steppping through a servlet in debug and a call is made to a pl/sql stored procedure is it possible to seamlessly (or otherwise) have the debugger step into that pl/sql procedure and then step back into the servlet when exiting? I can run a pl/sql proc in debug seperately but it would be great if it could be done in line with the servlet call.
thanks a ton! I'll give this a try. Does the dbs_debug_jdwp.connect_tcp(ip,port) have to be in the called procedure?
-
Oracle 10gR2 WebService Call-In & Call-Out via PL/SQL (Step-by-Step Guide)
Hi Everyone,
This guide is for those of you who tried to Call-In and Call-Out WebService via Oracle 10gR2 using PL/SQL but failed a couple of times, re-installed a couple of times and retry, got it to work but don't know what made it work scenarios.
Hope this helps ;-)
Thanks,
Henry Wu
Instructions on how to use Oracle10gR2 Webservice Call-Out feature (Oracle JAX-RPC DII - Dynamic Invocation (DII) APIs)
PREREQUISITE
=================================================================
1. Download Oracle Database 10g Release 2 (10.2.0.1.0) (ZIP, ~655MB)
http://www.oracle.com/technology/software/products/database/oracle10g/htdocs/10201winsoft.html
http://download.oracle.com/otn/nt/oracle10g/10201/10201_database_win32.zip
1.1 Choose Enterprise Edition
2. Download 10.1.3.1 Callout Utility for 10g (R1 +R2) RDBMS (ZIP, ~13MB)
http://download.oracle.com/technology/sample_code/tech/java/jsp/dbws-callout-utility-10131.zip
2.1 Extract to C:\oracle\product\10.2.0\db_1\dbws_callout_utility_10131
3. Download OC4J Standalone - Oracle Containers for J2EE (OC4J) 10g Release 3 (10.1.3.3) (ZIP, ~93MB; Pure Java—runs on all certified platforms)
http://www.oracle.com/technology/software/products/ias/index.html (Download Site)
http://download.oracle.com/otn/java/oc4j/101330/oc4j_extended_101330.zip
3.1 Extract to C:\oracle\product\10.2.0\db_1\oc4j_extended_101330
STEP-BY-STEP PROCEDURES
=================================================================
1. Prepare the database
1.1 Connect to SYS account (or any account that can connect as SYSDBA)
1.2 alter system set shared_pool_size=96M scope=both
1.3 alter system set java_pool_size=80M scope=both
1.4 ALTER USER SCOTT ACCOUNT UNLOCK;
1.5 ALTER USER SCOTT IDENTIFIED BY "tiger";
1.6 ALTER USER SCOTT QUOTA UNLIMITED ON USERS;
1.7 GRANT PUBLIC TO SCOTT;
1.8 GRANT Create Public Synonym TO SCOTT;
2. Load Oracle SOAP client to SCOTT (for Oracle 10g Release 2 Database)
2.1 Commands
2.1.1 Open command prompt (cmd.exe)
2.1.2 loadjava -u scott/tiger -r -v -f -genmissing -s -grant public C:\oracle\product\10.2.0\db_1\oc4j_extended_101330\webservices\lib\soap.jar C:\oracle\product\10.2.0\db_1\oc4j_extended_101330\lib\dms.jar C:\oracle\product\10.2.0\db_1\oc4j_extended_101330\jlib\javax-ssl-1_1.jar C:\oracle\product\10.2.0\db_1\oc4j_extended_101330\j2ee\home\lib\servlet.jar C:\oracle\product\10.2.0\db_1\oc4j_extended_101330\j2ee\home\lib\mail.jar C:\oracle\product\10.2.0\db_1\oc4j_extended_101330\j2ee\home\lib\activation.jar C:\oracle\product\10.2.0\db_1\oc4j_extended_101330\j2ee\home\lib\http_client.jar C:\oracle\product\10.2.0\db_1\oc4j_extended_101330\j2ee\home\lib\ejb.jar
2.1.3 It will take around 3 minutes and you will see "something" like the following when it completes (count may not be exact) :
Classes Loaded: 909
Resources Loaded: 75
Sources Loaded: 0
Published Interfaces: 0
Classes generated: 0
Classes skipped: 0
Synonyms Created: 984
Errors: 0
2.1.3 Close this command prompt
3. Load Oracle JAX-RPC client to SYS (for Oracle 10g Release 2 Database)
3.1 Commands
3.1.1 Open command prompt (cmd.exe)
3.1.2 loadjava -u sys/oracle -r -v -f -genmissing -s -grant public C:\oracle\product\10.2.0\db_1\dbws_callout_utility_10131\sqlj\lib\dbwsclientws.jar C:\oracle\product\10.2.0\db_1\dbws_callout_utility_10131\sqlj\lib\dbwsclientdb102.jar
3.1.2.1 It will take around 15 minutes and you will see "something" like following when it completes (count may not be exact) :
Classes Loaded: 4027
Resources Loaded: 81
Sources Loaded: 0
Published Interfaces: 0
Classes generated: 61
Classes skipped: 0
Synonyms Created: 4108
Errors: 0
3.1.3 Close this command prompt
4. Execute UTL_DBWS packages to SYS (for Oracle 10g Release 2 Database)
4.1 Commands
4.1.1 Connect to SYS account only
4.1.2 Execute the following (in TOAD you should execute them as Script, press the "thunder" button)
4.2.1 @"C:\oracle\product\10.2.0\db_1\dbws_callout_utility_10131\sqlj\lib\utl_dbws_decl.sql"
4.2.2 @"C:\oracle\product\10.2.0\db_1\dbws_callout_utility_10131\sqlj\lib\utl_dbws_body.sql"
4.2.3 CREATE PUBLIC SYNONYM utl_dbws FOR sys.utl_dbws;
5. Call-out a free Web Service using SCOTT
5.1 Commands
5.1.1 Connect to user SCOTT with password of TIGER
5.1.2 Copy and Paste the following "Anonymous Block" (sample #1) and execute it :
5.1.2.1 It sould return "PL/SQL DII client return ===> Redwood City"
declare
service_ utl_dbws.SERVICE;
call_ utl_dbws.CALL;
service_qname utl_dbws.QNAME;
port_qname utl_dbws.QNAME;
operation_qname utl_dbws.QNAME;
string_type_qname utl_dbws.QNAME;
retx ANYDATA;
retx_string VARCHAR2(1000);
retx_double number;
retx_len number;
params utl_dbws.ANYDATA_LIST;
l_input_params utl_dbws.anydata_list;
l_result ANYDATA;
l_namespace VARCHAR2(1000);
begin
-- open internet explorer and navigate to http://webservices.imacination.com/distance/Distance.jws?wsdl
-- search for 'targetNamespace' in the wsdl
l_namespace := 'http://webservices.imacination.com/distance/Distance.jws';
-- search for 'service name' in the wsdl
service_qname := utl_dbws.to_qname(l_namespace, 'DistanceService');
-- this is just the actual wsdl url
service_ := utl_dbws.create_service(HTTPURITYPE('http://webservices.imacination.com/distance/Distance.jws?wsdl'), service_qname);
-- search for 'portType name' in the wsdl
port_qname := utl_dbws.to_qname(l_namespace, 'Distance');
-- search for 'operation name' in the wsdl
-- there will be a lot, we will choose 'getCity'
operation_qname := utl_dbws.to_qname(l_namespace, 'getCity');
-- bind things together
call_ := utl_dbws.create_call(service_, port_qname, operation_qname);
-- default is 'FALSE', so we make it 'TRUE'
utl_dbws.set_property(call_, 'SOAPACTION_USE', 'TRUE');
-- search for 'operation soapAction' under <wsdl:operation name="getCity">
-- it is blank, so we make it ''
utl_dbws.set_property(call_, 'SOAPACTION_URI', '');
-- search for 'encodingstyle' under <wsdl:operation name="getCity">
utl_dbws.set_property(call_, 'ENCODINGSTYLE_URI', 'http://schemas.xmlsoap.org/soap/encoding/');
-- search for 'binding style'
utl_dbws.set_property(call_, 'OPERATION_STYLE', 'rpc');
-- search for 'xmlns:xs' to know the value of the first parameter
-- under <wsdl:message name="getCityResponse"> you will see the line <wsdl:part name="getCityReturn" type="xsd:string" />
-- thus the return type is 'string", removing 'xsd:'
string_type_qname := utl_dbws.to_qname('http://www.w3.org/2001/XMLSchema', 'string');
-- in the line <wsdl:operation name="getCity" parameterOrder="zip">
-- the parameterOrder is 'zip', thus we put in 'zip'
-- the 'ParameterMode.IN' is used to specify that we will be passing an "In Parameter" to the web service
-- the 'ParameterMode.IN' is a constant variable in the sys.utl_dbws package
utl_dbws.add_parameter(call_, 'zip', string_type_qname, 'ParameterMode.IN');
utl_dbws.set_return_type(call_, string_type_qname);
-- supply the In Parameter for the web service
params(0) := ANYDATA.convertvarchar('94065');
-- invoke the web service
retx := utl_dbws.invoke(call_, params);
-- access the returned value and output it to the screen
retx_string := retx.accessvarchar2;
dbms_output.put_line('PL/SQL DII client return ===> ' || retx_string);
-- release the web service call
utl_dbws.release_service(service_);
end;
5.1.3 Copy and Paste the following "Anonymous Block" (sample #2) and execute it :
5.1.3.1 It should return "PL/SQL DII client return ===> twelve thousand three hundred and forty five"
declare
service_ utl_dbws.SERVICE;
call_ utl_dbws.CALL;
service_qname utl_dbws.QNAME;
port_qname utl_dbws.QNAME;
operation_qname utl_dbws.QNAME;
string_type_qname utl_dbws.QNAME;
retx ANYDATA;
retx_string VARCHAR2(1000);
retx_double number;
retx_len number;
params utl_dbws.ANYDATA_LIST;
l_input_params utl_dbws.anydata_list;
l_result ANYDATA;
l_namespace VARCHAR2(1000);
begin
-- open internet explorer and navigate to http://www.dataaccess.com/webservicesserver/numberconversion.wso?WSDL
-- search for 'targetNamespace' in the wsdl
l_namespace := 'http://www.dataaccess.com/webservicesserver/';
-- search for 'service name' in the wsdl
service_qname := utl_dbws.to_qname(l_namespace, 'NumberConversion');
-- this is just the actual wsdl url
service_ := utl_dbws.create_service(HTTPURITYPE('http://www.dataaccess.com/webservicesserver/numberconversion.wso?WSDL'), service_qname);
-- search for 'portType name' in the wsdl
port_qname := utl_dbws.to_qname(l_namespace, 'NumberConversionSoap');
-- search for 'operation name' in the wsdl
-- there will be a lot, we will choose 'NumberToWords'
operation_qname := utl_dbws.to_qname(l_namespace, 'NumberToWords');
-- bind things together
call_ := utl_dbws.create_call(service_, port_qname, operation_qname);
-- default is 'FALSE', so we make it 'TRUE'
utl_dbws.set_property(call_, 'SOAPACTION_USE', 'TRUE');
-- search for 'operation soapAction' under <operation name="NumberToWords">
-- it is blank, so we make it ''
utl_dbws.set_property(call_, 'SOAPACTION_URI', '');
-- search for 'encodingstyle'
-- cannot find xml tag 'encodingstyle', so we just use the following as the generic encoding style
utl_dbws.set_property(call_, 'ENCODINGSTYLE_URI', 'http://schemas.xmlsoap.org/soap/encoding/');
-- search for 'binding style'
-- although 'document' was used, it produced an error, thus we will use 'rpc'
-- this value is generally only 'document' or 'rpc'
utl_dbws.set_property(call_, 'OPERATION_STYLE', 'rpc');
-- search for 'xmlns:xs' to know the value of the first parameter
-- under <xs:element name="NumberToWords"> you will see the line <xs:element name="ubiNum" type="xs:unsignedLong" />
-- thus the return type is 'unsignedlong', removing 'xs:'
-- however, upon testing, using 'unsignedlong' produced an error, while 'string' did not, so we will use 'string'
string_type_qname := utl_dbws.to_qname('http://www.w3.org/2001/XMLSchema', 'string');
-- under <xs:element name="NumberToWords"> you will see the line <xs:element name="ubiNum" type="xs:unsignedLong" />
-- the element name is 'ubiNum', thus we put in 'ubiNum'
-- the 'ParameterMode.IN' is used to specify that we will be passing an "In Parameter" to the web service
-- the 'ParameterMode.IN' is a constant variable in the utl_dbws package
utl_dbws.add_parameter(call_, 'ubiNum', string_type_qname, 'ParameterMode.IN');
utl_dbws.set_return_type(call_, string_type_qname);
-- supply the In Parameter for the web service
params(0) := ANYDATA.convertvarchar('12345');
-- invoke the web service
retx := utl_dbws.invoke(call_, params);
-- access the returned value and output it to the screen
retx_string := retx.accessvarchar2;
dbms_output.put_line('PL/SQL DII client return ===> ' || retx_string);
-- release the web service call
utl_dbws.release_service(service_);
end;
NOTES AND REFERENCES
=================================================================
This detailed step-by-step guide was produced with the following guide http://www.oracle.com/technology/sample_code/tech/java/jsp/callout_users_guide.htm
I could still not load Oracle JAX-RPC client to SCOTT (step 4) as it produces an error. See the following for more details :
http://forums.oracle.com/forums/thread.jspa?threadID=633219&tstart=0
Also, I could not consume some of the other free Web Services out there for reasons I don't know, hope someone can help clarify. See the following for more details :
http://forums.oracle.com/forums/thread.jspa?threadID=630733&tstart=0
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
Instructions on how to use Oracle10gR2 Webservice Call-In feature
PREREQUISITE
=================================================================
1. Download Oracle Database 10g Release 2 (10.2.0.1.0) (ZIP, ~655MB)
http://www.oracle.com/technology/software/products/database/oracle10g/htdocs/10201winsoft.html
http://download.oracle.com/otn/nt/oracle10g/10201/10201_database_win32.zip
1.1 Choose Enterprise Edition
2. Download OC4J Standalone - Oracle Containers for J2EE (OC4J) 10g Release 3 (10.1.3.3) (ZIP, ~93MB; Pure Java—runs on all certified platforms)
http://www.oracle.com/technology/software/products/ias/index.html (Download Site)
http://download.oracle.com/otn/java/oc4j/101330/oc4j_extended_101330.zip
2.1 Extract to C:\oracle\product\10.2.0\db_1\oc4j_extended_101330
STEP-BY-STEP PROCEDURES
=================================================================
1. Connect to SYS account and create user STORE
CREATE USER store IDENTIFIED BY store;
GRANT connect, resource TO store;
2. Connect to Oracle using the user STORE and password STORE
CONNECT store/store;
3. Execute the following objects for this excercise
CREATE SEQUENCE order_sq;
CREATE TABLE product_types (
product_type_id INTEGER
CONSTRAINT product_types_pk PRIMARY KEY,
name VARCHAR2(10) NOT NULL
CREATE TABLE products (
product_id INTEGER
CONSTRAINT products_pk PRIMARY KEY,
product_type_id INTEGER
CONSTRAINT products_fk_product_types
REFERENCES product_types(product_type_id),
name VARCHAR2(30) NOT NULL,
description VARCHAR2(50),
price NUMBER(5, 2)
CREATE TABLE customers (
customer_id INTEGER
CONSTRAINT customers_pk PRIMARY KEY,
first_name VARCHAR2(10) NOT NULL,
last_name VARCHAR2(10) NOT NULL,
dob DATE,
phone VARCHAR2(12)
CREATE TABLE orders (
order_id INTEGER
CONSTRAINT orders_pk PRIMARY KEY,
product_id INTEGER
CONSTRAINT purchases_fk_products
REFERENCES products(product_id),
customer_id INTEGER
CONSTRAINT purchases_fk_customers
REFERENCES customers(customer_id),
quantity INTEGER NOT NULL
INSERT INTO customers (
customer_id, first_name, last_name, dob, phone
) VALUES (
1, 'John', 'Brown', '01-JAN-1965', '800-555-1211'
INSERT INTO product_types (
product_type_id, name
) VALUES (
1, 'Book'
INSERT INTO products (
product_id, product_type_id, name, description, price
) VALUES (
1, 1, 'Modern Science', 'A description of modern science', 19.95
COMMIT;
CREATE OR REPLACE PACKAGE dbfunc AS
FUNCTION place_order (
p_product_id INTEGER,
p_customer_id INTEGER,
p_quantity INTEGER
RETURN VARCHAR2;
END dbfunc;
CREATE OR REPLACE PACKAGE BODY dbfunc AS
FUNCTION place_order (
p_product_id INTEGER,
p_customer_id INTEGER,
p_quantity INTEGER
RETURN VARCHAR2 IS
v_customer_count INTEGER;
v_product_count INTEGER;
v_order_id INTEGER;
BEGIN
-- count the number of products with the
-- supplied p_product_id (should be 1 if the product exists)
SELECT COUNT(*)
INTO v_product_count
FROM products
WHERE product_id = p_product_id;
IF v_product_count = 0 THEN
RETURN 'No such product';
END IF;
-- count the number of customers with the
-- supplied p_customer_id (should be 1)
SELECT COUNT(*)
INTO v_customer_count
FROM customers
WHERE customer_id = p_customer_id;
IF v_customer_count = 0 THEN
RETURN 'No such customer';
END IF;
-- get the next value from orders_sq
SELECT order_sq.nextval
INTO v_order_id
FROM dual;
-- place the order
INSERT INTO orders (
order_id, product_id, customer_id, quantity
) VALUES (
v_order_id, p_product_id, p_customer_id, p_quantity
COMMIT;
RETURN 'Order placed with id of ' || v_order_id;
EXCEPTION
WHEN OTHERS THEN
ROLLBACK;
RETURN 'Order not placed';
END place_order;
END dbfunc;
4. Install and Configure OC4J
4.1 Change Directory
4.1.1 Open command prompt (cmd.exe)
4.1.2 CD C:\oracle\product\10.2.0\db_1\oc4j_extended_101330\bin
4.2 Configure Environment variables (type in command prompt)
4.2.1 set JAVA_HOME=C:\oracle\product\10.2.0\db_1\jdk
4.2.2 set ORACLE_HOME=C:\oracle\product\10.2.0\db_1\oc4j_extended_101330
4.3 Starting OC4J for the first time
4.3.1 oc4j -start
4.3.2 If this is not your first time to "start" oc4j, go to step 4.3.4
4.3.3 Set oc4jadmin password (use the password "oracle" w/o the quotation marks)
08/03/21 17:13:54 Set OC4J administrator's password (password text will not be displayed as it is entered)
Enter password:
Confirm password:
Confirm password: The password for OC4J administrator "oc4jadmin" has been set.
08/03/21 17:14:01 The OC4J administrator "oc4jadmin" account is activated.
4.3.4 OC4J has started if you see the message :
08/03/21 17:14:16 Oracle Containers for J2EE 10g (10.1.3.3.0) initialized
4.3.5 Leave this command prompt open
4.4 Configure Data Source
4.4.1 Open a new command prompt via the cmd.exe command
4.4.2 type "hostname" and then press enter
4.4.3 Keep this command prompt open for later use
4.4.4 Open Windows Explorer and navigate to the folder C:\oracle\product\10.2.0\db_1\oc4j_extended_101330\j2ee\home\config
4.4.5 Open the file data-sources.xml
4.4.6 Modify and Save the file so that it will look something like the following :
4.4.6.1 Note that "hpv2710us" is my hostname found in step 4.4.2
4.4.6.2 Note that "ORCLDEV" is the name of my Oracle Instance. (Default installation uses ORCL only)
<connection-pool name="Example Connection Pool">
<connection-factory factory-class="oracle.jdbc.pool.OracleDataSource"
user="store"
password="store"
url="jdbc:oracle:thin:@//hpv2710us:1521/ORCLDEV">
</connection-factory>
</connection-pool>
4.4.7 Close the text editor
4.4.8 Close the Windows Explorer
4.4.9 Close this command prompt (type exit)
5. Publishing a PL/SQL Package as a Database Web Service
5.1 Create the config.xml file
5.1.1 Open Notepad.exe
5.1.2 Copy and Paste the following :
5.1.2.1 Note that "hpv2710us" is my hostname found in step 4.4.2
5.1.2.2 Note that "ORCLDEV" is the name of my Oracle Instance. (Default installation uses ORCL only)
<web-service>
<display-name>PLSQL Web Service</display-name>
<description>PLSQL Sample</description>
<destination-path>./dbfunc.ear</destination-path>
<temporary-directory>/tmp</temporary-directory>
<context>/plsqlsample</context>
<stateless-stored-procedure-java-service>
<jar-generation>
<schema>store/store</schema>
<db-url>jdbc:oracle:thin:@hpv2710us:1521:ORCLDEV</db-url>
<prefix>db.func.place.order</prefix>
<db-pkg-name>dbfunc</db-pkg-name>
</jar-generation>
<uri>/dbfunc</uri>
<database-JNDI-name>jdbc/OracleDS</database-JNDI-name>
</stateless-stored-procedure-java-service>
<wsdl-gen>
<wsdl-dir>wsdl</wsdl-dir>
<option name="force">true</option>
<option name="httpServerURL">http://localhost:8888</option>
</wsdl-gen>
<proxy-gen>
<proxy-dir>proxy</proxy-dir>
<option name="include-source">true</option>
</proxy-gen>
</web-service>
5.1.3 Save file as config.xml in the directory C:\oracle\product\10.2.0\db_1\oc4j_extended_101330\j2ee\home\config
5.1.3.1 Note it should be config.xml and not config.txt
5.1.4 Close the text editor
5.2 Publish dbfunc Oracle Package as a Web Service
5.2.1 Open a new command prompt via the cmd.exe command
5.2.2 CD C:\oracle\product\10.2.0\db_1\oc4j_extended_101330\j2ee\home
5.2.3 mkdir ear
5.2.4 CD ear
5.2.5 set ORACLE_HOME=C:\oracle\product\10.2.0\db_1\oc4j_extended_101330
5.2.6 set CLASSPATH=.;%ORACLE_HOME%\webservices\lib\wsdl.jar;%ORACLE_HOME%\lib\xmlparserv2.jar;%ORACLE_HOME%\soap\lib\soap.jar
5.2.7 java -jar %ORACLE_HOME%\webservices\lib\WebServicesAssembler.jar -config C:\oracle\product\10.2.0\db_1\oc4j_extended_101330\j2ee\home\config\config.xml
Please wait ...
STORE.DBFUNC
5.2.8 java -jar %ORACLE_HOME%\j2ee\home\admin_client.jar deployer:oc4j:localhost:23791 oc4jadmin oracle -deploy -file C:\oracle\product\10.2.0\db_1\oc4j_extended_101330\j2ee\home\ear\dbfunc.ear -deploymentName dbfunc
08/03/21 17:46:23 Notification ==>Application Deployer for dbfunc COMPLETES. Operation time: 296 msecs
5.2.9 java -jar %ORACLE_HOME%\j2ee\home\admin_client.jar deployer:oc4j:localhost:23791 oc4jadmin oracle -bindWebApp -appname dbfunc -webModuleName dbfunc_web
5.2.10 java -jar %ORACLE_HOME%\j2ee\home\admin_client.jar deployer:oc4j:localhost:23791 oc4jadmin oracle -bindAllWebApps -appname dbfunc
5.2.11 Close this command prompt (type exit)
6. Test dbfunc Web Service
6.1 Restart OC4J
6.1.1 Open the command prompt you used to start OC4J in step 4.1.1/4.3.1
6.1.2 In the keyboard, hit Ctrl+C
6.1.2.1 Type "Y" and then hit Enter
08/03/21 18:02:51 Shutting down OC4J...
Terminate batch job (Y/N)? Y
6.1.2.2 Note that the command prompt should still be open
6.1.2.2.1 If you accidentally closed the command prompt just do the following
6.1.2.2.1.1 Do 4.1.1 to 4.2.2 and then proceed to 6.1.3
6.1.3 oc4j -start
Starting OC4J from C:\oracle\product\10.2.0\db_1\oc4j_extended_101330\j2ee\home...
08/03/21 18:07:57 Oracle Containers for J2EE 10g (10.1.3.3.0) initialized
6.1.4 Leave this command prompt open
6.2 Use the Web Service to "Order an Item"
6.2.1 Connect to Oracle using the user STORE and password STORE
6.2.2 select * from orders
6.2.2.1 Zero row should return
6.2.3 Open Internet Explorer
6.2.4 Navigate to http://localhost:8888/plsqlsample/dbfunc
6.2.5 Input the following :
6.2.5.1 param0 value: 1
6.2.5.2 param1 value: 1
6.2.5.3 param2 value: 10
6.2.6 Click the Invoke button
6.2.7 A pop-up window will appear having the following contents :
<?xml version="1.0" encoding="UTF-8" ?>
- <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
- <SOAP-ENV:Body>
- <ns1:placeOrderResponse xmlns:ns1="http://db.func.place.order/dbfunc.wsdl" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<return xsi:type="xsd:string">Order placed with id of 1</return>
</ns1:placeOrderResponse>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
6.2.8 Go back to SQLPLUS or Toad and execute "select * from orders" again
6.2.8.1 There should be one row
ORDER_ID, PRODUCT_ID, CUSTOMER_ID, QUANTITY
1, 1, 1, 10
NOTES AND REFERENCES
=================================================================
This detailed step-by-step guide was produced with the following article by Jason Price http://www.oracle.com/technology/pub/articles/price_10gws.htmlSuccess!!!
I had to grant this permissions:
call dbms_java.grant_permission( 'WS_TEST', 'SYS:java.lang.RuntimePermission', 'getClassLoader', '' );
call dbms_java.grant_permission( 'WS_TEST', 'SYS:java.lang.RuntimePermission', 'accessClassInPackage.sun.util.calendar', '' );
call dbms_java.grant_permission( 'WS_TEST', 'SYS:java.lang.RuntimePermission', 'setFactory', '' )
call dbms_java.grant_permission( 'WS_TEST', 'SYS:java.util.PropertyPermission', 'HTTPClient.socket.idleTimeout', 'write' );
call dbms_java.grant_permission( 'WS_TEST', 'SYS:java.net.SocketPermission', 'localhost', 'resolve' );
call dbms_java.grant_permission( 'WS_TEST', 'SYS:java.net.SocketPermission', '127.0.0.1:8084', 'connect,resolve' );
As I wrote earlier, WS_TEST is my user into which I load JAX-RPC client. Note that, if you load JAX-RPC client into user another than SYS, you have NOT to use -s -grant public option (wassam wrote about this too). Another thing is that I (finally) didn't load OC4J. To consume WebService I use utl_dbws.invoke(call_Handle CALL, request SYS.XMLTYPE) function.
voytec001 -
Step by step procedure for Upgrade to ECC6.0
Hi,
I gained a lot from this forum . Can someone please mail me at
[email protected]
step by step procedure for upgrade .
Will award full points for helpful documents..
With regards,
MrinalSAP defined a roadmap for upgrade.
1) Project Preparation
Analyze the actual situation
Define the objectives
Create the project plan
Carry out organizational preparation for example identify the project team
2)Upgrade Blueprint
The system and components affected
The mapped business processes
The requirements regarding business data
3)Upgrade Realization -- In this phase the solution described in the design phase is implemented in a test environment. This creates a pilot system landscape, in which the processes and all their interfaces can be mapped individually and tested on the functional basis.
4)Final Preparation for Cutover -- Testing, Training, Minimizing upgrade risks, Detailed upgrade planning
5)Production Cutover and Support
The production solution upgrade
Startup of the solutions in the new release
Post processing activities
Solving typical problems during the initial operation phase.
SAP expects at least 2 to 3 months for Upgrade and that again depends on project scope and complexity and various other factors.
STEPS IN TECHNICAL UPGRADE
Basis Team will do the prepare activities. (UNIX, BASIS, DBA).
Developer need to run the Transaction SPDD which provides the details of SAP Standard Dictionary objects that have been modified by the client. Users need to take a decision to keep the changes or revert back to the SAP Standard Structure. More often decision is to keep the change. This is mandatory activity in upgrade and avoids data loses in new system.
After completing SPDD transaction, we need to run SPAU Transaction to get the list of Standard SAP programs that have been modified. This activity can be done in phases even after the upgrade. Generally this will be done in same go so that your testing results are consistent and have more confident in upgrade.
Run SPUMG Transaction for Unicode Conversion in non-Unicode system. SPUM4 in 4.6c.
Then we need to move Z/Y Objects. Need to do Extended programming check, SQL trace, Unit testing, Integration testing, Final testing, Regression Testing, Acceptance Testing etc.,
The main Category of Objects that needs to be Upgraded is
Includes
Function Groups / Function Modules
Programs / Reports
OSS Notes
SAP Repository Objects
SAP Data Dictionary Objects
Domains, Data Elements
Tables, Structures and Views
Module Pools, Sub Routine pools
BDC Programs
Print Programs
SAP Scripts, Screens
User Exits
Also refer to the links -
http://service.sap.com
http://solutionbrowser.erp.sap.fmpmedia.com/
http://help.sap.com/saphelp_nw2004s/helpdata/en/60/d6ba7bceda11d1953a0000e82de14a/content.htm
http://www.id.unizh.ch/dl/sw/sap/upgrade/Master_Guide_Enh_Package_2005_1.pdf
Hope this helps you. -
Can anyone explain me step by step procedure for creating badi?
hi all,,
Can anyone explain me about badi with step by step procedure with an example like trsn code mm01, xd01 etc.
And what is the significance of badi?
regs
hariHi
Business Add-Ins
Business Add-Ins are a new SAP enhancement technique based on ABAP Objects. They can be inserted into the SAP System to accommodate user requirements too specific to be included in the standard delivery. Since specific industries often require special functions, SAP allows you to predefine these points in your software.
As with customer exits (SMOD/CMOD [Page 40]), two different views are available:
In the definition view, an application programmer predefines exit points in a source that allow specific industry sectors, partners, and customers to attach additional software to standard SAP source code without having to modify the original object.
In the implementation view, the users of Business Add-Ins can customize the logic they need or use a standard logic if one is available.
In contrast to customer exits, Business Add-Ins no longer assume a two-system infrastructure (SAP and customers), but instead allow for multiple levels of software development (by SAP, partners, and customers, and as country versions, industry solutions, and the like). Definitions and implementations of Business Add-Ins can be created at each level within such a system infrastructure.
SAP guarantees the upward compatibility of all Business Add-In interfaces. Release upgrades do not affect enhancement calls from within the standard software nor do they affect the validity of call interfaces. You do not have to register Business Add-Ins in SSCR.
The Business Add-In enhancement technique differentiates between enhancements that can only be implemented once and enhancements that can be used actively by any number of customers at the same time.
In addition, Business Add-Ins can be defined according to filter values. This allows you to control add-in implementation and make it dependent on specific criteria (on a specific Country value, for example). All ABAP sources, screens, GUIs, and table interfaces created using this enhancement technique are defined in a manner that allows customers to include their own enhancements in the standard.
A single Business Add-In contains all of the interfaces necessary to implement a specific task. In Release 4.6A, program and menu enhancements can be made with Business Add-Ins. The actual program code is enhanced using ABAP Objects. In order to better understand the programming techniques behind the Business Add-In enhancement concept, SAP recommends reading the section on ABAP Objects
DEFINING THE BADI
1) execute Tcode SE18.
2) Specify a definition Name : ZBADI_SPFLI
3) Press create
4) Choose the attribute tab. Specify short desc for badi.. and specify the type :
multiple use.
5) Choose the interface tab
6) Specify interface name: ZIF_EX_BADI_SPFLI and save.
7) Dbl clk on interface name to start class builder . specify a method name (name,
level, desc).
Method level desc
Linese;ection instance methos some desc
8) place the cursor on the method name desc its parameters to define the interface.
Parameter type refe field desc
I_carrid import spfli-carrid some
I_connid import spefi-connid some
9) save , check and activate adapter class proposed by system is
ZCL_IM_IM_LINESEL is genereated.
IMPLEMENTATION OF BADI DEFINITION
1) EXECUTE tcode se18.choose menuitem create from the implementation menubar.
2) Specify aname for implementation ZIM_LINESEL
3) Specify short desc.
4) Choose interface tab. System proposes a name fo the implementation class.
ZCL_IM_IMLINESEL which is already generarted.
5) Specify short desc for method
6) Dbl clk on method to insert code..(check the code in AAA).
7) Save , check and activate the code.
Some useful URL
http://www.esnips.com/doc/e06e4171-29df-462f-b857-54fac19a9d8e/ppt-on-badis.ppt
http://www.esnips.com/doc/10016c34-55a7-4b13-8f5f-bf720422d265/BADIs.pdf
http://www.esnips.com/doc/43a58f51-5d92-4213-913a-de05e9faac0d/Business-Addin.doc
http://www.esnips.com/doc/1e10392e-64d8-4181-b2a5-5f04d8f87839/badi.doc
www.sapgenie.com/publications/saptips/022006%20-%20Zaidi%20BADI.pdf
http://www.sapdevelopment.co.uk/enhance/enhance_badi.htm
http://help.sap.com/saphelp_nw04/helpdata/en/04/f3683c05ea4464e10000000a114084/content.htm
http://help.sap.com/saphelp_nw04/helpdata/en/e6/d54d3c596f0b26e10000000a11402f/content.htm
http://help.sap.com/saphelp_nw2004s/helpdata/en/c2/eab541c5b63031e10000000a155106/frameset.htm
Now write a sample program to use this badi method..
Look for BBB sample program.
AAA
data : wa_flights type sflight,
it_flights type table of sflight.
format color col_heading.
write:/ 'Flight info of:', i_carrid, i_connid.
format color col_normal.
select * from sflight
into corresponding fields of table it_flights
where carrid = i_carrid
and connid = i_connid.
loop at it_flights into wa_flights.
write:/ wa_flights-fldate,
wa_flights-planetype,
wa_flights-price currency wa_flights-currency,
wa_flights-seatsmax,
wa_flights-seatsocc.
endloop.
BBB
*& Report ZBADI_TEST *
REPORT ZBADI_TEST .
tables: spfli.
data: wa_spfli type spfli,
it_spfli type table of spfli with key carrid connid.
*Initialise the object of the interface.
data: exit_ref type ref to ZCL_IM_IM_LINESEL,
exit_ref1 type ref to ZIF_EX_BADISPFLI1.
selection-screen begin of block b1.
select-options: s_carr for spfli-carrid.
selection-screen end of block b1.
start-of-selection.
select * from spfli into corresponding fields of table it_spfli
where carrid in s_carr.
end-of-selection.
loop at it_spfli into wa_spfli.
write:/ wa_spfli-carrid,
wa_spfli-connid,
wa_spfli-cityfrom,
wa_spfli-deptime,
wa_spfli-arrtime.
hide: wa_spfli-carrid, wa_spfli-connid.
endloop.
at line-selection.
check not wa_spfli-carrid is initial.
create object exit_ref.
exit_ref1 = exit_ref.
call method exit_ref1->lineselection
EXPORTING
i_carrid = wa_spfli-carrid
i_connid = wa_spfli-connid.
clear wa_spfli.
u can find BADI's in different ways...
1>First go to any transaction->iN THE menu bar SYSTEM->STATUS->Get the program name ->double click->u will go to the program attached to the tcode.Now search term will be CALL CL_EXITHANDLER.Now u will get list of BADI'S available..
2>Goto SE24->Give class name as CL_EXITHANDLER->Display->double click on get_instance mathod->Now u will go inside the method->Now put break point on the cl_exithandler.Now go to any transaction code and pass dat..U will see that it will be stopped on the break point which u set on the cl_exithandler...In the exit name u can find list of badi's attached to the tcode..
There are multiple ways of searching for BADI.
Finding BADI Using CL_EXITHANDLER=>GET_INSTANCE
Finding BADI Using SQL Trace (TCODE-ST05).
Finding BADI Using Repository Information System (TCODE- SE84).
1. Go to the Transaction, for which we want to find the BADI, take the example of Transaction VD02. Click on System->Status. Double click on the program name. Once inside the program search for CL_EXITHANDLER=>GET_INSTANCE.
Make sure the radio button In main program is checked. A list of all the programs with call to the BADIs will be listed.
The export parameter EXIT_NAME for the method GET_INSTANCE of class CL_EXITHANDLER will have the user exit assigned to it. The changing parameter INSTANCE will have the interface assigned to it. Double click on the method to enter the source code.Definition of Instance would give you the Interface name.
2. Start transaction ST05 (Performance Analysis).
Set flag field "Buffer trace"
Remark: We need to trace also the buffer calls, because BADI database tables are buffered. (Especially view V_EXT_IMP and V_EXT_ACT)
Push the button "Activate Trace". Start transaction VA02 in a new GUI session. Go back to the Performance trace session.
Push the button "Deactivate Trace".
Push the button "Display Trace".
The popup screen "Set Restrictions for Displaying Trace" appears.
Now, filter the trace on Objects:
V_EXT_IMP
V_EXT_ACT
Push button "Multiple selections" button behind field Objects
Fill: V_EXT_IMP and V_EXT_ACT
All the interface class names of view V_EXT_IMP start with IF_EX_. This is the standard SAP prefix for BADI class interfaces. The BADI name is after the IF_EX_.
So the BADI name of IF_EX_CUSTOMER_ADD_DATA is CUSTOMER_ADD_DATA
3. Go to Maintain Transaction (TCODE- SE93).
Enter the Transaction VD02 for which you want to find BADI.
Click on the Display push buttons.
Get the Package Name. (Package VS in this case)
Go to TCode: SE84->Enhancements->Business Add-inns->Definition
Enter the Package Name and Execute.
Here you get a list of all the Enhancement BADIs for the given package MB.
The simplese way for finding BADI is
1. chooes Tcode Program & package for that Tcode.
2. Go to Tcode se18
3. Press F4
4. search by package or by program.
http://help.sap.com/saphelp_nw04/helpdata/en/eb/3e7cf7940e11d295df0000e82de14a/frameset.htm
and
http://help.sap.com/saphelp_nw04/helpdata/en/eb/3e7cf7940e11d295df0000e82de14a/frameset.htm
Badihttp://help.sap.com/saphelp_erp2005/helpdata/en/73/7e7941601b1d09e10000000a155106/frameset.htm
http://support.sas.com/rnd/papers/sugi30/SAP.ppt
http://www.sts.tu-harburg.de/teaching/sap_r3/ABAP4/abapindx.htm
http://members.aol.com/_ht_a/skarkada/sap/
http://www.ct-software.com/reportpool_frame.htm
http://www.saphelp.com/SAP_Technical.htm
http://www.kabai.com/abaps/q.htm
http://www.guidancetech.com/people/holland/sap/abap/
http://www.planetsap.com/download_abap_programs.htm
http://help.sap.com/saphelp_nw04/helpdata/en/c8/1975cc43b111d1896f0000e8322d00/content.htm
/people/thomas.weiss/blog/2006/04/03/how-to-define-a-new-badi-within-the-enhancement-framework--part-3-of-the-series
/people/thomas.weiss/blog/2006/04/18/how-to-implement-a-badi-and-how-to-use-a-filter--part-4-of-the-series-on-the-new-enhancement-framework
http://esnips.com/doc/e06e4171-29df-462f-b857-54fac19a9d8e/ppt-on-badis.ppt
http://esnips.com/doc/43a58f51-5d92-4213-913a-de05e9faac0d/Business-Addin.doc
http://esnips.com/doc/10016c34-55a7-4b13-8f5f-bf720422d265/BADIs.pdf
http://esnips.com/doc/1e10392e-64d8-4181-b2a5-5f04d8f87839/badi.doc
http://esnips.com/doc/365d4c4d-9fcb-4189-85fd-866b7bf25257/customer-exits--badi.zip
http://esnips.com/doc/3b7bbc09-c095-45a0-9e89-91f2f86ee8e9/BADI-Introduction.ppt
http://help.sap.com//saphelp_470/helpdata/EN/eb/3e7cee940e11d295df0000e82de14a/frameset.htm
sample code for Purchase requisition
BAdI Name: ZPUR_RFQ (Implementation name) Purchase Requisitions
Definition Name: ME_REQ_POSTED
Interface Name : IF_EX_ME_REQ_POSTED
Implementing Class: ZCL_IM_PUR_REQ
Method : POSTED
METHOD if_ex_me_req_posted~posted .
DATA : v_mtart TYPE mtart.
DATA l_s_eban TYPE ueban.
LOOP AT im_eban INTO l_s_eban.
IF l_s_eban-estkz NE 'B'.
CLEAR v_mtart.
SELECT SINGLE mtart INTO v_mtart FROM mara WHERE matnr = l_s_eban-matnr.
IF v_mtart EQ 'ZERS' OR v_mtart EQ 'FHMI' OR v_mtart EQ 'UNBW'.
MESSAGE e000(zm_msg) WITH 'You are not allowed' 'to create PR for stock items'.
ENDIF.
ENDIF.
IF l_s_eban-knttp NE 'F' OR l_s_eban-pstyp NE '9'.
IF l_s_eban-knttp NE 'A'.
IF ( l_s_eban-pstyp NE '9' AND l_s_eban-pstyp NE 'D' ) AND l_s_eban-matnr EQ
space.
MESSAGE e000(zm_msg) WITH 'You cannot create' 'a PR without material number'.
ENDIF.
ENDIF.
ENDIF.
ENDLOOP.
ENDMETHOD.
<b>Reward points for useful Answers</b>
Regards
Anji -
Need NetWeaver XI Documents (Step by step Procedure)
Hi ALL,
I Got the chance to work in XI but i do not have any documents on XI , and please guide me how to handle the XI application ...
Any one has step by step procedures mail me
<b>[email protected]</b>
Please help me ...
Regards
PuruHi Purushotham ineni,
Hi,
This might help you
http://help.sap.com/saphelp_nw04/helpdata/en/14/80243b4a66ae0ce10000000a11402f/frameset.htm
Further, this thread deals with everything that is needed for a starter on XI. Do check them out,
JDBC Receiver: exact SQL statement
/message/527697#527697 [original link is broken]
And after you are done with the documentation probably you can go through this scenario,
JDBC Receiver: exact SQL statement
Also check the following threads which might help you a little more,
Learning XI
XI 3.0 Training
https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/13926f23-0a01-0010-149c-c1170e7a25db
Thanks & Regards,
Agasthuri Doss -
How to call SQL job step by step from windows batch file
Hi ,
I have a SQL agent job [POC_IOD_RunPkgJob] which is being called from bat file with below command.
Could you please tell me how to call only one step of this job, what command I need to mention in the batch file.
SQLCMD -Sabcwi\SQLI01,51565 -E -Q"exec msdb.dbo.sp_start_job [POC_IOD_RunPkgJob]"Hi RameshDravid,
Regarding your description,though not aware of what is the purposed to call only one step of that job, the below sample can somewhat help to achieve your requirement.
--find the job steps
SELECT
steps.step_id,steps.step_name,steps.subsystem,steps.command
FROM msdb.dbo.sysjobsteps steps
JOIN msdb.dbo.sysjobs jobs
ON steps.job_id = jobs.job_id
WHERE jobs.name = 'youJobName'
--find the command runs in that step, usually that is some command exec stored procedure
SQLCMD -Sabcwi\SQLI01,51565 -E -Q"exec stored procedure found in the above query"
If you have any question, feel free to let me know
Eric Zhang
TechNet Community Support -
Regarding ALE/Idocs PDFs & complete Documentation & Step by Step Procedure
Hi Gurus,
Iam working on Netweaver XI and i need some PDF's on ALE/Idocs.
1. How to create and send a custom idoc?
2. Serialization of idocs?
3. Archiving of idocs?
4. Idoc Acknowledgement?
5. How to send multiple Idocs at a time?
6. Idoc Sheduling?
7. Idoc bundling and Packaging?
8. How to Debug a Idoc?
For the above questions i need complete procedure and Pdf's upon these and send me some FAQ's on them.can any one send me the details plz very urgent.plz send Especially pdf's. My id is ajaykodali22 at the rate of gmail.com
Thanks & Regards,
ajay kodali.Hi,
Data Creation in Idoc
IDocs are text encoded documents with a rigid structure that are used to exchange data between R/3 and a foreign system. Instead of calling a program in the destination system directly, the data is first packed into an IDoc and then sent to the receiving system, where it is analyzed and properly processed. Therefore an IDoc data exchange is always an
asynchronous process. The significant difference between simple RFC-calls and IDoc data exchange is the fact, that every action performed on IDocs are protocolled by R/3 and IDocs can be reprocessed if an error occurred in one of the message steps.
While IDocs have to be understood as a data exchange protocol, EDI and ALE are typical use cases for IDocs. R/3 uses IDocs for both EDI and ALE to deliver data to the receiving system. ALE is basically the scheduling mechanism that defines when and between which partners and what kind of data will be exchanged on a regular or event triggered basis. Such a set-up is called an ALE-scenario.
IDoc is a intermediate document to exchange data between two SAP Systems.
*IDocs are structured ASCII files (or a virtual equivalent).
*Electronic Interchange Document
*They are the file format used by SAP R/3 to exchange data with foreign systems.
*Data Is transmitted in ASCII format, i.e. human readable form
*IDocs exchange messages
*IDocs are used like classical interface files
IDOC types are templates for specific message types depending on what is the business document, you want to exchange.
WE30 - you can create a IDOC type.
An IDOC with data, will have to be triggered by the application that is trying to send out the data.
FOr testing you can use WE19.
How to create idoc?
*WE30 - you can create a IDOC type
For more information in details on the same along with the examples can be viewed on:
http://www.netweaverguru.com/EDI/HTML/IDocBook.htm#_Toc8400404
http://help.sap.com/saphelp_erp2005/helpdata/en/0b/2a6620507d11d18ee90000e8366fc2/frameset.htm
http://www.sappoint.com/presentation.html
http://www.allsaplinks.com/idoc_search.html
http://www.sapgenie.com/sapedi/idoc_abap.htm
http://www.erpgenie.com/sapedi/idoc_abap.htm
To Create Idoc we need to follow these steps:
Create Segment ( WE31)
Create Idoc Type ( WE30 )
Create Message Type ( WE81 )
Assign Idoc Type to Message Type ( WE82 )
Creating a Segment
Go to transaction code WE31
Enter the name for your segment type and click on the Create icon
Type the short text
Enter the variable names and data elements
Save it and go back
Go to Edit -> Set Release
Follow steps to create more number of segments
Create IDOC Type
Go to transaction code WE30
Enter the Object Name, select Basic type and click Create icon
Select the create new option and enter a description for your basic IDOC type and press enter
Select the IDOC Name and click Create icon
The system prompts us to enter a segment type and its attributes
Choose the appropriate values and press Enter
The system transfers the name of the segment type to the IDOC editor.
Follow these steps to add more number of segments to Parent or as Parent-child relation
Save it and go back
Go to Edit -> Set release
Create Message Type
Go to transaction code WE81
Change the details from Display mode to Change mode
After selection, the system will give this message The table is cross-client (see Help for further info). Press Enter
Click New Entries to create new Message Type
Fill details
Save it and go back
Assign Message Type to IDoc Type
Go to transaction code WE82
Change the details from Display mode to Change mode
After selection, the system will give this message The table is cross-client (see Help for further info). Press Enter.
Click New Entries to create new Message Type.
Fill details
Save it and go back
Check these out..
Re: How to create IDOC
Check below link. It will give the step by step procedure for IDOC creation.
http://www.supinfo-projects.com/cn/2005/idocs_en/2/
ALE/ IDOC
http://help.sap.com/saphelp_erp2004/helpdata/en/dc/6b835943d711d1893e0000e8323c4f/content.htm
http://www.sapgenie.com/sapgenie/docs/ale_scenario_development_procedure.doc
http://edocs.bea.com/elink/adapter/r3/userhtm/ale.htm#1008419
http://www.netweaverguru.com/EDI/HTML/IDocBook.htm
http://www.sapgenie.com/sapedi/index.htm
http://www.sappoint.com/abap/ale.pdf
http://www.sappoint.com/abap/ale2.pdf
http://www.sapgenie.com/sapedi/idoc_abap.htm
http://help.sap.com/saphelp_erp2005/helpdata/en/0b/2a60bb507d11d18ee90000e8366fc2/frameset.htm
http://help.sap.com/saphelp_erp2005/helpdata/en/78/217da751ce11d189570000e829fbbd/frameset.htm
http://www.allsaplinks.com/idoc_sample.html
http://www.sappoint.com/abap.html
http://help.sap.com/saphelp_erp2004/helpdata/en/dc/6b835943d711d1893e0000e8323c4f/content.htm
http://www.sapgenie.com/sapgenie/docs/ale_scenario_development_procedure.doc
http://edocs.bea.com/elink/adapter/r3/userhtm/ale.htm#1008419
http://www.netweaverguru.com/EDI/HTML/IDocBook.htm
http://www.sapgenie.com/sapedi/index.htm
http://www.allsaplinks.com/idoc_sample.html
http://www.sapgenie.com/sapgenie/docs/ale_scenario_development_procedure.docs
go trough these links.
http://help.sap.com/saphelp_erp2004/helpdata/en/dc/6b835943d711d1893e0000e8323c4f/content.htm
http://www.sapgenie.com/sapgenie/docs/ale_scenario_development_procedure.doc
http://edocs.bea.com/elink/adapter/r3/userhtm/ale.htm#1008419
http://www.netweaverguru.com/EDI/HTML/IDocBook.htm
http://www.sapgenie.com/sapedi/index.htm
http://www.sappoint.com/abap/ale.pdf
http://www.sappoint.com/abap/ale2.pdf
http://www.sapgenie.com/sapedi/idoc_abap.htm
http://help.sap.com/saphelp_erp2005/helpdata/en/0b/2a60bb507d11d18ee90000e8366fc2/frameset.htm
http://help.sap.com/saphelp_erp2005/helpdata/en/78/217da751ce11d189570000e829fbbd/frameset.htm
http://www.allsaplinks.com/idoc_sample.html
http://www.sappoint.com/abap.html
http://help.sap.com/saphelp_erp2004/helpdata/en/dc/6b835943d711d1893e0000e8323c4f/content.htm
http://www.sapgenie.com/sapgenie/docs/ale_scenario_development_procedure.doc
http://edocs.bea.com/elink/adapter/r3/userhtm/ale.htm#1008419
http://www.netweaverguru.com/EDI/HTML/IDocBook.htm
http://www.sapgenie.com/sapedi/index.htm
http://www.allsaplinks.com/idoc_sample.html
http://http://help.sap.com/saphelp_erp2004/helpdata/en/dc/6b835943d711d1893e0000e8323c4f/content.htm
An IDoc is simply a data container that is used to exchange information between any two processes that can understand the syntax and semantics of the data...
1.IDOCs are stored in the database. In the SAP system, IDOCs are stored in database tables.
2.IDOCs are independent of the sending and receiving systems.
3.IDOCs are independent of the direction of data exchange.
The two available process for IDOCs are
Outbound Process
Inbound Process
AND There are basically two types of IDOCs.
Basic IDOCs
Basic IDOC type defines the structure and format of the business document that is to be exchanged between two systems.
Extended IDOCs
Extending the functionality by adding more segments to existing Basic IDOCs.
To Create Idoc we need to follow these steps:
Create Segment ( WE31)
Create Idoc Type ( WE30)
Create Message Type ( WE81)
Assign Idoc Type to Message Type ( WE82)
imp links
http://www.allsaplinks.com/idoc_sample.html
http://www.sapgenie.com/sapedi/idoc_abap.htm
www.sappoint.com
--here u can find the ppts and basic seetings for ALE
http://sappoint.com/presentation.html
www.sapgenie.com
http://www.sapgenie.com/ale/index.htm
WE30 - you can create a IDOC type.
An IDOC with data, will have to be triggered by the application that is trying to send out the data.
Try this..Hope this will help.
SAP ALE & IDOC<<<<
Steps to configuration(Basis) >>
1. Create Logical System (LS) for each applicable ALE-enabled client
2. Link client to Logical System on the respective servers
3. Create background user, to be used by ALE(with authorizaton for ALE postings)
4. Create RFC Destinations(SM59)
5. Ports in Idoc processing(WE21)
6. Generate partner profiles for sending system
The functional configuration(Tcode: SALE)
Create a Customer Distribution Model (CDM);
Add appropriate message types and filters to the CDM;
Generate outbound partner profiles;
Distribute the CDM to the receiving systems; and
Generate inbound partner profiles on each of the clients.
Steps to customize a new IDoc >>>
1. Define IDoc Segment (WE31)
2. Convert Segments into an IDoc type (WE30)
3. Create a Message Type (WE81)
4. Create valid Combination of Message & IDoc type(WE82)
5. Define Processing Code(WE41 for OUT / WE42 for IN)
6. Define Partner Profile(WE20)
Important Transaction Codes:
SALE - IMG ALE Configuration root
WE20 - Manually maintain partner profiles
BD64 - Maintain customer distribution model
BD71 - Distribute customer distribution model
SM59 - Create RFC Destinations
BDM5 - Consistency check (Transaction scenarios)
BD82 - Generate Partner Profiles
BD61 - Activate Change Pointers - Globally
BD50 - Activate Change Pointer for Msg Type
BD52 - Activate change pointer per change.doc object
BD59 - Allocation object type -> IDOC type
BD56 - Maintain IDOC Segment Filters
BD53 - Reduction of Message Types
BD21 - Select Change Pointer
BD87 - Status Monitor for ALE Messages
BDM5 - Consistency check (Transaction scenarios)
BD62 - Define rules
BD79 - Maintain rules
BD55 - Defining settings for IDoc conversion
WEDI - ALE IDoc Administration
WE21 - Ports in Idoc processing
WE60 - IDoc documentation
SARA - IDoc archiving (Object type IDOC)
WE47 - IDoc status maintenance
WE07 - IDoc statistics
BALE - ALE Distribution Administration
WE05 - IDoc overview
BD87 - Inbound IDoc reprocessing
BD88 - Outbound IDoc reprocessing
BDM2 - IDoc Trace
BDM7 - IDoc Audit Analysis
BD21 - Create IDocs from change pointers
SM58 - Schedule RFC Failures
Basic config for Distributed data:
BD64: Maintain a Distributed Model
BD82: Generate Partner Profile
BD64: Distribute the distribution Model
Programs
RBDMIDOC Creating IDoc Type from Change Pointers
RSEOUT00 Process all selected IDocs (EDI)
RBDAPP01 - Inbound Processing of IDocs Ready for Transfer
RSARFCEX - Execute Calls Not Yet Executed
RBDMOIND - Status Conversion with Successful tRFC Execution
RBDMANIN - Start error handling for non-posted IDocs
RBDSTATE - Send Audit Confirmations
FOr testing you can use WE19.
Regards,
Shiva. -
Hello Gurus,
We are in process of implementing Benefits and for which we are using Guided Procedures, want to have understanding of the process can you please provide the step by step documentation and an example process that will be of great help.
Appreciate your help.
Thanks in advance for your time.
Kind Regards,
PramodHi Pramod,
Please have a look at the below links. You will probably get some help.
First of all, see the following thread, see the answer by shen peng in the end, explained CAF in very simple terms:
https://www.sdn.sap.com/irj/sdn/thread?threadID=470956&tstart=0
Now have a look at the following links for understanding about CAF, :
<a href="https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/4277f37b-0601-0010-0597-89e792177e2b">Creating Composite Applications with SAP CAF</a>
<a href="https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/84df3e36-0301-0010-be9d-b99aad8c81e6">Composite Application Framework in SAP NetWeaver</a>
<a href="https://www.sdn.sap.com/irj/sdn/weblogs?blog=/pub/wlg/1122">CAF training material online</a>
<a href="https://www.sdn.sap.com/irj/sdn/weblogs?blog=/pub/wlg/1231">Additional CAF Training material online</a>
See the following links for understanding CAF GP in detail:
<a href="https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/0b1c2eda-0c01-0010-b597-b107502cdc71">CAF Guided Procedures Overview</a>
<a href="http://help.sap.com/saphelp_nw2004s/helpdata/en/39/198141f906040de10000000a1550b0/frameset.htm">CAF Guided Procedures</a>
<a href="http://help.sap.com/saphelp_nw2004s/helpdata/en/c7/984942da51690de10000000a155106/frameset.htm">Concepts of the Guided Procedures Framework</a>
Lastly, see the following links for CAF GP Wiki Home Page and CAF Tutorial Center:
<a href="https://wiki.sdn.sap.com/wiki/display/BPX/Guided+Procedures">CAF Guided Procedures Wiki Home Page</a>
<a href="https://www.sdn.sap.com/irj/sdn/nw-composition?rid=/webcontent/uuid/d8dbd703-0801-0010-c9bf-c04bc52f562f">Composite Application Framework Tutorial Center</a>
You can also have a look at the following thread, you can drill down into many more links:
https://www.sdn.sap.com/irj/sdn/thread?threadID=405517&tstart=0
https://www.sdn.sap.com/irj/sdn/thread?threadID=314804&tstart=50
Bye
Ankur
Maybe you are looking for
-
Hi... I thought for my iPod Classic I would put a copy of some instructions on how to make Origami with money (for when I'm out on the town, tipping etc..). I have something called Snapz (a screen capture program) and what I did was open from the web
-
Playing extrenal Video on an iMac
The TV in our home recently broke and I would like to replace it with an iMac. My question is, is it possible to display video coming from an external source (DVD player), on the iMac's display? Second best would be is we could get 5.1 surround audio
-
Convergence 2 Timezone in calendar properties issue
Hi. I'm using Convergence 2 with patch 1 so when i set default timezone in options tab on calendar genteral to Asia Bangkok and check calendar properties in Calendar tab. It's turn into America Denver but in Directory server user profile icsTimezone
-
SQL Developer extremely slow - suggestions?
Hey, I've just installed - everything is extremely slow - 30 seconds or so to have the file menu open once clicking file for example. Also slows everything else on the computer to a crawl. machine has 1GB of RAM, Win XP Pro, etc. etc. and works great
-
Is there a 3D rotate tool in Photoshop CS4 (non-extended)?
I have just installed Photoshop CS4 of my new iMac. Although I had been led to believe that even the non-extended version came with the 3D rotation tool, in fact, I can find no evidence of it! Was I misled? If so, I am sad. Please advise how I mig