10-15-2007 10:53 AM
Hi All,
I have below requirement...
Whenever user create infotype 0008, infotype 0014 should be created for the wages available in a Z table.
I created a dynamic action and call function HR_INFOTYPE_OPERATION. When i debug the routine function successfully executed with sy-subrc eq 0. But when i check the database table, there will be no data for infotype 0014. I am writing the below piece of code, i put the hard code value for testing purpose...if you have any idea please let me know
IT_P0014-PERNR = '1000005'.
IT_P0014-ENDDA = '99991231'.
IT_P0014-BEGDA = '20071111'.
IT_P0014-LGART = '1003'.
IT_P0014-BETRG = 1003.
CALL FUNCTION 'BAPI_EMPLOYEE_ENQUEUE'
EXPORTING
NUMBER = '1000005'
IMPORTING
RETURN = RETURN.
CALL FUNCTION 'HR_INFOTYPE_OPERATION'
EXPORTING
INFTY = '0014'
NUMBER = '1000005'
VALIDITYEND = '99991231'
VALIDITYBEGIN = '20071111'
RECORD = IT_P0014
OPERATION = 'INS'
TCLAS = 'A'
IMPORTING
RETURN = RETURN
EXCEPTIONS
OTHERS = 0.
COMMIT WORK AND WAIT.
CALL FUNCTION 'BAPI_EMPLOYEE_DEQUEUE'
EXPORTING
NUMBER = '1000005'.
Please let me know if i am missing any thing.
10-15-2007 10:54 AM
Use INSERT command instead of HR_INFOTYPE_OPERATION.It has some issues while calling from Dynamic Actions.