Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

BDC- help

Former Member
0 Likes
1,102

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

7 REPLIES 7
Read only

former_member181966
Active Contributor
0 Likes
1,043

I don’t think so , As there’re programs on PD side . But There’s no BAPI .

You can use FM "HR_MAINTAIN_MASTERDATA" but from the below thread its also a mystery!!

Check out thread :

Thanks

Saquib

Read only

0 Likes
1,043

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

Read only

ferry_lianto
Active Contributor
0 Likes
1,043

Hi Vinu,

Please check this thread on HR_INFOTYPE-OPERATION.

Hope this will help.

Regards,

Ferry Lianto

Read only

0 Likes
1,043

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

Read only

0 Likes
1,043

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

Read only

0 Likes
1,043

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

Read only

0 Likes
1,043

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