Saturday, March 10, 2012

Activity Reconciliation and Price Calculation


Activity Reconciliation and Price Calculation 
  1. During the calculation of the Activity price, there are three variables and three equations: 
Fixed Activity price               = Total fixed cost / Fixed Activity hours
Variable Activity price           = Total variable cost / Variable Activity hours
Total Activity price                = Fixed activity price + Variable activity price 
In the ECC system those variables are initially populated as follows:
Total Cost             = from tcode KP06
Activity hours        = from tcode KPSI, via KSPP, which reads the LTP created in MS01.
Activity price         = calculated using tcode KSPI using the formula Activity price = Total cost /       Activity hours 
  1. Once the activity price has been calculated, any subsequent changes in the volumes, are handled as follows in the variable part of the activity price:
Variable Activity hours          = from tcode KPSI, via KSPP, which reads the LTP created in MS01.
Total variable cost       = from tcode KPSI, using the formula
Variable Activity price  = from tcode  KSPI using the formula Variable Activity price    = Total variable cost / Variable Activity hours. (There are various situations which arises, which might make the recalculation necessary, depending on the change in the activity hours.) 
  1. This behaviour can be overriden by setting the switch below, on the KPSI “settings” screen: 
    (Image deleted)
If this switch is active, then the system will follow the behaviour in step 1. 
  1. Alternatively, after the the execution of KPSI, the amounts on KP06 can be reset to their original values by retracting again from BPS, or the spreadsheet if Interactive Excel was used. 
  2. Various exceptions/ modifications also exist: 
  3. In the case of a plan that is not reconciled, the plan price is calculated on the basis of the scheduled activity. A plan is reconciled if the scheduled activity for each activity type is the same as the plan activity. You receive a scheduled plan with the plan reconciliation (Transaction KPSI). In this case, the prices are calculated based on the price indicator of the activity type:
 - Price indicator 01:  Planned price, automatically based on activity.
Fixed price : Fixed planned costs / planned activity
Variable price: Variable planned costs / planned activity
Total price: Fixed price + variable price
- Price indicator 02: Plan price, automatically based on capacity
Fixed price: Fixed planned costs / capacity
Variable price: Variable planned costs / planned activity (Variable always on planned activty)
Total price: Fixed price + variable price 
  1. Three different methods can be used, each with its own advantages and disadvantages
  • Average for the year
The total activity hours for the year, is divided into the total cost for the year.
The disadvantage of this is that on a monthly basis, there will be over/under recoveries on the production cost centres. However, these variances are a good indicator of seasonal fluctuations. Some companies move these variances to the balance sheet, to smooth their gross profit line.
  • Periodic
The activity hours for each period, is divided into the cost for the period, to get to a rate per period.
This means that each month is fully recovered to production. This would be a good method to use, if there was seasonal fluctuations in the costs, as opposed to seasonal fluctuations in activity levels.
  • Cumulative
The year to date activities are divided into the year-to date costs to get a year to date activity price. 
  1. Generally, changes in resource capacity utilisation, would not have an influence on activity prices. However, changes could result in activity levels changing between periods, even if they remain the same for the year. It is also possible that the production schedule moves across a year-end boundary. 
  2. Take care when compiling a Long Term Plan,  especially when the fiscal periods do not equal calendar periods e.g. 4-4-5 basis. The planned simulation orders are scheduled for the first day of the period. For example:
  • The first month after a 5 week month usually starts on a date after the 1st. If the simulated planned order is scheduled for the first, it will then fall into the previous month
  • This is made worse if the first month is also the beginning of the fiscal year, then the demand moves to the previous calendar year. Also if the first month is January, and the country celebrates New Year, and the factory calendar shows that as a non-working day.
  • If there are manufacturing lot sizes in place, this will also lead to differences between what the demand is, and what actually gets scheduled.
  • The effect of this is reduced when the factory is working fairly close to capacity. The effect can also be reduced by planning weekly, rather than monthly. But it is good to bear these effects in mind, and to also remember that the sales volume and the production volume plans are two completely different things.

Saturday, February 25, 2012

COGI --- Sales order by product costing


COGI SAP Transaction Code (T-code) Details

