Searching by aggregate type field leads to error message in Workbench
I defined a persistent pojo entity that contains an attribute as an aggregate type mapping.
Now I tried to query entities with an instance of that aggregate type as parameter to the query (TL expression query in the workbench).
First argument (query key) is the attribute of the entity (aggregate type), operator is EQUAL and second argument is the parameter which is of same aggregate type.
I thought this would be the natural way to query but the workbench shows an error message:
0251 - The expression (line 1.) on query readByOwner is invalid. When querying on a reference mapping, only unary operators (Is Null, Not Null) are supported.
Is this really an error? Where is the problem?
I found a similiar post from 2003 on this forum, saying that it is a bug, though I'm unsure if it is the same problem. I use the most recent version of Toplink and Workbench, so it's hard to believe that such a basic problem was not fixed for 5 years... was it?
Regards,
Sebastian
I have recording messages using the TCD command.
My script (very simple):
MESSAGE ( MSG_2 ).
TCD ( ME21 , ME21_1 , R3 ).
ENDMESSAGE ( E_MSG_2 ).
In the MESSAGE command interface, I defined rules to allow several kind of messages.
Execution: 3 mesages found:
* transform PR into PO
MESSAGE MSG_2 [1,009 sec]
RULES MSG_2 = XML-DATA-01
Message MODE EXIT TYPE ID NR
[1] 'A' 'I' 06 456
[2] 'A' 'W' 'ME' 080
[3] 'A' 'E' 'ZE' 029
TCD ME21 [0,545 sec N] Target sys R3 -> ZDA010A219
S06017 Standard PO created under the number 8201075606
Tgt System Z_A219->R3->ZDA010A219 (ZDA 010 ... HP-UX ORACLE)
CALL TRANSACTION ME21 ME21_1 XML-DATA-01
03 MESSAGES FROM ME21 ME21_1 XML-DATA-01
I 06 456 Release effected with release code 00001
W ME 080 Delivery date: next workday is 02.05.2007
S 06 017 Standard PO created under the number 8201075606
ENDMESSAGE E_MSG_2 (&TFILL = 0)
As you can see, 3 messages are found but the &TFILL variable is still 0.
I guess (but cannot test yet) I would manage to record those messages using SAPGUI command.
Is there anything wrong with my script?
My SAP_BASIS component is in version 620. I'm not using the ultimate version of eCATT (no WEBDYNPRO command, etc.). Could it be an explanation?
Thank you in advance,
Olivier
Similar Messages
-
Events in Table Maintenance - How validate fields and deliver error message
Simple transparent table. I have generated one step table maintenance. I use a view variant to make some fields display only. I would like to use Events to provide some validation. For example: If field STATUS = 'T', then field QUANTITY must be > 0.
So far, I have tried events 05 and 21. When the user tries to enter a new row, I can issue an error message that is returned to the screen. The problem is that the screen is no longer typeable, i.e. the user cannot correct the error. They have to exit and start over.
Is there a different event or different coding I should provide to open up the screen for typing?Hi,
Tried 'message type 'I' display like 'E''', in event 5 and 21. The non-key fields are now typeable but the validation is not enforced, i.e. you get a message that you must enter a QUANTITY but you can save the row without entering a QUANTITY.
Yes I was afraid of that... that's why I would use the event 01 (with 05, if user still tries to save invalid entries, 01 will block). Normally when you get the error and press the ENTER key, you should get back to your table in edit mode... Well this is happening on my system...
I'll let you know if I got a better idea...
Kr,
Manu.
Edited by: Manu D'Haeyer on Nov 10, 2011 5:01 PM -
Search and Replace String throwing the wrong error message with regexp?
This came up in a LAVA thread, and I'm not sure if there's a bug here or not. When using Search and Replace string, and using a regular expression of [(G[b|i])], LabVIEW throws error -4622, "There is an unmatched parenthesis in a regular expression." There are obviously no unmatched parenthesis in that expression, so it seems to me that the wrong error is being thrown. I'm just not sure if that's a syntactically valid regexp. The problem seems to be with nesting [ ]'s inside ( )'s inside [ ]'s. I've tried a couple of regexp resources on the Web, and one suggests it's valid, while the other seems to think it isn't.
Message Edited by eaolson on 03-13-2007 10:33 AM
Attachments:
ATML_StandardUnit2.vi 10 KB
regexp.png 5 KBadambrewster wrote:
I think your regexp is invalid.
In regexps, brackets are not the same as parentheses. Parens are for grouping, while brackets are for matching one of a class of characters. Brackets can not be nested.
If the regexp is replaced with [G[bi]], there is no error, so it's not a matter of nested brackets. I couldn't find anything on the PCRE man page that forbids nested brackets specifically, but it makes sense.
Your expression "[(G[bi])]", therefore parses as a character class which matches '(', 'G', '[', 'b', or 'i' followed by an unmatched paren, and an unmatched bracket.
I don't believe that's the case. Replace the regexp with [(Gbi)], and the error goes away. So it's not a matter of the '(' being literal, and then encountering a ')' without a matching '('.
daveTW wrote:
what string exactly you want to replace? I think the round braces are not right in this case, since they mark partial matches which are given back by "match regular expression". But you don't want to extract parts of the string, you want to replace them (or delete, with empty <replace string>). So if you leave the outer [( ... )] then your RegEx means all strings with either "Gb" or "Gi".
It's not my regular expression. A poster at LAVA was having problems with one of his (a truly frightening one), and this seemed to be the element that was causing the problem. I'm pretty sure that the originator of the regexp meant to use G(b|i), which seems like a complicated way of matching "Gb" or "Gi", if you ask me. -
When configuring a new Unity Voicemail Account I receive this message : The phone number or extension has already been assigned to some other object. I understand that this means that the 10 digit number I am trying to configure as the alternate extension for this user is already configured for another object with Unity.
I need to search by the 10 digit number and determine where it is configured so I can change it and map to the correct end user.
I have attempted to to search Users via DTMF Access ID using the 10 digit number with nothing being returned via that search.
How do I Search all of the copnfigured Alternate Extensions within our Unity Server?A subscriber info dump is likely the fastest way. If you're curious regarding other methods, you can also use the Data Link Explorer (CUDLE) tool which is in the Cisco Unity Tools Depot. All extensions for all objects are referenced in the "DTMFAccessId" table. The View menu has a Query Builder which you can use to compile a SQL query that searches for a digit string. It's best to search for both the 10 digit string as well as an abbreviated string as Unity sees them essentially the same and they are usually should be associated with a single subscriber. Once you find a match, you can use the "ParentObjectId" value associated with the DTMF access ID to look for a matching owner in the "GlobalSubscriber" table. The ParentObjectId should match the SubscriberObjectId for a subscriber (assuming the DTMF access ID is assigned to a subscriber). This is the same thing as looking at SQL; however, you are not directly accessing the DB so this is generally considered the safest way to browse and get a feel for where things are.
Hailey -
Is there a problem with the ITunes Store? I can search for a title and download it. owever I can't get to the home screen without a message that tells me the item is unavailable in the US Store.
It must be down. I will try later. From the past messages this happens from time to time.
-
I recently bought the Pentax K3 SLR. Before I used the K5 with Aperture without any problem. Now when i try to import raw images the message is "image not recognized". It makes no difference if I use the DNG Raw or Raw+ or the PEF pentax raw format. Jpegs are no problem but I want to use raw data. Does anybody have any hints?
Each raw support is camera specific - different sensors, different lens.
Apple has been pretty quick with raw support lately, a new raw support release every few month, but it is very hard to predict. Some cameras have never been supported. I am still waiting for the support for my camera after three years.
You could use the camera specific software to convert your raw files to a supported format, while you are waiting, or shoot raw+jpeg, and use the jpeg as originals. That can be reversed, when the raw support is available. -
Vague error message when using wildcards in a numeric search field
Dear forum readers,
When a user submits a search string containing a wildcard (e.g. 64%) in a numeric search field of a JHeadstart generated search section, the application returns with an error message like "For input string: %2".
I'd like to show a more user-friendly message e.g. "Wildcard characters are not allowed in search field blablabla".
Any suggestions on how this can be achieved would be most welcome.
Regards,
IbrahimWell, I believe JHeadstart does not really have this functionality.
One way is use a Query Operator 'startsWith', but then you always query like LIKE '<entered search value>%'
This is probably not what you want...
But you could hack it into advancedSearch in YourApplicationModuleImpl
try {
if (viewCriterium.getQueryValue() != null) { //This is where exception JHS-00116 is raised...
value = viewCriterium.getQueryValue().toString();
} else {
value = null;
catch (NumberFormatException ex) {
//insert check for wildcard
value = viewCriterium.getValue().toString();
if (value.indexOf('%')>=0) {
sLog.debug("Ja, een wildcard!!!");
operator = "LIKE";
} else {//original exceptionhandling code here...
...and a bit later, add test for "LIKE":
if (viewCriterium.isDate() || viewCriterium.isString() || "LIKE".equals(operator)) {
value = "'" + value + "'";
very nasty code, and does not raise an exception for searches like '%xxx'
Good luck,
HJH
Edited by: HJHorst on Mar 5, 2009 12:03 AM -
Search on the custom field in Product doesn't work
Hello everyone!
Lately I was configuring additional custom field for product header and succeed. Then I wanted to add this field as a search criteria for product search and I followed help on help.sap.com and note 1026956. Here are the steps I did:
1. I've extended structures CRMT_PRIL_QUERY_ADVSEARCH_PROD and CRMT_PRIL_QUERY_ADVSEARCH_IOBJ with my custom attribute.
2. I went to Master Data->Products-> Basic Settings ->Add Attributes to Search Structure and added my custom attribute there.
3. Then I found out that it's not enough and I should perform additional steps not included in note and help. I did these steps suggested by Shanthala Kudva in thread [Can't enable the extendable set type attributes in product search UI|Can't enable the extendable set type attributes in product search UI;.
After that I was able to configure UI and see the search criteria, but when I try to search using custom field I get error message: "Search criteria PRODUCT_ANKER.ZCAT_NUMBER in scenario CL_CRM_PRSEARCHSCENARIO_GETLST not included in tool/filter"
How to find out the reason of this behavior? Did I miss something in configuration?
P.S. Set type called ZPRODUCT, attribute ZCATNUMBER. In structures appended component called ZCAT_NUMBER with component type ZCATNUMBER. In table CRMC_PRSEA_ATTR the record has the attributename ZCAT_NUMBER, attribute_id ZCATNUMBER. Maybe I messed up with that?
Regards,
Alex.Hi Alexander,
I know this is an old post, but currently i am facing the same issue of not being able to see my custom fields in the BSP Component Workbench.
I tried to follow all steps maintained in SAP Note # 10269656 & 1541480, but no luck.
Can you please tell me what do you mean by "Should not add the extended attributes directly to Search Structure, as SAP expects the attributes to be in APPEND structure"? Can you please let me know how the values are to be maintained in the Search structure table "CRMC_PRSEA_ATTR", which is also accessed using the IMG Meanu path "Master Data --> Products --> Basic Settings --> Add Attributes to Search Structure"
Appreciate your help.
Suresh Karri -
Error message when I run searches on my website (PHP/MySQL help)
Hey guys, can someone tell me why this is happening in my PHP? I run a search on my website and get this error message ye sI filled the hostname, username and password)
Results for
PHP Error Message
Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/a8295382/public_html/Search Results.php on line 233
Couldn't execute query
Here is my PHP code:
<?php
$hostname_logon = "host" ;
$database_logon = "hostname" ;
$username_logon = username" ;
$password_logon = "password" ;
//open database connection
$connections = mysql_connect($hostname_logon, $username_logon, $password_logon) or die ( "Unabale to connect to the database" );
//select database
mysql_select_db($database_logon) or die ( "Unable to select database!" );
//specify how many results to display per page
$limit = 15;
//get the search variable from URL
$var = mysql_real_escape_string(@$_REQUEST['q']);
//get pagination
$s = mysql_real_escape_string($_REQUEST['s']);
//set keyword character limit
if(strlen($var) < 3){
$resultmsg = "<p>Search Error</p><p>Keywords with less then three characters are omitted...</p>" ;
//trim whitespace from the stored variable
$trimmed = trim($var);
$trimmed1 = trim($var);
//separate key-phrases into keywords
$trimmed_array = explode(" ",$trimmed);
$trimmed_array1 = explode(" ",$trimmed1);
// check for an empty string and display a message.
if ($trimmed == "") {
$resultmsg = "<p>Search Error</p><p>Please enter a search...</p>" ;
// check for a search parameter
if (!isset($var)){
$resultmsg = "<p>Search Error</p><p>We don't seem to have a search parameter! </p>" ;
// Build SQL Query for each keyword entered
foreach ($trimmed_array as $trimm){
// EDIT HERE and specify your table and field names for the SQL query
// MySQL "MATCH" is used for full-text searching. Please visit mysql for details.
$query = "SELECT * , MATCH (field1, field2) AGAINST ('".$trimm."') AS score FROM table_name WHERE MATCH (field1, field2) AGAINST ('+".$trimm."') ORDER BY score DESC";
// Execute the query to get number of rows that contain search kewords
$numresults=mysql_query ($query);
$row_num_links_main =mysql_num_rows ($numresults);
//If MATCH query doesn't return any results due to how it works do a search using LIKE
if($row_num_links_main < 1){
$query = "SELECT * FROM table_name WHERE field1 LIKE '%$trimm%' OR field2 LIKE '%$trimm%' ORDER BY field3 DESC";
$numresults=mysql_query ($query);
$row_num_links_main1 =mysql_num_rows ($numresults);
// next determine if 's' has been passed to script, if not use 0.
// 's' is a variable that gets set as we navigate the search result pages.
if (empty($s)) {
$s=0;
// now let's get results.
$query .= " LIMIT $s,$limit" ;
$numresults = mysql_query ($query) or die ( "Couldn't execute query" );
$row= mysql_fetch_array ($numresults);
//store record id of every item that contains the keyword in the array we need to do this to avoid display of duplicate search result.
do{
$adid_array[] = $row[ 'field_id' ];
}while( $row= mysql_fetch_array($numresults));
} //end foreach
//Display a message if no results found
if($row_num_links_main == 0 && $row_num_links_main1 == 0){
$resultmsg = "<p>Search results for: ". $trimmed."</p><p>Sorry, your search returned zero results</p>" ;
//delete duplicate record id's from the array. To do this we will use array_unique function
$tmparr = array_unique($adid_array);
$i=0;
foreach ($tmparr as $v) {
$newarr[$i] = $v;
$i++;
//total result
$row_num_links_main = $row_num_links_main + $row_num_links_main1;
// now you can display the results returned. But first we will display the search form on the top of the page
echo '<form action="search.php" method="get">
<div>
<input name="q" type="text" value="'.$q.'">
<input name="search" type="submit" value="Search">
</div>
</form>';
// display an error or, what the person searched
if( isset ($resultmsg)){
echo $resultmsg;
}else{
echo "<p>Search results for: <strong>" . $var."</strong></p>";
foreach($newarr as $value){
// EDIT HERE and specify your table and field unique ID for the SQL query
$query_value = "SELECT * FROM newsight_articles WHERE field_id = '".$value."'";
$num_value=mysql_query ($query_value);
$row_linkcat= mysql_fetch_array ($num_value);
$row_num_links= mysql_num_rows ($num_value);
//create summary of the long text. For example if the field2 is your full text grab only first 130 characters of it for the result
$introcontent = strip_tags($row_linkcat[ 'field2']);
$introcontent = substr($introcontent, 0, 130)."...";
//now let's make the keywods bold. To do that we will use preg_replace function.
//Replace field
$title = preg_replace ( "'($var)'si" , "<strong>\\1</strong>" , $row_linkcat[ 'field1' ] );
$desc = preg_replace ( "'($var)'si" , "<strong>\\1</strong>" , $introcontent);
$link = preg_replace ( "'($var)'si" , "<strong>\\1</strong>" , $row_linkcat[ 'field3' ] );
foreach($trimmed_array as $trimm){
if($trimm != 'b' ){
$title = preg_replace( "'($trimm)'si" , "<strong>\\1</strong>" , $title);
$desc = preg_replace( "'($trimm)'si" , "<strong>\\1</strong>" , $desc);
$link = preg_replace( "'($trimm)'si" , "<strong>\\1</strong>" , $link);
}//end highlight
}//end foreach $trimmed_array
//format and display search results
echo '<div class="search-result">';
echo '<div class="search-title">'.$title.'</div>';
echo '<div class="search-text">';
echo $desc;
echo '</div>';
echo '<div class="search-link">';
echo $link;
echo '</div>';
echo '</div>';
} //end foreach $newarr
if($row_num_links_main > $limit){
// next we need to do the links to other search result pages
if ($s >=1) { // do not display previous link if 's' is '0'
$prevs=($s-$limit);
echo '<div class="search_previous"><a href="'.$PHP_SELF.'?s='.$prevs.'&q='.$var.'">Previous</a>
</div>';
// check to see if last page
$slimit =$s+$limit;
if (!($slimit >= $row_num_links_main) && $row_num_links_main!=1) {
// not last page so display next link
$n=$s+$limit;
echo '<div class="search_next"><a href="'.$PHP_SELF.'?s='.$n.'&q='.$var.'">Next</a>
</div>';
}//end if $row_num_links_main > $limit
}//end if search result
?>
Anyone got any ideas as to why this is happening?
Also, I have not created any tables in my database... is this why it doesn't display any search results from my website?Sorry, but it doesn't help JTANNA.
What is your definition of "more efficiently"? If it's limitation of search results, branded search, and limitation of styling your results then google search is more efficient. Real developers rely on their own developments. For example: how can google search display results from a password-protected site? They can't.
best,
Shocker -
Transfer Purchase Order - Error message "Field selection ZTR not defined"
Hi all,
I've customized a new transfer purchase order type : TRA.
When I go to ME21N and choose TRA type, SAP displays this error message :
"Field selection ZTR not defined
Message no. ME028
The field selection required by the system is not defined in table 162.
Further processing is currently not possible."
How can I fix that please ?
Regards,
Bahia.Hello,
Check in IMG - MM - Purchasing - Purchase order -define screen layout - Check any field selction ZTR has been configured. And also check in Purchasing - purchase order - define document types - your PO doc type has reference to field selection group ZTR - if yes change it..
Regards
Mahesh Naik -
* is missing for required field in error message
Hi all,
I am using JDeveloper 11.1.1.2 with ADF BC. I have a simple form in a jspx with some fields for user to input.
The page contains 3 mandatory fields (simply set required=true): Surname, Name and Title. Where Surename and Name are inputText, and Title is a Select One Choice with List Of Value defined in VO.
If user submit data without anything in the required fields, an error message will popup. But the content of the error message is not quite correct!
All the required inputText has a prefix: *, but Select One Choice do not have a leading *.
Error
Messages for this page are listed below.
* Surname You must enter a value!
* Name You must enter a value!
Title You must enter a value! is there anyway to add a * to the error message for Select One Choice? or remove all the *? It looks very confusing.
Thanks in advanced,
Samson Funot sure,
but try to set the ShowRequired for this LOV in property inspector to true -
Error Message for new production order type
I have created a new production order type and gone through all the configuration requirements that I'm aware of. In testing this new order type, I get an error message in transacion CO02 when selecting the printer icon. The error is as follows:
No reference document type defined for order type ZRWK
Message no. CO179
ZRWK being the new order type.
I've searched through many posts and found nothing relating to this message. Hopefully someone has encounted this before.
I'm sure I've missed something, but can't pinpoint what it is.
Help is greatly appreciated.Bob, did you check your print parameters?..Maybe you don't have your sap forms..You can check it with Tx. COPI
The path is Print - Print Settings - Configuration Menu.
Diego -
How to extract error message for each output type.
Hi All,
Need your advice on the problem that I have.
Expected Solution:
1. Create an extra column for displaying header output error message from VF02 into a report program.
Steps that i have did:
1. Go to transaction VF02.
2. Enter a billing document number.
3. Hit enter. Click "Goto" > Header> Output
4. Click on the status that is red colour. Click on "processing log".
5. Press "F1" on the red colour message type. (Found out that it is a structure).
Need your advice on the question that I have:
1) How do we know that which "not successfully" process output type belong to which error message class?Hi Brad Bohn,
Thanks for your advice. I am so sorry about that. Thanks so much for your advice. And i have follow your advices and steps given by you. Appreciate it very much.
But for this issue about how to extract message for each output type. I have follow your steps by using SE30 to trace VF03 and I managed to found out that they are using this function module "WFMC_PROTOCOL_SHOW". Need your advice on this, how do we know each different output type with different error message is pulled from?
From my further research and in depth debugging into this function module, i manage to find this global internal table "PROTO_TAB" which stores all the text messages for each output. How does this internal table is populated?
Thanks in advance.
Regards
Shawn -
Constanr error messages re incorrect # when doing advanced search
Every time I try to do an advanced search for a member I get the error message number is incorrect. I have tried it over and over with various ID's Anyone else see this issue. And yes, numbers are typed correctly
I have never had the issue before. I will try listening and then typing. Is this another glitch, bug, or an attempt to not be able to search any more for Ebay ID's?
-
Wdr:select_options and highlight Error Message with a Link to Inputfield
Hi,
I have created a InputField on a View using WDR_SELECT_OPTIONS. I want to validate this Input Field and give
Error Message, when User fill it with wrong Values. How can we achieve this and important is to mark it on Screen WITH a RED STAR. ( e.g. highlighted )
Thanks!
Best Regards
Beserithan MalabakanI've not tried it with select options before, but you might wan to have a look at setting the REPORT_ATTRIBUTE_ERROR_MESSAGE method of the message object. This way the message gets attached to any UI element bound to the context attribute you issue the message for. But as I type this and think about it some more; I see where the problem lies. The Select Options component doesn't follow an approach of cross component context binding. It dynamically generates its own context.
If I had a little more time I would test this out; but it might be worth your while to research. When you initialize the Select-Options, you normally get access to the interface controller:
data: l_ref_cmp_usage type ref to if_wd_component_usage.
l_ref_cmp_usage = wd_this->wd_cpuse_select_options( ).
if l_ref_cmp_usage->has_active_component( ) is initial.
l_ref_cmp_usage->create_component( ).
endif.
* get a pointer to the interface controller of the select options
*component
wd_this->lv_wd_select_options =
wd_this->wd_cpifc_select_options( ).
* init the select screen
wd_this->lv_sel_handler =
wd_this->lv_wd_select_options->init_selection_screen( ).
This interface controller (LV_WD_SELECT_OPTIONS in my case). Has a GET_API method that returns the component controller. In turn you might be able to access the context of the Select-Options directly. Its a crazy idea, but worth a try.
Maybe you are looking for
-
How do I make hyperlinks within a PDF (loaded on a website) open in a new window?
I dont want the user to have to click the back button to navigate back to the webpage. When I made the button in the pdf, I used the action: Open a web link. When viewing the file within acrobat it obviously opens the link through my browser, however
-
The backup library doesnt show as an option in the file menu
I want to backup my library to DVDs, but there isn't an option to backup under the File\Library menu.
-
Display F4 values as TEXT ONLY on selection screen of Bex report
Hi, I have InfoObject with text(short) loaded for it. In Bex report on selection screen, I need to display ONLY TEXT values when you do F4 for values. How this can be achieved? I get key & text both now. Please note that I have tried all below settin
-
Save output of ping command in jtextarea
Hello friends, In my program i made 1 screen, in that i put 1 textarea and 1 button. When user press that button i want to run ping command and its output i want in textarea. How can i do that, give fast reply its urgent for me. Thanx
-
Digital Certificate authentication in OC4J
Hi Currently I am trying to configure standalone oc4j to authenticate the user using x.509 certifcates. The below is my secure-web-site.xml file. <web-site port="43" protocol="ajp13" display-name="Default Oracle9iAS Containers for J2EE Web Site" secu