Currency Formatted Search problem

Hi
I am trying to creat a formatted search for the marketing docs price / unit price field that populates the field with the currency and money value. I have a lookup table defined in sap where i store the currency and price i want to populate the udf with, based on certain conditions from udf's on the marketing doc's lines.
when i try to type in a price manually on the form e.g. USD 1 SAP accepts the value with no problems, however business one only lets me insert the actual money value in the field and then inserts the default currency ie if my local currency is ZAR and my formatted search returns a price of 1 then SBO automatically formats the field as ZAR 1.
If i want to insert a value of USD 1 into the field with the formatted search then SBO returns an error message. I have tried variations such as returning 'USD 1', '1 USD', '1USD', 'USD1' with the formatted search, all of which return an error message. However if i manually type any of the examples in SBO accepts them and formats the column correctly.
This is quite an important functionality requirement as the customer needs the ability to have different currencies on different lines of a marketing document.
I have also tried using pricelist lookups with the formatted search but experience exactly the same problem in that i cannot specify the currency in the formatted search.
If anyone has experienced this problem please let me know if you were able to come up with a solution as manually capturing the prices per line is not an option (documents are often in excess of 500 lines)

Hi Philip,
Your question is obviously about functionality of the B1 application - rather than the B1 SDK - and thus might fit better into the "SAP Business One" Forum: SAP Business One Application
However, I tried to use the non-LC in a Formatted Search in B1 2007 - and I didn't have a problem with that.
Maybe it's just a bug (that has been fixed)?
Maybe you should consider using an Add-On / SDK?
Maybe there's just sth wrong in your query? ...are you sure that your "USD 1" variations are exactly as you wrote?
Regards,
Frank

