12
SAP SD ENHENCEMENTS By Sundara Rami Reddy Number Range Setting and Enhancement for Sales Order, Billing, Deliveries and Shipment - Part I Part II: Number range definition for Sales Order, Billing, Delivery and Shipment and User-exit enhance sap standard functionality. Number range in SAP is used to across modules to automatically number documents as and when they are created. Number range contains one or more intervals, each one of them define range of number and stores current value of counter. Each range is assigned or used to number a specific type of document for example a Sales Order, Deliveries, Billing document and so on. When these documents are create SAP reads assigned number range object and interval to get current value of counter, which is then assigned to the new document, and then counter is increased by one. This way documents created are always in sequence, except when number range is buffered where gaps can occur. Refer SAP Help for more detail. Number range objects are maintained using transaction SNRO. Intervals can be marked as 'external'. External number range intervals only contains interval, it does not maintain the current value. External number ranges are used to validate number. For example, if user chooses to enter Sales Order number, it will be then validated against an external number range. As users are free to enter any number within range there is no point in maintaining current value. Number ranges intervals are assigned to documents type in SPRO. Two or more documents type can be assigned to same number range interval. Below are the settings in SPRO where number range intervals are assigned to Sales Order, Billing, Deliveries and Shipment. Sales Order

Sap Sd Enhencements

Embed Size (px)

DESCRIPTION

Sap Sd Enhencements

Citation preview

SAP SD ENHENCEMENTS

By Sundara Rami Reddy

Number Range Setting and Enhancement for Sales Order, Billing, Deliveries and Shipment - Part IPart II: Number range definition for Sales Order, Billing, Delivery and Shipment and User-exit enhance sap standard functionality. 

Number range in SAP is used to across modules to automatically number documents as and when they are created. Number range contains one or more intervals, each one of them define range of number and stores current value of counter. Each range is assigned or used to number a specific type of document for example a Sales Order, Deliveries, Billing document and so on. When these documents are create SAP reads assigned number range object and interval to get current value of counter, which is then assigned to the new document, and then counter is increased by one. This way documents created are always in sequence, except when number range is buffered where gaps can occur. Refer SAP Help for more detail.

Number range objects are maintained using transaction SNRO. Intervals can be marked as 'external'. External number range intervals only contains interval, it does not maintain the current value. External number ranges are used to validate number. For example, if user chooses to enter Sales Order number, it will be then validated against an external number range. As users are free to enter any number within range there is no point in maintaining current value.

Number ranges intervals are assigned to documents type in SPRO. Two or more documents type can be assigned to same number range interval. Below are the settings in SPRO where number range intervals are assigned to Sales Order, Billing, Deliveries and Shipment.

Sales Order

Billing/Invoice

Delivery

Shipment

Number Range Setting and Enhancement for Sales Order, Billing, Deliveries and Shipment - Part IIPart I: Number Range Explained, Number range config for Sales Order, Billing, Delivery and Shipment

Number range object for Sales Order, Billing and Deliveries is RV_BELEG. You can either uses transaction SNRO with this object name RV_BELEG or use special transaction created for this number range object, which is VN01.

Number Range Object for Shipment is RV_TRANSPO, which you can see in SNRO transaction or use special transaction VN07.

Configuration of Number range in SAP is can be only done on document types. This poses limitation that one can only have sequential number based on document types. In case these is a legal requirement to maintain sequential number of documents based on other parameters for example customer or country then this cannot be achieved using SAP standard configuration and needs enhancements. Fortunately, SAP has provides exits specifically for this purpose.Enhancement

Sales Order

Maine Program: SAPMV45AInclude: MV45AFZZ

*---------------------------------------------------------------------** FORM USEREXIT_NUMBER_RANGE **---------------------------------------------------------------------** This userexit can be used to determine the numberranges for ** the internal document number. ** ** US_RANGE_INTERN - internal number range ** ** This form is called from form BELEG_SICHERN ** **---------------------------------------------------------------------*FORM USEREXIT_NUMBER_RANGE USING US_RANGE_INTERN. * Example: Numer range from TVAK like in standard* US_RANGE_INTERN = TVAK-NUMKI. ENDFORM. "USEREXIT_NUMBER_RANGE

Billing

Function Group: V60AInclude: RV60AFZZ

*---------------------------------------------------------------------** FORM USEREXIT_NUMBER_RANGE **---------------------------------------------------------------------** This userexit can be used to determine the numberranges for ** the internal document number. ** US_RANGE_INTERN - internal number range ** This form is called from form LV60AU02 **---------------------------------------------------------------------*FORM USEREXIT_NUMBER_RANGE USING US_RANGE_INTERN. * Example: Number range from TVFK like in standard* US_RANGE_INTERN = TVFK-NUMKI. ENDFORM.

