Formatted Search - Using field index to refer to UDF in many documents

I have some UDFs in my marketing documents - say U_VALUE
I want to write a fairly complicated formatted search and use it for the same thing across all my marketing documents.
I don't want to use
$[ORDR.U_VALUE]
in my formatted search as this will only work in the sales order document.
I want to use something like
$[$4.0.0]
which brings back the cardcode independant of the form we are looking at. However
$[$U_VALUE.0.0]
will not work!
Hoping someone can help!
Edited by: Daniel Abbatt on Apr 10, 2008 6:16 PM

Yes you would have to have a UDF called VALUE on the marketing document for this example to run and even then it will error!
That's the point, the code above will not work, SBO only seems to be able to know about ORDR in a sales order and OINV in an invoice. So if I am in a sales order, it errors on the reference to OINV, even though the code that uses the
$[OINV.U_VALUE]
is never actually accessed by the SQL. I guess this is because SBO does the substitutions before it executes the code.
All I am basically trying to do is create a generic formatted search that will perform an action using the value of a UDF, say some formatting, the problem is I want it to work with any marketing document.
The only way I can find to access a UDF though is by having to use the
$[TABLE.U_FIELDNAME]
way, which seems to mean by definition I can only create a formatted search to access a header UDF for a single type of document. I cannot create a generic formatted search, that reverses the string for example, and use that formatted search across all marketing documents.
I know you can access normal fields also by their item reference, i.e.
$[$4.0.0]
, but this syntax does not seem to work with UDF, even though the system information shows the item reference as U_VALUE, I cannot use the
$[$U_VALUE.0.0]
which would be ideal...
Edited by: Daniel Abbatt on Apr 14, 2008 12:05 PM

