cancel
Showing results for 
Search instead for 
Did you mean: 

How to delete a PO in SRM

Former Member
0 Kudos

Hello,

one PO has been created in SRM and replicated to the backend.

I would ask how can we delete this PO (because the data was wrong), should we delete the PO in SRM side or in the backend?

Regards,

Lina

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Lina

If you are using extended classic scenario you can simply delete the line items in the PO within SRM. This will replicate the appropriate changes in the backend.

You won't be able to change the PO in the backend as this is standard functionality.

Keith

Former Member
0 Kudos

Hello Keith,

I did like you said, but for reporting purpose is not good because after delete the line items and press save PO in SRM remains in status Saved , items deleted in SRM and in backend R3.

But this is confusing for purchasers to see status Saved / Ordered.

Is no change to change the status ? at least for purchasers and for reporting to know that some PO"s are deleted ?

Thanks !

Answers (4)

Answers (4)

0 Kudos

Hi all, recently we faced same scenario which we would like to delete SRM PO. Search this topic and found your posting. I'd love to share the way I solve this.

This is my finding:

1. If the SRM PO's status is 'Held' or 'Saved', then you need only to use this function 'BBP_PD_PO_STATUS_CHANGE' and pass these parameters:

i_guid = PO's guid,

i_activity = 'DELE'

i_save_db = 'X'

Wrote a simple program, use this function and 'COMMIT WORK'.

2. If the SRM PO's status is not other than above, such as 'Waiting for Approval', 'Ordered', etc, you need to deactivate all these status until the PO Status back to 'Saved'/'Held'.

To deactivate these status use this function in your program:

'BBP_PROCDOC_STATUS_CHANGE_DIRE' and pass these parameters:

iv_heasder_guid = PO's guid

iv_object_type = 'BUS2121'

iv_save_db = 'X'

Table it_status with it_status-inact = 'X' and it_status-stat = Whatever Status you want to deactivate such as 'I1043' for 'Ordered'.

And follow up by COMMIT WORK.

Then use above function, 'BBP_PD_PO_STATUS_CHANGE' to delete the PO.

Then finally deleting its UWL by using this function 'SAP_WAPI_WORKITEM_DELETE'.

Happy Sharing. Thank You,

Zabidi Yusoff.

vinita_kasliwal
Active Contributor
0 Kudos

Also , make a note it is possible to delete SC by deleting each line items , Deleting at header level after it is created or is in approval state .

Also deletion can take place from selecting the SC in UWL and clicking on option of delete .

If a PO is created you may want to delete the PO directly and the changes would be reflected in SRM SC as well  .

former_member189681
Participant
0 Kudos

Hi Vinita,

We had a problem in SRM. I am actually not a SRM person, but trying to support them in absence of our SRM Analyst. I am not able to reach our SRM Analyst.

1. Shopping cart was created in SRM

2. PO order was created in SRM & ECC

3. User tried to make some changes and it caused some error message.

4. So, we thought of deleting the PO in ECC and so we deleted the line PO line items in ECC.

5. Asked the User to create a new Shopping Cart and subsequently create a new PO

However, I am being asked by the user if she can reject the old shopping cart from her queue? I am not sure if that's possible or the correct thing to do.

Can you please advise?

Thanks in advance.

Krishna

vinita_kasliwal
Active Contributor
0 Kudos

Hi Krishna

Firstly SC status would be as follows SC Draft > Awaiting approval > Item in transfer > Follow on doc created .

Once the Follow on Doc i.e PO is created the approver cannot reject the SC if you have deleted the corresponding PO already it would have set the deleted status of the SC .

You can go to BBP_pD and you would see the status of SC there Deleted in the Status coloumn should be Active . Please check that since a report is set in SRM BBP_GET-status2 which sends back the status of PO to SC everytime .

However for future incase a SC is Awaiting approval it can be deleted by Requestor by recalling the SC and Clicking on Edit and then marking it line wise for deletion or at header level .

please also check the attached doc for help !

former_member189681
Participant
0 Kudos

Thank you Vinita.. I cannot view the attachment, If possible can you please send it to me as an attachment? 

Thanks again,

Krishna

Former Member
0 Kudos

Hi Keith,

thanks, it solved the issue.

Regards,

Lina

Former Member
0 Kudos

Hi

Which SRM version are you using ?

<u><b>Please go through this -></b></u>

<b>You can also archive SRM PO incase you don't want to delete the same</b>

<u></u>

Once the purchase order is ordered and issued, it is a legal document between your company and the vendor. Only PO line items can be deleted and you can not delete PO header.

Deleting line item of PO is not enough. Make sure that PR or SC history does not contain any follow on document else system will interpret this a close PR or SC.

Because the PO was already printed or output exist... You cannot delete PO header.

Once the PO has been issued to vendor in any form, deletion is not possible at the header level, only possibility is deleting line items of the PO (deletion indicator marked for all the line items of PO). Only when the PO is rejected by the approver (in case any, which will be in the 'release rejected' status) or in held state (before issued to vendor), PO can be deleted at the header level, as the data still exists in SRM and not get transferred to R3 backend. If you want to forcibly delete the PO at the header level, flag DOC_CLOSED field in the table BBP_PDHGP (header tabe) through BBP_PD for the respective PO.

<b>Try using the Function Modules "BBP_PD_PO_DB_DELETE".</b>

<b>BP_PD_PO_ITEM_DELETE_LOCAL</b>

<u>Some other relevant Function modules -></u>

BP_PD_PO_DB_DELETE_MULTI

BP_PD_PO_ITEM_DELETE_LOCAL

BBP_BS_POD : Spooler, delete PO

SPOOL_PO_DELETE :Spooler function to delete a po in core

SPOOL_PO_DELETE_DO :Spooler function to delete a po in core

Do let me know. Hope this will help.

Regards

- Atul

Former Member
0 Kudos

Hi Atul,

I mention that the output to the vendor has not been done for the PO i want to delete.

Regards,

Lina

Former Member
0 Kudos

Hi

Then in that case, once vendor ouput is not issued, I don't think there you will face any problems. Delete the line items in Back-end PO and archive the SRM PO will solve the purpose.

For more details, refer to above details.

Do let me know.

Regards

- Atul

Former Member
0 Kudos

Hi Atul,

Please confirm that i should delete the line items in Back-end PO and not in SRM side. Furthermore what do you mean by archiving the SRM PO : how can i do this archiving and why?

Regards,

Lina

Former Member
0 Kudos

Hi

Do not delete SRM PO line items and only delete POS line items in R/3 back-end..

For PO rching, there are couple of threads available in OSS Notes and SDN..

Note 513443 - Archiving lean scenario follow-on documents

Note 1048591 SRM Invoice Archived Before PO

Note 1055943 - Purchase order cannot be archived

Note 686096 - SRM archiving: Writing documents into the archive

Regards

- Atul

Message was edited by:

Atul

Former Member
0 Kudos

Atul

How is Lina going to delete the line items in the backend PO if she's using ECS ?

Keith

Former Member
0 Kudos

Appologies for any incovenience.

Best approach is to Archive the PO and don't delete PO Header and line items at all.

Even if ECS is used, If possible, Try PO change is possible using ME22, and if not, then please do let me know.

Regards

- Atul