cancel
Showing results for 
Search instead for 
Did you mean: 

unable to delete a PO-feel strange

Former Member
0 Kudos
1,229

Hi Team,

I have come across an unusal issue. My client has created a PO for Raw Materials. The doc type of the PO is NB. But as per our system the document type for raw material po must be ZR. Client has given all details in the PO like PR#, Contract #, Contract Line item # etc.

Now the user wants to delete this PO as it was saved under wrong doc. type.

The system is allowing to delete the line items ( the trash can symbol is comming against the line item) but while trying to save the PO, it is giving the below error:

Use Document type ZR for procurement of Raw/Packaging Material.

When we try to change the document type, again error on number range comes up as the number range defined for doc type NB and ZR are different.

Now, my question is:

1) How did the system let her save the PO ( as it should have given error while creation of PO and the user should only be allowed to HOLD the PO)

2) How to delete the PO now?

Please let me know if you need any further details on the PO.

Regards,

arun

View Entire Topic
jagdeepsingh83
Active Contributor
0 Kudos

First- This is not SAP standard message, Its seems this error message is coming from activated User Exit or Purchase order BADI which validate Document type and Material type.

if exit is calling some custom table where document type and material type combination is maintained, you need to remove that entry to enable deltion-- as system will not perform this check

if no, then ask abaper to change the code to remove this validation and introduce a mapping table.. which can maintained by administrator..

It depends what approach you follow but this is due to custom program. Work with your Abaper..

former_member216345
Participant
0 Kudos

1. You cannot change the PO document type once it has been created.

2. You have a user exit  active in your system to stop users from creating POs with wrong document type,. However, this is working only for change transaction (ME22N), and not in the create mode (ME21N). Hence you are not able to delete the PO.

The user exit should be enabled I both create and change modes. If you want to delete the line item you will need to deactivate the user exit, delete the PO line item and then activate user exit again.

Second option is to lock the PO line item for this one case, if it allows you to save after changes.