Skip to Content
author's profile photo
Former Member

ERROR deleting records using FM HR_INFOTYPE_OPERATIONTYPE E S5 11 Date . . contains invalid characters

Hi experts!

We need delete all records of a customer infotype 9003. For this reason we have developed a program to do this function but it doesn't work by the date. In the debugger we can see the content of the returned value (l_return):

TYPE E ID S5 NUMBER 11 MESSAGE Date . . contains invalid characters LOG_NO LOG_MSG_NO 0 MESSAGE_V1 . .

I have tried changing the code of v_ini and v_ffin formatting the date in different formats but no one works.

The code is similar to:

...

v_fini = wa_p9003-begda.

v_ffin = wa_p9003-endda.

CALL FUNCTION 'BAPI_EMPLOYEE_ENQUEUE'

EXPORTING

number = wa_p9003-pernr

IMPORTING

return = l_return.

CALL FUNCTION 'HR_INFOTYPE_OPERATION'

EXPORTING

infty = lv_infty

number = wa_p9003-pernr

subtype = wa_p9003-subty

validityend = v_ffin

validitybegin = v_fini

recordnumber = wa_p9003-seqnr

record = wa_p9003

operation = 'DEL'

nocommit = ''

IMPORTING

return = l_return. "dialog_mode = '1'

CALL FUNCTION 'BAPI_EMPLOYEE_DEQUEUE'

EXPORTING

number = wa_p9003-pernr

IMPORTING

return = l_return.

...

Why is not possible delete the infotype records programmatically?

Anyone knows another option to delete all the records of a customer infotype?

Kind regards,

Julian.

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

1 Answer

  • Best Answer
    author's profile photo
    Former Member
    Jun 01, 2015 at 07:36 AM

    Hi

    Date required in format of 'yyyymmdd' for validity end and begin. Also it should be in same format for dates in structure wa_P9003. Check this first. are all dates in structure are correct?

    Check the data which you want to delete, is the data valid? I mean are you able to delete the same data from PA30. Sometimes the records created in infotype through programs may have invalid date format because of direct table update, in this case, system may not allow you delete the record.

    Regards

    Ajay

    Add comment
    10|10000 characters needed characters exceeded