Validating Internal Order Settlement Rule during creation

Does anybody know of a user exit, badi, anything, that can be used to validate assignement data when creating/changing the settlement rule on an internal order?
Appreciate the help...
Sam

Hi, I just wanted to come back and add this extra information incase someone else needs it in the future:
I think we were finally able to come up with an acceptable solution.
<b>The Problem:
============</b>
SAP does not provide an easy way to validate detail section of a settlement rule for an internal order. The user exits that are available do not import the COBRB structure that contains the screen data entered by user in the detail screen.
<b>Solution:
===========</b>
Watch out for wrapped lines!
(1) Implement the BADI: <b>CO_SRULE_CHECK</b>; NO filter; Settlement Rule Custom Validation BADI
(see current thread for details)
Inside the <b>DISTRIBUTION_RULE_CHECK</b> method of your BADI, implement your custom validation. You can call out to your standard CO validaton module, or whatever.
(2) Implement user exit: EXIT_SAPLRKIO_002(include zxaufu02): Call settlement_rule_check.
(3) Implement a subroutine as shown (adapt to your business environment):
FORM settlement_rule_check.
DATA: exit type ref to IF_EX_CO_SRULE_CHECK.
DATA: lt_cobra LIKE cobra OCCURS 0 WITH HEADER LINE, lt_cobrb LIKE cobrb OCCURS 0 WITH HEADER LINE.
don't validate in display mode
CHECK I_ACTVT NE 03.
Call function to get the current settlement rule from
memory buffer (this is the crux of the solution)
  call function 'K_SETTLEMENT_RULE_GET'
       EXPORTING
            objnr     = i_aufk-OBJNR
            x_all     = ' '
          TABLES
            e_cobra   = lt_cobra
            e_cobrb   = lt_cobrb
          EXCEPTIONS
            not_found = 1
            others    = 2.
  if SY-SUBRC <> 0.
raising E_MESSAGE.
  endif.
Now Prepare/call BADI to check the custom rules
  class CL_EX_CO_SRULE_CHECK definition load.
create an instance of BADI
  call method cl_exithandler=>get_instance
       changing
        instance = exit.
call the check method of the BADI
  call method: exit->DISTRIBUTION_RULE_CHECK
       EXPORTING
           DISTRIBUTION_RULE = lt_cobrb
  EXCEPTIONS
     not_allowed                = 1
     not_allowed_with_msg       = 2.
either use a standard message function or create your
own
  IF sy-subrc = 1.
    PERFORM message_send
      USING 'KD' 'E' '027' space space space space space.
  ELSEIF sy-subrc = 2.
    PERFORM message_send
      USING sy-msgid sy-msgty sy-msgno
            sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4
            space.                   "...
  ENDIF.
endform.
(4) Test, Test, Test. Hope it works for you.
Sam

