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)

Similar Messages

  • 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

  • Query - Formatted Search in a User Defined Field

    Hi,
    I am having some problems with a very simple query but it doesn't seem to work. I insert this formatted search in to my UDF I made called Cost. The query I am using is:
    SELECT  $[$34.0.0] - (I had to use variable number because this Unit Price field in the Item master data does not have a field name associated)
    It is supposed to grab the unit price from the screen, however it is always displaying zero when I query it, and when I put it in the UDF as a formatted search, it give me the internal error.
    I would greatly appreciate your help.
    Thanks

    Question 1: Where is this Cost UDF defined.  Is it at the Marketing document Header or row level?
    NOTE:
    The field reference for the Unit Price column is incorrect.  When you mouse over the Unit Price column you should see the values for Item=xx  Colunm=xx
    The syntax is $\[$Item.Column.Type].  Therefore for your case it should be $\[$38.14.Number]
    The type prefix can be 0 if you are accessing a Alphanumeric column.
    If you user field is at the Header level the Formatted Search Query might not work unless you highlight that whole row and then click on the header level UDF and press Shift+F2
    How have you set the refresh options?

  • Formatted Search - Purchase Order Lines, Price Field

    Hello Experts,
    I have wrote this formatted search for Purchase Order Lines, Price Field
    The problem is that i gets 0...
    What is wrong in it?....
    select
    case
    when T2.[ItemCode] Like N'u05D7u05DC%%' AND U_Thickness >= 1 AND U_Thickness <=3 then U_Contour*2.17
    end
    FROM OITM T0
    INNER JOIN ITM1 T1 ON T0.ItemCode = T1.ItemCode
    INNER JOIN POR1 T2 ON T0.ItemCode = T2.ItemCode
    WHERE T2.itemcode = $[$38.1.0[
    Thank You,
    Meital

    Hi.....
    Try this
    select
    case
    when T2.[ItemCode] Like N'u05D7u05DC%%' AND U_Thickness >= 1 AND U_Thickness <=3 then U_Contour*2.17
    end
    FROM OITM T0
    INNER JOIN ITM1 T1 ON T0.ItemCode = T1.ItemCode
    INNER JOIN POR1 T2 ON T0.ItemCode = T2.ItemCode
    WHERE T2.itemcode = $[$38.1.0]
    Regards,
    Rahul

  • Formatted search on a 'check box' field

    Hi,
    I want to set the 'allow partial delivery' to an 'N' automatically. It comes up as checked when a new BP is created and I have not found anything in the setup that will change this. When I try to select this field to assign an FMS to it, it won't let me. Any suggestions?
    Thanks

    Art,
    You could not assign a FMS to a check box.  I would suggest that you create a template BP Account and make the settings you need and everytime you create a new BP use the template BP Account and Click DATA > Duplicate and this way you need not change the settings each time.
    Suda

  • 2 Formatted Searches on the same field

    Good Evening
    Experts:
    I thought maybe one of you might have come across a similar need to what I have to do and could help out.  I have a screen that uses Whse id as the unique identifier for each record. I have a Formatted search on the Whse id in my screen that displays the Whse Code and Name from the OWHS table.  This is good for adding records so the User can see which ones are valid in the table OWHS. However, when I switch to Find mode,  I would like the User to see a list of records for my screen by Whse Id. 
    So, the Add needs to see all the valid Warehouses(OWHS) and the Find needs to see all records in my screen table that have been entered. 
    Do you have any suggestions how I can achieve this?
    Thanks,
    Ed

    Thanks for responding Owen...
    After re-reading my question here this morning, it appears I was not very clear in my explaining what I need to do here. 
    Table OHWS has the following records:
    Whse     Name
    01          Location 1
    02          Location 2
    03          Location 3
    04          Location 4
    I have a custom screen with a field called Whse id...it is the unique identifier for the table records in a table called "Test".
    I started with the Add on my custom screen and put a formatted search on the Whse id field(Select Whse, Name from OWHS).  This is great for the User when doing an Add so they can see all the possible Whse to pick from. 
    So, the User adds a few records to the "Test" table and they might look like:
    Whse     Item     Buyer
    01          X          Joe
    04          Z          Bob
    Now, when in Find mode for that Whse id field on my custom screen, I want the Formatted search to display the Whse's in my "Test" table that have been used  already.  So, the Formatted search would display 01 and 04 instead 01,02,03 and 04 like it would for the Add.
    Thanks,
    EJD

  • Formatted Search totaling several fields on unsaved form

    Hello Experts! I am trying to create a formatted search to total several UDF's, at the row level of a quote, without first having to save the record. HELP. I have tried everything except the correct syntax.
    $[38.U_COSTPLUS.1] * $[38.Quantity.1]     And I tried
    $[QUT1.U_COSTPLUS] * $[QUT1.Quantity]     And I tried
    $[$149.38.U_COSTPLUS] * $[$149.38.Quantity]  
    Any suggestions? How can I total several fields for a row, without first having to save the document?
    Thanks folks!

    Presuming that you are trying to use this formatted search on a row level field of a marketing document and U_COSTPLUS is a numeric field.
    The syntax would be $[$38.11]*$[$38.U_COSTPLUS]
    NOTE: Quantity field is column 11 - you may also spell quantity as $[$38.Quantity]. You were missing the '$' before 38.
    Good luck
    Suda

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

  • Formatted search in Citrix

    Hi All,
    We have configured a formatted search with warehouse in a field of Inventory Transfor form.  If we run the form thru' Citrix,  When we press Shift+F2, the formatted search is not working and the list of warehouses is not displaying.  Instead of formatted search, some other functionality is working in citrix. 
    Please give a solution to overcome this situation.
    Regards,
    Venkatesan G.
    Reply

    Hi Venkatesan,
    Shift-F2 in Citrix will hide the Windows title bar of the ICA client. As you have found, the ICA client will have priority over SBO when the keys are pressed.
    Possible solutions are:
    1) You can still trigger the formatted search by choosing the option from the main menu. This is not ideal but requires no configuration changes.
    2) You should be able to disable the ICA client's keyboard shortcuts (depending on the version of Citrix you are using). Please have a look at the following article:
    http://support.citrix.com/article/CTX140219
    Kind Regards,
    Owen

  • Getting Error Message using Formatted Search

    Hi,
    I am using formatted search for validating a particular field, and that happens fine.  Kindly let me know if I can also display error messages using the same formatted search.
    If yes, what am I to include in the formatted search, and if No, please let me know the alternative.
    Thanks in advance.
    Satish.

    Hi Satish,
    if you validate the value of a field and intend to rise an error message on detection of invalid values in a separate window or in the status line there is no way to do it with Formatted Searches (as far as I know)!
    You could use the following methods as simple workarounds if you don't want to program a solution with the SDK:
    1. Solution
    You can display the text of an error message in the field you validate; of course, the invalid data then is overwritten with your error message, but you could construct the message from fixed text parts concatenated with the data found in the field.
    Be sure to save the original data of the field in your query before you do anything else. This way you sustain the field data in case the data is valid!
    Example:
    DECLARE @save AS ....
    SET @save = $[xxxxx]
    IF $[xxxxx] test on invalid data
      SELECT 'Error: Invalid data: ' + $[xxxxx] -- in case of error
    ELSE
      SELECT $[xxxxx] -- no error - sustain valid data
    END
    2. Solution:
    You define a sepate User Defined Field (UDF) for potential error messages - that's the way I often programmed it for our own applications. Suppose that the Formatted Search is connected to this UDF and the field to validate is field 'xxxxx'. The Formatted Search is triggered (auto-refresh) on change of field 'xxxxx':
    IF $[xxxxx] test on invalid data
      SELECT 'Error: Invalid data: ' + $[xxxxx] -- in case of error
    END
    May be that there are minor syntactical errors or missing type conversions in the code above - but I hope it gives you an idea on how to solve your problem without SDK programming!
    Good luck!
    Frank Romeni

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

    Dear All,
    i want to create a very simple formatted search, which updates the unitprice-field in sales order when itemcode changes.
    With the actual cardcode number and itemcode of the sales order (before saving) i want to check my udt (specialprice) for a fitting entry and want to return a price out of this udt.
    My FS:
    SELECT
          T0.U_SpecialPrice AS [Specialprice]
        FROM
          [@XXX_SPECIALPRICE] T0
        WHERE (T0.U_CardCode = $[$4.0.0] AND T0.U_ItemCode = $[$38.1.0])
    If i replace the $-Codes with a test-value the fs works. The udf's have the necessary types and digits.
    The error-message can't help me:  incorrect syntax near '$4.0.0'
    Thank you for your answers...
    GB

    hmmm.... I don't think so, because i have a more complicated query in purchase order which does nearly the same and this works....ok there is no direct where-condition with the udt-colums but an inner-join...
    SELECT
          T4.U_SpecialPrice AS [Specialprice]
        FROM
          OPOR T0 INNER JOIN
          POR1 T1 ON (T0.DocEntry=T1.DocEntry) INNER JOIN
          RDR1 T2 ON (T1.BaseEntry=T2.DocEntry AND T1.BaseLine=T2.LineNum AND T1.BaseType=T2.ObjType) INNER JOIN
          ORDR T3 ON (T2.docentry=T3.DocEntry) INNER JOIN
          [@XXX_SPECIALPRICE] T4 ON (T3.CardCode=T4.U_CardCode AND
          T2.ItemCode=T4.U_ItemCode)
        WHERE (T0.DocNum=$[$-8.0.0] AND T1.LineNum=$[$38.0.0]-1)

  • Formatted Search error with a different user

    I created an add-on form and assigned formatted search to some of the fields.
    When I logged in with a different user(<b>test</b>) and tried to use the FS via Shift+F2, I received an error saying "You're not permitted to define recurring postings".
    I gave that user the authentication for recurring postings, but now I receive an unclear error when I try to use the FS on the same editbox:
    "<b>You are not permitted to perform this action</b>."
    <b>Any ideas</b> ? What may be the reason for that unclear error message ?
    <u><b>Note:</b></u>
    <i>After logging on with the same test user, when I try Shift+F2 on another editbox (which is normally not assigned a FS) it works normally and I can do all FS operations like assigning a new FS, etc.</i>

    Hi!
    sometimes there are strange things with user permissions.
    i had some troubles with 2 users which have the same permissions. i solved it by 'drag'n'dropping' permission of the 1st user (which works ok) to the 2nd.
    try to do the same - drop 'good'-user permissions to 'test'-user.
    if it'll not solved problem then try to create new user and test your addon under that user.
    probubly your problem has another motive, but i have such strange behaviour and i've described you my solution.
    hope it'll help.
    sorry for my poor EN, hope it'll be better in some centuries

  • Using a formatted search which incorporates copying data from base document

    Hi
    I have a user selling tiles.  They sell by sq meter but will only sell whole boxes.  I have a formatted search on the quantity field to calculate the number of sq meters in a box.  They also sell indivudual units and will key this value directly into the quantity field.  All this works fine.
    However if I enter this as a sales order and copy to a delivery, then the formatted search fires and the quantity field gets refreshed.  This results in the incorrect value where the user had keyed data directly into the qty field in the base document.
    Therefore I need to incorporate my base document values into my query where by if there is a base document, the query will pull the quantity data from the base document.  My query so far is as follows
    SELECT (CAST($[$38.U_ActMtr.0] AS DECIMAL(10, 2))*CAST(T0.U_SqmBox AS DECIMAL(10, 2))) FROM OITM T0 WHERE T0.ItemCode = $[$38.1.0]
    Any suggestions?
    David

    If I understand your requirements well, you want to save the base quantity, when the delivery is based upon a SO, and to compute it when the DLN is not copied.
    Try to use this modified FS:
    declare @q dec(19,6)
    set @q=$[$38.11]
    If $[$38.43]<>-1
    Select @q
    Else
    SELECT (CAST($[$38.U_ActMtr.0] AS DECIMAL(10, 2))*CAST(T0.U_SqmBox AS DECIMAL(10, 2)))
    FROM OITM T0 WHERE T0.ItemCode = $[$38.1.0]