Similar Messages

  • Formatted Search using SUM

    I have a user defined field called U_PRPrice which I want to be a Formatted search populated by the result of another udf U_SPrice divided by 12 and multiplied by a udf U_PRMNTH
    I can get the formatted search to fire by using
    SELECT SUM (T0.[U_SPrice]/12 *T0.[U_PRMNTH]) FROM OINS T0
    however I am struggling to pass through the dynamic values from the active record card using the $[$OINS.U_SPrice] parameter
    Can anyone point me in the right direction before I throw myself out of the window!
    Thanks

    Try this one:
    SELECT 12*$[OINS.U_SPrice\]/$[OINS.U_PRMNTH\]
    Thanks,
    Gordon

  • Extra Formatted Search per field?

    Hi Experts,
    Currently we have a formatted search on Sales Orders which runs if you press SHIFT+F2 when in the item code field (or press the magnifying glass).
    It shows us the most recent items that the customer has purchased.
    Is it possible to add another formatted search to that field which will run if we use a different shortcut (i.e. SHIFT+F3)?
    Thanks
    Greig

    Hi Greig,
    A nice feature from you post.  However, one UDF can only assigned one FMS for current B1 design.  You probably need to create another UDF if you have another logic.
    Thanks,
    Gordon

  • FORMATTED SEARCH USING SCREEN ENTRIES

    Hi ,
        i want use formatted search to do the following without using variable entry ( without the define survey variables window opening when i execute the query):
    Example: When you enter a purchase order, the item search should propose only those items where the vendor entered in the Default Vendor field of the master record is the same as the vendor specified in the Vendor field of the purchase order.
    i found the following explaination in the SAP B1 training material which is not all clear enough.
    "To do this, you define a query that contains the Vendor field from the purchase order as the condition for the Default Vendor field. You then define this query as a formatted search for the Item no. field in the purchase order entry screen. "
    i wrote a query which pretty much does what i want but , after i enter the vendor code in the purchase order header data  and go to the item field and press shift+F2, instead of just proposing only those items which the  above vendor  sells , a "define survey variables"  window opens and i will have to again choose the same vendor i just choose in the "vendor field in the header data" of the purchase order.
        can anyone plz help me out with this ???

    Hi adrian,
                 thank for ur reply, and plz pardon me for my ignorance..
             i tried using the query u gave me in a query generator and the wizard, but i am getting a couple of syntax errors..and not only the query u gave but any query i have used from this forum ... so i was wondering if i am doing anything wrong..so i ll explain to you how i used your your query so may be u can tell me where i am going wrong..
    i went to the query generator selected the table OITM  and choose the item code and description from that table for the SELECT field and then put the cursor on the WHERE field and typed the condition in the query you gave me for the WHERE field .. and then executed it.. didnt work ..
    Then in the result window of the query generator(and wizard) i went to the write mode of the SOL statments field  and copied and pasted the query you sent me... and then executed it... still doesnt work... and like i said this happens to all the queries i find here in the forum ..  
    can u help??

  • Creating formatted search using DI API

    Dear All,
    Please let me know if we can implement/create formatted search on a UDF textbox using DI API. Is it possible to create formatted search through code using DI API ?
    Regards,
    Noor Hussain

    Yes, it is possible. Look for the FormattedSearches object in SDK.

  • 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 help

    Hi Suresh
    Check the below document
    How to SET a UDF field as Mandatory Does TNSP required for It?
    With Regards
    Balaji Sampath

  • Formatted Search icon is not displaying for the UDF

    I have fifteen UDF's in the Marketing document and I have applied formatted search on each of the fifteen.
    But for one paticular UDF formatted search icon is not displaying even though the formatted search is active on the field but it is working fine for other field of same kind in same scenario.
    Please help me.
    Regards,
    Awadhesh
    Edited by: Awadhesh Kumar Pandey on Feb 9, 2009 5:58 PM

    Hi
    Try this
    Go to View in the menu bar  > Indicator Display >User Defined Values .
    Hope this will resolve your issue
    Thank you
    Bishal

  • Formatted search using IF ELSE

    Hello.
    Im trying to do a search with two parameters. If the first one is not empty, do the first search, else do the other search. I get an error. Something about having to select from a table... Anyone?
    IF ('[%0]' != '')
    BEGIN
                              SELECT     T0.ShortName, T0.Debit, T0.Ref1, T0.Ref2
                               FROM         JDT1 T0
                               WHERE     T0.Debit > '0' AND (T0.Ref1 = '[%0]')
    END
    ELSE
    BEGIN
                              SELECT     T0.ShortName, T0.Debit, T0.Ref1, T0.Ref2
                              FROM         JDT1 T0
                              WHERE     T0.Debit > '0' AND (T0.Ref2 = '[%1]')
    END

    Hi Magnus,
    I have had the same problem previously and the only way I could solve it was by declaring variables to save the values in.  I have changed your query and tested it. I know this might look like an overkill, but please let me know if you find an easier solution!
    DECLARE @Ref1 Varchar(11)
    SELECT @Ref1 = T0.Ref1 FROM JDT1 T0 WHERE T0.Ref1 = '[%0]'
    DECLARE @Ref2 Varchar(11)
    SELECT @Ref2 = T0.Ref2 FROM JDT1 T0 WHERE T0.Ref2 = '[%1]'
    IF (@Ref1 != '')
    BEGIN
      SELECT T0.ShortName, T0.Debit, T0.Ref1, T0.Ref2
      FROM JDT1 T0
      WHERE T0.Debit > '0' AND (T0.Ref1 = @Ref1)
    END
    ELSE
    BEGIN
      SELECT T0.ShortName, T0.Debit, T0.Ref1, T0.Ref2
      FROM JDT1 T0
      WHERE T0.Debit > '0' AND (T0.Ref2 = @Ref2)
    END
    Hope it helps,
    Adele

  • 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

  • Formatted Search on Service Call

    Dear All,
    Im trying to write a formatted search on the Service call screen to retrieve the email address of a queue. The queue is in the general tab of the Service call. You can add user defined fields for the service call-title, service call -solutions, service call- activities etc.
    I have added the userdefined field on the service call-title.
    My formatted searches can access all the other header details on the service call but I cannot get the queue data in the general tab.
    Kindly assist,
    Thanks,
    Indraj.

    HI Indraj,
    On the user defined fields area if you want to use the formatted search, use must have to use the table and field names inside. (also if you have any field which not represented by variables eq: hidden fields):
    $[TABLE_NAME.FIELD_NAME]
    if you use normal fields area, and you have the variable on the form:
    $[$ITEMUID.COLUID.TYPE]
    where Type is:
    0 for gerenal
    NUMBER for numbers,
    etc.
    So Your solution is:
    SELECT T1.[email] FROM OSCL T0  INNER JOIN OQUE T1 ON T0.Queue = T1.queueID WHERE
    T0.[callID] =$[OSCL.callID]
    Regards,
    J.

  • Formatted Search not saving in database

    Dear All,
    I have created a formatted search to get the TAX Amount, and i'm using that field in Printing of invoices. After adding the document if i go back and check the user defined field value is being displayed but it won't be stored in the database as i check the print preview it shows there is no value. but the value will be displaying on that user defined field, After i select that field and click of shift F2 again and then click on Update then only it stores in the database.
    For the Formatted search i have given the condition as refresh regularly on document number.
    kindly help on this.
    Thank you in advance.
    Regards,
    Shreyas

    Hi Shreyas,
    Your FMS Query is Correct but your Auto Refresh is wrong.
    ->> put the Auto Refresh of Display Saved Values on BP Code or Remarks.
    Regards,
    Madhan.

  • 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

  • Read item code from Sales Order with formatted search

    hi,
    i'm tring to read tha values of the item or items of a sales order (before save it) with a formatted search.
    i have no problem to read the value of card code or cardname but i can't read the item's value.
    i tried with this [code]Select $[RDR1.ItemCode][/code]  (i found it on the forum) but it doesn't work.
    somebody can help me ?
    thank you

    Hi, Alessandro!
    I think the trouble is that you are trying to assign a FS to the header of the document. You are getting the information of the current row, so you have to bind a formatted search to some column of the "table - part" of the document.
    And also you can try:
    SELECT $[$38.1]
    38 - the value of "Item" (when you point a mouse to the cell, information you want from)
    1 - the value of "Column" (the same...)
    It will get an info of this cell in a current row.
    HTH!

  • Can downloaded oracle9i Enterprise Edition use Bitmap index?

    Hello there,
    I have a downloaded Oracle9i Enterprise Edition. After I create some bitmap index on a partitioned table, I use the following sql statement to check the bitmap index:
    select index_name, index_type, status from user_index;
    It tells me that all the statuses of the bitmap indexes are "N/A" (Not availabe). Does that mean I can NOT use bitmap index in this downloaded Enterprise version?
    If I must use bitmap indexes, what should I do?
    Many thanks in advance!
    -wendy

    are you creating a local index on the partitioned table?

  • SQL Query -How2bring multiple results into one field using Formatted Search

    Hi Everyone
    i am trying to bring in the results of the field dbo.Lot_ITEM.LOT using a formatted search into a row level using the following query:
    SELECT     dbo.LOT_ITEM.LOT
    FROM       dbo.DLN1 INNER JOIN dbo.LOT_ITEM ON dbo.DLN1.ItemCode = dbo.LOT_ITEM.ITEM
    WHERE     dbo.LOT_ITEM.ITEM=$[DLN1.ItemCode]
    however the result of the dbo.Lot_ITEM.LOT field could be more then one value depending on how many lots are assigned for that item
    (for example this query would be similar to assigning batch/serial numbers to an item being despatched - as you can choose multiple batches/serials depending on the quantities available and required and then move from the left to the right side of the selection window) if that makes sense!
    is it possible to bring in the multiple results into one field? and how can i amend the above query to include this?
    Thankyou in advance :o)
    Edited by: Asma Bi on Apr 23, 2008 7:22 PM
    Edited by: Asma Bi on Apr 23, 2008 7:24 PM

    Hi Suda
    Thanks for replying :o) but im not sure about the query?
    just to simplify it (as the query im working with is to do with 3rd party addons) i have used the serial/batchs field instead and used standard demo database fields from SBO 2005 sp01:
    SELECT     dbo.ixvSerialNoFact.SRI1_IntrSerial
    FROM       dbo.DLN1 INNER JOIN
                    dbo.ixvSerialNoFact ON dbo.DLN1.DocEntry = dbo.ixvSerialNoFact.SRI1_BaseEntry
    WHERE     dbo.ixvSerialNoFact.ItemCode='g1000' and dbo.ixvSerialNoFact.SRI1_BaseEntry = '193'
    The above brings me the relevant results but when i change it to be used in a formatted search:
    SELECT     dbo.ixvSerialNoFact.SRI1_IntrSerial
    FROM       dbo.DLN1 INNER JOIN
                    dbo.ixvSerialNoFact ON dbo.DLN1.DocEntry = dbo.ixvSerialNoFact.SRI1_BaseEntry
    WHERE     dbo.ixvSerialNoFact.ItemCode=$[dln1.itemcode] and dbo.ixvSerialNoFact.SRI1_BaseEntry = $[dln1.DocEntry]
    i cant seem to get it to work - now this may be because the serial number is not allocated until teh record is added to the system, however when this happens i am unable to go back in and manually trigger the query as the delivery note rows cannot be selected!
    i  think as what im originally wanting an answer for is same as this example, im wanting to know if this is even possible?
    Thanks
    Edited by: Asma Bi on Apr 24, 2008 3:53 PM
    Edited by: Asma Bi on Apr 24, 2008 3:55 PM

