Formatted searches on patch levels

Dear experts,
I did my formatted searches on my development database they all work well. on transfering them to my production database they refused to work. I am using SAP Business One 2007 A (8.00.232)  SP: 01  PL: 07. What could be the issue cause its strange why they aint working on my production Database.
Regards

hi suda,
below query works perfect on my development database but on my production i get null values
declare @Price as decimal (13,6)
declare @Price1 as decimal (13,6)
declare @FromWHS as nvarchar (4)
declare @ToWHS as nvarchar (4)
declare @ItemCode as nvarchar(30)
declare @TransitItem as nvarchar(30)
declare @LocalItem as nvarchar(30)
set @ToWhs = $[$13.15.0]
set @itemcode = $[$13.1.0]
select @FromWHS =  (case when isnull($[OIGN.u_FromWarehouse],'') = '' then @towhs else $[OIGN.u_FromWarehouse] end)
select @Price = t1.[stockprice] from ige1 t1 inner join oige t2 on t2.docentry =t1.docentry where @FromWhs = t1.whscode and @itemcode = t1.itemcode and $[OIGN.U_GINumber.Number] = T2.DocNum
select @Price1 = t1.[stockprice] from ige1 t1 inner join oige t2 on t2.docentry =t1.docentry where @FromWhs = t1.whscode and $[OIGN.U_GINumber.Number] = T2.DocNum
select  @TransitItem  = t1.ItemCode from oitm t1 inner join ign1 t2 on t2.ItemCode = t1.itemCode where T1.[QryGroup61]='Y'
select @LocalItem = t1.ItemCode from oitm t1 inner join ign1 t2 on t2.ItemCode = t1.itemCode where T1.[QryGroup63]='Y'
select distinct case
when T0.[U_FromCode] = @FromWHS and T0.[U_ToCode] = @ToWHS and $[OIGN.U_AdjustmentType] ='STX' and @itemcode = @TransitItem and $[OIGN.U_TransportType]='04'
then (T0.[U_RateUSD]*T0.[U_ExchangeRate]) + @Price + $[OIGN.U_BioCoding]
when T0.[U_FromCode] = @FromWHS and T0.[U_ToCode] = @ToWHS and $[OIGN.U_AdjustmentType] ='STX' and @itemcode=@LocalItem and $[OIGN.U_TransportType]='04'
then (T0.[U_Rate]) + @Price + $[OIGN.U_BioCoding]
when T0.[U_FromCode] = @FromWHS and T0.[U_ToCode] = $[OIGN.U_OffLoading] and $[OIGN.U_AdjustmentType] ='STX' and @itemcode = @TransitItem and $[OIGN.U_TransportType] in ('01','02','03')
then (T0.[U_RateUSD]*T0.[U_ExchangeRate]) + @Price + $[OIGN.U_BioCoding]
when T0.[U_FromCode] = @FromWHS and T0.[U_ToCode] = $[OIGN.U_OffLoading] and $[OIGN.U_AdjustmentType] ='STX' and @itemcode = @LocalItem and $[OIGN.U_TransportType] in ('01','02','03')
then (T0.[U_Rate]) + @Price + $[OIGN.U_BioCoding]
when $[OIGN.U_AdjustmentType] ='Con' then
@Price1 + $[OIGN.U_Duty]+$[OIGN.U_BioCoding]
when $[OIGN.U_AdjustmentType] ='Hosp' and T0.[U_FromCode] = @FromWHS and T0.[U_ToCode] = @ToWHS and @itemcode = @TransitItem then
(T0.[U_RateUSD]*T0.[U_ExchangeRate])+@Price1 + (Select T0.U_HospitalityFee from [dbo].[@HOSPITALITY]  T0 where T0.[U_WarehouseCode] = $[IGN1.WhsCode]) + $[OIGN.U_BioCoding]
when $[OIGN.U_AdjustmentType] ='Hosp' and T0.[U_FromCode] = @FromWHS and T0.[U_ToCode] = @ToWHS and @itemcode = @LocalItem  then
(T0.[U_Rate])+@Price1 + (Select T0.U_HospitalityFee from [dbo].[@HOSPITALITY]  T0 where T0.[U_WarehouseCode] = $[IGN1.WhsCode]) + $[OIGN.U_BioCoding]
end
from [dbo].[@TRANSFERS]  T0
order by 1 desc

