FMS query round 2

Hi Robert ,
This is going too long ..let me give you the total procedure at once .
1.Shift+ Alt +F2 on the filed where you want to have your formatted search
2.Assign your query
3.Click on Auto refresh when field changes
4. Customer/Vendor code
Refresh regularly
(If you are using Formatted search on Header level )
Me....I am not using FMS at header level.
You won't see Customer/Vendor Code if you are using it at row level .In that case you have to use Display user defined values otherwise you will have problem using auto refresh at row level .
One other thing -
Me.....I have done this.  "Display saved user defined values" is marked.  It's still not functioning properly.
1.What is your Userdefined field ?
Me....U_DEFGL
2. What is the values you are stored ..for example -
Select U_..... from OCrd where CardCode='Norm Thompson'
Me....The stored value is whatever GL account the user typed into the UDF for the business partner.
If you let us know then , we can do more troubleshooting . I guess open a new thread and we will start from there ... this is getting too long ..
Bishal
Me.....My problem is that after linking the fms query to the G/L Account field on the AP Invoice (not that is in the rows, not header section) I can't tab or click out of the field.  SAP keeps popping up the stupid G/L Account List form (which is blank) and even if I close it SAP just keeps popping it up.  Thus I believe something is wrong with the settings on my User Defined Values Setup form.  Which I posted before, but here they are again.
1. Query is selected and works properly
2. Auto refresh marked
3. Drop down set to "When field changes"
4. From the fields drop down list set to "Document Number". I don't see what the significance of this is, but I have tried selecting different fields and still the G/L Account List form pops up repeatedly.
5. Display Saved User-Defined Values
Any ideas?  This is basic FMS and if SAP would produce a simple and EASY to find document to explain the steps I wouldn't have to bug you guys.  But SAP doesn't so here I am.  Thanks for any insights.

Hi Robert,
I think your issue is coming because your user is typing the data instead of selecting .
1.Use this query (as formatted search ) in your user defined field of Business partner Master Data. So user will select the list of account 
Select FormatCode from OACT where ActType=... to make your list shorter .
User will press shift +F2 and then he/she will see the list of the code and select it .
2 . You have already configured your second formatted search
-- Select U_Defgl... from ocrd where
-- autorefresh when item no no changes -display user defined values .
Now  test your stuff ,it should work .
Let me know if it didn't work .
Thank you
Bishal
Edited by: Bishal Adhikari on May 28, 2009 9:28 AM

