Problem with user defined OTD
Hi,
I can't quite figure out how to create an OTD to describe the following:
[CMP DESC]
field1=value1
field2=value2
field3=value3
There are actually 41 fields in total in the file.
Any suggestions on how to do this?
Thanks,
Richard
See
michaels> select xmlquery('declare function local:test_function($namecmp as xs:string?, $inputtype as xs:string?) as xs:string?
return {$inputtype}
local:test_function("1","2")' returning content) o from dual
Error at line 5
ORA-19114: error during parsing the XQuery expression:
LPX-00801: XQuery syntax error at '{'
3 return {$inputtype}
- ^
michaels> select xmlquery('declare function local:test_function($namecmp as xs:string?, $inputtype as xs:string?) as xs:string?
$inputtype
local:test_function("1","2")' returning content) o from dual
O
2
1 row selected.
Similar Messages
-
Problem with user-defined functions in XQuery String
hello
i've a problem with user-defined functions in XQuery String
details are here (the code is not Human-readable via forum's embedded editor ?? strange)
http://docs.google.com/Doc?id=ddqwddsr_21c96d9x
thanks !!See
michaels> select xmlquery('declare function local:test_function($namecmp as xs:string?, $inputtype as xs:string?) as xs:string?
return {$inputtype}
local:test_function("1","2")' returning content) o from dual
Error at line 5
ORA-19114: error during parsing the XQuery expression:
LPX-00801: XQuery syntax error at '{'
3 return {$inputtype}
- ^
michaels> select xmlquery('declare function local:test_function($namecmp as xs:string?, $inputtype as xs:string?) as xs:string?
$inputtype
local:test_function("1","2")' returning content) o from dual
O
2
1 row selected. -
Problems with User Defines Mapping Objects - Dynamic Configuration
We have a mapping object that takes data passed in from R3 and does an HTTP Post to another system using a URL and file name that is passed from the header record. We had a consultant set this up for us last year and in creating the new one we just pretty much copied what he did. The problem is, it is not working for us. We have the url and file name, we pass it to the user defined code that is supposed to pass it to the url and file name in the configuration. The java code looks like this:
public String getPcurlOut(String pcurl,Container container){
String ourSourceFileName = "START";
DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
if (conf != null) {
DynamicConfigurationKey key = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File","Directory");
conf.put(key, pcurl + ".xml");
ourSourceFileName = conf.get(key);
} else {
ourSourceFileName = "conf == null";
Basically we want to pass a url and file name to our communication channel based on values that come from our file in R3
It is almost exactly like the one that works. Can anyone help with this?
Thanks
Mike
Message was edited by:
Michael CurtisHi Michael
<i>Basically we want to pass a url and file name to our communication channel based on values that come <b>from our file in R3</b></i>
--> This means you have file as a sender adapter.
Check adapter specific message properties in sender adapter.
Please refer this blog , it is really worth.
/people/michal.krawczyk2/blog/2005/11/10/xi-the-same-filename-from-a-sender-to-a-receiver-file-adapter--sp14
Also
DynamicConfigurationKey key = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File","Directory")
Try writing this as
DynamicConfigurationKey key = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File","<b>FileName</b>")
Regards -
Problems with user-defined update-process
Hi.
I have a small problem in the right syntax in an user-defined updated process.
The process is called by a button on the page and should update a record in a table.
BEGIN
UPDATE wam_mod_allocation SET
alloc_assessment = V('P2120_ASSESSMENT'),
last_update_date = LOCALTIMESTAMP,
last_update_staff = V('APP_USER')
WHERE username = V('P2120_USERNAME')
AND module_id = V('P2120_MODULE_ID')
END;
This is the code of the process. The line with the problem is marked bold. P2120_USERNAME is a text field in the page and contains the username to be updated.
The problem is, that the comparison doesn't work. the value "smith" is available in the table and is the same as in the text field. (both in lower case).
If I replace the part V('P2120_USERNAME') with 'smith' (with single quotes), the update statement works properly.
How do I have to compare the username with the item value that it works properly?1. Stephan
2 + 3 Well. I enclosed both tags in the TRIM-Operator and it works. First, I thought, a whitespace caused the problems. To determine which value contains the whitespaces I removed the trim-tags on both sides. It works.
It is quite funny, because,if I remove both tags, it works too? Well. Yesterday it didnt.
To be on the safe side, I will include the trim-tags.
Thanks very much.
Stephan -
Problem with user defined methods
Hello,
I have created a user-defined method using the constructer and a number of sub-methods. The toString method is supposed to return the maximum, minimum, average, and median for an input data set. This program compiles with no problem, but doesn't seem to calculate the statistics. The max, min, med, and mean are all 0. Any help would be appreciated. Thanks a lot.
import java.util.*;
public class SO{
private String id;
private int N;
private double[] data;
private double average;
private double minimum;
private double maximum;
private double med;
public SO(){
public void readData(){
Scanner keyBoard = new Scanner(System.in);
System.out.println("Enter the id: ");
id = keyBoard.nextLine();
System.out.println("Enter the amount of data values in the id: ");
N = keyBoard.nextInt();
data = new double[N];
System.out.println("Enter the values one line at a time: ");
int j = 0;
for(int h=0; h<=N-1; h++){
data[h] = keyBoard.nextDouble();
Arrays.sort(data);
public void setDataValue(int k, double v){
data[k] = v;
System.out.printf("Changing data[%d] to %f", k, v);
public double getDataValue(int k){
double get = data[k];
return get;
private double mean(){
double sum = 0;
for(int k = 0; k<=N-1; k++){
sum = sum + data[k];
average = sum/N;
return average;
private double min(){
minimum = data[0];
return minimum;
private double max(){
maximum = data[N-1];
return maximum;
private double median(){
if(N%2 != 0){
med = data[N/2];
else if(N%2 == 0){
med = (data[N/2] + data[N/2-1])/2.;
return med;
public void displayData(){
System.out.printf("[");
for(int k = 0; k<=N-1; k++){
System.out.printf("%.2f", data[k]);
if(k != N-1){
System.out.printf(", ");
System.out.printf("]");
public void sortData(){
Arrays.sort(data);
System.out.printf("[");
for(int k = 0; k<=N-1; k++){
System.out.printf("%.2f", data[k]);
if(k != N-1){
System.out.printf(", ");
System.out.printf("]");
public void analyzeData(){
System.out.println(this);
public String toString(){
return id +"\n" + "minimum = " + minimum + "\n" + "maximum = " + maximum + "\n" + "median = " + med + "\n" + "mean = " + average;
public static void main(String[] args){
SO v = new SO();
System.out.println("Read Data");
v.readData();
System.out.println("Display Data");
v.displayData();
System.out.println("Analyze Data");
v.analyzeData();
System.out.println("Set Data\n");
v.setDataValue(0,98.75);
v.displayData();
System.out.println("Sort Data");
v.sortData();
System.out.println("Access Data\n");
System.out.println("data[0] = " + v.getDataValue(0));
System.out.println("\nDisplay v");
System.out.println(v);
}Sorry
import java.util.*;
public class SO{
private String id;
private int N;
private double[] data;
private double average;
private double minimum;
private double maximum;
private double med;
public SO(){
public void readData(){
Scanner keyBoard = new Scanner(System.in);
System.out.println("Enter the id: ");
id = keyBoard.nextLine();
System.out.println("Enter the amount of data values in the id: ");
N = keyBoard.nextInt();
data = new double[N];
System.out.println("Enter the values one line at a time: ");
int j = 0;
for(int h=0; h<=N-1; h++){
data[h] = keyBoard.nextDouble();
Arrays.sort(data);
public void setDataValue(int k, double v){
data[k] = v;
System.out.printf("Changing data[%d] to %f", k, v);
public double getDataValue(int k){
double get = data[k];
return get;
private double mean(){
double sum = 0;
for(int k = 0; k<=N-1; k++){
sum = sum + data[k];
average = sum/N;
return average;
private double min(){
minimum = data[0];
return minimum;
private double max(){
maximum = data[N-1];
return maximum;
private double median(){
if(N%2 != 0){
med = data[N/2];
else if(N%2 == 0){
med = (data[N/2] + data[N/2-1])/2.;
return med;
public void displayData(){
System.out.printf("[");
for(int k = 0; k<=N-1; k++){
System.out.printf("%.2f", data[k]);
if(k != N-1){
System.out.printf(", ");
System.out.printf("]");
public void sortData(){
Arrays.sort(data);
System.out.printf("[");
for(int k = 0; k<=N-1; k++){
System.out.printf("%.2f", data[k]);
if(k != N-1){
System.out.printf(", ");
System.out.printf("]");
public void analyzeData(){
System.out.println(this);
public String toString(){
return id +"\n" + "minimum = " + minimum + "\n" + "maximum = " + maximum + "\n" + "median = " + med + "\n" + "mean = " + average;
public static void main(String[] args){
SO v = new SO();
System.out.println("Read Data");
v.readData();
System.out.println("Display Data");
v.displayData();
System.out.println("Analyze Data");
v.analyzeData();
System.out.println("Set Data\n");
v.setDataValue(0,98.75);
v.displayData();
System.out.println("Sort Data");
v.sortData();
System.out.println("Access Data\n");
System.out.println("data[0] = " + v.getDataValue(0));
System.out.println("\nDisplay v");
System.out.println(v);
} -
Problem with User Defined Second Selection Screen
Hi Gurus,
I have a problem with the selection screen selections. My requirement is that , User when he selects a check box on the main selection screen ( which is 1000) then at the at-selection event, another screen (whose number is 2000) will be called and it has some parameters to enter values. My problem is that how to get the values from this second screen and use them in the in my program. There is an execute button on the second selection screen and when i click that, nothing is happening.
Can anybody suggest me how to get the values from this screen which we called, and entered values in that screen. How to use these values and is there any way that we can do this.
Thanks in advance for helping me out.
Regards,
Srinivas.Use <b>DYNP_VALUES_READ</b> FM to read the values from your dynpro screen...
Like this...
DATA: ls_dyname TYPE d020s-prog,
ls_dynumb TYPE d020s-dnum.
gt_dynpfields TYPE STANDARD TABLE OF dynpread WITH HEADER LINE.
ls_dynumb = '0112'.
gt_dynpfields-fieldname = 'RF05A-NEWKO'.
APPEND gt_dynpfields.
CALL FUNCTION 'DYNP_VALUES_READ'
EXPORTING
dyname = ls_dyname
dynumb = ls_dynumb
TABLES
dynpfields = gt_dynpfields
EXCEPTIONS
invalid_abapworkarea = 1
invalid_dynprofield = 2
invalid_dynproname = 3
invalid_dynpronummer = 4
invalid_request = 5
no_fielddescription = 6
invalid_parameter = 7
undefind_error = 8
double_conversion = 9
stepl_not_found = 10
OTHERS = 11.
Greetings,
Blag. -
ALV view : Problem with user defined views
Dear Experts,
We are facing a problem pertaining to user defined views for a ALV table that we have in SAP eRecruiting application in webdynpro ABAP. The problem is as follows.
There is a candidate application ABC & only ONE person can edit this at a time.In this application ABC there is a ALV table.
If the user clicks on this application & navigates to the ALV,this ABC application is in normal/edit mode(no one else has opened this ). So, the user can make changes in ABC. In the ALV, he can click on the 'settings 'button and save the STANDARD view as his own user defined view(by adding or removing columns).
If the user opens the application ABC in display mode(implying that someone else has alraedy opened ABC for editing), when i navigate to the same ALV,the user CANNOT see the views which were saved in the edit mode.Only the standard view is displayed. The user however has the option to again freshly save a view.
The views created by a user for this ALV should be seen irrespective of the application being opened in normal or display mode.
To add to the confusion, this problem is occuring only in some systems & not in others. There is atleast one system where the views are displayed correctly to the user.
On debugging, the table wdy_conf_user has config ids as different where the user views are stored separately for display & edit mode.
In systems where the user views are displayed correctly, the config id is one & the same ensuring that the user can see all his views irrespective of the mode of the application.
Any thoughts on how we can rectify this?
sorry for the long & tedious explanation
Thanks in advance,
SowmyaSee
michaels> select xmlquery('declare function local:test_function($namecmp as xs:string?, $inputtype as xs:string?) as xs:string?
return {$inputtype}
local:test_function("1","2")' returning content) o from dual
Error at line 5
ORA-19114: error during parsing the XQuery expression:
LPX-00801: XQuery syntax error at '{'
3 return {$inputtype}
- ^
michaels> select xmlquery('declare function local:test_function($namecmp as xs:string?, $inputtype as xs:string?) as xs:string?
$inputtype
local:test_function("1","2")' returning content) o from dual
O
2
1 row selected. -
Problem with user defined selection-screens
Hi,
in my case, i have a default selection screen and a user defined selection screen. Now, after selecting a radio button in default selection screen, the user defined selection screen is called. after executing it report output is displayed. now if i press f3 (back) it is going to default selection screen. here my requirement is, when i press f3 it should go to the user defined selection.
Can u plz help me solve this.
bye n regards
sreeAny modifications to screen 1000 will be lost the next time the program is generated.
When the user hits the back key from the report output, your ABAP is restarted just like when you originally started it. That is why you are getting the default selection screen again.
Use the AT USER-COMMAND event. When BACK is hit from the report, use the SUBMIT command to re-execute the program, passing it the selections from the default selection screen. Leave out the RETURN option.
For help on filling the selection screen during SUBMIT, help is available at
http://help.sap.com/saphelp_470/helpdata/en/9f/dba51a35c111d1829f0000e829fbfe/frameset.htm -
2.1.1 Problem with User Defined Reports with actions on the context menu
I use the User Defined Reports quite a lot, and export and publish these to other members of the team as Shared Reports. I'm also quite disappointed that there seems to be no further development in this area of SQL Developer.
One of the totally undocumented features of User Defined Reports is the ability to attach actions to a context menu, and pass data from the grid to a procedure, for example. Copying, then exporting the sessions report (from All Reports -> Data Dictionary Reports -> Database Administration -> Sessions) exposes the XML for adding actions to the context menu. The snippet for killing a session looks like this:
<item reload="true" reloadparent="false" removeFromParent="false">
<title>Kill Session</title>
<prompt type="confirm" >
<label>Kill Session?</label>
<default><![CDATA[]]></default>
<value><![CDATA[]]></value>
</prompt>
<sql><![CDATA[ALTER SYSTEM KILL SESSION '#SID#, #SERIAL#' IMMEDIATE]]></sql>
<help>Kill the selected session.</help>
</item>So to add this type of functionality to your own user defined reports, you need to export the report, edit the XML, and import it again. It seems to work fine to add this to the master reports, but if you add an <item> element to the child reports, the context menu items appear on the master report too, and they are duplicated many times. I'm not sure if the action of exporting the report adds to the number of times the context menu appears.
Warning - if you edit a report using SQL Developer, all the <item> tags are removed. Once you've added actions to a context menu, you can only edit the report by exporting it, modifying the XML and importing it again.
Has anyone else seen this behavior? Have you found a work-around?
To the SQL Developer team: Are there any plans to allow the adding of user defined context menu items to reports using the GUI in the near future?You're right the context menu needs a GUI desperately. You can request this at the SQL Developer Exchange, so other users can vote and add weight for possible future implementation.
Regards,
K. -
Problem with user defined approval query
Hi
Sorry me for my english
I have a problem with approval query
DECLARE @DocDate DATETIME
SET @DocDate = (SELECT $[OINV.DocDate])
IF (DATEDIFF(DAY,@DocDate,GETDATE())) != 0
BEGIN
SELECT DISTINCT 'TRUE'
END
the query works with the previous invoices, but today's invoices show me a error colud not commit transaction
Can Help me?
Thanks
Felipe LoyolaHi Felipe Loyola,
Try this:
SELECT DISTINCT 'TRUE' FROM OINV T0
WHERE DATEDIFF(DD,T0.DocDate,GETDATE()) != 0 AND T0.DocNum = '$[$8.0.0\]'
Thanks,
Gordon -
Upgrading from RH7 to RH8: Problem with user-defined variables
Example:
Before upgrade: <uservariable name=Product_name1 x-showvalue x-value=MyProduct>MyProduct</uservariable>.
After upgrade: <?rh-udv_start name="Product_name1" ?>MyProduct<?rh-udv_end ?> .
Notice that there is now a space before the period. Any time my UDV is followed by another letter or punctuation, there is now an extra space. :-/ Does anybody know of a way to fix this besides using FAR to search and replace every possible combination of UDV + letter/punctuation?Problems like that make me a whole lot happier that we upgraded from RHX5 where variables didn't exist! I think the best way forward IS to use a find and replace tool. Sorry.
Read the RoboColum(n) for a tips, tricks and musings on the Technical Communication Suite products. -
Problem with user defined function in XQUERY
Hi,
I have a file in which I store XQUERY. My java program reads this file and executes the xquery
and output the result. I have a working XQUERY in a file, which is something like :
<feed>
let $entries := for $x in collection('/path/to/atomStore.bdbxml')/entry[matches(id,'
.entry')]
order by $x/updated descending
return <entry xmlns="http://www.w3.org/2005/Atom">{$x/id,$x/title,$x/published,$x/updated,$x/link}
</entry>
let $latest := fn:subsequence($entries, 1, 10)
for $f in $latest return $f
</feed>
After adding the following simple function(I'm not calling it anywhere for the time being),
I'm getting an error
com.sleepycat.dbxml.XmlException: Error: Error in XQuery expression:
Unrecognized character 'a' (0x61) [err:XPST0003], line 33, column 2, errcode = XPATH_PARSER_ERROR
declare function xml:convertdate($date as xs:integer) as xs:string
let $months := ("jan","feb","mar","apr","may","jun","jul","aug","sep","oct","nov","dec")
let $month := $months[$date]
return $month
I couldn't find any error with the function syntax. Anyone has any idea?
Regards,
AnoopHi Anoop,
The query and function work fine for me. What does the line and column information in the error point to?
John -
Problem with User-defined function
Does anyone know how to make the user-efined functionto return a object. We know how to run a java class within cal script and pass the result to that java class. However, what we need is to be able to return the result in the form of a java class within the calling class. This is because we are calling the calscript within ejb and the ejb that executes the calscript needs to be able to get the result back.In our case, we are using webLogic EJB to execute a EDS calScript function. We don't know how to have the object created by EDS to be passed back to the EJB.Any insight will be greatly appreciated.Thanks,Anne
Hi Anoop,
The query and function work fine for me. What does the line and column information in the error point to?
John -
Display of document line items with user defined fields
Hi all,
I have created two user defined fields in CI_COBL structure and they are available on OBC4 screen. I maintained optinal for entry in the screen layout. I posted one document with user defined fields and saved.
Now the document is updated in BSEG table. I then display the document, and it display the doucment
But when i double click on the one of the line items system gives an error that there is some problem in customising and entries missing in Table COBM.
I checked OXK3 and see that in field information for user fields, it says entries maintained in table COBM.
But still i couldnt display my line items in detail.
Any solutions
Thanks in advance
RamYes your are looking at the correct sap note.
Things look pretty straight forward in the notes documentation.
1)Extend the VBKRED structure with the fields you want.
2)Populate thse values in the user exit in program DBKMVF02 in FORM routine USER_EXIT_FUELLEN_XVBKRED.
For extending a standard structure you need to create a zstructuree in se11 first and then append it to the standard structure.
In your case you need to extend VBKRED_EX1 structure rather than VBKRED.
Regards,
ravi -
Retain standard SAP order type after copying with user defined order type
Hello SAP Gurus,
We have a requirement of retaining the standard SAP order types after copying with User defined order types. But the issue is we don't want to see the standard SAP order type such as PM01, PM02 in production system while using transaction like IW31 etc.
Is there anybody who has answer to retain these stanadard SAP order types without deleting from system configuration?
Thanks in advance.
Cheers,
VaibhavVaibhav,
When you F4 on the order type field in IW31 you will get the popup showing the order type list. At the top of this list is a button with a green "+" sign (Insert in personal list).
You can use this button to select your favourite list.
This function is available in most F4 drop-down lists.
However, you cannot set this setting for all users. You will need to write an ABAP program to do this.
PeteA
Maybe you are looking for
-
We are going through the process of migrating our servers from our SCCM 2007 environment to SCCM 2012 R2 CU1. We've used the client push successfully on the majority of the servers. However on 3 of our domain controllers, I can't seem to get the cli
-
Problems with PreparedStatement and MySQL selecting bytes
Hi, i have a problem trying to select information when the "select" has a byte restrict. The table in database is: CREATE TABLE `positions` ( `PKID` int(10) unsigned NOT NULL auto_increment, `POSCODE` varbinary(30) NOT NULL, `ISWTURN` binary(1) NOT N
-
Set Default Settings in PR Report ME5A
Dears, The requirement is to set the 'Released Requisitions Only' as default in ME5A. Where it is available in SPRO. Thanks,
-
Hi Guys, I'm using apex 4.1 and so new to apex technology. Is there any way to implement a pop up message to get user input in apex ? I know we can use Java Script for pop up. But what i want to know is, Is there any built in apex control for this pu
-
REPORTS6i to Express Server- Connection
Express Query(Reports to Express Server) I am tring to connect from reports6i to Express server. I had set up the client connections and was able to attach the demo database. I had loaded the libraries and created the objects as per the readme_solari