Maybe you are looking for

  • How to add left navigation to Custom Master page for Office 365

    Hi, I have created a master page using html, it looks good, But I could not see the left navigation, which I would like to have. below is my html page which converted to a master page: <?xml version="1.0" encoding="utf-8"?><!--SPG: This HTML file has

  • Help needed to access a file from and email link.

    I received an email with a link to an Adobe document. When I attempt to open the link I receive a message " You do not have accewss to the file" How do I gain access?

  • After reinstall, SSL certificates not accepted.

    Hello there! I've reinstalled my Macbook Air (Mid 2012, OS X Mountain Lion 10.8.2) due to a problem when I lost my password. When I launched an app like Safari, Mail or Chrome, I've experienced the same problem. Pages using the SSL encryption were un

  • Is ABAP Objects support Header Lines?

    Hello Friends, Is ABAP Objects (Object Oriented) Supports Header Lines? If not, why Abap Objects doesn't Support? Thanks & Regards Sathish Kumar

  • OLE object to create excelsheet

    Hi All, I have created OLE object for excel. When I am filling the cell in sheet ie.   PERFORM fill_cell USING 1 1 1 'User Name'. FORM fill_cell  USING  i j bold val call method of w_sheet 'Cells' = w_cell   exporting     #1 = i     #2 = j.   PERFORM