Description: Processing goods movemnts w. errors
Program : CORUAFFW
Module:
1. PS - Project System
2. CO - Controlling
3. IM - Investment Management
4. HR/HCM - Human Resources/Human Capital Management
5. SD - Sales and Distribution
6. PP - Production Planning
7. PM - Plant Maintenance
8. CS/SM - Customer Service/Service Management

SAP Menu Path:
1. SAP Menu⇒Logistics⇒Sales and Distribution⇒Sales⇒Product Cost by Sales Order⇒Actual Postings⇒Time Sheet⇒Transfer⇒Plant Maintenance/Customer Service⇒Postprocessing Goods Movements

2. SAP Menu⇒Logistics⇒Sales and Distribution⇒Sales⇒Product Cost by Sales Order⇒Actual Postings⇒Time Sheet⇒Transfer⇒Project System⇒Postprocessing Goods Movements

3. SAP Menu⇒Logistics⇒Production⇒Shop Floor Control⇒Confirmation⇒Reprocessing⇒Goods Movements

4. SAP Menu⇒Logistics⇒Production⇒Capacity Planning⇒Requirements⇒Production Order⇒Confirmation⇒Reprocessing⇒Goods Movements

5. SAP Menu⇒Logistics⇒Production⇒Capacity Planning⇒Requirements⇒Maintenance Order⇒Completion Confirmation⇒Postprocessing⇒Goods Issues

6. SAP Menu⇒Logistics⇒Production⇒Repetitive Manufacturing⇒Backflush⇒Postprocess⇒Postprocessing Individual Components

7. SAP Menu⇒Logistics⇒Production⇒KANBAN⇒Environment⇒Repetitive Manufacturing⇒Backflush⇒Postprocess⇒Postprocessing Individual Components

8. SAP Menu⇒Logistics⇒Production⇒KANBAN⇒Environment⇒Production Orders⇒Confirmation⇒Reprocessing⇒Goods Movements

9. SAP Menu⇒Logistics⇒Production - Process⇒Process Order⇒Environment⇒Material Movement⇒Failed Goods Movements

10. SAP Menu⇒Logistics⇒Production - Process⇒Process Planning⇒Requirements⇒Process order⇒Environment⇒Material Movement⇒Failed Goods Movements

11. SAP Menu⇒Logistics⇒Production - Process⇒Process Planning⇒Environment⇒Process management⇒Environment⇒Process Orders⇒Environment⇒Material Movement⇒Failed Goods Movements

12. SAP Menu⇒Logistics⇒Production - Process⇒Process Management⇒Environment⇒Process Orders⇒Environment⇒Material Movement⇒Failed Goods Movements

13. SAP Menu⇒Logistics⇒Production - Process⇒Process Management⇒Environment⇒Process Planning⇒Requirements⇒Process order⇒Environment⇒Material Movement⇒Failed Goods Movements

14. SAP Menu⇒Logistics⇒Plant Maintenance⇒Maintenance Processing⇒Completion Confirmation⇒Entry⇒Time Sheet⇒Transfer⇒Plant Maintenance/Customer Service⇒Postprocessing Goods Movements

15. SAP Menu⇒Logistics⇒Plant Maintenance⇒Maintenance Processing⇒Completion Confirmation⇒Entry⇒Time Sheet⇒Transfer⇒Project System⇒Postprocessing Goods Movements

16. SAP Menu⇒Logistics⇒Plant Maintenance⇒Maintenance Processing⇒Completion Confirmation⇒Postprocessing⇒Goods Issues

17. SAP Menu⇒Logistics⇒Customer Service⇒Service Processing⇒Confirmation⇒Entry⇒Time Sheet⇒Transfer⇒Plant Maintenance/Customer Service⇒Postprocessing Goods Movements

18. SAP Menu⇒Logistics⇒Customer Service⇒Service Processing⇒Confirmation⇒Entry⇒Time Sheet⇒Transfer⇒Project System⇒Postprocessing Goods Movements

19. SAP Menu⇒Logistics⇒Customer Service⇒Service Processing⇒Confirmation⇒Postprocessing⇒Goods Issues

