Formatted Search on user-defined items

Hi everyone,
       I have to edittext item, editA and edit B. I created a formatted search on edit B but with a condition depending on the value of my editA. My query results to an internal error. Below is my code. Thanks
SELECT T0.[Field1] AS [Field1]
FROM [dbo].[@TABLE]
T0 WHERE T0.[Field2] = [EditB]
What is the right format for getting the value of [EditB] during run time?
Regards,
Omann

Hi,
Create the User Query and Save it with some name...
Declare @Item varchar(20)
Set @Item = Replace(RTRIM($[$editA.0.0]),'*','') + '%'
SELECT T0.ItemCode AS 'Item Code', T0.ItemName AS 'Item Description' from OITM T0 WHERE T0.ItemCode
like @Item
Assign the Query to the User Defined Item i.e for editB Item in the FORM
With Regards,
MadhuSudhana Rao.G

Similar Messages

  • Formatted Search on User Defined Table

    Dear Experts,
    I have the following formatted search query on a user defined table : select $[dbo.[@SALES_BUDGET].U_AcctCode]
    It throws an error when I attempt to execute it. What's the proper way to write formatted searches on User Defined Tables. Please advice.
    Kind Regards

    This works very well on the delivery docs :
      select  $[ODLN.DocNum] 
       on the header fields of a delivery document, Why not this
    select  $[SALES_BUDGET.U_AcctCode]  
    on a field in the User defined Table  ? Is it the syntax ?
    Edited by: MARTIN KAMAU on Sep 27, 2010 2:28 PM

  • Formatted Search with user defined fields??

    Hai everyone,
    I know how to use the search.. I did like this...
    SELECT U_Discount FROM OITM WHERE ItemCode = $[$38.1.0]
    But now i want to know the other way...ie.
    SELECT U_TVal FROM OITM WHERE U_Tcode='??????'
    the where condition is to be like this -I have 2 user defined fields
    1. U_TCode
    2. U_TVal
    I want to select the U_TVal where the U_Tcode= ????
    HOW TO SPECIFY THE USER DEFINED FIELD HERE like  this one $ $38.1.0 ....or is there any other method??
    Thanks
    Vibin

    Its Same..I didnt try your way but i tried this
    select oNHand from OITW where ItemCode=$[RDR1.ItemCode]
    Here in sales order- when an item selected the Stock in different warehouse will be listed in quantity...
    Try that
    $[Tablename.FieldName]

  • Formatted Search in User Define Field (UDF)

    Hello everyone...this is really puzzling and hope someone can help...2007A/000/PL42...
    1. We created a UDF on the OITB Table (Groups) called U_GrpDescrip
    2. We created a UDF on the OITM Table (Item Master) called U_IGrpDescrip
    3. We want the system to auto populate the U_IGrpDescrip (Item) with the value U_GrpDescrip (Group) everytime the Item Group is changed on the Item Master Data Window.
    So,
    1. We wrote this query...SELECT T0.U_GrpDescrip FROM OITB T0 WHERE T0.ItmsGrpCod = $[$39.0.0]
    2. Opened up a Blank Item Master Data Window.
    3. Placed cursor in the new U_IGrpDescrip
    4. Hit ShiftAltF2
    5. Selected "Search in Existing User...Saved Query"
    6. Double clicked on the appropriate FMS Query
    7. Checked the Auto Refresh
    8. Selected Item Group from the displayed list of fields
    9. Selected "Display Saved..."
    10. Update and then closed out the Item Master Data Window
    Now here is where it gets interesting...
    1. We go to the Item Master Window and change the Item Group and hit Update. Button on IMD Window changes to OK.
    2. The U_GrpDescrip from the OITB table does NOT change
    3. However, if we click the "Magnifying Glass" TWICE in the new field on the Item Master Data Window the description DOES change to the appropriate description on the OITB table...
    Can anyone help out here - this is really puzzling because we effectively use Formatted Search on other windows and they work fine, but this one seems to be a horse of another kind..
    Thanks for reading and thanks ahead of time for helping
    Zal

    Hello everyone - thanks for responding...
    I finallly figured out what is happening - and this is interesting
    1.  The field it is supposed to populate is on the main window of the Item Master Data (not on the side window of UDFs).
    2.  The field was placed there with Boyum.
    3.  When I do the formatted search in a test field that IS on the side window, the FS works perfectly.
    So - it seems if you use a FS in a moved field created by Boyum, it might not work - and now I turn my attention to what Boyum is doing.  Might not even need a FS with Boyum!!!
    Thanks to all who read and gave their suggestions - now you get your points!!!
    Take care - Zal

  • Formatted search on User Table

    Hi..,
          I need to set formatted search for user table which is @DCNR . My Requirement is that i need to  Pick CST NO from BP Master  . In my user screen i had taken CARDCODE value using CFL which is binded to the field U_ven in the table @DCNR.Using this CARDCODE value i need to pick CSTNO from BP master to the user screen which is binded to the table (@DCNR).My Query is as follows but it is not working,
    SELECT crd7.taxid1 from crd7 inner join @dcnr on crd7.cardcode  = @dcnr.u_ven where crd7.cardcode = $[@dcnr.u_ven]
    U_VEN field contains card code value.
    Do i need to follow some other terms in order to write formatted search on user table.
    Hope some one would help to fix this problem.
    thank u,
    -Ashok Krishnan

    Dear Mr Krishnan,
    As a starting poing I would suggest reading these documents regarding UDF and Formatted search:
    https://websmp108.sap-ag.de/~form/sapnet?_FRAME=CONTAINER&_HIER_KEY=701100035871000437965&_OBJECT=011000358700004463532006E&_SCENARIO=01100035870000000183&
    https://websmp108.sap-ag.de/~form/sapnet?_FRAME=CONTAINER&_HIER_KEY=701100035871000437965&_OBJECT=011000358700003625432006E&_SCENARIO=01100035870000000183&
    let us know if they were usefull.
    Kind Regards,
    Marcella Rivi
    SAP Business One Forums Team
    Edited by: Paul Finneran on Aug 14, 2008 1:15 PM

  • Formatted search to auto generate Item No.

    Hi,
    Customer is using 2007A PL47. They had requirement to auto generate Item No based on UDF created in Item Master Data(OITM). The stock code structure is as follow:
    Item No=EP(hardcode 2 char)+U_ProdRange U_ProdGroupU_ProdFamily+user defined text
    The keystroke steps are:
    1. Key in item description
    2. Select drop down list for U_ProdRange in OITM
    3. Select drop down list for U_ProdGroup in OITM
    4. Select drop down list for U_ProdFamily in OITM
    5. Formatted search to generate Item No based on 2,3, 4
    6. User keys in user defined text in Item No
    7. Fill in other relevant fields in Item Master Data
    8. Add Item Master Data
    May I know how to write the query in formatted search?
    Regards
    Thomas

    Hi,
    I had got solution.
    Try this Select TOP 1 'EP' +$[OITM.U_ProdRange] +$[OITM.U_Prodgroup] +$[OITM.U_ProdFamily]
    Regards
    Thomas

  • Automatic formatted search for row udf item group autofill

    Dear All,
    I have a field udf field in the row of marketing document named u_itemgroupcode. I want that when an item is selected in any marketing document in the above udf automatically the Item Group code should come from the corresponding item OITB table.
    How to achive this through auto refresh formatted search.
    please help....!
    regards
    kamlesh

    Hi Kamlesh,
    ItemGroup code is available in OITM table itself. You could define the formatted search on the udf field
    with this query and define auto refresh with Item No.
    SELECT T0.[ItmsGrpCod] FROM OITM T0 WHERE T0.[ItemCode] =$ $38.1
    Regards,
    Vijay Kumar
    SAP Business One Forums Team

  • Item - The item is not a user-defined item

    I have added a user defined field in Marketing Documents -> Title.In short I have added a user defined field at the header level.I have used this field for certain calculations while adding inventory transfer.I have created a combo for this field and added values as,
    Private Sub AddSeries()
            Dim ddlSeries As SAPbouiCOM.ComboBox
            Dim objDTSeries As New DataTable
            Dim intI As Integer
            Try
                objForm = SBO_Application.Forms.GetForm("-940", 1)
                ddlSeries = objForm.Items.Item("U_ProdSeries").Specific
                strQuery = "Select Series,SeriesName FROM NNM1 WHERE ObjectCode=13"
                objDTSeries = GetData(strQuery)
                If objDTSeries.Rows.Count > 0 And ddlSeries.ValidValues.Count = 1 Then
                    For intI = 0 To objDTSeries.Rows.Count - 1
                        ddlSeries.ValidValues.Add(objDTSeries.Rows(intI).Item("Series"), objDTSeries.Rows(intI).Item("SeriesName"))
                    Next
                End If
            Catch ex As Exception
                SBO_Application.MessageBox("AddSeries()=" & ex.Message)
            End Try
        End Sub
    Also,I want to clear the combo for certain condition.For clearing the combo I have used the code as,
    Private Sub DeleteSeries()
            Dim ddlSeries As SAPbouiCOM.ComboBox
            Dim intI As Integer
            Try
                objForm = SBO_Application.Forms.GetForm("-940", 1)
                ddlSeries = objForm.Items.Item("U_ProdSeries").Specific
                While ddlSeries.ValidValues.Count > 0
                    ddlSeries.ValidValues.Remove(0, SAPbouiCOM.BoSearchKey.psk_Index)
                End While
            Catch ex As Exception
                SBO_Application.MessageBox("DeleteSeries()=" & ex.Message)
            End Try
        End Sub
    While Removing the value it gives error as,
    Item - The item is not a user-defined item

    Hello dilip
    try this code .i hope yure problem may be solved
    Private Sub AddSeries()
            Dim ddlSeries As SAPbouiCOM.ComboBox
            Dim objDTSeries As New DataTable
            Dim intI As Integer
            Dim oItem As SAPbouiCOM.Item
            Dim Rs As SAPbobsCOM.Recordset
            Try
                objForm = SBO_Application.Forms.GetForm("-940", 1)
                Rs = objMain.objCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.BoRecordset)
                oItem = objForm.Items.Item("ITEM ID").Specific
                ddlSeries = oItem.Specific
                strQuery = "Select Series,SeriesName FROM NNM1 WHERE ObjectCode=13"
                Rs.DoQuery(strQuery)
                Rs.MoveFirst()
                For k As Integer = ddlSeries.ValidValues.Count - 1 To 0 Step -1
                    ddlSeries.ValidValues.Remove(k, SAPbouiCOM.BoSearchKey.psk_Index)
                Next
                If (ddlSeries.ValidValues.Count >= 0) Then
                    While Rs.EoF = False
                        ddlSeries.ValidValues.Add(Rs.Fields.Item("Series").Value, Rs.Fields.Item("SeriesName").Value)
                        Rs.MoveNext()
                    End While
                End If
            Catch ex As Exception
                SBO_Application.MessageBox("AddSeries()=" & ex.Message)
            End Try
        End Sub

  • Formatted search to update item description in Purchase order document

    Hello Everyone,
       Has anyone developed a formated search to update the item description field on the PO or SO document?  I need to change the  standard Item Description  based on the BP catalog number but cannot seem to get it to work.  I know to change it using the screens you need to enter CTRL+TAB to move from the field without triggering a lookup process but do not know how to do this in a formatted search.  Has anyone tried this?

    Hi,
    You may check this :
    BP Catalog Number in 8.8
    Thanks,
    Joseph

  • User Defined Field that gives the date output of the last price update.

    We would like to create a User Defined Field (UDF) with a Formatted Search (FMS) on the Item Master form that gives the date output of the last price update specifically the wholesale price.
    Last Price Update
    Pricelist 2 = Wholesale
    Is this feasible?
    If it is feasible what is the recommended approach?
    Current working UDF on Item Master.
    /* Date output is based on all the latest updates on the Item Master.*/
    select max(updatedate)
    from aitm
    where itemcode = $[oitm.itemcode]
    Resources that were helpful.
    1.(Note:1165947 - Tracking Item Price Changes.)
    2. Case 4-I6: Query on price updates. Mastering SQL Queries for SAP Business One By: Gordon Du

    Thank you Gordon,
    We are looking for the date output of the 'Last Price Update' based on 'Pricelist 2 = Wholesale' which is the challenge.
    These 2 are the parameters for the date output, I should have mentioned that in my original message.
    Last Price Update
    Pricelist 2 = Wholesale
    Per reading a bunch of other similar Forum Questions it looked like it is might not be possible to do. With there being no date on the AIT1 table and AITM.Updatedate is based on any and all updates not just last 'Last Price Update' and not sure how to use the loginstanc.
    Thanks,
    Vern

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

  • 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 per SDK

    Hello,
    thank you very much for your effort and valuable time in advance.
    I have a question concerning formatted searches.
    Is there any possiblity to add formatted searches per SDK?
    What's about UserQueries and UserDifinedValues? Could these object be used to add new formatted searches?
    Best Regards
    Vural Özmen

    Hi Vural,
    Don't know if it's possible to add User defined Values through SDK, but formatted searches and user querys it's possible. You just need to use the following objects
            Dim oQueryCategory As SAPbobsCOM.QueryCategories = oCompany.GetBusinessObject(oQueryCategories)
            Dim oUserQuery As SAPbobsCOM.UserQueries = oCompany.GetBusinessObject(oUserQueries)
            Dim oFormattedSearch As SAPbobsCOM.FormattedSearches = oCompany.GetBusinessObject(BoObjectTypes.oFormattedSearches)
    From what I found in the SDK Help file, The UserDefinedValues is a member of the FormattedSearch object but, has I said above, I've never used it.
    Regards,
    Vítor Vieira

  • Replace system formatted search

    Hi experts,
    I need to delete a formatted search which is predefined in SAP.  Is this possible?  I want to replace the formatted search to get data from another table.
    The field I am talking about is the 'Project' field in the Cost Accounting tab of the Fixed Asset Master Data.
    Any ideas please?
    Thanks,
    vankri

    Hi Vankri,
    Yes, you can remove the predefine FMS. But you have to do it manually. To remove FMS on attached field press ShiftAltF2 and then select first option Without Search in User-Defined Values then press OK.
    Regards,
    Datta Kharat

  • User defined properties not showing up in design center

    Hello,
    I did a search on User Defined Properties in this forum but couldn't find my answer.
    We are using OWB 10gR2.
    I already added a user defined property called UD_ALTERNATE_SCHEMA to the TABLE class definition.
    I signed on as repository owner, I switched to single user mode, used OMBREDEFINE on class definition "TABLE", I commited my changes switched back to multi-user mode and signed off.
    Here's the proof (it's in bold):
    OMB+> OMBDESCRIBE CLASS_DEFINITION 'TABLE' GET PROPERTY_DEFINITIONS
    BUFFER_POOL BUSINESS_NAME CACHE_MODE CONSTRAINTS DATA_SEGMENT_COMPRESSION DEPLOYABLE DESCRIPTION FREELISTGROUPS FREELISTS GENERATION_COMMENTS INDEXES INITIAL INITRANS LOGGING_MODE MAXEXTENTS MAXTRANS MINEXTENTS MONITORING_MODE NEXT OVERFLOW PARALLEL_ACCESS_MODE PARALLEL_DEGREE PARTITIONS PARTITION_TABLESPACE_LIST PCTFREE PCTINCREASE PCTUSED ROWDEPENDENCIES_MODE ROW_MOVEMENT SHADOW_TABLESPACE SHADOW_TABLE_NAME TABLESPACE UD_ALTERNATE_SCHEMA UOID
    OMB+>
    Here is how I defined this new property for the TABLE class.
    OMB+> OMBDESCRIBE CLASS_DEFINITION 'TABLE' PROPERTY_DEFINITION 'UD_ALTERNATE_SCHEMA' GET PROPERTIES (TYPE,DEFAULT_VALUE)
    STRING NO
    My question is this.
    Shouldn't this new property be available for edit when I right-click on a table object in the GUI interface and then choose "Properties" and then choose "User Defined" tab? Unfortunately it is not showing up on any of my tables in any of my projects.
    Did I miss a step here? Or did I completely misundestand the concept of "User Defined Properties"?
    Thanks

    As so often happens, I found the answer almost immediately after posting this message.
    In the user defined tab, I hadn't clicked/selected a table. Once I clicked on a table object, my brand new user defined property appeared.
    Sorry to have waisted your time. I was really tired yesterday afternoon when trying all this.
    Thanks

