Example: stock market

SD Document Number Range Enhancements

SD Document Number RangeEnhancementsTechnical Solution GuideThe Smith Consulting Group, Box 703 Flanders, NJ and R/3are the trademarks or registered trademarks of SAP AG in Germany and in several other 2005 The Smith Consulting Group, Inc. All Rights Document Number Range Enhancements6/19/2005 Page2of18 Technical Solution GuideCopyright 2005 The Smith Consulting Group, Inc. All Rights and Distribution Document Numbers in OSS Document Number Range NRIVN umber Range Intervals to SD Document Group Range Assignment User Exit 1 Build the Custom Configuration 2 Add Entries to the Configuration 3 Code the User 4 Test the Document Number Range Enhancements6/19/2005 Page3of18 Technical Solution GuideCopyright 2005 The Smith Consulting Group, Inc.

SD Document Number Range Enhancements 6/19/2005 Page 10 of 18 Technical Solution Guide Copyright © 2005 The Smith Consulting Group, Inc. All Rights Reserved.

Tags:

  Document, Ranges, Number, Enhancement, Sd document number range enhancements

Information

Domain:

Source:

Link to this page:

Please notify us if you found a problem with this document:

Other abuse

Advertisement

Transcription of SD Document Number Range Enhancements

1 SD Document Number RangeEnhancementsTechnical Solution GuideThe Smith Consulting Group, Box 703 Flanders, NJ and R/3are the trademarks or registered trademarks of SAP AG in Germany and in several other 2005 The Smith Consulting Group, Inc. All Rights Document Number Range Enhancements6/19/2005 Page2of18 Technical Solution GuideCopyright 2005 The Smith Consulting Group, Inc. All Rights and Distribution Document Numbers in OSS Document Number Range NRIVN umber Range Intervals to SD Document Group Range Assignment User Exit 1 Build the Custom Configuration 2 Add Entries to the Configuration 3 Code the User 4 Test the Document Number Range Enhancements6/19/2005 Page3of18 Technical Solution GuideCopyright 2005 The Smith Consulting Group, Inc.

2 All Rights and Distribution Document Numbers in R/3R/3 uses Number Range Objects to assign numbers to all documents created in thesystem. Document numbers are always technically defined as character fields that are tenbytes long. Theinternal and display formatting of Document numbers is controlled by thenumber Range object and a conversion exit that is assigned to the domain. In many of thestandard SD Document processing programs (Order, Delivery, Billing), there are userexits available to override the behavior of the standard system. This Document firstexplains how Document Number ranges are defined and then provides an exampleenhancement that changes the standard Document Number assignment.

3 The examples inthis Document are from a OSS NotesThe following OSS notes may be useful in understanding this process:595327 Different determination of Number Range intervalSD Document Number Range Enhancements6/19/2005 Page4of18 Technical Solution GuideCopyright 2005 The Smith Consulting Group, Inc. All Rights Document Number Range ObjectFor Sales and Distribution documents, the Number Range objectused is Range objects can be viewed and maintained using transaction Document Number Range Enhancements6/19/2005 Page5of18 Technical Solution GuideCopyright 2005 The Smith Consulting Group, Inc. All Rights Document Number is defined as a ten byte, character Document Number Range Enhancements6/19/2005 Page6of18 Technical Solution GuideCopyright 2005 The Smith Consulting Group, Inc.

4 All Rights NRIVN umber Range IntervalsTable NRIV contains the actual Number Range intervalsSD Document Number Range Enhancements6/19/2005 Page7of18 Technical Solution GuideCopyright 2005 The Smith Consulting Group, Inc. All Rights Intervals to SD Document TypesNumber Range intervals are assigned to specific sales and distribution Document types viadocument type configuration. There are several transactions related to Document typesdepending on the area of SD. The following example is used to maintain sales VOV8 Transaction VOV8 is used to maintain sales order types. In this example, two numberrange intervals are assigned. One is for internal Number assignment and the other forexternal Document Number Range Enhancements6/19/2005 Page8of18 Technical Solution GuideCopyright 2005 The Smith Consulting Group, Inc.

