Technology Blogs by SAP
Learn how to extend and personalize SAP applications. Follow the SAP technology blog for insights into SAP BTP, ABAP, SAP Analytics Cloud, SAP HANA, and more.
cancel
Showing results for 
Search instead for 
Did you mean: 
chun_jiang
Advisor
Advisor

1. Introduction:


In this article, I will describe the way for serial number management. Basiclly, there are four variants. I would like to emphasis following two patterns. Both of them management S/N at Exteral System(e.g. Non-SAP) but in different way. I will focun on the differences on setting and operation.

  • SAP CorS Managed (External)

  • SAP CorS Tracked (with MD reference)


In addition, I will also introduce encoding/decoding Badi for well explain how S/N can be request from external and integration to CorS by utilizing customer own numbering rule.


 

2. Contents:


Pattern1. SAP CorS Managed (External)---Take SAP CorS as subordinate management system

  • Approach1: Request of Serial Numbers from Cors -> External

  • Approach2: Upload Serial Number from CorS directly


Pattern2. SAP CorS Tracked (with MD reference)---S/N is not management at SAP CorS, take CorS as S/N tracking system

  • Approach: Posting S/N with EPCIS event directly from using Warehouse Toolbox


 

3. SAP CorS Managed (External): 



Serial Number Request and Distribution | SAP Help Portal

Request Serial Numbers from an External System | SAP Help Portal

Upload Serial Numbers | SAP Help Portal

Serial Number Request Services | SAP Help Portal


ーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーー

●Approach1: Request of Serial Numbers from External -> CorS


ーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーー




■Operation  ※Take "List Managed S/N" as Example


1. <External>      Generate S/N at External System(e.g. 300 List Managed S/N)
2. <SAP CorS>   Request S/N from Cors -> External(e.g.10 List Managed S/N)   
Trcd:「/CORS/SNR_REQUEST - Request of Serial Numbers」
3. <External>      S/N will be sent from External -> CorS(e.g.10 List Managed S/N)

 =>As a result, CorS will recieve S/N and S/N Status:1-Create

4. <SAP CorS>   Encoding S/N for GTIN
Trcd: DataCockpit->Serial Numbers Node->Create Serial Number Request
BAdi here is possible.

=>As a result, S/N Status:2-Assign

5. <SAP CorS>   Decoding S/N for Serialization Object
Trcd:「/CORS/POSTEVENT - Post Manual Event 」or using Warehouse Toolbox.
BAdi here is possible.

=>As a result, S/N Status:3-Commission

 

■Setting


1. Set up Range Definition/Range (=Range Definition is must in this Pattern)

① Rng.Def.Origin.Ind=1(External)
② Ener External System Name into Range Definition Origin tab


2. Assign External Range to Product, Serial Number Management TypeE


3. Maintain External System Master


4. Set up Web Service Binding

-For SAP CorS system

Following SAP standard web service is used for external S/N request, which need to be setup by SOAMANAGER.

  • Service Definition: /CORS/SERIALNUMBERREQUEST

  • Consumer Proxy: /CORS/CO_SNR_REQUEST


You need to Import WSDL Binding in SAP CorS as well.

  • Go to SE80 -> Enterprise Services Browser

  • Select a package and right click to "Create a new object"

  • Select "Service Consumer"

  • Select "External WSDL"

  • Select "WSDL source"



-For external (e.g. Non-SAP) system

  • external(e.g. Non-SAP) system needs to facilitate a WebService binding for the SerialNumberRequest

  • The WebService binding includes the endpoint where SAP CorS will direct its S/N Request towards


-How to confirm what WSDL Binding at SAP CorS needed

  • Open Trcd-SOAMANAGER

  • Click「Web Service Configuration」 menu

  • Click and open Service: /CORS/SERIALNUMBERREQUEST

  • Click “Earth” mark and find「Binding WSDL Generation」tab

  • Execute「WSDL URL for Binding」button, then we will see the exact payload and well format WSDL, which contain the required S/N infromation CorS needed from External.


ーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーー

Approach2: Upload Serial Number from CorS directly


ーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーー

■Operation


1.  <SAP CorS>  Upload S/N
 Trcd:「/CORS/SNR_REQUEST - Request of Serial Numbers」

=>As a result, S/N Status:1-Create

2. <SAP CorS>   Encoding S/N for GTIN
 Trcd: DataCockpit->Serial Numbers Node->Create Serial Number Request

=>As a result, S/N Status:2-Assign 

3. <SAP CorS>  Decoding S/N for Serialization Object
 Trcd:「/CORS/POSTEVENT - Post Manual Event 」or using Warehouse Toolbox

=>As a result, S/N Status:3-Commission


■Setting


※Same with Approach1 and No need web service setting up.


 

■BAdi


For example, in case customer require EWM HU number to be used as a GRAI serial. GRAI serial number has a limit of 16 characters or less, EWM HU may have a lenth of more then 16 characters, in that case, a Badi implementation for encoding and decoding with customer own numbering logic is recommended.

Pre-requisite

Using Trcd: /CORS/C_OBJENCTYPE - Maintain Object and Encoding Types
①XXXXXX・・・Define Customer Z* Encoding Type
②XX・・・Define Customer Z* Object Type
③Assign①to②

Badi Enhancement Spot

Enhancement Spot: /CORS/ES_ID_ENC_DEC
BadI Definition: /CORS/BADI_ID_ENC_DEC
Interface: /CORS/IF_BADI_ID_ENC_DEC
Method: ENCODE or DECODE

Badi Sample


 

 

4. SAP CorS Tracked (with MD reference):


※Take "List Managed S/N" as Example

ーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーー

●Approach: Posting S/N with EPCIS event directly from using Warehouse Toolbox 


ーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーー

■Concept
1. Customer do not use CorS to manage S/N, Range/Range definition is not required.
Instead, "Serial Number Management Not Used" flag must be set on the detail tab of CorS product or BP master.

2. No need to request or upload external S/N from CorS.

3. It is possible to manage S/N events in CorS. S/N from an external system can be recorded directly and tracked within CorS by posting EPCIS event.

For information on how to post an EPCIS event, you can use Warehouse Toolbox(Trcd:/STTPEC/WHS) , which is always used for register EPCIS event that related to warehouse task, or you can directly register EPCIS event with manual posting.

The advantage of this pattern is that if S/N can be managed centrally in an external system, there is no need for double management within SAP CorS. We use SAP CorS only for tracking and tracing S/N by posting EPCIS event to a partical serialization object.


■Setting Up Point


1. Set up Serial Number Management Not Used” flag on the detail tab of CorS Product or BP Master.


2. Register EPCIS Event (Commission) by Warehouse Toolbox (Post Manual Event is also worked)


3. Here is the posting result at DataCockpit.


END.