‎2006 Apr 20 3:51 PM
hi,
This is related to BDC transaction and I have posted this question earlier too but I have made a progress in solving the loading the data into the infotypes. 0,1,35 and 41.
And I did try a different route to delimit the time data for IT0050 but the 'Delimit' action is not working.
Here is the code to delimit the records forIT0050
'X' 'SAPMP50A' '1000',
' ' 'BDC_OKCODE' '/00',
' ' 'RP50G-PERNR' REC-PERNR,
' ' 'RP50G-TIMR6' 'X',
' ' 'BDC_CURSOR' 'RP50G-CHOIC',
' ' 'RP50G-CHOIC' '50',
'X' 'SAPMP50A' '1000',
' ' 'BDC_CURSOR' 'RP50G-PERNR',
' ' 'BDC_OKCODE' '=LIS9',
' ' 'RP50G-PERNR' REC-PERNR,
' ' 'RP50G-TIMR6' 'X',
' ' 'RP50G-CHOIC' 'Time Recording Info 0050',
'X' 'SAPMP50A' '0500',
' ' 'BDC_CURSOR' 'RP50M-ABGRD',
' ' 'BDC_OKCODE' '=TAKE',
' ' 'RP50M-ABGRD' format_termin,
'X' 'MP005000' '3000',
' ' 'BDC_CURSOR' 'P0050-BEGDA(01)',
' ' 'BDC_OKCODE' '=DLIM',
' ' 'RP50M-BEGDA' format_termin,
' ' 'RP50M-ENDDA' '12/31/9999',
' ' 'RP50M-ABGRD' format_termin,
' ' 'RP50M-PAGEA' ' 1',
' ' 'RP50M-SELE2(01)' 'X',
' ' 'BDC_OKCODE' '/11'.
My question is there any other way I can delimit the data for IT50 like a BAPI FM?
Thanks in advance.
Vinu
‎2006 Apr 20 4:00 PM
‎2006 Apr 20 5:43 PM
hi Suresh,
Do you have any idea how to use HR_INFOTYPE-OPERATION ( I found that more appropriate) for delimit the record in 50?
Any leads would be helpfulas I am working with it right now.
Thanks
Vinu
‎2006 Apr 20 6:55 PM
‎2006 Apr 21 3:04 PM
Thanks for that link, here is what I did using the FM
CALL FUNCTION 'HR_INFOTYPE_OPERATION'
EXPORTING
INFTY = '0050'
NUMBER = '90014335'
SUBTYPE =
VALIDITYEND = '04/18/2006'
VALIDITYBEGIN = '01/03/2006'
RECORD = '90014335' ????
OPERATION = 'LIS9' (DELIMIT)
NOCOMMIT = SPACE
IMPORTING
RETURN = RETURN
KEY = PERSONALDATAKEY
EXCEPTIONS
OTHERS = 0.
when I did that the return value from the FM I got the message 'employee/applicant is not locked yet'.
Am I missing something here?
Since I am using this FM should I need to read the entire record from IT0050 into a work area and pass the parameter into that 'RECORD' variable just to use this FM.
Thanks in advance.
Vinu
‎2006 Apr 22 4:44 AM
Hi,
Try specifying the LOCKINDICATOR parameter.
e.g.
CALL FUNCTION 'HR_INFOTYPE_OPERATION'
EXPORTING
INFTY = '0050'
NUMBER = '90014335'
SUBTYPE =
<b>LOCKINDICATOR = 'X'</b>
VALIDITYEND = '04/18/2006'
VALIDITYBEGIN = '01/03/2006'
RECORD = '90014335' ????
OPERATION = 'LIS9' (DELIMIT)
NOCOMMIT = SPACE
IMPORTING
RETURN = RETURN
KEY = PERSONALDATAKEY
EXCEPTIONS
OTHERS = 0.
Hope it helps.
Regards,
Shashank
‎2006 Apr 25 5:54 PM
hi folks,
coming closer to the solution, I did figure out how to use HR_INFOTYPE_OPERATION for delimit.
Here is my code...
SELECT SINGLE * INTO CORRESPONDING FIELDS OF WA_0050 FROM PA0050 WHERE
PERNR = REC-PERNR.
CALL FUNCTION 'BAPI_EMPLOYEE_ENQUEUE'
EXPORTING
number = WA_0050-PERNR
validitybegin = wa_0050-begda
IMPORTING
return = return.
IF NOT return IS INITIAL.
EXIT.
ENDIF.
I am getting an error saying that the personnel number cannot be locked and return value here is 4
what can be the reason?
CALL FUNCTION 'HR_INFOTYPE_OPERATION'
EXPORTING
infty = '0050'
number = wa_0050-pernr
subtype = subty
validityend = wa_0050-endda
validitybegin = begda
recordnumber = seqnr
record = wa_0050
operation = 'LIS9'
IMPORTING
return = return
key = key
EXCEPTIONS
OTHERS = 0.
IF NOT return IS INITIAL.
CLEAR key.
EXIT.
ENDIF.
CALL FUNCTION 'BAPI_EMPLOYEE_DEQUEUE'
EXPORTING
number = WA_0050-PERNR
IMPORTING
return = return.
IF NOT return IS INITIAL.
EXIT.
ENDIF.
Thanks in advance.
I know I am getting closer to the solution here...
Vinu
‎2006 Apr 25 6:20 PM
hi guys,
I made one more observation here. the FM
HR_INFOTYPE_OPERATION' in version ECC 5.0 says not been released in the 'Attributes'
Does this have anything to do with that error?
Thanks
Vinu