Call an applications 'user exit' from a PL/SQL procedure
My question is a technical PL/SQL question related to Oracle Applications. I need to call a standard applications 'user exit' from a stored PL/SQL procedure. Can anyone tell me if this is possible and how to do it?
(i.e. I am attempting to call the AR user exit SALESTAX)
Thanks,
Michelle Dodge
Hi,
Read this thread, perhaps is there your response :
Host...
Nicolas.
Similar Messages
-
Calling a std user exit from a user defined user exit
hi
I have a standard User Exit. I want to call it from a User Exit created by me something like zaaabbbb.
Can you please tell me the procedure how to do it ?Hi,
If the user exit is a Z include in a function module then you can call the function module like any other function module passing the required parameters. For example CALL CUSTOMER-FUNCTION '002' in transaction VA01 corresponds to function module EXIT_SAPMV45A_002. You can call this function module like you do any other function module.
CALL FUNCTION 'EXIT_SAPMV45A_002'
EXPORTING
i_tvak =
i_tvta =
i_vkgrp =
i_vkbur =
* IMPORTING
* E_KUNNR =
If the user exit is a subroutine in an include in SAP name space (For example subroutine userexit_delete_document in include mv45afzz), then find out the main program in which the include is included (for example mv45afzz is included in program sapmv45a). Once you have done that you can using the following statement to call the subroutine.
PERFORM <subroutine name> IN PROGRAM <program name>.
For Examaple
PERFORM userexit_delete_document IN PROGRAM sapmv45a.
Please make sure that you use the main program name (In our example sapmv45a) and not the include name (in our example mv45afzz). -
Hi,
Is it possible to call BDC in User Exits? Requirement is to update cusotmer master using by CALL TRANSACTION that called from a user exit.
How to know the user exit name, If I already know the function module name and include name?
Ex: Include - ZXVSVU02.
Function Module - EXIT_SAPLVV02_001.
<removed by moderator>
Edited by: Thomas Zloch on Jun 8, 2010 12:44 PMHi,
Have you tried calling BDC through module pool program? if its going to wotk there, sure u will get it done from user exist......
I have worked it through module pool.......all the best for ur try.....
Kalyan -
Accessing the Logon User Exit from the Internet using an ITS Service
I can access the Logon User Exit (EXIT_SAPLSUSF_001) from R/3, but not from the Web using an ITS service. What am I missing in order to access the Logon User Exit from the Web. The ITS service was created from an ABAP screen program.
Thanks
david yeeThe SAPGui logon exit is called after successfull authentication has been completed and after a SAPGui session has been attached.
If you logon via RFC, WebGui, ICM or the Wgate then this exit does not trigger.
What are you wanting to add to your code after the logon ?
An solution I have used is to create a wrapper RFC for a BAPI and create a webservice for the wrapper. Before calling the BAPI you can do whatever you want to from a security perspective.
But for that you need to have an appropriate BAPI...
Please explain what you want to do and what you would have wanted in the exit. Often there is a better way.
Cheers,
Julius
ps: I moved this to the security forum. -
Hello Gurus,
How can I get user exit from ABAP workbench ?
thanks very much!here is the program for the user exits..
REPORT z_find_userexit NO STANDARD PAGE HEADING.
TABLES : tstc, "SAP Transaction Codes
tadir, "Directory of Repository Objects
modsapt, "SAP Enhancements - Short Texts
modact, "Modifications
trdir, "System table TRDIR
tfdir, "Function Module
enlfdir, "Additional Attributes for Function Modules
tstct. "Transaction Code Texts
*& Variables
DATA : jtab LIKE tadir OCCURS 0 WITH HEADER LINE.
DATA : field1(30).
DATA : v_devclass LIKE tadir-devclass.
*& Selection Screen Parameters
SELECTION-SCREEN BEGIN OF BLOCK a01 WITH FRAME TITLE text-001.
SELECTION-SCREEN SKIP.
PARAMETERS : p_tcode LIKE tstc-tcode OBLIGATORY.
SELECTION-SCREEN SKIP.
SELECTION-SCREEN END OF BLOCK a01.
*& Start of main program
START-OF-SELECTION.
Validate Transaction Code
SELECT SINGLE * FROM tstc
WHERE tcode EQ p_tcode.
Find Repository Objects for transaction code
IF sy-subrc EQ 0.
SELECT SINGLE * FROM tadir
WHERE pgmid = 'R3TR'
AND object = 'PROG'
AND obj_name = tstc-pgmna.
MOVE : tadir-devclass TO v_devclass.
IF sy-subrc NE 0.
SELECT SINGLE * FROM trdir
WHERE name = tstc-pgmna.
IF trdir-subc EQ 'F'.
SELECT SINGLE * FROM tfdir
WHERE pname = tstc-pgmna.
SELECT SINGLE * FROM enlfdir
WHERE funcname = tfdir-funcname.
SELECT SINGLE * FROM tadir
WHERE pgmid = 'R3TR'
AND object = 'FUGR'
AND obj_name = enlfdir-area.
MOVE : tadir-devclass TO v_devclass.
ENDIF.
ENDIF.
Find SAP Modifactions
SELECT * FROM tadir
INTO TABLE jtab
WHERE pgmid = 'R3TR'
AND object = 'SMOD'
AND devclass = v_devclass.
SELECT SINGLE * FROM tstct
WHERE sprsl EQ sy-langu
AND tcode EQ p_tcode.
FORMAT COLOR COL_POSITIVE INTENSIFIED OFF.
WRITE:/(19) 'Transaction Code - ',
20(20) p_tcode,
45(50) tstct-ttext.
SKIP.
IF NOT jtab[] IS INITIAL.
WRITE:/(95) sy-uline.
FORMAT COLOR COL_HEADING INTENSIFIED ON.
WRITE:/1 sy-vline,
2 'Exit Name',
21 sy-vline ,
22 'Description',
95 sy-vline.
WRITE:/(95) sy-uline.
LOOP AT jtab.
SELECT SINGLE * FROM modsapt
WHERE sprsl = sy-langu AND
name = jtab-obj_name.
FORMAT COLOR COL_NORMAL INTENSIFIED OFF.
WRITE:/1 sy-vline,
2 jtab-obj_name HOTSPOT ON,
21 sy-vline ,
22 modsapt-modtext,
95 sy-vline.
ENDLOOP.
WRITE:/(95) sy-uline.
DESCRIBE TABLE jtab.
SKIP.
FORMAT COLOR COL_TOTAL INTENSIFIED ON.
WRITE:/ 'No of Exits:' , sy-tfill.
ELSE.
FORMAT COLOR COL_NEGATIVE INTENSIFIED ON.
WRITE:/(95) 'No User Exit exists'.
ENDIF.
ELSE.
FORMAT COLOR COL_NEGATIVE INTENSIFIED ON.
WRITE:/(95) 'Transaction Code Does Not Exist'.
ENDIF.
Take the user to SMOD for the Exit that was selected.
AT LINE-SELECTION.
GET CURSOR FIELD field1.
CHECK field1(4) EQ 'JTAB'.
SET PARAMETER ID 'MON' FIELD sy-lisel+1(10).
CALL TRANSACTION 'SMOD' AND SKIP FIRST SCREEN.
give the tcode it will show the user exit and if u click on the user exit it will takes to the code..
regards,
venkat -
To find an user exit from a FM
Hi All,
Suppose I have a function module , which corresponds to a particular exit(which I do not know). How do I back trace the user exit from the FM ?
Plz help.Hi Pradipta,
Please check this code.
REPORT y_rtest .
TABLES : tstc, "SAP Transaction Codes
tadir, "Directory of Repository Objects
modsapt, "SAP Enhancements - Short Texts
modact, "Modifications
trdir, "System table TRDIR
tfdir, "Function Module
enlfdir, "Additional Attributes for Function Modules
tstct. "Transaction Code Texts
DATA : jtab LIKE tadir OCCURS 0 WITH HEADER LINE.
DATA : FIELD1(30).
DATA : v_devclass LIKE tadir-devclass.
SELECTION-SCREEN BEGIN OF BLOCK a01 WITH FRAME TITLE text-001.
SELECTION-SCREEN SKIP.
PARAMETERS : p_funam LIKE enlfdir-funcname OBLIGATORY.
SELECTION-SCREEN SKIP.
SELECTION-SCREEN END OF BLOCK a01.
SELECT SINGLE * FROM enlfdir
WHERE funcname = p_funam.
SELECT SINGLE * FROM tadir
WHERE pgmid = 'R3TR'
AND object = 'FUGS'
AND obj_name = enlfdir-area.
MOVE : tadir-devclass TO v_devclass.
* Find SAP Modifactions
SELECT * FROM tadir
INTO TABLE jtab
WHERE pgmid = 'R3TR'
AND object = 'SMOD'
AND devclass = v_devclass.
BREAK-POINT.
IF NOT JTAB[] IS INITIAL.
WRITE:/(95) SY-ULINE.
FORMAT COLOR COL_HEADING INTENSIFIED ON.
WRITE:/1 SY-VLINE,
2 'Exit Name',
21 SY-VLINE ,
22 'Description',
95 SY-VLINE.
WRITE:/(95) SY-ULINE.
LOOP AT JTAB.
SELECT SINGLE * FROM MODSAPT
WHERE SPRSL = SY-LANGU AND
NAME = JTAB-OBJ_NAME.
FORMAT COLOR COL_NORMAL INTENSIFIED OFF.
WRITE:/1 SY-VLINE,
2 JTAB-OBJ_NAME HOTSPOT ON,
21 SY-VLINE ,
22 MODSAPT-MODTEXT,
95 SY-VLINE.
ENDLOOP.
WRITE:/(95) SY-ULINE.
DESCRIBE TABLE JTAB.
SKIP.
FORMAT COLOR COL_TOTAL INTENSIFIED ON.
WRITE:/ 'No of Exits:' , SY-TFILL.
ELSE.
FORMAT COLOR COL_NEGATIVE INTENSIFIED ON.
WRITE:/(95) 'No User Exit exists'.
ENDIF.
* Take the user to SMOD for the Exit that was selected.
AT LINE-SELECTION.
GET CURSOR FIELD FIELD1.
CHECK FIELD1(4) EQ 'JTAB'.
SET PARAMETER ID 'MON' FIELD SY-LISEL+1(10).
CALL TRANSACTION 'SMOD' AND SKIP FIRST SCREEN.
Regards ,
Ranjit Thakur.
Please Mark the Helpful Answer.
Message was edited by: Ranjit Thakur
Message was edited by: Ranjit Thakur -
How do I call an Application Module method from a EntityImpl class?
Guys and Gals,
Using Studio Edition Version 11.1.1.3.0.
I've got a price update form, that when submitted, takes the part numbers and prices in the form and updates the corresponding Parts' price in the Parts table. Anytime this Parts view object's ReplacementPrice attribute is changed, an application module method needs to be called which updates a whole slew of related view objects. I know you can modify view objects via associations (How do I call an Application Module method from a ViewObjectImpl class? but that's not what I'm trying to do. These AppModuleImpl methods are the hub for all price updates, as many different operations may affect related pricing (base price lists, price buckets, etc) and hence, call the updatePartPricing(key) method.
For some reason, the below code does not call / run / activate the application module's method. The AppModuleDataControl exists and recordPartHistory(key) is registered and public. At runtime, the am.<method> code is simply ignored, and as a weird side-effect, I cannot navigate out of my current page flow.
public void setReplacementPrice(Number value)
setAttributeInternal(REPLACEMENTPRICE, value);
AppModuleImpl am = (AppModuleImpl)this.getDBTransaction().findApplicationModule("AppModuleDataControl");
Key key = new Key(new Object[]
{ getPartNumber() });
am.recordPartHistory(key); // AppModuleImpl method which records pricing history
am.updatePartPricing(key); // AppModuleImpl method which updates a whole slew of related pricing tables
}Any ideas?Thanks Timo.
Turns out the code provided was correct, but the AppModuleImpl method being called was not. A dependent ViewObject wasn't returning the row I was expecting. I then tried to perform some operations on that row, which in turn ... just stopped everything, but didn't give me an error.
It was the lack of the error that threw me off. I had never messed with calling an AppModuleImpl method from the EntityImpl so I assumed that's what was messing up.
You are correct. It is available from the ViewRow, but I thought it better to put it in the EntityImpl. This method will be called every time the replacement cost is modified. If I didn't put it in the EntityImpl, I'd have to remember to call it every time a replacement cost changed. -
How to call shell script from a pl/sql procedure
Hi all,
I am little bit new to plsql programming, i have a small problem as follows
I have to call a shell script from a pl/sql procedure ..
Please suggest me some methods in oracle 10g, which i could make use of to achieve my goal. also please tell me what are the constraints for those methods if any.
I already came across dbms_scheduler, but i have got a problem and its nor executing properly its exiting giving 255 error or saying that permission problem, but i have already given full access to my shell scripts.
Thanks in advance
Best Regards
SatyaHi,
Read this thread, perhaps is there your response :
Host...
Nicolas. -
Can we call a Java Stored Proc from a PL/SQL stored Proc?
Hello!
Do you know how to call a Java Stored Proc from a PL/SQL stored Proc? is it possible? Could you give me an exemple?
If yes, in that java stored proc, can we do a call to an EJB running in a remote iAS ?
Thank you!For the java stored proc called from pl/sql, the example above that uses dynamic sql should word :
CREATE OR REPLACE PACKAGE MyPackage AS
TYPE Ref_Cursor_t IS REF CURSOR;
FUNCTION get_good_ids RETURN VARCHAR2 ;
FUNCTION get_plsql_table_A RETURN Ref_Cursor_t;
END MyPackage;
CREATE OR REPLACE PACKAGE BODY MyPackage AS
FUNCTION get_good_ids RETURN VARCHAR2
AS LANGUAGE JAVA
NAME 'MyServer.getGoodIds() return java.lang.String';
FUNCTION get_plsql_table_A RETURN Ref_Cursor_t
IS table_cursor Ref_Cursor_t;
good_ids VARCHAR2(100);
BEGIN
good_ids := get_good_ids();
OPEN table_cursor FOR 'SELECT id, name FROM TableA WHERE id IN ( ' | | good_ids | | ')';
RETURN table_cursor;
END;
END MyPackage;
public class MyServer{
public static String getGoodIds() throws SQLException {
return "1, 3, 6 ";
null -
Call a UNIX shell script from an oracle stored procedure
We need to call a UNIX shell script from an oracle stored procedure
i.e. the control should come back to the procedure once the script completes. Can any body help to achieve this ?There are various ways in achieving this.
For Example, you can call a PRO*C-Library residing on the database server.
This requires a PL/SQL library to be generated and some changes to the Listener configuration.
It is also possible to implement a java procedure on the database being invoked by a PL/SQL wrapper class.
In this way (and if used right) there is also granularity regarding the filestructure permissions given and it may be called during a Forms or other PL/SQL session.
The article below explains a more generic approach how to invoke shell commands from within an Oracle Instance.
Be careful with this, because it really works ;)
Refer to :
http://www.oracle-base.com/articles/8i/ShellCommandsFromPLSQL.php
Message was edited by:
user434854 -
Basic Report Run from a PL/SQL Procedure
I am hosed trying to start a BI Publisher report from a PL/SQL procedure. Basically, I have a procedure with a local variable defined as an XMLType. I need to call an RTF source, pass the xmlfile in and tell the RTF Engine where to send the output.
The users guide implies that it involves calls to a Java program and I am totally ignorant of Java.
I have successfully linked the RTF source into the XML_Publisher application and previewed it against a known data set. hat works.
So, if I have a PL/SQL package with the local variable L_XML defined as XMLTYPE
and an output file L_OUTBUT defined as VARCHAR2(100), what do I use to call the RTF Processor and generate the report to the output file?
That is
declare
l_xml xmltype;
l_output varchar2(100);
begin
-- stuff to build the xml variable
-- insert the call to FTP Processor here Apparently, it should be
-- something like
package.procedure('linked_rtf file name', l_xml, l_output);
end;
If this calls a Java script, would also appreciate a sample copy of the script.
My need is desperate so any assistance will be greatly appreciated.
Many thanks
FrankI don't think you can. The parameters passed to a VB dll are formatted differently than a C dll, especially strings. I know a C program has to use special data structures when working with a VB dll, and this is basically what Oracle is doing.
It should be possible, however, to create a C dll that acts as a wrapper for the VB dll. I'm not sure this would save you anything, though. If you have to do that you may as well write the function in C. -
Invoking a BPEL process from a PL/SQL procedure(URGENT)
hello,
Is it possible to invoke a BPEL process from a pl/sql procedure??
Please reply ...Yes it is.
On my current project i needed this too.
http://orasoa.blogspot.com/2006/11/calling-bpel-process-with-utldbws.html
Re: Error running demo PL/SQL consuming web services
I used this utl_http example:
declare
soap_request varchar2(30000);
soap_respond varchar2(30000);
http_req utl_http.req;
http_resp utl_http.resp;
launch_url varchar2(240) ;
begin
soap_request:='<?xml version="1.0" encoding="UTF-8"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Header/>
<soap:Body xmlns:ns1="http://xmlns.oracle.com/testtask">
<ns1:testtaskProcessRequest><ns1:input>leeg</ns1:input></ns1:testtaskProcessRequest>
</soap:Body>
</soap:Envelope>';
http_req:= utl_http.begin_request('http://yourhostname/orabpel/default/testtask/1.0'
,'POST',
'HTTP/1.1'
utl_http.set_header(http_req, 'Content-Type', 'text/xml') ;
utl_http.set_header(http_req, 'Content-Length', length(soap_request)) ;
utl_http.set_header(http_req, 'SOAPAction', 'initiate');
utl_http.write_text(http_req, soap_request) ;
http_resp:= utl_http.get_response(http_req) ;
utl_http.read_text(http_resp, soap_respond) ;
utl_http.end_response(http_resp) ;
dbms_output.put_line(soap_respond);
end; -
Generating an xml from a pl/sql procedure
Hi Friends,
I have come up with a requirement to generate an xml from a pl/sql procedure.
I did some R & D and also got some sample procedures but could not understand the datatypes being used.
The procedure declares variables like this:
doc xmldom.DOMDocument;
mainNode xmldom.DOMNode;
headerElem xmldom.DOMElement; Pls could anyone tell what do these xmldom.DOMDocument, xmldom.DOMNode and xmldom.DOMElement mean?
Later in the procedure, these variables are assigned values like
doc := xmldom.newDOMDocument;
mainNode := xmldom.makenode(doc); This went a bouncer on me.
Pls help.
Thanks in advance ...!You can check this one -- Learned this from michael.
satyaki>
satyaki>
satyaki>select * from v$version;
BANNER
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Prod
PL/SQL Release 10.2.0.1.0 - Production
CORE 10.2.0.1.0 Production
TNS for Linux: Version 10.2.0.1.0 - Production
NLSRTL Version 10.2.0.1.0 - Production
satyaki>
satyaki>
satyaki>with person_h
2 as
3 (
4 select 1 id, 'M' gender, 'W' race, '170' weight from dual union all
5 select 1, 'M', 'W', '170' from dual union all
6 select 1, 'M', 'W', '180' from dual union all
7 select 1, 'M', NULL, '175' from dual union all
8 select 1, NULL, 'W', NULL from dual
9 )
10 select xmlelement("Person",(
11 select xmlagg(xmlelement("Sex", gender))
12 from (
13 select distinct gender
14 from person_h
15 where id = 1
16 and gender is not null
17 ) pg
18 ),
19 (
20 select xmlagg(xmlforest(race as "Race"))
21 from (
22 select distinct race
23 from person_h
24 where id = 1
25 ) pg
26 ),
27 (
28 select xmlagg(xmlforest(weight as "Weight"))
29 from (
30 select distinct weight
31 from person_h
32 where id = 1
33 ) pg
34 )
35 ).getstringval() Res
36 from dual;
RES
<Person><Sex>M</Sex><Race>W</Race><Weight>170</Weight><Weight>175</Weight><Weight>180</Weight></Person>
satyaki>Regards.
Satyaki De. -
How to make a http request from a pl/sql procedure(URGENT)
I need to make a http request from a pl/sql procedure, can any one tell me which built-in package and which procedure/function we serve my need?
Thanks in advance.
Ram Prasad.You should use UTL_HTTP package, but before it install the JVM into DB
-
IPC Pricing with AP 7.00 Database Access/Call function module user-exit
Hi experts,
we are running SAP ECO on SAP ECC 6.0 with IPC Pricing AP 7.00 running in the VMC.
I'm facing a new requirement. In an user-exit for requirements the access to the ABAP database is needed.
(I know that the SAP recommendation is, don't have access to database. But we need this functionality)
In ABAP it looks like:
select single * from a590
into LH_674_a590
where kappl = 'V'
and kschl = 'ZSPR'
and kunnr = komk-kunnr
and matnr = komp-matnr
and datbi >= komk-prsdt
and datab =< komk-prsdt.
Is there a possibility to implement the same SELECT in the Java-User-Exit?
Is there maybe the alternative to call a function module instead?
The database exits on the same application server on which the VMC runs.
If there is a possiblity can anyone provide me with sample coding or give an advice where to find samle coding?
I would prefer to call a functions module.
Thanks in adcance
Karl-WilhelmHi Shanto & Sumit,
Thanks for the inputs.
as per my understanding of the log
java.lang.IncompatibleClassChangeError: com.sap.leasing.pricing.tools.LeasingPricingTools: method getPricingConditionByConditionTypeName(Lcom/sap/spe/pricing/transactiondata/userexit/IPricingItemUserExit;Ljava/lang/String;)Lcom/sap/spe/pricing/transa ctiondata/IPricingCondition; used to be stati
error is thrown by the SAP standard user exit and because of which execution is failing in customer user exits and surprisingly we have not made any changes in both of them.
this was working earlier before upload.could this be because of the jar packaging.
how i can download the standard user exit com.sap.leasing.pricing.tools.LeasingPricingTools from crm
for further investigation.
Thanks,
Siddharth
Maybe you are looking for
-
Safari on my MacBook Pro keeps quitting unexpectedly after a minute or so, please help!
Safari on one (and only one of my 3 user accounts) on my MacBook Pro keeps quitting unexpectedly after roughly a minute or so after launch. I've tried everything from deleting com.apple.safari, deleting the app itself, installing the latest Java, an
-
Error downloading a BLOB file in APEX
I am getting the following error when trying to download a blob in APEX invalid LOB locator specified\nORA-06512: at "SYS.WPG_DOCLOAD", line 52 Below this line is my table script and the procedure code (which is part of a package) This is the column
-
Mac mini specific osx 10.4 ? Will this version work on my machine?
I found a set of install disks for mac mini with the following specs on the CD: mac os version 10.4,AHT version 1.0,disc version 1.0,22691-5455-a Will this work on my 1.42 Ghz PPC G4 1GB DDR SDRAM Serial Number: YM5***RHS (not an Intel mac). Bought i
-
DBMS_SCHEDULER plsql code and examples
hi, can u please explain the DBMS_SCHEDULER supplied package? give some idea with plsql pacakge examples. by siva
-
Hi, when i plug my itouch in , it syncs perfectly, but instead of seeing the info page with all the info about my ipod and how much memory it has, i get this. http://i54.tinypic.com/2pzl2fq.jpg The blue links lead to nowhere, and ive tried redownload