SD -- how to enhance the use of different number segments for the same class of warehouse picking ticket, sd -- warehouse picking

Source: Internet
Author: User

SD -- how to enhance the use of different number segments for the same class of warehouse picking ticket, sd -- warehouse picking

In a real business, a company has multiple sales organizations. They use the same warehouse picking type. Businesses often want the numbers of the warehouse picking orders they create to use different numbers. However, in sap, the outbound ticket number range is set in the outbound ticket type, that is, the same outbound ticket type is used, and the same number range is used. To meet the business needs, we can use enhanced implementation. For specific implementation, see the following steps:

Step 1: create multiple number segments:

Path: Spro-> Sales and Distribution-> Sales Documents ents-> Sales Document Header-> Define Number Ranges For Sales Documents ents

Or

Path: Spro-> Logistics Execution-> Shipping-> Deliveries-> Define Number Ranges for Deliveries

TCODE: VN01
 
Step 2: set the number range of the outbound ticket type

Path: Spro-> Logistics Execution-> Shipping-> Deliveries-> Define Delivery Types
TCODE: 0VLK
 

Step 3: Modify the SAP enhancement code

Modify the source code to control use different number range for different sale organiztion
3.1 you can use se38 to open source code MV50AFZ1 and find the form userexit_number_range.

*---------------------------------------------------------------------*
* FORM USEREXIT_NUMBER_RANGE *
*---------------------------------------------------------------------*
* This userexit can be used to determine the numberranges *
* 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.
* {INSERT devk941_2 1
DATA: z_werks TYPE lips-werks,
Z_vkorg TYPE likp-vkorg,
Z_nrnr TYPE nrnr,
Z_vbtyp TYPE likp-vbtyp.
DATA: wa_xlikp LIKE likpvb,
Wa_xlips LIKE lipsvb.
US_RANGE_INTERN = TVLK-NUMKI.
Data t (1 ).
T = TVLK-LFART (1 ).
If t = 'Z '.
Loop at xlikp INTO wa_xlikp.
Loop at xlips INTO wa_xlips.
CASE wa_xlikp-vbtyp.
When others.
MOVE: wa_xlikp-vbtyp TO z_vbtyp.
ENDCASE.
IF z_vbtyp EQ 'J' or "outbound del.
Z_vbtyp eq 'T'. "return del." V003
MOVE: wa_xlips-werks TO z_werks, "V002" SBr16072007
Wa_xlikp-vkorg TO z_vkorg.
ELSEIF z_vbtyp EQ '7'. "shipp. notification
MOVE: space TO z_vkorg,
Wa_xlips-werks TO z_werks.
ENDIF.
If z_vkorg = '123 '.
If z_vbtyp eq 'J '.
Case z_werks.
WHEN '000000 '.
US_RANGE_INTERN = 'd1 '.
WHEN '000000 '.
US_RANGE_INTERN = 'd2 '.
WHEN '000000 '.
US_RANGE_INTERN = 'd3 '.
WHEN '000000 '.
US_RANGE_INTERN = 'd4 '.
WHEN '000000 '.
US_RANGE_INTERN = 'd5 '.
Endcase.
Elseif z_vbtyp EQ 'T '.
Case z_werks.
WHEN '000000 '.
US_RANGE_INTERN = 'r1 '.
WHEN '000000 '.
US_RANGE_INTERN = 'r2 '.
WHEN '000000 '.
US_RANGE_INTERN = 'r3 '.
WHEN '000000 '.
US_RANGE_INTERN = 'r4 '.
WHEN '000000 '.
US_RANGE_INTERN = 'r5 '.
Endcase.
Endif.
Endif.
EXIT.
ENDLOOP.
EXIT.
ENDLOOP.
Endif.
*} INSERT

ENDFORM.

 

Related links:

How to control the use of multiple number ranges for the same order type

 

Copyright Disclaimer: This article is an original article by the blogger and cannot be reproduced without the permission of the blogger.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.