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

Similar Messages

  • Auto fill Row level UDF from Header Level UDF

    Hi,
    I have a header UDF (U_BU) and Row UDF (U_BU).
    Each time I add a row (item or service type) I want the row UDF to be loaded with  the header UDF data, using a formatted search on the row UDF.
    I also want the user to be able to change the ROW UDF if it is not meant to be the same as the header.
    Could someone help on this?
    Kind Regards,
    Eric

    Hi Eric,
    Try this,
    ->> Assign this FMS in UDF(row level) on A/R Invoice.
    ->> Auto Refresh of Item Description.
    SELECT $[OINV.U_BU]
    or
    for example, use variable
    (because this method of FMS will work all marketing doc.)
    SELECT $[$33.0.U_BU]
    ->> Assign the FMS in UDF on item rows.
    1. Goto the UDF and Click ShiftAltF2.
    2. Select the SEARCH BY SAVED QUERY.
    3. Assign the FMS Query.
    4. Select the AUTO REFRESH WHEN FIELD CHENGES.
    5. Select Item Description.
    6. Check the Display Saved Values.
    Regards,
    Madhan.

  • FMS On Header Level UDF

    Hi Experts.
    I want to set up approval procedure based on the sales warehouse.
    Sales Employee1 is only allowed to sell from WHS1. If the sales employee has to sell from a different warehouse, an approval has to be triggered.  I want a header level UDF the gets the Warehouse selected on the Invoice. If WHS2 is selected the UDF is updated and the approval procedure triggered.
    Please help
    Regards.

    In a header level  FMS you can not access the row level data. (Only the first line.)  So you can not move the warehouse code automatically to the header UDF. But you can force the user set a header level UDF to sign that this is a critical transaction. This can be done writing some code into the SBO_SP_TransactionNotification stored procedure.
    1. Create a header level UDF e.g. named ForApproval with possible values Y and N, with default value N.
    2. Write code in the SBO_SP_TransactionNotification stored procedure, that signals an error message u2018You should set ForApproval to Y!u2019  if U_ForApproval=u2019Nu2019, the originating user is not allowed to make transaction from this warehouse and there is any line from this warehouse.
    3. Set an approval procedure according to the header level ForApproval field. The user approving the document can add then the transaction.
    (To force setting the ForApprova flag insert the code in your  SBO_SP_TransactionNotification stored procedure after the line
    --     ADD     YOUR     CODE     HERE )

  • Marketing Document Header Level UDF - Table Holding the Categories

    Hi All,
    I need the name of the table where categories of udf at header level of marketing document is stored.
    I cheked the table CPRF but it does not show the category code in which the udf will be displayed in the form,
    please help,
    Thanx in advance,,,,

    Hi
    If you need category codes and descriptions, they are stored in the CUDC.
    Thanks,
    Gordon

  • 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

  • Update UDF on the header level

    I have created two UDF's on a marketing document on the header(Title Level). I have created two different formatted searches such that on the first UDF after adding data it fills relevant data on the second UDF. However this is not happening unless i manually press shift+F2 on the second field thereby updating the data even when the first UDF data changes and I have set the option of refresh regularly.
    Kindly advice.

    Hi,
    The problem is with the 2nd FMS.
    If you want to automatically reference a header level UDF in your FMS then you can enter the table name for the form you are in.  For example, if this formatted search runs on the Sales Order screen then:
    SELECT T0.CardName FROM OCRD T0 WHERE T0.CardCode = $\[ORDR.U_TrpCode\]
    Alternatively if it is an A/R Invoice screen then:
    SELECT T0.CardName FROM OCRD T0 WHERE T0.CardCode = $\[OINV.U_TrpCode\]
    Otherwise you have to manually press Shift F2 as you currently do.  By using the query i mentioned this automatically updates the field fine.
    Regards,
    Adrian

  • UDF link type and formatted search

    Dear experts,
    Im trying to use a formatted search to fill a UDF of the link type.
    The plan is to generate a weburl voor googlemaps like the link with business partner addresses. I do this with the following query:
         DECLARE @URLp1 AS VARCHAR(254)
         DECLARE @Adres AS VARCHAR(254)
         DECLARE @Plaats AS VARCHAR(254)
         DECLARE @Postcode AS VARCHAR(254)
         DECLARE @URL AS VARCHAR(254)
         SET @URLp1=('http://maps.google.com/?q=')
         SELECT @Adres=($[$U_Adres.1.0])
         SELECT @Plaats=($[$U_Plaats.1.0])
         IF LEN($[$U_Postcode.1.0])=0
              BEGIN
                   SELECT @URL=(@URLp1+@Adres+'+'+@Plaats)
                   SELECT @URL
              END
         SELECT @Postcode=($[$U_Postcode.1.0])
         SELECT @URL=(@URLp1+@Adres+'+'+@Postcode+'+'+@Plaats)
         SELECT @URL=(SELECT REPLACE (@URL,' ','%20'))
         SELECT @URL
    The select replace doesn't work yet but that's not the real problem.
    I used the following formatted search settings:
    Search in Existing User-Defined Values according to Saved Query
    Auto Refresh When Field Changes -> set to Adres
    Refresh Regularly
    When I try these settings on my UDF link style the field just stays empty.
    When I use this formatted search on a Alphanumeric(100) field it more or less works. I need to manualy refresh the field to execute the query.
    If I simplify the query to insert just one value like 'Opportunity No.' ($[$74.1.0]) it does auto update in both fields.
    Could someone point me in the right direction what I'm missing/forgetting or give me a sollution that might even be better?
    Kind regards
    Edit:
    PS. We are using SAP BO 8.8 PL15

    I've found a topic with a similar problem but there's no solution there either...
    Formatted search with Query auto update

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

  • Formatted search - Service call

    Dear All,
    Im trying to write a formatted search on the Service call screen to retrieve the email address of a queue. The queue is in the general tab of the Service call. You can add user defined fields for the service call-title, service call -solutions, service call- activities etc.
    I have added the userdefined field on the service call-title.
    My formatted searches can access all the other header details on the service call but I cannot get the queue data in the general tab.
    Kindly assist,
    Thanks,
    Indraj.

    Hi Indraj
    If I understand correctly you cannot add a formatted search on the queue field? If this is not so, let me know. If it is the Queue field, you must select the radial button to the left for the queue field to be active. I tested by doing the following:
    1. Added a UDF on Title level called email (U_email).
    2. Added a query - SELECT T0.[email] FROM [dbo].[OQUE]  T0 WHERE T0.[queueID] = $[OSCL.Queue]
    3. Added a formatted search to the email UDF and linked it to the query. Set auto refresh on field "queue"
    This works 100% whenever I select a queue number.
    Kind regards
    Peter Juby

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

  • Formatted Search totaling several fields on unsaved form

    Hello Experts! I am trying to create a formatted search to total several UDF's, at the row level of a quote, without first having to save the record. HELP. I have tried everything except the correct syntax.
    $[38.U_COSTPLUS.1] * $[38.Quantity.1]     And I tried
    $[QUT1.U_COSTPLUS] * $[QUT1.Quantity]     And I tried
    $[$149.38.U_COSTPLUS] * $[$149.38.Quantity]  
    Any suggestions? How can I total several fields for a row, without first having to save the document?
    Thanks folks!

    Presuming that you are trying to use this formatted search on a row level field of a marketing document and U_COSTPLUS is a numeric field.
    The syntax would be $[$38.11]*$[$38.U_COSTPLUS]
    NOTE: Quantity field is column 11 - you may also spell quantity as $[$38.Quantity]. You were missing the '$' before 38.
    Good luck
    Suda

  • Formatted search - price

    Hi all experts.
    Can someone please provide me with a formatted search that fetches the price from the price field on item master data and selects it into a UDF on OITM.
    Thanks.
    Runar.

    Create a UDF in the Item Master and assign the following 'Formatted Search Query' to the UDF:
    SELECT T1.[PriceList], T2.[ListName], 
    T1.[Currency], T1.[Price] FROM [dbo].[ITM1]  T1
    INNER JOIN  OPLN T2 ON T1.PriceList = T2.ListNum
    where T1.itemcode=$[oitm.itemcode]

  • Formatted Search in Row

    Hi,
    i have a UDF in the PDN1. so i want that, when i change the value of this field i want to change the warehouse of this row, according to the value of the udf.
    how can i access one field of the same row?

    I am doing a similar thing but it involves 2 user-defined fields on a sales order row.
    First I created the query that will be used as the formatted search as
    "SELECT $[rdr1.U_XXDENDUS]"   Note there is no "FROM" clause.  This will return the value in the UDF field on the matrix row being maintained by the user.
    Then I assign this formatted search to my other UDF (for you it will be the warehouse) by presssing Alt-Shift-F2.  Click search by saved query, then give it the name of the FS, or double click on the line for it to select from the list.
    Then click auto-refresh and also chose "when exiting altered column"  from the first combobox and then select your UDF from the second combo box.  This CB will display a list of the field descriptions, so don't be looking for "U_".  I also check the "Refresh Regularly" radio button.
    Whenever the user enters a value in my first UDF (xxdendus) and tabs out of it, my second UDF (the one with the FS assigned to it) is automatically updated.

  • Problems using a formatted search to link order lines to order header

    Hi,
    I'm having a nightmare trying to get the main lines table to populate the header within a sales order using a formatted search.
    I have created a UDF on the header for total value, and where items entered onto the order are of a certain type I need the header UDF to be sumated.
    Basically I have three parts for packaging (PACK1, PACK2 and PACK3), and the header has a UDF called U_TotPack
    Someone did sugest the following query, but this doesn't appear to work either:
    select sum(t0.linetotal) from rdr1 t0 inner join ordr t1 on t0.docentry = t1.docentry
    where t1.docnum = $[ORDR.DocNum] and t0.itemcode in ('PACK1', 'PACK2', 'PACK3')
    If it is a problem for me to use the line total field (as it is a variable calculation) I am happy to total the quantities for the items found, but I just can't seem to build any form of relationship between the header and lines.
    Hope someone out there is able to help as this one has really got me stumped.
    Cheers,
    J

    Hi Julian,
    I'm assuming you are trying to populate the header UDF before the Order is added to the system? If yes then it is not possible to achieve this via a formatted search, only SDK. A header FS cannot properly access line information, it only works the other way around - header info to line level.
    I presume the reasoning is that which line should your header FS take a value from? The FS syntax also doesn't allow you to loop throught all lines.
    The SQL that someone else suggested would only work for a sales order already added to the database. Hope this helps.
    Regards,
    Andrew.

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

Maybe you are looking for