Formatted Search Help

Hi,
Kinda new to this formatted search. Can anyone help me with this question.
I want to make a formatted search to make a column in sales order 'U_ItemType' so that if it is not null/if it is gift or sample, it will enter the value 'Y' in U_FOC. How do i do this?
Also can anyone point me to any resource to learn up on formatted search.
Thanks

You will need to create a query something like:-
[code]SELECT CASE $[$38.U_ItemType.0] WHEN 'Gift' THEN 'Y' ELSE 'N' END[/code]
This will need to compare the value of the U_ItemType in the current row to any conditions you want (eg. = 'Gift'), and return appropriate Y/N value.
Next you need to define the FS on the U_FOC field.  When defining it you probably want to set:-
-Search By Saved Query (select query created above)
-Auto Refresh = "Y"
-When existing column altered
-Column = "U_ItemType"
-Display Saved Values
You can find out more about formatted searches in some of the online training courses available on the service marketplace (http://service.sap.com/smb).  The training courses are available in the Education section under the heading "Learning Maps / Development Consultants".
Regards,
John.

Similar Messages

  • 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

  • Formatted Search Help required

    Dear All,
    I have a specific requirement by which I need to track out the Estimated Cost which is put in the Sales Order Row with a Udf vs the PO Cost been involved for a particular project in terms of Purchase Orders been raised in the system for that particular Sales Order No. Basically we want to know that if the Sales Order Estimated Cost is 100 then the PO should not be allowed to make for more than 100.
    In the Sales Order row I have an Udf called Estimated Cost U_ ESTCOST and users fill in every line item the Estimated Cost for that particular Sales Order.
    Now I have made the following Udf in Purchase Order Header as under :
    Sales Order Estimated Cost  as U_ORDESTCOST
    PO Cost U_ POESTCOST
    Now in the Sales Order Estimated Cost udf which is there in the PO header I want the sum up of the row which is been put in Sales Order Estimated Cost U_ ESTCOST for that particular BP project. Can formatted search be used wherein if while making the Purchase Order Sales Order Estimated Cost udf U_ORDESTCOST is updated when in the Purchase Order Accounting Tab BP Project Is put. The requirement is that if in the BP Project e.g 10001 is put then the formatted search should search the ORDR table which also has the same BP Project 10001 in the Accounting Tab selected and then from RDR1 its should sum up the Estimated Cost U_ ESTCOST.
    Now in PO Cost U_ POESTCOST field I want to have the total sum means Document Total of all the PO been made in the system till date for that Particular BP Project e.g 10001
    Kindly advise what best can be done so that we are properly able to control the system
    Regards,
    Venky

    Dear Gordon,
    Thanks for bearing with me.
    Let me just break the requirements.
    Now a New Sales Order is booked which is as under
    Sales Order Document Number - 10001
    Row Details as under :
    Items     Qty   Row Total  Estimated Cost (U_ ESTCOST)
    Item 1     1          100               20
    Item 2     1          200               30
    In Accounting Tab in BP Project its given 2000
    Hence the the sum of U_ ESTCOST is 50 for order number 10001 whose BP Project is 2000
    Now for the above Sales Order a Manual purchase Order is made in the system
    Purchase Order No 90000
    Row Detail as under :
    Items     Qty   Row Total 
    Item 1     1          100             
    Header has a udf named U_ORDESTCOST which means Sales Order Estimated Cost
    In Accounting Tab in BP Project its given 2000
    Now if you notice the common data which is there both in Sales Order and Purchase Order is the BP Project Number
    I want that whenever a Purchase Order is made in the U_ORDESTCOST field the Sum of Estimated Cost U_ ESTCOST should get filled automatically based on the BP Project which is been put in the Accounting Tab of Purchase Order.
    Means everytime 50 should be updated in U_ORDESTCOST because in the Sales Order where project code is 2000 theEstimated Cost (U_ ESTCOST) = 50.
    See if I want I can make a query but I am not able to use the same in the formatted Search. The query is as under :
    SELECT sum(T1.[U_ESTCOST]) FROM ORDR T0  INNER JOIN RDR1 T1 ON T0.DocEntry = T1.DocEntry WHERE T0.[Project] = [%0]
    The above query if attached is working fine in the Formated Search but due to [%0] its asking me to put the BP project which I want should automatically pick or refresh based on what is put in BP Project in Account Tab in Purchase Order. I think I need the BP Project $ some number....
    Regards,
    Venkat

  • 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

  • Date format error in Search help

    Hi,
    I am using standard search help in my ABAP webdynpro application.It is related to payscale group (field P0008-TRFGR). It works fine if I do not specify any date but gives a error message "Enter date in the format __.__.____ "   irrespective of the date format I use to enter.
    Any pointers ?
    Regards
    Deepak

    Hi Deepak,
    Try following things:
    1) check separator / instead of .
    2) date in format mm.dd.yyyy or dd.mm.yyyy
    3) enter date through search help
    4) enter 0 before one digit month or day i.e. 02/02/2009 instead of 2/2/2009
    Regards,
    Saket.

  • Formatted Search with DI  leads to a very slow performance - HELP....

    Hello There
    I have defined some formatted search in OPCH - everything is working fine.
    I have added some logic to this form via the DI.(handlling 1 item press_event), and I get a very very slow performance - the ADDON-EXE jumps TO 230MEGA of memory, and entering values to each row in the tables/item in the form takes about 15 seconds.
    Any suggestions?
    RGDS
    HAGAI

    Hi Hagai,
    Normally an addon written using the DI would take up 60-80MBs.
    Are you filtering out all events except for the item press event for the form? If you are not filtering events then this can have quite a drastic affect on performance.
    What logic have you got behind the press event? If the addon exe is ballooning out to 230MB then it suggests that there is either a problem with a memory leak or that an error is occuring in the code. I would recommend putting try/catch clauses at suitable places in the code and maybe specifically setting objects to null and calling the .NET garbage collector to try and minimise the potential for memory leaks.
    Are you sure that it is the combination of the formatted search and the addon that is causing the problem, i.e. if you take away the formatted search but leave the addon do you still get poor performance or does everything speed up?
    Hope this helps,
    Owen

  • Search Help error : Invalid field format Screen error

    Hi All,
    I have attached a search help to contract field for contract no and item number. (in my own screen developed in a  report)
    The search help picks up data and assigns it to the fields,
    But after this when I click on any other button, I get error saying :
    <b>Invalid Field Format (Screen Error) !!!</b>
    Any pointers guys !!!
    Warm Regards,
    Girish

    screen checks in abapautomatically checks for format of field when u enter data....i.e date, integer etc...the problem in this case is that when u seelct a value using the help it is filling a value which is not the correct format...so check for the data types and test it again...this is definitely the problem.

  • Help on Formatted Search

    Hi Experts
    I would like to get some help on a formatted search I wish to created which will show the payment terms of a BP in a UDF on the Sales Order form.
    I have created a UDF and applied a formatted search to it which only brings in the record key of the payment terms:
    SELECT T0.[GroupNum] FROM OCRD T0 WHERE T0.[CardCode] = $[$4.1.0]
    Ideally I wish it to actually show me the Payment Group name from the OCTG table.
    Thanks in advance for your help.
    Thanks
    Jon

    Hi Jonny......
            You should use this query.......
    SELECT T1.[PymntGroup] FROM OCRD T0  INNER JOIN OCTG T1 ON T0.GroupNum = T1.GroupNum
    WHERE T0.[CardCode] =$[$4.0.0]
    apppply this to payment terms UDF in sales order.
    Regards,
    Best Rahul

  • Formatted search case statement help

    Hi all,
    I am trying to write a case statement in a formatted search, but am running into an error when I add a condition involving the item code. The code works find with the first WHEN statement involving the customer code $[$4.0.0] however, I receive an internal error when I add the second part involving the item code $[$38.1.1] Please advise.
    SELECT
    CASE WHEN $[$4.0.0] = 'C00023'
    THEN 'E002'
    WHEN $[$38.1.1] = 'ItemA'
    THEN 'J002'
    END
    THank you!
    Jane

    Hi Jane,
    Where do you assign this FMS? If it is on the header, the second condition will not work. If it is line level, try change it to $[$38.1.0\].
    Thanks,
    Gordon

  • Help on Formatted search query

    Hello
    I have a formatted search that is the following to select line of marketing documents example
    select [$23.5.NUMBER]
    when the general setting display decimal separator as "," I have no problem but when decimal separator changes to "." then the formatted search is giving me error because result is [number.000000] too many zeros when it is without zeros with decimal separator set to ","
    How can I have the query run without zeros at the end when decimal is set to ","
    Thank you for your help

    Hi,
    Please advice exact field to check.
    Thanks & Regards,
    Nagarajan

  • Formatted Search Error -  Help Needed

    Hi All,
    My client has a peculiar purchase process. They are into chemical trading and do their purchase as follows:
    The vendor gives discount based on the volume and not on the quantities purchased. Thus, an item X if purchased in 250gm will cost $ 20 while the same item if purchased in 50gm may come to $15. So, the user wants to enter this values in the purchase order and want the unit price to be calculated based on this. Assuming the clients wants 1kg quantities of item X, he would like to fill  250 x gm  @ $20 in separate UDFs and based n these values, the system should calculate the unit rice for this item.
    What I did was as follows:
    a)  I created 3 UDFs each for the Base Quantity (U_BPQty), Base UoM(U_BPUnit),  Base Price (U_BasePrice). Thus the user enters 250, gm, 20 respectively as explained in the above example.
    b) I created one field  (U_UnitQty) to convert the base unit into purchasing unit. For this, I am writing a query to get the conversion factor value into the PO. Thus if the Purchasing UoM is KG and the base unit in which the supplier is charging is G, then I am populating 1000 in this field.   
    c) One more UDF to convert the base price into the unit price is captured is created. So, if 250gm cost $20 and my client wants 1kg, I am first getting the value of 4 in this UDF. This I am getting by dividing the value obtained from the step b) with the value in U_BPQty. 
    Once I get this value, I then calculate the unit price by multiplying 4 with $20 which will populate $80 in my Unit Price field through another FMS.
    I wrote a formatted search for converting this base unit to purchasing units. Given here is the FMS which is giving an error. For the sake of another functionality, I created a UDF for Purchasing UoM as well (U_UoM).
    Declare @UQty as varchar
    Declare @BPC as varchar
    set @UQty = $[POR1.U_UnitQty]
    set @BPC = SELECT
    (Case
    when $[POR1.U_UoM]  = 'kg' and $[POR1.U_BPUnit] = 'kg' then 1
    when $[POR1.U_UoM]  = 'kg' and $[POR1.U_BPUnit] = 'g' then (@UQty/$[POR1.U_BPQuantity.NUMBER])
    when $[POR1.U_UoM]  = 'kg' and $[POR1.U_BPUnit] = 'mg' then (@UQty/$[POR1.U_BPQuantity.NUMBER])
    when $[POR1.U_UoM]  = 'g' and $[POR1.U_BPUnit] = 'kg' then (@UQty/$[POR1.U_BPQuantity.NUMBER])
    when $[POR1.U_UoM]  = 'g' and $[POR1.U_BPUnit] = 'g' then 1
    when $[POR1.U_UoM]  = 'g' and $[POR1.U_BPUnit] = 'mg' then (@UQty/$[POR1.U_BPQuantity.NUMBER])
    when $[POR1.U_UoM]  = 'mg' and $[POR1.U_BPUnit] = 'g' then (@UQty/$[POR1.U_BPQuantity.NUMBER])
    when $[POR1.U_UoM]  = 'mg' and $[POR1.U_BPUnit] = 'kg' then (@UQty/$[POR1.U_BPQuantity.NUMBER])
    when $[POR1.U_UoM]  = 'mg' and $[POR1.U_BPUnit] = 'mg' then 1
    when $[POR1.U_UoM]  = 'kl' and $[POR1.U_BPUnit] = 'kl' then 1
    when $[POR1.U_UoM]  = 'kl' and $[POR1.U_BPUnit] = 'l' then (@UQty/$[POR1.U_BPQuantity.NUMBER])
    when $[POR1.U_UoM]  = 'kl' and $[POR1.U_BPUnit] = 'ml' then (@UQty/$[POR1.U_BPQuantity.NUMBER])
    when $[POR1.U_UoM]  = 'l' and $[POR1.U_BPUnit] = 'kl' then (@UQty/$[POR1.U_BPQuantity.NUMBER])
    when $[POR1.U_UoM]  = 'l' and $[POR1.U_BPUnit] = 'l' then 1
    when $[POR1.U_UoM]  = 'l' and $[POR1.U_BPUnit] = 'ml' then (@UQty/$[POR1.U_BPQuantity.NUMBER])
    when $[POR1.U_UoM]  = 'ml' and $[POR1.U_BPUnit] = 'l' then (@UQty/$[POR1.U_BPQuantity.NUMBER])
    when $[POR1.U_UoM]  = 'ml' and $[POR1.U_BPUnit] = 'kl' then (@UQty/$[POR1.U_BPQuantity.NUMBER])
    when $[POR1.U_UoM]  = 'ml' and $[POR1.U_BPUnit] = 'ml' then 1
    else 1
    end)
    Select @BPC
    I would like to know  where I am going wrong or if there is any simpler method for the above scenario?     
    Thanks and regards,
    Bharath S

    Try the third line change to:
    set @UQty = $[POR1.U_UnitQty.number]

  • Help with Formatted search involving a UDF

    I have a Formatted search which runns the following code:
    exec xsp_nssItemLookup $[$38.256.0]
    This search is on a udf of the Purchase order screen.  (256 is the item details field in the details.
    The above query runs fine.  What I really want to do is to pass the contents of another UDF to the stored procedure.  The USF is called U_NSSItemID.  If I change my stored procedure to read:
    exec xsp_nssItemLookup $[$38.U_NSSItemID.0] however it does not work.  I get blank results every time. 
    I have also tried exec xsp_nssItemLookup $[POR1.U_NSSItemID.0]  which doesn't work either. 
    I can't figure out what is wrong with my syntax.  I don't get any errors, just a blank value.
    Thanks
    don shields

    Suda,
    Thanks for answering so quickly.  To answer your question the data type is Alphanumber which I just figured out is the save as CHAR() in SQL.  My problem turned out to be that I needed to trim the spaces from my parameter.  I was getting values like "cover                         ", and I needted to get "cover".  Problem solved now.
    Don

  • 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

  • How do I create a automatic second page with different layout settings?

    Hi there, I want to create a business letter template with a different second page. I already managed to create a different layout on page nr two, but whenever I write a letter with this template and I reach the end of page one, pages creates a thrid

  • BODS Management Console link in WEBI Report

    Hi All, Need help, can we create a link for BODS Management Console in WEBI report ? Is it possible? I created one but it is not working for me. Ideally, when we click on the link, it should take the user to the login page of Management Console but t

  • Mass change:  iViews Properties (gui type, alias,..)

    Do you  know how I can get the read/write version of the PCD Inspector? (system: EP 6.0 SP2 P4) Thank you. Ciao. Davide

  • .m2ts files into fcp?

    dual 2.7 g5 fcp 6.03 mac osx 10.4.11 I have video files with this extension (.m2ts). video was shot on a sony avchd camera and imported into a pc computer using nero software. I am trying to convert these files for editing in FCP on my mac. I am not

  • Shipping date changed to "unavailable"???

    I started my order at 12:00 am pst- was told sept 19th arrival. Confirmation email says sept 19th delivery date. Checked online order status- it just switched to"unavailable" we ordered a grey 6 64 gb and a grey 6Plus 64 gb. When will my device ship?