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

Similar Messages

  • Formatted Search working Partially on SDK Field

    I have a text field on the Service call screen called
    "A"
    I need the field to be updated with a value taken from the Item Master table, U_A field.
    I have created my query as below,
    SELECT I.U_A FROM OITM I
    WHERE I.ItemCode = $[$33.0.0]
    and set a formatted search on the field A in the Service Call screen to refresh regularly when the Item No field changes.
    The Formatted search does NOT fire when the item number changes.
    It fires only when I do Shft + F2
    HOWEVER if I try the formatted search on a system field on the same screen such as the Description field, then the Item Number Change fires the formatted search.
    Does anyone know of this resriction, or a workaround please?
    appreciate your help.
    Thanks,
    Indika

    Hi Felipe,
    The problem happens when I use the formatted query on a text field I created using the SDK only. It works on any other SAP field.
    as I mentioned, if I press Shift + F2 then it works regardless.
    I tried this on the Item Master screen too with the same result. of course I changed the query to $[$5.0.0].
    Threrefore I don't think it has anything to do with the query syntax , rather the SDK field.
    in any case here is the code (vb6) I used on the Item Master
    Private Function temp(ByRef pval As SAPbouiCOM.ItemEvent) As Boolean
        Dim oItm As SAPbouiCOM.Item
        Dim oForm As SAPbouiCOM.Form
        Dim oRelateItm As SAPbouiCOM.Item
        Dim iRelateItmHt As Integer
        Dim oEdtBox As SAPbouiCOM.EditText
        Set oForm = mObjSBOApplication.Forms(pval.FormUID)
        With oForm
            '---text
            Set oItm = .Items.add("maxGstT", it_EDIT)
            Set oRelateItm = .Items("76") 'closed on date edit box
            oItm.Left = oRelateItm.Left
            oItm.Width = oRelateItm.Width
            oItm.Top = mObjSBOApplication.Forms(pval.FormUID).Items("36").Top   'item group top
            oForm.DataSources.UserDataSources.add "dsmaxGstT", dt_SHORT_TEXT
            Set oEdtBox = oItm.Specific
            oEdtBox.DataBind.SetBound True, "", "dsmaxGstT"
        End With ' With oForm
    End Function
    Message was edited by: Indika Dekumpitiya (spelling)

  • Formatted Search disapear information when uptade to SAP v8.8

    Hi, my dear experts:
    This time have a question a bout my DB that was update from 2007 to V8.80.235 pl 17 before the update all formatted search work with out any problem, uncluding on this new version but in some record (in production orden) several fields disapear the information, when remove the formatted search the information without any problem appears again.
    Some body know what need to do, I appreciate you help.
    Regards
    Ricardo Castro

    Gordon this is one of formatted seach asigned.
    if ($[owor.status] = 'P')
    SELECT T0.[Quantity] FROM ITT1 T0 WHERE T0.[Father] = $[owor.itemcode] and t0.code = $[wor1.itemcode] and T0.[ChildNum]  = ISNULL($[$37.15.number]-1, 0)
    else
    Thanks

  • Format search with operation (+ - * /)

    HI people, i have this format search working perfectly:
    SELECT DISTINCT
    CASE WHEN (T3.ITEMCODE= $[$38.1.0] AND T3.PRICE > $[$38.14.number] AND $[$38.14.number]>0)
    THEN '1'
    ELSE '0'
    END
    FROM OCRD T1
    INNER JOIN ITM1 T3
    ON T1.LISTNUM = T3.PRICELIST AND T3.ITEMCODE=$[$38.1.0]
    WHERE T1.CARDCODE= $[$4.0.0]
    But i need sum a % in $38.14, so i did the next:
    SELECT DISTINCT
    CASE WHEN (T3.ITEMCODE= $[$38.1.0] AND T3.PRICE > ($[$38.14.number]*1.20) AND $[$38.14.number]>0)
    THEN '1'
    ELSE '0'
    END
    FROM OCRD T1
    INNER JOIN ITM1 T3
    ON T1.LISTNUM = T3.PRICELIST AND T3.ITEMCODE=$[$38.1.0]
    WHERE T1.CARDCODE= $[$4.0.0]
    But this not work......how can i sum a % ???

    Ok, works with this:
    SELECT DISTINCT
    CASE WHEN (T3.ITEMCODE= $[$38.1.0] AND T3.PRICE > ($[$38.14.number]/(0.80)) AND $[$38.14.number]>0)
    THEN '1'
    ELSE '0'
    END
    FROM OCRD T1
    INNER JOIN ITM1 T3
    ON T1.LISTNUM = T3.PRICELIST AND T3.ITEMCODE=$[$38.1.0]
    WHERE T1.CARDCODE= $[$4.0.0]
    My problem was that no quit FS from field, i meaning i must quit and the put again the FS to take the changes.

  • Problem with formatted search on UDO Form

    Hi,
    I've created an UDO and in the lines I have the fields ItemCode and ItemName. In the ItemName field I have a formatted search configured the next way:
           -Search by Saved Query
               -QueryName
           -Auto refresh when existing altered column
               -ItemCode
           -Refresh regularly
    This formatted search works fine when I do <shift> + F2 in the field. But when I change the field ItemCode and get out of the field it doesn't execute the formatted search.
    Any ideas?
    Thanks in advance, regards
    Vanesa

    Hi Vanessa,
    Firstly (and I'm not giving lessons on sucking eggs) does this work when run as a query with the $ field replaced with a litteral value that you know exists in the table you're searching (surrounded by single quotes)?
    The reason I say this is that I have had a few where as opposed to giving an error I've been hitting shift+f2 with absolutely NO feedback via error messages.
    Which form is this within? How have you used the variable element in the query?
    Is it possible for you to show the query? Along with details on which form you're using it in?
    Hopefully be able to help with more info,
    Julian

  • Formatted search on UDF, DIAPI issue

    Hi,
    I have a formatted search on a UDF in the DETAIL of a SALES ORDER
    When I try to set a value on this UDF, the DI API doesn't give any error but the UDF doesn't get the new value.
    but all other UDF works except this one which have a formatted search on it in SAP
    Is there something I don't know ?

    Hi,
    My goal is not to make the formatted search working in DI API, as I said, I'm just trying to set a value in the UDF and because there's a FORMATTED SEARCH on this udf, it keeps the default value instead of the value I'm setting by the DI API
    And yet, I have other UDF that have formatted search, and I'm able to set a value on the UDF anyway.
    What I see different is that this UDF is numeric and the others aren't
    I just don't understand why the DI API reports no error and yet the value I put in it isn't taken but only the formatted search default value for a numeric UDF  Is this a known bug in SAP ?

  • Formatted search on grids

    Formatted search on grids does not work.
    I defined formatted search query
             SELECT $[$MYGRID.QTY.0]
    and link it to field DESCRIPTION on the grid.
    I was hoping to get QTY value copied to DESCRIPTION when press SHIFT-F2. but nothing happened.
    Does Formatted Search working on grids? is any work around?
    Thanks a lot
    Fred

    Fred,
    Please have a look at this SAP Note as it pertains to issues with Formatted Searches on grids.  If this issue pertains to you, you will need to download patch level 18 from SAP Business One 2005A SP01 from the SAP PartnerEdge Portal.
    SAP Note# 1005565
    HTH,
    Eddy

  • Formatted Search for Delivery Date field in SO not working

    Hi All
    Can anyone help me as to why my formatted search is not working?
    I am currently using SAP B1A SP01 Patch 19.
    I have created a user query as follows:
    SELECT $ [$10.0.DATE] + 5
    When I add this to the delivery field within the Sales Order and bring through the saved query which I set to auto refresh when the Posting Date field changes and to Display Saved Values it doesn't work.
    Any ideas?
    Thanks and best wishes
    Gail

    HI Gail,
    If I am not mistaken you want to add days to the posting date...if that is so then try this out:
    SELECT $[ORDR.DocDate.DATE]+5 From ORDR T0 For Browse
    Set The indicator to Auto Refresh when the fields change
    Nagesh

  • Auto-refresh formatted search is not working properly...

    I have created a User Defined Field in Item Master named: FLD1 (Alphanumeric 30)
    Then I have created a User Defined Field in Marketing Documents Row: FLD1 (Alphanumeric 30)
    Now I want as follows u2013
    In Marketing Documents if I select any Item, the value saved in FLD1 in the Item Master will come automatically in the Field FLD1 of the Marketing Document.
    I did as follows u2013
    I have created a formatted search for the above marketing document (in Sales Quotation) for the field FLD1 as follows u2013
    Option: Search in Existing User-Defined Values according to Saved Query
    Query: GetItemFLD1 (SELECT $[OITM.U_FLD1] )
    Option: Auto Refresh  -
    When Exiting Altered Column
    Field: Item Description
    Option: Display Saved User-Defined Values
    But the above is not working automatically --- after saving the document if I click on the Formatted Search Marker then the value comes otherwise not.
    Can any one please explain the reason behind?
    for SAP B1 2007 B SP0 PL7
    Edited by: Narottam Das on May 5, 2009 1:53 PM

    Check this thread for explanation of Syntax of FMS:
    [Refer to Sales Order From Payment Means;
    Refer Suda Sampath  reply that explains clearly

  • Formatted Searches Not Working on a PC

    Dear Experts,
    I have a case where formatted searches for one particular computer are not working at all. All the connected computers are working as required with all the formatted searches.
    What PC requirment is need to facilitate FMS functionality ?

    Dear MARTIN,
    there Are two types of FMS Are used in the SAP B1.
    Dynamic Value :- Select  $[$20.24.number]
    In this Example 20 is the matrix Id 24 is the Col Id And Number show the type of the Value
    Static Value After Save the Document :
    Select $[Odln.Docnum]
    You can Also Call the Store procedure in the  SAP b1
    Thanks
    Dhiraj

  • Search works differently and "wrong" in Solaris environment

    I have my test and development databases in Windows and Solaris environements with exactly same database version and configurations.
    I have created an intermedia index on following table as follows:
    SQL>desc cc_job_offer_search_text
    Name Null? Type
    JOB_OFFER_ID NOT NULL NUMBER(38)
    JOB_OFFER_SEARCH_TEXT NOT NULL LONG
    TEXT_TYPE VARCHAR2(6)
    Version for the database running in Solaris:
    SQL> select * from v$version;
    BANNER
    Oracle8i Enterprise Edition Release 8.1.7.0.0 - Production
    PL/SQL Release 8.1.7.0.0 - Production
    CORE 8.1.7.0.0 Production
    TNS for Solaris: Version 8.1.7.0.0 - Production
    NLSRTL Version 3.4.1.0.0 - Production
    Version for the database running in Windows:
    SQL> select * from v$version;
    BANNER
    Oracle8i Enterprise Edition Release 8.1.7.0.0 - Production
    PL/SQL Release 8.1.7.0.0 - Production
    CORE 8.1.7.0.0 Production
    TNS for 32-bit Windows: Version 8.1.7.0.0 - Production
    NLSRTL Version 3.4.1.0.0 - Production
    Index Creation scripts:
    exec ctx_ddl.drop_preference('cica_lexer');
    begin
    ctx_ddl.create_preference('cica_lexer','BASIC_LEXER');
    ctx_ddl.set_attribute('cica_lexer','printjoins','$_#@*&^%/\()');
    ctx_ddl.set_attribute('cica_lexer', 'skipjoins', '-');
    end;
    create index JOB_OFFER_SEARCH_TEXT_IDX on
    cc_JOB_OFFER_SEARCH_TEXT(JOB_OFFER_SEARCH_TEXT)
    indextype is ctxsys.context
    PARAMETERS('FILTER CTXSYS.INSO_FILTER format column text_type lexer cica_lexer' );
    After index has been created, my search works fine in Windows environment, however it behaves irratically in Solaris environment (where data has been exported from the database on Windows environment, and I have checked that the data is identical).
    Database Running in Windows:
    SQL> select count(*) from cc_job_offer_search_text;
    COUNT(*)
    1200
    SQL> select count(*) from cc_job_offer_search_text
    2 where contains(job_offer_search_text,'Permanent')>0;
    COUNT(*)
    1094
    Database Running in Solaris:
    SQL> select count(*) from cc_job_offer_search_text;
    COUNT(*)
    1200
    SQL> select count(*) from cc_job_offer_search_text
    2 where contains(job_offer_search_text,'Permanent')>0;
    COUNT(*)
    1200
    ====> In fact it returned all records, which is not correct!
    However, there are certain queries which are working fine in both environments.
    Database Running in Windows:
    SQL> select count(*) from cc_job_offer_search_text
    2 where contains(job_offer_search_text,'Contractual')>0;
    COUNT(*)
    52
    SQL> select count(*) from cc_job_offer_search_text
    2 where contains(job_offer_search_text,'{Greater than $150,000}')>0;
    COUNT(*)
    20
    Database Running in Solaris:
    SQL> select count(*) from cc_job_offer_search_text
    2 where contains(job_offer_search_text,'Contractual')>0;
    COUNT(*)
    52
    SQL> select count(*) from cc_job_offer_search_text
    2 where contains(job_offer_search_text,'{Greater than $150,000}')>0;
    COUNT(*)
    20
    Any idea why it is behaving "irratically" in the database running in the Solaris environment, when I select certain search criteria wheras it works absolutely fine at times?

    If you really need to run 8.1.7, you need to upgrade to the latest patchset. I seem to recall a problem like this which was fixed in something like 8.1.7.4. Better still, go to 10g.

  • Is it possible to fetch matrix column through formatted search in UDF?

    HI,
    Is it possible to fetch the value of first row of quantity column in user defined field through formatted search?
    SELECT $[$38.11.number]
      does work but in user defined column of matrix only. I have requirement that when there will be only one row in matrix, the quantity should be accessible in user defined field. and for this, the above query gives internal error.
    thanks and regards,
    Binita

    David,
    I used the query sent by you and further facing following problem. may be my filtering is on wrong parameter.
    SELECT $[rdr1.quantity] * $[ordr.u_qty1.number] from ordr o, rdr1 r where o.cardcode= $[ordr.cardcode] and r.itemcode = $[rdr1.itemcode]
    this query gives correct result when assigning to matrix column.
    when I applied the same query to user defined field, then after selecting the row as suggested by you, it does give value but, in this case, it takes it from rdr1 instead of from matrix.
    for example, I have selected item A001 in matrix. if that item is already there in rdr1, then it fetches its quantity from table instead of that provided by me in matrix's quantity column
    Please guide further,
    thanks in advance,
    Binita
    Edited by: Binita  Joshi on Jun 5, 2008 2:45 PM
    even
    SELECT $[$38.11.number] * $[ordr.u_qty1.number] from ordr o, rdr1 r where o.cardcode= $[ordr.cardcode] and r.itemcode = $[$38.1.0]
    is not working. no clues.

  • Formatted search in Title to know BaseRef

    Dear All,
    I have an udf in the Title of delivery Note. My requirement is that I should get the base reference of it in this udf. Means the Sales Order No. I am trying to do it through automatic formatted search but its not happeing.
    I am using the following query as
    SELECT T1.[DocNum]  FROM DLN1 T0 , ORDR T1 WHERE T1.[DocNum] = $[DLN1.baseref]
    What might be wrong in the above one. Kindly advise.
    Regards,
    Kamlesh

    Dear Prasanna,
    Your formatted search is working perfectly when I am using COPY FROM funtion from Delivery to Sales Order. But when I am doing from Sales Order as COPY TO Delivery then the formatted search field in the delivery is not getting populated.
    I have also made the approval as per my requirement but the problem is that if the user does the Sales Order and uses copy to Delivery then approval is not checking due to non populated of the udf field but when doing Delivery and using Copy from then as the udf is having the base ref nomber hence its working fine.
    Please let me know how can I make it possible that if from Sales Order copy to is done to delivery then the udf would get the base ref number.
    Thanks for giving your inputs and would appreciate if you kindly get me out of it.
    Regards,
    Kamlesh

  • 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

  • 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

Maybe you are looking for

  • How to log "send failed" to a file instead of showing a pop-up message

    Hi, I am working with Flex 4.1 on Linux but I suppose this problem must be common to all versions of Flex. I am working on a Flex client front-end which connects to a Java back-end (in Tomcat) via BlazeDS. All of this works OK 99.9% of the time. Howe

  • Address Book entries on the Computer

    Help - I want to add all of my contacts on the computer and I do not know how and can not find that info in the book. Thanks, GW

  • Trouble with linking buttons within an mso, to another mso.

    Im trying to set up buttons nested in an mso to link to a graphic within another mso. I cant seem to find a work around.. has anyone encountered this problem/ have a work around? Thanks -LK

  • BIC2G-BI-LINUX 2009 32 or 64 bit?

    I've installed BIC2g Linux image successfully and opened it using VMWare. I've installed it on Windows Server 2008 R2 64 bit and I have 8GB RAM installed. I have installed VMWare player 64 bit version and it shows 8GB RAM as memory in the "About" sec

  • Tecnologia Oracle

    Hola Despues de mucho pelear con su software no puedo reprimirme para escribir este mensaje Definitivamente creo que su base de datos es un dinosaurio en extincion Estoy intentando desde hace 3 dias instalar un oracle para migrar desde SQL server una