Formatted search on UDF, DIAPI issue

Hi,
I have a formatted search on a UDF in the DETAIL of a SALES ORDER
When I try to set a value on this UDF, the DI API doesn't give any error but the UDF doesn't get the new value.
but all other UDF works except this one which have a formatted search on it in SAP
Is there something I don't know ?

Hi,
My goal is not to make the formatted search working in DI API, as I said, I'm just trying to set a value in the UDF and because there's a FORMATTED SEARCH on this udf, it keeps the default value instead of the value I'm setting by the DI API
And yet, I have other UDF that have formatted search, and I'm able to set a value on the UDF anyway.
What I see different is that this UDF is numeric and the others aren't
I just don't understand why the DI API reports no error and yet the value I put in it isn't taken but only the formatted search default value for a numeric UDF  Is this a known bug in SAP ?

Similar Messages

  • Formatted search with UDF and syntax question

    Can you explain the syntax with when to use the dollar sign and negative in writing a query for a formatted search based on user entry?
    I now want to create a formatted search to pull values based on the user's entry into a UDF on the item master screen.
    User entry into UDF U_Customer Code
    to create Formatted search for UDF U_Rep01
    I tried the following, but it does not work.
    SELECT T0.U_REP01 FROM dbo.OCRD T0
    WHERE T0.CARDCODE = $http://$OITM.U_CUSTOMERCODE
    Thanks.
    Please advise.

    The right syntax would be like this:
    SELECT T0.U_REP01 FROM dbo.OCRD T0
    WHERE T0.CARDCODE = $[OITM.U_CUSTOMERCODE\]
    However, the logic of query may not be correct.  Select something must be already in the system and Where should also be locatable.
    Thanks,
    Gordon

  • Formatted Search and UDF

    Hi all,
    I have an issue with a formatted search.
    My intention is to update the field RDR1.vatgroup with a value set in a UDF on the sales order.
    I have not been able to make it work, and If someone have a quick help idea it would be nice.
    I have defined a userdefined field called u_avgcode. This is linked to some valied values for field like U1,U2,U3. The structure is 1=U1 and 2=U2 and so on.
    <u>When I change a value here I would like to update the whole salesorder (all lines) with this value replacing the Tax code (RDR1.Vatgroup).</u>
    The formatted search is like this on the RDR1.vatgroup:
    if (Select $[$ORDR.U_avgcode]) = 'U1'
    begin
    declare @newcode as nvarchar(25)
    set @newcode = U1
    select @newcode
    end
    I have set 'Auto refresh' when the UDF field changes.
    I can't make this work properly, any ideas..
    I have also tried if (Select $[ORDR.U_avgcode]) = 'U1' with no luck.
    regards
    me

    Thanx for input Juha.
    I have made a solve to the problem, and it works fine now.
    My FS is like:
    declare @newtaxcode as nvarchar(2)
    if (Select $[ORDR.U_avgkode]) = 'U0'
    begin
    set @newtaxcode = 'U0'
    select @newtaxcode
    end
    I set this FS on my taxcode, and refered to my UDF when it changed. Works fine, but the screen is a bit flashy and "slow" when updating 50 order lines in a sales order.
    I am now able to update many lines in a matrix with a single select from a UDF.
    <u>Thanx to Ibai too, for helping me on track.</u>
    One issue that also was a key element is to refer to the defined values for the UDF.
    I had set like this:
    code description
    1    U0
    2    U1
    3    U2
    I changed this too
    code description
    U0   U0
    U1   U1
    U2   U2
    regards
    me

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

  • Decimal and formatted search

    hello,
    I've defined an UDF as Price.
    Number of decimal for prices is set to 3 in the general settings.
    the actual result of my formatted search is rounded to 2 decimals although 3 decimal are displayed.
    here is a simple formatted search that illustrate the issue :
    SELECT 100 / (100+19.6)
    the displayed result is 0.840 instead of the correct value : 0.836
    How can It be solved ?
    Best regards,
    Francis

    Hi
    Please check the decimal settings of
    amount as well(general setting -display tab)
    there is one case:
    When under Adminstration -> System Initialization -> General Settings ->
    Display, the decimal for the amount is defined as 0 and the UDF is
    defined as eg.  alphanumeric or units and total amount, The UDF does not
    return the decimals and round the amount.
    base on my testing:
    if I define 2 decimal places for amount
    then the UDF result  will be 0.84
    But if I define 3 decimal places for amount
    then the UDF result will be  0.83
    Best Regards
    Helen Sun

  • Formatted search query with variable

    Hi
    I am trying to create a formatted search on a purchase order document.The scenario is as follows:
    The issue is that the client will on certain stock records incur a tooling cost when raising a PO. This is a once off cost when they order a particular item. For example the tooling cost on a stock item is u20AC5.50. The cost price on the item is u20AC100. If they order for example 5 of these the total cost is u20AC505.50 i.e. u20AC100*5+tooling cost of u20AC5.50.
    What we are attempting to do is pull through the tooling cost and add this on to the line total using a formatted search.
    -UDF created on item record table. This is set type 'Unit and totals' and structure is 'Price'. This is called ToolingCost
    -UDF created on marketing doc rows for ToolingCost. Again this is set to the same type and structure as the UDF on the item record.
    -We have created a UDF on marketing row for total cost and set a formatted search against this with query attached that is attempting to calculate the total cost. We cannot get this to work and the problem would appear to be that the price field is a variable and this is causing an issue on the query. Can we include a variable field in our query and if so what should the syntax be?
    Our query at the moment is 'SELECT 100*($[POR1.QTY.NUMBER])+($[POR1.U_TOOLINGCOSTS.NUMBER])
    Note 100 in query syntax above to be replaced by price on POR1 table.
    Can anyone provide assistence please.
    Derek Smith

    Hi Derek........
    Try this.....
    declare @var1_Qty as varchar(255)
    declare @var2_Pr as varchar(255)
    declare @var3 as float
    declare @var4 as float
    set @var1_Qty=$[$38.11.0]
    set @var2_Pr=$[$38.14.0]
    Set @var3=$[POR1.U_TOOLINGCOSTS.0]
    set @var4=cast(substring(replace(@var2_Pr,',',''),0,len(replace(@var2_Pr,',',''))-3) as float)
    select (@var1 * @var4)+@var3
    Hope this will help you.......
    Regards,
    Rahul

  • Formatted Search Rounding Issue

    Hi everyone,
    I have a slight issue. I have defined a formatted search on the A/R Invoice that calculates the item price based on a user defined field. The problem is whenever the formatted search runs, it rounds the figure to two decimal places. For instance; the query is supposed to divide a value you put in the user defined field by 50 if you put in 2.25 the value you get is 0.04 instead of 0.045. The query i've used is as below.
    Please assist.
    SELECT (CAST($[$38.U_pprf.0] AS DECIMAL)/50)

    Hi Duncan,
    Try this FMS in UDF2. you will be get the exact value in UDF2.
    for Example:
    *Create 2 UDF's
    UDF Type -> Unit and Total.
    UDF Structure -> Price (or) Amount.
    UDF1 -> U_pprf
    UDF2 -> U_Item_Price
    UDF1 = 2.25
    UDF2 = 2.25/50 => 0.045
    SORRY Last Query is not correct because that Query will not get Exact Result.
    If you want exact value. Try the below Query.
    First Assign the below Setup.
    ->> Administration.
    ->> System Initialization.
    ->> General Setting. -> Display Tab.
    Assign the Decimal Places  (0..6) value.
    Price (or) Amount -> 3
    IF you assign the setup of Price (or) Amount = 3 in Decimal Places.
    Result: 0.045
    IF you assign the setup of Price (or) Amount = 2 in Decimal Places.
    Result: 0.05
    Query: 2
    declare @UDF as numeric(19,6)
    set @UDF = $[PDN1.U_pprf]
    select  (@UDF/50)
    Result: 0.045
    Assign this FMS in UDF2 and Auto Refresh of U_pprf
    Regards,
    Madhan.

  • I need one formatted search for Goods Issue

    Hi Experts
    I need one formatted search for Goods Issue
    ex. I have Issued One item  on 20/07/2011
      In Goods Issue Line Level one column LstIssDt 
    when i issue for the first Item  My document Date Will be my Ige1.LstIssDt(LastIssueDate)(linelevel)
    Now
    the Same Item Iam issuing on 23/07/2011 
    Now  In Goods Issue Line Level   LstIssDt column  shud come as 20/07/2011 when i click formatted search
    Similarly For all the Other Items
    can anyone help me in these
    Thanks  & regards
    Jenny
    Edited by: Jennifer Anderson on Jul 23, 2011 7:57 AM

    Hi Jenifer.....
    I think it should work as it is working on my DB
    Select Top 1 T0.U_LstIssDt From IGE1 T0 Where T0.ItemCode=$[IGE1.ItemCode.0]
    Order By T0.U_LstIssDt DESC
    Do execute this just save and Apply this on Goods Issue for. So when you select the Item this will bring the Last Issue Date of this Particular Item on which field you applied this FMS.......
    Is that an UDF of Last Issue Date or standard field?
    I modified above FMS and please now try.....
    Regards,
    Rahul

  • Formatted Search Querry for UDF

    Dear All,
            My client is using SAP B1 2007 B PL10. Now I am facing a issue like, I have made a UDF in the A/P Invoice Form and hence made it mandatory. But when i make a UDF field as mandatory I have to write a particular default value.  Hence i have written default Value as 0.
          Now whenever i open the A/P Invoice Form,  the mandatory UDF Field is showing default value as 0. But I want to write a Formatted Search Based Querry in a way that the UDF Field should become Nil whenever I Open the A/P Invoice Form.
          Please guide me in writing the Formatted Search Querry by which the UDF Field which is having a Default Value as '0' should become Nil.
        Regards
    Hitesh Parsawala

    Hi Hitesh ,
    You have two option :
    1.Either donot make ur UDF mandatory at the time of creation
    Use sp_transaction notification to validate
    2. Define UDF manadatory at the neginning
    if user donot change the value , triggger approval procedure through FMS
      I think it is
    Select Distinct 'True' from tablename where <userdefined field =''i
    If user donot change, it is going to triger approval procedure
    <You can look for code in forum if that is not working >
    Hope this helps
    Bishal

  • Formatted Search icon is not displaying for the UDF

    I have fifteen UDF's in the Marketing document and I have applied formatted search on each of the fifteen.
    But for one paticular UDF formatted search icon is not displaying even though the formatted search is active on the field but it is working fine for other field of same kind in same scenario.
    Please help me.
    Regards,
    Awadhesh
    Edited by: Awadhesh Kumar Pandey on Feb 9, 2009 5:58 PM

    Hi
    Try this
    Go to View in the menu bar  > Indicator Display >User Defined Values .
    Hope this will resolve your issue
    Thank you
    Bishal

  • Formatted Search issue

    I have a UDF attached to a Purchase Order, Goods Receipt PO and Batch Numbers for Items.  B1 automatically carries the UDF data forward from the Purchase Order to the Goods Receipt PO.  However, I am trying to create a Formatted Search that will also bring that data into the Batches Setup transaction when a Goods Receipt PO transaction is being added.  Since the Goods Receipt PO record is not yet written when the Batches Setup screen is activated, I somehow need to access the UDF data from POR1 from the Batches Setup screen (OIBT).  I don't seem to be able to find a way of writing my query for the formatted search that is able to return the data from POR1 to my UDF in OIBT.  Any ideas of how I might be do this?

    Timothy,
    The values in the Purchase Order / Goods Receipt screen are not available in teh Batch Number screen.
    You will need to use a temp table to store the values from the Purchase Order / Goods Receipt screen.
    You will set a formatted search on one of the columns of the documents row.  Through this formatted search you will insert the data into the temp table and from the Batch screen you will read the values from this temp table
    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

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

  • 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

Maybe you are looking for

  • How do I save Voice Memos from iTunes to Macbook? When I updated.....

    When updated my software today to 6.1.3 the voice memos were GONE off of my iPod but they were recognized when I synced it when plugged back in. They imported into the voice memos folder in iTunes but they are no longer visible on the iPod. They are

  • BPM 11g: JAVA API and Webservice API

    Who knows BPM 11g: JAVA API and Webservice API? Customer want to call BPM 11g between Heterogeneous systems, such .net framework. One way is use webservice API, I think, but where can find it? thank you

  • Installing flash player update for Mac

    I am trying to install the flash player update for Mac v10.6.8, when i click install now nothing happens. Am I missing something?

  • Camera raw and elements 11

    I can't get the latest version of camera raw into elements 11. Please help! It doesn't show up as an update, and the downloaded version says it's incompatible. Version 7.1.0.354 came with my load of Elements. It seems that the latest version is 7.4 (

  • CC 3D

    We are attempting to simply create a timeline animation in Photoshop. We want the object to remain stationary and spin 360. However once we turn the stopwatch on, go to Y coordinate and change to 120. the object jumps to a new location? If timline is