Format Search in sales doc

I need add a FS in a field in marketing docs, for example invoice.
When the field INV1.UseBaseUn = ¨No¨ then show the result in OITM.SalUnitMsr else OITM.SalPackMsr
This in X field into lines.
I try with:
SELECT
CASE
WHEN a.usebaseun = 'No'
THEN OITM.salunitmsr ELSE OITM.salpackmsr END
FROM INV1 a WHERE $[oitm.itemcode] = a.itemcode
AND with:
SELECT
CASE
WHEN $[$38.12.0] = 'No'
THEN a.salunitmsr ELSE a.salpackmsr END
FROM OITM a WHERE $[$38.12.0] = a.itemcode
But not works......anyone suggest something ?

Hi Carlos,
Have you tried 'N' instead of 'No', I didn't check but the value in the table is usually Y for Yes and N for No.
Givge it a go.
Jesper

Similar Messages

  • 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

  • Issue with Formatted Search and Sales BOM

    Good afternoon,
    One of our customers uses a Formatted Search on the Sales Order row to lookup the Project Code stored against the Item.
    This works very well, except for when a Sales BOM is selected.  I assume the FS lookup is working correctly, but the screen is quickly refreshed to list all the component items related to the BOM.  This process appears to overwrite the contents of the Project field.
    We wish to keep this functionality, but retain the FS lookup results in the Project column.  Could the order of the process be changed so that the BOM refresh occurs prior to the FS lookup.
    Thanks
    Greig
    Edited by: Greig Burrows on Jul 21, 2010 5:57 PM

    Hi,
    For metadata, which metadata are you not seeing? Are they custom properties within the PDF, and have you checked if you have crawled properties matching these?
    I know there's issue with last modified on PDF's (http://sharepointfieldnotes.blogspot.no/2013/05/understanding-and-getting-sharepoint.html) 
    Thanks,
    Mikael Svenson
    Search Enthusiast - SharePoint MVP/MCT/MCPD - If you find an answer useful, please up-vote it.
    http://techmikael.blogspot.com/
    Author of Working with FAST Search Server 2010 for SharePoint

  • Copy Formatted Searches From Sales Order To AR Invoice

    I have a series of formatted searches attched to the Sales Order.  Is there a way to copy these to another document program like the AR Invoice without having to manually assigning them to each individual field.
    Thanks,
    Tom Arnold - ECS

    Thomas,
    I don't think Copy Express is the tool for this.  Copy express is mainly used to company Configuration, User Settings, PLD, etc from one company DB to another.
    To copy FMS from one document type to another is a manual effort.  You need to manually open the document and link the FMS.
    Also make sure that the if the FMS has form refereces they should be Dynamic.  What I mean is...If you are referencing the CardCode on the Sales Order...you SQL code should not have syntax  $\[ORDR.CardCode]...This will only work on the Sales Order.
    You need to make it generic....$\[$4.0.0]..this way it will refer to the Card Code when added to any marketing document.
    Suda

  • Extra Formatted Search per field?

    Hi Experts,
    Currently we have a formatted search on Sales Orders which runs if you press SHIFT+F2 when in the item code field (or press the magnifying glass).
    It shows us the most recent items that the customer has purchased.
    Is it possible to add another formatted search to that field which will run if we use a different shortcut (i.e. SHIFT+F3)?
    Thanks
    Greig

    Hi Greig,
    A nice feature from you post.  However, one UDF can only assigned one FMS for current B1 design.  You probably need to create another UDF if you have another logic.
    Thanks,
    Gordon

  • Formatted search Auto update based on copy to next document

    Hi all,
    I have a formatted search on Sales Order. I want this formatted search to update/trigger when a Sales Quotation is copied to a Sales Order. Is this possible. I tried using Sales order document number but under auto refresh when field change but didn't work. Looks like it's not possible to trigger a FS simple by opening a new document creation screen. In this scenario using sales order due date is not ideal.
    Thanks all

    Hi Nagarajan,
    I don't think the code of the FS matter. Its about whether a FS can be triggered without doing anything more once a quotation is copied to sales order.
    Thanks

  • Conditional Formatted Search

    We have a formatted search in Sales Order to pull the Ship To Code from Sales Quotation based on the line #. But we want the formatted search NOT to happen for certain customers.
    How can we write a conditional formatted search so that when this condition is met, this formatted search does NOT carry out?
    thanks!

    Hi Yi Liao,
    try to use IF ELSE condition in the query.
    cheers,
    erwine

  • Formatted search calculation

    I am trying to add a formatted search to sales order rows that takes the sales order qty times a user defined field which is a varchar field. I tried the following which does not work. Can anyone help.
    cast(u_salescaseqty as dec(18,6)) * $[$38.11.0.number]
    Thanks in advance

    Keith,
    I just gave you the format, t actual query should be
    CAST($\[$38.u_salescaseqty] AS DECIMAL(18,6)) * $\[$38.11.Number]
    I believe the u_salescaseqty is available in the document rows level.  Also make sure both your user fields are visible and active. 
    Let me know how it goes.
    Another way to check if the values are being passess to the Query is to manually test the FMS.
    Steps;
    Attach the Query to U_ExtCaseQty field
    Then After entering the details of the Items in the row, keep your cursor on this user field (U_ExtCaseQty )
    Go to Tools > Queries > User Queries > and open your saved query.
    By this you can see if the field values are being passed and the formats are correct.
    Let me know
    If need be you can send me the screen shot of the query and the form to [email protected]
    Best wishes
    Suda

  • Read item code from Sales Order with formatted search

    hi,
    i'm tring to read tha values of the item or items of a sales order (before save it) with a formatted search.
    i have no problem to read the value of card code or cardname but i can't read the item's value.
    i tried with this [code]Select $[RDR1.ItemCode][/code]  (i found it on the forum) but it doesn't work.
    somebody can help me ?
    thank you

    Hi, Alessandro!
    I think the trouble is that you are trying to assign a FS to the header of the document. You are getting the information of the current row, so you have to bind a formatted search to some column of the "table - part" of the document.
    And also you can try:
    SELECT $[$38.1]
    38 - the value of "Item" (when you point a mouse to the cell, information you want from)
    1 - the value of "Column" (the same...)
    It will get an info of this cell in a current row.
    HTH!

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

  • Sale Quotation Formatted Search displays correctly but does not update OQUT

    I have a formatted search, intended to show a deposit amount of 50% for the document total, and refresh whenever the doc total changes. It displays correctly on the Quote header screen UDF area, but OQUT does not update. Pressing Shift-F2 returns 'internal error'. The first time the Quote is entered the right value gets in OQUT, but never gets updated after that.
    The UDF is OQUT.U_Deposit. The formatted search query is:
    Select ($[$33.88.number]*.05) and it is set to refresh reglaurly when Document Total changes.
    Thanks for helping to figure this out

    Which field are you referring by
    $[$33.88.0]
    The screen variable for
    Document Total  $[$29.0.Number]
    Total Before Discount $[$22.0.Number]
    Also I notice for 50% you have used .05 which is actually 5%
    Try this query 
    SELECT ($[$-29.0.Number]*0.5)
    The minus is needed since it is a UDF on the header which is a seperate window.

  • Formatted Search to pull Sales Order Remarks field onto Purchase Order

    Hi Guys,
    I need a formatted search for a Purchase Order remarks field, which will pull the remarks field from the linked Sales Order
    (When a PO is done through the logistics tab of the Sales Order)
    I have made this query but it is not working:
    SELECT distinct T0.[Comments] FROM ORDR T0 , POR1 T1 WHERE T0.[DocNum] = T1.[BaseRef]
    It is just pulling the remarks for the first sales order - purchase order link.
    Any help will be appreciated.
    Thanks
    Best Regards
    Dario Moutinho

    Hi Dario Moutinho,
    Try:
    SELECT distinct T0.Comments FROM ORDR T0
    WHERE T0.DocEnthy = $[POR1.BaseEntry\]
    Thanks,
    Gordon

  • Delivery - Sales Order executes formatted search

    Hi
    Found a very strange behaviour of B1:
    When making a new Delivery, which contains a formatted search in the lines, based on an sales order the value of the delivery  (position) gets newly calculated -> the formatted search gets executed!. This is imho very very strange because when referencing an order i want the value SIMPLY from there (All other fields get copied too).
    the formatted search is based on a saved query:
    SELECT $[$38.11.NUMBER]*$[$38.U_AnzMenge.NUMBER]
    -Autorefresh Yes
    -When altering Column
    -Display Saved Values
    Any suggestions?
    TIA

    Hi there,
    Can try:
    SELECT 'Price'=CASE WHEN $[$38.44.NUMBER]=0 THEN 2*2
    ELSE
    (SELECT T0.Price From RDR1 T0 INNER JOIN ORDR T1 ON T0.DocEntry=T1.DocEntry
    WHERE T1.DocNum=$[$38.44.NUMBER] AND T0.ItemCode=$[$38.1.0])
    END
    This query only workable for local currency or currency specify in your Delivery Order. If your Sales Order line detail have different currency then you will need to modify the query.
    Hope this help...

  • Formatted Search query on Sales Order Lines

    Hi Experts,
    I have a client that needs a Formatted Search that will bring back values according to the following Scenario:
    The Formatted search will be placed on the Sales Order Lines RDR1.U_UPC field.
    On a Sales Order I have created UDFs: RDR1.U_Label and RDR1.U_UPC
    On the BP Master Data I have created the UDFs: OCRD.U_UPCChoice
    On the Item Master Data I have created the UDFs: OITM.UPCRetail and OITM.UPCLoc and OITM.UPCItem and
    OITM,UPCOther
    When the RDR1.U_Label field is '1', I need the RDR1.U_UPC to be the text 'not Applicable'
    When the RDR1.U_Label field is '2', I need it to look at the OCRD.U_UPCChoice.
         If that value is '1' then it must bring back the OITM.UPCRetail Value back in the RDR1_UPC field,
         If that value is '2' then it must bring back the OITM.UPCLoc Value back in the RDR1_UPC field,
         If that value is '3' then it must bring back the OITM.UPCItem Value back in the RDR1_UPC field,
         If that value is '4' then it must bring back the text 'Look at Attachment'
    Any help would be greatly appreciated.
    Thanks,
    Marli
    Edited by: Marli Schutte on Aug 31, 2009 6:29 PM

    Hi Marli,
    Try this:
    IF $[RDR1.U_Label] = '2'
    SELECT Case T0.U_UPCChoice
    When 1 THEN T1.U_UPCRetail
    WHEN 2 THEN T1.U_UPCLoc
    WHEN 3 THEN T1.U_UPCItem
    WHEN 4 THEN 'Look at Attachment'
    END
    FROM dbo.OCRD T0, dbo.OITM T1
    WHERE T0.CardCode = $[$4.0.0] AND T1.ItemCode = $[$38.1.0]
    Thanks,
    Gordon

  • Reference sales order cogs line level field in formatted search

    I want to reference the COGS field on the sales order in a formatted search.
    when I turn on system information and hover my mouse over the field I see the following:
    column: 210000338
    when I deference the column in a formatted search
    select $[$38.210000338.1]
    an error results.
    any ideas?

    Post your complete query here.  It should work.
    Thanks,
    Gordon

Maybe you are looking for

  • Script total in only final page

    Hi I am working on scripts. Output i am having 4 pages, i don't want the totals for each page and also no of lines. <b>How to display totals, in only Final page.</b> Rgds Chinna

  • Sun StorEdge L8 Tape Library (UREGENT!!)

    hi all help needed.. i am new in this.. i ahve to do backup in the Sun StorEdge L8 every weekend.. as usual i will unload the Tape 1 and load the Tape 2 for this weekend backup.. Recently the tape shows '!' at the Tape 2.. when i try to unload the Ta

  • Custom fonts in html/javascript

    Is this possible? I tried it and couldnt get it to work with following code: <style> @font-face { font-family: "Kimberley"; src: url( http://www.princexml.com/fonts/larabie/kimberle.ttf) format("truetype"); div { font-family: "Kimberley", sans-serif

  • Issue with HCM Forms

    Hi We are implementing HCM Forms and Process. We have landscape EP7 SP18 and ECC6 with HR600. We have done all the Adobe configuration, credential. All the test are successful on portal and R/3. But we are not able to see adobe form on portal,when we

  • Trying to update iphone 4s downloaded ios7 but now its telling me to conect my cord and it is coneceted

    tryed to update my 4s with ios7 downloaded the sofeware but when it tryed to download it to my phone its telling me to coneted my cord and it is coneted?