Maybe you are looking for

  • File size difference between DNG Converter and Lightroom Beta 4

    Hi, I want to go the all-DNG route and am trying several things ATM. I want my files to be as small as possible, thus I disable previews and RAW embedding and enable compression in DNG Converter. In Lightroom, there are no options at all. What I do g

  • Customization Wizard X - Uninstall Acrobat (Reader) X?

    The Adobe Customization Wizard X has the option when generating msts for 'Removing Previous Versions of Acrobat' and 'Removing previous versions of Reader'.  Is there any way of having it remove version 10 installations as well? For example, when gen

  • Anyone FINALLY see an improvement in Airport reception with Mac OSX 10.5.7

    Well as you know, it ain't no secret that airport is krap when it comes to MBP's and wireless. Anyone FINALLY see an improvement with 10.5.7? I just updated and besides the revolving blue screen of death (yes, the loop that's running rampid here http

  • Pass URL Variables

    Hello - Thanks for Spry! I'm running into a problem that probably exists because I've cribbed a bunch of code from your demos that I don't fully understand. I have a set of photo galleries, which I've set up like the demo. A test link is here: http:/

  • Alarming and Event Data Storage Locations

    I'm having a problem where the Alarms and Events files are filling up the system disk and causing Lookout to crash.  Is there any way I can set things up so that those files are stored on another disk?  I already have the Historical files being archi