Error when calculating costs: KL023

Hi,
I have the following requirement:
The user when saves a production order (tcode CO01) and if there are no activity type/cost center rates maintained then an error message pops up (message no. KL023). However the user can save the prod. order.
Now the user wants that in any case the order should not be allowed to save until and unless rates are not updated and hence the user will be stopped and cannot save the order.
I could not find any standard work area for this message in customization. Does it require any kind of abap prog. with user exit ?
Request to provide some help on above.
Thanks,
Ankita

Hi Ankita
You need to use badi WORKORDER_UPDATE....(SE18)
Write ABAP code in the method AT_SAVE or AT_RELEASE so that if the Standard cost does not exist (i.e. if MBEW-LPLPR IS ZERO), system would not allow you to SAVE/RELEASE...
You can also check the prices in KP26 or any other logic as per your choice... Ideally, if you check Std Cost, the rest other things are automatically checked
BR,Ajay M

Similar Messages

  • Error when createing cost element

    Dear Friends ,
    Following error appering when createing cost element , please suggest and explain the process in details ,
    Create the G/L account 94100040 first
    Message no. KS034
    Diagnosis
    You chose the function "Create primary cost element". Primary cost elements/revenue elements must have an equivalent in FI, meaning the account must already exist as a G/L account in FI. Account 94100040 was not created in FI, so you cannot create it as a primary cost element.
    Procedure
    Check whether you need to create cost element 94100040 as a primary cost element and for what purpose it is to be used for.
    If the cost element is to be assigned to accounts in FI, create a G/L account in an FI company code.
    Manually create G/L account
    If it is not to be assigned to FI accounts (additional CO costs), it suffices to create the G/L account as a chart of accounts item.
    Create G/L account in chart of accounts
    You can create the cost element as a secondary cost element in CO. This does not require an equivalent account in FI.
    Regards
    Raghu

    Hi,
    use T.code FS00 and enter G/L account number and co.code and enter required details and in application tollbar click edit cost element and enter required details.1st consult FICO consultant for above and use of G/L account group and other details for creating G/L.You can cretae Cost Element in t.code: KA01 also.
    For more check the links to Create Primary and Secondary Cost Elements
    http://www.copacustomhelp.state.pa.us/infopak/nav/finance/controlling/file1402/index.htm
    http://www.copacustomhelp.state.pa.us/infopak/nav/finance/controlling/file2595/index.htm
    http://www.sap-basis-abap.com/sapco004.htm
    Regards,
    Biju K

  • Receiving error when calculating two fields with different date format

    I am more familiar with SQL Server than Oracle, so after searching online without success, I am asking here.
    I'm using PL/SQL Developer with Oracle DB 11g Enterprise Release 11.2.0.2.0 64 Bit
    MyTable:
    ID_Number     VarChar2
    Date_Received     Date
    Select ID_Number,
         Date_Received,
         To_Date(substr(ID_Number, 1,6), 'YYMMDD') SentDate,    
         Date_Received - To_Date(substr(ID_Number, 1,6), 'YYMMDD') NumDays
    From MyTable
    Where substr(ID_Number, 7,3) in ('ABC', 'ABD')
    and Length(Trim(Translate((substr(ID_Number, 1,6)), '0123456789', ' ' ))) is null
    ID_Number                    Date_Received          SentDate          NumDays
    131002ABC1654106     10/16/2013               10/2/2013          14
    131004ABD8813899     4/12/2013                 4/8/2013            4
    131014ABD1844832     10/16/2013               10/14/2013          2
    Sometimes the first 6 characters in the ID_Number are not numbers, and the Length(Trim(Translate removes those records
    I just want records where NumDays > 2
    I've tried putting the query in a subquery and using Where NumDays > 2 outside.  I've also tried using the computation directly in the Where clause.  Without this in the Where clause it runs fine, with it in either spot I get the following error:
    ORA-01931: Date format picture ends before converting entire input string
    I'm not sure how to put both dates in the same format.  I've tried declaring the format to no avail.  I do not understand how I can calculate within the select but not use the same calculation within the Where clause.
    Thank you for your help.

    Hi,
    SQL is a language for describing the results you want.  How the system gets those results is up to it; you don't have much say regarding which conditions will be applied when.
    One place where you can control the order of things is in a CASE expression.  When you say
    CASE
        WHEN  condition_1
        THEN  expression_1
    END
    you can be sure that expression_1 will only be evaluated when cond_1 is TRUE.
    Try something like this:
    WITH  got_sent_date AS
        SELECT  id_number, date_received
        ,       CASE
                    WHEN  TRANSLATE ( SUBSTR (id_number, 1, 6)
                                    , 'x 0123456789'
                                    , 'x'
                                    )  IS NULL
                    THEN  TO_DATE ( SUBSTR (id_number, 1 6)
                                  , 'YYMMDD'
                END     AS sent_date
        FROM    MyTable
        WHERE   SUBSTR (id_number, 7, 3) IN ('ABC', 'ABD')
    SELECT  id_number
    ,       date_received
    ,       sent_date
    ,       date_received - sent_date    AS num_days
    FROM    got_sent_date
    WHERE   date_received  > sent_date + 2
    If you'd care to post some sample data (CREATE TABLE and INSERT statements) and the results you want from that data, then I could test this.
    Of course, you'll still have run-time errors if id_number starts with 6 digits, but they don't happen to be valid, e.g. '131100' or '130229'.  That's one of the many reasons why storing date information in VARCHAR2 columns is such a bad idea.  To get around that problem, see
    https://forums.oracle.com/message/4255051

  • Error when calculating salary for daily wage earners

    Dear All,
    We have a category of employees who are daily wage earners, the esg for pcr is 3. We have modified the schema to suit the requirements, when the employee exists from the 1st of the month, then all calculations happen correctly, but in case of mid month hiring, the values are calculated at 60% of the values. any help would be helpful
    Raghu

    This is the PCR for /803 in INP-1
    RTE=GASOLL
    RTE-GAAU**
    RTE*KGENAU
    RTE/TKDIVP
    ADDWT *
    Raghu
    Edited by: Raghu C on Jul 18, 2011 12:59 PM

  • Invalid number error when calculating with sysdate

    Hello - I am getting invalid number error for query below:
    SELECT *
    FROM
    trkg
    WHERE
    trkg.tran_type=500
    AND
    trkg.mod_date_time>sysdate-0.5
    I am not sure what is wrong with above query. Strange part is that it executes fine in one environmnet and returns 'invalid number' error in other environmnet? Please help me find missing setting.

    more information:
    Table1: LOCN_HDR with field locn_brcd and locn_id
    locn_brcd locn_id
    26001A 0000086
    26002A 0000087
    26001B 0000088
    Table2: PICK_LOCN with field LOCN_ID
    locn_id
    0000086
    0000087
    0000088
    Table3: TRKG with field from_locn and mod_date_time (this is timestamp field)
    from_locn mod_date_Time
    0000086 29-MAY-13 10.09.23.000000000 AM
    0000087 29-MAY-13 10.11.48.000000000 AM
    0000088 31-MAY-13 04.07.21.000000000 PM
    Now I combine Table1 and Table3
    select * from appwms.locn_hdr lh
    join
    (SELECT lh.locn_brcd,trkg.mod_Date_Time from appwms.trkg
    join appwms.locn_hdr lh
    on trkg.FROM_LOCN = lh.LOCN_ID
    where
    trkg.TRAN_TYPE = 500
    and trkg.mod_Date_time>sysdate-5
    ) trkg1 on lh.locn_brcd=trkg1.locn_brcd
    -- returns values correctly
    Now when I join another table to above (ie table 2), it returns 'invalid number'
    select * from appwms.locn_hdr lh
    join
    (SELECT lh.locn_brcd,trkg.mod_Date_Time from appwms.trkg
    join appwms.locn_hdr lh
    on trkg.FROM_LOCN = lh.LOCN_ID
    where
    trkg.TRAN_TYPE = 500
    and trkg.mod_Date_time>sysdate-5
    ) trkg1 on lh.locn_brcd=trkg1.locn_brcd
    join
    (select pld.locn_id,lh.locn_brcd
    from APPWMS.PICK_LOCN PLD join appwms.locn_hdr lh
    on pld.locn_id = lh.LOCN_ID ) picklocn on picklocn.locn_brcd=lh.locn_brcd
    why are rows returned with one join? when i have more than one join why does it return error 'invalid number'.

  • Error when Create Cost Estimate for Material using CK11

    Dear Experts,
    I have a material ABCD which is FOC parts:-
    1) Procurement type: F
    2) Special procurement type: Z (at first, it was wrongly entered as B. I changed special procurement to Z & the message 'The procurement type of the special procurement type is E' displayed but I still can save & system allowed it).
    3) Standard price is 0.00 as this is FOC.
    Firstly, I run CK11 for material EFGH which is the parent of material ABCD.
    This time, the material ABCD has special procurement type B. I received error messages:
    1) No price could be determined for material ABCD in plant xyz,
    2) Cost component split costed with value of zero,
    3) Cost estimate for material ABCD in plant xyz is incorrect.
    Then, I changed special procurement type for material ABCD from B to Z and run CK11 again. Still the same error occurred.
    Could someone advise me how to run CK11 without errors.
    Thanks in advance!

    I don't know if B and Z are really the name of your special procurement keys or you are just using them as examples.  Either way, the special procurement key is critical for determining how your material is valued.  It is used for such things as stock transfer from other plant, subcontracting, and consignment processes.  Can you tell me how these special proccurement keys are set or what you want to use these keys for.  You can find the configuration for these key under menu path Controlling - Porduct cost controlling - Product cost planning - Material cost estimate with quantity structure - Settings for quantity structure control - Master data - Check special procurement types.
    thanks,

  • Disallow saving of production order if there is error calculating cost

    Hi Gurus,
    We have a requirement that when saving a production order, an error message should appear if there is no planned cost for the material. As of now there is only a warning message that says "Error when calculating cost". How to make it an error message instead so the user cannot save this production orders?
    Thanks a lot,
    Raymond

    Hi,
    Develop a enhancement in BADI Workorder_update. It has two methods AT SAVE and AT RELEASE where the ABAP program can be written. You can stop creation or release  of the order if field LPLPR - MBEW is blank.
    Regards,
    Divraj

  • Cost error when saving production oredr

    Hi.
    While I am saving the order it gives me the error. ERROR WHEN CALCULATING COSTS.
    What is the problem??\
    Regards
    Suresh

    Suresh,
    As suggested by Mangal check the logs for errors during cost calculation.
    To me it must either there are some components of the order which does not have price in the materail master accouting1 view. If it is a procured materail please maintain info record using ME11 or directly input the price in change mode of the material master.
    or other problem could be
    Activity price is not maintained for the activity type/cost center/period/version combination maintain this in KP26.
    Regards,
    Prasobh

  • Error when creating Production Order

    Dear All,
    When i was trying to create Production Order using CO01, there was an error message that says "error when calculating cost, see log, log is deleted when saving"
    what is the problem from that error message? how can i solve this problem?
    best regard,
    MARUFAT

    Cost consist of material cost which are the direct cost, it is calculated from the component and the material itself for which the order is created. If the material is semifinished or finished check whether the accounting view for these material contains value. These material could be costed as per the method mentioned by our friend or you may enter value through MR21 (if the material is not costed atall since it is created). It is recommended to update cost through costing run and by CO member. Now if the material is Raw material you need to maintain PIR.
    The second part could be the activity cost. These follows from the routing/receipe. Mostly the costing error is due to the inappropriate defination of either cost center or activity types. You need to confirm whether activity price are define for the period.
    Appriciating you for taking a concern on the costing error and not overriding.

  • Error when importing CO Hierarchies from R/3 DEV to R/3 QAS

    Dear SDN,
    I am getting the following error when importing Cost center and cost element hierarchies from R/3 DEV to R/3 QAS...
    Object OSOA  0COSTCENTER_0101_HIER has not yet been imported successfully
    Object OSOA  0COSTELMNT_0102_HIER has not yet been imported successfully
    Ended with Return code ===8...
    But The two hierarchies were available in R/3 QAS and also i am able to utilise..
    My doubt is if i transport these hierarchies from R/3 QAS to R/3 Production any major issues...
    Now i want to test a data in BW DEV from R/3 Production data...
    So, I am planning to transport These hierarchies from R/3 QAS to R/3 PROD...
    Here we do not have BW QAS...So, getting data from R/3Production to BW DEV and testing...
    After testing Directly use in BW Production...
    So, Please suggest me why when importing these hierarchies errors occuring???
    Help will be greatly appreciated with points...
    Thanks in advance...

    Hi Venkat,
    Please go through the following threads...
    Hierarchy  Transports
    Transporting cost center and profit center standard hierarchies
    /community [original link is broken]://Transporting a hierarchy
    Transport Hierarchy
    Khaja

  • SharePoint Designer 2010 Error occurs when accessing Edit Form: "The server returned a non-specific error when trying to get data from the data source ..." This occurs when using "" in a calculated column in a SharePoint List

    I created a calculated column "Expiration Date" in SharePoint 2010 with formula, =IF([Contingent Hire]=TRUE,(Created+90),(IF([Contingent Hire]=FALSE," ")))
    This works in the SharePoint list but when I go to edit the Edit Form in Designer. I get the error specified in the title of this post. I'm trying to make it so the Expiration Date is blank when another column, "Contingent Hire" (a YES/No
    column) is FALSE.
    The Edit Form is essentially a DataViewWebpart. If I remove the " ", like so, "(IF([Contingent Hire]=FALSE,))" from the calc column, the error goes away; however, the Expiration Date field does not
    remain blank like I want it to.
    Does anyone have any suggestions? (Below is the error generated when I open Designer and then try to open the Edit form for the corresponding list containing the calc column)
    JackSki123

    Hi Jack,
    Could you provide a screenshot about this issue?
    As Dimitri suggested, you can install the update for your SharePoint Designer and check again.
    And you can also check if you can display "NA" instead of " " in your calculated column per the following post.
    http://rajeshspillai.blogspot.in/2012/03/server-returned-non-specific-error-when.html
    Thanks
    Daniel Yang
    TechNet Community Support

  • KP06 Cost Center Budget Planning System error when locking the data records

    Hi,
    While updating Cost Center Planning system(KP06) its giving the below error:
    System error when locking the data records.
    Message no. KI502
    Diagnosis
    The lock to protect the data records being processed could not be set. The
    probable reason for this is that the SAP locking table is full and no more
    entries can be added.
    Procedure
    Inform your system administrator immediately
    No planning data has been changed
    Message no. K8038
    Diagnosis
    You used Post. While preparing the data for posting, the SAP System
    determined that no changes were made in the available databank values.
    System Response
    A posting activity price is not necessary
    Please help me how can we rectify the above error..
    Thanks
    VS Rao

    Hi,
    check the locking entries (t-code SM12).
    http://help.sap.com/saphelp_erp2004/helpdata/en/37/a2e3ae344411d3acb00000e83539c3/frameset.htm
    Best regards, Christian

  • Error when using Calculation Area or AutoSum

    Why do I get an error when trying to use AutoSum? It says "Object reference not set to an instance of an object".  I can't use it all.  Nor can I manually create a calculation in the Calculation Area at the bottom of a PowerPivot worksheet. 
    I am able to build a calculation directly in Excel from the PowerPivot->Calculated Fields menu option. But not from within PowerPivot.
    Martina White

    Hi Martina,
    This sounds very much like a bug.
    Check that you have installed the latest updates for Office/Excel
    If you're using Excel 2010, check that you have the latest version of the Power Pivot add-in: http://office.microsoft.com/en-ca/excel/download-powerpivot-HA101959985.aspx
    Try a repair on your Power Pivot add-in installation (Excel 2010)
    Try a repair on your Office/Excel installation (Excel 2010/2013)
    If none of these things resolve the issue, or you've already tried them, you could report the bug here https://connect.microsoft.com.
    Regards,
    Michael
    Please remember to mark a post that answers your question as an answer...If a post doesn't answer your question but you've found it helpful, please remember to vote it as helpful :)
    Website: nimblelearn.com, Blog:
    nimblelearn.com/blog, Twitter:
    @nimblelearn

  • Getting Cost Center Does not exist error when executing BAPI_ACC_GL_POSTING

    Hi Champs,
    I am getting Cost Center Does not exist error when executing BAPI_ACC_GL_POSTING_CHECK.
    But when I checked for the particular Cost center, it is mapped to the same company code the program has got executed.
    Example:
    Cost center 1000/150402 does not exist on 17.11.2009.
    Cost center 1000/150402 does not exist
    Cost center 1000/150402 does not exist on 17.11.2009.
    Cost center 1000/150402 does not exist on 17.11.2009.
    Please let me know if you have any guess on this. It is very critical issue for me.
    Thanks for all your help in advance.
    With Best Regards,
    Ravi kanth Yechuri

    Use 0000150402 not 150402 .
    Rob

  • Error when Using a Calculated Key Figure

    Hi,
    I am having a problem using calculated key figures (CKF's). I am not getting any errors
    when i am creating them but when i pull the same into the report it is giving an error
    SUB FORMULA not available. Can you please advise how to fix this issue.
    Thanks
    Rashmi.

    Hello Rashmi,
    thius is a known issue. The procedure from note 1238872 can be useful:
    Download the BI 7.0 front-end add-on for SAP GUI 7.10, Support Package
    700 from the SAP Service Marketplace.
    Then save the calculated key figures in the InfoProvider (left-hand side
    in the Query Designer):
        o  Select the calculated key figures in the InfoProvider.
        o  Save the calculated key figures using the context menu
        o  or in the properties of the calculated key figures (right-hand
           side in the Query Designer).
        o  If other calculated key figures are used in a calculated key
           figure, save them as described above.
        o  For safety reasons, also save the query definition.
    If the calculated key figure was saved correctly, the system does not
    issue any error messages when you check the query definition (by
    choosing "Menu -> Query -> Check").
    Cheers,
    Ricardo

Maybe you are looking for

  • How to redownload final cut pro on different computer without installation disc?

    I purchased a laptop that has final cut pro on it but it didnt come with an installation disc or anything. I need to put my final cut pro on a different computer...What can I do?

  • IPhone 4S' iOS 5's Internet no longer works.

    Hello. My client's iPhone 4S (still on iOS5 -- did not touch iOS 6 yet)'s Internet stopped working since e-mails, Maps, etc. don't download. We tried powering it off and on to reboot, but that did not help. The voice phone part works though. This is

  • Error while lock object creation

    Hi When I tried to create a lock object, I get the following error. Error: "Total length of lock argument for table XXXXXXXXX longer than 150" I have 3 tables in which Table1 is the check table for the value tables (Table2 & Table3). During the proce

  • Lead Time calculation in process order

    Hi,       I have a process order to be created of 112.6 L. i have only one phase  & one resource allocated. i have maintained my OH time as 1 H in my master recipe. now for resource i have maintained scheduling formula as ZRUNA = OH. After creating P

  • Editable JComboBox -Saving itz new value in the database.

    Hi, I have a Combobox say Product , in which some fields (like -> tv , hand blender etc) comes from Database and i have added one more field say others , in others field user can enter new product name and it shd be saved in the same database, i have