cancel
Showing results for 
Search instead for 
Did you mean: 

Cost of strategy based task list

vivek_varun2
Active Participant
0 Kudos

Hi all,

For strategy based task list, how to calculate the cost. I feel table wise logic will be complex, is there any bapi to calculate cost.

Thanks

Vivek Varun

Accepted Solutions (0)

Answers (2)

Answers (2)

0 Kudos

Check out extractor 0PM_PRM_PLCS_1, it has possibility to extract cost for a task list or maintenance plan.

peter_atkin
Active Contributor
0 Kudos

Vivek Varun

Have you had a look at IP31?

PeteA

vivek_varun2
Active Participant
0 Kudos

Hi Pete,

requirement is for Z-report, so I need logic.

Thanks

Vivek Varun

Former Member
0 Kudos

Hi,

Check Function module CK_F_ORDER_COSTING

Regards

Vivek

vivek_varun2
Active Participant
0 Kudos

Hi,

Task list is strategy based and component also assigned to operation. In this FM, its showing zero entry.

Thanks

Vivek

peter_atkin
Active Contributor
0 Kudos

Vivek Varun,

Why does IP31 not work for you?

PeteA

vivek_varun2
Active Participant
0 Kudos

Hi Pete,

my abapers are unable to find logic from ip31, I need logic to provide in FS. that is why I am not preferring any t code.

I have a logic but its complex, I want simple logic.

Thanks

Vivek

peter_atkin
Active Contributor
0 Kudos

Vivek

Its still not clear what you are trying to achieve??

What does your new program need to do that IP31 doesn't?

PeteA

peter_atkin
Active Contributor
0 Kudos

I've just been looking at an old IP31 "Z" clone.

What I did was stopped the report at the following point:

*--- cost report
   PERFORM display_costs USING dy_datuv dy_datub proto_p.   <-- do not perform this step


In my case I needed data, but didn't need to display the standard IP31 screen (can't remember why)!!!.


It looks like I then exported the IP31 data from (SAPLCK00)AUFNR_KALKTAB[] to a calling program.


This should make sense to your ABAP Team...


PeteA

vivek_varun2
Active Participant
0 Kudos

Pete,

Requirement is - when we create task list with maintenance package and generate order, cost of task list and cost of order ( as per package) will be same,now if user added a component or anything manually then  order cost will be different from task list cost.

so to match the cost of order and cost of task list, this report is required. Now for task list cost (as per maintenance package) I have to pass many tables like based on package I will find operations and assigned activity type and components. then i have find cost individually for activity type and component and then cost as per number of hour and number component.

This will make report complex

So I need a simple logic or any bapi.

Thanks

Vivek

peter_atkin
Active Contributor
0 Kudos

Vivek

If the order is created via a maintenance plan, then why don't you store the planned cost the first time the order is saved.

Then compare this saved value with the current value, this would be much easier..

Remember the cost of the task list will change over time as the labour/material prices change.

PeteA

vivek_varun2
Active Participant
0 Kudos

Pete ,

Thanks for your reply .

As per the scenario , i have to find the latest TECO'd order first that was triggered from the Mplan and then fetch the Order Actual Cost and the Task List cost item category wise that is associated with that particular package .

peter_atkin
Active Contributor
0 Kudos

Vivek,

Maybe I'm missing something obvious here... But I still don't understand why you need to get the costs from the task list..

If the order was created from the task list, then when it is saved the system will calculate the costs for that order. So these will be the same as the costs on the relevant task list operation(s) that were determined by the strategy plan.

If you store this data the first time the order is saved, then you have a datum to check against at a future point. And it works for every order..

PeteA

vivek_varun2
Active Participant
0 Kudos

Pete ,

Thanks again for your reply .

Look scenario is as the order gets triggered from the maintenance plan , task list cost and order cost will be same . But if some more operations/components are added , then cost will differ .

So we can track that actual cost order is having  , but facing difficulty in finding out the original task list cost associated .

So is there any table which will store the Planned cost data of the order when first time it was triggered/saved as in AUFK i am able to find the date stamp but not the original cost .

peter_atkin
Active Contributor
0 Kudos

See this recent post:

Alternatively, you can copy the planned costs to a customer-specific "Z" field on the AUFK table (via append structure CI_AUFK).

PeteA

vivek_varun2
Active Participant
0 Kudos

Pete ,

I went thru the thread , but still i am nowhere .

The point is to find the table which will store the order planned cost when it was created or released coz it will get changed as some manual entry of operations or materials is done at any stage .

I tried table PMCO , but it overwrites the planned cost if changes are made within the same period .

So my requirement is to have the original planned cost of the order at the time of create/release.

peter_atkin
Active Contributor
0 Kudos

Vivek,

This gets a little technical, so I hope it makes sense..

In user-exit IWO10009, at the point of saving the order for the first time, the cost data is not yet stored in any database tables. Instead the data is held in SAP's memory (internal tables).

So now the trick is to :

  1. Force an order costing via code "perform fcode_koer_nomsg in program saplcoih using 'X'."
  2. Retrieve the data from memory (not database). One of my old programs refers to the data being held in program SAPLICO1 { internal table "(saplico1)N_PMCO[]" and "(SAPLICO1)N_PMCO")  }

Hope this helps..

PeteA