Help on Formatted search query
Hello
I have a formatted search that is the following to select line of marketing documents example
select [$23.5.NUMBER]
when the general setting display decimal separator as "," I have no problem but when decimal separator changes to "." then the formatted search is giving me error because result is [number.000000] too many zeros when it is without zeros with decimal separator set to ","
How can I have the query run without zeros at the end when decimal is set to ","
Thank you for your help
Hi,
Please advice exact field to check.
Thanks & Regards,
Nagarajan
Similar Messages
-
How to club 2 queries in one formatted search query
Hi All,
I have inserted a formatted search in the stock transfer for chnaging the 'From warehouse' based on series.
I have written following query for same,
SELECT $[$18.1.0]='08' WHERE $[OWTR.series] ='46'
It is working Fine
I want ot use same concept for selecting other based on other warehouse
e.g
SELECT $[$23.5.1]='02' WHERE $[OWTR.series] ='45'
But I am not able to club these queries on one formatted search query can anybody help to group it in one formatted search query....
Thanks and Regards,
Atul Joshi
Edited by: Atul Joshi on Dec 23, 2008 5:20 PMHi Atul,
You could define the quey like this
SELECT
CASE
WHEN $[OWTR.series]='46' THEN '08'
WHEN $[OWTR.series]='45' then '02'
end
from OWTR
Regards,
Vijay kumar
SAP Business One Forums Team -
Mandatory Input in Formatted Search Query Field
I have created formatted search query. Which has only one field "Serial Number"? I have to ensure that, the user has to enter the value in that field. How to do that?
I was thinking on implement in stored procedure SBO_TransactionNotification with Object_Type = "219". But I am not sure, how to enforce the validation only for this search query. Because there are 50+ formatted search queries are available in the system.
Please helpHi Suresh
Check the below document
How to SET a UDF field as Mandatory Does TNSP required for It?
With Regards
Balaji Sampath -
Formatted Search Query for BatchNo
Dear All,
I am using the following query as formated search for Identifying the batches availble during the creation of Delivary document
in a user defined column at row level. When i click on this field it's showing the Batches for the Item with Zero Qty also.
I need to display only the batches where the QTY >0. This query displaying even the Zero Qty Batches also. Please help me to modify the below query for getting the above. Below is the query .
SELECT distinct T4.[BatchNum] FROM [dbo].[OIBT] T0 INNER JOIN OITM T1 ON T0.ItemCode = T1.ItemCode INNER JOIN DLN1 T2 ON T1.ItemCode = T2.ItemCode INNER JOIN ODLN T3 ON T2.DocEntry = T3.DocEntry INNER JOIN IBT1 T4 ON T0.BatchNum = T4.BatchNum AND T3.DocNum = T4.BaseNum INNER JOIN OWHS T5 ON T0.WhsCode = T5.WhsCode WHERE T0.[ItemCode] = $[$38.1] AND T4.[WhsCode] = $[$38.24] AND T0.[Quantity]>=$[$38.11]
Regards
Srinii removed that T5, But It's showing the Batches where the qty in the main warehouse for that batch is Zero.That batch was actually present in another warehouse. And also when i am working on other warehouses it's showing the batches in the main warehouse where the qty is present.
Regards
Srini
Edited by: Srini on May 11, 2010 10:24 PM -
Formatted Search query for Vacation Accrued
Hi Experts,
I have a Client who needs to keep tract on the Vacation Accrued on the Employee Master Data. I have created this UDF on the Master Data, but I could not get the query for the Formatted Search right.
This Formatted search on the UDF ( must look at the OHEM.startDate field and populate the following:
If it is a still within year of the system date, it must populate 0,
If it is > 1 year and < 3 years, it must populate 5,
etc.
Any help would be greatly appreciated.
MarliHi Experts,
Here is what I did for the query mentioned above:
{SELECT
CASE
WHEN (T0.startDate > GETDATE() -356)
THEN 0
WHEN (T0.startDate > GETDATE() - 712)
THEN 5
END
As 'Vacation Accrued'
FROM OHEM T0}
The issue is that if I link this query to the UDF on the EMD, I get a list of 0 and 5 to choose from. I need to populate automatically.
Thanks.
Marli -
Formatted search query for displaying invoice items details
hi all,
i need to display all the items in AP invoice.kindly suggest me a query for that.
in AP invoice
Ex. row items
code--descqtyprice--
total
I0001--XXXXXXX5--
100 -
500
query should display this row as
code--desc--
price
I0001--XXXXXXX--
100
I0001--XXXXXXX--
100
I0001--XXXXXXX--
100
I0001--XXXXXXX--
100
I0001--XXXXXXX--
100
=================================
the query should display as the qty is 5 so it will display the same item 5 times
kindly suggest me some query for formatted search
its very urgent
regards
sandipHi Sandip,
DoQuery("Select b.ItemCode from OINV a,INV1 b Where a.DocEntry=b.DocEntry")
Hope its help for you
Give me reward points,
Regards,
G.Suresh. -
Formatted search query with variable
Hi
I am trying to create a formatted search on a purchase order document.The scenario is as follows:
The issue is that the client will on certain stock records incur a tooling cost when raising a PO. This is a once off cost when they order a particular item. For example the tooling cost on a stock item is u20AC5.50. The cost price on the item is u20AC100. If they order for example 5 of these the total cost is u20AC505.50 i.e. u20AC100*5+tooling cost of u20AC5.50.
What we are attempting to do is pull through the tooling cost and add this on to the line total using a formatted search.
-UDF created on item record table. This is set type 'Unit and totals' and structure is 'Price'. This is called ToolingCost
-UDF created on marketing doc rows for ToolingCost. Again this is set to the same type and structure as the UDF on the item record.
-We have created a UDF on marketing row for total cost and set a formatted search against this with query attached that is attempting to calculate the total cost. We cannot get this to work and the problem would appear to be that the price field is a variable and this is causing an issue on the query. Can we include a variable field in our query and if so what should the syntax be?
Our query at the moment is 'SELECT 100*($[POR1.QTY.NUMBER])+($[POR1.U_TOOLINGCOSTS.NUMBER])
Note 100 in query syntax above to be replaced by price on POR1 table.
Can anyone provide assistence please.
Derek SmithHi Derek........
Try this.....
declare @var1_Qty as varchar(255)
declare @var2_Pr as varchar(255)
declare @var3 as float
declare @var4 as float
set @var1_Qty=$[$38.11.0]
set @var2_Pr=$[$38.14.0]
Set @var3=$[POR1.U_TOOLINGCOSTS.0]
set @var4=cast(substring(replace(@var2_Pr,',',''),0,len(replace(@var2_Pr,',',''))-3) as float)
select (@var1 * @var4)+@var3
Hope this will help you.......
Regards,
Rahul -
Hi Experts
I would like to get some help on a formatted search I wish to created which will show the payment terms of a BP in a UDF on the Sales Order form.
I have created a UDF and applied a formatted search to it which only brings in the record key of the payment terms:
SELECT T0.[GroupNum] FROM OCRD T0 WHERE T0.[CardCode] = $[$4.1.0]
Ideally I wish it to actually show me the Payment Group name from the OCTG table.
Thanks in advance for your help.
Thanks
JonHi Jonny......
You should use this query.......
SELECT T1.[PymntGroup] FROM OCRD T0 INNER JOIN OCTG T1 ON T0.GroupNum = T1.GroupNum
WHERE T0.[CardCode] =$[$4.0.0]
apppply this to payment terms UDF in sales order.
Regards,
Best Rahul -
Need help in building search query
Guys ..
Problem Description:
I have a huge table that is indexed using CONTEXT.
I want to write a search query that considers the following:
1. number of keywords match
2. takes care of spelling mistakes, synonyms and acronyms
3. proximity - the keywords should not be too far of each other.
e.g. I have this phrase: "Horizontal Stabilizer Trim Brake"
I was thinking of writing a query like:
SELECT SCORE(1) SCORE,
TEXT text
FROM MY_TABLE
WHERE CONTAINS(TEXT, '(Horz | Horizontal) ACCUM (Stab | Stabilier) ACCUM Trim ACCUM (Brk | Break)', 1) >= 0
ORDER BY SCORE DESC
The results doesnt look satisfactory. I have not used "near" operator as i dont know how to use it.
Please help me as I am very much new to Oracle Text.
-GWell, I'm not going to write the function for you, but we can at least talk through a general strategy.
A lot depends on how you help your users on the front end -- for example, if they're searching a technical document, you may want to return results that aren't perfect matches but you do want to make sure the user picks 'mandatory' and 'useful' keywords in a way that lets you figure out which ones are really important. On the other hand, if you're google and have to handle queries like 'horizontal stabilizer trim brake' and 'were Pete and Jenny in the break room' then you run the risk of spending too much time looking for interesting words, almost doing a full-text search on the query trying to derive meaning.
So I'm going to presume that you have some control over what/how the users generate their searches so that finding keywords isn't the issue.
The plan will be to parse the query a bit to find the interesting words, clean them up, and weigh their importance, then use transformed data to build the query template to score various combinations.
So here's some pseudocode for the function:
function parse_query(pQueryWords in clob) returns clob as
begin
generate_token_list (); -- split the query into a set of individual tokens/words
for each token in token_list
if it's a mandatory word then accumtokenlist := accumtokenlist || ' ' || token ||'*10' -- weigh the presence of the token strongly
if it's a useful word then accumtokenlist := accumtokenlist || ' ' || token ||'*5' -- domain-specific words are also important
if it's a stopword or reserved word, then do not add it to the list
if it's not on my lists, then accumtokenlist := accumtokenlist || ' ' || token
and normaltokenlist := normaltokenlist ||' ' || token
end;
--so now, we have two lists, one for NEAR and one for ACCUM
now build the guts of the template
querytemplate := querytemplate || '<seq> || normaltokenlist || '</seq>';
querytemplate := querytemplate || '<seq> || replace (accumtokenlist, ' ',' ACCUM ') || '</seq>';
querytemplate := querytemplate || '<seq>$' || replace(normaltokenlist,' ','$') || '</seq>';
querytemplate := querytemplate || '<seq>? || replace(replace(accumtokenlist,' ',' ?'),' ', ' accum ') || </seq>'; -- first fuzzy the words, then accum
querytemplate := querytemplate || '<seq>? || replace(replace(normaltokenlist,' ',' ?'),' ', ' near ') || </seq>'; -- first fuzzy the words, then near
return querytemplate
end;So, with a 'cooked' query text that is template-friendly, all we need to do is apply a template that is aware of your inputs:
query_Template_string := '
<query>
<textquery lang="ENGLISH" grammar="CONTEXT"> horizontal stabilizer*5 trim brake*10
<progression> '
|| parse_query('horizontal stabilizer trim brake') ||
' </progression>
</textquery>
<score datatype="INTEGER" algorithm="COUNT"/>'
</query>So that's an example of one approach. -
Help with Formatted search involving a UDF
I have a Formatted search which runns the following code:
exec xsp_nssItemLookup $[$38.256.0]
This search is on a udf of the Purchase order screen. (256 is the item details field in the details.
The above query runs fine. What I really want to do is to pass the contents of another UDF to the stored procedure. The USF is called U_NSSItemID. If I change my stored procedure to read:
exec xsp_nssItemLookup $[$38.U_NSSItemID.0] however it does not work. I get blank results every time.
I have also tried exec xsp_nssItemLookup $[POR1.U_NSSItemID.0] which doesn't work either.
I can't figure out what is wrong with my syntax. I don't get any errors, just a blank value.
Thanks
don shieldsSuda,
Thanks for answering so quickly. To answer your question the data type is Alphanumber which I just figured out is the save as CHAR() in SQL. My problem turned out to be that I needed to trim the spaces from my parameter. I was getting values like "cover ", and I needted to get "cover". Problem solved now.
Don -
Formatted Search query on Sales Order Lines
Hi Experts,
I have a client that needs a Formatted Search that will bring back values according to the following Scenario:
The Formatted search will be placed on the Sales Order Lines RDR1.U_UPC field.
On a Sales Order I have created UDFs: RDR1.U_Label and RDR1.U_UPC
On the BP Master Data I have created the UDFs: OCRD.U_UPCChoice
On the Item Master Data I have created the UDFs: OITM.UPCRetail and OITM.UPCLoc and OITM.UPCItem and
OITM,UPCOther
When the RDR1.U_Label field is '1', I need the RDR1.U_UPC to be the text 'not Applicable'
When the RDR1.U_Label field is '2', I need it to look at the OCRD.U_UPCChoice.
If that value is '1' then it must bring back the OITM.UPCRetail Value back in the RDR1_UPC field,
If that value is '2' then it must bring back the OITM.UPCLoc Value back in the RDR1_UPC field,
If that value is '3' then it must bring back the OITM.UPCItem Value back in the RDR1_UPC field,
If that value is '4' then it must bring back the text 'Look at Attachment'
Any help would be greatly appreciated.
Thanks,
Marli
Edited by: Marli Schutte on Aug 31, 2009 6:29 PMHi Marli,
Try this:
IF $[RDR1.U_Label] = '2'
SELECT Case T0.U_UPCChoice
When 1 THEN T1.U_UPCRetail
WHEN 2 THEN T1.U_UPCLoc
WHEN 3 THEN T1.U_UPCItem
WHEN 4 THEN 'Look at Attachment'
END
FROM dbo.OCRD T0, dbo.OITM T1
WHERE T0.CardCode = $[$4.0.0] AND T1.ItemCode = $[$38.1.0]
Thanks,
Gordon -
Formatted search query adding spaces
Hello,
I have created a table U_Items in SBO database.
I was trying to run this query using formatted search.
SELECT ItemDesc
FROM U_Items T0
WHERE T0.ItemCode = RTRIM(LTRIM('$[$38.1.0]'))
When the query gets executed '$[$38.1.0]' is repalced
by 'N'A00001 '' value.
I want the value to be 'A00001' so that it can match the record in the U_Items. How can I get rid of the trailing spaces?
Thanks,
SheetalHello Sheetal,
Your query,
SELECT ItemDesc
FROM U_Items T0
WHERE T0.ItemCode = RTRIM(LTRIM('$[$38.1.0]'))
I think must be
SELECT ItemDesc
FROM [@U_Items] T0
WHERE T0.ItemCode = RTRIM(LTRIM($[$38.1.0]))
if this is a user defined table.
I think your query seems ok. It doesn't work? -
Hi all,
We have the following formatted search defined in OITM under Item Desc (foreign language):
SELECT T1.DocNum AS 'Doc No', T1.CardCode AS 'BP Code', T1.CardName, T2.ItemCode, T2.OpenQty AS 'Open Qty', T2.WhsCode
FROM [dbo].[ORDR] T1 INNER JOIN [dbo].[RDR1] T2 ON T1.DocEntry = T2.DocEntry INNER JOIN OITM T3 ON T2.ItemCode = T3.ItemCode
WHERE T2.ItemCode = $[OITM.ItemCode] AND T2.OpenQty > 0
When run, we get a pop-up window with the relevant information. My question is, is there a way to make the T1.DocNum something which can be drilled down on?
Thanks alot!!
Rajiv Agarwalla
G.Mckenzie & CoHello Rajiv,
I think only the Choose From List pop-menu is available in SAP. For me, the Choose From List is a user-friendly feature because you can find or search through codes. -
Help with Formatted Search with Date
Hi experts,
I need help with the following query. In the PO item level, I want to take a user entered date and add 6 weeks to it. For example, after a user enters in a date in the field u_Date1, then U_date2 will populate with U_date1 + 6 weeks.
I can get the query to copy the U_Date1 field. However, once I add 6 weeks (+42) then I get an internal error. Please advise.
select $[por1.u_date1] + 42
from por1 t0
inner join t1 on t0.docentry = t1.docentry
where t0.linenum = $[por1.linenum] and
t1.docentry = $[opor.docentry]
Thank you for your help. i am on 2007A PL 47.
JaneHi Jane Liang ,
you can try this : Select DateAdd(day,42,$http://por1.u_date1 ) from por1 t0 .....
regards
H2 -
Doubt in formatted search query
HI all
This is the query i have seen in the forum
Regarding linking of the UDF size in BOM to Production Order,
you will need to create a formatted seach as the tables where the UDF exists are different.
In case your UDF is at the row level then use the following SQL
SELECT T0.U_SIZE FROM DBO.ITT1 WHERE T0.FATHER = $http://$6.0.0 AND T0.CODE = $http://$37.4.0
Set this to auto refresh Exiting Alterned column Due Date.
Can any one tell me what does the following syntax mean
T0.FATHER = $http://$6.0.0
AND
T0.CODE = $http://$37.4.0
what is 37.4.0 and 6.0.0.
or any one help me whre can i find the materials for the above things.FATHER refers to the Parent Item Code in the BOM definition
CODE refers to the Child Item Code in the BOM definition
If you Open the Production Order and Enable System Information from the View Menu and place your Cursor on the Product No field you will see the Item No on the Task Bar.
$[/$6.0.0] - 6 refers to the Product No field on the Production Order form
Similarly in $[/$37.4.0] - 37 refers to the Item Code at the Row level 4 refers to the column number in the matrix and 0 refers to the type
Ignore the / I have used above
Suda
Maybe you are looking for
-
I can't reinstall firefox 7.0.1
I uninstalled firefox in windows 7 because of audio problems in the browser. I then tried to reinstall it. I downloaded version 7.0.1. I ran the installer and it extracted files and it gave a message : "you may not have the necessary permissions to u
-
Running oracle form builder 10g in windows 7 64 bit
i am working in windows 7 64 bit oracle db 11g enterprise edition 11.2.0.10 64 bit form builder 10.12.0.2 32 bit my default browser is Google Chrome i have java 6 standard edition 1.6.0_34 when i am trying to run any form this message appear " java
-
Inserting records in a table after iterating through it
Hi, I have a table like this: Col 1 Col 2 1 rat 2 hen 1 dog 1 cat 3 lion My requirement is to process all the records with unique values in col 1, means I will be inserting these unique records in table A and if the record repeats like for values in
-
Hi I have query like select ' Please use the above policy # in the description when remitting the premium to Chase Manhattan.' from dual . I want to bold the text policy # . Please help to do that. regards Mani
-
Hello All, Please tell me that how can we make the assignment or text field mandatory for payment document (f-53 or f-28) Validation is not working. sUGGEST,