Referencing a Variable When Calling a Function
I want to use a variable I have created when I call a certain function. It appears that I may be going about it the wrong away. Can someone take a look at this and tell me if it's possible or maybe how to achieve the result I'm trying for? It would be nice to use the variable anywhere in my whole script besides just inside a certain block.
This is my code:
DECLARE
continuing_term varchar2(6);
BEGIN
SELECT MIN(sgbstdn_term_code_eff)
INTO continuing_term
FROM sgbstdn
WHERE sgbstdn_pidm = '216520'
AND sgbstdn_styp_code = 'C'
AND sgbstdn_stst_code = 'AS';
SELECT substr(f_concat_as_of_cum_gpa('216520', continuing_term ,'UG','I'),14,3) FROM dual;
END;
/I'm getting the error that an into clause is expected at the second SELECT statement.
blackhole82 wrote:
I want to use a variable I have created when I call a certain function. It appears that I may be going about it the wrong away. Can someone take a look at this and tell me if it's possible or maybe how to achieve the result I'm trying for? It would be nice to use the variable anywhere in my whole script besides just inside a certain block.Can you tell us what is the result you're trying for?
If it's just setting a variable, then a bind variable may be the easiest thing.
Use the PL/SQL VARIABLE commnad to define a bind variable, such as gpa_code.
After it is defined, the varibale can be used in SQL statements of PL/SQL, as :gpa_code, prefixed with a colon.
For example:
VARIABLE gpa_code VARCHAR2 (3);
BEGIN
SELECT SUBSTR ( f_concat_as_of_cum_gpa ( 216520
, MIN(sgbstdn_term_code_eff)
, 'UG'
, 'I'
, 14
, 3
INTO :gpa_code
FROM sgbstdn
WHERE sgbstdn_pidm = '216520'
AND sgbstdn_styp_code = 'C'
AND sgbstdn_stst_code = 'AS';
END;
SELECT *
FROM some_other_table
WHERE column_a = :gpa_code;As Tubby mentioned earlier, making this a function rather than an anonymous block would probably be a good idea.
Then you could say
SELECT *
FROM some_other_table
WHERE column_a = get_gpa_code;or
SELECT *
FROM some_other_table
WHERE column_a = get_gpa_code (216520, 'C', 'UG');
This is my code:
DECLARE
continuing_term varchar2(6);
BEGIN
SELECT MIN(sgbstdn_term_code_eff)
INTO continuing_term
FROM sgbstdn
WHERE sgbstdn_pidm = '216520'
AND sgbstdn_styp_code = 'C'
AND sgbstdn_stst_code = 'AS';
SELECT substr(f_concat_as_of_cum_gpa('216520', continuing_term ,'UG','I'),14,3) FROM dual;
END;
/I'm getting the error that an into clause is expected at the second SELECT statement.The immediate problem is that you need an INTO clause, like you have in the first query.
You don't need two queries. See the bind variable illustration above.
Edited by: Frank Kulash on Nov 7, 2008 11:41 AM
Similar Messages
-
Type conflict when calling a function module (field length)
Dear All,
I am getting this following error while executing: Type conflict when calling a function module (field length)
This is piece of coding i have writern in my action button.
method SEARCH_MATERIAL .
data:
node_mat_input TYPE REF TO if_wd_context_node,
node_mat_output TYPE REF TO if_wd_context_node,
material TYPE BAPIMATDET-MATERIAL,
itab TYPE TABLE OF BAPIMATDOA.
node_mat_input = wd_context->get_child_node( 'NODE_MAT_INPUT' ).
node_mat_output = wd_context->get_child_node( 'NODE_MAT_OUTPUT' ).
node_mat_input->get_attribute( EXPORTING name = 'MATERIAL'
IMPORTING value = material ).
CALL FUNCTION 'BAPI_MATERIAL_GET_DETAIL'
EXPORTING
material = material
PLANT = plant
VALUATIONAREA =
VALUATIONTYPE =
MATERIAL_EVG =
IMPORTING
MATERIAL_GENERAL_DATA = itab
RETURN =
MATERIALPLANTDATA =
MATERIALVALUATIONDATA =
node_mat_output->bind_table( itab ).
endmethod.
Attributes are:
Node name = INPUT its structure is BAPIMATDET
INPUT attributes = MATERIAL of type BAPIMATDET-MATERIAL
Thanks,
Gopi.Hi Amit,
I have used service call to fetch records from that bapi..
The following is the code generated by service call:-
METHOD execute_bapi_material_get_deta .
declarations for context navigation
DATA:
node_bapi_material_get_de TYPE REF TO if_wd_context_node,
node_exporting TYPE REF TO if_wd_context_node,
node_material_general_dat TYPE REF TO if_wd_context_node,
node_importing TYPE REF TO if_wd_context_node,
lri_element TYPE REF TO if_wd_context_element.
declarations for fuba parameters
data:
stru_c_material_general_dat TYPE if_componentcontroller=>element_material_general_dat.
DATA:
attr_material TYPE bapimatdet-material,
attr_plant TYPE bapimatall-plant.
get all involved child nodes
node_bapi_material_get_de = wd_context->get_child_node( `BAPI_MATERIAL_GET_DE` ).
node_exporting = node_bapi_material_get_de->get_child_node( `EXPORTING` ).
node_material_general_dat = node_exporting->get_child_node( `MATERIAL_GENERAL_DAT` ).
node_importing = node_bapi_material_get_de->get_child_node( `IMPORTING` ).
get input from context
node_importing->get_attribute( EXPORTING name = `MATERIAL`
IMPORTING value = attr_material ).
node_importing->get_attribute( EXPORTING name = `PLANT`
IMPORTING value = attr_plant ).
the invocation - errors are always fatal !!!
CALL FUNCTION 'BAPI_MATERIAL_GET_DETAIL'
EXPORTING
material = attr_material
plant = attr_plant
" valuationarea = wd_This->Valuationarea
" valuationtype = wd_This->Valuationtype
" material_Evg = wd_This->Material_Evg
IMPORTING
material_general_data = stru_c_material_general_dat
" return = wd_This->Return
" materialplantdata = wd_This->Materialplantdata
" materialvaluationdata = wd_This->Materialvaluationdat
node_material_general_dat->bind_structure( stru_c_material_general_dat[] ).
ENDMETHOD.
but the problem is I am getting the following error while compiling...
" stru_c_materialplantdata " is not an internal table - the " OCCOURS n" specification is missing.
Thanks,
Gopi.
Edited by: Yegalaivan on Nov 18, 2009 8:30 AM -
ERROR: -Type conflict when calling a function module
hi to all,
when iam executing the program in browser Type conflict when calling a function module error is showing, i have bind all the attribute correctly still iam getting error, WHEN I CLICK ON THE SEARCH BUTTON DATA IS NOT COMING TO MY TABLE ITAB1 plz help me....
DATA:
NODE_IP_SELECTION TYPE REF TO IF_WD_CONTEXT_NODE,
ELEM_IP_SELECTION TYPE REF TO IF_WD_CONTEXT_ELEMENT,
STRU_IP_SELECTION TYPE IF_PLANNING_HISTORY=>ELEMENT_IP_SELECTION ,
ITAB TYPE TABLE OF ZSL_PL_UPDATE1,
WA TYPE ZSL_PL_UPDATE1.
navigate from <CONTEXT> to <IP_SELECTION> via lead selection
NODE_IP_SELECTION = WD_CONTEXT->GET_CHILD_NODE( NAME = `IP_SELECTION` ).
get element via lead selection
ELEM_IP_SELECTION = NODE_IP_SELECTION->GET_ELEMENT( ).
get all declared attributes
ELEM_IP_SELECTION->GET_STATIC_ATTRIBUTES(
IMPORTING
STATIC_ATTRIBUTES = STRU_IP_SELECTION ).
CALL FUNCTION 'ZBAPI_PL_UPDATE'
EXPORTING
GV_LIFNR = STRU_IP_SELECTION-LIFNR
GV_MATNR = STRU_IP_SELECTION-LIFNR
GV_GJAHR = ' '
GV_WEEK_LOW = STRU_IP_SELECTION-FROM_WEEK
GV_WEEK_HIGH = STRU_IP_SELECTION-TO_WEEK
IMPORTING
RETURN =
TABLES
GT_PL_UPDATE = ITAB
DATA:
NODE_PLANN_NODE TYPE REF TO IF_WD_CONTEXT_NODE,
ELEM_PLANN_NODE TYPE REF TO IF_WD_CONTEXT_ELEMENT,
STRU_PLANN_NODE TYPE IF_PLANNING_HISTORY=>ELEMENT_PLANN_NODE,
WA1 TYPE IF_PLANNING_HISTORY=>ELEMENT_PLANN_NODE,
ITAB1 TYPE TABLE OF IF_PLANNING_HISTORY=>ELEMENT_PLANN_NODE.
LOOP AT ITAB INTO WA.
MOVE-CORRESPONDING WA TO WA1.
APPEND WA1 TO ITAB1.
ENDLOOP.
navigate from <CONTEXT> to <PLANN_NODE> via lead selection
NODE_PLANN_NODE = WD_CONTEXT->GET_CHILD_NODE( NAME = `PLANN_NODE` ).
CALL METHOD NODE_PLANN_NODE->BIND_TABLE
EXPORTING
NEW_ITEMS = ITAB1
SET_INITIAL_ELEMENTS = ABAP_TRUE
INDEX =
ENDMETHOD.CALL FUNCTION 'ZBAPI_PL_UPDATE'
EXPORTING
GV_LIFNR = STRU_IP_SELECTION-LIFNR
GV_MATNR = STRU_IP_SELECTION-LIFNR
GV_GJAHR = ' '
GV_WEEK_LOW = STRU_IP_SELECTION-FROM_WEEK
GV_WEEK_HIGH = STRU_IP_SELECTION-TO_WEEK
IMPORTING
RETURN =
TABLES
GT_PL_UPDATE = ITAB
Problem is here
check out the type GV_GJAHR whether it accepts string type.
thanks
sarbjeet singh -
Hi Experts,
When I run my Application in Portal, i am getting the following error.
Type conflict when calling a function module., error key: RFC_ERROR_SYSTEM_FAILURE
When I execute the BAPI, it is getting executed.
My Bapi Strucute:
Import Parameters
IM_MAT_Search --> ZPTIP_MAT --> Import Parameters
Tables
IT_INFO_REC --> ZMM_GET_ITEM --> Output Parameters
When I import the model, i am getting the structure like this
BAPI_Name > ZMM_BAPI_Input> IM_MAT_Search(respective Parameters) , Output (respective Tables and their parameters)
> ZMM_Input1> Parameters
This is the way, how i am executing in webdynpro java
Zmm_Bapi_Ptip_Search_Input eleInput = new Zmm_Bapi_Ptip_Search_Input();
wdContext.nodeZmm_Bapi_Ptip_Search_Input().bind(eleInput);
Zptip_Asset eleInputAsset = new Zptip_Asset();
eleInputAsset.setSearch("ACRS");
wdContext.nodeZptip_Asset().bind(eleInputAsset);
eleInput.setIm_Ast_Search(eleInputAsset);
wdContext.nodeZmm_Bapi_Ptip_Search_Input().bind(eleInput);
wdContext.nodeZmm_Bapi_Ptip_Search_Input().currentZmm_Bapi_Ptip_Search_InputElement().modelObject().execute();
wdContext.nodeOutput().invalidate();
Please let me know, how to do the same.
Thanks in advance.
Regards,
PalaniHi David,
I checked for the Parameter of setIm_Ast_Search, it is of Zptip_Asset.
Hi Saleem,
When I changed the same, i am getting the Type conflict error,
Type conflict when calling a function module., error key: RFC_ERROR_SYSTEM_FAILURE
Please let me know,what can be done in this regard to solve the problem.
My BAPI Structure when imported as model
SearchBAPI
--> ZMM_BAPI_SEARCH_INPUT
> IM_AST_SEARCH(zPTIP_ASSET)
>Zptip_Asset
>Search (Parameter)
> OutPut(ZMM_BAPI_Search_Output)
>IT_Asser_Rec(ZMM_Asset)
>ZMM_Asset
>TXT100 (output Parameter)
--> ZMM_BAPI_SEARACH_OUTPUT
--> ZPTIP_ASSET
>Search (Parameter)
Thanks & Regards,
Palani
Edited by: Palani Appan on Nov 11, 2009 5:31 PM -
i am trying to generate purchase order and i create a BAPI also which is active.
But when i call the BAPI from SYbase Mobile Object RFC then after calling it gives an Error "Conflict when calling a Function Module (Field Length)".Hi,
Yeah i tried my Z_BAPI in R3 and then giving some ERROR.
This is my CODE-
FUNCTION ZBAPIPOTV2.
*"*"Local Interface:
*" IMPORTING
*" VALUE(POHD) TYPE ZPOHD OPTIONAL
*" VALUE(POITEM) TYPE ZPOITEM OPTIONAL
*" TABLES
*" RETURN STRUCTURE BAPIRET1 OPTIONAL
data: ls_pohd type bapimepoheader,
ls_pohdx TYPE bapimepoheaderx,
lt_poit TYPE TABLE OF bapimepoitem,
lt_poitx TYPE TABLE OF bapimepoitemx,
ls_poit TYPE bapimepoitem,
ls_poitx TYPE bapimepoitemx.
MOVE-CORRESPONDING pohd to ls_pohd.
MOVE-CORRESPONDING poitem to ls_poit.
ls_pohdx-comp_code = 'x'.
ls_pohdx-doc_type = 'x'.
ls_pohdx-vendor = 'x'.
ls_pohdx-purch_org = 'x'.
ls_pohdx-pur_group = 'x'.
ls_poit-po_item = '00010'.
APPEND ls_poit to lt_poit.
ls_poitx-po_item = '00010'.
ls_poitx-po_itemx = 'x'.
ls_poitx-material = 'x'.
ls_poitx-plant = 'x'.
ls_poitx-quantity = 'x'.
APPEND ls_poitx to lt_poitx.
CALL FUNCTION 'BAPI_PO_CREATE1'
EXPORTING
POHEADER = ls_pohd
POHEADERX = ls_pohdx
* POADDRVENDOR =
* TESTRUN =
* MEMORY_UNCOMPLETE =
* MEMORY_COMPLETE =
* POEXPIMPHEADER =
* POEXPIMPHEADERX =
* VERSIONS =
* NO_MESSAGING =
* NO_MESSAGE_REQ =
* NO_AUTHORITY =
* NO_PRICE_FROM_PO =
* PARK_COMPLETE =
* PARK_UNCOMPLETE =
* IMPORTING
* EXPPURCHASEORDER =
* EXPHEADER =
* EXPPOEXPIMPHEADER =
TABLES
RETURN = return
POITEM = lt_poit
POITEMX = lt_poitx
* POADDRDELIVERY =
* POSCHEDULE =
* POSCHEDULEX =
* POACCOUNT =
* POACCOUNTPROFITSEGMENT =
* POACCOUNTX =
* POCONDHEADER =
* POCONDHEADERX =
* POCOND =
* POCONDX =
* POLIMITS =
* POCONTRACTLIMITS =
* POSERVICES =
* POSRVACCESSVALUES =
* POSERVICESTEXT =
* EXTENSIONIN =
* EXTENSIONOUT =
* POEXPIMPITEM =
* POEXPIMPITEMX =
* POTEXTHEADER =
* POTEXTITEM =
* ALLVERSIONS =
* POPARTNER =
* POCOMPONENTS =
* POCOMPONENTSX =
* POSHIPPING =
* POSHIPPINGX =
* POSHIPPINGEXP =
* SERIALNUMBER =
* SERIALNUMBERX =
* INVPLANHEADER =
* INVPLANHEADERX =
* INVPLANITEM =
* INVPLANITEMX =
ENDFUNCTION.
i am trying to generate purchase order and i create a BAPI also which is active. But when i call the BAPI from SYbase Mobile Object RFC then after calling it gives an Error "Conflict when calling a Function Module (Field Length)". -
TRFC type conflict when calling the function module
Hi,
When I schedule, it is stucking up with TRFC and giving error message in SM58 as" TRFC type conflict when calling the function module" .
even if I execute the trfc LUWs ,load is not successful.
could you please any body suggest for this error.
Thanks
RHi Guys,
could any suggest why this is happening.
TRFC is stuck up and giving error message.
Thanks
Ram -
HTTPService: How can I send a variable or call a function in it?
Ok i have the following HTTPService request:
<mx:HTTPService id="userRequest" url="
http://mywebsite/get_data.php"
useProxy="false" method="POST">
<mx:request xmlns="">
<user1>{username.text}</user1>
</mx:request>
</mx:HTTPService>
Pretty straight forward stuff there. EXCEPT... i want to use
a variable instead of 'username.text...
<user1>{UserNameList[0]}</user1>
OR i want to be able to call a function that will return the
results such as:
<user2>{ UserFunction() }</user2>
Of course, neither of these work and this makes me sad :(
Anyone have any ideas? Much appreciated~!on that i can't help
i'm a .net programmer an i use a lot httpservices but mostly
i use webservices to get my data.
But i can give my way of working. When you send your data
from flex you are sending a virtual xml file thru http, then in
.net using it xml class i read this stream of xml coming from flex,
go to my database, get the result , wrapped it in xml and send thru
stream again, so that flex understands the answer. When it gets to
flex i just use e4x to read my data.
There are tons of tutorials on the net for PHP, i wish i had
half for .Net :D -
Error when call RFC Function module in R/3
Dear All,
We are trying to call RFC function module CBIF_GLM1_PROCESS_ORDER_READ (This is not a BAPI and also not released ) in R/3 from XI system.
we are facing the error "Error while lookup Exception during processing the payload. Error when calling an adapter by using the communication channel CC_PPPI_MES_RFC_Rcvr (Party: , Service: WCD_320, Object ID: 16563889b449328eac76caa6a3bc592e) XI AF API call failed. Module exception: 'error while processing the request to rfc-client: com.sap.aii.adapter.rfc.afcommunication.RfcAFWException: error while processing message to remote system:com.sap.aii.adapter.rfc.core.client.RfcClientException: failed to parse BAPI response due to: com.sap.aii.adapter.rfc.util.bapi.BapiException: Parameter with name RETURN not found.'. Cause Exception: 'com.sap.aii.adapter.rfc.afcommunication.RfcAFWException: error while processing message to remote system:com.sap.aii.adapter.rfc.core.client.RfcClientException: failed to parse BAPI response due to: com.sap.aii.adapter.rfc.util.bapi.BapiException: Parameter with name RETURN not found.'."
This is the first time we are doing this configuration.
Could you please let me know what woulbe the reason.read the original message
We are trying to call RFC function module CBIF_GLM1_PROCESS_ORDER_READ (This is not a BAPI and also not released ) in R/3 from XI system.
I am talking about the above Receiver RFC channel which you guys are using to call R/3 from XI. That where you need to change the commit parameter -
ERROR:When calling a Function
Hi all,
i am trying to call a function from AM.and when i run the page i got this error. anbody please help me guys.
its very urgent.
oracle.apps.fnd.framework.OAException: Application: FND, Message Name: SQL_PLSQL_ERROR. Tokens: ROUTINE = AppsConnectionManager.appsInitialize(int,int,int,int,Connection):-1,-1,-1,0,oracle.jdbc.driver.OracleConnection@f7a4ba; REASON = java.sql.SQLException: No more data to read from socket; ERRNO = 17410; (Could not lookup message because there is no database connection)
at oracle.apps.fnd.framework.server.OAExceptionUtils.processAOLJErrorStack(OAExceptionUtils.java:988)
at oracle.apps.fnd.framework.OACommonUtils.processAOLJErrorStack(OACommonUtils.java:866)
at oracle.apps.fnd.framework.CreateIcxSession.getEncryptedSessId(CreateIcxSession.java:219)
at oracle.apps.fnd.framework.CreateIcxSession.createSession(CreateIcxSession.java:80)
at runregion.jspService(runregion.jsp:96)
at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:56)
at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:317)
at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:465)
at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:379)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:727)
at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:306)
at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:767)
at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:259)
at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:106)
at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:803)
at java.lang.Thread.run(Thread.java:534)
## Detail 0 ##
oracle.apps.fnd.framework.OAException: Application: FND, Message Name: FND_GENERIC_MESSAGE. Tokens: MESSAGE = java.sql.SQLException: No more data to read from socket; (Could not lookup message because there is no database connection)
at oracle.apps.fnd.framework.OAException.wrapperException(OAException.java:888)
at oracle.apps.fnd.framework.OAException.wrapperException(OAException.java:862)
at oracle.apps.fnd.framework.server.OAExceptionUtils.processAOLJErrorStack(OAExceptionUtils.java:980)
at oracle.apps.fnd.framework.OACommonUtils.processAOLJErrorStack(OACommonUtils.java:866)
at oracle.apps.fnd.framework.CreateIcxSession.getEncryptedSessId(CreateIcxSession.java:219)
at oracle.apps.fnd.framework.CreateIcxSession.createSession(CreateIcxSession.java:80)
at runregion.jspService(runregion.jsp:96)
at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:56)
at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:317)
at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:465)
at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:379)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:727)
at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:306)
at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:767)
at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:259)
at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:106)
at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:803)
at java.lang.Thread.run(Thread.java:534)
## Detail 0 ##
java.sql.SQLException: No more data to read from socket
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134)
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:179)
at oracle.jdbc.dbaccess.DBError.check_error(DBError.java:1160)
at oracle.jdbc.ttc7.MAREngine.unmarshalUB1(MAREngine.java:963)
at oracle.jdbc.ttc7.MAREngine.unmarshalSB1(MAREngine.java:893)
at oracle.jdbc.ttc7.Oopen.receive(Oopen.java:105)
at oracle.jdbc.ttc7.TTC7Protocol.open(TTC7Protocol.java:611)
at oracle.jdbc.driver.OracleStatement.open(OracleStatement.java:576)
at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:2809)
at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:622)
at oracle.jdbc.driver.OraclePreparedStatement.execute(OraclePreparedStatement.java:698)
at oracle.apps.fnd.security.AppsConnectionManager.appsInitialize(AppsConnectionManager.java:472)
at oracle.apps.fnd.security.AppsConnectionManager.borrowConnection(AppsConnectionManager.java:319)
at oracle.apps.fnd.common.Context.borrowConnection(Context.java:1773)
at oracle.apps.fnd.common.AppsContext.getPrivateConnectionFinal(AppsContext.java:2460)
at oracle.apps.fnd.common.AppsContext.getPrivateConnection(AppsContext.java:2398)
at oracle.apps.fnd.common.AppsContext.getJDBCConnection(AppsContext.java:2257)
at oracle.apps.fnd.common.AppsContext.getJDBCConnection(AppsContext.java:2072)
at oracle.apps.fnd.common.AppsContext.getJDBCConnection(AppsContext.java:1976)
at oracle.apps.fnd.common.AppsContext.getJDBCConnection(AppsContext.java:1993)
at oracle.apps.fnd.common.Context.getJDBCConnection(Context.java:1541)
at oracle.apps.fnd.framework.CreateIcxSession.getConnection(CreateIcxSession.java:559)
at oracle.apps.fnd.framework.CreateIcxSession.getIntValue(CreateIcxSession.java:346)
at oracle.apps.fnd.framework.CreateIcxSession.getUserID(CreateIcxSession.java:323)
at oracle.apps.fnd.framework.CreateIcxSession.getEncryptedSessId(CreateIcxSession.java:148)
at oracle.apps.fnd.framework.CreateIcxSession.createSession(CreateIcxSession.java:80)
at runregion.jspService(runregion.jsp:96)
at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:56)
at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:317)
at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:465)
at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:379)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:727)
at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:306)
at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:767)
at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:259)
at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:106)
at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:803)
at java.lang.Thread.run(Thread.java:534)
oracle.apps.fnd.framework.OAException: Application: FND, Message Name: FND_GENERIC_MESSAGE. Tokens: MESSAGE = java.sql.SQLException: No more data to read from socket; (Could not lookup message because there is no database connection)
at oracle.apps.fnd.framework.OAException.wrapperException(OAException.java:888)
at oracle.apps.fnd.framework.OAException.wrapperException(OAException.java:862)
at oracle.apps.fnd.framework.server.OAExceptionUtils.processAOLJErrorStack(OAExceptionUtils.java:980)
at oracle.apps.fnd.framework.OACommonUtils.processAOLJErrorStack(OACommonUtils.java:866)
at oracle.apps.fnd.framework.CreateIcxSession.getEncryptedSessId(CreateIcxSession.java:219)
at oracle.apps.fnd.framework.CreateIcxSession.createSession(CreateIcxSession.java:80)
at runregion.jspService(runregion.jsp:96)
at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:56)
at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:317)
at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:465)
at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:379)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:727)
at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:306)
at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:767)
at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:259)
at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:106)
at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:803)
at java.lang.Thread.run(Thread.java:534)
## Detail 0 ##
java.sql.SQLException: No more data to read from socket
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134)
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:179)
at oracle.jdbc.dbaccess.DBError.check_error(DBError.java:1160)
at oracle.jdbc.ttc7.MAREngine.unmarshalUB1(MAREngine.java:963)
at oracle.jdbc.ttc7.MAREngine.unmarshalSB1(MAREngine.java:893)
at oracle.jdbc.ttc7.Oopen.receive(Oopen.java:105)
at oracle.jdbc.ttc7.TTC7Protocol.open(TTC7Protocol.java:611)
at oracle.jdbc.driver.OracleStatement.open(OracleStatement.java:576)
at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:2809)
at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:622)
at oracle.jdbc.driver.OraclePreparedStatement.execute(OraclePreparedStatement.java:698)
at oracle.apps.fnd.security.AppsConnectionManager.appsInitialize(AppsConnectionManager.java:472)
at oracle.apps.fnd.security.AppsConnectionManager.borrowConnection(AppsConnectionManager.java:319)
at oracle.apps.fnd.common.Context.borrowConnection(Context.java:1773)
at oracle.apps.fnd.common.AppsContext.getPrivateConnectionFinal(AppsContext.java:2460)
at oracle.apps.fnd.common.AppsContext.getPrivateConnection(AppsContext.java:2398)
at oracle.apps.fnd.common.AppsContext.getJDBCConnection(AppsContext.java:2257)
at oracle.apps.fnd.common.AppsContext.getJDBCConnection(AppsContext.java:2072)
at oracle.apps.fnd.common.AppsContext.getJDBCConnection(AppsContext.java:1976)
at oracle.apps.fnd.common.AppsContext.getJDBCConnection(AppsContext.java:1993)
at oracle.apps.fnd.common.Context.getJDBCConnection(Context.java:1541)
at oracle.apps.fnd.framework.CreateIcxSession.getConnection(CreateIcxSession.java:559)
at oracle.apps.fnd.framework.CreateIcxSession.getIntValue(CreateIcxSession.java:346)
at oracle.apps.fnd.framework.CreateIcxSession.getUserID(CreateIcxSession.java:323)
at oracle.apps.fnd.framework.CreateIcxSession.getEncryptedSessId(CreateIcxSession.java:148)
at oracle.apps.fnd.framework.CreateIcxSession.createSession(CreateIcxSession.java:80)
at runregion.jspService(runregion.jsp:96)
at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:56)
at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:317)
at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:465)
at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:379)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:727)
at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:306)
at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:767)
at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:259)
at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:106)
at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:803)
at java.lang.Thread.run(Thread.java:534)its very urgent.Oh no! Sorry I couldn't respond sooner - I do hope the patient who was undergoing his critical surgery that obviously was held up because you couldn't call your function has survived!
Looks like the connection was dropped/terminated. What does your function do? You haven't really given any information whatsoever that would enable someone to help you (such as version, perhaps a code snippet, etc)
John -
Bad performance when calling a function in where clause
Hi All,
I have a performance problem when executing a query that contains a function call in my where clause.
I have a query with some joins and a where clause with some regular filters. But one of these filters is a function, and its input parameters are columns of the tables used in the query.
When I run it with only a few rows in the tables, it goes ok. But as the number of rows grows, performance falls geometrically, even when my where clause filters the result to only a few rows.
If I take the function call off of the where clause, then run the query and then call the function for each returned row, performance is ok. Even when the number of returned rows is big.
But I need the function call to be in the where clause, because I can't build a procedure to execute it.
Does anyone have any clue on how to improve performance?
Thanks,
RafaelYou have given very little information...
>
If I take the function call off of the where clause, then run the query and then call the function for each returned row, performance is ok. Even when the number of returned rows is big. Can you describe how you measured the performance for a big result set without the function? For example lets say there had been 10.000 rows returned (which is not really big, but it is astarting point). Did you see all 10.000 rows? A typical mistake is to execute the query in some tool like Oracle SQL Developer or TOAD and measure how fast the first couple of rows are returned. Not the performance of the full select.
As you can see from this little detail there are many questions that you need to address first before we can drill down to the root of your problem. Best way is to go through the thread that Centinul linked and provide all that information first. During the cause of that you might discover that you learn things on the way that help a lot for later tuning problems/approaches.
Edited by: Sven W. on Aug 17, 2009 5:16 PM -
ERROR when called TO_CHAR function from XMLQuery
when I tried to execute the followingin XMLQuery by calling TO_CHAR() whithin this query I am getting this error"ORA-19237: XP0017 - unable to resolve call to function - fn:TO_CHAR
any help/ideas on the follwing would be much appreciated.
Thanks
Abdul
select XMLQuery('<marketfeed id="f1" action="CREATE" source="marketfeed1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" >
<competitions>
{for $f in ora:view("fixture")
for $c in ora:view("competition")
for $homes in ora:view("squad")
for $aways in ora:view("squad")
for $homet in ora:view("team")
for $awayt in ora:view("team")
where $f/ROW/GID = "g321667"
and $f/ROW/COMPETITIONID = $c/ROW/ID
and $f/ROW/HOMESQUADID = $homes/ROW/ID
and $f/ROW/AWAYSQUADID = $aways/ROW/ID
and $homes/ROW/TEAMID = $homet/ROW/ID
and $aways/ROW/TEAMID = $awayt/ROW/ID
return
<competition id="{$c/ROW/ID/text()}"
shortname="{$c/ROW/NAME/text()}"
name="{$c/ROW/NAME/text()}">
<teamlists>
<teamitam name="{$homet/ROW/NAME/text()}"
id = "{$homes/ROW/TID/text()}" />
<teamitem name="{$awayt/ROW/NAME/text()}"
id = "{$aways/ROW/TID/text()}" />
</teamlists>
<matches>
<match id="{$f/ROW/GID/text()}"
venue="{$f/ROW/VENUE/text()}"
matchdate="{TO_CHAR($f/ROW/STARTDATE/text(), "YY-MM-DD")}"
name="{concat($homet/ROW/NAME/text(), " v ", $awayt/ROW/NAME/text())}"
>
<teams>
<team home="H" id = "{$homes/ROW/TID/text()}" />
<team home="A" id = "{$aways/ROW/TID/text()}" />
</teams>
</match>
</matches>
</competition>
</competitions>
</marketfeed>'
returning content
from dual
Edited by: QAbdul on 26-Oct-2010 06:44Hi,
QAbdul wrote:
when I tried to execute the followingin XMLQuery by calling TO_CHAR() whithin this query I am getting this error"ORA-19237: XP0017 - unable to resolve call to function - fn:TO_CHARTO_CHAR is a SQL function, XQuery is unaware of it.
XPath 2.0 specifications define a fn:format-date function but Oracle has not included yet in its XQuery implementation.
Easiest way to go is A_Non's solution, but if you need to format at multiple places in the query, you can declare a local XQuery function.
For example, to format to "DD/MM/YYYY" from the canonical xs:date format "YYYY-MM-DD" :
{code}
declare function local:format-date($d as xs:date) as xs:string
let $s := xs:string($d)
return concat(
substring($s, 10, 2), "/",
substring($s, 7, 2), "/",
substring($s, 2, 4)
{code}
and an example of use :
{code}
SQL> CREATE TABLE test_xqdate AS SELECT sysdate dt FROM dual;
Table created
SQL> SELECT *
2 FROM XMLTable(
3 'declare function local:format-date($d as xs:date) as xs:string
4 {
5 let $s := xs:string($d)
6 return concat(
7 substring($s, 10, 2), "/",
8 substring($s, 7, 2), "/",
9 substring($s, 2, 4)
10 )
11 }; (: :)
12 for $i in ora:view("TEST_XQDATE")/ROW/DT
13 return element e {
14 attribute xs_date_format { $i/text() },
15 attribute local_format { local:format-date($i) }
16 }'
17 COLUMNS
18 xs_date_format VARCHAR2(10) PATH '@xs_date_format',
19 local_format VARCHAR2(10) PATH '@local_format'
20 )
21 ;
XS_DATE_FORMAT LOCAL_FORMAT
2010-10-28 28/10/2010
{code} -
Error occuring when calling a function via BSP
In BSP, I call the function 'SD_DELIVERY_UPDATE_PICKING' to update a delivery. Unfortunately, when there is an error during processing this function (it is returned in the export table PROT), I found that this delivery is always locked! On the other hand, calling this function in SAP GUI, I haven't found this problem. How can I solve it. I try to use the command 'commit work.', but it doesn't work.
Moreover, when this function raises an error message, in SAP GUI this function terminates its work according to the message type 'E' rule. However, in BSP, when this error message is raised, the page shows 'The page cannot be displayed'. How can I solve these problems.you should do something like below.
call function 'SD_DELIVERY_UPDATE_PICKING'
exporting
vbkok_wa = <vbkok_wa>
synchron = ' '
no_messages_update = ' '
tables
vbpok_tab = tvbpok
prot = wat_prot
exceptions
error_message = 2.
case sy-subrc.
when 0.
describe table wat_prot lines fa_lines.
if fa_lines = 0.
commit work.
else.
* fill a vairable with a message and show it in BSP page
endif.
when 2.
Regards
Raja -
When calling a function in a shared library, are parameters copied locally?
I have a shared library with a function whose header is:
void __cdecl nextevent(double Input[], int32_t len);
When called it sends the values in Input[] to the control Input:
This vi is compiled to a DLL which uses the header above.
My question now is: Which of these operations is the correct one:
1. The Input control is a reference to the array Input[], no values are copied.
2. The values in the array Input[] are copied to the control Input, the local copy is used by the vi, then the values in the local copy are removed/deallocated.
It seems reasonable to me that 1 is the correct one, but I can't be sure, and I can't think of any way to check it.
Lars Melander
Uppsala Database Laboratory, Uppsala University
Solved!
Go to Solution.For this particular case option 2 is valid. The reason is that LabVIEW arrays are not just pointers to a memory location but handles. And there is no legal way to create valid LabVIEW handles from an C runtime allocated memory pointer. So LabVIEW converts the incoming array pointer into a handle which is basically nothing else than allocating the handle with a size large enough to hold all array data, and then copies the data from the array pointer into this handle. After the call, the handle is properly deallocated.
Rolf Kalbermatter
CIT Engineering Netherlands
a division of Test & Measurement Solutions -
Segmentation fault when calling gpctr function from matlab mex file
I am trying to write a simple mex file for square wave generation using counter1 of PCI-6035E. I am using matlab's native compiler to compile and link with the nidaq32 library, ver.6.9.3, with no errors. When the mex function is called from a matlab script, however, the program crashes at the first call, to reset the counter. (I can generate a square wave with the test panel.)
Sorry for the delay in responding. I got caught up in other stuff. I am attaching my little program as requested. As you can see, I have just wrapped a mexFunction call round the example code for square wave generation. After I posted this, I tracked down a copy of BorlandC++, installed it on my computer and recompiled using that compiler and *b.* libraries. And would you know it, the program works. The question remains, though, why it doesn't work with Matlab's native lcc compiler. Plus, I have limited disk space, so if I can do without BorlandC, I can use the extra room. The runtime error was a Segmentation fault that I traced to the first call to GPCTR_Control.
Attachments:
pulsegen.c 4 KB -
I have created a simplee application that controls a piece of equipment with all control via a supplied dll. Hence, there are a number of Call Library Function Nodes within the code and a modicum of other LabVIEW code. Everything works fine as a LabVIEW application, but when converted to an executable, although the application runs and functions, as soon as any Call Library Function Node is executed, calling from the dll, I get the C++ debug error in the attachment.
Is this something that I can solve from within LabVIEW, or is the problem likely buried in the dll?
Damian
Attachments:
CLFN error.JPG 22 KBHi Wise,
Try building an executable from a very simple VI that makes one call to the dll. Have you also try using the Call Library Function node on other simple dlls that you know will work?
Regards,
Stanley Hu
National Instruments
Applications Engineering
http://www.ni.com/support
Maybe you are looking for
-
Difference in Pricing of Credit memo Inovice AND Credit memo
We have difference in prices when we create a return credit memo. We have scale price and for 500 product the scale price is 92 rs. the basic price is 112. We have created an order for 500 items where 92 rs has piced and in the invoce for 500 92 rs h
-
Hi All, Attached 997(acknowledgement coming inbound from customer to SAP) is failing with error in parsing at AK404 (index out of bounds exception) Any idea why? thx mike
-
Facebook, twitter, vimeo and flickr offend me
The links to Facebook, twitter, vimeo and flickr offend me - I don't like these brands, won't ever use them and don't want a reminder on my phone. How do I make them go away... Google says give up... I'm unhappy
-
My macbook, OS 6.7, drops my wireless connection after about 10 minutes - help? The lynksys signal works on other computers/iphone but not on my older macbook.
-
Regarding Function Module trace.
Hi, How are you ?. I need a help for Function Module datasources of how to get info of fields related to tables. I tried ST05 of SQL Trace but not showing complete picture and I heard through ST12 can do Function module trace to obtain table names. C