Similar Messages

  • Formatted search on header level UDF

    Hi All
    How do you call a UDF at Warehouse header level into purchase order row level?
    Thanks
    SV Reddy

    HI,
    and what if the Warehouse code is located in a UDF at header level of the marketing document ??  I mean, how can we access a UDF value in a FMS ?
    We tried the following, but it didn't work :
    SELECT T0.OnHand
        FROM OITW T0
        WHERE T0.ItemCode=$[$38.1.0]
        AND T0.WhsCode=$[$U_Nwr_WH.0.1]
    And it seems that the UDF do not have number assigned to it so we can't use the following syntax
    $[$99.0.1]
    thanks,
    Luce
    Edited by: Luce Veilleux on Nov 26, 2009 4:32 PM

  • Formatted Search on A/R Invoice Row level

    Hi All,
    I need your help to do some arithmetical functions on UDFs.
    I have three UDFs at row level of A/R Invoices.
    U_MRP, U_AssValue (Unit & Totals -> Amount)
    U_abtment (Unit & Totals -> Rate)
    I want to do below process, but it gives me error.
    Select ($($38.U_MRP) - ($($38.U_MRP)* $($38.u_abtment))/100) * $($38.11.0)
    but it gives me error. Can any body help me to correct this query to set on U_AssValue as formatted search.
    Its very urgent & Important for me.
    Best Regards,
    Chintesh Soni

    Hi,
    I tried by creating UDF as u mentioned. For me its working perfectly.
    i will tell u how i created UDF created.
    MRP --> Units & Total --> Amounts
    AssValue --> Units & Total --> Amounts
    abtment --> Units & Total --> Rate.
    Save the query as A/r in query generated.
    Select ($[$38.U_MRP.number] - ($[$38.U_MRP.number] * $[$38.U_abtment.number]) / 100) * $[$38.11.number]
    Called this query in the AssValue, Qty --> 2, MRP --> 123, abtment --> 123 final output --> -58.
    Please remove http:// and add set bracket over there.
    Above query is working fine.
    Sagar

  • 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

  • Problem in Formatted Search

    I have added two UDFs namely ItemCode and ItemName on header level of Profit center form.
    I have attached folwing query to ItemCode for Formatted Search
          select Itemcode from oitm
    I want to display the corresponding itemname automaticaly in itemname field. So I created the folowing query:
    Select oitm.itemname from oitm where itemcode= (select $[$U_ItemCode.U_ItemCode])
    setting is that Auto refresh when field changes (ItemCode).
    Now what result I am getting is as follows:
    if I change ItemCode and goto ItemName, the itemname should change automaticaly, but it doesn't happen. However if I press Shift+F2 here on ItemName it takes the correct ItemName. I want that ItemName should be changes as ItemCode is changed automaticaly...
    I am using a Patch 01.
    plz help

    Amol,
    Please try
    SELECT T0.ItemName FROM OITM T0 WHERE T0.ItemCode = $[[OPRC.U_ItemCode]]
    NOTE: The format is $[[TableName.UserField]] .  Since you have create the User field in OPRC table I am referring to it as OPRC.U_ItemCode
    remove the http:// thats got added.
    Suda

  • Formatted search on grids

    Formatted search on grids does not work.
    I defined formatted search query
             SELECT $[$MYGRID.QTY.0]
    and link it to field DESCRIPTION on the grid.
    I was hoping to get QTY value copied to DESCRIPTION when press SHIFT-F2. but nothing happened.
    Does Formatted Search working on grids? is any work around?
    Thanks a lot
    Fred

    Fred,
    Please have a look at this SAP Note as it pertains to issues with Formatted Searches on grids.  If this issue pertains to you, you will need to download patch level 18 from SAP Business One 2005A SP01 from the SAP PartnerEdge Portal.
    SAP Note# 1005565
    HTH,
    Eddy

  • 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

  • How to display an error message after validation in Formatted Search?

    Hi SBO experts,
    if an error is detected on validation in a Formatted Search, how to display an error message to the user entering the data?
    Thanks & Regards,
    Raghu Iyer

    i created a formatted search query & attached it to the field 'Quantity' at Line Item level in Sales Order screen. just for testing purpose, i eneterd the following code lines in the query validating 'Quantity'
    if $[$38.11.0] > 50
    begin
    select @error = 1
    select @error_message = 'Vendor code cannot begin to X sign.'
    end
    the system throws the error : Internal error (8180) occurred [Message 131-183]
    actually, i need to display an error message to the user if Quantity is not in multiples of the OITM.SalFactor2
    if $[$38.11.0] % (SELECT T0.[SalFactor2] FROM OITM T0 WHERE T0.[ItemCode]  = $[$38.1.0]) > 0
    begin
    select @error = 1
    select @error_message = 'Error in Quantity.'
    end
    but, this expression to get the remainder itself seems to have some error
    $[$38.11.0] % (SELECT T0.[SalFactor2] FROM OITM T0 WHERE T0.[ItemCode]  = $[$38.1.0])
    i guess, % operator is used for modulo (to find the remainder of one number divided by another.) ? am i right ?
    Regards,
    Raghu Iyer

  • Problem With Formatted Search.

    Hi to all,
    I have linked a formatted search to a UDF that lies at row level in AP Invoice. This field is used to display the Sales  Order Price. The requirement is that from SO we create a purchase order and subsequently create a goods receipt and AP invoice.. Now in invoice it is showin perfectly fine whether it is copied from goods receipt or purchase order.. But in the purchase order and goods receipt screen this query will not work. And the same query used in AP invoice is being linked to these documents. Is there any work around for this?? Is it possible to run queries based on the form numbers?? If so ho do i pull the form number in the formatted search query??
    Please Help!!!!
    Regards
    Aris

    I recommend creating separate queries for each document.
    ie
    1 formatted search to lookup price on sales order from AP Invoice
    1 formatted search to lookup price on sales order from GRPO
    1 formatted search to lookup price on sales order from PO
    then change the lookup to pull fields from the document that you are using as a reference.
    when you are building the formatted searhes start by returning the values that are you are using as a reference. That way you are sure that you are pulling the correct information.
    Then layer in the lookup to the sales order.
    If you get stuck I recommend that you copy and paste the formatted search in SQL Server management studio and replace the variables refereces with real values.
    In my experience troubleshooting queries is more effective when using SQL Server management studio. (the error reporting is better).

  • SQL Query -How2bring multiple results into one field using Formatted Search

    Hi Everyone
    i am trying to bring in the results of the field dbo.Lot_ITEM.LOT using a formatted search into a row level using the following query:
    SELECT     dbo.LOT_ITEM.LOT
    FROM       dbo.DLN1 INNER JOIN dbo.LOT_ITEM ON dbo.DLN1.ItemCode = dbo.LOT_ITEM.ITEM
    WHERE     dbo.LOT_ITEM.ITEM=$[DLN1.ItemCode]
    however the result of the dbo.Lot_ITEM.LOT field could be more then one value depending on how many lots are assigned for that item
    (for example this query would be similar to assigning batch/serial numbers to an item being despatched - as you can choose multiple batches/serials depending on the quantities available and required and then move from the left to the right side of the selection window) if that makes sense!
    is it possible to bring in the multiple results into one field? and how can i amend the above query to include this?
    Thankyou in advance :o)
    Edited by: Asma Bi on Apr 23, 2008 7:22 PM
    Edited by: Asma Bi on Apr 23, 2008 7:24 PM

    Hi Suda
    Thanks for replying :o) but im not sure about the query?
    just to simplify it (as the query im working with is to do with 3rd party addons) i have used the serial/batchs field instead and used standard demo database fields from SBO 2005 sp01:
    SELECT     dbo.ixvSerialNoFact.SRI1_IntrSerial
    FROM       dbo.DLN1 INNER JOIN
                    dbo.ixvSerialNoFact ON dbo.DLN1.DocEntry = dbo.ixvSerialNoFact.SRI1_BaseEntry
    WHERE     dbo.ixvSerialNoFact.ItemCode='g1000' and dbo.ixvSerialNoFact.SRI1_BaseEntry = '193'
    The above brings me the relevant results but when i change it to be used in a formatted search:
    SELECT     dbo.ixvSerialNoFact.SRI1_IntrSerial
    FROM       dbo.DLN1 INNER JOIN
                    dbo.ixvSerialNoFact ON dbo.DLN1.DocEntry = dbo.ixvSerialNoFact.SRI1_BaseEntry
    WHERE     dbo.ixvSerialNoFact.ItemCode=$[dln1.itemcode] and dbo.ixvSerialNoFact.SRI1_BaseEntry = $[dln1.DocEntry]
    i cant seem to get it to work - now this may be because the serial number is not allocated until teh record is added to the system, however when this happens i am unable to go back in and manually trigger the query as the delivery note rows cannot be selected!
    i  think as what im originally wanting an answer for is same as this example, im wanting to know if this is even possible?
    Thanks
    Edited by: Asma Bi on Apr 24, 2008 3:53 PM
    Edited by: Asma Bi on Apr 24, 2008 3:55 PM

  • How can I reference value of a field from a diffrent line in formatted search

    I want to use a formatted search for this
    I want to set a field value based on a value from a previous row. ( is this possible at all ?)
    I have a udf called Test at Line Level on AR Order
    The user enters a value for test on line 1
    he will have a lot more lines then after that. all I want is to copy the value in test ( on row 1) to row2 as the user edits say the Item code on that row.

    Hi,
    Unfortunately formatted search is for current line only , you can't reference the previous or next line .
    You can do achieve this with SDK but with FMS not possible .
    Regards

  • Query - Formatted Search in a User Defined Field

    Hi,
    I am having some problems with a very simple query but it doesn't seem to work. I insert this formatted search in to my UDF I made called Cost. The query I am using is:
    SELECT  $[$34.0.0] - (I had to use variable number because this Unit Price field in the Item master data does not have a field name associated)
    It is supposed to grab the unit price from the screen, however it is always displaying zero when I query it, and when I put it in the UDF as a formatted search, it give me the internal error.
    I would greatly appreciate your help.
    Thanks

    Question 1: Where is this Cost UDF defined.  Is it at the Marketing document Header or row level?
    NOTE:
    The field reference for the Unit Price column is incorrect.  When you mouse over the Unit Price column you should see the values for Item=xx  Colunm=xx
    The syntax is $\[$Item.Column.Type].  Therefore for your case it should be $\[$38.14.Number]
    The type prefix can be 0 if you are accessing a Alphanumeric column.
    If you user field is at the Header level the Formatted Search Query might not work unless you highlight that whole row and then click on the header level UDF and press Shift+F2
    How have you set the refresh options?

  • 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

  • Formatted Search Query for BatchNo

    Dear All,
    I am using the following query as formated search for Identifying the batches availble during the creation of  Delivary document
    in a user defined column at row level. When i click on this field it's showing the Batches for the Item with Zero Qty also.
    I need to display only the batches where the QTY >0. This query displaying even the Zero Qty Batches also. Please help me to modify the below query for getting the above. Below is the  query .
    SELECT distinct  T4.[BatchNum] FROM [dbo].[OIBT]  T0 INNER JOIN OITM T1 ON T0.ItemCode = T1.ItemCode INNER JOIN DLN1 T2 ON T1.ItemCode = T2.ItemCode INNER JOIN ODLN T3 ON T2.DocEntry = T3.DocEntry INNER JOIN IBT1 T4 ON T0.BatchNum = T4.BatchNum AND T3.DocNum = T4.BaseNum INNER JOIN OWHS T5 ON T0.WhsCode = T5.WhsCode WHERE T0.[ItemCode] = $[$38.1] AND  T4.[WhsCode] = $[$38.24] AND T0.[Quantity]>=$[$38.11]
    Regards
    Srini

    i removed that T5, But It's  showing the  Batches where the qty in the main warehouse for that batch is Zero.That batch was actually present in another warehouse. And also when i am working on other warehouses it's showing the batches in the main warehouse where the qty is present.
    Regards
    Srini
    Edited by: Srini on May 11, 2010 10:24 PM

  • Formatted search as such G/L Account name to be shown

    Dear All,
    I have added in Udf in the row level of marketing document like U_Sales A/C Name, U_Cogs A/C Name, U_Inventory Account Name.
    Stock is maintained Warehouse Wise. Now I want that in the row level for any item e.g warehouse 001 I want a formatted search which should refresh automatically and show the G/L account name of Sales A/c, Cogs A/c and Inventory A/C respectively in the individual udfs.
    I think it could be possible through formatted search but am not able to create the query for it.. Please help.
    regards,
    kamlesh

    Hi Kamlesh,
    Check the link
    How to insert G/L account name in query
    *Close the thread if issue solved.
    Regards
    Jambulingam.P

Maybe you are looking for

  • How to completely wipe the os and reinstall it??

    I have frequent problems on my torch 9860 even after updating it to Os 7.1 . The screen freezes sometimes. If I make n receive in quick successions the phone reboots...n sumtimes its jus so slow that one can't believe it has a 1.2 ghz processor. ....

  • Smartform in Abap Webdynpro

    Hi Expert, I am new to SmartForm and WDP. I try to follow the below instruction to do, but got lots of error. Could anyone help me on this? http://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/f0de1eb8-0b98-2910-7996-8a3c2fcf6785 My sma

  • Payment F110

    hi, I want to make a payment to a employee. some payments are through cheques some are by cash. in running F110 i can not specify the amount to be paid by cheque??is there any way i can pick the amount in F110??? please help. gayani

  • Problem in window bar

    hi at present iam working in oracle forms,i have one doubt, while i am running the form in the top of the window oracle forms runtime will appear in the top of the window bar as well as close,maximize,minimize button will appear and then below that m

  • Lightroom Won't Activate on Mac

    I run Lightroom on a Mac G4 867 DP at home. I also had a demo version of LR running on my laptop, which is a MacBook Pro. It has passed the expiration period and now asks me to activate. When I attempt to activate with my purchased license serial num