RUN FUNCTION PANEL error
Hi, experts,
I'm trying to execute "RUN FUNCTION PANEL" on CVI. During constructing driver, I checked the function panel by this command, but it was failed with error message, Interactive Execution error - Unresolved symbol: _Math_Average.
I do the material in the basic CVI text, and it is very simple function. And additionally, it ran correctly when I completed the driver, then I believe that programming should be correct.
So I'm struggling with editing any settings, but I could not find the solution.
Does anybody have any solution or hint?
Thanks,
Solved!
Go to Solution.
Hello TetsuyaU!
The most obvious solution for this problem would be to enable the Interactive Execution window environment options found in Options » Environment » Interactive Window. These options specify whether project files or loaded instrument drivers are used by the Interactive Execution window. Otherwise, if the corresponding option isn't enabled, the Interactive Execution window fails to link with the symbol from your instrument driver, and you get an unresolved symbol error.
Does this work for you?
Best regards!
- Johannes
Similar Messages
-
How to display "Non-Fatal Run-Time Error In Function Panel" dialog?
I'm learning how to develop an IVI-C specific driver using LabWindows/CVI. When I run my function from its function panel and it returns an error, I would like to display a dialog with both the error code and error message (as opposed to simply returning an error code on the function panel). This would save the user from having to call Prefix_error_message() to translate the error code to its error message. NI-DCPower driver is a good example of this behavior (see attached error dialog). How do I show the "Non-Fatal Run-Time Error In Function Panel" dialog? Any help is greatly appreciated. Thanks!
Attachments:
ErrorDialog.png 8 KBHi Shawn,
Thank you for replying to my post. The checkErr is just an error handling macro defined in ivi.h to goto Error: tag when the function returns a non-zero value. I have been using the checkErr macro (as well as viCheckErr and other macros) in my driver.
Using the same hp34401a specific driver as an example, please allow me to explain my question in more details:
Let's take the hp34401a_close function as an example. It is a simple function with only a few lines of code:
When the hp34401a_close function is run from its front panel using an invalid session handle (e.g. "8" in this screen capture):
You will get three "Non-Fatal Run-Time Error" popup dialogs, one from each of the IVI library functions that it calls: Ivi_LockSession, Ivi_UnlockSession, and Ivi_Dispose. However, there is no "Non-Fatal Run-Time Error" popup dialog from the hp34401a_close itself.
My IVI-C specific driver is behaving identical to the hp34401a specific driver.
In comparison, if run niDCPower_close function from its front panel using an invalid session handle (using the same "8" in this screen capture):
You will only get one "Non-Fatal Run-Time Error In Function Panel" from the niDCPower_close function itself:
I think the behavior of niDCPower driver is much better than the hp34401a driver. It replaces the three "Non-Fatal Run-Time Error" popup dialogs from the IVI library with a single "Non-Fatal Run-Time Error In Function Panel" popup dialog from the driver function itself. I would like to do the same thing with my driver but have not figured out how to display a "Non-Fatal Run-Time Error In Function Panel" dialog. Thanks in advance for your help! -
I'm using Oracle XE Beta 1.
I can create and deploy .NET stored procedures without any errors or warnings.
But when I run the function from ODT I get the following errors:
Run Function - [email protected]
ORA-20100: The parameter is incorrect.
ORA-06512: at "SYS.DBMS_CLR", line 143
ORA-06512: at "HR.ADD99", line 7
ORA-06512: at line 1
The code that I used for my stored procedure I borrowed from a webcast and it compiled and deployed just fine.
public class Class1
public static int Add99(int val)
return val+99;
The return and parameter datatypes that I specified in the deployment wizard are both BINARY_INTEGER. So I don't see why I am getting this error.Jimmy,
There's a bug where if you have .NET 2.0 installed on the same machine as the database you will get this error. If that is the case, you'll need to uninstall .NET 2.0 on that machine until the next release of XE comes out.
(This will also affect Oracle Standard and Enterprise on windows)
Christian -
Running SQL Procedure with dg4msql errors: Function sequence error HY010
I am trying to execute a stored procedure on a SQL database and get the error Function sequence error HY010.
A simple query on a table returns teh expected result.
I have a single Win2008R2 server with MSSQL Express 2008 and Oracle 11gR2 (32bit not 64bit version of Oracle)
Below is the gateway init, listener and tnsnames files and the query I am trying to run:
-- initORIONWASP.ora --
HS_FDS_CONNECT_INFO=INGRDB//waspForGIS
HS_FDS_TRACE_LEVEL=OFF
HS_FDS_RECOVERY_ACCOUNT=RECOVER
HS_FDS_RECOVERY_PWD=RECOVER
HS_CALL_NAME=dbo.spTest;dbo.spQueryAsset;dbo.spQueryAssetDetails
HS_FDS_PROC_IS_FUNC=TRUE
HS_FDS_RESULTSET_SUPPORT=TRUE
-- Listener.ora -- (partial)
(SID_DESC =
(SID_NAME = ORIONWASP)
(ORACLE_HOME = C:\Oracle\product\11.2.0\dbhome_1)
(PROGRAM=dg4msql)
-- tnsnames.ora -- (partial)
ORIONWASP =
(DESCRIPTION=
(ADDRESS=(PROTOCOL=tcp)(HOST=INGRDB)(PORT=1521))
(CONNECT_DATA=(SID=ORIONWASP))
(HS=OK)
-- Simple Query --
Running select "Asset_ID" from asset@ORIONWASP; returns the correct result
Running select * from sys.procedures@ORIONWASP; returns a list of procedures including the procedure I want to run
-- This pl/sql block returns the error ******* identifier 'spTest@ORIONWASP' must be declared *******
declare
begin
"spTest"@ORIONWASP;
end;
-- This passthrough pl/sql block returns ******** [Oracle][ODBC SQL Server Driver]Function sequence error {HY010} ********
DECLARE
CRS BINARY_INTEGER;
RET BINARY_INTEGER;
v_COL1 VARCHAR2(50);
v_COL2 VARCHAR2(50);
BEGIN
CRS := DBMS_HS_PASSTHROUGH.OPEN_CURSOR@ORIONWASP;
DBMS_HS_PASSTHROUGH.PARSE@ORIONWASP(CRS, 'exec spTest');
BEGIN
RET := 0;
WHILE (TRUE)
LOOP
ret := DBMS_HS_PASSTHROUGH.FETCH_ROW@ORIONWASP(CRS, FALSE);
DBMS_HS_PASSTHROUGH.GET_VALUE@ORIONWASP(CRS, 1, v_COL1);
DBMS_HS_PASSTHROUGH.GET_VALUE@ORIONWASP(CRS, 2, v_COL2);
DBMS_OUTPUT.PUT_Line('Col1:'||v_COL1||' Col2:'||v_COL2);
END LOOP;
EXCEPTION
WHEN NO_DATA_FOUND THEN
BEGIN
DBMS_OUTPUT.PUT_LINE('End of Fetch');
DBMS_HS_PASSTHROUGH.CLOSE_CURSOR@ORIONWASP(CRS);
END;
END;
END;
/The gateway configuration file contains:
HS_FDS_PROC_IS_FUNC=TRUE
HS_FDS_RESULTSET_SUPPORT=TRUE
This setting commonly causes problems and you need to set
HS_FDS_PROC_IS_FUNC=TRUE
HS_FDS_RESULTSET_SUPPORT=FALSE
for normal procedure calls and
HS_FDS_PROC_IS_FUNC=FALSE
HS_FDS_RESULTSET_SUPPORT=TRUE
when calling the procedure with ref cursors.
There's a note in My Oracle Support that gives you examples how to call remote SQl Server procedures
Note.197192.1 Different Methods How To Call MS SQL Server Procedures Using TG4MSQL - DG4MSQL
and another one for the Sybase gateway but this code is similar for the SQL Server:
Article-ID: Note 351400.1
Title: How to Call a Remote Sybase Procedure Using TG4SYBS -
How do I trace a function sequence error?
Hi,
can anyone tell me how I trace a function sequence error?
I have a piece of VB code (that has worked on many occassions, which runs to 9i.
I deleted the contents of my tables and then tried to run the same code again but got the following error message:
run time error '-2147467259 (80004005)':
[Oracle][ODBC]Function sequence error.
ODBC does not create a trace file for this error and I was wondering if there is any other way for me to find what is actually causing this problem.
thanks in advance,
Ed.You should be able to enable tracing through the ODBC Data Sources manager on the Control Panel.
Cheers, APC -
Function returning error text validation
Hi,
I have a page where i can insert/update user, organisation, responsible.
Organisation can be nullable.
Only one user at a time can be responsible for a organisation.
To check this responsible validation i made a function returning error text validation as follow:
BEGIN
FOR c IN (SELECT usr_spa
FROM kpi_users
WHERE usr_org_id = :p22_usr_org_id
LOOP
IF upper(:p22_usr_spa) = upper('YES') and upper(c.usr_spa) = upper('YES')
THEN
RETURN 'A user is already responsible for this organisation'||'!';
END IF;
END LOOP;
END;
The validation works fine.
But it goes wrong when i want to insert a new user, without assigning him to an organisation.
I get following message:
ORA-01722: invalid number
ERR-1024 Unable to run "function body returning text" validation.
Can someone please help me solve this problem?
ThanksHi,
try:
BEGIN
FOR c IN (SELECT usr_spa
FROM kpi_users
WHERE usr_org_id = nvl(:p22_usr_org_id,-1)
LOOP
IF upper(:p22_usr_spa) = upper('YES') and upper(c.usr_spa) = upper('YES')
THEN
RETURN 'A user is already responsible for this organisation'||'!';
END IF;
END LOOP;
END;This assumes that :p22_usr_org_id could be null and converts this to -1 (pick another default value if this may exist as an id). It is possible that the statement would otherwise be seen as WHERE usr_org_id = null which is invalid.
or you could do:
BEGIN
IF :p22_usr_org_id IS NOT NULL THEN
FOR c IN (SELECT usr_spa
FROM kpi_users
WHERE usr_org_id = :p22_usr_org_id
LOOP
IF upper(:p22_usr_spa) = upper('YES') and upper(c.usr_spa) = upper('YES')
THEN
RETURN 'A user is already responsible for this organisation'||'!';
END IF;
END LOOP;
END IF;
END;As this would stop the validation running if the :p22_usr_org_id is null.
Or, you could just make your validation conditional on p22_usr_org_id not being null?
Andy -
To_numer function return error in pl/sql
Hello,
I don't have a prob when running select to_number('1234.56') from dual, the numer contains digit decimal
But this stm return error Invalid number in procedure unless I use to_number('1234.56','9999999.99')
Please help me out.
Do I have to set parameter in DB ?
BTW: my NLS_NUMERIC_CHARACTER is set to '.,'
Thanks.to_numer function return error in pl/sql
hlthanh wrote:
Hello,
I don't have a prob when running select to_number('1234.56') from dual, the numer contains digit decimal
But this stm return error Invalid number in procedure unless I use to_number('1234.56','9999999.99')
Please help me out.
Do I have to set parameter in DB ?
BTW: my NLS_NUMERIC_CHARACTER is set to '.,'
Thanks.Handle: hlthanh
Status Level: Newbie
Registered: Mar 7, 1999
Total Posts: 94
Total Questions: 60 (38 unresolved)
so many questions & so few answers.
How SAD! -
I've recently started using the preflight panel in ID CS4 when I produce my company's 4/c process covers.
I have set up a custom preflight profile so that under:
- IMAGES and OBJECTS > Image Resolution > color, grayscale and 1-bit images are checked off and set at minimum resolution of 300dpi.
- COLOR > Color Spaces and Modes Not Allowed: RGB, Spot Color, and Lab are checked off.
> Spot Color Setup > Predefined Spot Colors Must: Use CMYK Equivalents
However, when I place some EPS files, I'm getting preflight panel errors indicating that the EPS file has an effective resolution less than that of 300dpi I set in my custom profile, and that the "content" uses spot color.
I opened up the EPS files in AI CS4 and the doc info says no spot colors. And when I package the ID files with the EPS graphics, the summary says that no spot colors were found. Also, these are postscript files...why would I get a resolution error? Besides, the EPS files are at 100%.
Why the spot color error? Help!Run the EPS files thru Illustrator and sava as to proper current .ai files and replace and see if the problem persists.
Mike Witherell in Maryland -
How to run functions when changing states?
Hi everybody
I want to run function when changin states
For example I change my state and write something on Panels title and when this state appears i want to read my title and to do smth
How can I do it. Where is my mistake?
<?xml version="1.0" encoding="utf-8"?>
<mx:Application
xmlns:mx="http://www.adobe.com/2006/mxml" verticalAlign="middle"
width="340" height="250"
layout="absolute"
currentStateChange="StateChangez();">
<mx:Script>
<![CDATA[
public function StateChangez():void
if (currentState=='a')
//Alert.show('a');
if (Panel1.title=='New')
Alert.show('New');
else
Alert.show('Edit');
else
Alert.show('b');
]]>
</mx:Script>
<mx:states>
<mx:State name="a">
<mx:RemoveChild target="{button1}"/>
<mx:RemoveChild target="{button2}"/>
<mx:AddChild position="lastChild">
<mx:Panel x="0" y="40" width="340" height="210" layout="absolute" id="Panel1">
</mx:Panel>
</mx:AddChild>
<mx:RemoveChild target="{button3}"/>
</mx:State>
<mx:State name="b">
<mx:RemoveChild target="{button2}"/>
<mx:RemoveChild target="{button1}"/>
<mx:RemoveChild target="{button3}"/>
<mx:AddChild position="lastChild">
<mx:Label x="10" y="222" text="b"/>
</mx:AddChild>
</mx:State>
</mx:states>
<mx:Script>
<![CDATA[
import mx.controls.Alert;
]]>
</mx:Script>
<mx:Button label="New" x="10" y="10" id="button1" click="currentState='a';Panel1.title='New';"/>
<mx:Button x="68" y="10" label="Edit" id="button2" click="currentState='a';Panel1.title='Edit';"/>
<mx:Button x="10" y="218" label="b" click="currentState='b';" id="button3"/>
<mx:Button x="265" y="10" label="Read" click="StateChangez()"/>
</mx:Application>
Message was edited by: AtomicRussianHi,
I think your event handler "StageChangez()" is called before your Panel title is set. Try first change title, then change currentState.
Oh yes my mistake, you are adding it when state changes. You can put your Panel's title change in StageChangez() and after that you can do some actions.
Regards,
Adrian
Message was edited by: AdrianWiecek -
What (the hell) is SQL Exception called Function sequence error?
...doing in a code like this:
ResultSet friends=...executeQuery...
while (friends.next())
log.append(friends.getString("sendergsm"));
somewhere in between that loop, or sometimes the loop runs out fine, and sometimes it throws SQLException called General Error. Not guite normal...Thank you for replying... that must be agains some of the policies of the sun, to make methods that may be called normally, but may cause an error.
Anyway, this is my first database application. The number of problems I've had in few days is unbelivable. I wonder does it load the drivers from disk or something everytime it reads one record from database. I mean when I did the above query, the table had about 10 entries (the program showed 5 to 10 before function sequense error) and displaying each record to TextArea took over second. (In paradox (The dosversion) this would have taken less than a second).
And paradox tables doesn't work at all because it raises exception: Table isn't expected format. If I set paradox 4.0 drivers and put paradox 4.0 tables, you would guess that the format would be expected. And you cannot create paradox tables with SQL. Now I need to use access databases. How can database containing 60 records be 500kb:s? When it will contain 50000 new records every day, i guess I'll be in problem. Each tranaction (say 5 simple queries) taking minutes... heelp meee!! -
[ODBC Driver Manager] Function sequence error
Hi all,
i´m trying to built an webservice and if i try to run my code i get following
error: [ODBC Driver Manager] Function sequence error .CAn someone tell me what
this means?
Here comes my code:
static String Daten(int Nummer)
java.sql.Connection conn = null;
java.sql.Statement stmt = null;
try
Context ctx = null;
Hashtable ht = new Hashtable();
ht.put(Context.INITIAL_CONTEXT_FACTORY,
"weblogic.jndi.WLInitialContextFactory");
ht.put(Context.PROVIDER_URL,
"t3://localhost:7001");
// Get a context for the JNDI look up
ctx = new InitialContext(ht);
javax.sql.DataSource ds
= (javax.sql.DataSource) ctx.lookup ("webservice-data-source");
conn = ds.getConnection();
System.out.println("Making connection...\n");
// execute some SQL statements to demonstrate the connection.
stmt = conn.createStatement();
System.out.println("Vor ResultSet");
ResultSet result = stmt.getResultSet(); //Bringt Fehler
final Vector erstespalte = new Vector();
final Vector zweitespalte = new Vector();
final Vector drittespalte = new Vector();
final Vector Zeilen;
final Vector end = new Vector();
try {//2.Block
stmt.executeQuery("Select * from Person where Kundennummer=5");
while(result.next())
erstespalte.add(result.getObject(1));
zweitespalte.add(result.getObject(2));
drittespalte.add(result.getObject(3));
Zeilen = new Vector();
for(Enumeration a = erstespalte.elements() ; a.hasMoreElements()
for(Enumeration b = zweitespalte.elements() ;b .hasMoreElements()
for(Enumeration c = drittespalte.elements() ; c.hasMoreElements()
Zeilen.add(a.nextElement());
Zeilen.add(b.nextElement());
Zeilen.add(c.nextElement());
end.add(Zeilen);
}System.out.println(end);
result.close();
}//2.try-Block
catch (SQLException e) {
System.out.println(e);
}//1.try-Block schliessen
catch (Exception e) {
System.out.println("Exception was thrown: " + e.getMessage());
finally {
try {
if (stmt != null)
stmt.close();
if (conn != null)
conn.close();
catch (SQLException sqle) {
System.out.println("SQLException during close(): " + sqle.getMessage());
}//finally-Block schliessen
return ("HAllo");
}//Methode abschliessen
Thank you very much for helping !!!Please post this in the JDBC newsgroup: weblogic.developer.interest.jdbc
Also, please include your full error message.
-- Rob
Hakan wrote:
Hi all,
i´m trying to built an webservice and if i try to run my code i get following
error: [ODBC Driver Manager] Function sequence error .CAn someone tell me what
this means?
Here comes my code:
static String Daten(int Nummer)
java.sql.Connection conn = null;
java.sql.Statement stmt = null;
try
Context ctx = null;
Hashtable ht = new Hashtable();
ht.put(Context.INITIAL_CONTEXT_FACTORY,
"weblogic.jndi.WLInitialContextFactory");
ht.put(Context.PROVIDER_URL,
"t3://localhost:7001");
// Get a context for the JNDI look up
ctx = new InitialContext(ht);
javax.sql.DataSource ds
= (javax.sql.DataSource) ctx.lookup ("webservice-data-source");
conn = ds.getConnection();
System.out.println("Making connection...\n");
// execute some SQL statements to demonstrate the connection.
stmt = conn.createStatement();
System.out.println("Vor ResultSet");
ResultSet result = stmt.getResultSet(); //Bringt Fehler
final Vector erstespalte = new Vector();
final Vector zweitespalte = new Vector();
final Vector drittespalte = new Vector();
final Vector Zeilen;
final Vector end = new Vector();
try {//2.Block
stmt.executeQuery("Select * from Person where Kundennummer=5");
while(result.next())
erstespalte.add(result.getObject(1));
zweitespalte.add(result.getObject(2));
drittespalte.add(result.getObject(3));
Zeilen = new Vector();
for(Enumeration a = erstespalte.elements() ; a.hasMoreElements()
for(Enumeration b = zweitespalte.elements() ;b .hasMoreElements()
for(Enumeration c = drittespalte.elements() ; c.hasMoreElements()
Zeilen.add(a.nextElement());
Zeilen.add(b.nextElement());
Zeilen.add(c.nextElement());
end.add(Zeilen);
}System.out.println(end);
result.close();
}//2.try-Block
catch (SQLException e) {
System.out.println(e);
}//1.try-Block schliessen
catch (Exception e) {
System.out.println("Exception was thrown: " + e.getMessage());
finally {
try {
if (stmt != null)
stmt.close();
if (conn != null)
conn.close();
catch (SQLException sqle) {
System.out.println("SQLException during close(): " + sqle.getMessage());
}//finally-Block schliessen
return ("HAllo");
}//Methode abschliessen
Thank you very much for helping !!! -
SQL developer 3.1 throws Function sequence error
Hi,
I was able to connect to my remote timesten db and was able to compile and execute packages.
I tried modifying one of my packages to include dbms_lock.sleep in my code and then compiled the package.
while running the package i got some error related to locking.
The strange this is after this i am not able to connect to the timesten db using sql developer.
An error is thrown, "Could not connect to the database Function sequence error"
I tried restarting the timesten server and then also the same error exists.
How can i resolve this?
regards
LalHi,
This looks like a problem with the SQL*Developer Early Adopter release itself so it would be better if you opened a new thread in the SQL*Developer forum -
SQL Developer
That is monitored by the developers more than this thread so they are more likely to see it.
Regards,
Mikei -
Ni-DAQ 7.1 and CVI Function panels
I have an XP system running TestStand 1.0.3 with CVI 6.0, and hardware NI-4070 and NI-6713. I have downloaded NI-DAQ 7.1 driver. However, I cannot find any CVI function panels for the DAQ. During the installation, I selected CVI and all it's subfeatures, but I did not see any installed.
Hi,
To offer support for driver upgrades. the NI-DAQ installer is the one that installs the DAQ libraries for CVI. The first thing to try is to run the NI-DAQ installer from the add/remove programms applet and make sure that support for CVI is selected.
FYI: CVI 6.0 only supports the Traditional DAQ driver, to use DAQmx you would need to upgrade to CVI 7.0; click here for more info.
I hope this helps.
Regards,
Juan Carlos
N.I. -
Pipeline Function Showing Error.
Hi,
I have created a popeline finction in a packages...
CREATE OR REPLACE package xx is
type xxaptab_tp is record (FLAG CHAR(1),
LEDGER VARCHAR2(30),
OPERATING_UNIT VARCHAR2(240) ,
GL_DATE DATE ,
TYPE CHAR(1),
VOUCHER_NO NUMBER,
VOUCHER_DATE DATE,
CHECK_NUMBER VARCHAR2(40),
CHECK_DATE VARCHAR2(11),
VENDOR_NAME VARCHAR2(240),
DESCRIPTION VARCHAR2(240),
RECEIPTS NUMBER,
PAYMENTS NUMBER,
PAYMENTS1 NUMBER,
BANK_ACCOUNT_NAME VARCHAR2(100) ,
BANK_ACCOUNT_NUM VARCHAR2(30),
PROJECT_NAME VARCHAR2(240),
NATURE_OF_PAYMENT VARCHAR2(80),
NATURE_OF_RECEIPT varchar2(100),
CHECK_ID NUMBER(15) ,
CHECK_STATUS VARCHAR2(25),
FUTURE_PAY_DUE_DATE DATE);
type rec_type is table of xxaptab_tp ;
function xxbank_cashbook return rec_type pipelined;
end;
CREATE OR REPLACE package body xx is
function xxbank_cashbook(st_gldate date default null, end_gldate date default null) return rec_type pipelined is
r_type rec_type;
PRAGMA AUTONOMOUS_TRANSACTION;
begin
execute immediate('truncate table xx_ap_check_89i');
execute immediate('truncate table xx_ap_check_1910');
insert into xx_ap_check_1910
SELECT MIN(b.invoice_id) ID
, check_id
FROM ap_invoice_payments_all b
, ap_invoices_all a
, DUAL
WHERE 1 = 1
AND a.invoice_id = b.invoice_id
AND NOT REGEXP_LIKE (a.invoice_num ,'(-TDS-SI-|-TDS-CM-|-RTN-)')
GROUP BY check_id;
commit;
insert into xx_ap_check_89i
SELECT MIN(b.invoice_id) ID
, check_id
FROM ap_invoice_payments_all b
, ap_invoices_all a
, DUAL
WHERE 1 = 1
AND (CHECK_ID,'TRUE') = (
select AIP.CHECK_ID,
MIN (CASE WHEN REGEXP_LIKE (aia.invoice_num ,'(-TDS-SI-|-TDS-CM-)') THEN 'TRUE'--WHEN aia.invoice_num not LIKE '%-TDS-SI-%' THEN 'FALSE'
ELSE 'FALSE' END) FLAG
from ap_invoice_payments_all aip, ap_invoices_all aia
where aip.invoice_id = aia.invoice_id
and aip.check_id = b.check_id
group by check_id
AND a.invoice_id = b.invoice_id
GROUP BY check_id;
commit;
select FLAG,
LEDGER,
OPERATING_UNIT,
GL_DATE,
TYPE,
VOUCHER_NO,
VOUCHER_DATE,
CHECK_NUMBER,
CHECK_DATE,
VENDOR_NAME,
DESCRIPTION,
RECEIPTS,
PAYMENTS,
PAYMENTS1,
BANK_ACCOUNT_NAME,
BANK_ACCOUNT_NUM,
PROJECT_NAME,
NATURE_OF_PAYMENT,
NATURE_OF_RECEIPT,
CHECK_ID,
CHECK_STATUS,
FUTURE_PAY_DUE_DATE bulk collect into r_type
from
( SELECT '1' flag
, led.NAME ledger
, hou.NAME operating_unit
, aip.accounting_date gl_date
, 'P' TYPE
, apc.doc_sequence_value voucher_no
, apc.creation_date voucher_date
, TO_CHAR(apc.check_number) check_number
, TO_CHAR(apc.check_date, 'DD-MON-YYYY') check_date
, apc.vendor_name vendor_name
, apc.description description
, TO_NUMBER(DECODE(
SIGN((apc.amount))
, -1,(apc.amount * NVL(apc.exchange_rate, 1)) * -1
, 0
)) receipts
, TO_NUMBER(DECODE(
SIGN((apc.amount))
, 1,(apc.amount * NVL(apc.exchange_rate, 1))
, 0
)) payments
, TO_NUMBER(apc.amount * NVL(apc.exchange_rate, 1)) payments1
, cba.bank_account_name bank_account_name
, cba.bank_account_num bank_account_num
, ffvv.description project_name
, flv.meaning nature_of_payment
, NULL nature_of_receipt
, aip.check_id check_id
, apc.STATUS_LOOKUP_CODE Check_status
, NULL FUTURE_PAY_DUE_DATE
FROM APPS.XX_AP_CHECK_1910 aip1
, ap_invoice_payments_all aip2
, ap_invoice_payments_all aip
, ap_checks_all apc
, ce_bank_accounts cba
, ce_bank_acct_uses_all cbu
, po_vendors pov
, gl_code_combinations gl
, fnd_flex_values_vl ffvv
, gl_ledgers led
, hr_operating_units hou
, fnd_lookup_values_vl flv
WHERE pov.vendor_type_lookup_code = flv.lookup_code(+)
AND aip.check_id = apc.check_id
AND aip1.check_id = apc.check_id
AND aip2.check_id = apc.check_id
AND aip1.ID = aip2.invoice_id
AND flv.lookup_type(+) = 'VENDOR TYPE'
AND apc.vendor_id = pov.vendor_id(+)
AND hou.set_of_books_id = led.ledger_id
AND hou.organization_id = apc.org_id
AND apc.org_id <> 86
AND ffvv.flex_value = gl.segment1
AND ffvv.flex_value_set_id = 1013712
AND aip2.accts_pay_code_combination_id = gl.code_combination_id
AND aip.check_id = apc.check_id
AND apc.ce_bank_acct_use_id = cbu.bank_acct_use_id
AND cba.bank_account_id = cbu.bank_account_id
AND apc.status_lookup_code IN('NEGOTIABLE', 'CLEARED', 'RECONCILED UNACCOUNTED', 'RECONCILED', 'CLEARED BUT UNACCOUNTED') -- added for Bug# 2449877
AND aip.invoice_payment_type IS NULL
AND apc.FUTURE_PAY_DUE_DATE is null
GROUP BY aip.accounting_date
, apc.doc_sequence_value
, apc.creation_date
, apc.check_number
, apc.check_date
, apc.vendor_name
, apc.description
, cba.bank_account_name
, cba.bank_account_num
, ffvv.description
, flv.meaning
, led.NAME
, hou.NAME
, aip.check_id
, apc.amount
, NVL(apc.exchange_rate, 1)
, apc.STATUS_LOOKUP_CODE
UNION ALL
SELECT '2' flag
, led.NAME ledger
, hou.NAME ouperating_unit
, apid.accounting_date gl_date
, 'I' TYPE
, api.doc_sequence_value voucher_no
, api.creation_date voucher_date
, api.invoice_num check_number
, TO_CHAR(api.invoice_date, 'DD-MON-YYYY') check_date
, pov.vendor_name vendor_name
, NVL(api.description, api.invoice_num) description
, TO_NUMBER(SUM(api.invoice_amount * NVL(api.exchange_rate, 1))) receipts
, TO_NUMBER(SUM(0), 'fm999999999990.00') payments
, TO_NUMBER(SUM(0)) payments1
, cba.bank_account_name bank_account_name
, cba.bank_account_num bank_account_num
, ffvv.description project_name
, flv.meaning nature_of_payment
, NULL nature_of_receipt
, NULL check_id
, NULL Check_status
, NULL FUTURE_PAY_DUE_DATE
FROM ap_invoice_distributions_all apid
, ap_invoice_lines_all apla
, ap_invoices_all api
, po_vendors pov
, ce_bank_accounts cba
, gl_code_combinations gl
, fnd_flex_values_vl ffvv
, gl_ledgers led
, hr_operating_units hou
, fnd_lookup_values_vl flv
WHERE api.invoice_id = apid.invoice_id
AND pov.vendor_type_lookup_code = flv.lookup_code(+)
AND flv.lookup_type(+) = 'VENDOR TYPE'
AND hou.set_of_books_id = led.ledger_id
AND hou.organization_id = api.org_id
AND api.org_id <> 86
AND ffvv.flex_value = gl.segment1
AND ffvv.flex_value_set_id = 1013712
AND api.accts_pay_code_combination_id = gl.code_combination_id
AND apla.invoice_id = apid.invoice_id
AND apla.line_number = apid.invoice_line_number
AND api.vendor_id = pov.vendor_id
AND cba.asset_code_combination_id = apid.dist_code_combination_id
AND apid.match_status_flag = 'A'
AND NVL(api.payment_status_flag, 'N') <> 'N'
GROUP BY apid.accounting_date
, api.doc_sequence_value
, api.creation_date
, api.invoice_num
, api.invoice_date
, pov.vendor_name
, NVL(api.description, api.invoice_num)
, cba.bank_account_name
, cba.bank_account_num
, ffvv.description
, flv.meaning
, led.NAME
, hou.NAME
UNION ALL
SELECT '3' flag
, led.NAME ledger
, hou.NAME operating_unit
, acrh.gl_date gl_date
, DECODE(
acrh.status
, 'REVERSED', 'REV'
, 'R'
) TYPE
, acr.doc_sequence_value voucher_no
, acr.creation_date voucher_date
, acr.receipt_number check_number
, TO_CHAR(acr.receipt_date, 'DD-MON-YYYY') check_date
, SUBSTR(
hp.party_name
, 1
, 50
) vendor_name
, NVL(acr.comments, acr.receipt_number) description
, TO_NUMBER(SUM(DECODE(
acrh.status
, 'CLEARED',(NVL(acrh.amount, 0) * NVL(acrh.exchange_rate, 1))
, 'REMITTED',(NVL(acrh.amount, 0) * NVL(acrh.exchange_rate, 1))
, 'CONFIRMED',(NVL(acrh.amount, 0) * NVL(acrh.exchange_rate, 1))
, 'REVERSED', 0
))) receipts
, TO_NUMBER(SUM(DECODE(
acrh.status
, 'REVERSED',(NVL(acrh.amount, 0) * NVL(acrh.exchange_rate, 1))
, 0
))) payments
, TO_NUMBER(TO_CHAR(SUM(0))) payments1
, cba.bank_account_name bank_account_name
, cba.bank_account_num bank_account_num
, ffvv.description project_name
, NULL nature_of_payment
, DECODE(
acr.TYPE
, 'CASH', 'Collection'
, 'MISC', 'Cash Deposit'
, acr.TYPE
) nature_of_receipt
, NULL check_id
, NULL Check_status
, NULL FUTURE_PAY_DUE_DATE
FROM ar_cash_receipt_history_all acrh
, ar_cash_receipts_all acr
, hz_parties hp
, hz_cust_accounts hca
, ce_bank_accounts cba
, ce_bank_acct_uses_all cbau
, fnd_flex_values_vl ffvv
, gl_ledgers led
, hr_operating_units hou
WHERE acrh.cash_receipt_id = acr.cash_receipt_id
AND hou.set_of_books_id = led.ledger_id
AND hou.organization_id = acr.org_id
AND acr.org_id <> 86
AND ffvv.flex_value = acr.attribute1
AND ffvv.flex_value_set_id = 1013712
AND cbau.bank_acct_use_id = acr.remit_bank_acct_use_id
AND cbau.bank_account_id = cba.bank_account_id
AND hca.party_id = hp.party_id(+)
AND acr.pay_from_customer = hca.cust_account_id(+)
AND acrh.status IN('CLEARED', 'REMITTED', 'CONFIRMED', 'REVERSED')
AND (
acr.reversal_date IS NOT NULL
AND acrh.status = 'REVERSED')
OR (acrh.cash_receipt_history_id IN(SELECT
MIN(incrh.cash_receipt_history_id)
FROM ar_cash_receipt_history_all incrh
WHERE incrh.cash_receipt_id = acr.cash_receipt_id
AND incrh.status <> 'REVERSED'))
GROUP BY acrh.gl_date
, acrh.status
, acr.doc_sequence_value
, acr.creation_date
, SUBSTR(
hp.party_name
, 1
, 50
, NVL(acr.comments, acr.receipt_number)
, cba.bank_account_name
, cba.bank_account_num
, ffvv.description
, acr.TYPE
, led.NAME
, hou.NAME
, acr.receipt_number
, acr.receipt_date
UNION ALL
SELECT '3A' flag
, led.NAME ledger
, hou.NAME operating_unit
, acrh.gl_date gl_date
, DECODE(
acrh.status
, 'REVERSED', 'REV'
, 'R'
) TYPE
, acr.doc_sequence_value voucher_no
, acr.creation_date voucher_date
, acr.receipt_number check_number
, TO_CHAR(acr.receipt_date, 'DD-MON-YYYY') check_date
, SUBSTR(
hp.party_name
, 1
, 50
) vendor_name
, NVL(acr.comments, acr.receipt_number) description
, TO_NUMBER(SUM(DECODE(
acrh.status
, 'REVERSED',(NVL(acrh.amount, 0) * NVL(acrh.exchange_rate, 1))
, 0
))) Receipts
, TO_NUMBER(SUM(DECODE(
acrh.status
, 'CLEARED',(NVL(acrh.amount, 0) * NVL(acrh.exchange_rate, 1))
, 'REMITTED',(NVL(acrh.amount, 0) * NVL(acrh.exchange_rate, 1))
, 'CONFIRMED',(NVL(acrh.amount, 0) * NVL(acrh.exchange_rate, 1))
, 'REVERSED', 0
))) Payments
, TO_NUMBER(TO_CHAR(SUM(0))) payments1
, cba.bank_account_name bank_account_name
, cba.bank_account_num bank_account_num
, ffvv.description project_name
, NULL nature_of_payment
, DECODE(
acr.TYPE
, 'CASH', 'Collection'
, 'MISC', 'Cash Deposit'
, acr.TYPE
) nature_of_receipt
, NULL check_id
, NULL Check_status
, NULL FUTURE_PAY_DUE_DATE
FROM ar_cash_receipt_history_all acrh
, ar_cash_receipts_all acr
, hz_parties hp
, hz_cust_accounts hca
, ce_bank_accounts cba
, ce_bank_acct_uses_all cbau
, fnd_flex_values_vl ffvv
, gl_ledgers led
, hr_operating_units hou
WHERE acrh.cash_receipt_id = acr.cash_receipt_id
AND hou.set_of_books_id = led.ledger_id
AND hou.organization_id = acr.org_id
AND acr.org_id <> 86
AND ffvv.flex_value = acr.attribute1
AND ffvv.flex_value_set_id = 1013712
AND cbau.bank_acct_use_id = acr.remit_bank_acct_use_id
AND cbau.bank_account_id = cba.bank_account_id
AND hca.party_id = hp.party_id(+)
AND acr.pay_from_customer = hca.cust_account_id(+)
AND acrh.status IN('CLEARED', 'REMITTED', 'CONFIRMED', 'REVERSED')
AND (
acr.reversal_date IS NOT NULL
AND acrh.status = 'REVERSED')
OR (acrh.cash_receipt_history_id IN(SELECT
MIN(incrh.cash_receipt_history_id)
FROM ar_cash_receipt_history_all incrh
WHERE incrh.cash_receipt_id = acr.cash_receipt_id
AND incrh.status <> 'REVERSED'))
AND cba.bank_account_num = '1723201002888'
GROUP BY acrh.gl_date
, acrh.status
, acr.doc_sequence_value
, acr.creation_date
, SUBSTR(
hp.party_name
, 1
, 50
, NVL(acr.comments, acr.receipt_number)
, cba.bank_account_name
, cba.bank_account_num
, ffvv.description
, acr.TYPE
, led.NAME
, hou.NAME
, acr.receipt_number
, acr.receipt_date
UNION ALL
SELECT '4' flag
, led.NAME ledger
, NULL operating_unit
, glh.default_effective_date gl_date
, 'G' TYPE
, glh.doc_sequence_value voucher_no
, glh.creation_date voucher_date
, NULL check_number
, NULL check_date
, NULL vendor_name
, gll.description description
, TO_NUMBER(DECODE(
SUM(accounted_dr)
, NULL, 0
, SUM(accounted_dr)
)) receipts
, TO_NUMBER(DECODE(
SUM(accounted_cr)
, NULL, 0
, SUM(accounted_cr)
)) payments
, TO_NUMBER(DECODE(
SUM(accounted_cr)
, NULL, 0
, SUM(accounted_cr)
)) payments1
, cba.bank_account_name bank_account_name
, cba.bank_account_num bank_account_num
, ffvv.description project_name
, NULL nature_of_payment
, NULL nature_of_receipt
, NULL check_id
, NULL Check_status
, NULL FUTURE_PAY_DUE_DATE
FROM gl_je_headers glh
, gl_je_lines gll
, ce_bank_accounts cba
, gl_code_combinations_kfv glcc
, gl_code_combinations_kfv glcc1
, fnd_flex_values_vl ffvv
, gl_ledgers led
WHERE glh.je_header_id = gll.je_header_id
AND cba.asset_code_combination_id = glcc.code_combination_id
AND gll.code_combination_id = glcc1.code_combination_id
AND glcc.segment2 = glcc1.segment2
AND ffvv.flex_value = glcc1.segment1
AND ffvv.flex_value_set_id = 1013712
AND glh.ledger_id = led.ledger_id
AND glh.je_source NOT IN('Payables', 'Receivables', 'Manual')
GROUP BY glh.default_effective_date
, gll.description
, cba.bank_account_name
, cba.bank_account_num
, glh.doc_sequence_value
, glh.creation_date
, ffvv.description
, led.NAME
UNION ALL
SELECT '5' flag
, led.NAME ledger
, NULL operating_unit
, glh.default_effective_date gl_date
, 'G' TYPE
, glh.doc_sequence_value voucher_no
, glh.creation_date voucher_date
, NULL check_number
, NULL check_date
, NULL vendor_name
, gll.description description
, TO_NUMBER(DECODE(
SUM(accounted_dr)
, NULL, 0
, SUM(accounted_dr)
)) receipts
, TO_NUMBER(DECODE(
SUM(accounted_cr)
, NULL, 0
, SUM(accounted_cr)
)) payments
, TO_NUMBER(DECODE(
SUM(accounted_cr)
, NULL, 0
, SUM(accounted_cr)
)) payments1
, cba.bank_account_name
, cba.bank_account_num
, ffvv.description project_name
, NULL nature_of_payment
, NULL nature_of_receipt
, NULL check_id
, NULL Check_status
, NULL FUTURE_PAY_DUE_DATE
FROM gl_je_headers glh
, gl_je_lines gll
, ce_bank_accounts cba
, gl_code_combinations_kfv glcc
, gl_code_combinations_kfv glcc1
, fnd_flex_values_vl ffvv
, gl_ledgers led
WHERE glh.je_header_id = gll.je_header_id
AND cba.asset_code_combination_id = glcc.code_combination_id
AND gll.code_combination_id = glcc1.code_combination_id
AND glcc.segment2 = glcc1.segment2
AND ffvv.flex_value = glcc1.segment1
AND (ffvv.flex_value_set_id = 1013712 or ffvv.flex_value_id=53880)
AND glh.ledger_id = gll.ledger_id
AND glh.ledger_id = led.ledger_id
AND glh.je_source = 'Manual'
GROUP BY glh.default_effective_date
, gll.description
, cba.bank_account_name
, cba.bank_account_num
, glh.doc_sequence_value
, glh.creation_date
, ffvv.description
, led.NAME
UNION ALL
SELECT '6' flag
, led.NAME ledger
, NULL operating_unit
, glh.default_effective_date gl_date
, 'G' TYPE
, glh.doc_sequence_value voucher_no
, glh.creation_date voucher_date
, NULL check_number
, NULL check_date
, NULL vendor_name
, gll.description description
, TO_NUMBER(DECODE(
SUM(accounted_dr)
, NULL, 0
, SUM(accounted_dr)
)) receipts
, TO_NUMBER(DECODE(
SUM(accounted_cr)
, NULL, 0
, SUM(accounted_cr)
)) payments
, TO_NUMBER(DECODE(
SUM(accounted_cr)
, NULL, 0
, SUM(accounted_cr)
)) payments1
, cba.bank_account_name
, cba.bank_account_num
, ffvv.description project_name
, NULL nature_of_payment
, NULL nature_of_receipt
, NULL check_id
, NULL Check_status
, NULL FUTURE_PAY_DUE_DATE
FROM gl_je_headers glh
, gl_je_lines gll
, ce_bank_accounts cba
, gl_code_combinations_kfv glcc
, gl_code_combinations_kfv glcc1
, fnd_flex_values_vl ffvv
, gl_ledgers led
WHERE glh.je_header_id = gll.je_header_id
AND cba.asset_code_combination_id = glcc.code_combination_id
AND gll.code_combination_id = glcc1.code_combination_id
AND glcc.segment2 = glcc1.segment2
AND ffvv.flex_value = glcc1.segment1
AND ffvv.flex_value_set_id = 1013712
AND glh.ledger_id = gll.ledger_id
AND glh.ledger_id = led.ledger_id
AND glh.je_source = 'Payables'
GROUP BY glh.default_effective_date
, gll.description
, cba.bank_account_name
, cba.bank_account_num
, glh.doc_sequence_value
, glh.creation_date
, ffvv.description
, led.NAME
UNION ALL
SELECT '7' flag
, led.NAME ledger
, hou.NAME operating_unit
, DECODE(apc.future_pay_due_date, NULL, aip.accounting_date, apc.void_date) gl_date
, 'V' TYPE
, apc.doc_sequence_value voucher_no
, aip.creation_date voucher_date
, TO_CHAR(apc.check_number) check_number
, TO_CHAR(apc.check_date, 'DD-MON-YYYY') check_date
, apc.vendor_name vendor_name
, apc.description description
, TO_NUMBER(DECODE(
SIGN((SUM(aip.amount)))
, -1,SUM((aip.amount * NVL(apc.exchange_rate, 1))) * -1
, 0
)) receipts
, TO_NUMBER(DECODE(
SIGN((SUM(aip.amount)))
, 1,SUM((aip.amount * NVL(apc.exchange_rate, 1)))
, 0
)) payments
, SUM((aip.amount * NVL(apc.exchange_rate, 1))) payments1
, cba.bank_account_name bank_account_name
, cba.bank_account_num bank_account_num
, ffvv.description project_name
, flv.meaning nature_of_payment
, NULL nature_of_receipt
, aip.check_id check_id
, apc.STATUS_LOOKUP_CODE Check_status
, NULL FUTURE_PAY_DUE_DATE
FROM ap_invoice_payments_all aip
, ap_checks_all apc
, ce_bank_accounts cba
, ce_bank_acct_uses_all cbu
, po_vendors pov
, gl_code_combinations gl
, fnd_flex_values_vl ffvv
, gl_ledgers led
, hr_operating_units hou
, fnd_lookup_values_vl flv
WHERE pov.vendor_type_lookup_code = flv.lookup_code(+)
AND aip.check_id = apc.check_id
AND flv.lookup_type(+) = 'VENDOR TYPE'
AND apc.vendor_id = pov.vendor_id(+)
AND hou.set_of_books_id = led.ledger_id
AND hou.organization_id = apc.org_id
AND apc.org_id <> 86
AND ffvv.flex_value = gl.segment1
AND ffvv.flex_value_set_id = 1013712
AND aip.accts_pay_code_combination_id = gl.code_combination_id
AND aip.check_id = apc.check_id
AND apc.ce_bank_acct_use_id = cbu.bank_acct_use_id
AND cba.bank_account_id = cbu.bank_account_id
AND apc.status_lookup_code = 'VOIDED'
AND aip.invoice_payment_type IS NULL
GROUP BY
DECODE(apc.future_pay_due_date, NULL, aip.accounting_date, apc.void_date)
, apc.doc_sequence_value
, aip.creation_date
, apc.check_number
, apc.check_date
, apc.vendor_name
, apc.description
, cba.bank_account_name
, cba.bank_account_num
, ffvv.description
, flv.meaning
, led.NAME
, hou.NAME
, aip.check_id
, NVL(apc.exchange_rate, 1)
, apc.STATUS_LOOKUP_CODE
UNION ALL
SELECT '8' flag
, led.NAME ledger
, hou.NAME operating_unit
, aip.accounting_date gl_date
, 'P' TYPE
, apc.doc_sequence_value voucher_no
, apc.creation_date voucher_date
, TO_CHAR(apc.check_number) check_number
, TO_CHAR(apc.check_date, 'DD-MON-YYYY') check_date
, apc.vendor_name vendor_name
, apc.description description
, TO_NUMBER(DECODE(
SIGN((apc.amount))
, -1,(apc.amount * NVL(apc.exchange_rate, 1)) * -1
, 0
)) receipts
, TO_NUMBER(DECODE(
SIGN((apc.amount))
, 1,(apc.amount * NVL(apc.exchange_rate, 1))
, 0
)) payments
, TO_NUMBER(apc.amount * NVL(apc.exchange_rate, 1)) payments1
, cba.bank_account_name bank_account_name
, cba.bank_account_num bank_account_num
, ffvv.description project_name
, flv.meaning nature_of_payment
, NULL nature_of_receipt
, aip.check_id check_id
, apc.STATUS_LOOKUP_CODE Check_status
, NULL FUTURE_PAY_DUE_DATE
FROM APPS.XX_AP_CHECK_89i aip1
, ap_invoice_payments_all aip2
, ap_invoice_payments_all aip
, ap_checks_all apc
, ce_bank_accounts cba
, ce_bank_acct_uses_all cbu
, po_vendors pov
, gl_code_combinations gl
, fnd_flex_values_vl ffvv
, gl_ledgers led
, hr_operating_units hou
, fnd_lookup_values_vl flv
WHERE pov.vendor_type_lookup_code = flv.lookup_code(+)
AND aip.check_id = apc.check_id
AND aip1.check_id = apc.check_id
AND aip2.check_id = apc.check_id
AND aip1.ID = aip2.invoice_id
AND flv.lookup_type(+) = 'VENDOR TYPE'
AND apc.vendor_id = pov.vendor_id(+)
AND hou.set_of_books_id = led.ledger_id
AND hou.organization_id = apc.org_id
AND apc.org_id <> 86
AND ffvv.flex_value = gl.segment1
AND ffvv.flex_value_set_id = 1013712
AND aip2.accts_pay_code_combination_id = gl.code_combination_id
AND aip.check_id = apc.check_id
AND apc.ce_bank_acct_use_id = cbu.bank_acct_use_id
AND cba.bank_account_id = cbu.bank_account_id
AND apc.status_lookup_code IN('NEGOTIABLE', 'CLEARED', 'RECONCILED UNACCOUNTED', 'RECONCILED', 'CLEARED BUT
UNACCOUNTED')
AND aip.invoice_payment_type IS NULL
GROUP BY aip.accounting_date
, apc.doc_sequence_value
, apc.creation_date
, apc.check_number
, apc.check_date
, apc.vendor_name
, apc.description
, cba.bank_account_name
, cba.bank_account_num
, ffvv.description
, flv.meaning
, led.NAME
, hou.NAME
, aip.check_id
, apc.amount
, NVL(apc.exchange_rate, 1)
, apc.STATUS_LOOKUP_CODE
UNION ALL
SELECT '9' flag
, led.NAME ledger
, hou.NAME operating_unit
, aip.accounting_date gl_date
, 'P' TYPE
, apc.doc_sequence_value voucher_no
, apc.creation_date voucher_date
, TO_CHAR(apc.check_number) check_number
, TO_CHAR(apc.check_date, 'DD-MON-YYYY') check_date
, apc.vendor_name vendor_name
, apc.description description
, TO_NUMBER(DECODE(
SIGN((apc.amount))
, -1,(apc.amount * NVL(apc.exchange_rate, 1)) * -1
, 0
)) receipts
, TO_NUMBER(DECODE(
SIGN((apc.amount))
, 1,(apc.amount * NVL(apc.exchange_rate, 1))
, 0
)) payments
, TO_NUMBER(apc.amount * NVL(apc.exchange_rate, 1)) payments1
, cba.bank_account_name bank_account_name
, cba.bank_account_num bank_account_num
-- , ffvv.description project_name
, FIND_INVOICE_PROJECT_DESC(aip1.id) project_name
, flv.meaning nature_of_payment
, NULL nature_of_receipt
, aip.check_id check_id
, apc.STATUS_LOOKUP_CODE Check_status
, NULL FUTURE_PAY_DUE_DATE
FROM APPS.XX_AP_CHECK_1910 aip1
, ap_invoice_payments_all aip
, ap_checks_all apc
, ce_bank_accounts cba
, ce_bank_acct_uses_all cbu
, po_vendors pov
, gl_ledgers led
, hr_operating_units hou
, fnd_lookup_values_vl flv
WHERE aip.ACCTS_PAY_CODE_COMBINATION_ID is null
AND cba.BANK_ACCOUNT_NAME not like 'Migration%'
AND pov.vendor_type_lookup_code = flv.lookup_code(+)
AND aip.check_id = apc.check_id
AND aip1.check_id = apc.check_id
AND aip1.ID = aip.invoice_id
AND flv.lookup_type(+) = 'VENDOR TYPE'
AND apc.vendor_id = pov.vendor_id(+)
AND hou.set_of_books_id = led.ledger_id
AND hou.organization_id = apc.org_id
AND apc.org_id <> 86
AND apc.ce_bank_acct_use_id = cbu.bank_acct_use_id
AND cba.bank_account_id = cbu.bank_account_id
AND apc.status_lookup_code IN('NEGOTIABLE', 'CLEARED', 'RECONCILED UNACCOUNTED', 'RECONCILED', 'CLEARED BUT UNACCOUNTED') AND aip.invoice_payment_type IS NULL
GROUP BY aip.accounting_date
, apc.doc_sequence_value
, apc.creation_date
, apc.check_number
, apc.check_date
, apc.vendor_name
, apc.description
, cba.bank_account_name
, cba.bank_account_num
-- , ffvv.description
, FIND_INVOICE_PROJECT_DESC(aip1.id)
, flv.meaning
, led.NAME
, hou.NAME
, aip.check_id
, apc.amount
, NVL(apc.exchange_rate, 1)
, apc.STATUS_LOOKUP_CODE
UNION ALL
SELECT '91' flag
, led.NAME ledger
, hou.NAME operating_unit
, aip.accounting_date gl_date
, 'P' TYPE
, apc.doc_sequence_value voucher_no
, apc.creation_date voucher_date
, TO_CHAR(apc.check_number) check_number
, TO_CHAR(apc.check_date, 'DD-MON-YYYY') check_date
, apc.vendor_name vendor_name
, apc.description description
, TO_NUMBER(DECODE(
SIGN((apc.amount))
, -1,(apc.amount * NVL(apc.exchange_rate, 1)) * -1
, 0
)) receipts
, TO_NUMBER(DECODE(
SIGN((apc.amount))
, 1,(apc.amount * NVL(apc.exchange_rate, 1))
, 0
)) payments
, TO_NUMBER(apc.amount * NVL(apc.exchange_rate, 1)) payments1
, cba.bank_account_name bank_account_name
, cba.bank_account_num bank_account_num
, FIND_INVOICE_PROJECT_DESC(aip1.id) project_name
, flv.meaning nature_of_payment
, NULL nature_of_receipt
, aip.check_id check_id
, apc.STATUS_LOOKUP_CODE Check_status
, NULL FUTURE_PAY_DUE_DATE
FROM APPS.XX_AP_CHECK_89i aip1
, ap_invoice_payments_all aip
, ap_checks_all apc
, ce_bank_accounts cba
, ce_bank_acct_uses_all cbu
, po_vendors pov
, gl_ledgers led
, hr_operating_units hou
, fnd_lookup_values_vl flv
WHERE aip.ACCTS_PAY_CODE_COMBINATION_ID is null
AND cba.BANK_ACCOUNT_NAME not like 'Migration%'
AND pov.vendor_type_lookup_code = flv.lookup_code(+)
AND aip.check_id = apc.check_id
AND aip1.check_id = apc.check_id
AND aip1.ID = aip.invoice_id
AND flv.lookup_type(+) = 'VENDOR TYPE'
AND apc.vendor_id = pov.vendor_id(+)
AND hou.set_of_books_id = led.ledger_id
AND hou.organization_id = apc.org_id
AND apc.org_id <> 86
AND apc.ce_bank_acct_use_id = cbu.bank_acct_use_id
AND cba.bank_account_id = cbu.bank_account_id
AND apc.status_lookup_code IN('NEGOTIABLE', 'CLEARED', 'RECONCILED UNACCOUNTED', 'RECONCILED', 'CLEARED BUT UNACCOUNTED') AND aip.invoice_payment_type IS NULL
GROUP BY aip.accounting_date
, apc.doc_sequence_value
, apc.creation_date
, apc.check_number
, apc.check_date
, apc.vendor_name
, apc.description
, cba.bank_account_name
, cba.bank_account_num
-- , ffvv.description
, FIND_INVOICE_PROJECT_DESC(aip1.id)
, flv.meaning
, led.NAME
, hou.NAME
, aip.check_id
, apc.amount
, NVL(apc.exchange_rate, 1)
, apc.STATUS_LOOKUP_CODE
UNION ALL
SELECT '10' flag
, led.NAME ledger
, hou.NAME operating_unit
, apc.FUTURE_PAY_DUE_DATE gl_date
, 'P' TYPE
, apc.doc_sequence_value voucher_no
, apc.creation_date voucher_date
, TO_CHAR(apc.check_number) check_number
, TO_CHAR(apc.check_date, 'DD-MON-YYYY') check_date
, apc.vendor_name vendor_name
, apc.description description
, TO_NUMBER(DECODE(
SIGN((apc.amount))
, -1,(apc.amount * NVL(apc.exchange_rate, 1)) * -1
, 0
)) receipts
, TO_NUMBER(DECODE(
SIGN((apc.amount))
, 1,(apc.amount * NVL(apc.exchange_rate, 1))
, 0
)) payments
, TO_NUMBER(apc.amount * NVL(apc.exchange_rate, 1)) payments1
, cba.bank_account_name bank_account_name
, cba.bank_account_num bank_account_num
, ffvv.description project_name
, flv.meaning nature_of_payment
, NULL nature_of_receipt
, aip.check_id check_id
, apc.STATUS_LOOKUP_CODE Check_status
, apc.FUTURE_PAY_DUE_DATE
FROM APPS.XX_AP_CHECK_1910 aip1
, ap_invoice_payments_all aip2
, ap_invoice_payments_all aip
, ap_checks_all apc
, ce_bank_accounts cba
, ce_bank_acct_uses_all cbu
, po_vendors pov
, gl_code_combinations gl
, fnd_flex_values_vl ffvv
, gl_ledgers led
, hr_operating_units hou
, fnd_lookup_values_vl flv
WHERE pov.vendor_type_lookup_code = flv.lookup_code(+)
AND aip.check_id = apc.check_id
AND aip1.check_id = apc.check_id
AND aip2.check_id = apc.check_id
AND aip1.ID = aip2.invoice_id
AND flv.lookup_type(+) = 'VENDOR TYPE'
AND apc.vendor_id = pov.vendor_id(+)
AND hou.set_of_books_id = led.ledger_id
AND hou.organization_id = apc.org_id
AND apc.org_id <> 86
AND ffvv.flex_value = gl.segment1
AND ffvv.flex_value_set_id = 1013712
AND aip2.accts_pay_code_combination_id = gl.code_combination_id
AND aip.check_id = apc.check_id
AND apc.ce_bank_acct_use_id = cbu.bank_acct_use_id
AND cba.bank_account_id = cbu.bank_account_id
AND apc.status_lookup_code IN('NEGOTIABLE', 'CLEARED', 'RECONCILED UNACCOUNTED', 'RECONCILED', 'CLEARED BUT UNACCOUNTED') -- added for Bug# 2449877
AND aip.invoice_payment_type IS NULL
AND apc.FUTURE_PAY_DUE_DATE is not null
GROUP BY
apc.doc_sequence_value
, apc.creation_date
, apc.check_number
, apc.check_date
, apc.vendor_name
, apc.description
, cba.bank_account_name
, cba.bank_account_num
, ffvv.description
, flv.meaning
, led.NAME
, hou.NAME
, aip.check_id
, apc.amount
, NVL(apc.exchange_rate, 1)
, apc.STATUS_LOOKUP_CODE
, apc.FUTURE_PAY_DUE_DATE
FOR i IN 1 .. r_type.count LOOP
PIPE ROW(r_type(i));
END LOOP;
end;
end;
while running showing the error:
ORA-06502: PL/SQL: numeric or value error: Bulk Bind: Truncated Bind
ORA-06512: at "XX", line 45
ORA-06512: at line 1Horrible code. If defies logic and basic Oracle concepts...
Why even use a package when monolithic cr@p like this is written?
What is wrong with this code you may ask? Everything.
What is right with this code? Nothing.
How to fix this code? Cannot be fixed. It needs to be trashed. Every single infected byte. And new code needs to be designed and written that addresses the requirements logically, adheres to Oracle concepts, and applies fundamental software engineering principles. -
FRF-00025 Unable to call function. Error message: Syntax error in program
hi,
when we try to import the export file,we are getting the following error in the 24th phase
i.e., check DDIC Password.
The Error is
INFO 2007-10-29 15:53:20 [iaxxrfcimp.cpp:1017]
CAbRfcImpl::callLibraryFunction
Generating interface for remote function.
TRACE [iaxxrfcimp.cpp:1056]
CAbRfcImpl::performFunctionCall
Calling function module: INST_RFC_GET_INTERFACE
WARNING[E] 2007-10-29 15:53:21 [iaxxrfcimp.cpp:1089]
CAbRfcImpl::performFunctionCall
FRF-00025 Unable to call function. Error message: Syntax error in program SAPLSUNI . .
TRACE [iaxxrfcimp.cpp:1090]
CAbRfcImpl::performFunctionCall
RFC failure or system exception raised
TRACE [iaxxrfcimp.cpp:1091]
CAbRfcImpl::performFunctionCall
Syntax error in program SAPLSUNI .
TRACE [iaxxbjsmod.cpp:657]
CJSlibModule::showOkCancelBox_impl()
<html>Test logon to SAP System I50 failed.<p>Make sure that the system is started, that the user DDIC exists and that the password of user DDIC is correct.</html>
TRACE [iaxxgenimp.cpp:1093]
showDialog()
waiting for an answer from gui
What Could be the solution for this.
waiting for ur reply
SSHi Friend,
Please check whether or not there is view missing error recorded in dev_w0 trace file.
if there is , you can try to follow this procedure in order to manually
import the missing view definitions.
All steps must be carried out with the <sid>adm user of the target
system and from the install-directory:
1. In the install-directory
<sapinst_instdir>\...COPY\IMPORTT\SYSTEM\ABAP\ORA\UC\DB
create a file SAPVIEW.cmd with the following content:
tsk: "<sapinst_instdir>\...\COPY\IMPORT\SYSTEM\ABAP\ORA\UC\DB\SAPVIEW.TSK"
icf: "
<YOUR_EXPORT_DIRECTORY>\export\DATA\SAPVIEW.STR"
dcf: "<sapinst_instdir>\...\COPY\IMPORT\SYSTEM\ABAP\ORA\UC\DB\DDLORA.TPL"
dat: null
dir: null
ext: null
Please make sure that all paths are written correctly (in one line) and
the refered files are existant and readable. One exception:
The SAPVIEW.TSK file is created with step 2.:
2. Run from the command-line:
R3load -ctf I
<YOUR_EXPORT_DIRECTORY>\export\DATA\SAPVIEW.STR <sapinst_instdir>\...\COPY\IMPORT\SYSTEM\ABAP\ORA\UC\DB\DDLORA.TPL SAPVIEW.TSK ORA -l SAPVIEW.log
If there's a problem reading the 'SAPVIEW.STR' file, copy the
file to the install directory and adapt the path accordingly.
3. Run the view import by:
R3load.exe -i SAPVIEW.cmd -dbcodepage <YOUR_CODE_PAGE> -l SAPVIEW.log
-stop_on_error
4. Check both the SAPVIEW.log and the SAPVIEW.TSK file whether all views
have been created successfully.
If 4. is okay, restart the central instance and check whether you are
able to log on now. If yes, continue 'sapinst' by the option 'retry' or
'continue old installation'.
I Hope It can be helpful.
With Best Regards
Julia
Maybe you are looking for
-
Creative Cloud is trying to download something and I don't know what it is
This is a strange problem. When I leave creative cloud open it seems to be trying to download and install something. I think I had a font installation error a while back. It causes other apps to have problems and then when I got to shut down my ma
-
DOM parsing In Applet (URgent)
Is it possible to implement DOM parsing in Applet? I am getting classnotfoundException . I am giving the code below. pl read the code. Applet.(parserapplet.java) ========================= import java.io.*; import java.awt.*; import java.net.*; import
-
Mac Pro RAID configuration advice needed to address photography workflow
I am a semi-professional photographer and I am moving off a Windows machine and over to a Mac Pro. I am waiting for the new Mac Pro to arrive and have purchased (4) 500GB SATA drives to replace the 250GB drive the system will arrive with. I am consid
-
Hey guys, I'm stuck here, for the last 2 years I have very slowly saved up enough for a mbp. I'm gonna go for the lowest model, but i need to know what you guys think. I am using the eduaction discount to buy my mac so if I buy it now I get a free ip
-
Consumption values with quantity
Hi All, How can I get the data/report for the following requirements: 1. Consumption of Indigenous material Value with quantity 2. Consumption of Imported material value with quantity 3. Consumption of stores & spares value with quantity Kindly help