Returning both raise_application_error and return value from db function...
Hi ,
I use Oracle 10g and forms10g.
I have written a db packaged function such as:
function fnc_ipologismos_xiliometron(code_poleis_apo_var in varchar2,code_poleis_pros_var in varchar2)
return number
is
apostasi_var ref_apostaseis_poleon.apostasi%type;
onomasia_pol_apo_var ref_poleis.onomasia%type;
onomasia_pol_pros_var ref_poleis.onomasia%type;
begin
begin
select onomasia into onomasia_pol_apo_var
from ref_poleis
where code_poleis=code_poleis_apo_var;
end;
begin
select onomasia into onomasia_pol_pros_var
from ref_poleis
where code_poleis=code_poleis_pros_var;
end;
begin
select apostasi into apostasi_var
from ref_apostaseis_poleon
where code_poleis_apo=code_poleis_apo_var and code_poleis_pros=code_poleis_pros_var;
exception
when no_data_found
then
apostasi_var:=0;
return apostasi_var;
raise_application_error(-20015,'a message');
--return apostasi_var;
end; return apostasi_var;
end;The problem is that when the exception written above (in bold) returns 0 and exits the function.... whereas i want this value to be returned as well as the message in the raise_application_error....
I call this function in WHEN-VALIDATE-ITEM of a block item... such as:
if pkg_mod3_general.fnc_ipologismos_xiliometron
(:mod3_entoli_metakinisis.code_poleis_apo_type_id,:mod3_entoli_metakinisis.code_poleis_type_id)=0
and :mod3_entoli_metakinisis.seq_code_meso_metakin_type_id=2
then
raise form_trigger_failure;
end if; When the above condition is true then no message is displayed and the cursor sticks to the item(as the raise_application_error in the db packaged function is after the exit of the function) and when the condition is false then no message is displayed again ... as expected.....
How is it get the desired result.....- get the message from the raise_application_error and the function returns 0.....?????
Many thanks,
Simon
you cannot RETURN and RAISE a function.
RETURN ends the function immediately
RAISE ends the program unit and jumps in the EXCEPTION-Handler, if it exists. Else the function ends
Similar Messages
-
How to return more than one value from a function
hello everybody,
Can anyone tell me how to return more than a single value from a function, the problem is i have 4 points,
2 points form one line ,another 2 points form 2nd line ,each point is 3 dimensional(x,y,z coorinates) so i will pass these values to func(x1,y1,z1,x2,y2,z2,x3,y3,z3,x4,y4,z4), i will find the point of intersecton of two lines and i will get it as x,y,z , now how to return these 3 coordinates,usually the function returns only one value, please help me to solve it out.
Thanks.I think the easiest way or trick here is (easiest isn't always the best as we know, but atleast this one will work) to create simple data array. and pass that. Create an array with:
<code>
class justArray {
int x=0
int y=0;
int z= 0;
...somewhere
justArray[] points= new justArray[4];
points[0].x= ..
points[0].y= ..
points[0].z= ..
points[1].x= ..
return points[]
</code> -
Min and Max values from entire table
Hi,
i have requirement in which i need to find the min and max values from the entire table.
See the sample data
create table test
Sal1 int,
Sal2 int,
Sal3 int
insert into test values (100,700,5700)
insert into test values (200,3300,5300)
insert into test values (4400,1200,3500)
insert into test values (5400,5600,3100)
i want the output as 100 and 5700.. how can i achieve this in a single query. Please through some light on this topic..!
Thanking you in advance
Regards,
Balaji Prasad B
Balaji - BI DeveloperBelow is an example with a subquery for each of the queries Mohammad posted in order to return both min and max in a single result set.
SELECT ( SELECT MAX(Maxx) AS Maxx
FROM test UNPIVOT
( Maxx FOR E IN ( Sal1, Sal2, Sal3 ) ) AS unpvt
) AS Maxx
, ( SELECT MIN(Minn) Minn
FROM test UNPIVOT
( Minn FOR E IN ( Sal1, Sal2, Sal3 ) ) AS unpvt
) AS Minxx;
Dan Guzman, SQL Server MVP, http://www.dbdelta.com -
From two given tables, how do you fetch the values from two columns using values from one column(get values from col.A if col.A is not null and get values from col.B if col.A is null)?
Hi,
Use NVL or COALESCE:
NVL (col_a, col_b)
Returns col_a if col_a is not NULL; otherwise, it returns col_b.
Col_a and col_b must have similar (if not identical) datatypes; for example, if col_a is a DATE, then col_b can be another DATE or it can be a TIMESTAMP, but it can't be a VARCHAR2.
For more about NVL and COALESCE, see the SQL Language manual: http://docs.oracle.com/cd/E11882_01/server.112/e26088/functions119.htm#sthref1310
I hope this answers your question.
If not, post a little sample data (CREATE TABLE and INSERT statements, relevant columns only) for all tables involved, and also post the results you want from that data.
Explain, using specific examples, how you get those results from that data.
Always say which version of Oracle you're using (e.g., 11.2.0.2.0).
See the forum FAQ: https://forums.oracle.com/message/9362002 -
How can i remove a key and its value from properties file
hi all,
i want remove a particular key and associated value from the
properties file. is their any standard way of doing?
thanks inadvance
dayahi,
thanks
i am able to remove the key,
one more question how can avoid storing date and time
in properties file.
thanks
daya -
Recording measured voltage and current values from LCR 4284A
Hello,
I want to use the labview VI to record the measured voltage and current values from LCR 4284A. These are shown as Vm and Im on the instrument screen. Is it possible to record these values using a VI?
I have looked through the drivers that are available through the "Instrument driver network" (Link) for 4284A but none of the VIs give any option to monitor Vm and Im. If you know how this can be done then I would really appreciate a reply.
Thanks
MansoorI haven't used the instrument but there are functions to enable/read voltage level and current level monitors. Are those different than what you are asking for? What does the manual say about Vm and Im and programatically getting them? If you can find the command in the manual, you can just open the VI Tree and do a text search for the command.
-
Getting values from a function module called in a WDA method
Friends,
I am trying to execute a function module from WDA.
I have created a service call for the function module. The function module takes values from the user, looks up the corresponding values of another field and returns the values in an internal table.
I am using the "Method Call in Used Controller" of WD Code wizard to call the function module.
When the event handler method containing the call to the function module is executed, nothing happens.
I am not sure how to pass values to the function module and to get the return values from the function module.
I am new to using function modules from WDA. Please help me out.
Thanks and Regards.Rashmi,
Is the function module intended to collect input data from the UI and process it? - Yes
If yes, then the input (importing parameter) to the Function Module is a table of values (which should be ideally from the context mapped to the Table UI Element). - The importing parameter is a single value NOT a table and is mapped to the view context.
Now this table UI Element is bound to the view controller context , which in turn is mapped to the component controller context. And you are indeed being able to read the value of this internal table in the component controller method where the function module is being called by means of get_static_attributes_table (Is this right? - Yes, I am able to read the table of values that is passed from the component controller view to form view context by using get_static_attributes_table.
Or are you being able to read it in the event handler method of the view controller and not being able to read it in the component controller method) -
The function module takes a single value as import parameter and returns a table of values as return value.
It works fine when no importing parameter is being used and returns the table of values that is getting passed from component controller context to form view context when i am able to read it using get_static_attributes_table.
Now the question is: how to pass the import parameter value to the function module. I assumed since the importing parameter is a context node (like the return values are), i should set the value ( captured when the user enters the value in the form) to the importing parameter context attribute using set_attribute method. Since it is mapped to the component controller context, i assumed it will get passed and the method will take it as input parameter.
Let me know if my assumptions are correct regarding passing the import parameters and what is missing here.
Thanks and Regards. -
Returning multiple values from a function
Hello everyone,
I am pretty new to actionscript and flex and one thing i am not entirly sure it is done is how to get the value in actionscript when returning multple values.
for example i have the following function:
public function sayhello():string
var hello:String="hello World";
return hello
var myvalue:String=sayhello();
trace(myvalue);
How do go about getting the values of two returns:
public function sayhello():string
var strhello:String="hello";
var strWorld:String="World";
return strhello,strWorld;
var myvalue1:String=?????
var myvalue2:String=???To solve this problem you must use a object for storing complex return value.
You can do it using inline anonymous object:
public function sayhello():Object
return {strHello: "hello";strWorld: "World"}
and accesing result as:
var obj:Object = sayhello();
var strHello:String = obj.strHello;
You may also create a custom class
class HelloWorldResult{
public var strHello:String;
public var strWorld:String;
and return a new instance of this class from your method:
public function sayhello():HelloWorldResult
var hwr:HelloWorldResult = new HelloWorldResult();
hwr.strHello = "Hello";
hwr.strWorld = "World";
return hwr; -
Getting Return values from RFC function call with visual basic
Hi,
I am creating a sample app to connect to a SAP system which call its RFC functions created with ABAP. It was known that the function will return more than 1 return values.
SAP Function name ==> "ZFMTP_RFC_GET_RESULT"
Export parameters (to SAP):
- Student Name [char 10] ==> "STUNAME"
- Student ID [char 20] ==> "STUID"
Return values (From SAP):
- Results [char 10] ==> "RESULT"
- Remarks [char 200] ==> "REMARKS"
i have managed to get sample codes for connecting and call a RFC function with vb but they only get a return value. How do i retrieve multiple return values like the above function "RESULT" and "REMARKS"?
Here's my vb code to accessing the function
Dim R3 As Object
Dim FBFunc As Object
Dim returnFunc As Boolean
Dim connected As Boolean
R3 = CreateObject("SAP.Functions")
R3.Connection.Client = "000"
R3.Connection.User = "BCUSER"
R3.Connection.Password = "minisap"
R3.Connection.Language = "DE"
R3.Connection.System = "dtsystem"
R3.Connection.Applicationserver = "xxx.xxx.xxx.xxx"
connected = R3.Connection.Logon(0, True)
If connected <> True Then
MsgBox("Unable to connect to SAP")
End If
FBFunc = R3.add("ZFMTP_RFC_GET_RESULT")
FBFunc.exports("STUNAME") = "Jonny"
FBFunc.exports("STUID") = "12345"
returnFunc = FBFunc.Call() <<== How do i get the return value? or RESULT and REMARKS of the RFC Function?
thanks alot.
Edited by: Eugene Tan on Mar 4, 2008 7:17 AMHi Gregor,
Thanks for the link....i am having some doubts with the codes, hope you can clarify them for me if you know the codes..
Below is the code snippet.
Set impReturn = CHPASS_FN.Imports("RETURN") <<=== is RETURN the standard keyword to get a return object?
expPassword.Value = currpass
expNewPass.Value = newpass
expFillRet.Value = "1"
''' Call change password function
If CHPASS_FN.Call = True Then
outFile.Write (", Called Function")
Message = impReturn("MESSAGE") <<==== So if i have 3 return values..i just replace with the return value variable names?
outFile.WriteLine " : " & Message
Else
outFile.Write (", Call to function failed")
End If
thanks alot...all your help is very appreciated. -
Returning sql statement instead of values from database
hi am reading value from database but my problem is am get sql statement values instead of values in database
my code is
java:337)There is no doubt: you get what you want:
return s_getValue;
bye
TPD -
Return value from database function taking a lot more time than the query
Hi guys,
I have a Query that does a call to a database function. The function takes in a few parameters and returns a Date. Now, the query within the function takes barely .05 seconds. However, doing a select get_join_dates from dual is taking almost 6 seconds for each call.
Here is the Query:
select s.student_id, s.student_name, s.organization_code
from student s
where s.student_id = :p_student_id
and s.student_enrollment_date = get_join_dates( :p_year,
:p_month,
:p_student_id,
s.organization_code );And here is the database function. The select inside this function barely takes 0.05 seconds per call. This function gets called 3 times in my case as there are 3 records in the org_body table for this student.
create or replace function
get_join_dates( p_yyyy in org_body.fiscal_yyyy%type,
p_month in org_body.fiscal_mm%type,
p_student_id in student.student_id%type,
p_organization_code in org_body.organization_code%type) return date as
t_enrollment_date date;
cursor cur_latest_enrollment_date is
select max(enrollment_date)
from org_body
where fiscal_yyyy = p_yyyy
and fiscal_mm = p_month
and student_id = p_student_id
and organization_code = p_organization_code;
BEGIN
open cur_latest_enrollment_date ;
fetch cur_latest_enrollment_date into t_enrollment_date;
close cur_latest_enrollment_date ;
return t_enrollment_date;
exception
when others then
null;
end;owever, when I run the following statement below, it takes close to 6 seconds to retrieve a record. In turn, my Query is becoming really slow and taking almost 35 seconds. Imagine that with more records.
select get_join_dates( 2010, '01', '2167543', 'PSYCH01' ) from dual;If I run my query with this condition below, it takes 0.5 seconds.
select s.student_id, s.student_name, s.organization_code
from student s
where s.student_id = :p_student_id
and s.student_enrollment_date = '01-JAN-10'Any ideas would be greatly appreciated.Any reason why you are doing this with the stored function?
You could just do this with SQL. Embed the query in the function as a subquery in your initial query from STUDENT.
select s.student_id, s.student_name, s.organization_code
from student s
where s.student_id = :p_student_id
and s.student_enrollment_date =
(select max(enrollment_date)
from org_body
where fiscal_yyyy = :p_year
and fiscal_mm = :p_month
and student_id = s.student_id
and organization_code = s.organization_code);Why your function is not performing: I cannot say that with the information you have provided.
Maybe sqltrace a call and see what the reason is. -
Read and write Values from Configuration File in BizTalk
There is a requirement where Biz talk orchestration read the value dynamically from Config Store.After some process updating the value in config store.
I though to use SQL Server and create one table with single column.Biztalk will call the Storeproc to get the value and similary for update system will call another SP.
Instead of using SQL Server DB is there option to implement this requirement like app.config,BTSsvcxxexe.config ,SSO Config store etc.
If multi-users access the value from Config store and try to update ,how to handle lock mechanism.Hi BizQ,
Refrain from using BTSConfig file or any custom config file if you have a requirement to update the data. Modifying a
configuration file at runtime can cause some nasty, unexpected behavior inside your application if it's not managed properly.
I would suggest you to use Custom DB or SSO Database in this case.
Both have their Pros and Cons.
SSO Database:
You get out of the box encryption
It is a central store which will service all BizTalk servers within your group
SSO implements a caching mechanism internally for the data
Custom DB:
By storing the configuration in the database you don’t have to worry about consistency of data across servers like you would with a config file.
Cache needs to be implemented by program to avoid delays in reading from physical file.
In your case I recommend to go with SSO DB as in terms of storing custom configuration data in SSO for End Point/Application
specific information and credentials and potentially configuration information which you also need to write and update at runtime from your code or via an administrator.
You can use Richard Seroter's tool to store values as "Config Store" in SSO database and then write a .net helper
utility to retrieve it using SSOConfigStore class. It has method GetConfigInfo and you need to pass application name with other parameters. It returns ConfigurationPropertyBag from where you can read property name and values.
http://seroter.wordpress.com/2007/09/21/biztalk-sso-configuration-data-storage-tool/
http://blogs.msdn.com/b/teekamg/archive/2009/08/19/sso-configuration-application-mmc-snap-in.aspx.
Rachit
Please mark as answer or vote as helpful if my reply does -
How to have an Oracle procedure send and receive value from a java program.
The below procedure is place inside a package. This procedure "get_extract_ready_headers " is selecting columns store_number, terminal_number, tran_number, tran_date, cust_id from the source REX_HEAD_EXTRACT table. This information is selected into a ref cursor. The data has cust_id field which is encrypted. How do I modify the procedure get_extract_ready_headers and accomplish 2 things?
1. Make this procedure to read the "cust_id" value from the source table and send the value to a Java program "getheaderinfo" (this java program decrypts the cust_id field).
2. When we get the unencrypted value back from the Java program, make the procedure accept this decrypted value and use it to update CUST_ID value in the target table TRAN_HEAD table. I am using Oracle 11.2.0.2, and TOAD 10.5.1.3.
-- Procedural code
PROCEDURE get_extract_ready_headers (p_records OUT SYS_REFCURSOR)
IS
BEGIN
OPEN p_records FOR
SELECT store_number, terminal_number, tran_number, tran_date, cust_id FROM REX_HEAD_EXTRACT;
END;--Table Structure for source table REX_HEAD_EXTRACT
CREATE TABLE REX_HEAD_EXTRACT
REX_SEQ_NBR NUMBER(20),
REVISION_NUMBER NUMBER,
DAY NUMBER(3),
RESA_TRAN_SEQ_NO NUMBER(20),
BUSINESS_DATE DATE,
TRAN_SEQ_NBR NUMBER(12),
ORG_NUMBER NUMBER,
STORE_NUMBER NUMBER,
TRAN_DATE DATE,
TERMINAL_NUMBER NUMBER,
TRAN_NUMBER NUMBER,
TRAN_TIME DATE,
BATCH_NUMBER VARCHAR2(8 BYTE),
BATCH_TYPE VARCHAR2(4 BYTE),
TRAN_TYPE VARCHAR2(4 BYTE),
SUB_TRAN_TYPE VARCHAR2(4 BYTE),
CLERK_CODE VARCHAR2(15 BYTE),
TRAN_TAXABLE_AMOUNT NUMBER(12,2),
TRAN_TAX_TOTAL NUMBER(12,2),
TRAN_GROSS_TOTAL NUMBER(12,2),
COUP_TOTAL NUMBER(9,2),
MKD_TOTAL NUMBER(9,2),
EMPLOYEE_NUMBER VARCHAR2(15 BYTE),
EMPLOYEE_NAME VARCHAR2(40 BYTE),
TRAN_ALTTAXABLE_AMOUNT NUMBER(12,2),
TRAN_ALTTAX_TOTAL NUMBER(12,2),
SALE_AMOUNT NUMBER(9,2),
RETURN_AMOUNT NUMBER(9,2),
RETURNED_AMOUNT NUMBER(9,2),
NETCASH NUMBER(12,2),
TENDER_CODE VARCHAR2(4 BYTE),
MULT_RCPT VARCHAR2(1 BYTE),
SPLIT_TENDER VARCHAR2(1 BYTE),
RTN_WITH_PURCHASE VARCHAR2(1 BYTE),
RTN_WITH_RCPT VARCHAR2(1 BYTE),
REASON_CODE VARCHAR2(4 BYTE),
PASSWORD VARCHAR2(10 BYTE),
RINGTIME DATE,
CUST_NUMBER VARCHAR2(12 BYTE),
CUST_ID VARCHAR2(50 BYTE),
ZIP_CODE NUMBER,
POSTAL_CODE VARCHAR2(9 BYTE),
PV_TIME_LAPSE NUMBER,
ORIG_STORE_NBR NUMBER,
ORIG_TRAN_DATE DATE,
ORIG_TRAN_TYPE VARCHAR2(4 BYTE),
ORIG_TERM_NBR NUMBER,
ORIG_TRAN_NBR NUMBER,
ORIG_SALE_AMT NUMBER(12,2),
ORIG_TENDER_CODE VARCHAR2(4 BYTE),
ORIG_CLERK_CODE VARCHAR2(15 BYTE),
PREV_TRAN_TYPE VARCHAR2(4 BYTE),
PREV_SUB_TRAN_TYPE VARCHAR2(4 BYTE),
GIFT_REGISTRY_ID VARCHAR2(25 BYTE),
NO_OF_ITEMS NUMBER,
TAX_EXEMPT_ID VARCHAR2(18 BYTE),
TRAN_RINGTIME NUMBER,
AUDITED VARCHAR2(1 BYTE),
BATCH_VERSION NUMBER(9,2),
BATCH_SOURCE VARCHAR2(5 BYTE),
CREATE_DATE DATE,
CREATE_ID VARCHAR2(32 BYTE),
CREATE_PROC VARCHAR2(32 BYTE),
MOD_DATE DATE,
MOD_ID VARCHAR2(32 BYTE),
MOD_PROC VARCHAR2(32 BYTE),
TERMINAL_GROUP NUMBER,
USER_DEF_1 NUMBER,
USER_DEF_2 NUMBER,
USER_DEF_3 NUMBER,
USER_DEF_4 NUMBER(12,2),
USER_DEF_5 NUMBER(12,2),
USER_DEF_6 NUMBER(12,2),
USER_DEF_7 VARCHAR2(50 BYTE),
USER_DEF_8 VARCHAR2(50 BYTE),
USER_DEF_9 VARCHAR2(50 BYTE),
MANAGER_NUMBER VARCHAR2(15 BYTE),
MANAGER_REASON_CODE VARCHAR2(10 BYTE),
MANAGER_SWIPED VARCHAR2(1 BYTE),
PHONE_NO NUMBER(11),
KCPOS_KTH_USER_101 NUMBER,
KCPOS_KTH_USER_102 NUMBER,
KCPOS_KTH_USER_103 NUMBER,
KCPOS_KTH_USER_104 NUMBER,
KCPOS_KTH_USER_105 NUMBER,
KCPOS_KTH_USER_106 NUMBER,
KCPOS_KTH_USER_107 NUMBER,
KCPOS_KTH_USER_108 NUMBER,
KCPOS_KTH_USER_109 NUMBER,
KCPOS_KTH_USER_110 NUMBER,
KCPOS_KTH_USER_201 NUMBER(12,2),
KCPOS_KTH_USER_202 NUMBER(12,2),
KCPOS_KTH_USER_203 NUMBER(12,2),
KCPOS_KTH_USER_204 NUMBER(12,2),
KCPOS_KTH_USER_205 NUMBER(12,2),
KCPOS_KTH_USER_206 NUMBER(12,2),
KCPOS_KTH_USER_207 NUMBER(12,2),
KCPOS_KTH_USER_208 NUMBER(12,2),
KCPOS_KTH_USER_209 NUMBER(12,2),
KCPOS_KTH_USER_210 NUMBER(12,2),
KCPOS_KTH_USER_301 VARCHAR2(50 BYTE),
KCPOS_KTH_USER_302 VARCHAR2(50 BYTE),
KCPOS_KTH_USER_303 VARCHAR2(50 BYTE),
KCPOS_KTH_USER_304 VARCHAR2(50 BYTE),
KCPOS_KTH_USER_305 VARCHAR2(50 BYTE),
KCPOS_KTH_USER_306 VARCHAR2(50 BYTE),
KCPOS_KTH_USER_307 VARCHAR2(50 BYTE),
KCPOS_KTH_USER_308 VARCHAR2(50 BYTE),
KCPOS_KTH_USER_309 VARCHAR2(50 BYTE),
KCPOS_KTH_USER_310 VARCHAR2(50 BYTE),
KCPOS_KTH_USER_401 DATE,
KCPOS_KTH_USER_402 DATE,
KCPOS_KTH_USER_403 DATE,
DISC_TOTAL NUMBER(9,2)
CREATE INDEX REX_HEAD_EXTRACT_NDX ON REX_HEAD_EXTRACT
(REX_SEQ_NBR, REVISION_NUMBER, STORE_NUMBER, TRAN_DATE, TERMINAL_NUMBER, TRAN_NUMBER)-- Create table DDL for target table TRAN_HEAD
CREATE TABLE NAVISTOR.KCPOS_TRAN_HEADER_BASE
TRAN_SEQ_NBR NUMBER(12),
ORG_NUMBER NUMBER,
STORE_NUMBER NUMBER,
TRAN_DATE DATE,
TERMINAL_NUMBER NUMBER,
TRAN_NUMBER NUMBER,
TRAN_TIME DATE,
BATCH_NUMBER VARCHAR2(8 BYTE),
BATCH_TYPE VARCHAR2(4 BYTE),
TRAN_TYPE VARCHAR2(4 BYTE),
SUB_TRAN_TYPE VARCHAR2(4 BYTE),
CLERK_CODE VARCHAR2(15 BYTE) NOT NULL,
TRAN_TAXABLE_AMOUNT NUMBER(12,2),
TRAN_TAX_TOTAL NUMBER(12,2),
TRAN_GROSS_TOTAL NUMBER(12,2),
COUP_TOTAL NUMBER(9,2),
MKD_TOTAL NUMBER(9,2),
EMPLOYEE_NUMBER VARCHAR2(15 BYTE),
EMPLOYEE_NAME VARCHAR2(40 BYTE),
TRAN_ALTTAXABLE_AMOUNT NUMBER(12,2),
TRAN_ALTTAX_TOTAL NUMBER(12,2),
SALE_AMOUNT NUMBER(9,2),
RETURN_AMOUNT NUMBER(9,2),
RETURNED_AMOUNT NUMBER(9,2),
NETCASH NUMBER(12,2),
TENDER_CODE VARCHAR2(4 BYTE),
MULT_RCPT VARCHAR2(1 BYTE),
SPLIT_TENDER VARCHAR2(1 BYTE),
RTN_WITH_PURCHASE VARCHAR2(1 BYTE),
RTN_WITH_RCPT VARCHAR2(1 BYTE),
REASON_CODE VARCHAR2(4 BYTE),
PASSWORD VARCHAR2(10 BYTE),
RINGTIME DATE,
CUST_NUMBER VARCHAR2(12 BYTE),
CUST_ID VARCHAR2(50 BYTE) ENCRYPT USING 'AES256' NO SALT,
ZIP_CODE NUMBER,
POSTAL_CODE VARCHAR2(9 BYTE),
PV_TIME_LAPSE NUMBER,
ORIG_STORE_NBR NUMBER,
ORIG_TRAN_DATE DATE,
ORIG_TRAN_TYPE VARCHAR2(4 BYTE),
ORIG_TERM_NBR NUMBER,
ORIG_TRAN_NBR NUMBER,
ORIG_SALE_AMT NUMBER(12,2),
ORIG_TENDER_CODE VARCHAR2(4 BYTE),
ORIG_CLERK_CODE VARCHAR2(15 BYTE),
PREV_TRAN_TYPE VARCHAR2(4 BYTE),
PREV_SUB_TRAN_TYPE VARCHAR2(4 BYTE),
GIFT_REGISTRY_ID VARCHAR2(25 BYTE),
NO_OF_ITEMS NUMBER,
TAX_EXEMPT_ID VARCHAR2(18 BYTE),
TRAN_RINGTIME NUMBER,
AUDITED VARCHAR2(1 BYTE),
BATCH_VERSION NUMBER(9,2),
BATCH_SOURCE VARCHAR2(5 BYTE),
CREATE_DATE DATE,
CREATE_ID VARCHAR2(32 BYTE),
CREATE_PROC VARCHAR2(32 BYTE),
MOD_DATE DATE,
MOD_ID VARCHAR2(32 BYTE),
MOD_PROC VARCHAR2(32 BYTE),
TERMINAL_GROUP NUMBER,
USER_DEF_1 NUMBER,
USER_DEF_2 NUMBER,
USER_DEF_3 NUMBER,
USER_DEF_4 NUMBER(12,2),
USER_DEF_5 NUMBER(12,2),
USER_DEF_6 NUMBER(12,2),
USER_DEF_7 VARCHAR2(50 BYTE),
USER_DEF_8 VARCHAR2(50 BYTE),
USER_DEF_9 VARCHAR2(50 BYTE),
MANAGER_NUMBER VARCHAR2(15 BYTE),
MANAGER_REASON_CODE VARCHAR2(10 BYTE),
MANAGER_SWIPED VARCHAR2(1 BYTE),
PHONE_NO NUMBER(11),
KCPOS_KTH_USER_101 NUMBER,
KCPOS_KTH_USER_102 NUMBER,
KCPOS_KTH_USER_103 NUMBER,
KCPOS_KTH_USER_104 NUMBER,
KCPOS_KTH_USER_105 NUMBER,
KCPOS_KTH_USER_106 NUMBER,
KCPOS_KTH_USER_107 NUMBER,
KCPOS_KTH_USER_108 NUMBER,
KCPOS_KTH_USER_109 NUMBER,
KCPOS_KTH_USER_110 NUMBER,
KCPOS_KTH_USER_201 NUMBER(12,2),
KCPOS_KTH_USER_202 NUMBER(12,2),
KCPOS_KTH_USER_203 NUMBER(12,2),
KCPOS_KTH_USER_204 NUMBER(12,2),
KCPOS_KTH_USER_205 NUMBER(12,2),
KCPOS_KTH_USER_206 NUMBER(12,2),
KCPOS_KTH_USER_207 NUMBER(12,2),
KCPOS_KTH_USER_208 NUMBER(12,2),
KCPOS_KTH_USER_209 NUMBER(12,2),
KCPOS_KTH_USER_210 NUMBER(12,2),
KCPOS_KTH_USER_301 VARCHAR2(50 BYTE),
KCPOS_KTH_USER_302 VARCHAR2(50 BYTE),
KCPOS_KTH_USER_303 VARCHAR2(50 BYTE),
KCPOS_KTH_USER_304 VARCHAR2(50 BYTE),
KCPOS_KTH_USER_305 VARCHAR2(50 BYTE),
KCPOS_KTH_USER_306 VARCHAR2(50 BYTE),
KCPOS_KTH_USER_307 VARCHAR2(50 BYTE),
KCPOS_KTH_USER_308 VARCHAR2(50 BYTE),
KCPOS_KTH_USER_309 VARCHAR2(50 BYTE),
KCPOS_KTH_USER_310 VARCHAR2(50 BYTE),
KCPOS_KTH_USER_401 DATE,
KCPOS_KTH_USER_402 DATE,
KCPOS_KTH_USER_403 DATE,
DISC_TOTAL NUMBER(9,2),
RTA_RTN_AUTCOD VARCHAR2(4 BYTE),
RTA_RTN_COMMID NUMBER,
RTA_RTN_EVNTID NUMBER,
RTA_RTN_QTY NUMBER,
RTA_RTN_RCPT_SCAN VARCHAR2(1 BYTE),
RTA_RTN_REFUND_AMT NUMBER(9,2),
RTA_RTN_TYPE_CODE VARCHAR2(4 BYTE),
RTA_RTN_WITH_RCPT VARCHAR2(1 BYTE),
RTA_RTN_COUNT INTEGER,
SDEDVAL1 VARCHAR2(50 BYTE)
)--sample data
REX_SEQ_NBR,REVISION_NUMBER,DAY,RESA_TRAN_SEQ_NO,BUSINESS_DATE,TRAN_SEQ_NBR,ORG_NUMBER,STORE_NUMBER,TRAN_DATE,TERMINAL_NUMBER,
TRAN_NUMBER,TRAN_TIME
478,1,11,12024005,6/11/2012,,1,692,6/11/2012,155,5,6/11/2012 12:57:17 PM,
479,1,11,12024006,6/11/2012,,1,692,6/11/2012,155,6,6/11/2012 2:01:51 PM,
480,1,11,12024007,6/11/2012,,1,692,6/11/2012,155,7,6/11/2012 2:47:10 PMAssuming that SomeJavePgm is a Java stored function (not a Java program running outside the database) and that it takes as a parameter whatever data type CUST_ID is in TABLE_A (hopefully RAW but potentially VARCHAR2) and returns a string, you would call it just as you would a PL/SQL stored function
INSERT INTO table_b( cust_id, <<other columns>> )
SELECT SomeJavaPgm( a.cust_id ), <<other columns>>
FROM table_a aIf SomeJavePgm is not a Java stored procedure, calling it from PL/SQL becomes much more complicated. You would need whatever machine hosts this program to expose an appropriate API (for example, a web service interface) that you could invoke via UTL_HTTP). You'd need to tell us what that API was, however.
Justin -
Selecting both static and dynamic values in a report.
Hello,
I am using the following LOV for a select list in a form based on another post (Re: Static and Dynamic LOV ordering
It is presenting five static values along with a dynamic LOV.
select d, r
from (select n, d, r
from (select 1 as n, 'NAME_A' d, 1 r
from dual
union all
select 1 as n, 'NAME_B' d, 2 r
from dual
union all
select 1 as n, 'NAME_C' d, 3 r
from dual
union all
select 1 as n, 'NAME_D' d, 4 r
from dual
union all
select 1 as n, 'NAME_E' d, 5 r
from dual
union all
select 2 as n,
(LNAME || ', ' || FNAME || ' (' ||
to_char(DOB, 'MM/DD/YYYY') || ')') display_value,
ID return_value
from my_name_table)
ORDER BY n, r asc)
The static display and return values do not exist in my_name_table, but the static return values are recorded in my_main_table when the user submits the form.
The tables look like this:
my_main_table:
record_id
name_id
my_name_table:
name_id
fname
lname
How can I present the display values associated with the static return values recorded in my_main_table along with the dynamic display values in a report? I am currently presenting the dynamic portion in a report using the following select statment:
select
(my_name_table.LNAME||', '||my_name_talbe.FNAME) AS Name
from my_name_table
WHERE my_main_table.NAME_ID = my_name_table.NAME_ID
I have the additional problem that the static return values are not in my_name_table so the join in the last statement will not find the static values in my_name_table.
Edited by: mterlesky on Feb 24, 2009 9:51 AM1. You will need to add an outer join to return all the values in the Main table.
2. Then decode the values for the static LOV.
Something like (this is not tested, but should give you the idea)
select
decode(my_main_table.NAME_ID,1,'NAME_A',2,'NAME_B',3,'NAME_C',4,'NAME_D',5,'NAME_B',(my_name_table.LNAME||', '||my_name_talbe.FNAME)) AS Name
from my_name_table
WHERE my_main_table.NAME_ID = my_name_table.NAME_ID(+)
This will all break if any of your static LOV ID values clash with your dynamic LOV ID values.
I am now going to give you a long lecture about hard coding values ..... ;)
Related info: http://simonhunt.blogspot.com/2009/02/how-to-cope-with-list-of-values-lovs.html
I hope that helps
Shunt -
Send value to BAPI and and get value from BAPI on VB 6.0
Hi All,
I want to connect SAP and send some values and get some results from BAPI with Visual Basic 6.0
I connected SAP successfull But I didn't send value to BAPI.
I want to connect SAP with BAPI_MATERIAL_GET_ALL BAPI and I want to send u2018000000000000980010u2019 parameter. So I want get the result from BAPI.
Could anyone help me about send and get value BAPI with VB 6.0?
Thanks in advanced
captivator
Edited by: captivator on Dec 10, 2010 4:24 PMHi Dinesh,
My full code is below.
I'm getting error when "Set obj = ctlLogon.GetSAPObject("BAPI_MATERIAL_GET_ALL")" code line is working.
Error : Script error in module line 30:(10091) ActiveX Automation:no such property or method
Have you got any idea?
Thanks in advanced.
Esat
Set ctlLogon = CreateObject("SAP.LogonControl.1")
Set sapConnection = ctlLogon.NewConnection
sapConnection.User = "user"
sapConnection.Client = "120"
sapConnection.Password = "1q2w3e4r"
sapConnection.ApplicationServer = "xxxxxx"
sapConnection.Language = "EN"
sapConnection.SystemNumber = "00"
booReturn = sapConnection.Logon(0, True)
If booReturn <> True Then
gSAPConnect = False
Else
gSAPConnect = True
End If
If booReturn Then
'MsgBox "Logged On successfullyu2026"
Debug.Print"Logged On successfullyu2026"
End If
Dim obj As Object
Dim return As Object
Set obj = ctlLogon.GetSAPObject("BAPI_MATERIAL_GET_ALL")
Set return = ctlLogon.DimAs(obj, "000000000000980010", "RETURN")
Maybe you are looking for
-
How to design data load process chain?
Hello, I am designing data load process chains for the first time and would like to get some general information on best practicies in that area. My situation is as follows: I have 3 source systems (R3 and two for which I use flat files). How do you
-
This problem has just come up recently and for no apparent reason as far as I can tell. I'm at college and a lot of people in the dorm, including myself, have our iTunes libraries set to share. This has worked fine for months now until a few days ago
-
How can i get rid of recovered message in my mac?
after I send an e mail with photos attached, this folder 'on my mac' is on my mail and says recovered message, can't delete. it keeps popping up. Cannot received mail. I am new to mac I don't know what to do D.
-
Hi , How to do unplanned goods issue of those components which are not in the BOM of production order. In migo we can do it by 261 and choosing others.till here its ok but against what document migo will be done. I mean to say there should be some do
-
After installing and updating mountain lion PTLense Aperture Plugin lost license
I tried to find a solution and wanted to delete PTlense from the directorie but the systems says I don't have permission??? As much as I understood I can download and install PTLense Aperture Plugin again but before I have to delete any "PTLense-Thin