2007 Oct 15 10:56 AM
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 et 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'
LOCKINDICATOR = 'X'
NOCOMMIT = 'X'
TCLAS = 'A'
IMPORTING
RETURN = RETURN
EXCEPTIONS
OTHERS = 0.
BREAK-POINT.
COMMIT WORK AND WAIT.
CALL FUNCTION 'BAPI_EMPLOYEE_DEQUEUE'
EXPORTING
NUMBER = '1000005'.
Please let me know if i am missing any thing.
Thanks
Piyush
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 et 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'
LOCKINDICATOR = 'X'
NOCOMMIT = 'X'
TCLAS = 'A'
IMPORTING
RETURN = RETURN
EXCEPTIONS
OTHERS = 0.
BREAK-POINT.
COMMIT WORK AND WAIT.
CALL FUNCTION 'BAPI_EMPLOYEE_DEQUEUE'
EXPORTING
NUMBER = '1000005'.
Please let me know if i am missing any thing.
Thanks
Piyush
2007 Oct 15 10:59 AM
Use INSERT command instead of HR_INFOTYPE_OPERATION.It has some issues while calling from Dynamic Actions.
Regards,
Amit
Reward all helpful replie.
<b>P.S. Do not duplicate the thread.</b>
2007 Oct 15 11:04 AM
Hi Amit,
I thing this will be not a good idea to update database directly as its a application document data which might be update no of tables. PLease le me know if there are any other way.
Thanks
Piyush
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |