Decimal and formatted search
hello,
I've defined an UDF as Price.
Number of decimal for prices is set to 3 in the general settings.
the actual result of my formatted search is rounded to 2 decimals although 3 decimal are displayed.
here is a simple formatted search that illustrate the issue :
SELECT 100 / (100+19.6)
the displayed result is 0.840 instead of the correct value : 0.836
How can It be solved ?
Best regards,
Francis
Hi
Please check the decimal settings of
amount as well(general setting -display tab)
there is one case:
When under Adminstration -> System Initialization -> General Settings ->
Display, the decimal for the amount is defined as 0 and the UDF is
defined as eg. alphanumeric or units and total amount, The UDF does not
return the decimals and round the amount.
base on my testing:
if I define 2 decimal places for amount
then the UDF result will be 0.84
But if I define 3 decimal places for amount
then the UDF result will be 0.83
Best Regards
Helen Sun
Similar Messages
-
Dear expert
I have a question we make deliveries and at the end of the month we use document generating wizzard to group all deliveries per customer into one invoice.
But there are formatted search made to calculate some taxes data mandatory and wehn you use the document gerating wizzard for each invocie created you must click ok for the formatted search
Is it a way to imrove the process and not having pop up window for each invoice.
Thank youHi,
I think press OK is not avoidable. Have you checked if there is no FMS?
Thanks,
Gordon -
UDF link type and formatted search
Dear experts,
Im trying to use a formatted search to fill a UDF of the link type.
The plan is to generate a weburl voor googlemaps like the link with business partner addresses. I do this with the following query:
DECLARE @URLp1 AS VARCHAR(254)
DECLARE @Adres AS VARCHAR(254)
DECLARE @Plaats AS VARCHAR(254)
DECLARE @Postcode AS VARCHAR(254)
DECLARE @URL AS VARCHAR(254)
SET @URLp1=('http://maps.google.com/?q=')
SELECT @Adres=($[$U_Adres.1.0])
SELECT @Plaats=($[$U_Plaats.1.0])
IF LEN($[$U_Postcode.1.0])=0
BEGIN
SELECT @URL=(@URLp1+@Adres+'+'+@Plaats)
SELECT @URL
END
SELECT @Postcode=($[$U_Postcode.1.0])
SELECT @URL=(@URLp1+@Adres+'+'+@Postcode+'+'+@Plaats)
SELECT @URL=(SELECT REPLACE (@URL,' ','%20'))
SELECT @URL
The select replace doesn't work yet but that's not the real problem.
I used the following formatted search settings:
Search in Existing User-Defined Values according to Saved Query
Auto Refresh When Field Changes -> set to Adres
Refresh Regularly
When I try these settings on my UDF link style the field just stays empty.
When I use this formatted search on a Alphanumeric(100) field it more or less works. I need to manualy refresh the field to execute the query.
If I simplify the query to insert just one value like 'Opportunity No.' ($[$74.1.0]) it does auto update in both fields.
Could someone point me in the right direction what I'm missing/forgetting or give me a sollution that might even be better?
Kind regards
Edit:
PS. We are using SAP BO 8.8 PL15I've found a topic with a similar problem but there's no solution there either...
Formatted search with Query auto update -
Outgoing payment and formatted search
hi
how can i write a FS that distinguish between the methods of the payment (cash, check,cc).
thanks
RafiThanks Suda for your reply.
what is the right syntax for the case statement.
i want to get an automatic journal memo, each time i make an outgoing payment.
Till now i have a FS that don't distinguish between the methods of the payment, which cause later on some confuses in our books.
the trigger for this FS is a change in the code name of the document.
my goal is to have a FS that's changed according to the methods mentioned above, and i'm afraid i won't be able to make it evoke automatically.
"Also $32.0.0.25 is incorrect. Form field references have only 3 parameters not 4 "
i put only 3 parameters, the 25 is the number of digits in the left function.
Thx
Rafi -
Hi All
For my case, I have Two User Define Field (U_sysref and U_Percent) in the sales order line level. I am using the addon to input the value in one of the UDF with following code:
Dim CurrentDate As String = Date.Now.Year.ToString + Date.Now.Month.ToString + Date.Now.Day.ToString + _
Date.Now.Hour.ToString + Date.Now.Minute.ToString + Date.Now.Second.ToString + _
Date.Now.Millisecond.ToString
oMatrix.Columns.Item("U_sysref").Cells.Item(row).Specific.Value = CurrentDate
And the U_Percent can be refreshed when the U_sysref value is updated.
I have try to manually change the value in U_sysref and the field U_Percent can be refreshed.
But when I use the addon to change the value in U_sysref and the field cannot be refreshed.
Have any people know how to solve it?
Thanks
MouseHi,
FMS will only refresh by UI entry. Entry from DI directly will not trigger.
Thanks,
Gordon -
Special Price + Formatted Search for Special Price.
Hi all,
Appreciate some help here. Our client is using SAP B1 2007 Patch 38. AU/NZ localization, Local Currency = AUD.
Scenario:
Item A, Price List 1 = $2795, Price List display = 4 decimals, Price List Currency = USD
Special price for Item A has been set up as follows:
Step 1 - Go to Item> Price List> Price and Volumne Discount
Step 2 - The price and volumn discount screen opened. From the drop down, select price list and then select Item A by double clicking the line.
Step 3 - Period Discount screen opened. Valid from = 9th July 2008. Price = $2795.
Step 4 - Double click the line, Volume Discount Price List open, with the following details maintained.
Quantity=1, Discount=0, Special Price = $2795.
Quantity = 10, Discount=7.1556, Special Price = $ 2595.0010
Quantity = 100, Discount=10.0179, Special Price=$ 2514.9997
Question: we intend to put in Special price = $2595 and $2515, but SAP just does its own round up. Is there a way to work around?
Scenario 2:
To deal with the problem from Question 1, we have created a formatted search in the sales order and formatted search to round up the value in Line Total.
Column = Line Total
Trigger by = Quantity
Query = SELECT (case when $[$63.0.0]='USD' then Round($[$38.23.number],0) else $[$38.23.number] end)
Column = Quantity
Trigger by = Discount%
Query = SELECT $[$38.11.1]
The above set up works fine, if the user enter the quantity correctly the first time.
Eg:
User enter Qty = 10, SAP will display Discount = 7.1556 % and Line Total = $25,950.00 (Round up from $25950.01).
If user notice the quantity is wrong and then enter new quantity = 100, the discount remains at 7.1556%, it should be 10.0179%.
Question: Is there a way to work around this?Hi Shawn ,
1.First check the decimal setting
a.Administration --> system intilisation --Document setting -- currency or by document --
b.System initiliaisation ---> general settng --->Display
c.Administration set up->Financial currency ---rounding --???
Currency setting overides the rounding method of procedure B
Scenario2
Since your trigger is dicount percentage , You will not get the desired output from the formatted search . Try to get the trigger at quantity .
Hope that helps
Bishal -
How do i deduct dates using formatted search with a query
Hi Experts,
I would like to know how to get the date difference using query and formatted search. Below are the details:
1. I have created 3 Header UDF's composed of 2 Date type fields and 1 Quantity field.
2. The first one is for the Original Date, the next one is for the Payment Date and the Last one is for the No. of Days Lapsed.
What I would like to do is automatically compute for the number of days from the original date to the payment date. What query syntax should i use to achieve this?
Thanks,
YvetteHi Yvette,
It should be something like;
DATEDIFF (day, T0.[createDate], T0.[closeDate] ) as 'Aging' This is just an example. You may add your udf's instead of dates.
Thanks,
Joseph
Edited by: Joseph Antony on Jul 2, 2010 1:53 PM -
Using Form Variables in a Formatted Search
Hi everyone, I'm relatively new to SAP B1 and just trying to get some info. I have created a few formatted searches, but I am having trouble with this one in particular.
I am trying to get the 'Business Partner Type' Field under Business Partner Master Data (BP Type, [Form=134 Item=40 Pane=0 Variable=1 OCRD,CardType] to change the user defined fields category displayed [Form=-134 Item=9 Pane=0 Variable=62]
For example, when CardType is Vendor ('S' value), I'd like the user defined fields category 'vendor'( '1' value) to show
Here is my query
SELECT CASE
WHEN $[$40.0.1]='S' THEN '0'
ELSE WHEN $[$40.0.1]='C' THEN '1' END
Which is then assigned as a formatted search to that field.
I was trying to find some sort of definitive guide on form variables and formatted search queries; if anyone can point me in the right direction, I'd appreciate it (I have seen the $[$x.y.z] variables but I am not 100% sure on their usage).
Thanks in advanceHi,
Try this:
SELECT CASE $[OCRD.CardType\]
WHEN 'S' THEN '0'
WHEN 'C' THEN '1'
END
Please also response for your previous open thread. You may just close it if you do not like the answer.
Thanks,
Gordon -
My Formatted search work wrong!!
I'd like to get your understanding on my english ability.
But..., Time Pressed..
Please Help me ..
I make a UDO and Formatted search(It Update the U_CardName whenever the U_Cardcode changes )
After, I link a Formatted search to my form(using screen Painter and connecting UDO, it works good).
The problem is formatted search work only When i pushed "Update" button in screen of Define Formatted Search , otherwise it doesn't work.
so now, I work ..
1. Form Load.
2. Ctrl + Shift + f2 press in edittext of U_cardname
3. (Originally, Checked "Display Saved Values"
check "Refresh Regularly" and
check "Display Saved Values"
4. "Update"
what's the my problem?
why is it happend?Hi Lee,
You have to define a Query in the cardname field indicating that the query must be executed when the value of CardCode changes.
Now, define such a query:
SELECT T0.CardName AS 'BP Name' FROM [dbo].[OCRD] T0 WHERE T0.CardCode = RTRIM($[$3.U_CardCode])
Where "3" is the item number of the column that contains the U_CardCode. Check the one is assigned to your field using the "Debug Information" in the "View" Menu
When you define the Formatted Search:
- Select Search by Saved Query and choose the one that contains the statement above
- Auto Refresh when...
- Select here the description that match your U_CardCode field
- Display Saved Values
Now you have set your UFS and it works!
Hope this helps,
Felipe -
Formatted search on User Table
Hi..,
I need to set formatted search for user table which is @DCNR . My Requirement is that i need to Pick CST NO from BP Master . In my user screen i had taken CARDCODE value using CFL which is binded to the field U_ven in the table @DCNR.Using this CARDCODE value i need to pick CSTNO from BP master to the user screen which is binded to the table (@DCNR).My Query is as follows but it is not working,
SELECT crd7.taxid1 from crd7 inner join @dcnr on crd7.cardcode = @dcnr.u_ven where crd7.cardcode = $[@dcnr.u_ven]
U_VEN field contains card code value.
Do i need to follow some other terms in order to write formatted search on user table.
Hope some one would help to fix this problem.
thank u,
-Ashok KrishnanDear Mr Krishnan,
As a starting poing I would suggest reading these documents regarding UDF and Formatted search:
https://websmp108.sap-ag.de/~form/sapnet?_FRAME=CONTAINER&_HIER_KEY=701100035871000437965&_OBJECT=011000358700004463532006E&_SCENARIO=01100035870000000183&
https://websmp108.sap-ag.de/~form/sapnet?_FRAME=CONTAINER&_HIER_KEY=701100035871000437965&_OBJECT=011000358700003625432006E&_SCENARIO=01100035870000000183&
let us know if they were usefull.
Kind Regards,
Marcella Rivi
SAP Business One Forums Team
Edited by: Paul Finneran on Aug 14, 2008 1:15 PM -
External table.How to load numbers (decimal and scientific notation format)
Hi all, I need to load inside an external table records that contain 7 fields. The last field is called AMOUNT and it's represented in some records with the decimal format, in others records with the scientific notation format as, for example, below:
CY001_STATU;2009;Jan;11220020GR;'03900;CYZ900;-9,99999999839929e-03
CY001_STATU;2009;Jan;11200100;'60800;CYZ900;41380,77
The External table's script is the following:
CREATE TABLE HYP_DATA
COUNTRY VARCHAR2(50 BYTE),
YEAR VARCHAR2(20 BYTE),
PERIOD VARCHAR2(20 BYTE),
ACCOUNT VARCHAR2(50 BYTE),
DEPT VARCHAR2(20 BYTE),
ACTIVITY_LOC VARCHAR2(20 BYTE),
AMOUNT VARCHAR2(50 BYTE)
ORGANIZATION EXTERNAL
( TYPE ORACLE_LOADER
DEFAULT DIRECTORY HYP_DATA_DIR
ACCESS PARAMETERS
( RECORDS DELIMITED BY NEWLINE
BADFILE 'HYP_BAD_DIR':'HYP_LOAD.bad'
DISCARDFILE 'HYP_DISCARD_DIR':'HYP_LOAD.dsc'
LOGFILE 'HYP_LOG_DIR':'HYP_LOAD.log'
SKIP 0
FIELDS TERMINATED BY ";"
MISSING FIELD VALUES ARE NULL
REJECT ROWS WITH ALL NULL FIELDS
"COUNTRY" Char,
"YEAR" Char,
"PERIOD" Char,
"ACCOUNT" Char,
"DEPT" Char,
"ACTIVITY_LOC" Char,
"AMOUNT" Char
LOCATION (HYP_DATA_DIR:'Total.txt')
REJECT LIMIT UNLIMITED
NOPARALLEL
NOMONITORING;
If, for the field AMOUNT I use the datatype VARCHAR (as above), the table is loaded but I have some records rejected, and all these records contain the last field AMOUNT with the scientific notation as:
CY001_STATU;2009;Jan;11220020GR;'03900;CYZ900;-9,99999999839929e-03
CY001_STATU;2009;Feb;11220020GR;'03900;CYZ900;-9,99999999839929e-03
CY001_STATU;2009;Mar;11220020GR;'03900;CYZ900;-9,99999999839929e-03
CY001_STATU;2009;Dec;11220020GR;'03900;CYZ900;-9,99999999839929e-03
All the others records with a decimal AMOUNT are loaded correctly.
So, my problem is that I NEED to load all the records (with the decimal and the scientific notation format) together (without records rejected), but I don't know which datatype I have to use for the AMOUNT field....
Anybody has any idea ???
Any help would be appreciated
Thanks in advance
Alex@OP,
What version of Oracle are you using?
Just cut'n'paste of you script and example woked FINE for me.
however my quation is... An external table will LOAD all data or none at all. How are you validating/concluding that...
I have some records rejected, and all these records contain the last field AMOUNT with the scientific notation
select * from v$version where rownum <2;
Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bi
select * from mydata;
CY001_STATU 2009 Jan 11220020GR '03900 CYZ900 -9,99999999839929e-03
CY001_STATU 2009 Feb 11220020GR '03900 CYZ900 -9,99999999839929e-03
CY001_STATU 2009 Jan 11220020GR '03900 CYZ900 -9,99999999839929e-03
CY001_STATU 2009 Jan 11200100 '60800 CYZ900 41380,77
CY001_STATU 2009 Mar 11220020GR '03900 CYZ900 -9,99999999839929e-03
CY001_STATU 2009 Dec 11220020GR '03900 CYZ900 -9,99999999839929e-03
CY001_STATU 2009 Jan 11220020GR '03900 CYZ900 -9,99999999839929e-03
CY001_STATU 2009 Jan 11200100 '60800 CYZ900 41380,77MYDATA table script is...
drop table mydata;
CREATE TABLE mydata
COUNTRY VARCHAR2(50 BYTE),
YEAR VARCHAR2(20 BYTE),
PERIOD VARCHAR2(20 BYTE),
ACCOUNT VARCHAR2(50 BYTE),
DEPT VARCHAR2(20 BYTE),
ACTIVITY_LOC VARCHAR2(20 BYTE),
AMOUNT VARCHAR2(50 BYTE)
ORGANIZATION EXTERNAL
( TYPE ORACLE_LOADER
DEFAULT DIRECTORY IN_DIR
ACCESS PARAMETERS
( RECORDS DELIMITED BY NEWLINE
BADFILE 'IN_DIR':'HYP_LOAD.bad'
DISCARDFILE 'IN_DIR':'HYP_LOAD.dsc'
LOGFILE 'IN_DIR':'HYP_LOAD.log'
SKIP 0
FIELDS TERMINATED BY ";"
MISSING FIELD VALUES ARE NULL
REJECT ROWS WITH ALL NULL FIELDS
"COUNTRY" Char,
"YEAR" Char,
"PERIOD" Char,
"ACCOUNT" Char,
"DEPT" Char,
"ACTIVITY_LOC" Char,
"AMOUNT" Char
LOCATION (IN_DIR:'total.txt')
REJECT LIMIT UNLIMITED
NOPARALLEL
NOMONITORING;vr,
Sudhakar B. -
Formatted search with UDF and syntax question
Can you explain the syntax with when to use the dollar sign and negative in writing a query for a formatted search based on user entry?
I now want to create a formatted search to pull values based on the user's entry into a UDF on the item master screen.
User entry into UDF U_Customer Code
to create Formatted search for UDF U_Rep01
I tried the following, but it does not work.
SELECT T0.U_REP01 FROM dbo.OCRD T0
WHERE T0.CARDCODE = $http://$OITM.U_CUSTOMERCODE
Thanks.
Please advise.The right syntax would be like this:
SELECT T0.U_REP01 FROM dbo.OCRD T0
WHERE T0.CARDCODE = $[OITM.U_CUSTOMERCODE\]
However, the logic of query may not be correct. Select something must be already in the system and Where should also be locatable.
Thanks,
Gordon -
Formatted searches and SQL functions
Hi,
I have made test to call a SQL function in a formatted search. It seems to be impossible?
Is it right or not ?
Thanks for your help.You don't need to put a semicolumn, and don't have to put quote's around sbo variables (from a form)...
<b>Example</b>[code]SELECT ItemCode, ItemName FROM OITM WHERE WhsCode = $[$38.1.0] AND SellItem = 'Y' AND OnHand > 0[/code]
Hope it helps... -
How to Define and Use Formatted Search in Sap Business One 2007
Hi
Any Document on How to Define and Use
Formatted Search in Sap Business One 2007.
ThanksHi Manish,
It is Very simple Procedure of defining FMS(Formatted Search)
in SAP 2007B Same as SAP 2005B & SAP8.8 Version
Do this,
->> Open the require Document.
for ex. IF you add the UDF in Marketing Document(Sales/Purchase)
1. Goto the UDF (or) any Default(Original) Field and Click ShiftAltF2.
2. Select the SEARCH BY SAVED QUERY.
3. Assign the FMS Query.
4. Select the AUTO REFRESH WHEN FIELD CHENGES.
5. Select the require Auto refresh field
6. Check the Refresh Regularly (or) Display Saved Values.
Regards,
Madhan. -
Issue with Formatted Search and Sales BOM
Good afternoon,
One of our customers uses a Formatted Search on the Sales Order row to lookup the Project Code stored against the Item.
This works very well, except for when a Sales BOM is selected. I assume the FS lookup is working correctly, but the screen is quickly refreshed to list all the component items related to the BOM. This process appears to overwrite the contents of the Project field.
We wish to keep this functionality, but retain the FS lookup results in the Project column. Could the order of the process be changed so that the BOM refresh occurs prior to the FS lookup.
Thanks
Greig
Edited by: Greig Burrows on Jul 21, 2010 5:57 PMHi,
For metadata, which metadata are you not seeing? Are they custom properties within the PDF, and have you checked if you have crawled properties matching these?
I know there's issue with last modified on PDF's (http://sharepointfieldnotes.blogspot.no/2013/05/understanding-and-getting-sharepoint.html)
Thanks,
Mikael Svenson
Search Enthusiast - SharePoint MVP/MCT/MCPD - If you find an answer useful, please up-vote it.
http://techmikael.blogspot.com/
Author of Working with FAST Search Server 2010 for SharePoint
Maybe you are looking for
-
How can I embed a Keynote presentation on a web page?
I created a Keynote presentation using Keynote version 6.5 (OS X Yosemite). I found the "export as html" option, which creates an entire web page named index.html. I opened that web page in Dreamweaver, but I'm not talented enough to figure out how t
-
Problem while moving Web Dynpro code from one env to other
Hi Experts, I have developed some Web Dynpro program in Development Environment. The Web Dynpro program uses BAPI and gets data from R/3. I have to transfer the Web Dynpro program to Quality environment. When I am trying to compile, I am getting fol
-
This has come up before on this forum. I'm still having the problem of the audio disc disappearing when I choose to import it into iTunes. When is Apple going to release an update to fix this bug? I'm tired of having to restart my Mac Mini every time
-
I can't purchase or download anything from my mac
I am logged into my account. It is the correct account. I have the correct password. When I try to purchase anything, it asks me to enter my password, I do, then nothing happens. I don't get an error message, I don't get my download, nothing happens.
-
BPCA- TBOM mass creation or reuse of the existing TBOM's
Hi, BPCA process has the capability of analyzing projects and the business processes associated to them. So far we cannot go for TBOM mass creation. But, is it possible for us to re-use the TBOM's that are already created for a particular T code in