20. SAP Menu⇒Logistics⇒Project System⇒Progress⇒Confirmation⇒Time Sheet⇒Transfer⇒Plant Maintenance/Customer Service⇒Postprocessing Goods Movements

21. SAP Menu⇒Logistics⇒Project System⇒Progress⇒Confirmation⇒Time Sheet⇒Transfer⇒Project System⇒Postprocessing Goods Movements

22. SAP Menu⇒Logistics⇒Project System⇒Progress⇒Confirmation⇒Reprocessing⇒Reprocess Goods Issue Postings with Errors

23. SAP Menu⇒Logistics⇒Project System⇒Resources⇒Capacity Requirements Planning⇒Requirements⇒Production Order⇒Confirmation⇒Reprocessing⇒Goods Movements

24. SAP Menu⇒Logistics⇒Project System⇒Resources⇒Capacity Requirements Planning⇒Requirements⇒Maintenance Order⇒Completion Confirmation⇒Postprocessing⇒Goods Issues

25. SAP Menu⇒Accounting⇒Controlling⇒Cost Center Accounting⇒Actual Postings⇒Time sheet⇒Transfer⇒Plant Maintenance/Customer Service⇒Postprocessing Goods Movements

26. SAP Menu⇒Accounting⇒Controlling⇒Cost Center Accounting⇒Actual Postings⇒Time sheet⇒Transfer⇒Project System⇒Postprocessing Goods Movements

27. SAP Menu⇒Accounting⇒Controlling⇒Internal Orders⇒Actual Postings⇒Time Sheet⇒Transfer⇒Plant Maintenance/Customer Service⇒Postprocessing Goods Movements

28. SAP Menu⇒Accounting⇒Controlling⇒Internal Orders⇒Actual Postings⇒Time Sheet⇒Transfer⇒Project System⇒Postprocessing Goods Movements

29. SAP Menu⇒Accounting⇒Controlling⇒Activity-Based Costing⇒Actual Postings⇒Time Sheet⇒Transfer⇒Plant Maintenance/Customer Service⇒Postprocessing Goods Movements

30. SAP Menu⇒Accounting⇒Controlling⇒Activity-Based Costing⇒Actual Postings⇒Time Sheet⇒Transfer⇒Project System⇒Postprocessing Goods Movements

31. SAP Menu⇒Accounting⇒Investment Management⇒Internal Orders⇒Actual Postings⇒Time Sheet⇒Transfer⇒Plant Maintenance/Customer Service⇒Postprocessing Goods Movements

32. SAP Menu⇒Accounting⇒Investment Management⇒Internal Orders⇒Actual Postings⇒Time Sheet⇒Transfer⇒Project System⇒Postprocessing Goods Movements

33. SAP Menu⇒Accounting⇒Investment Management⇒Investment Projects⇒Actual Postings⇒Time Sheet⇒Transfer⇒Plant Maintenance/Customer Service⇒Postprocessing Goods Movements

34. SAP Menu⇒Accounting⇒Investment Management⇒Investment Projects⇒Actual Postings⇒Time Sheet⇒Transfer⇒Project System⇒Postprocessing Goods Movements

35. SAP Menu⇒Accounting⇒Project System⇒Progress⇒Confirmation⇒Time Sheet⇒Transfer⇒Plant Maintenance/Customer Service⇒Postprocessing Goods Movements

36. SAP Menu⇒Accounting⇒Project System⇒Progress⇒Confirmation⇒Time Sheet⇒Transfer⇒Project System⇒Postprocessing Goods Movements

37. SAP Menu⇒Accounting⇒Project System⇒Progress⇒Confirmation⇒Reprocessing⇒Reprocess Goods Issue Postings with Errors

38. SAP Menu⇒Accounting⇒Project System⇒Resources⇒Capacity Requirements Planning⇒Requirements⇒Production Order⇒Confirmation⇒Reprocessing⇒Goods Movements

39. SAP Menu⇒Accounting⇒Project System⇒Resources⇒Capacity Requirements Planning⇒Requirements⇒Maintenance Order⇒Completion Confirmation⇒Postprocessing⇒Goods Issues

40. SAP Menu⇒Human Resources⇒Time Management⇒Time Sheet⇒Transfer⇒Plant Maintenance/Customer Service⇒Postprocessing Goods Movements

