2006 Nov 22 2:49 PM
Hi,
I used 'HR_INFOTYPE_OPERATION' to upload infotype 0014 and 0015. Now I need to add the cost assignment component, but don't really know how to do it. I understand the cost assignemnt elements are stored in the ASSHR and ASSOB tables, but try to avoid update the table directly. What is the correct way to upload IT0014/0015 along with cost assignment? HELP!!!
Anna Tang
2006 Nov 23 4:39 AM
hi
good
try these
BAPI_PTMGREXTREMSPEC_CHECKWCOS Check External Employee Remuneration Info (with Cost Assignment)
BAPI_PTMGREXTREMSPEC_INSERT Inserts External EE Remuneraion Info in Table (w/o Account Assignment)
thanks
mrtyun^
2006 Nov 23 3:07 AM
>>but try to avoid update the table directly.
If you take a look at the function module HR_UPDATE_COST_ASSIGN,
SAP does exactly that.. ie insert into the dbtabs ASSHR & ASSOB..
Otherwise, you will probably have to do a conventional BDC of PA30 for 0014/0015..
~Suresh
2006 Nov 27 12:54 PM
Suresh:
Thanks for your answer. I hope you've a good thanksgiving. I checked out HR_UPDATE_COST_ASSIGN and where it is used. I looks like I also need to create IT0579 before I can use this function to add cost assignment. However, when I check my test case which I added cost assignement via PA30, I don't see any entry in PA0579 at all.
Is this the functional module I should use to add cost assignment or there is anther one I should use?
Thanks,
Anna
2006 Nov 27 1:25 PM
Suresh:
Thanks for your answer. I hope you've a good thanksgiving. I checked out HR_UPDATE_COST_ASSIGN and where it is used. I looks like I also need to create IT0579 before I can use this function to add cost assignment. However, when I check my test case which I added cost assignement via PA30, I don't see any entry in PA0579 at all.
Is this the functional module I should use to add cost assignment or there is anther one I should use?
Thanks,
2006 Nov 27 1:36 PM
No.. you don't need a 0579 in your case.. I just mentioned HR_UPDATE_COST_ASSIGN as an example to show that SAP also does a DB update of the Cost Assignments.. So, I don't see any harm in you doing the same or else you will have to do a BDC of PA30 for the 0014/0015s with the Cost Assignments and use HR_INFOTYPE_OPERATION for the rest..
~Suresh
P.S. yes.. 'twas a nice thanksgiving.. if you exclude the blackfriday shopping..how about you?
2006 Nov 27 10:22 PM
Suresh:
I tried to insert PSDNR, ASSHR and ASSOB along with HR_INFOTYPE_OPERATION, but keep getting error in HR_INFOTYPE_OPERATION when I set REFEX = 'X'. I think some pieces are still missing. It looks like I've to use BDC.
Thank for your help.
Anna
2006 Nov 23 4:39 AM
hi
good
try these
BAPI_PTMGREXTREMSPEC_CHECKWCOS Check External Employee Remuneration Info (with Cost Assignment)
BAPI_PTMGREXTREMSPEC_INSERT Inserts External EE Remuneraion Info in Table (w/o Account Assignment)
thanks
mrtyun^
2007 Jul 02 3:00 AM
I end up using call transaction to include cost assignment in info type 14/15 upload.
2008 Nov 19 1:55 PM
Hi,
Several persons asked me how we resolve this issue.
We ends up using call transaction "PA30" and dynamically build fields for cost assignments. The followings are codes to build cost assignment portion dyncamically, hope you find it helpful:
FORM dynpro_model .
IF wa_0014-gsber EQ '' "bussiness area
AND wa_0014-costl EQ '' "cost center/accout #
AND wa_0014-aufnr EQ '' "Internal order
AND wa_0014-geber EQ '' "fund
AND wa_0014-grant_nbr EQ ''. "grant #
PERFORM dynpro USING:
'X' 'MP001400' '2010', "
' ' 'Q0014-BETRG' wa_0014-betrg, " Amount
' ' 'P0014-MODEL' wa_0014-model, " Model
' ' 'P0014-ZDATE' wa_0014-zdate2, " 1st Payment date
' ' 'Q0014-ZANZL' wa_0014-zanzl, " Interval
' ' 'Q0014-ZEITX' wa_0014-zeinz, " Time unit/measurement
' ' 'BDC_OKCODE' '=UPD'. " SAVE
ELSE.
PERFORM dynpro USING:
'X' 'MP001400' '2010', "
' ' 'Q0014-BETRG' wa_0014-betrg, " Amount
' ' 'P0014-MODEL' wa_0014-model, " Model
' ' 'P0014-ZDATE' wa_0014-zdate2, " 1st Payment date
' ' 'Q0014-ZANZL' wa_0014-zanzl, " Interval
' ' 'Q0014-ZEITX' wa_0014-zeinz, " Time unit/measurement
' ' 'BDC_OKCODE' '=PRIM'. " cost assignment button
PERFORM dynpro USING:
'X' 'SAPLHRTV' '0300', "
' ' 'BDC_OKCODE' '=COBL_MORE'. " More
PERFORM dynpro USING:
'X' 'SAPLKACB' '0002', "
' ' 'COBL-GSBER' wa_0014-gsber, " Business area
' ' 'COBL-KOSTL' wa_0014-costl, " Account #
' ' 'COBL-AUFNR' wa_0014-aufnr, " Order #
' ' 'COBL-GEBER' wa_0014-geber, " Fund
' ' 'COBL-GRANT_NBR' wa_0014-grant_nbr, " Grant Number
' ' 'BDC_OKCODE' '=ENTE'.
PERFORM dynpro USING:
'X' 'SAPLHRTV' '0300', "
' ' 'BDC_OKCODE' '=GOON'. " Transfer
PERFORM dynpro USING:
'X' 'MP001400' '2010', "
' ' 'BDC_OKCODE' '=UPD'. " Save
ENDIF.
ENDFORM. " dynpro_model