Calling c program from oracle
Hi
i have a c program in SOlaris box..how to call it frm PLSQL and return a value from tht..can any one guide me..its urgent?????????
10x karthik for ur help.i was able 2 compile it and create the so file as newname.so
i created a library using
create library C_LIB '/u04/newname.so';
then i wrote a plsql fn which calles tht
CREATE OR REPLACE FUNCTION name_func (
x varchar )
RETURN varchar
AS LANGUAGE C
LIBRARY C_LIB
NAME " return_name";
where return_name is the fn in the c program newname.so which return as string
then i called then fn
declare
name varchar2(255);
begin
name:=name_func('1');
dbms_output.put_line(name);
end ;
i got an errror like this
SQL> /
declare
ERROR at line 1:
ORA-28575: unable to open RPC connection to external procedure agent
ORA-06512: at "SDBSAM.NAME_FUNC", line 0
ORA-06512: at line 4
wht to do how to proceed....here are my tnsnames.ora and listnedr.ora
# LISTENER.ORA Network Configuration File: C:\oracle\ora92\network\admin\listener.ora
# Generated by Oracle configuration tools.
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC0))
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = xxxxxx)(PORT = 1521))
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME =PLSExtProc)
(ORACLE_HOME =/home/oracle/product/9.2.0.1)
(PROGRAM = extproc)
(SID_DESC =
(GLOBAL_DBNAME = PLSExtProc)
(ORACLE_HOME = /home/oracle/product/9.2.0.1)
(SID_NAME = PLSExtProc)
SDB.TIDEL.TCS =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = xxxxxxxxxx)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = sdb)
EXTPROC_CONNECTION_DATA.TIDEL.TCS =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC0))
(CONNECT_DATA =
(SID = PLSExtProc)
(PRESENTATION = RO)
wht is the error????????????????????????
Similar Messages
-
Calling Java programs from Oracle Stored Procedure
Is it possible to call Java programs from Oracle stored procs? If possible Can this be used to exchange data from other applications? Is there a better method/feature in oracle for doing data exchange with other apps?
If what you mean by Oracle stored procedures is pl/sql then yes.
You can create a "wrapper" this way:
CREATE OR REPLACE FUNCTION xmlXform
in_mapUrl IN VARCHAR2,
in_inputUrl IN VARCHAR2
RETURN VARCHAR2
AS
LANGUAGE JAVA NAME
'com.yourcompany.xml2any.xform(java.lang.String,java.lang.String)
RETURN java.lang.String';
Then load the java as:
loadjava -user youruser/youruserpasswd -resolve -verbose lib/xmlparserv2.jar classes/com/yourcompany/xform.class classes/com/yourcompany/xml2any.class
The java, given the correct permissions, can do anything java can do including communicate with outside applications.
Is this the "best" way... depends on what you are trying to accomplish. -
How to call 'C' programs from stored procedures?
Hi
Did anybody tried to call 'C' programs
from oracle stored procedures?
If anybody knows, can you please send
how to configure the listener.ora and
tnsnames.ora. If its possible post all the
information from the begining with examples.
thanks....Oracle JDBC did not support return a result set, if you are using Oracle 9i, you can use pipeline function, then using the TABLE() function the get the row.
Good Luck.
Welcome to http://www.anysql.net/en/ -
Calling Concurrent program from OAF-PDF Outtput not in English
Hi ,
I've successfully done "Calling Concurrent Program from OAF" once i clicked the button which i have in my page it generates RequestID and that shows request page,In that when i click "Output" icon the PDF file is opened.
But in that PDF file it shows the datas in the different language.
For example Emp name column is shown as
ΚΙΝΓ
ΧΛΑΡΚ
ΣΧΟΤΤ
ΦΟΡ∆
ΣΜΙΤΗ
ΑΛΛΕΝ
Αδαµσ
Σεντηιλςελ
Σαραϖανα Χ
Σεενυ
Σαβενα
Ηαριkindly help me...
Regards,
SaroHi Hussein,
Here I've shown the details of log file
Purchasing: Version : 12.0.0
Copyright (c) 1979, 1999, Oracle Corporation. All rights reserved.
XXCON module: XXCON
Current system time is 29-DEC-2010 11:37:23
+-----------------------------*
*| Starting concurrent program execution...*
+-----------------------------*
APPLLCSP Environment Variable set to :
Current NLS_LANG and NLS_NUMERIC_CHARACTERS Environment Variables are :
American_America.AL32UTF8
Enter Password:
Report Builder: Release 10.1.2.3.0 - Production on Wed Dec 29 11:37:29 2010
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Executing request completion options...
------------- 1) PRINT -------------*
Printing output file.
Request ID : 5865903
Number of copies : 0
Printer : noprint
Finished executing request completion options.
Concurrent request completed successfully
Current system time is 29-DEC-2010 11:37:33
Regards,
Saro -
Can we call shell script from oracle 9i?
Hi experts,
I wanted to know can we call shell script from oracle 9i procedures? If yes,how
Thanks
ShaanNo. I can't think of a way to do this...
If you want you can use DBMS_SCHEDULER to call OS SHELL scripts within.
For e.g.
CREATE PROGRAM
begin
dbms_scheduler.create_program
program_name => 'CHECK_TIME',
program_type => 'EXECUTABLE',
program_action => '/opt/oracle/chk_date.sh',
enabled => TRUE,
comments => 'Check the Time'
end;
CREATE A SHELL SCRIPT
opt/oracle> cat chk_date.sh
#!/usr/bin/ksh
echo "The date is :`date`"
CREATE SCHEDULE
begin
dbms_scheduler.create_schedule
schedule_name => 'EVERY_30_MINS',
repeat_interval => 'FREQ=MINUTELY; INTERVAL=30',
comments => 'Every 30-mins'
end;
CREATE JOB
begin
dbms_scheduler.create_job
job_name => 'RUN_CHECK_TIME',
program_name => 'CHECK_TIME',
schedule_name => 'EVERY_30_MINS',
comments => 'Run the program CHECK_TIME every 30 minutes',
enabled => TRUE
end;
MANUALLY RUN A JOB
exec dbms_scheduler.run_job('RUN_CHECK_TIME'); -
Calling a report from oracle form 10g
how to call a report from oracle form 10g
Please see the link:
http://www.oracle.com/technology/products/forms/pdf/10g/frm10gsrw10g.pdf -
How to call a program from FM which acts as popup?
Hi,
I need to call a program from FM and once the program is called it needs to be opened as a popup. Maybe we need to assign size when we call from FM or do we need to give size in the program it self?
I know i can either use the Submit command or Call Transaction command. But that it self will open a full screen which i dont want. It needs to be of a smaller size.
Any help will be appreciated.
ThanksHi,
Try this,
REPORT ZEX_POPUPSCREEN .
*& POPUP SCREEN
* Table Declaration
TABLES VBAK.
* Start of Selection
START-OF-SELECTION.
SELECT * FROM VBAK.
WRITE / VBAK-VBELN HOTSPOT ON.
ENDSELECT.
* Display the screen
AT LINE-SELECTION.
WINDOW STARTING AT 10 10
ENDING AT 40 25.
WRITE:/ 'VBAK-VBELN, VBAK-KUNNR'.
Regards,
Nikhil. -
Problem regarding calling a program from another program
Hi,
I have a requirement that i need to call a program from another program and in that case the called program should be executed with a value in the selection screen coming from the first program..i.e.
a standard report to view the user Notes for annual leave is RPTARQDBVIEW. Can we create a report to display all the users under a manager as a hyperlink and run the report(RPTARQDBVIEW), with the pernr of the employee selected
Regards,
saumikSubmitting a report using ranges for select-options
* Define range for ltak-tanum
RANGES: r_tanum FOR ltak-tanum.
* Read values from database tabel into the range
* These values are later used for select-options in the report
SELECT * FROM ltak
WHERE lgnum = w_lgnum AND "Warehouse number/complex
vbeln = w_screen1000-io_vbeln. "Transfer order number
MOVE ltak-tanum TO r_tanum-low.
MOVE 'I' TO r_tanum-sign.
MOVE 'EQ' TO r_tanum-option.
APPEND r_tanum.
ENDSELECT.
* Submit report with range
SUBMIT zmm00100 WITH p_tanum IN r_tanum.
or
Submitting a report from ABAP with selection criterias
TYPES: tt_selection TYPE STANDARD TABLE OF rsparams.
DATA: l_iblnr TYPE st_iblnr,
* Define internal table and work area for select-options
l_selection TYPE rsparams,
li_selection TYPE tt_selection.
* Create selectIon table
LOOP AT gi_iblnr INTO l_iblnr.
CLEAR l_selection.
l_selection-selname = 'IM_IBLNR'. "Option name
l_selection-kind = 'S'. "S= select options P=Parameters
l_selection-sign = 'I'. "Sign
l_selection-option = 'EQ'. "Option
l_selection-low = l_iblnr-iblnr. "Value
APPEND l_selection TO li_selection.
ENDLOOP.
* Submit report
SUBMIT rm07idif WITH SELECTION-TABLE li_selection AND RETURN.
Regards,
Prabhudas -
URGENT!!! calling crystal reports from oracle forms 10g
Is it possible to call crystal reports from oracle forms 10g?
Can someone help to answer how, if there is a solusion, to call crystal reports from oracle forms 10g.
Please provide codes with details showing step by step.
Thankshi
try something like this.
DECLARE
charWinHandle VARCHAR2(50);
numWinHandle NUMBER;
BEGIN Set_Application_Property(Cursor_Style,'BUSY');
charWinHandle := Get_Item_Property('Control.Rep',Window_Handle);
numWinHandle := To_Number(charWinHandle);
:Item('Control.CrystalReport1').OCX.Crystal.Crysta lReport.WindowParentHandle
:= numWinHandle;
:Item('Control.CrystalReport1').OCX.Crystal.Crysta lReport.WindowState := 2;
:Item('CONTROL.CRYSTALREPORT1').OCX.Crystal.Crysta lReport.Connect
:= 'DSN=;UID=' || Get_Application_Property(UserName) ||
';pwd=' || Get_Application_Property(password) || ';dsq=;';
Crystal_CrystalCtrl.ReportFileName( :Item('Control.CrystalReport1').interface,
'C:\Sample_Rep.Rpt' );
Set_Window_Property( Forms_Mdi_Window, Window_State,Maximize );
Set_Window_Property( 'MAIN', Window_State, Maximize );
:reptitle := 'Report Preview Window';
numWinHandle := Crystal_CrystalCtrl.PrintReport( :Item('Control.CrystalReport1').interface );
Set_Application_Property(Cursor_Style,'DEFAULT');
END;NOTE: Change the report name and path according to your required file name and path in
the "Crystal_CrystalCtrl.ReportFileName" method call. Also, the connection string shown
assumes that you will use the current USER and PASSWORD for the Form.
- To make the above Form generic so that you can run any Crystal report from it, then create
a parameter for the report name and pass it to the Form using CALL_FORM from any other Form.
Then just replace the file name with the passed parameter.
-. Run the Form
If its correct/helpful please mark it thanks.
sarah
Edited by: S@R@h on Nov 27, 2009 6:33 AM -
Calling web service from oracle application framework r12
Hi Techies
Is anybody know How to call web service from oracle application framework r12(step by step procedure),because i searched in net but i could not understand that one
Thanks
Dillibabu B
Edited by: 962005 on 28 Sep, 2012 12:11 AMHi,
Check below links:
http://oracle.anilpassi.com/oa-framework-with-captcha-webservice.html
http://oracle.anilpassi.com/integrate-oa-framework-with-web-service.html
https://blogs.oracle.com/ebusinesssuiteintegration/entry/r121_-invokingweb_service_fr
--Sushant -
Error while calling java program from ABAP
Hi Experts,
We are trying for RFC inbound scenario.
We followed the below blog
/people/gregor.wolf3/blog/2004/08/26/setup-and-test-sap-java-connector-outbound-connection
We are working with SAP JCO 3.0.2
We are getting the error : 'STFC_CONNECTION' could not be found in the server repository.
After I run the Java server program if I execute the RFC destination directly from SM 59 it is showing successful messages.
If I stop the java program then this RFC is failing. Based on this we concluded that RFC to Java connection is working fine.
But as mentioned in blog if we call the RFC Destination from ABAP program it is giving the below error,
'STFC_CONNECTION' could not be found in the server repository.
If we test the RFC destination using RFC_TRUSTED_CHECK standard FM we are getting the below error.
'RFCPING' could not be found in the server repository.
We create the RFC destination of Type : TCP/IP as exactly mention in the blog.
Please help us in resolving this issue.
Thanks
PrincePabi,
Using the RFC connection,we can establish a link between Java and SAP.
Afterwards,hope we can call Java program from ABAP.
Below is the sample piece of code to establish RFC connection(link) between Java and SAP.
DATA: REQUTEXT LIKE SY-LISEL,
RESPTEXT LIKE SY-LISEL,
ECHOTEXT LIKE SY-LISEL.
DATA: RFCDEST like rfcdes-rfcdest VALUE 'NONE'.
DATA: RFC_MESS(128).
REQUTEXT = 'HELLO WORLD'.
RFCDEST = 'JCOSERVER01'. "corresponds to the destination name defined in the SM59
CALL FUNCTION 'STFC_CONNECTION'
DESTINATION RFCDEST
EXPORTING
REQUTEXT = REQUTEXT
IMPORTING
RESPTEXT = RESPTEXT
ECHOTEXT = ECHOTEXT
EXCEPTIONS
SYSTEM_FAILURE = 1 MESSAGE RFC_MESS
COMMUNICATION_FAILURE = 2 MESSAGE RFC_MESS.
IF SY-SUBRC NE 0.
WRITE: / 'Call STFC_CONNECTION SY-SUBRC = ', SY-SUBRC.
WRITE: / RFC_MESS.
ENDIF.
Regards,
Sree -
How to call java program from ABAP
Hi Experts,
My requirement is to call java programs from ABAP. For that i have set up SAP JCO connection by using this link http://www.sdn.sap.com/irj/scn/weblogs?blog=/pub/wlg/739. [original link is broken] [original link is broken] [original link is broken] Connection gets sucessfully. After this how to call java program from ABAP as per our requirement. Please help me out.
Also i tried this way also.. but while executing the DOS Command line appear & disappear in few seconds. So couldnt see the JAVA output. Please help me out to call java programs in ABAP..
DATA:command TYPE string VALUE 'D:Javajdk1.6.0_20 injavac',
parameter TYPE string VALUE 'D:java MyFirstProgram'.
CALL METHOD cl_gui_frontend_services=>execute
EXPORTING
application = command
parameter = parameter
OPERATION = 'OPEN'
EXCEPTIONS
cntl_error = 1
error_no_gui = 2
bad_parameter = 3
file_not_found = 4
path_not_found = 5
file_extension_unknown = 6
error_execute_failed = 7
OTHERS = 8.
Thanks.This depends on the version of your Netweaver Java AS. If you are running 7.0, you will have to use the Jco framework. The Jco framework is deprecated since 7.1 though. If you want to build a RFC server in 7.1 or higher, it is adviced that you set it up through JRA.
Implement an RFC server in 7.0:
http://help.sap.com/saphelp_nw04/helpdata/en/6a/82343ecc7f892ee10000000a114084/frameset.htm
Implement an RFC server in 7.1 or higher:
http://help.sap.com/saphelp_nwce72/helpdata/en/43/fd063b1f497063e10000000a1553f6/frameset.htm -
Calling Java program from ABAP
Hi All,
my ABAP program downloads one file to one folder. Then one Java program is running to Encrypt the file.
Now , they want to call the JAVA program in ABAP, so that they can encrypt the file before downloading.
Is it possible to call a Java program from ABAP ? If Yes, please give me the detailed procedure.
Thanks
pabiPabi,
Using the RFC connection,we can establish a link between Java and SAP.
Afterwards,hope we can call Java program from ABAP.
Below is the sample piece of code to establish RFC connection(link) between Java and SAP.
DATA: REQUTEXT LIKE SY-LISEL,
RESPTEXT LIKE SY-LISEL,
ECHOTEXT LIKE SY-LISEL.
DATA: RFCDEST like rfcdes-rfcdest VALUE 'NONE'.
DATA: RFC_MESS(128).
REQUTEXT = 'HELLO WORLD'.
RFCDEST = 'JCOSERVER01'. "corresponds to the destination name defined in the SM59
CALL FUNCTION 'STFC_CONNECTION'
DESTINATION RFCDEST
EXPORTING
REQUTEXT = REQUTEXT
IMPORTING
RESPTEXT = RESPTEXT
ECHOTEXT = ECHOTEXT
EXCEPTIONS
SYSTEM_FAILURE = 1 MESSAGE RFC_MESS
COMMUNICATION_FAILURE = 2 MESSAGE RFC_MESS.
IF SY-SUBRC NE 0.
WRITE: / 'Call STFC_CONNECTION SY-SUBRC = ', SY-SUBRC.
WRITE: / RFC_MESS.
ENDIF.
Regards,
Sree -
Calling OAF Page from Oracle forms
Hi All,
Is it possible to call an Oracle Forms from OAF page?
I need to call a OAF page EAM material cost screen from oracle form using personalization.
Please any one put on some lights on this issue.
Thanks in Advance,
Ramesh reddy
Edited by: user642447 on May 13, 2011 4:33 AMRamesh,
yes, its possible to call oaf page from oracle forms.
This has been specified step by step in Developer Guide. Refer it for more.
Regards,
Gyan -
Java.lang.ClassCastException when calling webservice stub from oracle DB
Hello everyone,
Because i need to get familliar with calling java webservices from an oracle database, i followed the following example
(http://www.oracle.com/technology/products/jdev/howtos/10g/WS_DBCallout/DBCalloutWS_HowTo.htm),
which included installing the SOAP client stack to the database (in the sys schema), grant the right permissions to the SYS user, developing a simple Helloworld webservice with jdeveloper 10.1.2, generating a Webservice stub and deploying a static method of this stub to the database.
All of this worked just fine, but when i want to call the webservice from oracle by invoking the deployed function, i get a java.lang.ClassCastException.
The complete stacktrace lists as follows:
v_Return = foutje: java.lang.ClassCastExceptionnulljava.lang.ClassCastException
at org.apache.soap.rpc.RPCMessage.serializeParams(RPCMessage.java:323)
at org.apache.soap.rpc.RPCMessage.marshall(RPCMessage.java:305)
at org.apache.soap.Body.marshall(Body.java:148)
at org.apache.soap.Envelope.marshall(Envelope.java:203)
at org.apache.soap.Envelope.marshall(Envelope.java:161)
at oracle.soap.transport.http.OracleSOAPHTTPConnection.send(OracleSOAPHTTPConnection.java:664)
at org.apache.soap.rpc.Call.invoke(Call.java:261)
at test.HelloWorldServiceStub.sayHello(HelloWorldServiceStub.java:82)
I debugged the WebServiceStub and noticed that the call.invoke method crashes. This is weird beacuse when i use System.out.println on the parameter is works just fine. so you would think it is a string.
Moreover, if i invoke the webservice from the endpoint or even when im debugging the stub locally it all works just fine.
Can someone plzzzzzz help me with this because i spend the whole day looking for an answer and im getting crazy!!!!!
Thanx al lot guys,
Kim
PS or could the problem be in the database instead of the webservice?????????
Message was edited by:
user568880
Message was edited by:
Kim ZeevaardersI think that it's going wrong because i did not install the right SOAP client stack.
In the HowTo is specified what JAR files are to be loaded in the database (from %JDEV_HOME), but it states that it has only been tested on a Oracle 9.2 database. I'm using Oracle10g. Maybe that's the reason that im getting this classcast exception...
Can anybody tell me what the right .JAR files are that have to be loaded into database when working with Oracle 10g?
Many thx in advance!
Kim
Maybe you are looking for
-
Ws_query function module obsolete in ECC 6.0
HI experts, V r upgrading system from 4.6 to ecc 6.0 . In one of the programs FM ws_query is obsole, pls let me know the replacement of it. form process_selections_filen. call function 'WS_QUERY' exporting filename = p_filen
-
Help with importing a backup-playlists
I did a full backup onto CD's and told it to backup everything but when I imported the CD's onto the new computer the playlists didn't load!! Do I try importing again?? Where are they? I really don't want to recreate them all again and the old comput
-
I can't find flash light in my i pad 3 camera!!! what can i do?
Why there is no flash light in the i pad 3 camera ? What can i do?
-
Another problem with modbus object? Maybe so. PLCs are Koyo DL06, same program, exactly just different modbus addresses. Sites poll every 60 seconds. I have the modbus objects copied exactly the same settings (except station address of course). PL
-
Final Cut Pro 10.1 does not detect Promise Pegasus
HI, I would like to change my location of where events are stored at for FCPX to my Promise Pegasus (6x3TB, configured to RAID 5), which is what i bought it for, but sadly, my FCPX does NOT detect my Pegasus at all in Library. It does however detect