Similar Messages

  • Formatted search problem

    Hi,
    i've a problema with a formatted search:
    i want to create a serial number's substring to copy in a user Field.
    i want to launch this query automatically, and i want to update this user field when the user create serial numbers, without the user launch this query.
    this is my query:
    SELECT  DISTINCT SUBSTRING (T0.[IntrSerial], 11,9) FROM OSRI T0  INNER JOIN SRI1 T1 ON T0.SysSerial = T1.SysSerial WHERE T0.[ItemCode] = 'ST_2400_4X2_SL' and  T0.[IntrSerial] = $[$3.54.0]
    Anyone can help? thanks a lot

    Hi,
    the query i s ok, but i have to start it manually, although i want to start it automatically when the serial number field is written, how can do it? Thanks a lot

  • Formatted search problem plz slove it.

    Hi All,
    I created one user defined form. In that i put two fields. And i entered something in one fields, automatically that number will go to next. I written that query and i put it in second field using formatted search. And i given link also. But first time it is working fine. after that, it is not working. Again i have to go second field, and press ****+F2. But i don't want this.. Plz any one slove this..
    Regards,
    krishna.v

    Hi Krishna,
    Can you try delinking the FS and link again. I tied replicating your scenario and it works.
    Field 1 - @Master.A1
    Field 2 - @Master.A2
    FS 1 - $[@Master.A1.Number]
    FS 2 - $[@Master.A2.Number]
    Linking:
    FS1 --> Field 2
    FS2 --> Field 1
    This will make the columns identical irespective of where the user keys in data. Is this what you are looking for. If yes, please reconfirm that you have done the above.
    Regards,
    Hamsa

  • Currency format problem while exporting as excel

    Hi
    I have to create a report for which the currency format should be $#,##0.00 and -$#,##0.00 for negative numbers.
    In the text form field of rtf template, I have selected number format and removed the portion ;($#,##0.00) from $#,##0.00;($#,##0.00).When I view the report as HTML the numbers are showing in proper format.($#,##0.00 or -$#,##0.00).But when the report is exported as excel ,the negative number format changes to ($#,##0.00) in red color.
    Can anyone tell me how avoid this problem?
    Thanks in advance
    Naveen

    I think this is an Excel issue - you can right mouse click in Excel the column header and "Format Cells>Text"
    You could also append a ' character to your numbers in BI Answers ie: '6035784010491980 which should give you the correct format in Excel.
    eg. CONCAT( '''', CAST ( '6035784010491980 AS CHAR) )
    There is also an MS Office plug in available for OBIEE this may give you further options.

  • Problem when create auto numbering in BP master using Formatted Search

    Hi all,
    I have a problem in creating auto numbering in BP for Customer type using Formatted search
    My query is like this
    declare @tempNo as char(20)
    set @tempNo=(select  Isnull(max(REPLACE(OCRD.CardCode , LEFT(OCRD.CardCode,10),'')),0)  + 1
    from OCRD where (CardType ='C') and LEFT(OCRD.CardCode,3) = 'CU.' )
    set @tempNo='CU.'left(convert(varchar,GETDATE(),112),6)'.'+@tempNo
    select cast(@tempNo as char(20))
    It should be creating the new number for example
    CU.201101.1
    CU.201102.2
    CU.201103.3
    CU.201103.4
    The format will be like this CU.YYYYMM.autonumbering
    So if the current year is still the same it will always increase the number and it will reset the number become 1 if the current year is change.
    But when i execute the number , the number doesn't increase, still generate the last number CU.201103.4
    I have use this query in generate item number, it runs well but different format.
    Is there some thing wrong with my query?
    Thanks in advance
    Regards
    Jia shun

    Hi Jia shun,
    You have posted an identical threads. There is no such need. Please close this one and response to the one with answer already.
    Thanks,
    Gordon

  • Problem with Formatted Search-Urgent

    Hi All, I have a problem as follows:
    I am trying to set up a formatted search in the Batches Setup window of GRPO document. I want to pickup the "Total Created" figure from Rows From Document grid (i.e. the upper grid) in the form. I want to add 100 to it and then to display the result in the "Batch Attribute1" Field in the lower grid i.e. Created Batches Grid.
    Please someone give me the tested query for the purpose..
    Thanks In Advance
    Amol Mangalkar

    Try the next FS:
    SELECT $[$35.38.Number]+100

  • Problem with activation of Formatted Searches

    There seems to be an error in the activation of formatted searches in SAP B1.
    The following is an example to demonstrate the real situation with a minimum of complexity.
    1. We have defined 2 user defined fields, U_trigger and U_target, in the title area of documents. Both are defined as alphanumeric fields with standard length 10 and some predefined values.
    2. For sales orders we have defined for UDF 'target' that a formatted search 'getTriggerValue' is activated on changes of UDF 'trigger'.
    3. The formatted search 'getTriggerValue' reads the value of UDF 'trigger' and writes it to UDF 'target':
    DECLARE @triggerValue AS nvarchar(10)
    SET @triggerValue = $[ORDR.U_trigger]
    SELECT @triggerValue
    When we add a new document to the database, i.e. the document is in "button-mode" = 'add', there are no problems with the activation of the FS on field 'target' when the value of field 'trigger' is changed!
    After a document is already written to the database and is later displayed on the screen again, the document is in "button-mode" = 'OK'. In this situation the FS on field 'target' IS NOT ACTIVATED when the value of field 'trigger' is changed, i.e. the value of 'trigger' is not copied to 'target'.
    After this first change the document is now in "button-mode" = 'update'. If we now change the value of field 'trigger' a second time the FS on field 'target' is activated an the value is copied from 'trigger' to 'target'.
    If we define the FS of field 'target' with option 'Refresh Regularly' the FS is activated after the first change of field 'trigger' as expected.
    But we CAN NOT USE THIS OPTION AS A STANDARD SOLUTION for our problem, since some fields and their FS can not work with this option and need the standard option 'Display Saved Values' set. Otherwise some fields yield wrong values, since they are working not only with constant predefined values as in the simple example above, but with dates which are set by GETDATE() in the FS, e.g.
    Is this behaviour a bug of SAP (FS is not activated even if the value of the refresh field is changed)?
    If not, what is the idea behind this behaviour?
    And how can I get around this behaviour?
    Thank you for your support!
    Frank Romeni

    Hello Suda!
    Many thanks for your answer!
    Perhaps my explanations are a bit in confusion.
    The example in my question is just to demonstrate the behaviour of the formatted search with option 'Display Saved Values' set, i.e. in a document that is already saved to the database, only after the second change the formatted search is activated.
    I am aware that with the simple formatted search that I have shown as an example everything works fine with the option 'Refresh Regularly'.
    But what is the meaning to activate the formatted search only after the second change when option 'Display Saved Values' is set?
    The reason why we can't use option 'Refresh Regularly' is that in our real application not only constant values are copied from 'trigger' to 'target'.
    Let me give you an example which approaches the real situation more than the first example:
    DECLARE @trigger AS nvarchar(20)
    SET @trigger = $[ORDR.U_trigger]  -- U_trigger / UDF 'trigger'
    DECLARE @save AS datetime
    SET @save = $[ORDR.U_date]        -- U_date / UDF 'date'; save current date
    IF @trigger = 'getDate'
      SELECT GETDATE()
    ELSE IF @trigger = 'getDateConst'
      SELECT '01.01.2008'
    ELSE IF ...
    ELSE
      SELECT @save                    -- no value in @trigger to change date ==> reset
    Option 'Display Saved Values' set: formatted search is activated only after the second change of value of UDF 'trigger'. This is not acceptable!
    Option 'Refresh Regularly' set: Suppose the 'trigger' is set to 'getDate'. The actual date, e.g. 25.06.08, is displayed in UDF 'date'. The document is saved to database. When the document is fetched again on the next day, the formatted search is activated immediately without the change of any values, i.e. 'trigger' still is set to 'getDate'. This is evaluated in the formatted search and the function GETDATE() is called and the now actual date, 26.06.08, is written to UDF 'date'. This is wrong!
    I hope that the new example shows why we can't use option 'Refresh Regularly'!
    We need no regularly refreshed value of UDF 'date', we need an activation of the formatted search only when the value of UDF 'trigger' changes. But why is it activated only after the second change when 'Display Saved Values' is set?
    Thank you for further support!
    Frank Romeni

  • Problems using a formatted search to link order lines to order header

    Hi,
    I'm having a nightmare trying to get the main lines table to populate the header within a sales order using a formatted search.
    I have created a UDF on the header for total value, and where items entered onto the order are of a certain type I need the header UDF to be sumated.
    Basically I have three parts for packaging (PACK1, PACK2 and PACK3), and the header has a UDF called U_TotPack
    Someone did sugest the following query, but this doesn't appear to work either:
    select sum(t0.linetotal) from rdr1 t0 inner join ordr t1 on t0.docentry = t1.docentry
    where t1.docnum = $[ORDR.DocNum] and t0.itemcode in ('PACK1', 'PACK2', 'PACK3')
    If it is a problem for me to use the line total field (as it is a variable calculation) I am happy to total the quantities for the items found, but I just can't seem to build any form of relationship between the header and lines.
    Hope someone out there is able to help as this one has really got me stumped.
    Cheers,
    J

    Hi Julian,
    I'm assuming you are trying to populate the header UDF before the Order is added to the system? If yes then it is not possible to achieve this via a formatted search, only SDK. A header FS cannot properly access line information, it only works the other way around - header info to line level.
    I presume the reasoning is that which line should your header FS take a value from? The FS syntax also doesn't allow you to loop throught all lines.
    The SQL that someone else suggested would only work for a sales order already added to the database. Hope this helps.
    Regards,
    Andrew.

  • Problem in formatted search runing by code

    Hi all, this is my problem:
    I have a one formatted search in one column and i want run it in lost focus of other column. In the forun appear this code to do but something wrong occurs in my case. The formatted search seems run and in one moment the resul value appear in the matrix but in the moment dissapear and the old value remains. Why the formatted search result dissapear?
    this is my code:
    if (pVal.EventType == SAPbouiCOM.BoEventTypes.et_LOST_FOCUS && pVal.ItemUID == "38" && pVal.Before_Action == false && pVal.ColUID == "U_n_formato"&&KEYDOWN_NUMERO_FORMATOS)
                    oForm = SBO_Application.Forms.GetFormByTypeAndCount(pVal.FormType, pVal.FormTypeCount);
                    oMatrix = (SAPbouiCOM.Matrix)oForm.Items.Item("38").Specific;
                    try
                        oMatrix.Columns.Item("11").Cells.Item(pVal.Row).Click(SAPbouiCOM.BoCellClickType.ct_Regular,0);
                        SBO_Application.SendKeys("+{F2}");
                    catch
                    //oItem.Click(SAPbouiCOM.BoCellClickType.ct_Regular);
                    KEYDOWN_NUMERO_FORMATOS = false;
    Thank you all again.
    Regards.

    Hi
    you can set the true value to KEYDOWN_NUMERO_FORMATOS = true.
    in Got focus event of  column uid "U_n_formato"
    regards
    senthil

  • Problem With Formatted Search.

    Hi to all,
    I have linked a formatted search to a UDF that lies at row level in AP Invoice. This field is used to display the Sales  Order Price. The requirement is that from SO we create a purchase order and subsequently create a goods receipt and AP invoice.. Now in invoice it is showin perfectly fine whether it is copied from goods receipt or purchase order.. But in the purchase order and goods receipt screen this query will not work. And the same query used in AP invoice is being linked to these documents. Is there any work around for this?? Is it possible to run queries based on the form numbers?? If so ho do i pull the form number in the formatted search query??
    Please Help!!!!
    Regards
    Aris

    I recommend creating separate queries for each document.
    ie
    1 formatted search to lookup price on sales order from AP Invoice
    1 formatted search to lookup price on sales order from GRPO
    1 formatted search to lookup price on sales order from PO
    then change the lookup to pull fields from the document that you are using as a reference.
    when you are building the formatted searhes start by returning the values that are you are using as a reference. That way you are sure that you are pulling the correct information.
    Then layer in the lookup to the sales order.
    If you get stuck I recommend that you copy and paste the formatted search in SQL Server management studio and replace the variables refereces with real values.
    In my experience troubleshooting queries is more effective when using SQL Server management studio. (the error reporting is better).

  • Problem in Formatted Search

    I have added two UDFs namely ItemCode and ItemName on header level of Profit center form.
    I have attached folwing query to ItemCode for Formatted Search
          select Itemcode from oitm
    I want to display the corresponding itemname automaticaly in itemname field. So I created the folowing query:
    Select oitm.itemname from oitm where itemcode= (select $[$U_ItemCode.U_ItemCode])
    setting is that Auto refresh when field changes (ItemCode).
    Now what result I am getting is as follows:
    if I change ItemCode and goto ItemName, the itemname should change automaticaly, but it doesn't happen. However if I press Shift+F2 here on ItemName it takes the correct ItemName. I want that ItemName should be changes as ItemCode is changed automaticaly...
    I am using a Patch 01.
    plz help

    Amol,
    Please try
    SELECT T0.ItemName FROM OITM T0 WHERE T0.ItemCode = $[[OPRC.U_ItemCode]]
    NOTE: The format is $[[TableName.UserField]] .  Since you have create the User field in OPRC table I am referring to it as OPRC.U_ItemCode
    remove the http:// thats got added.
    Suda

  • Problem with currency format setting

    hello experts,
    i have one currency filed FDES-WRSHB = 25706515.32.
    i want this field to be converted into currency format which user have selected.
    for ex if user setting for currency in SU01 is 1,23,456.89 then this currency should be converted to 25,706,515.32.
    or if default setting is 1.23.456,78 then it should be converted to 25.706.515,32.
    please tell me how to achieve this... any FM available?
    or tell me how to read these user default setting so i can explicitly convert currency format.
    -Shweta
    Edited by: shweta chavan on Feb 6, 2009 7:19 AM

    Hi Shweta,
    I had the same issue,we dont need to do anything,the display will come automatically in the User format(specified in SU01/SU3).We dont need to use any FM or any coding.
    If u chanegd any settings in SU01/SU3 u need to re-login to see the changes,for example the setting were like 1.23.456,78 and u changed to 1,23,456.89 then it will not reflected immediately.U need to log-off and log-in again to see the changes.
    Hope this helps.
    Thanks & Regards,
    Rock.

  • Problem Adding Calculations to Currency Formated Cells

    I have a cell that is formated in currency (USD in this case, i.e. $1,000) and I want to add a calculation to that cell. I double click on the cell with the $1,000, put the cursor at the begining of the cell (before the $) and push "=". A forumula rounded box with a X and √ appears. I type in "+500". Now what shows is "=$1,000+500". I push return and get a syntax error! I now have to go back and delete the comma and the $. Yuck.
    It's even worse, if you have a cell with $10 in it. Then the above process thinks it referencing row 10!
    Excel handles this issue seamlessly.
    Any ideas? Is this a bug?

    Numbers is not MS Excel, and MS Excel is not Numbers. Each application has features that are not supported by the other.
    Not a bug, although it does appear to be a not-well-thought-out feature.
    The issue is that once the $ is in the entry box, the whole "$1,000" is perceived (within that cell) as a text string. Any formula using one of the arithmetic operators will choke on text.
    The second use of the $ sign is as the absolute reference operator. If it preceded a number equal to or smaller than the largest row number on the table, the combination will be interpreted in a formula as an absolute reference to that row, or to the cell in that row in the same column as the formula; whichever better fits the reference in that formula.
    Either way, you're not going to get the result you want, and you are likely to get a syntax error message.
    OTOH, in a cell where the fixed number has been entered as the result of an equation (eg. =1000), formatting the cell as currency will change the displayed value, but not the value as it appears in the entry box. Neither the $ sign nor the thousands separator (,) will appear, you will be able to append "+500" (without the quotes) to the end of the formula, and you will get the expected result ( $1,500) displayed in the cell. And, as the formula itself contains NO $, the issue of 10 being recognized as a row reference will not arise.
    For my own use, I'd simply avoid the currency format except for summary cells. A column containing a list of numerical values (with two places after the decimal) is easily recognized as a list of currency amounts, even without to $ sign. The same list with the sign applied to every value is cluttered, and more difficult to read.
    Regards,
    Barry
    PS: If you want this feature changed in a future edition of Numbers, your best route is to Provide Numbers Feedback, using the menu item of that name in the Application menu (in Numbers, the "Numbers" menu). The link will also take you to the feedback page.

  • Problem with formatted search in grid

    Hi all,
              I have a Grid with 3 columns in my user defind form. In that Grid,I used one one formatted search on column 2 based on the value of column 1.
               I mean when i was press 'SHFT+F2' on second column, it will execute the query based on value of  what we entered in the first column of the grid. How can i do this?? How can i fetch the value of first column in the formatted search??. Please help me.
    Thanx in Advance
      Oram.

    Hi
    write a query like this and assign formatted search on column2
    SELECT  ITEMNAME FROM OITM T0 WHERE T0.ITEMCODE = $[/$GRIDUID.COL1 UID.ROWNUM])
    regards
    Vishnu

  • Problem in implementing formatted search

    Dear All,
    I am using the below code to implement formatted search for item master itemcode textbox. But i am unable to get the formatted search icon for the itemcode text box/ screen. Please correct me where I am going wrong.
    Dim oRs As SAPbobsCOM.Recordset
                                        oRs = oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.BoRecordset)
                                        Dim oQuery As SAPbobsCOM.UserQueries = oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oUserQueries)
                                        oQuery.Query = "SELECT T0.[ItemCode], T0.[ItemName] FROM OITM T0" 'Query
                                        oQuery.QueryCategory = -1
                                        oQuery.QueryDescription = "GetDfltBin"
                                        oQuery.Add()
                                        Dim oFormatted As SAPbobsCOM.FormattedSearches = oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oFormattedSearches)
                                        oFormatted.FormID = "150"
                                        oFormatted.ItemID = "5"
                                        oFormatted.Action = SAPbobsCOM.BoFormattedSearchActionEnum.bofsaQuery
                                        oFormatted.FieldID = "ItemCode"
                                        oFormatted.ColumnID = "-1"
                                        oRs.DoQuery("select IntrnalKey from OUQR(nolock) Where QName = 'GetDfltBin'")
                                        oFormatted.QueryID = oRs.Fields.Item("IntrnalKey").Value ''""
                                        oFormatted.Refresh = SAPbobsCOM.BoYesNoEnum.tYES
                                        oFormatted.ForceRefresh = SAPbobsCOM.BoYesNoEnum.tYES
                                        oFormatted.ByField = SAPbobsCOM.BoYesNoEnum.tYES
    Regards,
    Noor hussain
    Edited by: noor_023 on Mar 30, 2010 12:51 PM

    Dear J,
    Thanx for your post. I am gettig this error now.  "The entry already exists in the following tales odbc-2035". I am writing the above code in the page load event of item master form as below.
    If ((pVal.FormType = 150 And pVal.EventType <> SAPbouiCOM.BoEventTypes.et_FORM_UNLOAD) And (pVal.Before_Action = True)) Then
                    '// get the event sending form
                    oForm = oSboApplication.Forms.GetFormByTypeAndCount(pVal.FormType, pVal.FormTypeCount)
                    If ((pVal.EventType = SAPbouiCOM.BoEventTypes.et_FORM_LOAD) And (pVal.Before_Action = True)) Then
                        Dim oRs As SAPbobsCOM.Recordset
                        oRs = oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.BoRecordset)
                        Dim oQuery As SAPbobsCOM.UserQueries = oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oUserQueries)
                        oQuery.Query = "SELECT T0.[ItemCode], T0.[ItemName] FROM OITM T0" 'Query
                        oQuery.QueryCategory = -1
                        oQuery.QueryDescription = "GetDfltBin1"
                        oQuery.Add()
                        Dim oFormatted As SAPbobsCOM.FormattedSearches = oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oFormattedSearches)
                        oFormatted.FormID = "150"
                        oFormatted.ItemID = "5"
                        oFormatted.Action = SAPbobsCOM.BoFormattedSearchActionEnum.bofsaQuery  'bofsaQuery  'bofsaQuery
                        oFormatted.FieldID = "5" 'ItemCode
                        oFormatted.ColumnID = "-1"
                        oRs.DoQuery("select IntrnalKey from OUQR(nolock) Where QName = 'GetDfltBin1'")
                        oFormatted.QueryID = oRs.Fields.Item("IntrnalKey").Value ''"" ' oRs.GetField
                        oFormatted.Refresh = SAPbobsCOM.BoYesNoEnum.tYES
                        oFormatted.ForceRefresh = SAPbobsCOM.BoYesNoEnum.tYES
                        oFormatted.ByField = SAPbobsCOM.BoYesNoEnum.tYES
                        oFormatted.Add()
                        If oFormatted.Add() Then ' 0 Then
                            MsgBox(oCompany.GetLastErrorDescription)
                        End If
                    End If
                End If

Maybe you are looking for