2014 Jun 26 11:47 AM
Hi ,
I have been trying to pass data by execute this bapi "BAPI_BASICPAY_CREATE"
As follows:-
call function 'BAPI_BASICPAY_CREATE'
exporting
EMPLOYEENUMBER = '3'
SUBTYPE = '0 '
VALIDITYBEGIN = '01012014'
VALIDITYEND = '31122014'
IMPORTING
RETURN = RETURN
TABLES
WAGETYPES = WAGES.
In RETURN, these are the errors I have been facing
Type E Personal number not yet assigned.
Type E Employee/applicant is not locked yet
PS:- Here I am just trying to test the bapi ( in SE37 ) by passing dummy values.
Regards,
Naren.
2014 Jun 26 12:38 PM
Could you try to execute the FM with correct values in internal format (e.g. replace '3' with '00000003', '01012014' with '20140101', etc.)
Remarks :
Regards,
Raymond
(*) Also either post the exact text or the id of a standard error message.
2014 Jun 26 11:52 AM
The above RETURN value errors are for different values ( before I have taken Employee number as 12900)
My actually requirement is I need to be able to transfer infotype 0008 (basic pay) details from notepad to SAP using BAPI . So, I picked up this bapi "BAPI_BASICPAY_CREATE".
Regards,
Naren K.
2014 Jun 26 12:26 PM
Call function module BAPI_EMPLOYEE_ENQUEUE before calling BAPI_BASICPAY_CREATE.
The error 'Type E Employee/applicant is not locked yet' will be gone.
2014 Jun 26 12:30 PM
Thank you for your reply Amol but I have done that as well before, now from the last 5 try I am getting this error
" Personal number not yet assigned.".
Regards,
Naren.
2014 Jun 26 12:45 PM
Hi,
Check whether entered employee is valid in the input date range
Regards,
2014 Jun 26 12:38 PM
Could you try to execute the FM with correct values in internal format (e.g. replace '3' with '00000003', '01012014' with '20140101', etc.)
Remarks :
Regards,
Raymond
(*) Also either post the exact text or the id of a standard error message.
2014 Jun 26 12:48 PM
Thanks you Raymond. Will look into this and revert.
Regards,
Naren.
2014 Jun 27 8:20 AM
Hi Raymond,
I have done it. Thanks for your remarks ( it was like one hit on my head ), " Sometimes we think in such a fashion that even we become blind to the obvious things. "
I whole issue was with miss-communication from HR consultants in basic pay values.
Below is a program for further reference:-
types:begin of type_struc,
empno type bapip0008-pernr, " Personal Number
sub type bapip0008-subty, " Subtype
from type bapip0008-begda, " Start date
to type bapip0008-endda, " End date
pstype type bapip0008-trfar, " Payscale type
psarea type bapip0008-trfgb, " Payscale area
psgrp type bapip0008-trfgr, " Payscale group
pslvl type bapip0008-trfst, " Payscale level
curr type bapip0008-waers, " Currency
cpstype type bapip0008-vglta, " Comparsion payscale type
cpsarea type bapip0008-vglgb, " Comp. payscale area
cpsgrp type bapip0008-vglgr, " Comp. payscale group
cpslvl type bapip0008-vglst, " Comp. payscale level
clvl type bapip0008-bsgrd, " Utilities level
wrkhrs type bapip0008-divgv, " Works hours
end of type_struc.
data: wa type type_struc,
itab type table of type_struc.
data: return like bapireturn1,
return2 like bapireturn1,
wages like bapip0008p occurs 0.
call function 'GUI_UPLOAD'
exporting
filename = ' '
filetype = 'DAT'
has_field_separator = 'X'
tables
data_tab = itab.
call function 'BAPI_PS_INITIALIZATION' .
loop at itab into wa.
call function 'BAPI_EMPLOYEE_ENQUEUE'
exporting
number = wa-empno "'12900'
importing
return = return
.
call function 'BAPI_BASICPAY_CREATE'
exporting
employeenumber = wa-empno "'12900'
subtype = wa-sub "'1 '
validitybegin = wa-from " '01.01.2014'
validityend = wa-to "'31.12.2014'
payscaletype = wa-pstype " 01
payscalearea = wa-psarea " 12
payscalegroup = wa-psgrp " 120A
payscalelevel = wa-pslvl " 00
currency = wa-curr " INR
comparisonpayscltype = wa-cpstype" 01
comparisonpaysclarea = wa-cpsarea" 12
comparisonpaysclgrp = wa-cpsgrp " 120A
comparisonpayscllvl = wa-cpslvl " 00
capacityutillevel = wa-clvl " 100.00
hoursworkedperperiod = wa-wrkhrs " 192.00
importing
return = return2
tables
wagetypes = wages
.
call function 'BAPI_TRANSACTION_COMMIT' .
endloop.
Regards,
Naren K.