cancel
Showing results for 
Search instead for 
Did you mean: 

Number Range of PO

RitaB
Participant
0 Kudos

we have a requirement to assign a separate purchase order number range for each company code.

like:

for companycode ABCD, all the PO numbers must lie between 10000000 to 19999999.

for companycode EFGH, all the PO numbers must lie between 20000000 to 29999999.

Is there any user exits??? or any solutions.........

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi!

you have to create a new database table (Z_NUMBER). with fields:

MANDT, EKORG, BSTYP (if you want to make different number ranges for POs, contracts etc), RANGE.

MANDT, EKORG, BSTYP must be key fields.

In SPRO-> Materialsmanagement --> Purchase order --> number ranges

Maintain it with Range (must be the same than in your tabel Z_NUMBER...

and at the end activate User Exit EXIT_SAPMM06E_001 --> include ZXM06U17

and enter the following coding:

data: gs_number type Z_NUMBER.

SELECT SINGLE * FROM z_number into gs_number

WHERE ekorg = nekko-ekorg

AND bstyp = nekko-bstyp.

IF sy-subrc = 0.

range = gs_number-range.

ENDIF.

have fun

Flo

Edited by: Florian LINTNER on Mar 30, 2011 10:38 AM

Former Member
0 Kudos

Hi,

If you have more than one company code, you need to define a new document type and number range to differentiate between the two company.

Define a new number range not in used

OMH6 - Number Ranges for Purchasing Documents

Define or Copy the Document type

OMEC - Define Document types

Maintain :

Text for Document Header/Item

Text for Document Supplement

OMF6 - Messages Header Texts

regards

Anand

Former Member
0 Kudos

Hi

Create two document types for two company code. assign them No Range you want .

control document type for comp. code user through athorization.

RitaB
Participant
0 Kudos

Yes it is. but i want through user exist.....

adwait_bachuwar
Active Contributor
0 Kudos

Hi,

the user exit you could utilize is MM06E003.

you can refer to following threads as well

http://www.sap-img.com/materials/user-exit-that-is-applied-in-mm-area.htm

Regards,

Adwait Bachuwar

Edited by: adwait bachuwar on Mar 30, 2011 2:03 PM