Custom Function giving compile error
Hi All,
I have created a custom function to get the current time stamp. Below is the java code:
package com.oracle.determinations.examples;
import com.oracle.determinations.engine.CustomFunction;
import com.oracle.determinations.engine.EntityInstance;
import java.util.*;
import java.text.*;
public class CurrentTimeStamp extends CustomFunction {
public Object evaluate(EntityInstance entityInstance, Object[] objects) {
Date dNow = new Date( );
SimpleDateFormat ft =
new SimpleDateFormat ("MM/dd/yyyy HH:mm:ss");
/*System.out.println(ft.format(dNow));*/
return ft.format(dNow);
My Extension.xml is as below:
<?xml version="1.0" encoding="utf-8"?>
<extension>
<functions>
<function name="CurrentTimeStamp" return-type="text">
<arg name="entered-name" type="text"/>
<handler platform="java" class="com.oracle.determinations.examples.CurrentTimeStamp"/>
</function>
</functions>
</extension>
The extension.xml is placed under following path:
Development/Extension/CurrentTimeStamp/extension.xml
The JAR file is palced under following path:
Development/Extension/CurrentTimeStamp/lib/CurrentTimeStamp.jar (the jar file includes the com.oracle.determination.example folder structure)
When i am using CurrentTimeStamp() in the rule base, it is throwing compile error saying:
Error after text CurrentTimeStamp(' Fount Text: ')'. Exptected value variable or constant OPA - E00111
Can you please help me where i am getting wrong and why it is not identifying the function?
Thanks,
KK
Hi,
I tried using the function with blank arguments like:CurrentTimeStamp("") and it was compiled successfully. When I tried running this rulebase in the tomcat server (web determinations).. i got the below error; Can someone please let me know what is happening here:
HTTP Status 500 - Servlet.init() for servlet WebDeterminationsServlet threw exception
type Exception report
message Servlet.init() for servlet WebDeterminationsServlet threw exception
description The server encountered an internal error that prevented it from fulfilling this request.
exception
javax.servlet.ServletException: Servlet.init() for servlet WebDeterminationsServlet threw exception org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472) org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99) org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:953) org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408) org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1008) org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:589) org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:310) java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source) java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) java.lang.Thread.run(Unknown Source)
root cause
java.lang.UnsupportedClassVersionError: Unsupported major.minor version 51.0 java.lang.ClassLoader.defineClass1(Native Method) java.lang.ClassLoader.defineClassCond(Unknown Source) java.lang.ClassLoader.defineClass(Unknown Source) java.lang.ClassLoader.defineClass(Unknown Source) com.oracle.determinations.engine.local.CustomResourceClassLoader.findClass(CustomResourceClassLoader.java:120) java.lang.ClassLoader.loadClass(Unknown Source) java.lang.ClassLoader.loadClass(Unknown Source) java.lang.Class.forName0(Native Method) java.lang.Class.forName(Unknown Source) com.oracle.determinations.util.PlatformClassLoader.newInstance(PlatformClassLoader.java:61) com.oracle.determinations.engine.local.RulebaseLoader.loadCustomFunctions(RulebaseLoader.java:267) com.oracle.determinations.engine.local.RulebaseLoader.loadRulebase(RulebaseLoader.java:178) com.oracle.determinations.interview.engine.InterviewRulebase.<init>(InterviewRulebase.java:137) com.oracle.determinations.interview.engine.local.LocalRulebaseService.applyChangeSet(LocalRulebaseService.java:250) com.oracle.determinations.interview.engine.plugins.rulebaseresolver.ClassloaderRulebaseResolverPlugin.initialise(ClassloaderRulebaseResolverPlugin.java:73) com.oracle.determinations.interview.engine.local.LocalRulebaseService.<init>(LocalRulebaseService.java:53) com.oracle.determinations.interview.engine.local.LocalInterviewEngine.initialise(LocalInterviewEngine.java:181) com.oracle.determinations.interview.engine.local.LocalInterviewEngine.<init>(LocalInterviewEngine.java:66) com.oracle.determinations.interview.engine.InterviewEngineFactory.createInstance(InterviewEngineFactory.java:19) com.oracle.determinations.web.platform.servlet.WebDeterminationsServletContext.init(WebDeterminationsServletContext.java:180) com.oracle.determinations.web.platform.servlet.WebDeterminationsServletContext.<init>(WebDeterminationsServletContext.java:116) com.oracle.determinations.web.platform.servlet.WebDeterminationsServlet.init(WebDeterminationsServlet.java:73) org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472) org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99) org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:953) org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408) org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1008) org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:589) org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:310) java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source) java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) java.lang.Thread.run(Unknown Source)
note The full stack trace of the root cause is available in the Apache Tomcat/7.0.40 logs.
Similar Messages
-
Why it is giving compilation error
byte b = 50;
byte c = 50*2; //giving compilation error
why????It shouldn't give you compilation errors. It compiles
fine using JDK 1.4Maybe an earlier compiler (one that doesn't bother to actually check the int literals) is griping about a potential loss of precision, would be my only guess... -
Do java programms after giving compilation error generates .class file?
Do java programms after giving compilation error generates the .class file?
Do any outer class may have the private as access modifier?
If someone asks you that -do any program in java after giving a compilation error gives the .class file -do any class except(inner class)
be defined as private or static or protected or abc or xxx Now type the
following program
private class test
public static void main(String s[])
System.out.println("Hello!How are You!!");
-Compile it.... You must have
received this error test.java:1:The type type can't be private. Package members are always accessible within the current package. private class
test ^ 1 error
Here please notify that compiler has given the
error not the warning therfore .class file should not be created but now type
>dir *.class
___________ and you will see that the
test.class file existing in the directory nevertheless this .class file
is executable. if you will type __________________ >java test
it will
wish you Hello! and suerly asks you that How are You!! ________________!
You can test it with the following as acces modifiers and the progrm will run Ofcourse it will give you compilation error.
protected
xxx
abc
xyz
private
Do you have any justification?Hmm,
I've been working with different versions of jdk since, if I'm not mistaken, jdk1.0.6 and never was able to get *.class with compilation errors. It was true for Windows*, Linux, and Solaris*.
About the 'private'/'protected' modifier for the type (class) - it makes perfect sence not to allow it there: why would anyone want to create a type if no one can access it? There should be a reason for restricting your types - let's say, any inner class can be private/protected.
For ex., you shouldn't have compile problems with this:
class Test
public static void main(String s[])
System.out.println("Hello!How are You!!");
private class ToTest{}
Sorry, but I don't really know where you can read up on that. -
Using WebUtil Function giving an error
I installed the WebUtil, i executed the demo(example which would have been in installation file which is running on my system) but now i want to open html file in my form using webutils function present in some remote system WEBUTIL_FILE_TRANSFER.URL_To_Client I have been created the form with one button & wrote an trigger when-button-pressed wrote the below means calling the below function which is giving an error
WebUtil_file_transfer.URL_To_Client('www.somesite_filename.com','C:\CR');
or
WebUtil_file_transfer.URL_To_Client('C:\CR','www.somesite_filename.com');
ERROR::'URL_TO_CLIENT' is not a procedure or is undefined
Could u please help me & if u have any documents related to webutil please send those to me.My mail id is: [email protected]You need 3 arguments...
FUNCTION URL_To_Client( sourceURL in VARCHAR2,
clientDestination in VARCHAR2,
fileSize in PLS_INTEGER default 0) return BOOLEAN;
webutil_file_transfer.url_to_client('some_url', 'c:\cf', null);------- snip from comments of webutil.pll --------------
* URL_To_Client - pulls a file from the specified URL on any server and
* sends it via http to the specified destination on the client
* If you specify file size we can do a comparison after download to ensure
* that the sizes match
* Additionally if you specify withProgress and size you will get a progress
* bar.
* If you don't specify any size or if you specify default size, then webutil
* will try to get the size of the url on its own for the purpose of showing
* the progress bar.
* Note that the Title, subtitle and message strings cannot contain the '|'
* character
FUNCTION URL_To_Client( sourceURL in VARCHAR2,
clientDestination in VARCHAR2,
fileSize in PLS_INTEGER default 0) return BOOLEAN;
FUNCTION URL_To_Client_With_Progress(
sourceURL in VARCHAR2,
clientDestination in VARCHAR2,
fileSize in PLS_INTEGER default 0,
progressTitle in VARCHAR2,
progressSubTitle in VARCHAR2,
progressMessage in VARCHAR2) return BOOLEAN;
----------------- End Snip ----------Message was edited by:
Mark Reichman -
Upgrade from 6.40 - 7.10, Analyzer giving compile errors
We are testing out an upgrade to SAP GUI 7.10 (SP 9, V7100.2.9.1039), BEx (SP7 P1 R1352).
When running queries in the Analyzer, we get the following error "Compile Error: Can't find project or library" and the VB editor pops up to the following VB code:
Public Function BEx() As BExApplication
Set BEx = Application.Run("BExAnalyzer.xla!GetBEx")
End Function
I can shut down the debugger and the results are available but the VB windows continually pops up when any modifications are made to the report.
The following shows up in the trace although I'm not sure if it is related:
* Trace Started as: 10/10/2008 10:11:17 AM*
ListSeparator: ,
ExcelVersion: 11.0
AddinVersion: 7100.3.701.1352
BExCheckFrontend.CheckFrontend: No Check performed (20081003) 0
Errors while executing the 7.0 exit : SAPBEXonRefresh
-2146788248
Exception from HRESULT: 0x800A9C68
at Microsoft.VisualBasic.CompilerServices.LateBinding.InternalLateCall(Object o, Type objType, String name, Object[] args, String[] paramnames, Boolean[] CopyBack, Boolean IgnoreReturn)
at Microsoft.VisualBasic.CompilerServices.NewLateBinding.LateCall(Object Instance, Type Type, String MemberName, Object[] Arguments, String[] ArgumentNames, Type[] TypeArguments, Boolean[] CopyBack, Boolean IgnoreReturn)
at com.sap.bi.et.analyzer.addin.BExItemGrid.CallExitSAPBEXonrefresh()
-------------------10/10/2008 10:20:39 AM-------------------
System.Runtime.InteropServices.COMException (0x800A9C68): Exception from HRESULT: 0x800A9C68
at Microsoft.VisualBasic.CompilerServices.LateBinding.InternalLateCall(Object o, Type objType, String name, Object[] args, String[] paramnames, Boolean[] CopyBack, Boolean IgnoreReturn)
at Microsoft.VisualBasic.CompilerServices.NewLateBinding.LateCall(Object Instance, Type Type, String MemberName, Object[] Arguments, String[] ArgumentNames, Type[] TypeArguments, Boolean[] CopyBack, Boolean IgnoreReturn)
at com.sap.bi.et.analyzer.addin.BExConnect.FindLF(Object& iRange, Object& eRange)
Exception from HRESULT: 0x800A9C68
at Microsoft.VisualBasic.CompilerServices.LateBinding.InternalLateCall(Object o, Type objType, String name, Object[] args, String[] paramnames, Boolean[] CopyBack, Boolean IgnoreReturn)
at Microsoft.VisualBasic.CompilerServices.NewLateBinding.LateCall(Object Instance, Type Type, String MemberName, Object[] Arguments, String[] ArgumentNames, Type[] TypeArguments, Boolean[] CopyBack, Boolean IgnoreReturn)
at com.sap.bi.et.analyzer.addin.BExConnect.FindLF(Object& iRange, Object& eRange)
Any debug ideas or suggestions would be appreciated.
ThanksHi Adam,
Can you please check that the following settings are correct in Excel.
1. Make the following setting in Excel:
o Tools
o Macros
o Security
o Trusted Sources
o [x] Trust Access to Visual Basic Visual Basic Projects (CheckBox))
Also ensure that the default macro security setting is set to "Low".
Let me know how you go.
Cheers
Shaun -
Query giving compilation error
hi,
i am confused that my query is working fine on back-end sqlplus, but as i put to use it in my form
at pre-form to know count, it gives compilation error;
sqlplus
SELECT COUNT(*) M_CNT1
FROM(
SELECT POH_CODE||'-'||POH_NO CODE,NVL(POH_FREIGHT_lc_amount,0)
-NVL((
SELECT SUM(FTH_LC_AMOUNT)
FROM FIN_TXN_HEADER
WHERE FTH_REF_CODE = POH_CODE
AND FTH_REF_NO = POH_NO
AND FTH_ACNT_CODE = 'AC1009'
GROUP BY FTH_REF_CODE,FTH_REF_NO),0) NET, POH_CODE, POH_NO
FROM PURCHASE_ORDER_HEADEr
WHERE NVL(POH_FREIGHT_LC_AMOUNT,0) > 0);
M_CNT1
1
in pre-form
declare
m_cnt1 number;
BEGIN
SELECT COUNT(*) INTO M_CNT1
FROM(
SELECT NVL(POH_FREIGHT_lc_amount,0)
-NVL((
SELECT SUM(FTH_LC_AMOUNT)
FROM FIN_TXN_HEADER
WHERE FTH_REF_CODE = POH_CODE
AND FTH_REF_NO = POH_NO
AND FTH_ACNT_CODE = 'AC1009'
GROUP BY FTH_REF_CODE,FTH_REF_NO),0) NET
FROM PURCHASE_ORDER_HEADER
WHERE NVL(POH_FREIGHT_LC_AMOUNT,0) > 0);
END;return error;
Error 103 at line 11, column 2
Encountered the symbol "SELECT" when expecting on of the following:
( - + mod not null others<an identifier>
<a double-quoted delimited-identifier> <a bind variable> avg
count current exists max min prior sql stddev sum variance
cast<a string literal with character se specification>
<a number> <a single-quoted SQL string>
Error 103 at line 16, column 36
Encountered the symbol "," when expecting on of the following:
) intersect minus union
i think the problem is continuation line or single quote.
what is it can anybody help me please? tyvm.>
Error is in this line.
Use : before M_CNT1hi Navneet,
m_cnt1 is neither a db-or-a-non-db-block item.
so how come i used : sign before m_cnt1.
i guess the problem is below sonewhere may be,
-NVL((
SELECT SUM(FTH_LC_AMOUNT) --- line 11
OR
GROUP BY FTH_REF_CODE,FTH_REF_NO),0) NET --line 16 -
FPGA code successfully compiled in 2010 is giving compilation error in 2014.
I have developed RS485 FPGA code and successfully compiled with LabVIEW FPGA 2010.
Later changed the software to 2014 and installed Xilinx 14.7.
Now if I compile the same code with LabVIEW 2014 compile worker, i am getting error 'Process "Synthesis" failed'.
I am using a case structure with Error cluster as selector, So the case structure has 'No error' and 'Error' cases.
If I change the selector to 'True/False' then the compilation works.
Below is the error that i am getting when using Case structure with Error cluster as selector
LabVIEW FPGA: The compilation failed due to a Xilinx error. Details: ERROR:HDLParsers:1401 - "C:/NIFPGA/jobs/JyWfWcc_Gv3a9ah/NiFpgaAG_00000041_CaseStructureFrame_0001.vhd" Line 41. Object tunnel_s_error_out_2007 of mode OUT cannot be read. ERROR:HDLParsers:1401 - "C:/NIFPGA/jobs/JyWfWcc_Gv3a9ah/NiFpgaAG_00000041_CaseStructureFrame_0001.vhd" Line 42. Object tunnel_s_error_out_2007 of mode OUT cannot be read. --> Total memory usage is 190240 kilobytes Number of errors : 2 ( 0 filtered) Number of warnings: 1 ( 0 filtered) Number of infos : 0 ( 0 filtered)Attached FPGA_error_2014.jpg which depicts the working and 'not working' code in 2014.
In 'Not working' code,the selector terminal is error cluster.
I am able to resolve the issue just by changing the selecter terminal to boolean as in 'working code'.
But both sets of software code works fine in version 2010.
Attachments:
FPGA_error_2014.jpg 128 KB -
Error in creation of custom function module.
hi,
i am trying to create custom rfc enabled function module by copying the standard function module prgn_profile_name_get. in the export parameter PROFILE_FROM_TPRPROF what is the type i have to associate for this parameter. when i try to compare with char30 it is giving the error "char30 must be a flat strcture.you cannot use internal tables,strings,references,or strctures as components.
please solve my problem.Hi,
Leave it blank ,..
You can get any type of value into it.
regards,
nazeer -
XI custom lookup function in mapping - error
Hi,
I created custom function to do RFC lookup with ECC. We are on PI 7 with service pack level 14. The custom function takes value of 4 attributes from source and does RFC call to do lookup.
The below is the import of classes I used in the function
javax.xml.parsers.DocumentBuilder;java.io.*;
org.xml.sax.*;
javax.xml.transform.dom.DOMSource;
javax.xml.parsers.*;
org.w3c.dom.*;
com.sap.aii.mappingtool.tf3.rt.ResultList;
com.sap.aii.mapping.*;
com.sap.aii.mapping.lookup.*;
com.sap.aii.mapping.lookup.Payload;
javax.xml.transform.stream.StreamResult;
javax.xml.transform.*;
in the code I put warning trace as below -
trace.addWarning("INSIDE");
//determine the communication channel
Channel channel = LookupService.getChannel("DE1CLNT301", "RFC_O_FPATH" );
trace.addWarning("CHANNEL LOOKUP DONE");
//get RFC Accessor for the channel
accessor = LookupService.getRfcAccessor(channel);
trace.addWarning("ACESSOR LOOKUP DONE");
when I test run I get the below error:
Compilation of MM_O_MQ_I_SAP successful
INSIDE
CHANNEL LOOKUP DONE
Errorjava.lang.StringIndexOutOfBoundsException: String index out of range: -1
Can anyone help?
Thanks in advanceThanks Amit. It worked. below is the trace error
CHANNEL LOOKUP DONE RFC_O_FPATH (Party: , Service: DE1CLNT301, Object ID: f9f592e7e0b3316480afcaa8d462a140)
BEFORE ACCESSOR GET CHANNEL
Exception is at : java.lang.String.substring(String.java:1444)
Exception is at : com.sap.aii.utilxi.hmi.api.HmiHttpClientImpl.extractCookieValue(HmiHttpClientImpl.java:318)
Exception is at : com.sap.aii.utilxi.hmi.api.HmiHttpClientImpl.extractCookie(HmiHttpClientImpl.java:307)
Exception is at : com.sap.aii.utilxi.hmi.api.HmiHttpClientImpl.getCookies(HmiHttpClientImpl.java:292)
Exception is at : com.sap.aii.utilxi.hmi.api.HmiHttpClientImpl.sendRequestAndReceiveResponseViaHttp(HmiHttpClientImpl.java:207)
Exception is at : com.sap.aii.utilxi.hmi.api.HmiHttpClientImpl.sendRequestAndReceiveResponse(HmiHttpClientImpl.java:108)
Exception is at : com.sap.aii.utilxi.hmi.api.HmiClientAdapter.invokeMethod(HmiClientAdapter.java:88)
Exception is at : com.sap.aii.ibrep.server.lookup.SystemAccessorHmiClient.<init>(SystemAccessorHmiClient.java:64)
Exception is at : com.sap.aii.ibrep.server.lookup.SystemAccessorHmiClient.getInstance(SystemAccessorHmiClient.java:112)
Exception is at : com.sap.aii.ibrep.server.lookup.LookupServiceProvider$RemoteClientDelegator.<init>(LookupServiceProvider.java:99)
Exception is at : com.sap.aii.ibrep.server.lookup.LookupServiceProvider$RemoteClientDelegator.<init>(LookupServiceProvider.java:89)
Exception is at : com.sap.aii.ibrep.server.lookup.LookupServiceProvider$RemoteClient.getSystemAccessor(LookupServiceProvider.java:76)
Exception is at : com.sap.aii.mapping.lookup.LookupService.getRfcAccessor(LookupService.java:249)
Exception is at : com.sap.xi.tf._MM_O_MQ_I_SAP_.RFC_GET_FILE$(_MM_O_MQ_I_SAP_.java:95)
Exception is at : sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
Exception is at : sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
Exception is at : sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
Exception is at : java.lang.reflect.Method.invoke(Method.java:324)
Exception is at : com.sap.aii.mappingtool.tf3.rt.FunctionWrapper.calculateCurrentValue(FunctionWrapper.java:76)
Exception is at : com.sap.aii.mappingtool.tf3.rt.FunctionWrapper.cacheValue(FunctionWrapper.java:60)
Exception is at : com.sap.aii.mappingtool.tf3.rt.FunctionWrapper.gotoNextContext(FunctionWrapper.java:40)
Exception is at : com.sap.aii.mappingtool.tf3.AMappingProgram.processNode(AMappingProgram.java:266)
Exception is at : com.sap.aii.mappingtool.tf3.AMappingProgram.processNode(AMappingProgram.java:326)
Exception is at : com.sap.aii.mappingtool.tf3.AMappingProgram.start(AMappingProgram.java:415)
Exception is at : com.sap.aii.mappingtool.tf3.Transformer.start(Transformer.java:142)
Exception is at : com.sap.aii.mappingtool.tf3.AMappingProgram.execute(AMappingProgram.java:118)
Exception is at : com.sap.aii.ibrep.server.mapping.ServerMapService.transformInternal(ServerMapService.java:431)
Exception is at : com.sap.aii.ibrep.server.mapping.ServerMapService.execute(ServerMapService.java:169)
Exception is at : com.sap.aii.ibrep.sbeans.mapping.MapServiceBean.execute(MapServiceBean.java:52)
Exception is at : com.sap.aii.ibrep.sbeans.mapping.MapServiceRemoteObjectImpl0_0.execute(MapServiceRemoteObjectImpl0_0.java:301)
Exception is at : com.sap.aii.ibrep.sbeans.mapping.MapServiceRemoteObjectImpl0_0p4_Skel.dispatch(MapServiceRemoteObjectImpl0_0p4_Skel.java:146)
Exception is at : com.sap.engine.services.rmi_p4.DispatchImpl._runInternal(DispatchImpl.java:319)
Exception is at : com.sap.engine.services.rmi_p4.DispatchImpl._run(DispatchImpl.java:200)
Exception is at : com.sap.engine.services.rmi_p4.server.P4SessionProcessor.request(P4SessionProcessor.java:136)
Exception is at : com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:33)
Exception is at : com.sap.engine.core.cluster.impl6.session.MessageRunner.run(MessageRunner.java:41)
Exception is at : com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37)
Exception is at : java.security.AccessController.doPrivileged(Native Method)
Exception is at : com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:102)
Exception is at : com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:172)
ACCESSOR GET CHANNEL DONE
INPUTSTREAM CREATED
PAYLOAD XML
Errorjava.lang.NullPointerException -
Compilation error in a function due to simple IF-ELSEIF condition
DB version:10gR2
I have created the below mentioned function to activate or deactivate a custom functionality in a package.
The functionlity should be activated only if the second byte of sys_config.flag_a ='Y' with CODE_ID='103'. If flag_a is null or if no such row exist , the function should return false
During the compilation, i am getting error as mentioned below. This can be easily reproduced.
create table sys_config (flag_a varchar2(5), code_id varchar2(5));
create or replace function chk_if_mod_enabled
return boolean
is
v_flag_a sys_config.flag_a%TYPE;
begin
select nvl(substr(flag_a,2,1),'N')
into v_flag_a
from sys_config
where flag_a='Y'
and code_id='103';
if v_flag_a='Y'
then return true;
elseif v_flag_a='N'
then return false;
else return false;
End If;
exception
when others
then
Return false;
end;The error i am getting is
Errors for FUNCTION CHK_IF_MOD_ENABLED:
LINE/COL ERROR
15/9 PLS-00103: Encountered the symbol "V_FLAG_A" when expecting one
of the following:
:= . ( @ % ;
21/1 PLS-00103: Encountered the symbol "EXCEPTION" when expecting one
of the following:
begin case declare else elsif end exit for goto if loop mod
null pragma raise return select update while with
<an identifier> <a double-quoted delimited-identifier>
<a bind variable> << close current delete fetch lock insert
open rollback savepoint set sql execute commit forall merge
LINE/COL ERROR
pipe
25/4 PLS-00103: Encountered the symbol "end-of-file" when expecting
one of the following:
end not pragma final instantiable order overriding static
member constructor mapIf i comment out the ELSEIF bit from the code, i won't get any error. Why is this happening?You are returning boolean type.
So, you should be careful about using this function. You cannot use that in SQL.
Regards.
Satyaki De. -
Compile Error in code: Incorrect function specified for inlining
I used two custom function in vertex kernel code. pb3dutil command line compile ok but when compiled in as3 code, it throws this error. what's the possible reason for this?
That sounds like a bug in our code - if pb3dutil lets it through it should weld and translate just fine later. Can you post the example that's failing so we can look into it?
Thanks
Bob -
Erroring out when trying to call a custom function from the discoverer repo
Hi everybody, Thanks in advance....
I have a discoverer report giving the shelf life of an item.
The shelf life is to be calculated using a function.
Hence, a custom function is created. I registered the function using Discoverer Administrator Edition.
Then opened my desktop edition and opened the report.
Going to Tools > Calculations > New > Functions > Database > selected the function and changed the parameters passed to the function by going to Items selecting the columns from the tables they are available.
Now, when the query is refreshed, it comes up with an error "Function returns no value".
When tested from sql session, the function returns value.
any idea, as to whts the reason???
-- KiranHi,
Have you validated the function in Discoverer administrator?
Is the function valid?
Have you manually defined the function details or imported directly from the database?
pls. let us know. -
Run time error due to custom function module in a program
Hi,
I have created one program using custom function module ZIN_COMEV_CUSTDETAILNOTIF_OUT .The program is showing runtime error
"Incorrect parameter with CALL FUNCTION."
I have tested the FM using same set of parameter as in program it is working.It is throwing error while executing in program help.
Regards
DattaHello Nagraj or harish
I think you may be right.There is date field in my function module ,when I am testing function module I am giving it as
Y_DATE = 01.01.2011,but in program the field is DATS type and I have to give 20110101.If this is the problem how I can solve it.
CALL FUNCTION 'ZIN_COMEV_CUSTDETAILNOTIF_OUT'
EXPORTING
Y_SENDER = gv_g_sender
Y_RECEIVER = gv_g_reciever
Y_PARTNER = GV_V_PARTNER
Y_BASIC_PROCESS = GC_BASIC_PROCESS
Y_SWITCHNUM =
Y_SEN_LOAD =
Y_INTUI = GV_V_INTUI
Y_TRANSACTIONID =
Y_DATE = GV_V_DATE -
Error in Including the Custom function in Custom schema ...
Hi Experts ,
I developed a time custom Function through PE04 , Z_5RT and included in Custom Schema , ZM04, while executing in PT60 using the schema ZM04 an error coming . Any configuration required to include custom function in a schema .
Thanks and regards
Renjith MPYou are just going to place the custom function in the 'Func' field of schema.
Check the counry assignment, parameters & finally you have to activate the function. Check T52A0 for correct internal number.
http://help.sap.com/erp2005_ehp_04/helpdata/EN/96/79bc54b27911d1a5400000e83ddb11/frameset.htm
Regards
N Navaneethan
Edited by: Navaneethan on Dec 15, 2008 4:30 PM -
Inconsistent Errors when processing IDocs using custom Function Module
I am encountering a most perplexing error. Here is the situation.
We have a custom function module to update data in the EH&S system. We are having a bizarre error occurring. This is the basic processing of the function module:
1. IDoc data is read and loaded into an internal table.
2. Data is run through a series of checks to determine if the data is valid for entry into the system.
3. After validation we use function module C1F2_SUBSTANCES_READ_WITH_REF to read characteristic data for the substance. This data is used to validate whether current data exists to allow for loading of the IDoc data. (This is the step where the IDoc is receiving an error even if the data is valid. This only occurs if we are processing a large amount of Idocs and one IDoc contains valid data and another invalid data for the same substance. It occurs even if the Idocs are not processed in sequence. If individually processed or reprocessed after initial failure they pass. This is what is so confusing!) If it exists, a flag is set and the data is loaded using function module BAPI_BUS1077_CHANGE to modify the data.
4. If the flag is set to allow further processing, the function module C1F2_SUBSTANCES_READ_WITH_REF is used again to select different characteristic data for the substance. A similar validation process occurs and if it passes, data is loaded using BAPI_BUS1077_CHANGE to update and BAPI_BUS1077_CREATE to create new data.
Here is the situation:
When processing one valid record for one substance, the record loads successfully. When processing multiple valid records (all are valid) for one substance, they all load successfully. The problem occurs when attempting to load valid and invalid records for the same substance. Some times the program successfully loads the valid data (as expected). Other times, it will not load any records. It is not consistent!
The order of IDoc processing does not have an impact on the success of the load. Whether the valid or invalid record processes first does not have an impact on the success of the valid substance load.
Does anyone have ANY Idea of what is going on? I am clearing all fields in the function module before processing occurs. I cannot find what is causing the error to occur.
HELP!
Jim HardyI have some further information. It seems that if data for a substance is sent in two separate Idocs, one with valid and one with invalid data, As long as the two IDocs are processed consecutively, they process correctly. If they are separated by IDocs containing other substance information, they fail.
thanks
Jim
Maybe you are looking for
-
Getting INTERNAL_ERROR while updating tasks in OIM
Hi, I have written a custom connector and wrote tasks to update the attributes in the target system. After the approval workflow the user got provisioned to the target system and i am able to update all the attributes like firstname,lastname etc. I h
-
I have been checking out the forums and I think I am more confused than before. I have a bunch of classes in a .jar file and I want to use them in another app. I haven't changed what my classpath is because it has been so confusing I decided to reins
-
Quick pays for employees that have a direct deposit payment method?
Can you perform quick pays for employees that have a direct deposit payment method?
-
"Services for object" for SD document POSITION not header
Hi, Could you tell me if there is a possibility to create attchment for a postion of SD document not a header? I would like to see that ex. position number 20 has an attachment. It would be great aslo to see an icon for position or any other flag. Co
-
Delete a Freight condition according to Price condition value
Hello, we defined a Freight condition category ZTRA with an access sequence, we set condition records. When we create a sale order ZTRA value comes automaticly. But if header price condition ZR00 is more than 1000 euros we delete manually header Fre