Sapdup Blogging about SAP


Parameter EKO & Defaulting Purchasing Organization in the Purchase Requisition

Edit: I wasn't able to get our Basis guys to make the change in our sandbox system to either prove or disprove this post.  However I believe it to be accurate and would appreciate your comments.


First up, apologies for that awfully long title.

I spent hours yesterday trying to sort how to use user parameter EKO to default a purchasing organization (organisation) into a purchase requisition (PR).

All over the web about half the people said "all you have to do is set user parameter EKO" and the other half said "you're a bunch of idiots, it doesn't work!"

The answer, as is usually the case, is that you're all wrong (or right depending on how you look at it).

Here's the text for SAP OSS Note 73241 (hopefully these notes aren't proprietary or anything):


The field 'Purchasing organization' on the detail screen of the purchase requisition item is not supplied from user parameter EKO when you create a purchase requisition.
Additional key wordsME51N

Cause and prerequisitesIn most cases, it is not necessary to preallocate the field;it can even cause errors.
The purchasing organization is transferred with the selection of a source of supply when you start a source determination on the detail screen, thus, a manual entry is not required.In addition, you must only enter the purchasing organization during the manual allocation of a source of supply if there are several purchasing organizations responsible for the plant.Thus, the actual entry aid for the user would be a minimum.
A preallocation is a problem since the detail screen is generally processed in the background and, as a result, the user could not see the allocation of a value to the field.If you were working with another purchasing organization in a previous transaction, an incorrect purchasing organization would be written to the purchase requisition by the SET/GET mechanism.For this reason, preallocating fields via SET/GET parameters is generally limited to the initial screens of the transactions.
A further problem is the creation of purchase requisitions from other applications in the background (via function module ME_REQUISITION_EXT). For reasons of consistency, the field would have to be preallocated here also which in turn can easily cause incorrect values in the purchase requisitions.

Solution Provisioning the purchasing organization from the SET/GET parameter is not implemented until further notice.You must make a manual entry in the few case in which this is required.

So, as you can see, there are problems with setting the purchasing org automatically. However if you still want to do it, just get a developer (since you'll need a development key) to go into SE51 (Screen Painter), enter program SAPLMEGUI and screen 3322. Select Element List and go to the 'Special Attributes' tab. Ensure that the 'EKO' paramter is entered and check the 'GET' checkbox.

You should now be away and laughing.