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

error using FM RH_INSERT_INFTY

Former Member
0 Likes
1,684

Hi Guy's

Im facing an issue while using FM RH_INSERT_INFTY to insert data in Infotype HRP1028

its raising a exception "2-ERROR_DURING_INSERT "

DATA : it_hrp1028 TYPE STANDARD TABLE OF HRP1028 INITIAL SIZE 0.

it_hrp1028-PLVAR = '01'.

it_hrp1028-otype = 'S'.

it_hrp1028-objid = positionid.

it_hrp1028-infty = '1028'.

it_hrp1028-istat = '1'.

it_hrp1028-begda = begda.

it_hrp1028-endda = endda.

it_hrp1028-build = build.

APPEND it_hrp1028.

CALL FUNCTION 'RH_INSERT_INFTY'

EXPORTING

FCODE = 'INSE'

VTASK = 'S'

  • ORDER_FLG = 'X'

  • COMMIT_FLG = 'X'

  • AUTHY = 'X'

  • PPPAR_IMP =

  • OLD_TABNR = ' '

  • REPID = ' '

  • FORM = ' '

  • KEEP_LUPD =

  • WORKF_ACTV = 'X'

TABLES

INNNN = it_hrp1028

  • ILFCODE =

EXCEPTIONS

NO_AUTHORIZATION = 1

ERROR_DURING_INSERT = 2

REPID_FORM_INITIAL = 3

CORR_EXIT = 4

BEGDA_GREATER_ENDDA = 5

OTHERS = 6

.

IF SY-SUBRC EQ 0.

CALL FUNCTION 'RH_UPDATE_DATABASE'

EXPORTING

vtask = 'S'

EXCEPTIONS

corr_exit = 1

OTHERS = 2.

ENDIF.

Thanks in advance for the help

1 ACCEPTED SOLUTION
Read only

kesavadas_thekkillath
Active Contributor
0 Likes
1,008

Try HR_INFOTYPE_OPERATION and HR_MAINTAIN_MASTERDATA

The fm you mentioned can be only used for Organizational management & PD Infotypes.

3 REPLIES 3
Read only

kesavadas_thekkillath
Active Contributor
0 Likes
1,009

Try HR_INFOTYPE_OPERATION and HR_MAINTAIN_MASTERDATA

The fm you mentioned can be only used for Organizational management & PD Infotypes.

Read only

Former Member
0 Likes
1,008

Check if T777Z and T777D has value for the entered infotype.

Read only

Former Member
0 Likes
1,008

Hi everybody,

Did you solve this issue? I am facing a similar problem with FM RH_INSERT_INFTY, it's also raising a exception "2-ERROR_DURING_INSERT". In my case, i'm trying to insert a new record for the infotype 1028 but not as a position (S), im trying to insert the record as object type 'O'. So, in this case I don't have the field hrp1028-build.

Is there any other way to do this?