Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

IW31 - Copy planned cost to estimated cost cost - user exit/BADI

Former Member
0 Kudos

Hi all,

My requiremnt is such. While creating an order via IW31:

- the user clicks on the release button directly and saves.

- the user does not click on the cost calculate button.

The value of planned cost in the cost tab should be copied to estimated cost.

I have tried using exit IWO10009 but I am somehow not able to achieve this.

Can anyone help me regarding this!

Regards.

6 REPLIES 6

Former Member
0 Kudos

Hi,

We had a similar functionality ...I have checked the code in our system and we have used user Exit :IW010009 and below is the code :

The code was something as below :

  • the following function selects all the costs that have to do with the

  • work order. All costs in each line.

CALL FUNCTION 'PM_WORKORDER_COSTS_LIST'

EXPORTING

LIST_CURRENCY = caufvd_imp-waers

PMCO_DETAIL = 'X'

ALL_CURRENCIES = 'X'

EXTERNAL_CALL = 'X'

TABLES

LIST_AUFK = i_caufvd_imp

LIST_PMCO = i_list_pmco

COMP_PMCO = i_comp_pmco

EXCEPTIONS

NO_ORDERS = 1

NO_CURRENCY = 2

NO_COSTS_FOUND = 3

OTHERS = 4.

IF SY-SUBRC EQ 0.

*

  • We will import the totals information

READ TABLE i_list_pmco INTO wa_list_pmco INDEX 1.

caufvd_imp-user4 = wa_list_pmco-pkosten.

Hope the above would be helpful for you ,,

regards

pushpa

0 Kudos

HI Kolla Pushpa,

i am using the same FM that you asked for. I am getting the cost values in LIST_PMCO structure,

I am then modifying this structure. But teh values are not getting reflected.

What am I missing?

CALL FUNCTION 'PM_WORKORDER_COSTS_LIST'

EXPORTING

list_currency = caufvd_imp-waers

  • pmco_detail = 'X'

  • all_currencies = 'X'

external_call = 'X'

TABLES

list_aufk = i_caufvd_imp

list_pmco = i_list_pmco

comp_pmco = i_comp_pmco

EXCEPTIONS

no_orders = 1

no_currency = 2

no_costs_found = 3

OTHERS = 4.

IF sy-subrc EQ 0.

READ TABLE i_list_pmco INTO wa_list_pmco INDEX 1.

IF sy-subrc = 0.

wa_list_pmco-skosten = wa_list_pmco-pkosten.

MODIFY i_list_pmco FROM wa_list_pmco INDEX 1.

ENDIF.

ENDIF.

Former Member
0 Kudos

Try Exit: IWO10012 Maintenance order: Priority handling on central header

Function Module Exit: EXIT_SAPLCOIH_012

0 Kudos

Jai sai ram

thanks i have never worked with exits and have to implement it cvan you help

0 Kudos

Hi,

Did you get the solution

Shailaja Ainala.

former_member199302
Participant
0 Kudos

hi experiment ,

is this user exist IWO10012  and function module  EXIT_SAPLCOIH_012 is true to make copy planned cost in estimated cost in the save order


http://scn.sap.com/community/eam

thanks a lot Sadin