I canu00B4t do a formatted search in a user table

Hye, I'm trying to do a formatted search over a user table using and I get the error -2006, why?
I use "report generator" and my selecc is :
SELECT T0.U_grupo, T0.U_CODE
FROM T0
WHERE T0.U_grupo ='[%0]' FOR BROWSE
If I do the same with standar table ( e.j OITM),  all is right:
SELECT T0.ItemCode, T0.ItemName
FROM OITM T0
WHERE T0.PrchseItem ='[%0]' FOR BROWSE
unless, with user tables no, whyyyy?
thank´

I have seen this, though I don't have an official answer, I have my own theories.  SBO matches up the variable with the previous field name and looks up the description for that field.  The description for user fields is not stored in the same place as standard fields.
In a previous thread, named "SQL Syntax in SBO" (number 7144) another user showed a way to do dummy selects with the variables to get the names of standard fields.  Then the variables can be used for the real work.
That is awkward, and it limits you to the descriptions of standard fields.
Bruce

Similar Messages

  • 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 - how to get table or form name

    Hello,
    I'm trying to create a generic query for modifying "Journal Remark" on different documents (Goods receipt, invoices ...) thru a formatted search
    My problem is that I want to customize the "remark" according to the current document.
    is there a way to get the table name or the form number in a query ? or should I to create a different query for each document ?
    Regards

    Hi....
    If you activate the System Information from Menu Bar> View> System Information. Then when you move the cusrsor from any of the document you get some variable values which displays the ID of forms colums and rows.
    You can get this information for your FMS. There is no need to create no. of FMS for each Document. Just take the variables into the FMS and apply to the same ID documents.....
    Regards,
    Rahul

  • Formatted search in the User defined table

    Hi All..
    I created two user defined table one is for document row and other is for document master.So in the master table created one column named as Sales order no and through formatted search call the sales order no in that column.Now i want that in my child table i want to show the those items which belongs to the selected sales order no in the master table.So how can i do that through Formatted search.Is there any query of it then please forward it..
    Thanks

    Ya Sure..
    I need some quality check on the items after delivery so i am trying to manage it through the user defined tables.I created two tables first is document type ,Second is Document type rows.Now i created 5 user defined field in both the table.Now i want to call my sales order and its items in the UDT.so i created one fms and call the sales order in the Document table now when i double click on the first row after that i am able to see the new table which is the document row table .Now i need the item code and description of the selected sales order in the document rows table.So how the items and description can come in the row type table through FMS..
    I hope now u r able to get my scenario..

  • Run a search on a user table

    Hello,
    I'd like to know if it's possible to search a user table in SAP or Oracle where users and his/her department are displayed.
    Eg: I have a long list (300) of users and I just want to know in which department they are working.
    SAP system release = 4.7 R3
    Oracle = 9.2.0.8
    Thanks a lot
    Bert

    This really isn't the best place to post such a message.  You might want to try the ABAP forum.  I'm sure somewhere there has written a report like this in the past.  The main User Master tables are USR* (ie USR01).  However to get department, you might have to combine your search with HR tables as well.  There is a department field within the Address Master linked to the User Master (ADDR3) that might be used instead of the HR records (since not everyone utilizes SAP HR).  You can look at transaction SU01 to via a user master and see if this is the data you want.

  • Formatted search with UDF and syntax question

    Can you explain the syntax with when to use the dollar sign and negative in writing a query for a formatted search based on user entry?
    I now want to create a formatted search to pull values based on the user's entry into a UDF on the item master screen.
    User entry into UDF U_Customer Code
    to create Formatted search for UDF U_Rep01
    I tried the following, but it does not work.
    SELECT T0.U_REP01 FROM dbo.OCRD T0
    WHERE T0.CARDCODE = $http://$OITM.U_CUSTOMERCODE
    Thanks.
    Please advise.

    The right syntax would be like this:
    SELECT T0.U_REP01 FROM dbo.OCRD T0
    WHERE T0.CARDCODE = $[OITM.U_CUSTOMERCODE\]
    However, the logic of query may not be correct.  Select something must be already in the system and Where should also be locatable.
    Thanks,
    Gordon

  • Formatted search in CHSH in non exists tables or UDO

    Hi
    I found out that i have formatted searches associated in to tables and UDO that no longer exist, How can i delete that information from CHSH? I need to delete those queries.
    Kind regards

    hi,
    that query assigned to FMS for UDF or some other fields. Identity that UDF and press shiftaltF2 and choose" wittout search  in user defined Fields. after delete that query. its worked
    Thanks & Regards
    B.Lakshmi Narayanan

  • Formatted Search in UDT

    Hi Guys,
    How can i  create a Formatted search for a User Defined value in a UDT using the code. the User defined Field should link to a query. Is this possible, i was able to create it using BOne but not through Code (SDK). Please let me know if you have any solution.Thanks for your time.

    Hi,
    Even if it is possible to create this FMS through SDK, I would recommend you do it through UI.
    1. It is more straight forward,
    2. It may not need to deal with version differences in case your code is limited to certain DI version.
    Thanks, Gordon

  • Create Formatted  Search by code in a user form

    Hi, I want to create a formated search in a user form but it doesnt work using my form id (STEC_EXTRAS) as the search.FormID.
    I created the formatted search by SAP (Shift+F2) and in the table of formatted searches the formid appears as 2000001000
    ¿Where is the relation between my id and the id SAP uses?¿Any SAP table or conversion rule?
    Thanks for the possible help.

    Hello,
    When You create a form, the id (Type) can be set up by  Add function, ..... it is staring form 2000000000 ...
    Maybe Your "ID" STEC_EXTRAS is the Unique ID of the Form...... not the Type
    Public Const WM_USERFORM As Integer = 2000000000 ' User defined forms minimum ID
    Public Const YOURFORM As Integer= WM_USERFORM + 1 ' My form id will be  2000000001 
    oForm = m_SBO_Application.Forms.Add("MYFORM", SAPbouiCOM.BoFormTypes.ft_Sizable, YOURFORM - WM_USERFORM)
    'this is the same as
    oForm = m_SBO_Application.Forms.Add("MYFORM", SAPbouiCOM.BoFormTypes.ft_Sizable, 1)
    ' or the same as
    Dim creationPackage as SAPbouiCOM.FormCreationParams
    creationPackage  = SBO_Application.CreateObject(SAPbouiCOM.BoCreatableObjectType.cot_FormCreationParams)
    creationPackage.UniqueID = "MYFORM"
    creationPackage.FormType = YOURFORM
    creationPackage.BorderStyle = SAPbouiCOM.BoFormBorderStyle.fbs_Fixed
    oForm = SBO_Application.Forms.AddEx(creationPackage)
    If you use  STEC_EXTRAS as FormType, You will see in the CSHS table STEC_EXTRAS as the FormId
    Dim creationPackage as SAPbouiCOM.FormCreationParams
    creationPackage  = SBO_Application.CreateObject(SAPbouiCOM.BoCreatableObjectType.cot_FormCreationParams)
    creationPackage.UniqueID = "MYFORM"
    creationPackage.FormType = "STEC_EXTRAS"
    creationPackage.BorderStyle = SAPbouiCOM.BoFormBorderStyle.fbs_Fixed
    oForm = SBO_Application.Forms.AddEx(creationPackage)
    Regards
    J.

  • Formatted Search for Sales Order

    Hi,
    I setup a formatted search in Sales Order unit price field.
    Condition required:
    If Sales Order is copied from Sales Quotation, unit price remains as per Sales Quotation unit price, else formula to calculate mininum selling price appllies.
    Here's the query:
    DECLARE @BASE_ENTRY INT
    DECLARE @PRICE NUMERIC(19,6)
    SET @BASE_ENTRY = ISNULL($[$38.45.0],0)
    SET @PRICE = $[$38.14.0]
    IF @BASE_ENTRY = 0
    BEGIN 
    SELECT T0.[AvgPrice]*(1+T0.[U_SPFactor])
    FROM OITM T0
    WHERE T0.[ItemCode]=$[$38.1.0]
    END 
    ELSE 
    BEGIN
    SELECT @PRICE
    END
    l have no issue if the Sales Order copied from Sales Quotation, however when enter the Sales Order manually the formatted search having error message:
    1). [Microsoft][SQL Server Native Client 10.0][SQL Server]Error converting data type nvarchar to numeric.
    FMS execution failed on field '' with query name 'Get Minimum Selling Price (SO)'
    Looks like my query has error...

    Hi ,
    Try this below query and let me know your feedback,
    DECLARE @BASE_ENTRY INT
    DECLARE @PRICE NUMERIC(19,6)
    SET @BASE_ENTRY = ISNULL($[$38.45.0],0)
    SET @PRICE = $[$38.14.Number]
    IF @BASE_ENTRY = 0
    BEGIN
    SELECT T0.[AvgPrice]*(1+T0.[U_SPFactor])
    FROM OITM T0
    WHERE T0.[ItemCode]=$[$38.1.0]
    END
    ELSE
    BEGIN
    SELECT @PRICE
    END

  • Help needed for Formatted Search

    Hai Experts,
    would like to ask you some clarification on Formatted Search. In the
    query I found $http://$44.2.1 given in the criteria part.
    In some articles it was mentioned that, the 44 meant for the table
    connected with the form and 2 is field index and so on.
    Can you please explain how to find out those numbers and field index.
    I need to work out planty of FMS to fetch data into
    UDF automatically based on user input.
    Regards
    Anand

    Hi Anand,
    You may check these threads first:
    Re: Vendor default GL FMS help
    Re: Runtime data calculation
    Thanks,
    Gordon

  • Formatted Search - Restrict to Only One Customer on Activity Window

    Hello Experts:
    Am trying to create a formatted search to provide a suggested RMA Number on the Business Partners > Activity window in a UDF.
    While in Activity, the user should get a list of ONLY the one customer they are currently working with.  So if C0001 is being used in the Activity window, the list should show all suggested RMA numbers just for that customer of C0001, not any other customer. 
    When I use the following it shows all customers.
    --FMS 6BP Automated RMA Number
    SELECT
    T1.[CardCode] + ' - ' + ltrim(str(T0.[ClgCode]))
    FROM OCLG T0
    INNER JOIN OCRD T1
    ON T0.CardCode = T1.CardCode
    ORDER BY
    T1.CardCode Desc,
    T1.[CardCode] + ' - ' + ltrim(str(T0.[ClgCode])) Desc
    When I put in WHERE T1.CardCode = $[$ 9.0.0 ] in the right place it shows nothing...
    Any ideas on how to make only the one current customer in Activity window appear in the list???
    Thanks in Advance - Zal

    Thanks Istvan and Gordon...
    Istvan - that is the same as my SQL - just do not know how to show the $[$... correctly in this forum - it always goes to that http thing.
    Gordon - tried to use your SQL but it gave me an error of "Internal Error (-1003) Occured [Message 131-183] every time I tried to click on the magnifying glass.  However, due to your last line in the SQL it gave me an idea that eventually they were OK with - namely, the highest number to the top of T0.ClgCode...
    Thanks again guys - Zal

  • 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

  • Formated search

    Hi all,
    In Dunning Wizard, step 5, I want to make a formated search to select only some documents. The Query I need is complicated so I tried to do Select ' '  or Select 'N' or Select 'Y' in all this examples when I do "Shift F2" nothing happens. Even with auto Refresh nothing happens. Perhaps Formated Searchs dont work on CheckBox Fields.
    How can I solve this?
    Any help will be apreciated.
    Best regards,
    José Silva
    Edited by: José Silva on Jul 16, 2010 12:45 PM

    HI SILVA,
    plz paste ur query ...
    then we update in query.
    Thanks,
    JRAJPUT

  • How to club 2 queries in one formatted search query

    Hi All,
    I have inserted a formatted search in the stock transfer for chnaging the 'From warehouse' based on series.
    I have written following query for same,
    SELECT $[$18.1.0]='08' WHERE $[OWTR.series] ='46'
    It is working Fine
    I want ot use same concept for selecting other based on other warehouse
    e.g
    SELECT $[$23.5.1]='02' WHERE $[OWTR.series] ='45'
    But I am not able to club these queries on one formatted search query can anybody help to group it in one formatted search query....
    Thanks and Regards,
    Atul Joshi
    Edited by: Atul Joshi on Dec 23, 2008 5:20 PM

    Hi Atul,
    You could define the quey like this
    SELECT
    CASE
             WHEN $[OWTR.series]='46' THEN '08'
             WHEN $[OWTR.series]='45' then '02'
    end
    from OWTR
    Regards,
    Vijay kumar
    SAP Business One Forums Team

Maybe you are looking for

  • Aperture keeps multiple duplicate images in the library file which do not show up in the app

    So, I recently had to merge two libraries which have some common images.  Although upon import Aperture asked me if I wanted to "Add or Merge" the libraries (I selected "merge", which wouldn't import duplicates), I wanted to confirm there were no dup

  • Does Apple plan on adding a print to PDF funcationlity to iOS?

    Hello, I used Apps like Save2PDF for printing Webpages to PDF via airprint. But since iOS 5 it's impossible to print from safari via airprint to pdf. I contacted the Save2PDF Support for getting an answer of my question "Why i can't print to pdf?" Th

  • Getting clamshell iBook to connect to the internet with BaseStation

    Hey all! I'm trying to get my iBook Clamshell to connect to the internet. I have FiOS and have connected the BaseStation via Ethernet to the LAN port. I have tried to configure the BaseStation both wireless and wired, but the AirPort Utility couldn't

  • Can't send break to system

    I have a SunFire V100 which I want to install a custom version Solaris 8 onto. As soon as I access the server (connected via terminal PC), I get a stream of errors as follows: Mar 10 16:34:24 in.mpathd[36]: missed sending 8 probes cur_time 1124706 sn

  • Regarding Web Premium 5.5 upgrade !

    Hi , I am using Web premium CS5.5. Planning for an upgrade. It seems upgrade version doesnt have flash builder . Is it possible for me to use the flash builder 4.5 available in the current version after the ugradation to CS6.0 web premium ?