on 11-15-2005 2:22 PM
Hi All,
How to delete a record from infotype which has a time delimit 0 or 1 ?
Thanx in advance
ram
see function HR_INFOTYPE_OPERATION
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Small correction to the above question. Actually the record was not CREATED the day before but the BEGDA value is yesterdays date.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
I am practising HR ABAP and trying to delete a record from infotype 0000 using the following code. But it is giving me an error "Entry does not exist in - check your entry".
DATA: i_return TYPE bapireturn1,
i_return2 TYPE bapireturn1,
w_p0000 TYPE p0000,
w_pernr LIKE pspar-pernr VALUE 7,
w_infty LIKE pspar-infty VALUE '0000',
w_actio LIKE pspar-actio VALUE 'DEL',
w_tclas LIKE pspar-tclas VALUE 'A',
w_begda LIKE pspar-begda,
w_endda LIKE pspar-endda VALUE '99991231'.
DATA: BEGIN OF wa_record.
INCLUDE STRUCTURE p0000.
DATA: mandt LIKE sy-mandt.
DATA: END OF wa_record.
START-OF-SELECTION.
w_begda = sy-datum - 1. "Record was created the previous day
SELECT SINGLE * FROM pa0000
INTO CORRESPONDING FIELDS OF wa_record
WHERE pernr = w_pernr.
w_p0000 = wa_record.
w_p0000-infty = '0000'.
CALL FUNCTION 'BAPI_EMPLOYEE_ENQUEUE'
EXPORTING
number = w_pernr
IMPORTING
return = i_return.
CALL FUNCTION 'HR_INFOTYPE_OPERATION'
EXPORTING
infty = w_infty
number = w_pernr
objectid = w_p0000-objps
lockindicator = w_p0000-sprps
recordnumber = w_p0000-seqnr
validityend = w_endda
validitybegin = w_begda
record = w_p0000
operation = w_actio
nocommit = 'X'
IMPORTING
return = i_return2.
COMMIT WORK.
CALL FUNCTION 'BAPI_EMPLOYEE_DEQUEUE'
EXPORTING
number = w_pernr
IMPORTING
return = i_return.
Is there some thing wrong with the code.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You can't use PP01 PP02 transactions for deleting a record with time constrains 0 and 1
You can't delete using function groups
The only way i know at this moment ,is using a sql statement ,delete for being more exactly
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I stand corrected... PU00 is a useful tool for deleting Infotypes which don't have the time constraints you are talking about. HR_INFOTYPE_OPERATION is indeed the way to go (as mentioned in an earlier post) Here is a code sample, if it helps..
*--- Lock Pernr.
call function 'BAPI_EMPLOYEE_ENQUEUE'
exporting
number = Pernr
importing
return = p_i_return.
call function 'HR_INFOTYPE_OPERATION'
exporting
infty = '0000'
number = Pernr
subtype = SubType (If any)
objectid =
lockindicator =
validityend = ENDDA
validitybegin = BEGDA
recordnumber =
record = Data
operation = 'DEL'
nocommit = ''
importing
return = l_return.
call function 'BAPI_EMPLOYEE_DEQUEUE'
exporting
number = Pernr
importing
return = l_return.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Use transaction PU00 & check if it helps you.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Ram,
By 'Time Delimit' are you referring to the Time Constraints? In that case I do not of any Time Constraint 0. And as for Time constraint 1 , it must be used for all of the infotypes containing information that must be available at all times. So can you pl be more specific about your requirement?
Good Luck,
Suresh Datti
User | Count |
---|---|
103 | |
12 | |
11 | |
6 | |
5 | |
4 | |
3 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.