Similar Messages

  • FMS QUERY

    Hi all,
    I want to write FMS Query on reference field of payment means window on change of vendor code while making outgoing payment. Is It possible ?
    If i run the query in query generator it gives me the result. But by capturing system information it gives me NO DATA.
    Thanking you
    Malhaar

    Hi Malhaar.........
    Try this.......
    SELECT S0.SERIESNAME + ltrim(str(P0.DOCNUM)) as PO
    FROM OPOR P0 INNER JOIN POR1 P1 ON P0.DOCENTRY = P1.DOCENTRY
    INNER JOIN NNM1 S0 ON P0.SERIES = S0.SERIES
    INNER JOIN OCRD C0 ON P0.CARDCODE = C0.CARDCODE
    LEFT JOIN OCTG T0 ON C0.GROUPNUM = T0.GROUPNUM
    LEFT JOIN OSHP D0 ON P0.TrnspCode=D0.TrnspCode
    WHERE (DateDiff(D,P0.DocDate,Getdate()) = 0 OR DateDiff(D,P0.U_ETD,Getdate()) = 0) AND T0.GroupNum = 21 AND P0.CARDCODE = $[OVPM.CardCode.0]
    Hope this will help you.......
    Regards,
    Rahul

  • Need a fms query on G/L account code for the AP Screen

    Hi SAP B1 Experts,
    Could somebody suggest a simple query I could run on the G/L account code field to select a particular account code when using a particular BP code.
    So for example I would like the user to be able to choose just 2/3 accounts instead of the mass list you get based on the BP partner he is looking at.
    Do I need to add a UDF field into the BP for the particular Account Code I want associated with him?
    Any suggestions would be appreicated as I want to cut down the time on search the g/l code list as it is quite long
    regards
    Paul

    Hi Rahul,
    I think I follow the below overall however I have setup the UDT and created the UDF's BP CODE and ACCOUNT as you suggested.
    How do you associate the BP Code with the Account Number in the Table?
    So for my example:
    I will setup a Supplier Code and two account codes with it.
    BP Code: S1234   Account 1234567
            S1234   Account 1234567
    I have tried setting up default values but they don't appear to work. I must be doing something wrong as nothing appear when I query the table. Have I missed a step here?
    Once the table is right I assume I then use the FMS Query below to look at the table based on my UDT vs the OPCH.Cardcode Field?
    If I can get the table right I think I follow your example from there
    thank you both for a quick response

  • FMS Query for Purchase Order

    Hi,
    I want to FMS Query for Purchase Order.
    I want to display the weight * price in one user define field.
    Please suggest me

    Hi Tushar.......
    Try this.......
    declare @var1_wt as varchar(255)
    declare @var2_Pr as varchar(255)
    declare @var3 as float
    declare @var4 as float
    set @var1_wt=$[$38.58.0]
    set @var2_Pr=$[$38.14.0]
    set @var3=cast( substring(replace(@var1_wt,',',''),0,len(replace(@var1_wt,',',''))-1) as float)
    set @var4=cast(substring(replace(@var2_Pr,',',''),0,len(replace(@var2_Pr,',',''))-3) as float)
    select @var3 * @var4
    Regards,
    Rahul

  • Why is this FMS query not working for me?

    There is already a FMS query that works in Delivery Pane. The FMS field there is a user defined field called U_NWR_Bin, rom table DLN1. This works fine and it is alpha numeric 10 characters. This FMS is defined in Marketing Documents rows.
    I created another user defined field called U_Bin in table PKL1 for picklist row level. This user defined field shows up in FMS in PickList Pane.
    I created a query - SELECT $[DLN1.U_NWR_Bin].
    I then assigned above query through Shift F2 to Picklist Pane field U_Bin.
    The above query is not executed on clicking the lens it gives the error - Internal error -1004 occured message 131-183.
    What am I doing wrong? Please help. Thanks.

    Hi,
    FMS query can only access the current form. $[DLN1.U_NWR_Bin\] is not valid for PickList Pane.
    Thanks,
    Gordon

  • Can anyone expalin this FMS query?

    Dear Expert,
    Can anyone expalin this FMS query, which follows
    Query1:
    IF $[ORDR.U_QuoOppNum] is NULL or $[ORDR.U_QuoOppNum] = ''
    BEGIN
      SELECT  T0.Name  as 'Segments' 
         FROM [dbo].[@SEGMENT] T0
         Where SUBSTRING( T0.Code, 1, 3 ) = SUBSTRING( $[ORDR.U_QuoTypSeg], 1, 3)
    END
    ELSE
      SELECT T0.U_OppSeg FROM OOPR T0  where T0.OpprId = $[ORDR.U_QuoOppNum]
    Query2:
    SELECT  code
    FROM [@SEGMENT] T0
    Where SUBSTRING( T0.Code, 1, 3 ) = SUBSTRING( $[ORDR.U_QuoTypSeg], 1, 3)
    AND Name = $[ORDR.U_QuoSeg]
    Thanks in advance,
    Dwarak

    Dear Dwarak,
    The 1st query assign UDF U_OppSeg value from Sales Opportunity to Sales order if U_QuoOppNum in sales order matches opportunity ID. Otherwise, assign Name value in UDT @SEGMENT where the first 3 letters match with sales order UDF U_QuoTypSeg.
    The 2nd query is the first part of the previous query after IF. I explained in the 2nd half.
    Thanks,
    Gordon

  • Regarding FMS query to get the account name and get it in the report

    Dear all,
    I have created a FMS query to pick the G/L account name in the payment voucher,But the name which i got through the FMS in an UDF is not coming properly.It comes only if am manually entering Shift+F2 in that field.
    Pls give me a suggestion for that.
    The FMS query is.
    SELECT T1.[AcctName] FROM VPM1 T0  INNER JOIN OACT T1 ON T0.CheckAct = T1.AcctCode INNER JOIN OVPM T2 ON T0.DocNum = T2.DocEntry WHERE T2.[DocNum] = $[ovpm.docnum]

    hi,
    try this:
    SELECT T0.AcctName FROM OACT T0 WHERE T0.AcctCode=$[VPM1.CheckAct]
    Thanks,
    Neetu

  • FMS Query to Validate Unit Price on PO Screen

    Hello Experts,
    I am hoping someone has come across a query like this.
    On the Purchase Order I want to validate the unit price field by running a FMS query against it.
    What I would like to be able to do is :
    (Qty Field) X (UDF field which would be weight) X the list price of the item on the line
    So Qty 10 X the UDF field which is 1 X the List Unit Price of the item which then goes into the Unit Price field after the FMS query has run.
    Is this possible?
    At the moment I can run it against the unit price in the field but obviously this does not check the unit price from the Pricelist
    SELECT $[$38.14.number] * $[POR1.Quantity.number] * $[POR1.U_U_Weight]
    Although this works the first time you run it - it calculates correctly but if you run the fms again it keep mulitplying the figure - is there a way to stop this
    Any suggestions would be appreciated
    thanks

    Hi Rahul,
    The code in the first message got messed up -
    However here it is -
    SELECT $[$38.14.number] * $[POR1.Quantity.number] * $[POR1.U_U_Weight]
    I also tried your code and get the same result - the first time you run it it calculates the amount ok.
    But it does not stop at that point - if you click on the FMS link again it takes what is in the unit price field and calculates it again - so it will keep going which is not ideal.
    More importantly though
    Is there a way I can get the query to check the list price for the item first and then multiply it X Qty and then by the Udf Field which is weight

  • FMS query not working

    Hello,  I recently created an FMS query which pulled all expense gl accounts.  I linked the query to a UDF on business partners.  This way my users could select a default GL account for a business partner which would appear automatically on the ap invoice.  It was working fine, but now the fms query on the BP UDF is failing, returning no results.  I also get NO error messages either so I don't know why its failing.
    I can run the fms query in Query Manager fine.

    Hi Robert ,
    Press Shift +F2 on your User Defined field and you will see the list of accounts .
    Your problem will be solved .There is no issue with query .
    Thank you
    Bishal

  • FMS Query for default Profit Center in SO

    Dear Experts,
    Can anybody help me by providing FMS query for getting default Profit  Center based on the default Warehouse in the user default settings.
    Regards
    Srini

    Hi Rahul,
    I created each Branch as a profit Centre and the filed name is OPRC.PrcCode . If the user at a particular branch logged in SAP by using his ID and when he is adding a SO the profit centres list should appear in Profit centre filed.
    And is there any provision to set the profit centre  (OPRC.Code) as default for the user at a branch by taking document no.series or location ID or User ID as consideration in the FMS query.
    Thanks
    Srinivas

  • FMS query erroring out

    I created an fms query so my users could pick a default GL account and save to a UDF on the BP window.  This query is now working fine.  I then created a 2nd fms query and attached it to the "G/L Account" field on the AP invoice window so that when a vendor is selected and the user clicks on this field the GL account from the vendor's UDF will default. 
    My problem is that the G/L Account field on the AP Invoice doesn't have a magnifying glass and shiftF2 does nothing.  If I go to tools/customize/User-Defined Values Setup it immediately shows the query I have linked to the field.  If I press ShiftF2 I get an "Internal error 8180".  If I go to Query Manager and run my query it errors out with a long msg saying "Microsoft SQL Native Client SQL Server incorrect syntax near '$[$4.0.0]'.2. Microsoft SQL Native Client SQL Server Statement activities OCLG (s) could not be prepared.
    Below is my query which I copied from one of Gordon's prior posts.  It worked fine last week and we have made no changes.  My user defined field is DGL.  For some reason the forum changes the code below, but at the very end it should read dollar sign, open parenthesis, dollar sign, 4 dot 0 dot 0, closed parethesis.
    Select T0.U_DGL from dbo.OCRD T0 Where T0.CardCode = $[$4.0.0]

    Hi Robert,
    Try this query:
    SELECT T0.\[U_DGL\] FROM OCRD T0 WHERE T0.\[CardCode\] = $\[$4.CardCode\]
    Regards,
    Adrian

  • I need a Small FMS query.

    hi.
    i need a small fms query i am not able to do it.
    what is my requirement is
    i create one Udf field which is amount type at sales order rows.
    and in item master i enter some values at factor1 under sales data.
    when ever i pick the item at sales order row level..
    i need a calculation like
    row level i enter like this
    itemcode      manual price(udffield)
    001                  25
    001  is having factor1 value at item master is 5
    then i need calculation like
    select ((t2.SalFactor1 *100/100)*(t1.U_Manpric)) as ManualPrice from ordr t0 inner join rdr1 t1 on t0.docentry = t1.docentry inner join oitm t2 on t2.itemcode = t1.itemcode where t2.ItemCode ='00201010001'
    i need above calculation
    i tried
    select ((t2.SalFactor1 *100/100)*($[$t1.U_Manpric.0.0])) as ManualPrice from ordr t0 inner join rdr1 t1 on t0.docentry = t1.docentry inner join oitm t2 on t2.itemcode = t1.itemcode where t2.ItemCode ='00201010001'
    but not working
    Any information plz update me.

    hi.
    Kenady t
    thanks for your reply.
    if i press picker it is showing nothing i mean   no error is comming
    values is 0.0  is coming.
    if i press that line i mean i just put the cursor on the line empty line if i open the query at user defined query
    no data was found coming..
    may i know why it is comming
    if i see the item master it is having factor 1
    why it is comming i dont know.
    i am checking diff diff scenario
    i have some questins
    1) is the item should have instock
        i was thought earlier this is problem 
        but some items are having stock but still above problem is comming
    2) if the item is belongs to service , is above will work.
        i think it should work.
       but in that point also i am checking.
       plz update me what's wrong..

  • FMS Query for Calculation

    Hi Experts,
    I would like to write a FMS  query to allow for auto calculation based on the Inputs of 2 other fields before Adding the Sales Order.
    For example. A query on Sales Order where I have Item ABCD  and Quantity 200.
    I have a UDF named Abatement where the value is fixed 35%. And other is Assessable Value fixed with MRP Price say 350
    And based on the result should be given in Assessable Value field.
    Formula is  Assessable Value fixed  350 then Abatement  35 %  = 122.50 and then 350-122.50 =      227.50  should be displayed in the Assessable value field.
    Kindly provide me the solution for the query.
    Regards
    Amol

    Hi,
    Try this:
    SELECT  ((select $[RDR1.U_AssessableValue]) - ((select $[RDR1.U_Abatement]) * ((select $[RDR1.U_AssessableValue])/100)))
    Please post screen shot sale order window with UDF filed and values.
    Thanks & Regards,
    Nagarajan

  • Need a FMS Query on Sales Order!!!!

    Dear Experts,
    I need a FMS query on SO with Following Conditions...
    **Current Stock(UDF @Raw Level)
    1.If InStock(as selected warehouse Quantity)>=Ordered Quantity Then Current stock Field should be taken Ordered Quantity.
    2.If InStock< Ordered quantity Then Current stock should be taken InStock Quantity
    Please provide me same...
    Thanks in advance...

    Hi Param,
                   Assign the following FMS to the row level UDF 'Current Stock'.
    Declare @a varchar(50)
    declare @b VARCHAR(50)
    declare @e varchar(50)
    declare @c integer
    declare @d integer
    set @b = (select $[RDR1.ItemCode])
    set @e = (select $[RDR1.WhsCode])
    SET @c = (select onhand from OITW where ItemCode = @b AND WhsCode = @e)
    set @d = (select OnOrder from OITW where ItemCode = @b AND WhsCode = @e)
    IF @c>=@d
    Begin
    set @a=@d
    select @a
    End
    ELSE IF @c<@d
    BEGIN
    set @a=@c
    select @a
    End
    Regards
    Sattanatha Raja

  • Problem in Decimal Rounding in FMS Query

    Dear All,
    When an FMS is executed and if the result is 8.6760 (Desired result) but the actual result shown in SAP is 8.6800.
    And please note that I have fixed the decimal places to 4. Y is my FMS not giving the correct output (without the rounding).
    Thanks in Advance,
    Vasu Natari.

    Hi Vasu
    Go to -> Document Settings second tab  per document-> Check the sales documents, you must have flaged the option Automatic Rounding for Document
    For the abouve reason the SAP is rounding the Value but You FMS is not doing
    Regards
    Sandeep

Maybe you are looking for

  • ATP at storage location level

    Hi Gurus, Can anyone help me how to check ATP at storage location level in the plant in Order and delivery processing. I have seen configuration that ATP will happne at the plant level. Venkat

  • New computer-keep getting iphone synched with another itunes library

    So here's the situation. I got a new computer the other day and put Itunes on it. I hooked my iphone up to it and authorized my new computer. Seemed like everything was fine, that was until I went into devices and clicked on music. I then went to syn

  • Notes not syncing correctly

    I'm having some trouble syncing Notes in Mountain Lion. When I use the "single note view" (double-click in one) they don't sync. Actually, they send the modifications to the server, but the other computer doesn't display the changes, and when I try c

  • How to call *.C file in LV

    Hi frenz, i have created .C file for addtion of two numbers. Now i need to call that file from LabVIEW. How is it possible?. Thanks in Advance 

  • Dev is ODI and Prod is Sunopsis

    We're in the process of upgrading from Sunopsis 4.1 to ODI. During this time, can I use the ODI Designer to view our Production Master/Repository which has not been upgraded? Or do I have to maintain my Sunopsis Designer until everything is converted