Maybe you are looking for

  • How to display multiple reports at the same time

    Hi, I'm trying to display multiple reports at the same time, each one in separates tabs or windows using Forms 11g 11.1.1.6 I have a button which has a call to a procedure which makes use of rp2rro library to show the specific reports, for example: c

  • About label Oracle Map Builder

    Hello! I have a question about Oracle Map Builder. There are three layers in basemap: the first - a polyline, the second - a point, and the third - a polygon with a solid color (top). Labels are included to the first two signatures. While viewing the

  • RV042G cannot support more than 2-3 IPSec Pass through connections

    Hi, I'm trying to figure out what the max number of IPSec VPN pass through connections the RV042G can handle.  We bought an RV042G router to replace our old RV042 box which was running into connection limitations.  There are approximately 15 people i

  • USING NOKIA BH-101 WITH LANDLINE

    I am trying to use a Nokia BH-101 Bluetooth headset with my landline telephone, a Siemens Gigaset S685.  I have activated Bluetooth on the telephone and paired it with the Nokia, which now appears in the Known Devices on the telephone.  However, when

  • Reg the FM:-  IDOC_INBOUND_ASYNCHRONOUS

    Dear experts, After creating the idoc using the FM  IDOC_INBOUND_ASYNCHRONOUS I want to know the IDOC number that was generated. COudl any one help me in this regard.