cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

I have a z-table that has a list of PERNRs that need to be deleted in batch. How can I do this?

dan_spitzig
Explorer
0 Likes
848

Hi experts,

I store the PERNRs in an internal table and loop through it.  This is in a test environment, not Production.

Step 1:  I use fm HR_MAINTAIN_MASTERDATA to set to clear out PA0003-ABRDT, and this works fine.

Step 2:  I need to run Submit RPUDEL20 to delete the payroll results.  How do I code this to suppress the screens, and can I check whether it was successful?  my SUBMIT statement is as follows:

      ls_seltab-selname 'PNPPERNR'.
      ls_seltab-kind    'S'.
      ls_seltab-sign    'I'.
      ls_seltab-option  'EQ'.
      ls_seltab-low     lv_pernr.
      CLEAR ls_seltab-high.
      APPEND ls_seltab TO lt_seltab.

  SUBMIT rpudel20 WITH SELECTION-TABLE lt_seltab
    AND RETURN
    EXPORTING LIST TO MEMORY.

Step 3:  CALL TRANSACTION pu00 to delete the PERNR.  This doesn't work because step 2 fails.

Please help.

Thanks,
Dan

Accepted Solutions (1)

Accepted Solutions (1)

RaymondGiuseppi
Active Contributor
0 Likes

First read 2927142 - Bulk or massive deletion of payroll results as this report should only be used in quality and development systems (test system should be ok)

  • Have you considered batch input on PU01 as you do for PU00 as SUBMIT does not usually allow to get error message when calling transaction do, of course PU01 may raise some errors that the report would ignore.
  • Did you consider a Z-transaction to wrap RPUDEL20 ?
dan_spitzig
Explorer
0 Likes
Thanks for your reply, Raymond. I am trying to do this in quality system, no production. I have tried to use BDC with PU01 with no success. Our consultant suggested that RPUDEL20 is a better option.
RaymondGiuseppi
Active Contributor
0 Likes
So try Z-transaction to get error messages back
dan_spitzig
Explorer
0 Likes
I have never wrapped a standard SAP program into a Z-transaction. Can you please provide some guidance?
RaymondGiuseppi
Active Contributor
0 Likes

As RPUDEL20 is a report (selection screen), simply call SE93, create a Z<yourcode> transaction of type 'report transaction' and provide the report name on the next screen, provide a customer package and transport request.

dan_spitzig
Explorer
0 Likes
I don't see the option to create the transaction type 'report transaction'. When I create the BDC recording, it doesn't get past the first screen.
dan_spitzig
Explorer
0 Likes
Ignore that last comment. Thanks for your help.

Answers (0)