Using Second Column of Formatted Search

Hi All,
i have a query for formatted Search, which goes like This
"Select ItemName, ItemCode from oitm"
When i press Tab on the field 'Product No.' in 'Production order',
i get the CFL of ItemName and ItemCode.
when i select one row from this, i need to capture the ItemCode
in the field 'Product No.' (By Default it captures the first Column i.e ItemName)
Any suggestion are most welcome
Regards,
Mahendra

Mahendra,
By default it will fetch the first column only. one workaround what you may not like to use is, to define a user defined field in production order form and give an FMS there. ther you show the itemname first as you have written, and give an Auto refresh FMS on production order field where you change it to itemcode when item name is selected.
HTH,
Regards,
Binita

Similar Messages

  • Is it possible to fetch matrix column through formatted search in UDF?

    HI,
    Is it possible to fetch the value of first row of quantity column in user defined field through formatted search?
    SELECT $[$38.11.number]
      does work but in user defined column of matrix only. I have requirement that when there will be only one row in matrix, the quantity should be accessible in user defined field. and for this, the above query gives internal error.
    thanks and regards,
    Binita

    David,
    I used the query sent by you and further facing following problem. may be my filtering is on wrong parameter.
    SELECT $[rdr1.quantity] * $[ordr.u_qty1.number] from ordr o, rdr1 r where o.cardcode= $[ordr.cardcode] and r.itemcode = $[rdr1.itemcode]
    this query gives correct result when assigning to matrix column.
    when I applied the same query to user defined field, then after selecting the row as suggested by you, it does give value but, in this case, it takes it from rdr1 instead of from matrix.
    for example, I have selected item A001 in matrix. if that item is already there in rdr1, then it fetches its quantity from table instead of that provided by me in matrix's quantity column
    Please guide further,
    thanks in advance,
    Binita
    Edited by: Binita  Joshi on Jun 5, 2008 2:45 PM
    even
    SELECT $[$38.11.number] * $[ordr.u_qty1.number] from ordr o, rdr1 r where o.cardcode= $[ordr.cardcode] and r.itemcode = $[$38.1.0]
    is not working. no clues.

  • How can i get totals in columns with formated searches

    How can i do this with SDK if it isn´t posible since formated searches

    This is not possible with formated searches.
    With SDK, depends on if it is Matrix or Grid, on if it is a system form/your own form. But basically, loop throw the form or datasource, and do the sumatory.
    Regards,
    Ibai Peñ

  • Formatted Search - Sales Order - UDF

    Hi, I need to now if is possible, when I create a new Sales Order and I chage the Sales Employee on the drop down list I can catch the new sales employee selected and use it in a formatted search that is attached to a UDF, all this without saving the new created sales order...
    Is any way to catch a value in an active window and attach it to a UDF? for example the current selected sales employee?
    Thank you!

    Hi Gordon, its work's! many Thanks!
    Another question... you now if it is possible to update a field that have a FMS attached wen 2 event's happens?
    For example, I want to change the value of the commission % column when the user change the sales employee drop down list and when the user add a new line to the sales order... in this moment only works when I change the Sales employee, wen I try to add a new row it dont fill in the right commission %.       
    SELECT DISTINCT
    CASE
         WHEN $[ORDR.SlpCode]=6 THEN 6
         WHEN $[ORDR.SlpCode]=7 THEN 7
         WHEN $[ORDR.SlpCode]=8 THEN 8
         WHEN $[ORDR.SlpCode]=9 THEN 9
         WHEN $[ORDR.SlpCode]=-1 THEN -1
    ELSE 0     
    END
    FROM RDR1
    WHERE RDR1.ItemCode = $[RDR1.ItemCode]
    Thank you!

  • 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 Inventory Posting

    Dear Experts,
    I have a FMS on inventory posting distribution rule, its supposed to display the distribution rule automatically for the items, without human intervention.  How can I set this to auto-refresh ?  since when using this form virtually no column is normally touched apart from the reconcile button.
    Edited by: Roc on Apr 8, 2010 4:27 PM

    Hi Gordan,
    we have upgraded SAP B1 2005 to 2007 - we are using old query for formatted search for items in marketing document - can in that cancelled items also reflecting - can you please correct that query where i dont want to reflect cancelled items.
    SELECT T0.[ItemCode] AS 'Item No.', T0.[ItemName] AS 'Item Description', T0.[UserText] AS 'Item Details', T0.[OnHand] AS 'In Stock' ,T0.PrchseItem,T0.SellItem FROM  [dbo].[OITM] T0  WHERE (T0.[UserText] Like N'%[%0]%'   ) AND  (T0.[UserText] Like N'%[%1]%'   ) AND  (T0.[UserText] Like N'%[%2]%'   ) AND  (T0.[UserText] Like N'%[%3]%'   )
    Thanks

  • Formatted search which perform calculation

    hi all,
    i want to design formatted search which does Arithmatic calculation of two user defind field  and display result in third UDF.
    i have designed formatted search but it gives internal error .
    Is there diff. syntax for using arithmatic operator in formatted search.
    i want to add,sub,mul runtime values from two UDF and display result in third UDF.
    please give me example.
    TIA.
    Chetan.

    Hi Chetan,
    Use the following syntax after eliminating / from it,
    /$[/$38.U_UDF1.Number]-/$[/$38.U_UDF2.Number]
    Regards,
    /Siddiq

  • Formatted Search that will change the Tax code in SO.

    Hi All,
    I have a requirements that will allow me to change the Tax Code column via formatted search. Like for exmaple, i have 50 line items in SO and the tax code is ZO. If i want to change the tax code, i will select it for individual items. Anyone can help me to have an alternative solution that will prevent me to change it per item.?
    thanks and regards,
    vin

    Hi Melvin........
    You can have a work around for this....
    Just create a UDF say U_Tax at Header level...
    Just Create a FMS for Tax Code say..
    SELECT *  FROM OSTC T0
    Save this tax code FMS to thus UDF.
    When yo select a particular Tax Code in this Field through this saved FMS
    this Tax Code gets copied to each and every line say for 100 lines also.
    For this you have run other FMS which is below...
    SELECT $[ORDR.U_Tax.0]
    Save above FMS in tax Code field say in Sales Ordr form.
    Now when you do this you can see if you have 100 line items and you want to copy same tax code in a single click you have to just select single tax code via FMS in U_Tax as i suggested.
    The moment you select this Tax Other FMS will be fired and the same will be copied to other 100 lines....
    Hope this will help you.....
    Regards,
    Rahul

  • 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

  • Display column total on the header using Formatted Search

    Hello,
    I'm trying to create a FS on a Sales Order header (UDF) that will summarize a
    column from the row level.
    For example, I'd like to display the sum of the quantity in the header.
    I've tried the following syntax: Select sum($[$-38.11.NUMBER]) but I get
    only the first line as query result and not sum of all lines.
    Is it possible to get the column total using FS? If so, what should be
    the syntax?
    Thank you in advance,
    Maya

    Columns totals are not possible to get through formatted search as the data of the first row is only referenced by the system automatically.
    If you are needing the Sum of LineTotal for a Approval procedure, then you could use the Total Before Disc col which is actually the sum (line total)
    Access by
    SELECT $[$22.0.Number]

  • Can Formatted search be used in this situation?

    Dear Experts,
    I have defined a row level UDF called DIA. I input dia values in goods issue. Hence it is stored in ige1 table. When I receive those items in Goods Receipt, the Dia Column found blank. I need to have the dia value entered in IGE1 in Goods Receipt form.
    Its some what like this.
    Itemcode    Qty    DIA
    a001          10       12
    b001          20        20
    c001          10       22
    When I receive these items after the specified process, I make entry in Goods Receipt based on PO No,. That time, the form
    shows blank value in DIA field. I need the DIA values entered for the Items to appear automatically from IGE1. Can I do this using formatted search. Please advise.
    Thanks in adv.
    Anand

    As I understand, you want to make a goods issue transaction entering these values into the document rows and in an independent transaction (I could not catch it is a goods receipt or a goods receipt PO) to get these values.
    First you should make a reference in the second transaction to the original one. The best is to define a header level UDF where you can write the DocNum of the original goods issue transaction (assuming you are using unique document numbers). We can call it e.g. U_SourceDocNum.)
    Then you make an FMS like this:
    Select  R.U_DIA from IGE1 R inner join OIGE I on R.DocEntry=I.DocEntry
    Where I.DocNum=$[OIGN. U_SourceDocNum] and R.ItemCode=$[IGN1.ItemCode]
    And set it autorefresh when SourceDocNum is changes.
    (The user should fill the SourceDocNum after filling the document lines!)
    In the code I used OIGN and IGN1. If you use goods receipt PO in the second steg, you should replace them with OPDN and PDN1.

  • Addition of two rows values in table  using formatted search

    hi all,
            i have created one UDF field in market document rows, now in AR invoice i need to add the values in the UDF fields of two rows, want to show it in anather outside UDF in title. kindly suggest me some query to track that.
    Ex:- i had entered two items in rows and
    for first UDF row i have given 20
    for second UDF row i have given 30.
    now i need to show sum of the two UDF in two rows in title UDF.
    kindly give me some query used for formatted search to do this task.
    regards
    sandip

    Sandip,
    To the best of myknowledge When you try to take the row value to the header the results of the Formatted Search are not consistent.
    but for your interest, I am giving below the logic to work this out.
    You need two Header level user fields.  One to copy the row user fields value and the other to store the sum.
    You can create a simple SQL "SELECT $[$38.U_UserFieldName] (substitute with row level user field name) and attach it to the first header level user field and make it Auto refresh on doc total.
    Then Attached SQL  "SELECT $[ORDR.U_HeaderUserField1] + $[ORDR.U_HeaderUserField2]"
    The results could be flaky because the header user field takes the value of the active row and sometime it only considers the first row active though you might be entering the second row of data.
    My recommendation would be to Use The Transaction Notification Stored Procedure for this by which you can be absolutely sure that the Header User field will have the sum.
    Let me know if you need directions for this.
    Regards
    Suda

  • UDF - formatted search help using query

    I've created a UDF for 'activities' called U_BP_Link - it has a formatted search query which simply displays all data in the OCRD business partner database.  I wanted to also fill in a UDF which would display the 'description' of the BP that was selected in the U_BP_Link field.  I'm having trouble coming up with the correct syntax for the query associated with the UDF name field.  This is giving me a syntax error near $[$U_BP_Link]................
    SELECT T0.CardName FROM OCRD T0 INNER JOIN OCLG T1 ON T0.CardCode = T1.U_BP_Link Where T0.CardCode = $[$U_BP_LINK.1.0]

    Good Day,
    I don't fully understand your situation.
    I'm thinking you have 2 UDFs. One is OCLG.U_BP_Link and the second is the 'also fill in a UDF' and that is to be populated with OCRD.CardName based on data entry in OCLG.U_BP_Link
    That being the case, I would create a FMS on OCLG.U_BP_Name field to:
    1) Search in Saved Query - create query similiar to SELECT OCRD.CardName FROM OCRD, OCLG Where OCRD.CardCode = $[OCLG.U_BP_LINK] FOR BROWSE
    Create and test the query and after results are generated as expected, substitue the $[OCLG.U_BP_LINK]. The query will error in SAP but is OK for use in FMS.
    2) Auto refresh when Field Changes
    3) Based on field OCLG.U_BP_Link - actually the description for this field.
    4) Display saved values
    It could work.
    M

  • Selecting the Description field for a UDF when using a formatted search

    I am trying to pull the Description field from a UDF on CRD1  in a formatted search in marketing documents.
    Here is my current query but I do not know the correct syntax to pull the description instead of the code from the UDF.
    SELECT T1.[U_ISEName]  FROM OCRD T0  INNER JOIN CRD1 T1 ON T0.CardCode = T1.CardCode
    Any help would be appreciated.
    Thanks
    Steve

    Gordon
    I tried your suggestion. On CRD1 I created a FS to pull the name from the OSLP tabel. I then used your query on the sales order to pull the stored value on CRD1.
    but now I am getting this error message
    1). {Microsoft]{SQL NativeClient} ][SQL Server] Invalid column name 'U_ISE'> 2) {Microsoft]{SQL NativeClient][SQL Server] Statement 'Sales Tax Codes' OSTC (s) could not be prepared.
    The name appears to pull
    Any suggestions.
    Thanks
    Steve

  • Retrieving the value using formatted search

    Hi everyone. I have a question regarding on how I can get the value of the user-defined field in the title of a marketing document. I would like to get the value using formatted search and sql query.
    Here's the format I am currently using.
    $[$ <Item>.<Pane>.<Variable>]
    Is my format correct? Thanks.
    Regards,
    Omann

    Hi Omann,
    You can refer to fields in an entry screen using the syntax
    $[Table name.Field name]
    The table name is the name of the table belonging to the entry screen, for example, OINV for the A/R invoice entry screen.
    You can also use the fieldu2019s item number and fieldu2019s column number to refer to a field on the entry screen. By doing this, the query applies to all document entry screens. The syntax is then
    $[$Fieldu2019s item number.Fieldu2019s column number.NUMBER/CURRENCY/DATE/0]
    The system is able to uniquely identify each field of a document using the fieldu2019s index number and fieldu2019s column number. If you have activated the debug information under View  Debug Information, the system displays the fieldu2019s item number and the fieldu2019s column number in the status bar.
    You use the NUMBER parameter if the field concerned contains an amount and a currency key, and you want to extract the amount only. 
    You use the CURRENCY parameter if the field concerned contains an amount and a currency key, and you want to extract only the currency key.
    You use the DATE parameter if the field concerned is a date field and you want to use it for calculations.
    Regards, Yatsea

Maybe you are looking for

  • Office Standard 2013 Key Management Service host 32-bit or 64-bit version ?

    Hello, I have a 2012 DomainController serving as our KMS host. I need to activate 2013 Lync 32-bit clients so I will have to install the office 2013 KMS host. The KMS host download is available in both 32-bit and 64-bit. Should I download the 64-bit

  • Creating a time tracking graph in Numbers

    I need to make a chart of an employee's time into work.  I tried inputting time format but didn't graph/chart it. How do I do this AND show the expected arrival time (they've been coming in late). Thanks

  • Process Management Task flow fail

    Hello I am tring to set a task flow to iniciate all the month of the year, but what ever I put in url. the task fails What are the parameters that work, what value Action start and then review 1 I hope that some body could help sofia

  • Will the Apple iPhone 4 Universal Dock Adapter 3-Pack fit into the 3GS dock?

    I used to have an Iphone 3GS, so I bought a dock for it. Since getting the Iphone 4, it does not fit in the 3GS dock b/c the edges are sqaure. If I bought this three pack, can they be inserted into the 3GS dock in order to charge my Iphone 4 in that?

  • Login denied to virtual machine as root

    When I try to login to an virtual machine by console,I cannot login as root using the password when I set in creation. Why? Thanks, Mary