Application Development 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: 

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

Former Member
0 Kudos

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):

TYPEE
IDS5
NUMBER11
MESSAGEDate   .  . contains invalid characters
LOG_NO
LOG_MSG_NO0
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.

1 ACCEPTED SOLUTION

Former Member
0 Kudos

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

3 REPLIES 3

Former Member
0 Kudos

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

0 Kudos

Hi Ajay,

I've fixed the error.

The problem was due to a new date field added to the infotype 9003 (table PA9003).

When the report is executed to delete all the records it fails in the new field because all are empty.

To avoid problems in the PRO enviroment I have to run first the report to delete all records and later pass the modifications to the table an infotype.

Kind regards,

Julian.

0 Kudos

Hi Julian,

Could you please close the thread.

Have a nice day!

Regards

Ajay