cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

copy planned cost to estimated cost in work order

Former Member
0 Kudos
2,745

hi experiment ,


i have requirement to copy planned cost to estimated cost in the save  work order  please help me to get user exit and function module to get this

i have add this requirment and deleted because it a same in another post but i have to mention here http://scn.sap.com/thread/2079395?start=0&tstart=0

to know is the reply in this post is true or not please advise

best regards Sadin

View Entire Topic
peter_atkin
Active Contributor
0 Kudos

Sadin,

I know it can be done in user-exit IWO10009 because we have done it on a previous project

What you need to do is:

  1. In IWO10009 you need to force a "Determine Costs" function. Get your ABAPers to debug the way the standard program does this via the IW31/2 button (looks like a calculator on the order header).
  2. Then you need to retrieve the cost data from memory - it'll be the one of the PMCO tables in probably in program SAPLICO1.
  3. Put the data into the Estimated Cost field (CAUFVD-USER4). Note this can be done before or after release.

PeteA

Ziv_Marcovich
Contributor
0 Kudos

Sadin Hello,

In user exit IW0009 you first need to  trigger  “determine cost”  as pointed out by Pete this can be done by FM : CK_F_ORDER_COSTING

and then try to call as  the FM suggested by Jogeswara : PM_WORKORDER_COSTS_LIST which will be by then updated with the plan cost updated value.

Regards,

Ziv

former_member647955
Participant
0 Kudos

Hello Pete,

I am Hadi, we have similar issue like the one in this thread and I am checking on the solution you provided.

I have question on step number 3: Put the data into the Estimated Cost Field (CAUFVD-USER4). I see that user exit  IWO10009 has only importing parameter CAUFVD_IMP but no Exporting parameter. So I thought that we can't pass out the value of Estimate Cost Field to the outside of user exit.

When I try to populate CAUFVD_IMP-USER4 with the value, it doesn't set the Estimated Cost Field

Also when I try to populate CAUFVD-USER4 (global variable which is accessible from IWO10009), it still doesn't set the Estimate Cost Field.

Could you please advise on how to technically do the step number 3 above?

Thanks a lot and appreciate your feedback.

Regards

Hadi

former_member647955
Participant
0 Kudos

Hi All,


I found the way to force update work order header change using following code:


CALL FUNCTION 'CO_IH_SET_HEADER'    

     EXPORTING       CAUFVD_IMP = CAUFVD_IMP.

PERFORM HEADER_UPDATE(SAPLCOIH).


It's explained in following thread https://scn.sap.com/thread/3697460


Regards

Hadi

jogeswararao_kavala
Active Contributor
0 Kudos

Hello Wadi,

It's nice to give some feedback about knowledge. But.....

It will be useful ONLY if you give the working code to do the same. The code you suggested is a part of which I suggested in a different context in the thread referred by you. The use of the same fm in this context has some issues. So it will be helpful if you share the working code which you might have already tested. Also you need to specify where you've used this suggested fm (in some user-exit like IWO10009).

I am sure you'd agree when I say, ''When we are posting in a closed thread, the post should be a complete solution. If it is not so, it will become a question again to members.''.

Regards

KJogeswaraRao