Deliveries

Main program: SAPMV50AInclude: MV50AFZ1

*---------------------------------------------------------------------** FORM USEREXIT_NUMBER_RANGE **---------------------------------------------------------------------** This userexit can be used to determine the numberranges for ** the internal document number. ** ** US_RANGE_INTERN - internal number range ** ** This form is called from form BELEG_SICHERN ** **---------------------------------------------------------------------*FORM USEREXIT_NUMBER_RANGE USING US_RANGE_INTERN. * Example: Numer range from TVLK like in standard

* US_RANGE_INTERN = TVLK-NUMKI. ENDFORM.

Shipment

Enhacement: V56UNUMB Shipment number allocation EXIT_SAPLV56U_003

Defining new TEXT ID for Sales Order - Sales Order Header TextLately, I got requirement to hold a piece of data coming with customer order and pass it on the same piece of info to customer with corresponding Invoice. I identified TEXT ID to be best place to hold this information as it would not require any ABAP changes as long as data is filled in the right segment from EDI subsystem. Additionally text determination can be configured to transfer the TEXT ID from Sales Order to Invoice and then it will automatically create Invoice IDoc with required value in TEXT ID.

As the existing TEXT IDs were already in use for other purposes it would be wise to create a new TEXT ID for Sales order and Invoice for this purpose.

Below procedure can be used to add new TEXT ID in all Sales document .i.e. Customer, Info rec, Sales order, Delivery etc.

Step 1: Define TEXT ID

Follow path Sales and Distribution->Basic Functions->Text Control->Define Text Types

Add new TEXT ID and description, and Save data.

Step 2 : Find correct ‘Text determination procedure’

TEXT IDs are grouped under ‘Text determination procedure’ and ‘Text determination procedure’ is assigned to sales document type. You need to find first what ‘Text determination procedure’ is used by your sales document type. To find out double click on ‘Text procedure assignment’ and note the ‘Text determination procedure’ assigned to Order type OR (assuming you are using this order type). 

Step 3: Add TEXT ID to ‘Textprocedure’Now double click on ‘Textprocedure’, highlight line ‘01’ then double click on ‘Text ID’s in textprocedure.

Add new TEXT ID here on the table.

That’s it, if you now create sales order of type OR you will find new text ‘GLN Number’ in header text tab.

VAT Code Change (UK)

In UK VAT is changing from 17.5% to 20% effective from 4th Jan 2011, first working day of the Year. Following are the changes required in our SAP system. The steps are not exclusive for every SAP implementation but will give you an idea where to start from. To start with, existing VAT code were kept unchanged and new VAT code are created by copying them and changing the rates. Once these code are transported to production system you need to set condition and change VAT code in documents like scheduling agreement, purchase info records, purchase order, sales orders etc.

1. Copy existing VAT code into new codes, and change the rate using transaction FTXP. Note that system will not prompt for transport.

2. Adding VAT code in transport.

Create transport and add new tax codes in transport.In transaction SE10 release the task and transport. Before releasing, make sure all tax codes are there in transport by expanding the task node of transport.

3. Import transport in target system.

Import transport in target system using STMS. Note that just by importing transport tax rate will not be imported in target system as tax rates are stores in conditional tables and which can be transported because of number assignment (KONH-KNUMH and KONP-KNUMH) which is sequential numbers

Next step will create condition records.Again go to transaction FTXP and choose Transport->Import.

If Import option is disable then change setting in SCC4 to 'Change w/o automatic recording, no transport allowed'

In import option input transport number and country as GB. This executes transaction FTXP in BDC each tax code. You can check status in SM35. 4. In VK12 for condition MWST change the valid to date of existing VAT code until 3rd Jan 2011 and add a line for new VAT code starting from 4th Jan 2011. As the condition table works on Validity dates this cab be done earliest convenience to avoid problems during the New Year.

5. Use program RM06ENMW to mass update Purchasing Documents e.g. Purchase Order, Scheduling Agreement. 

6. Use program RM06IMWS to mass update Purchase Info Record.

Best way is to schedule a background job to execute on 4th Jan early morning for RM06ENMW and RM06IMWS .

7. Open Sales orders with delivery date after 3rd Jan should repriced for new VAT code.

8. Ensure new VAT codes are entered for the determination of the tax code (configuration). Transaction OBCD - EDI: Conversion of External Tax Rate <-> Tax Code

Further reading:Note 117983 - Change of tax on sales/purchases (w/o tax jur.code)Note 96389 - Chng cntrl rcrd for MM-PUR: purchasing info recordNote 97144 - Change tax rate for MM-PUR: Purchasing documents