User function code not substituted
Hi
I have a user function (getCode(...)) of the form
case
when exists (select * from ...)
then '!Ok!'
else '!None!'
end
When I use this function in a interface mapping (getCode(a,b,c)), the code is not substituted in the generated query (as seen in the operator):
insert /*+ APPEND */ into ...
Z_CODE,
RUN_NR,
REC_ID
select
getCode( NAME, 'ZIV', 'G' ),
RUN_NR,
REC_ID
from ...
where (1=1)
and the execution results in an ORA-00904 exception: Invalid column name.
How come?
Thanks
First of all, thanks for your answers!
The problem was lying in the definition of the function's syntax:
I'm using the possibility to specify the data_type of the arguments: getCode($(run_nr)n, $(tabi)s, $(code)s).
Unfortunately, I put a space between the arg_name and the data_type! This causes the function not to be substituted into the query ...
Once again thanks to all.
Cheers, Benno
Similar Messages
-
Unit Test Variable Substitution in PL/SQL User Vailidation code not running
Hi
I am using new Unit Test Feature in SQL Developer 2.1.0.62.
I have created a test implemented to test a function. The function has a VARCHAR2 parameter as input and returns a BINARY_INTEGER.
I would like to perform 'Process Validation instead of specifying an explicit 'Result'. The check box 'Test Result' is unchecked.
I have seen in the doc. that I can use substitution variables in my user defined PL/SQL code. I try
IF {RETURNS$} < 0
THEN ...
but I always get the error
ERROR
<RETURN> : Expected: [Any value because apply check was cleared], Received: [-103]
Validation User PL/Sql Code failed: Non supported SQL92 token at position: 181: RETURNS$
Obviously, the program doesn't recognize {RETURN$}.
Am I missing something?
br
ReinerHi all,
I have installed the latest version of SQL Developer (2.1.1) that fixed the problem - must have been a bug.
The only problem was that I got an ORA-904 TEST_USER_NAME... error. I export my tests, dropped the repository, created a new one and reimported everything. Now it works as it should.
br
Reiner -
XI - Dynamically Determine System Details in User Functions
Hello.
Does anybody know how to dynamically determine the logon information for the statement JCO.Client mConnection = JCO.createClient() from a user defined function in XI?
Within a mapping I have written a user defined function to call a function module on ECC but as the system details are 'hard-coded' the incorrect system is called once the interface is promoted from the DEV system. I am not able to modify the user function code for each system as we transport the interfaces between systems which are locked and as such code the builder objects cannot be modified . I desperately need a method of determining which logon details should be used and I would prefer the solution to be within the user defined function.
User defined function code:
JCO.Repository mRepository;
// Change the logon information to your own system/user
JCO.Client mConnection = JCO.createClient(
"300", // SAP client
"pi_jco_rfc", // userid
"ecd4adrt", // password
"EN", // language
"adrp560dev1", // host name
"10" ); // system number
// connect to SAP
mConnection.connect();
// create repository
mRepository = new JCO.Repository( "SAPLookup", mConnection );
// Create function
JCO.Function function = null;
IFunctionTemplate ft = mRepository.getFunctionTemplate("ZPI_DETERMINE_STORE_FROM_SITE");
function = ft.getFunction();
// Obtain parameter list for function
JCO.ParameterList input = function.getImportParameterList();
// Pass function parameters
input.setValue( site[0] , "IM_WERKS" );
mConnection.execute( function );
String ret = function.getExportParameterList().getString( "EX_VLFKZ" );
mConnection.disconnect();
result.addValue(ret);
Any ideas gratefully accepted.Darren,
Why are you using JCOs directly? It is not advisable to do so. You can/have to use the RFC Lookup API to achieve this.
Have a look at Michal's article about this.
https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/a03e7b02-eea4-2910-089f-8214c6d1b439
Regards,
Jai Shankar -
Function Code can not be selected
Dear expert,
Please help me, there is a uploader For MIGO, USer is uploading data using this uploader, Sometimes when user try to upload data, he gets a message on status BAR:
Function cannot be selected, When i Double Click on that Message i Get Following Information:
Message NO: 00255
Diagnosis
You entered an Inactive function code
You can trigger this by:
inputting directly in the OK code field
inputting the fastpath of an inactive menu function
choosing an inactice function key, or even by
choosing enter, if enter has an inactive function
In batch input a function code is included in field BDC_OKCODE of the session, as long as this function Code is not assigned to Enter
As well as activating function codes stastically in the menu painter(Transaction SE41), they can also be deactivated dynamically using the excluding addition with PF-STATUS.
Now one more thing i want to tell you is when user just open MIGO directly and try to enter some data and get back before saving and then Execute uploader then user can upload data without any error,
Kindly tell me what shoul i do to remove this error permanently
Thanks in advance
Regards
Shelly MalikThere is an error in this uploader, it should not call this command which is not available on that screen. What is this uploader? If it's a custom abap program, you must debug it.
-
User exit code does not execute
I'm having a problem with User exit code that does not execute yet seems to be set up correctly.
The User exit is implemented as FM "EXIT_SAPLIPW1_001" in function group XQSM.
I've tried everything I know of with the CMOD and SMOD transactions, and I suspect some sort of transport error.
The only clue I can find in comparing the development system (which works) with the test system (which does not work) is that running "Extended Check" in SE80 on function group XQSM fails with the following error:
"The namespace of program SAPLXQSM has the setting "C" and cannot be tested."
Has anyone any idea what could have happened?Let us try to retrace the steps.
1. You created a Z project in CMOD and assigned the enhancement IQSM0001 and the component EXIT_SAPLIPW1_001 and activated the same. This is there in the transport.
2. You double clicked on the include in the user exit and created it. You activated the code and included it in the same transport.
If you did the above steps, then your user exit should be active in your test system.
Can you please go to SE10, and list out the objects in your transport? You should see entries in there like below(not necessarily a complete list)
R3TR CMOD <your project name>
R3TR PROG ZXQSMU01
See if you created any of the objects as local objects.
Srinivas -
Global User Functions not replaced in Check Contraint
Hi all,
we just moved from ODI 11.1.7 to ODI 12.1.2 an have the following problem. Our global user functions which are used in several Check Conditions are no longer replaced during code generation.
They worked like a charm in ODI 11.1.7. Any ideas?
Kind regards,
JensWe are running Scenarios and Mappings from Designer using Local and Remote Agents (Simulation and Execution Mode). No difference at all.
Global User Functions are replaced in Filters and Target Expressions but not in ODI Constraints. -
i wanted to update data of excelsheet to mysql database but displaying an compile time error as sub or functions are not defined -------------->(startingrow) please help me out
Dim cn As New ADODB.Connection
Dim number, nRows, wds_id, production_data
cn.ConnectionString = "Provider = MSDASQL.1; Persist Security Info = False;Data Source = mysql32; User ID = root;Password = bmx1; Initial Catalog = wds"
cn.CursorLocation = adUseClient
cn.Open
Dim i As Integer, QryTxt As String
i = StartingRow(wds_id) ---------->In this line
Do Until i = Sheet1.Rows.count
If Sheet1.Cells(i, 1) = "" Then
nRows = i - 1
Exit Do
End If
i = i + 1
Loop
For i = StartingRow(wds_id) To nRows
QryTxt = QryTxt & "update tblprod_agr_006 set wds_id1 = '" & Replace(Sheet1.Cells(i, 1), "'", "''") & "'," & vbCrLf
QryTxt = QryTxt & " column2 = '" & Replace(Sheet1.Cells(i, 3), "'", "''") & "'," & vbCrLf
QryTxt = QryTxt & " column3 = '" & Sheet1.Cells(i, 4) & "'," & vbCrLf
QryTxt = QryTxt & "where conditioncolumn =" & "'" & Sheet1.Cells(i, 2) & "'" & "" & vbCrLf
Next
cn.Execute (QryTxt)First off, is this relating to a Microsoft SQL Server database, or a MySQL database? I see several references to MySQL in your example.
Your code uses a function StartingRow() which isn't a built-in T-SQL function. So, if it is a function you've defined, you need to make sure it's properly referenced in order to use it. (may need a 2 or 3 part name if it isn't in the default
schema or the same database.)
Microsoft SQL Server Storage Engine PM -
See my code that i use for user login but my code not give me result
sir i use oracle with vwp in netbeans 6.1
i want creat a user login form
i drop three textfield and one button
in button i use this code for finding the user in database but this code not me result that go to catch (Exception e) all field in database is string
public String button1_action() {
try {
RowKey userRowKey = luserDataProvider.findFirst
(new String[] { "luser.username", "luser.pwd" },
new Object[] { textField1.getText(), textField2.getText() });
if (userRowKey == null) {
textField3.setText("fahim");
error("Invalid user id or password");
return "case1";
} else {
textField3.setText("aamir");
return "cust";
catch (Exception e) {
log("Cannot perform login for userid " + textField3.getText(), e);
error("Cannot perform login for userid " + textField3.getText() + ": " + e);
textField3.setText("NOOOO");
return null;
please give me idea how i find record from database
thank you
aamirThese are user-to-user forums, you are not talking to Apple here - so I've asked the hosts to remove your email address from your post.
The security code is the 3 or 4 digit code on your credit card, it's quite often on the back of the card on the signature strip, though on some cards it's on the front : credit card security code. -
BW User Exit - Code in function of the query name
Hi,
I would like to create an user exit code which execute a algorithm different in function of the query executed. do you know in which variable is store the technical name of the query.
CASE query
WHEN 'Z_ZAPO_001'.
V1 = 1
WHEN 'Z_ZAPO_002'.
V1 = 2 WHEN '10' OR '11' OR '12'.
ENDCASE.Yaroslav,
I_S_RKB1D-COMPID will never be filled for authorization user-exits (I_STEP = 0). Don't ask my why, I once raised this question to OSS and they replied it was never foreseen to work with authorization user-exits. God knows why, it's very unlogical and it wouldn't cost them a lot of work to get it working...
I could solve this problem by applying a little trick. In our queries we included a user-exit keydate variable. This will push the user-exit first in I_STEP = 1 mode where I_S_RKB1D-COMPID is filled. Then save the query name by exporting it to the ABAP-memory. Afterwards, the user exit with code for I_STEP = 0 will be processed and then you can import the query name from the ABAP memory.
I agree it sounds a little bit tricky but there is no better option I'm affraid. -
Using PL/SQL code in ODI User Functions
Is it possible to write PL/SQL code (with multiple in params and one out param) in ODI User Function ?
Actually I need to use this user functions in my interface mapping.
I know it can be done using ODI Procedures but Procedures cannot be used within interfaces when mapping columns.Hi Anurag Ambasta,
You can use the ODI user functions and choose the Linked technology as 'Oracle' where you can implement and use oracle syntax .
And the user functions can receive the multiple parameters and it returns the single value to the function cal, which use are expecting right?
Thanks,
Yellanki -
The user function manager DLL (ufmanager.dll) could not be found.
Hi Everyone,
I just spent two horrible days getting a Windows 2003 server to run our .net 2008 asp Crystal report. It was all because of the unknown.rpt error. The final answer was to give the NETWORK SERVICE account full control to the C:\ and then remove that permission.
Now, I'm up to my next challenge:
Error in File C:\WINDOWS\TEMP\CrystalReport {2A76C903-674A-4A7B-AA04-44FC7E206C3F}.rpt:
The user function manager DLL (ufmanager.dll) could not be found.
That dll is there on the server. What should I do?
Please help!!!!
Thanks,
EdOk, here is where the fun begins as the issue you are getting is not something I've run into before. A few clarifications and suggestions re. troubleshooting.
I used the latest runtime.msi
- confirm this was CRRedist2008_x86.msi (just want to be sure)
pdf about the unknown.rpt.
- do you have a link or name of the pdf?
To troubleshoot let's do this:
1) Download the depends utility. I want to see if there is a missing dependency. depends is here:
http://www.dependencywalker.com/
open the ufmanager.dll in depends and see what it reports.
2) Run Process Monitor utility. ProcMon can be downloaded from here:
http://technet.microsoft.com/en-ca/sysinternals/bb896645.aspx
Make sure you filter ProcMon for your process as this will shrink the log file. Then look for ufmanager.dll and see where the app is trying to load it from.
3) Check this registry entry:
HKLM\software\business objects\10.5\crystal reports
See that CommonFiles is pointing to c:\program files\business objects\common\2.8\bin.
4) Copy the ufmanager.dll from c:\program files\business objects\common\2.8\bin to your app directory (this is just a test as I want to see if we can load the dll from anywhere...)
Ludek -
IMAGE CODE NOT SHOWING AND WHEN I POST ARTICLES ON WEBSITE SO THE ERROR WAS SHOWS ( ANTI SPAM USER ID ) EVEN I HAVE ALREADY LOGIN THAT WEBSITE ....
KINDLY TELL ME ABOUT THIS PROBLEM
== This happened ==
Every time Firefox opened
== Everytime when i visit websitesStart Firefox in [[Safe Mode]] to check if one of your add-ons is causing your problem (switch to the DEFAULT theme: Tools > Add-ons > Themes).
See [[Troubleshooting extensions and themes]] and [[Troubleshooting plugins]]
See also [[Images or animations do not show]] and http://kb.mozillazine.org/Images_or_animations_do_not_load -
Revision: 2260
Author: [email protected]
Date: 2008-06-26 12:42:39 -0700 (Thu, 26 Jun 2008)
Log Message:
Fix for version checking code not always detecting calls to newer functions.
flex checkintests pass
Modified Paths:
flex/sdk/trunk/modules/asc/src/java/macromedia/asc/semantics/ConstantEvaluator.java
flex/sdk/trunk/modules/asc/src/java/macromedia/asc/semantics/ReferenceValue.javaRevision: 2260
Author: [email protected]
Date: 2008-06-26 12:42:39 -0700 (Thu, 26 Jun 2008)
Log Message:
Fix for version checking code not always detecting calls to newer functions.
flex checkintests pass
Modified Paths:
flex/sdk/trunk/modules/asc/src/java/macromedia/asc/semantics/ConstantEvaluator.java
flex/sdk/trunk/modules/asc/src/java/macromedia/asc/semantics/ReferenceValue.java -
My account hotmail is closed by mestake , i used all the code sending but it stil close , I need help
Hi,
I am confused how can you assign function code to I/O field (w/o dropdown) or text field?
If i am not wrong, double-click functionality in available for these 2 elements.
Regards,
Mohaiyuddin -
Not able to activate the Function Code in screen layout.
Hi Experts,
I was not able to activate the screen function code in se51.
It is in the transaction code - J1IEX.
What can the possible reasons?..
Please suggest.
Regards,
Neslin.Hi Jorge ,
No , i didnt find the custom fields in IS_ITEM which i have added in the PO item level .
i have added the custom field in this include INCL_EEW_PD_ITEM_CSF_PO .
More over this include wont included in the IS_ITEM structure .
Thank you,
Maybe you are looking for
-
Hi all, I am getting this message when I attempt to update a particular items cost in Inventory. Field cannot be updated(ODBC - 1029) [Message 131-183] This happens only for a handfull of Items. Here are the details :- SAP Version : 2005A
-
Use of NVL, Is it correct or wrong
Hi, I've doubt regarding the use of NVL in SQL query, Eg. for query : SELECT * FROM NBS_POLICY_MST WHERE ORG_POLICY_ID = NVL(:p1,ORG_POLICY_ID); PLAN_TABLE_OUTPUT | Id | Operation | Name | Rows | Bytes | Cost (%CPU)| | 0 | SELECT STATEMENT | | 2084 |
-
I now have 2GB or ram in my 2.16Ghz C2D - - Aperture is a lot faster - it's actually a night and day difference on my setup!!! Yay for dual-channel!!!
-
Content repository FD does not exist :user agent sap web application server
Hi All i am using 3rd party software(dms SERVER) and connecting it using archive link interface SAP HTTP 4.5 AL i have created a new repository with name FD using tcode OAC0.when i give inputs in OACO and click on test connection it gives me informat
-
How to send byte array of image with 300dpi.
Hello fiends i am making an application in which i have to send the byte array of an image with 300dpi. so i am using image snapshot class for that and use that code. var snapshot:ImageSnapshot = ImageSnapshot.c