Similar Messages

  • How to open field WERKS in Internal order settlement rule

    Hello experts,
    Could you explain please  how to add field PLANT (WERKS) in internal order settlement rules. I would like to fill out this field during the settlement process.
    Any advices will be very appreciated.
    Regards,
    Ivan

    HI Ivan,
    Please post more details on your business scenario. Why you want to add plant field in the rule?
    To which receiver you want settle your internal order? If you want to settle to a material for instance, plant will be one of the field available. Try double click on settlement rule to get to detailed screen.

  • For internal order settlement rule amount column is requied instead %

    Hi Gurus,
    For internal order settlement rule percentage is there but business wants  to settle from AUC to final asset by amount wise how can we do this.
    I tried to change the investment profile but it is coming amount field while saving it is not displaying.
    Please help in this regard
    Thank you.
    Ranganadh

    Hi
    Check the path
    IMG>Controlling>Internal Orders>Actual Posting>Settlement>Maintain Settlement Profile>Maintain Settlement Profile.
    Here there is a tick for amount settlement under Indicators. You need to maintain this check box for your requirements.
    Regards
    Sanil Bhandari

  • Maintain internal order settlement rule using LSMW

    HI ALL
    I want to do mass maintenance of internal order settlement rule. Settlement category is PSG.
    But when I use LSMW to do KO02, I only can input one settlement receriver, the first line will be overwritten by the second line.
    I also see BAPI INTERNAL_ORDER_CREATE,but cannot find PSG as a settlement category.
    Does anyone know how to do this?
    THX
    Deelia

    Hi Lian
    When you do recording, enter two settlement rules..
    Then, before pressing the "DEFAULT ALL" button, change the Field names for the 2nd settlement rule
    The problem you described happens because the field names for both settlement rules are same.. Hence, it gets overwritten
    Assume that field name for Order is AUFNR... You can change the field name in recording to ZAUFNR for one of the fields
    See the screen shot, wherein I changed the name of the recorded field to _01, _15 and _70
    Br. Ajay M

  • Material number in profitability segment in internal order settlement rule

    Hello,
    We have a process which is the following: the real posting for the revenue in the sales order is an internal order. Once the internal order settlement is done, then the values flow to COPA.
    The material shows up in the revenue FI document, but it does not show when we look at the internal orders line items.
    I need to have the material number from the sales order (from the revenue posting) automatically identified in the profitability segment in the settlement rule of the internal order.
    Would anyone  know how this can be done?
    Thank you!

    Hi,
       Where exactly are you checking for the material no ? When you settle the IO to COPA a record type C will be created in COPA. Is the material no missing in the record type C ?
       In that case if the sales order no is available on the internal order then you can in a derivation rule do a table lookup on VBAP and get the material no.
    regards
    Waman

  • Internal order settlement rule

    Hi Friends,
    We have a internal order type with investment measure for AUC. When I create a internal order it is creating a AUC in the background but no settlement rule is updated. I released the order, posted some values and ran KO88 ( with and without TECO status) but still settlement rule is not updated with AUC. It is not even allowing me to update settlement rule manually with the AUC.  Also in the settlement rule, I don't see AUC in the object type, but I see a FXA, not sure if it is an issue. Thanks in advance
    Edited by: nspv81 on Dec 7, 2010 10:05 PM

    Hi,
    The system design does not offer the settlement type "AuC" for manually created settlement rules. This is correct.                                 
    AuC-settlement rules can only be created by the system automatically if the order/WBS-element has an investment profile with the flag "Manage AuC" set. The investment profile can be reviewed in transaction OITA.                                                                               
    If this is the case then the system will create the AuC rule during the FIRST run of a periodic settlement (update run) by    automatically taking the AuC as a settlement receiver.                                                                               
    If you do however not use the investment profile you need to maintain a fixed asset settlement rule and enter the asset number manually.         
    regards Bernhard

  • Internal order "settlement rule" change

    Dear Gurus,
    I would like to change "settlement rule" in internal oder which has been used since go-live under ECC6.0.
    I go to KO02, keyin 'order number' ,enter and click on "settlement rule" button to update.
    but profitability segment line just display mode not changeable.
    How can i update settlement rule in KO02?
    kr,
    J.

    once you settle an order with a settlement rule you cannot change the rule no more.
    But you can create a new settlement  rule.
    First double click on the settlement rule you are currently using and for the "validity from field" give the last period. so this rule wont be in use anymore.
    than create a new rule.
    after these steps when you run the settlement, system will pick up the new rule you created.

  • Error message - data master internal order settlement rule

    Hi people,
    I'm creating an internal order, and in the settlement rule, i'd like to put a message error when i make a distribuition over 100%. For example, i put 50% in a settlement receiver and 65% in another one, that makes 115%. The system shows a message, but it allows me to save. I need that shows an error message and don't allow me to save.
    Anyone can help me?
    The message that appears is this one:
    Total = 115.00%, ( Set.Type PER / Version / Actual settlement ), period 002/2009
    Message no. KD042
    Diagnosis
    You have entered distribution rules which settle 115.00% in total. This applies for settlement view ( Set.Type PER / Version / Actual settlement ) in period 002/2009.
    When checking the percentage total, the system found one of the following errors:
    The total percentage for the distribution rules is more than 100%
    The total percentage for the distribution rules is less than 100% and this is a rule for full settlement.
    The total percentage for the distribution rules is less than 100% and the 100% check is switched on in the settlement profile.
    Procedure
    You can ignore this message if you are settling by fixed amounts. The settlement then checks whether the settlement sender has been fully credited.
    Otherwise, correct the percentages for view ( Set.Type PER / Version / Actual settlement ) to be able to settle exactly 100% in period 002/2009.
    If these rules are not full settlement rules (settlement type GES), you can switch off the 100% check in the settlement profile. This procedure also suppresses the message in future.
    Note
    If you cannot find any fields where you can enter percentage values, this is probably because the settlement profile is configured to hide them. Switch on percentage settlement in the settlement profile, or use equivalence numbers for your rules, if the project profile allows this.
    Many thanks.

    Hi
    Below is the extract for the 100% Validation check. Please check the bold part. Even if you save the settlement rule with more than 100% at the time of settlement this will be errored.
    dentifier for "100% validation"
    Indicator controlling whether percentages in the settlement rules are checked by the system.
    If you have defined percentage distribution rules for a particular settlement rule, the system checks the total percentage either when you save the settlement rule or if you use the percentage check function.
    Use
    If the indicator is set  The system issues a  warning
    if the total is <> 100%.
    If the indicator is not set The system issues a warning
    if the total is > 100%.
    In both cases, you can ignore the warning and save the settlement rule. However, to be able to run the settlement, you must first correct the settlement rule.  The settlement run itself prevents you from settling more than 100%.
    Note
    The indicator only affects periodic settlement.  In overall settlement, the percentage must always be 100%.
    You can also use this indicator if you are not using percentages for settlement.  If this is the case, you must activate the equivalence numbers.  You then receive a warning that, even if you have entered settlement rules, none of the rules has received an equivalence number (other than zero).

  • CProjects to Internal Order - settlement rule

    Hi,
    Having created an IO from cProjects, I get to see accouting error. Control Cockpit shows "No settlement rule exists for the Order ...".
    Going further, this error is coming in the way of the planned costs getting to IO, and subsequently the IO costs coming up in Fin Planning, in RPM.
    Please advise on the steps to correct the settlement rule issue. Resolving one issue is likely to solve many of my issues!
    Thanks.

    Yes. You cannot delete.
    If you want to use this new distribution rule from here onwards (means from this period ..) it is possible.
    Do the following
    1. For old distribution rule (i.e. for old cost center ) change the "valid to period" last month. You can directly change this by clicking the settlement rule in the order master data. 
    2. For new distribution rule give "valid from period"  whatever you want  (future periods).
    So that you need not delete the old distribution rule.. and from this month onwards your new distribution rule will work.
    Radha

  • Bapi for changing internal order settlement rules

    Hi
    I'm looking for BAPI to add/ modify settlement rules in internal order (like in tc KO02). BAPI_ALM_ORDER_MAINTAIN seems not working, and there's only BAPI_INTERNALORDER_CREATE and GETITEM in internal order group ( there's no MAINTAIN ).
    Is there another BAPI to do this? of FM?
    regards
    Wojciech.

    Thanks for help but this links points to discussions abut creating internal order. I want to change one. BAPI_INTERNALORDER_CREATE does not allow to change orders ( i've just tested it.)
    regards
    wojciech

  • Internal Order Settled to AUC reverse process

    Dear Gurus,
    I had a hard time to think how to do the processes over and over again.
    The current process is:
    Every month the internal order (investment and real order)  will collect the expense on AUC and settle to the AUC.
    At the end of year, the AUC will be settled to Fix Asset by internal order settlement rules.
    Now what if the settled expense was not correct. For example, in 2009, I created the IO and settled the IO to AUC in several months. But in 2010, I found the expense in IO shall not be settled to AUC, the expense was only the overheads. ( The AUC was not settled to Fix Assets). Just like I wanna reverse the settlement in 2009.
    So it would be like this in a flow chart.
    IO-> AUC->FX
    Now I need to do this:
    AUC->IO->GL
    For IO->GL, I have figured out that I can change the settlement rule profile and make the GL account allowed.
    But for AUC->IO , I have no idea and almost burn my brain on it.
    Could you please help to throw light ?
    Emma

    Hi,
    I tried 2 write offs, please help to see whether I am doing right. Thank you!
    I tried to reverse the document but it was not allowed.
    I am thinking to post a document like the following:
    1. Doc in 2009
    50 8910000000 settlement AUC             2,964,800.00-        Order:C1BIC83002
    70 3270600041 000327000032 0000    2,964,800.00
    2. What I want to post:
    40 8910000000 settlement AUC         2,964,800.00      C1BIC83002
    75 3270600041 000327000032 0000    2,964,800.00-
    But it gave me an error when I enter the asset number.
    Asset is investment measure, transaction type not allowed
    Message no. AK005
    Diagnosis
    Asset   that is to be posted is an investment measure. You are not allowed to post transactions that affect acquisition value using the current transaction.
    Procedure
    Check the asset and transaction type 160.
    I am not sure which transaction type is correct.
    Emma.

  • KO88 Internal Order Settlement

    Hi All,
    Internal order Settlement rule has Asset under construction .
    Current year cost has been settled to AUC. However an cost belonging to last year Dec 2006 is not settled to AUC.
    This cost is available in Line item of Internal order in Tcode : KOb1 for the previous year 2006. For the current year 2007 the balance of the order is Zero as all cost are settled through T code: KO8G
    We tried settling the cost to period 12 year 2007 in KO88 system said Settle the balance from previous year in the previous year first. We have applied SAP note: 819197. Now we are getting another error AUC not completely credited.
    Can you provide your inputs
    Thanks

    KO88 is a Period end activities, after each month nend you have to mandatorily run KO88 settlement.
    select Posting period 05 and do the settlement.
    Reagrds,
    Alok

  • Internal order settlement to G/L account

    Dear All,
    User has created one internal order 650002012 and the settlement profile is created settle to G/L account S882000000. this is a cost element category "1" (Loss on contract cancellation & co).
    In the internal order The Responsible cost center is DA01D89998 (Validation & Eng Admin-St) the profit center for this "DA01".
    In the internal order the Requesting cost center is DA26ZPSHRD (Shared Cost Center for Deltron), the profit center is "DA26"
    in the settlement profile when i double click on the settlement rule, he has assigned the Cost center DA01ZPSHRD (Shared Cost Center for Ko) and the profit center is "DA01".
    But when he execute the T.C "KO8G" the system is showing the error is " G/L account requires an assignement to CO object".
    1. The receiver G/L account has created as a cost element. is this correct?
    2. In the allocation structure do we have to select the "By cost element check box" or do we have to give the secondary cost element in the settlement cost element field.
    Please give the sugessions to solve this problem.
    Thanks and regards,
    Rao.

    It sounds like you are a little confused on how internal order settlement works.  If you want the internal order to settle to a G/L account then you must enter the G/L account number in the settlement rule in the internal order.  To do this, click on the settlement rule button in the order, select category G/L and enter the G/L account number.  In order for you to be able to select G/L as a settlement object the settlement profile you've assigned to the order must allow this.  Check the settlement profile and make sure that G/L account is listed as settlement optional or settlement required.  Also check the allocation structure that is attached to the settlement profile. In the allocation structure you must have an entry under the settlement cost element for receiver category G/L.  Here you should specify a cost element of type 22 as the settlement cost element.
    When you make those settings you will be able to specify the receiving G/L account in the internal order.  The system will then credit the internal order for the settlment amount with the credit posted on the category 22 cost element specified in the allocation structure.  The debit will appear on the G/L account you specified in the internal order's settlement rule.  Normally, the receiving G/L account would not be setup as a cost element.  if you do set it up as a cost element you will need to use an automatic account assignment setting (OKB9) to specify the cost object that it will post to.
    thanks,

  • Why internal order settlement is require

    why internal order settlement is require
    and in internal orders    acctual cost is plan cost is 100 and acctual is 150
    then which amount we have to settle in internal order
    regards
    venkatareddy

    Hey Venky,
    An internal order is usually used as an interim collector of costs and an aid to the planning, monitoring, and controlling processes needed. When the job has been completed, you settle the costs to one or more receivers (cost center, fixed asset, profitability segment, and so on).
    During settlement, some or all of the plan or actual costs incurred on an object are allocated to one or more receivers. The system automatically generates offsetting entries to credit the sender object. The debit postings assigned once to a sender object remain in place, even after settlement to a receiver (and can therefore be displayed). The costs settled are updated on the corresponding receiver object and displayed in reporting.
    To be able to settle an order, you must have saved a settlement rule in each of the senders. This settlement rule determines where the costs are to be settled to. You can achieve this in two ways:
    Settlement to One Receiver:You use this basic form of order settlement to completely settle the costs collected on the internal order. This is either to a cost center, or a G/L account under a settlement cost element. The system generates the appropriate settlement rule from the information contained in the internal order master data.
    Comprehensive Settlement:Definition of a comprehensive settlement rule gives you more settlement possibilities, for example, you can:Settle costs to a wide range of receivers (project, sales order, profitability segment, and so on).
    Specify how the costs are to be distributed between receivers.
    Define the cost elements under which the sender is to be credited and the receivers debited.
    Constraints:You can only use one of these settlement methods at a time: For example, if you defined settlement to one cost center in the master data for an internal order, then you can only define a more comprehensive settlement rule once you have deleted the first rule.
    Hope this helps. Requesting to reward points please.
    Rgds
    manish

  • Internal Order Settlement Reversal Prior Year KO88

    Hi,
    I am on ECC 6.   We have been asked if it is possible to reverse prior year settlements for internal orders in the current year and period.                                                                The current year  reversals are not the issue. These orders settlements in need of revision were made in the prior year and the periods are all closed and not to be opened as the financials are complete for that year.
    Presently, there are two steps :  1) Reverse the current year periods and resettle using revised settlement rules.in the current year open period.                                                                                2) Prior year corrections made through a manual journal entry also posted in the current period. 
    Goal is to eliminate the manaul entry for prior year correction due to revised order settlement rules  
    Any thoughts on this issue would be appreciated.

    The only reason to resettle the orders is that the "settlement rules" were revised in the current fiscal year .  In the current fiscal year , the settlements for each settled period (closed period) are reversed and then resettled in the current  open period using the revised settlement rules. However, the issue involves these same orders had costs in the previous fiscal year and were settled originally in that previous fiscal year with the old settlement rules. This is a closed fiscal year and all periods are closed.  
    Any thoughts on a system approach to effect the settlement rule change crossing two fiscal years rather than manual entries for prior fiscal year settlement rule impact as a  two step process the first step being the current fiscal year resettlements and the second step the manual entry for previous year impact ?

Maybe you are looking for