cancel
Showing results for 
Search instead for 
Did you mean: 

Infotype operation

Former Member
0 Kudos

Hi all,

i am creating records for infotype 0008, using function module hr_infotype_operation.

but i am gettin a dump as follows:

Type conflict when calling a function module (field length).

i belive i have done all the changes but still i am getting the same error.

please find what i have done and correct me as i know i am missing something or did something wrong.

  • wa_p008 is of type p0008

  • lt_p0008 is type standard table of p0008.

CALL FUNCTION 'HR_INFOTYPE_OPERATION'

EXPORTING

infty = '0008'

number = wa_p0008-pernr

subtype = '1'

  • OBJECTID =

  • LOCKINDICATOR =

validityend = wa_p0008-endda

validitybegin = wa_p0008-begda

  • RECORDNUMBER =

record = lt_p0008

operation = 'INS'

tclas = 'A'

dialog_mode = '0'

nocommit = 'X'

  • VIEW_IDENTIFIER =

  • SECONDARY_RECORD =

IMPORTING

return = return

  • KEY =

thanks for all you help in advance...

Anuj..

Edited by: Anuj Anuj112 on Apr 3, 2009 12:23 PM

Accepted Solutions (0)

Answers (1)

Answers (1)

Vivek_V
Active Contributor
0 Kudos

Hi,

I think you are passing the internal table lt_p0008 to the FM instead of wa_p008. Pass your work area wa_p008 as Record for the FM and check.

VK

Former Member
0 Kudos

hi,

thank for your quick reply.

i have change it but it still giving me the same error.

please help me futher.

thanks

Anuj

Vivek_V
Active Contributor
0 Kudos

Declare your internal tables as under and then check:

lt_p0008 TYPE TABLE OF p0008.

wa_p0008 TYPE p0008.

Also, Check the value of SUBTY in your table lt_p0008 and wa_p0008. If it is 0 then in FM pass the value of SUBTY as wa_p0008-subty instead of "1".

VK

Edited by: VK on Apr 3, 2009 4:39 PM

Former Member
0 Kudos

Hi VK,

i have change it please see what i did.

DATA: lt_p0008 TYPE table of p0008.

DATA : wa_p0008 TYPE p0008.

...... values to wa_p0008.

append wa_p0008 to lt_p0008.

CALL FUNCTION 'HR_INFOTYPE_OPERATION'

EXPORTING

infty = '0008'

number = wa_p0008-pernr

subtype = '1' "wa_p0008-subty

  • OBJECTID =

  • LOCKINDICATOR =

validityend = '99991231' "lt_p0008-endda

validitybegin = '18000101' "lt_p0008-begda

  • RECORDNUMBER =

record = lt_p0008 "wa_p0008

operation = 'INS'

tclas = 'A'

dialog_mode = '0'

nocommit = 'X'

  • VIEW_IDENTIFIER =

  • SECONDARY_RECORD =

IMPORTING

return = return

  • KEY =

dont know what to do know.

thanks

anuj

Vivek_V
Active Contributor
0 Kudos

Is this working???

While processing, check the field SUBTY in your internal table, if it is "0" then pass wa_p0008 in your FM instead of "1".

VK

Former Member
0 Kudos

hi Vk,

no its not working.

i have changed the subty value even, but still it is not working.

now what should i try suggest me.

thanks

Anuj

Edited by: Anuj Anuj112 on Apr 3, 2009 2:00 PM

Edited by: Anuj Anuj112 on Apr 3, 2009 2:00 PM

Vivek_V
Active Contributor
0 Kudos

Hi,

This is how we use HR_INFOTYPE_OPERATION:

DATA: lt_p0008 TYPE TABLE OF pa0008.

DATA: ls_p0008 TYPE p0008,

....... get data to ls_p0008.

CALL FUNCTION 'HR_INFOTYPE_OPERATION'

EXPORTING

infty = ls_p0008-infty

number = ls_p0008-pernr

subtype = ls_p0008-subty

"objectid = space

"LOCKINDICATOR = space

validityend = ls_p0008-endda

validitybegin = ls_p0008-begda

recordnumber = ls_p0008-seqnr

record = ls_p0008

operation = 'INS'

tclas = 'A'

nocommit = 'X'

IMPORTING

return = ls_rcode

key = lit_ret_key.

Hope this helps.

VK