Intrnalkey in ouqr (formatted search)

Hello,
I have made a "Year transfer" of one companyX and then CompanyX08 is created. Now when I go to companyX08, made a query, save that query "QueryX08" and try to execute that query through Query Generator, a very strange thing happens:
Another query is executed!
Investigating I realized that SAP is giving to QueryX08 an existing internal number. So when executing QueryX08, the query executed is the first created with that internal number.
I suppose that transferring the year has not worked properly, because the counter of the internal counter should have been the max(in2007year) + 1.
So, my question is, do you know where I can found the counter for the internal number for the queries to update it manually? Do you know if this could be a bug?
Thank you in advance!

Vanessa,
My apologies ... as I have not heard of this issue.  You may want to enter a message on this with SAP Technical Support as while you may receive an answer here, the forum is for questions related to the SAP Business One SDK.
Eddy

Similar Messages

  • 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

  • Failed to find out the source table of query in the formated search

    Dear All,
    I am trying to find out how to know the table that it is the source of a formatted search query. In the query manager --> formatted search --> select one of query --> double click to see the query. I see the query but I can't find out what table it will be used if the query like this :
    SELECT $[$13.87.NUMBER] - ($[$13.9.NUMBER] + $[$13.88.NUMBER])
    If I go to receipt from production form, the column no relate to the above query are mixture of IGE1 and OWOR, so what actually the table must I choose if I redesign the above query from query generator. I need your help to solve this question. I appreciate your answer. TIA
    Rgds,
    Steve

    Hi Steve,
    Assuming the FS is currently assigned to a form field you could try the following:
    - Look in OUQR for the query and get it's id (OUQR.IntrnalKey).
    - Look for this id value in CSHS.QueryID and check the FormID value of any records listed. It's not the table name you're looking for but the FormID might help e.g. 139 = Sales Order = ORDR/RDR1 etc.
    Hope this helps.
    Regards,
    Andrew.

  • Internal key in formatted search table

    How does the internal key field in the formatted search table get assigned?
    (ouqr.intrnalkey)
    Is this field taken from another SQL table that I'm not aware of?

    onnm - objectcode column.
    160 for ouqr
    111 for oqcn
    (I think)

  • Search Formatted Search

    Hi, I was trying to delete a query. However, it prompted that there is a formatted search for it.
    So I can't delete it.
    But I can't find where the search is.
    Do you know where I can find the list of formatted search I have?
    Thanks.
    Raymond

    The table where the query definitions are stored is  OUQR
    so try SELECT * FROM OUQR
    Suda

  • 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

  • Is there a way to NOT have the data from a formatted search highlighted

    Hi all,
    I have a formatted search that returns a big chunk of data, some comments that are then added to. When the fs is fired, it returns the data, but all of the data is highlighted so when the user starts typing they overwrite the data that was just returned. I know they could just hit the right arrow key or click their mouse at the end, but they don't do that half of the time. I also know they could use ctrl-z or undo when they do this, but they don't do that either. It would just be nice if they could fire the fs and when the data is returned, the cursor would be at the end of the data.
    Any thoughts?

    I don't think there are any options for you to change default system behavior like this.  What you may do is to change your FMS logic to get only one record if possible. Post your query here if you can.
    Thanks,
    Gordon

  • Formatted Search with multiple conditions

    Hi experts,
    I am using a formatted search to update the Unit price in Sales Order. Query mentioned below.
    Select      T0.ItemCode,
                   T0.ItemPrice,
    From        ITM1 T0 inner join OPLN T1 on T0.PriceList = T1.ListNum
    Where      T0.ItemCode = '[$38.1.0]'
         and     T1.u_location = '$[$38.2000002049.0]'
    But while adding Item on Sales Order, it is showing error, Incorrect Syntax near  '$[$38.2000002049.0]'.
    Note: I have added an UDF named U_LOCATION( Alphanumeric, 10) in OPLN and selecting location in Price List through another FMS which is working perfectly.
    Please help in this regards.
    Thanks in Advance.
    Nabyendu

    Hi Nabyendu Saha..
    You said the u_location as alphanumeric the why you have given 0 for the field type in the FMS...
    Select      T0.ItemCode,
                   T0.ItemPrice,
    From        ITM1 T0 inner join OPLN T1 on T0.PriceList = T1.ListNum
    Where      T0.ItemCode = '[$38.1.0]'
         and     T1.u_location = '$[$38.2000002049]'
    or
    Select      T0.ItemCode,
                   T0.ItemPrice,
    From        ITM1 T0 inner join OPLN T1 on T0.PriceList = T1.ListNum
    Where      T0.ItemCode = [$38.1.0]
         and     T1.u_location = $[ordr.u_location]
    Try the above , hope helpful
    Regards,
    Kennedy

  • 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

  • Formated Search: Auto refresh with two conditions.

    Hi,
    I've created a Formated Search in one of my column.
    I defined my formated search as :
    - Auto refresh "When Exiting Altered Column" Item No.
    - Display Saved Values.
    Now how can I make it Auto refresh with two conditions?
    - Auto refresh "When Exiting Altered Column" Item No.
    And
    - Auto refresh "When Field Changes" Customers/Vendor Code.
    - Display Saved Values.
    Is there any way to make it work?
    Thanks In Advance.
    Bruce.

    Hi Bruce,
    You could try this trick.
    You need to execute SELECT1 in Col1 when Item No. column is altered or the Customer code is changed.
    Then, in the Item No. column asign a new Formatted Search which selects the Item No. column value (Its value) when the Customer code is changed.
    And in the Col1 asign a formatted search that acts when the Item No. column is altered.
    I think this should do the trick.
    Let us know if works.
    Regards,
    Ibai Peñ

Maybe you are looking for

  • Launching commands in a shell via the Fluxbox menu?

    Is there a way I can configure ~/.fluxbox/menu so I can launch command-line progs in a shell?  For example, running jackd - I want to see the output in a shell as it runs.

  • How can user attach file to interactive form, and be read by abap program?

    Hello, I created an abap interactive form, sent to the user, then user fills out the form fields, then it is uploaded back to sap, then my program reads this data and process it. It works. Now I want users to be able to attach any file they want, and

  • Document type for outgoing Excise invoice

    Dear Expert, I would like to maintain different document type for Excise document generated at the time of J1IIN transaction. At present system generating document type SA. So we need to maintain different number range for these documents instead of

  • Remove all tooltips from PDF Fom in Acrobat 9 Pro

    I am trying to convert an Excel form into a PDF form. There are a couple of hundred fields in the form. By default, when I convert the excel file to a PDF form, Acrobat names all the fields automatically and this name is added to the tooltip. So when

  • How Long Does SSIS Data Profiling Task Take?

    Greetings All, I have been doing all my data cleansing and conforming manually (was unaware of tools available to me).  I am testing the SSIS Data Profiling Task on a table with 60,000 records.  The Data Profiling Task has taken over an hour and is s