cancel
Showing results for 
Search instead for 
Did you mean: 

Massive delete PDS in APO via BAPI - Message /SAPAPO/CULL_SERVICE 056

Former Member
0 Kudos

Dear SAP Gurus,

When I try to use the BAPI BAPI_PDSSRVAPS_DELMULTI to delete PDS according to some criteria we are defining in our client (combinations of product, plant and production version with PDS in APO and not in MKAL table in ECC) we receive the message 056 (PDS was not created via the BAPI and will not be deleted) of class /SAPAPO/CULL_SERVICE in the return of the BAPI and PDS is not deleted.

Do you know how to massive delete PDS using a ABAP program?

Thanks and BR

Mauricio

Accepted Solutions (1)

Accepted Solutions (1)

former_member197994
Active Contributor
0 Kudos

Dear Mauricio,

In APO /SAPAPO/CULL_DELETE_RTO, in R/3 CUSLNTRTO_CIF_REPORT can be used. Best regards/Tiemin

Former Member
0 Kudos

Hi,

Doing in ECC with report CUSLNTRTO_CIF_REPORT PDS with order assigned is not deleted. We can use the transaction /SAPAPO/CULL_RTO_DEL in APO but I'd like to automate the process using a BAPI to delete the differencies regadless of the PDS usage.

We are planning to call the standard transaction to do this but inside another program that would recognize the differencies, it would be easier to use the BAPI.

Thanks for your help

Mauricio

former_member197994
Active Contributor
0 Kudos

Hi,

You can copy create a Custom FM like the BAPI but eliminating the coding that checks in /SAPAPO/CL_CULL_DELETE_RTO====CP DELETE_RTO_R3


* BAPI shall delete only PDS created by BAPI
    IF iv_bapi EQ gc_true.
      IF NOT <header>-author EQ 'B'.
        CALL METHOD /sapapo/cl_cull_delete_rto=>message_to_log
          EXPORTING
            io_message_handle    = io_message_handle
            iv_trpid             = ls_trpid_get_matnr
            iv_simversion        = ls_simid_get_simversion
            iv_message_type      = 'W'
            iv_message_number    = '056'
.

This is a modification so you should test/use very carefully. Best regards/Tiemin

Appreciate you can award points and close the thread if your inquiry has been addressed.

We look forward to your new queries.

Answers (0)