cancel
Showing results for 
Search instead for 
Did you mean: 

Error during profit center change due to status of archived scheduling agreements

Former Member
0 Kudos

Hi All,

Facing an issue with profit center change .

I am getting error message MM326 "There are still open purchasing orders", while trying to change profit center for a material

We have already taken care of the following points:

  • Stock from plant has been removed in last financial period
  • All purchasing documents are either deleted or archived

After debugging the error we found an issue with the field EKPO-LOEKZ of an archived scheduling agreement.

Typically the field should be set as "L" after deletion.

However , here we found that it was set to value "X".

We are supporting the SAP application for a customer and this archival and the subsequent editing of field EKPO-LOEKZ was done before we took over this project.

Now we would like to change this field from "X" to "L".

But we cannot make changes to an archived document.

I have the below questions:

  1. Therefore, I would like to understand if it is possible to reverse the archival of a scheduling agreement.
  2. And after we reverse the archival, is there a standard way to change EKPO-LOEKZ from "X" to "L" ?

Thanks

Akash

Accepted Solutions (0)

Answers (1)

Answers (1)

JL23
Active Contributor
0 Kudos

SAP does not check archived purchase orders, it only checks POs that exist in EKPO table.

If a PO is really archived then it is no more in the EKPO table.

Because of this I would say it is not archived, just has a wrong deletion indicator, probably caused by BAPI_PO_CHANGE which allowed this X in some releases until it was fixed with OSS note 822324 - Possible to use 'X' in POITEM-DELETE_IND in BAPI_PO_CHANGE

Just undelete the PO item in ME22N and delete it again, it should then have a L in EKPO-LOEKZ

Former Member
0 Kudos

Hi Jurgen,

This issue is specific to a scheduling agreement and not for a PO.

Unfortunately when i open it with ME32L it does not allow me to edit with message "Purchasing document already archived".

So the questions i have are as follows:

1) Is it possible to reverse the archival for this SA ?

2) If above answer is yes, then is it possible to change the EKPO-LOEKZ to "L" from "X" using ME32L ?

3) If answer to first question is no then is there any other standard way to change EKPO-LOEKZ to "L"  ? I know that we can avoid this problem by setting message MM326 to "Warning". But I want to avoid doing that.

Thanks

Akash

JL23
Active Contributor
0 Kudos

it is certainly not archived if it is in EKKO and EKPO, it may stick in between, preprocessing done - archiving not done.

To reset the indicator you need to develop a report, for instruction and template see KBA 1905073 - How to reset deletion indicator in Purchasing document header (EKKO-LOEKZ) ?

Former Member
0 Kudos

Hi Jurgen

This note refers note 688856

Note 688856 is quite old  (2004) and shows "cannot be implemented" in our system.

Is it still OK to use the Z-program in it to change EKKO-LOEKZ ?

Not sure why note 1905073 is referring this old note otherwise.

PS:

The assumption here is that after making EKKO-LOEKZ = blank using above report we should be able to change EKPO-LOEKZ to "L" from "X" using ME32L

Thanks

Akash

JL23
Active Contributor
0 Kudos

Z reports have to  be created by yourself - they usually cannot be imported via SNOTE

The coding can be found in the correction instructions by clicking the instruction number.

SAP said in 1905073 you shall use it as template, which means you have to make changes yourself to meet you needs.

Yes the assumption is correct.

Former Member
0 Kudos

Hi Jurgen,

Appreciate the help. We have resolved the issue.

One small point worth mentioning for others with this problem is that the original report was designed for purchase orders only. We extended it to change EKKO-LOEKZ field to blank for scheduling agreements as well.

Thanks

Akash