05-12-2009 2:30 PM
I want to delete the entries if any for Profit center and responsible cost center in Additional data tab and replace the profit center with the entries in Cost center from Location tab in iw31/iw32. Just need to know which userexit is helpful. Can i use IWO10005 for the same.
05-12-2009 5:01 PM
Hello,
should be the right exit. if i get your requirement right, you could just refer to the example-coding which is in the documentation of IWO10005.
Regards Wolfgang
05-12-2009 5:01 PM
Hello,
should be the right exit. if i get your requirement right, you could just refer to the example-coding which is in the documentation of IWO10005.
Regards Wolfgang
05-12-2009 5:06 PM
Hi Wolfgang,
I am trying to put a break point and trigger it thru transaction, but its not getting triggered.
The example code is not what i want.
My req is. in trans IW32 under the additional data tab there is Profit center and responsible Cost center.
If there are values in these fields, It should be cleared.
And under location tab there is a cost center. If there is cost center present than this value should be assigned to the profit center under Additional data.
I hope i made myself clear.
Anyways, thanks a lot for the reply.
Regards,
Micky
05-13-2009 10:52 AM
Hello,
the IW010005-Exit is called if the main work center of the order is changed (CAUFVD-VAPLZ) and the profit center is initial. That's normally the case in IW31, when the profit center is derived from the main work center.
If you need the logic in IW32, you could also use the IW010009-Exit, which is at save. Problem is here that you get only the CAUFVD as import parameter.So you would have to make change inside this exit with a PERFORM CAUFV_UPD(SAPLCOBH) USING <Workarea changed CAUFVD>.
Regards Wolfgang
05-13-2009 11:57 AM
Hi,
Does this userexit get triggered from IW32???
It dint get triggered for me. I want this to happen in both IW31 and IW32 as well?....
can u please let me know if you have any more updates? I will be very thankful to u.
regards,
Micky
05-13-2009 12:37 PM
Its probably triggered on change of main work centre..
Give a try and get back to us.
You could perform a check at save (user-exit IWO10009 - see TCode SMOD)
PeteA
05-13-2009 1:01 PM
Hi PeteA,
It gets triggered when I click save.
But what i want is when i select a work order and go to Additional data tab the profit center and Responsible work center should get cleared and Profit center should have value from Costcenter from Location Lab.
Again in IW010009 we have caufvd as import and not export. There is one more exit IWO10001 but this too doesnt get triggered.
Thanks a lot for all the help.
Micky
05-13-2009 1:18 PM
Hi Wolfgang,
I am trying to make changes in IWO10009 exit using the following statement
PERFORM CAUFV_UPD(SAPLCOBH) USING <workarea changed caufvd>
need to know what will be <workarea changed CAUFVD>.
let me know
Thanks a lot
regards,
Micky
05-13-2009 2:17 PM
hi Wolfgang,
I did by the way you told me. I used the following in IWO10009 user exit.
PERFORM CAUFV_UPD(SAPLCOBH) USING caufvd_imp
*/////(where caufvd_imp is the importing parameter in this exit.)
if not caufvd_ipm-prctr is initial.
CALL FUNCTION 'KE_PROFIT_CENTER_CHECK'
EXPORTING
prctr = caufvd_imp-prctr
EXCEPTIONS
NOT_FOUND = 1
NOT_DEFINED_FOR_DATE = 2
NO_KOKRS_FOR_BUKRS = 3
PARAMETER_MISMATCH = 4
PRCTR_LOCKED = 5
NOT_DEFINED_FOR_BUKRS = 6
OTHERS = 7.
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
clear caufvd_imp-prctr.
*///// which is not getting cleared as its calling from the same importing parameter. Can u tell me from which structure so i need to clear?
endif.
thanks a lot.
Regards,
Micky
05-13-2009 2:57 PM
Hello,
the IWO10001 is only triggered for sub-orders.
In IW010009 you'll get the workarea Order header via CAUFVD_IMP as an import parameter.
So you could define a local workarea let's say ZZ_CAUFVD.
DATA: ZZ_CAUFVD type CAUFVD.
ZZ_CAUFVD = CAUFVD_IMP.
... then you can do your changes to the workarea ZZ_CAUFVD
... when it's done,
PERFORM CAUFV_UPD(SAPLCOBH) USING ZZ_CAUFVD.
Regards Wolfgang
Edited by: Wolfgang Valtin on May 13, 2009 3:59 PM
05-13-2009 3:39 PM
Hey Wolfgang,
Thanks a lot. This solved my problem.
regards,
Micky
04-27-2010 10:05 PM
I had the same problem and it took me two whole days to find this thread and finally solve my problem. Thanks a lot.
06-16-2015 10:29 PM