Formatted Search on Distribution Rule

Experts,
I have a client where we use the Cost Centers for Sales Employees to get the P&L by cost center to work for them without any additional custom reports.
Because this client might have documents with many lines they asked to have the Distribution Rules be filled in automatically with what Sales Employee is selected on the document.
To make this easier I have used the same codes in the Sales Employee list (OSLP) and Cost Centers (OOCR). This means that George is code 1 in OSLP.SlpCode and OOCR.OcrCode.
Is there a formatted search that will auto-populate code 1 in the field for Distribution Rule in all the lines if I select Sales Employee 1 in the document?
Your help will be much appreciated,
Marli

Gordon,
Thanks, that code works.
The issue with this is that as soon as you tab out of the field, it brings up the 'Select Dist. Rule' box, even though you populated this with a code with the Formatted Search.
I have tested this with all the formatted search options of auto refresh and without and found that for all this options it brings up this box.
Thanks,
Marli

Similar Messages

  • Formatted search to get the cost center name

    Dear experts, I need to display the cost centre name/description on goods issue via formatted search. i have set the cost centre as " Display distribution rule in a unified column".
    Dimension 1
    01 Abc
    02 xyz
    Dimension 2
    001 aaa
    002 bbb
    Dimension 3
    0001 jkl
    0002 mno
    System shows only the code on goods issuance screen like "01,001,0001 " while i need to display "Abc,aaa,jkl" . Is it possible via formatted search
    or any other way?
    Regards,
    Awais

    Hi,
    Create on UDF at Row Level in Good Issue form beside distribution rule column
    & apply below FMS to it
    SELECT T0.[PrcName] FROM OPRC T0 WHERE T0.[PrcCode] =(select $[$13.10001018.0])
    auto-refresh it on selection of distribution rule
    regards,
    Raviraj

  • Formatted Search on Inventory Posting

    Dear Experts,
    I have a FMS on inventory posting distribution rule, its supposed to display the distribution rule automatically for the items, without human intervention.  How can I set this to auto-refresh ?  since when using this form virtually no column is normally touched apart from the reconcile button.
    Edited by: Roc on Apr 8, 2010 4:27 PM

    Hi Gordan,
    we have upgraded SAP B1 2005 to 2007 - we are using old query for formatted search for items in marketing document - can in that cancelled items also reflecting - can you please correct that query where i dont want to reflect cancelled items.
    SELECT T0.[ItemCode] AS 'Item No.', T0.[ItemName] AS 'Item Description', T0.[UserText] AS 'Item Details', T0.[OnHand] AS 'In Stock' ,T0.PrchseItem,T0.SellItem FROM  [dbo].[OITM] T0  WHERE (T0.[UserText] Like N'%[%0]%'   ) AND  (T0.[UserText] Like N'%[%1]%'   ) AND  (T0.[UserText] Like N'%[%2]%'   ) AND  (T0.[UserText] Like N'%[%3]%'   )
    Thanks

  • Adding data to Manual Distribution Rule from DIAPI

    Hi
    I am searching for the object to insert the data to OMDR (manual distribution rule) using DI API. Can any one help me out.
    I found many questions related to adding data to manual distribution rule using DIAPI which were not answered.
    Thanks in Advance.

    hi.
    Just check the below posts.
    object type of distribution rules
    Distribution rules setup..

  • In CJ70 transaction , distribution rule entering option is greyed out

    Hi all
    In CJ70 transaction , distribution rule entering option is greyed out after our upgradation.
    See in CJ70 transaction edit->preliminary settlement>enter distribution rules option will be there in menu path. till last month we able to enter this option.after our upgradation this option greyed out.i have searched for notes.but still i couldnt found any solution.
    Anybody can help on this issue???
    Regards
    Haran.

    Upon analyzing I came to know this is the program error in SAP_APPL 604 version from the note 1510625.
    As per the note the correction instructions are provided in package level 09(currently our package level is 08) or we need to implement the correction instructions provided in the note.
    With Thanks & Regards
    Haran

  • Create Formatted  Search by code in a user form

    Hi, I want to create a formated search in a user form but it doesnt work using my form id (STEC_EXTRAS) as the search.FormID.
    I created the formatted search by SAP (Shift+F2) and in the table of formatted searches the formid appears as 2000001000
    ¿Where is the relation between my id and the id SAP uses?¿Any SAP table or conversion rule?
    Thanks for the possible help.

    Hello,
    When You create a form, the id (Type) can be set up by  Add function, ..... it is staring form 2000000000 ...
    Maybe Your "ID" STEC_EXTRAS is the Unique ID of the Form...... not the Type
    Public Const WM_USERFORM As Integer = 2000000000 ' User defined forms minimum ID
    Public Const YOURFORM As Integer= WM_USERFORM + 1 ' My form id will be  2000000001 
    oForm = m_SBO_Application.Forms.Add("MYFORM", SAPbouiCOM.BoFormTypes.ft_Sizable, YOURFORM - WM_USERFORM)
    'this is the same as
    oForm = m_SBO_Application.Forms.Add("MYFORM", SAPbouiCOM.BoFormTypes.ft_Sizable, 1)
    ' or the same as
    Dim creationPackage as SAPbouiCOM.FormCreationParams
    creationPackage  = SBO_Application.CreateObject(SAPbouiCOM.BoCreatableObjectType.cot_FormCreationParams)
    creationPackage.UniqueID = "MYFORM"
    creationPackage.FormType = YOURFORM
    creationPackage.BorderStyle = SAPbouiCOM.BoFormBorderStyle.fbs_Fixed
    oForm = SBO_Application.Forms.AddEx(creationPackage)
    If you use  STEC_EXTRAS as FormType, You will see in the CSHS table STEC_EXTRAS as the FormId
    Dim creationPackage as SAPbouiCOM.FormCreationParams
    creationPackage  = SBO_Application.CreateObject(SAPbouiCOM.BoCreatableObjectType.cot_FormCreationParams)
    creationPackage.UniqueID = "MYFORM"
    creationPackage.FormType = "STEC_EXTRAS"
    creationPackage.BorderStyle = SAPbouiCOM.BoFormBorderStyle.fbs_Fixed
    oForm = SBO_Application.Forms.AddEx(creationPackage)
    Regards
    J.

  • Object Code for distribution Rules

    Hi all,
       what is the object code for the distribution rules (in Cost Accounting menu).
    Urgent...
    Thanks
    Sandeep

    Hi Deshpande,
    If you use the DI API help file and search for the OOCR table you find out that profit centers are not exposed yet in the DI API.
    That means that no object is available for distribution rules.
    Regards Chris

  • Formatted Search for Sales Order

    Hi,
    I setup a formatted search in Sales Order unit price field.
    Condition required:
    If Sales Order is copied from Sales Quotation, unit price remains as per Sales Quotation unit price, else formula to calculate mininum selling price appllies.
    Here's the query:
    DECLARE @BASE_ENTRY INT
    DECLARE @PRICE NUMERIC(19,6)
    SET @BASE_ENTRY = ISNULL($[$38.45.0],0)
    SET @PRICE = $[$38.14.0]
    IF @BASE_ENTRY = 0
    BEGIN 
    SELECT T0.[AvgPrice]*(1+T0.[U_SPFactor])
    FROM OITM T0
    WHERE T0.[ItemCode]=$[$38.1.0]
    END 
    ELSE 
    BEGIN
    SELECT @PRICE
    END
    l have no issue if the Sales Order copied from Sales Quotation, however when enter the Sales Order manually the formatted search having error message:
    1). [Microsoft][SQL Server Native Client 10.0][SQL Server]Error converting data type nvarchar to numeric.
    FMS execution failed on field '' with query name 'Get Minimum Selling Price (SO)'
    Looks like my query has error...

    Hi ,
    Try this below query and let me know your feedback,
    DECLARE @BASE_ENTRY INT
    DECLARE @PRICE NUMERIC(19,6)
    SET @BASE_ENTRY = ISNULL($[$38.45.0],0)
    SET @PRICE = $[$38.14.Number]
    IF @BASE_ENTRY = 0
    BEGIN
    SELECT T0.[AvgPrice]*(1+T0.[U_SPFactor])
    FROM OITM T0
    WHERE T0.[ItemCode]=$[$38.1.0]
    END
    ELSE
    BEGIN
    SELECT @PRICE
    END

  • 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

  • Changing the automatic Distribution Rule from Per to Full

    Hello SAPians,
    I have a scenario where the Customer is maintaining the Moving Average Price (I know this is not SAP suggested, I am in the process of convincing to move from moving avg to Std) for the Semi-finished goods and finished goods.
    It is Product Cost by Order scenario where Process Orders are using and the settlement rule to the Material and distribution rule is "Per" (Periodic). The main reason Customer had this Per was they would not be able to settle the Order once they settle it in full.
    But due to increased issues in month end atctivities due to thie 'Per' settlement (settlement of Process Orders not settling properly in the last month due to the failure of Batch jobs and other reasons). I want to suggest them to use Distribution Rule 'Full' instead of 'Per' because of the following advantages considering the above scenario.
    1. The 'Full' settlement can be settled if the Order is not in Teco or closed status any number of times as long as there is the Variance sitting on the Order.
    2. The 'Full' Distribution rule will not create issue if the variance is sitting on the Order in the closed period because when you do the settlement in the next period, system will allocate the variances from the last period to the Material Receiver in the current Period(I have not yet tested this scenario) and has not been. (Yeah I know there will be issue if the Material has been moved out of inventory before the settlement happens, they have another set up to update the Material prices manually by keeping the track of cost of Material).
    3. So the config change will be the Product cost by Order -> Manufacturing Order-> Define Cost-Accounting-Relevant Default Values for Order Typ --> change the Default rule from PP1 to PP2 'Process orders (periodic settlement)'
    Please let me know if what I am thinking is wrong based on this sceanrio and also please give me some more insight if I am missing any points.
    Thank you very much for your time!
    -Harter.

    Hi Balaji/Ajay,
    Could you please help me in understanding the effect of Variances if I change the Order type to FULL in this scenario (Moving Average price for Finished good Material)?
    I checked the configuration and the Variance is only Total Variance that is settling to FI and COPA.
    Also client is more concentrated on Variance accumulated per year and not per month.
    Let's say I have Order in Period 9 where the actual debits on the Order are $1000 and actual credits are $1200 where balance (variance) is $200 and suppose I missed the Period 9 settlement and I want to settle this Order in Period 10 where I had $100 variance in that Period 10
    Period         Variance on Order                Status
    9              $200                   missed
    10              $100                   not yet
    So now when I settle the Order in period 10 (with FULL as settlement type), it settles $300 instead of $100 variance. So if this is the case, if I look at the Variance data, yes the variance data is wrong but if I look at yearly perspective, it looks right but I think I am missing something here, right?
    Also what happens if the Order is open more than one year and the same scenario happens, the Variance will be posted to new year which is again issue, right?
    Am I in the right direction?
    Please advice.
    Thank you,
    -Harter.

  • Formatted Search - Restrict to Only One Customer on Activity Window

    Hello Experts:
    Am trying to create a formatted search to provide a suggested RMA Number on the Business Partners > Activity window in a UDF.
    While in Activity, the user should get a list of ONLY the one customer they are currently working with.  So if C0001 is being used in the Activity window, the list should show all suggested RMA numbers just for that customer of C0001, not any other customer. 
    When I use the following it shows all customers.
    --FMS 6BP Automated RMA Number
    SELECT
    T1.[CardCode] + ' - ' + ltrim(str(T0.[ClgCode]))
    FROM OCLG T0
    INNER JOIN OCRD T1
    ON T0.CardCode = T1.CardCode
    ORDER BY
    T1.CardCode Desc,
    T1.[CardCode] + ' - ' + ltrim(str(T0.[ClgCode])) Desc
    When I put in WHERE T1.CardCode = $[$ 9.0.0 ] in the right place it shows nothing...
    Any ideas on how to make only the one current customer in Activity window appear in the list???
    Thanks in Advance - Zal

    Thanks Istvan and Gordon...
    Istvan - that is the same as my SQL - just do not know how to show the $[$... correctly in this forum - it always goes to that http thing.
    Gordon - tried to use your SQL but it gave me an error of "Internal Error (-1003) Occured [Message 131-183] every time I tried to click on the magnifying glass.  However, due to your last line in the SQL it gave me an idea that eventually they were OK with - namely, the highest number to the top of T0.ClgCode...
    Thanks again guys - Zal

  • 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

  • Profit Center & Distribution Rule - figures not shown in P&L

    hi experts,
    I have created a distribution rule which consists of 5 profit centers as following:
    Sales1 20%
    Sales2 20%
    Sales3 20%
    Sales4 20%
    Sales5 20%
    I posted a JE with amount of 2000 to one of my expense accounts with distribution rule tagged in row level.
    Run:
    P&L statement with profit center Sales1 is selected (expected result: expense account 400)
    Result:
    Empty~NOTHING. (I believe 400 should be showing in my P&L right?)
    Please advice on the statement above and PLEASE do not ask me to read previous threads as I had gone through them.

    Hi,
    The note 843508 explains the behaviour.
    Hope it helps.
    Jesper

  • 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