Avoid Manual Effort by Implementing an Alphanumeric Generator in ABAP

  • by Vipin Nagpal, SAP ERP Technical Consultant, SAP India Pvt. Ltd.
  • December 27, 2013
IT
Alphanumeric numbers can be saved in a database at the successful completion of an SAP transaction. Later, you can use the same number to identify a unique record. A use case shows how to generate alphanumeric numbers using an ABAP function module, thus saving manual work and reducing errors.
Learning Objectives

 By reading this article you will learn how to:

  • Use alphanumeric numbers with SAP master/transactional data 
  • Implement the alphanumeric number generator in ABAP
  • Consume alphanumeric numbers
Key Concept

Alphanumeric refers to combinations of letters and numbers using 26 letters (usually uppercase) and the numbers 0 through 9. When assigning a unique number to master or transaction data, alphanumeric numbers provide a wide range of unique possibilities. Automatic number generation saves effort as compared to generating numbers manually. The main manual way of generating alphanumeric numbers uses Microsoft Excel software. This method is time consuming and there is a high possibility of skipping the correct generated numbers, which is not the case with the ABAP function module number generation. The ABAP function module is code that can be reused from enhancements, custom reports, and custom class implementation.

During the creation of a material master, you can assign the material number from the alphanumeric number range, generating it using a custom function module. With the SAP enhancement user exit, you can assign alphanumeric numbers to material numbers. Each alphanumeric number has a specific naming convention, which helps the end user understand the use of material master data in the real world.

It is important to keep your number range (from the lowest to the highest number in your set) in mind when assigning a unique number to master or transaction data. This number uniquely identifies master or transaction data. There are two types of number ranges: internal number ranges, which contain only numbers, and external number ranges, which contain combinations of numbers, letters, and other characters. Standard SAP provides the function module NUMBER_GET_NEXT to generate the succeeding number in the sequence from the lowest to the highest internal number for the internal number range. However, there is no such standard function module available to generate external numbers for the external number range.

Vipin Nagpal

Vipin Nagpal is an SAP ERP technical consultant specializing in ABAP. He is a certified ABAP professional consultant. He has a master’s degree in engineering from BITS Pilani University, specializing in software systems. He has more than 10 years of experience in design, development, and production support in SAP ERP. He has worked with SAP ERP implementations for industries such as chip manufacturing, healthcare, aviation, and computer hardware equipment. He has worked with SAP ERP modules in sales and distribution, material management, plant maintenance, finance, and project system. He has been part of challenging assignments including SAP implementations for Japan Airlines and General Motors. 

To contact the editor, click here.

See more by this author


Comments

1/20/2014 12:20:07 AM
Venkat

Hello Vipin,

Your article was really good.

Please log in to post a comment.

To learn more about subscription access to premium content, click here.