5 All Rights Number DomainThe following screen displays the sales and distribution Number domain (VBELN).VBELN is assigned to the table fields for several types of SD documents, however, thereare other domains used. For example, shipment Document numbers use the domainTKNUM. All Document Number domains specify the standard R/3 conversion routineALPHA. The ALPHA routine zero fills the field on input and removes leading zeros Document Number Range Enhancements6/19/2005 Page9of18 Technical Solution GuideCopyright 2005 The Smith Consulting Group, Inc. All Rights Group ALFAThe ALPHA conversion exit function modules are contained in function group each conversion exit defined, there are two function modules.

6 One function is forinput and, the other is for output. SAP has a standard naming convention for thesefunctions. It consists of a prefix, the conversion routine name and a suffix as follows: CONVERION_EXIT_ + Conversion routine name + _INPUT CONVERION_EXIT_ + Conversion routine name + _OUTPUT The two conversion exits are the only functions that exist in this function group. Theycall a lower level function to either zero fill or strip leading zeros from the field functions are used throughout the system and they can t be Document Number Range Enhancements6/19/2005 Page10of18 Technical Solution GuideCopyright 2005 The Smith Consulting Group, Inc.

7 All Rights Range Assignment User Exit ExampleThe following example demonstrates how to implement a Number Range user RequirementThe customer does business in Mexico. Mexican law requires that all invoices must beconsecutively numbered without gaps in the numbers. In standard R/3, the Number rangeintervals for billing documentsare assigned by billing type. The same billing type (F2) isused across multiple sales organizations and therefore, across multiple solve this problem, we will add logic to override the Number Range interval used tocreate billing documents for Mexico. Instead of the standard interval, an interval that isonly for Mexican invoices will be used.

8 This will ensure that all billing documents are insequence with no gaps in the numbers. This logic will be added to formUSEREXIT_NUMBER_RANGE in the billing function group V60A. We will not hardcode any logic, so a custom configuration table will be built to drive the user Document Number Range Enhancements6/19/2005 Page11of18 Technical Solution GuideCopyright 2005 The Smith Consulting Group, Inc. All Rights 1 Build the Custom Configuration TableThe user exit logic will determine if the Number Range interval is tobe changes based onthe sales organization and billing type. The following custom configuration table is builtto handle this Document Number Range Enhancements6/19/2005 Page12of18 Technical Solution GuideCopyright 2005 The Smith Consulting Group, Inc.

9 All Rights 2 Add Entries to the Configuration TableIn this case, sales organization 3000 is for Mexico. There will two intervals used forMexican invoices, one for outbound billing types (F1, F2, etc.) and another for Document Number Range Enhancements6/19/2005 Page13of18 Technical Solution GuideCopyright 2005 The Smith Consulting Group, Inc. All Rights 3 Code the User ExitIn form USEREXIT_NUMBER_RANGE, we add logic to read the custom configurationtable. If a record is found, the standard Number Range interval determined by the billingtype configuration is Document Number Range Enhancements6/19/2005 Page14of18 Technical Solution GuideCopyright 2005 The Smith Consulting Group, Inc.

10 All Rights 4 Test the RoutineThe logic is ready for testing. In the following screen, we can see that an F2 normallyuses interval Document Number Range Enhancements6/19/2005 Page15of18 Technical Solution GuideCopyright 2005 The Smith Consulting Group, Inc. All Rights is a snap shot of the Number Range intervals prior to our test. Notice that interval30 specifies Document numbers in the Range 99000000 to Document Number Range Enhancements6/19/2005 Page16of18 Technical Solution GuideCopyright 2005 The Smith Consulting Group, Inc. All Rights the Billing Due List (Transaction VF04), we have selected two Mexicandeliveries (sales org 3000) and three US Document Number Range Enhancements6/19/2005 Page17of18 Technical Solution GuideCopyright 2005 The Smith Consulting Group, Inc.


Related search queries