Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Batch Number Assignment

Former Member
0 Kudos

Hallo, everyone,

I'm developing a solution for individual batch number assignment.

When a user creates a process order, the batch number should be generated according to following rules:

XXYY000001

XX - chararater, depends on the material master data, e.g. RL for material group 0001 (just an example).

YY- year, z.B. 08 for 2008

000001 - 6-digit number, starting from 000001 for every new year.

Has anyone some coding example?

I'd appreciated it.

Best regards

Yong

2 REPLIES 2

former_member181995
Active Contributor
0 Kudos

Yong,

I think no one has such logic with them.cause sometime it depends on ORG specific requirements.

my guess you need to develope logic by your own.

i can give you some clues or hint how to start:

XXYY000001

XX - chararater, depends on the material master data, e.g. RL for material group 0001 (just an example).

Just spilit your matnr and take first two char and keep in some temp variable.

YY- year, z.B. 08 for 2008
000001 - 6-digit number, starting from 000001 for every new year.

again split sydatum to get year and for 000001 you need to call FM NUMBER_GET_NEXT.

Cheers

Former Member
0 Kudos

Stop cross-posting to multiple forums!

Please read [the rules|https://www.sdn.sap.com/irj/sdn/wiki?path=/display/home/rulesofEngagement] before posting any further.