41. SAP Menu⇒Human Resources⇒Time Management⇒Time Sheet⇒Transfer⇒Project System⇒Postprocessing Goods Movements

Friday, February 3, 2012

Watch point


Watchpoints to trace the error

If you are dealing with a big program . And suddenly , unexpectdly you encountered a error .First thing which will come in your mind is from where this error came.
If it is a big program its not easy to go line by line to findout where this occured . So simply jump into the place where this occured we can use watch point .
 Whenever you face this error just note down error number .
 in the above case error num is 518 .
now run the program and go to debugger.
There create a watchpoint for SY-MSGNO .
In condition entry write :
 SY-MSGNO = 518
now it will stop exactly where you encounter this error .....
Happy debugging ... 

Tuesday, January 31, 2012

Debugging

1st part: Setting up break-points.
3 ways!
If the program that you want to debug is not editable / can only be presented in display mode / has a blue back-ground, one may use this “STOP” / break-point button.

For example: We are going to set up break-points upon execution of aselection, and on the turn of calling a SAP standard function module.

Note: One can set more than one break-points in a program.

Position your cursor on the line where you’d like to set a break-point at and click the break-point button (shown above). For this example, the cursor was positioned at the line “START-OF-SELECTION” and the break-point button was pressed. The same was done for the line containing the words “CALL FUNCTION ‘TRCA_COMPANYCODE_GETDETAIL’ “. Break-points are now represented as highlighted points in the program as shown in thispicture.


Another way of doing so is by inserting a “break-point.” command in the program like this:
The least popular way of setting or deleting break-points is by going though this:
Utilities > Breakpoints > Set/Delete. ( Ctrl+Shift+F12 )

2nd part: Deleting Break-points.

For “typed” break-point commands, simply erase by backspace or delete the “break-point.” command. For highlighted break-points, just position the cursor on that line and press the break-point button again from the toolbar, or one may even go to the utilities part in the menu bar.

3rd part: Using break-points.

Commonly used keys in debugging mode:F5 – single step; commonly used for watching values or thorough step by step process
F6 – almost the same with single step but skips sub-routines
F7 – for forwarding to the next break-point or finishing a loop
F8 – run execution

This is the example that we’re going to use:

Using my own example, these are the sample input parameters to be used for the rest of the lecture:

Now, upon execution of the selection screen, SAP will forward to the debugging screen
Okay, at this point, s_bukrs-low s_rfha-low and the rest of the field names on the lefts side have no value yet. Once the abap debugger arrow proceeds to the next line, s_bukrs-low will have the value of p_bukrs ( in this example is Company Code 1058 ). 

Observe. (processed by single step or F5)

After pressing F5, s_bukrs-low acquires the value of p_bukrs, and the debugger cursor moves to the next line.

From this point, pressing F7 will forward you to the next break-point.
Now, since we’re about to process a SAP standard function module, we have a choice to skip this part and proceed to the rest of the program (by pressing F6), or continue viewing the process of this function module (by pressing F5).

Note: if by anytime you want to skip the debugging mode, just press F8.

Pressing F5 you’ll have a view of a SAP standard function module processing, notice the main program and source code.

From this point, if one wishes to proceed debugging the SAP standard function module, press F5; If one wishes to pick-up from where we left debugging the main program, simply press F7 and you’ll go to the next line of the program after the “Call Function ..” statement.

Part 4: Other notes

Notice that there are other tabs beside “Field” in the debugger.

This is for the “Table” tab:

Herein are the contents of the internal table t_ftr. One may manipulate the current view of the data by choosing the fields he/she wishes to see, but this doesn’t change the actual structure of the internal table.

The encircled portion on the bottom right expands the table upwards (if one’s having difficulty looking at an internal table with many line items).

If one wishes to see the other fields in the table, simply press Shift+F7 to scroll to the right or Shift+F6 to scroll to the fields on the left. Press Shift+F5 to go back to the original view.

For the breakpoints tab etc:


If one wishes to skip the debugging mode, and continue processing the program, go to:

If one doesn’t want to continue processing the program, go to: Debugging>Exit (Shift+F3).