You are on page 1of 28

BNG in OTM

Click icon to add picture

Mr. Pratik Ravani


&
Mr. Harshad Sawant

global partner of
Your

first choice in Enterprise IT


and Manufacturing services
2013 KPIT Technologies Limited
Agenda
Business Number Generator
Business Number Rule
Business Number Type
Business Number Rule Definition
Global Arguments
Instructions
Business Number Context
Business Number Checksum Algorithm
Business Number Named Range
Reference Number as BNG

2
Business Number Generator ??

20130915-0001

3
Business Number Generator ??

TL - 01-Jan-2013 - 0001

Business Number Generator (BNG) automatically assigns serialized


business numbers to the respective Business Objects like Order release,
Order Base, Invoice, Voucher etc.

4
INVOICE BNG

S-20130831-0001
I-20130831-000001 E-20130831-000001
TL-01-Jan-2013-0001

5
Business Number Rule
Business Number Rule identifies the Business Number Type for which
serialized values will be generated by BNG. Each Business Number Rule
includes a Rule Definition, which specifies content and sequences of
generated numbers.

There can be only single default rule for each Business Number Type.

6
Business Number Type
Business Number Type is the basic building block, which links Business
Number Rule and Business Number Context.
Some of Default Business number types are:

FIELD BUSINESS NUMBER TYPE BUSINESS NUMBER CONTEXT


Order Release ID
(Standalone) ORDER_RELEASE_XID_STANDALONE ORDER_RELEASE_CONTEXT
Rate Offering ID RATE_OFFERING_XID RATE_OFFERING_CONTEXT

Location ID (via UI
or the Create
Location agent
action) LOCATION_XID_WITH_CORP CORPORATION CONTEXT

Order Release Line


ID
(created from Order
Base) ORDER_RELEASE_LINE_XID ORDER_RELEASE_CONTEXT

Shipment ID* SHIPMENT_XID (none)

7
Business Number Rule Definitions

Rule definitions contain the instructions that the Business Number Generator
(BNG) uses to create the sequence of numbers, letters, and other characters

Every rule definition consists of one or more instructions, which are set in
braces, { }
e.g. { dddddddd:id=1}-{nnnn:contexts=1:start=1}

Rule definition instructions have this basic structure and syntax: {sequence:
argument=value}
e.g. { nnnn:start=1000:end=4999}

8
Global Arguments
Padchar: Pads a sequence that is shorter than the specified length with
extra characters
e.g. { rrrr: xml=SERVPROV} truncates a Service Provider ID of
ACMEFREIGHT to generate the sequence ACME

Id: Identifies a sequence for reference and use in another instruction,


which usually contains a contexts or parent argument

Contexts: Relates a sequence to another sequence, which is identified by


an id argument, in another instruction
e.g. { dddddddd:id=1}-{nnnn:contexts=1:start=1}
20130915-0001, 20130915-0002, , 20130916-0001

9
Global Arguments
Parent: Relates a sequence to another sequence in another instruction as
a parent/child
When a parent sequence is recycled, so are its one or more child
sequences
e.g. { nnn: parent=charlie}-{nn: id=charlie:start=1} specifies 000-01, 000-
02, 000-03,..., 000-99, 001-01, 001-02, & so on

10
Instructions
Types of Instructions :

Alphabetic Instructions
Numeric Instructions
Date Instructions
Replacement Instructions
Cross Reference Instructions

Alphabetic Instructions : In Alphabetic instructions, each ASCII digit


is indicated by the letter "c.
Example 1 : {cc} specifies AA, AB, AC, BA, BB, BC,ZZetc
Example 2 : {c*:end=ZZZ} specifies A,B,C,,AA, AB, AC,,ZZ etc
Example 3 : {cc: fromChar=C} specifies CC, CD, CE,,DC, DDetc
Example 4 : {cc: to Char=C} specifies AA, AB, AC, BA, BB, BCetc

11
Instructions
Numeric Instructions : In Numeric instruction, each digit in a numeric
sequence is indicated by the letter "n".
Example 1 : {nnn} specifies 000,001,002,,999 etc
Example 2 : {nnn:start=1000} specifies 1000,1001,1002, etc
Example 3 : {nnn:end=4999} specifies 0000,0001,0002,,4999 etc
Date Instructions : In Date instructions, Date sequences are indicated by
the letter " d".
Example 1 : {d} specifies Day of the month (1,.,31).
Example 2 : {dd} specifies zero-padded day of the month (01,02.,31).
Example 3 : {dddd} specifies zero-padded month number, followed by
zero-padded day of the month (0101,0201.,1231).
Example 4 : {d*: picture=yy/MM/dd} generates 07/01/01,.etc
Example 5 : {d*: picture=MMM dd, yy} generates Jan 01 13etc
12
Instructions
Replacement Instructions : Replacement instructions specify rule
definitions that include data field values from specified business objects.

Example 1 : {r*: xml=SERVPROV}-{nnnn:start=1}


Example 2 : {r*: xml=REFNUM/PO}-{nnn:start=1}
Example 3 : {r*: xml=PARTY/BILL_TO: substring=5}-{nnn:start=1}
Example 4 : {r*: xml=SERVPROV: substring=0,5}-{nnn:start=1}

Cross-Reference Instructions : Cross-reference instructions specify


rule definitions that include other rule definition instructions and even
entire business number rules

Example : {x: primary={r*: xml=TYPE}-{r*: xml=PARTY/


ORDEROWNER}: alt={r*: xml=TYPE}:
default=SHP_GRP_DATE_RULE}
13
Business Number Context
A business number context contains information about a business object. It is
generally used when business number rule definition using replacement
instructions ({ r*: xml=value}).
BN context contains java class that accesses the replacement values.
Below are the some of the replacement values which can be accessed via Business
number contexts.
BUSINESS NUMBER
CONTEXT
REPLACEMENT VALUES OBJECT INFORMATION
INVOICE_CONTEXT INVOICE Invoice XID
INVOICE_NUMBER Invoice number
REFNUM/ Invoice reference number
ORDER_RELEASE_CONTEXT RELEASE Order release XID
Order release reference number
RELEASE_REFNUM/ given qualifier

SOURCE Order release source location XID


SHIPMENT_CONTEXT MODE Mode GID
PERSPECTIVE Perspective (B or S)
SERVPROV Service provider XID
SHIPMENT Shipment XID.

14
Business Number Checksum Algorithm

Business Number Generator generates base number (with the help


of Rule Definition {nnnn: id=1:start=1000}) and then checksum digit
of that base number gets calculated with the help of Checksum
Algorithm and appends to the base number (Syntax : Base Number
|| Checksum Digit).
Checksum Algorithm defines within the Business Number Rule.
The business number picture segment type, s" is used for
Checksum.
Segment s takes following arguments :
Arguments Explanations
ID of the checksum algorithm, as defined in table
algorithm = <name> bn_checksum_algorithm
Use certain context of the base number for checksum
algorithm_context = calculation. Use the whole base number if no context is
<id> specified
parameters =
<string> Free format text

15
Business Number Checksum Algorithm
Business Number Generator generates base number (with the help
of Rule Definition {nnnn: id=1:start=1000}) and then checksum digit
of that base number gets calculated with the help of Checksum
Algorithm and appends to the base number (Syntax : Base Number
|| Checksum Digit).
Checksum Algorithm defines within the Business Number Rule.
The business number picture segment type, s" is used for
Checksum.
Segment s takes following arguments :
Arguments Explanations
ID of the checksum algorithm, as defined in table
algorithm = <name> bn_checksum_algorithm
Use certain context of the base number for checksum
algorithm_context = calculation. Use the whole base number if no context is
<id> specified
parameters =
<string> Free format text

16
Business Number Checksum Algorithm
Example : We can have carrier with Bill of Lading number as follows :
BL-{nnnn:id=1:start=1000} -{s: algorithm=SIMPLE_MOD: parameters=-divisor
7:algorithm_context=1}
where BL :- BL is prefix.
nnnn :- pre assigned number.
s :- Checksum digit calcluated by OTM.
There are some public formulas for calculating checksum digits.
ROADWAY :- Divide base number by 11; subtract remainder
from 11 to get check digit. If the check digit is 10, use an X as
the check digit. If the check digit is 11, use 0 as the check digit.
SIMPLE_MOD - Divide base number by some divisor; use
modulus remainder as check digit.
Some of Business Numbers generated with the help of above
Rule Definition.
1) BL-1000-6 (6 is remainder when 1000 is divisible by 7)
2) BL-1001-0 (0 is remainder when 1001 is divisible by 7)
3) BL-1002-1 (1 is remainder when 1002 is divisible by 7)
17
Business Number Checksum Algorithm
Example : 1) Define Rule definition which contains checksum
algorithm(SIMPLE_MOD).

2) Select action as Test BN Rule.

18
Business Number Checksum Algorithm
3) Select and save Order.

4) BNG will generate ID as per rule.

19
Business Number Named Range
OTM can be configured to assign a range of pre assigned numbers
for business objects as well as reference numbers.
When named range is reference in rule definition, the current pre
assigned range of named range is used to generate complete
business number.
When all the numbers in the current range are used, it (named
range) is marked as closed and once it is closed it cant be
reopened. Range can also be manually closed using close range
action.
An optional back up business number rule may also be provided to
named range. It is used when all effective named range gets over.
If the remaining numbers in a named range fall below threshold, a
range depletion warning event is raised. Warning event has named
range as primary key and warning level as parameters. Warning
events for particular level can be raised one or more times as
specified.
20
Business Number Named Range
To use Business Number Named Range, we need to define :-
Business Number Type :- with Table name and Column name.
Business Number Rule :- Need to set up minimum two business
number rules.
The first rule should be default rule which specifies named
range in rule.
The second rule should be used in business number range and
not marked as the default rule.

21
Business Number Named Range
1) Create Business Number Type

2) Create Business Rule with above Business Type and Rule Definition

Note : Above rule should not be default. It will create BN number with date and two digits.
Eg. 15092013-01

22
Business Number Named Range
3) Create Business Number Named Range with above Business Number Rule.

4) Create Default Business Number Rule with reference of above Named


Range

5) Above rule will create Business Number with concatenation of Reference number and value of named
range.
23
Reference Number as BNG
Generate Reference number on objects with the help of BNG.
Create Automation Agent on object with required event.
Add Action as Generate Refnum .
Provide Refnum Qualifier against which we want to generate
Reference Number.
Provide BN Type.
1) Create Agent on object as Order and with event as Order Created.

24
Reference Number as BNG
2) Add Refnum Qualifier as CR and BN Type as
ORDER_RELEASE_XID_STANDALONE

3) Save action and finish agent.

25
Reference Number as BNG
4) Order without Reference Number

26
Reference Number as BNG
5) Order with Reference Number generated from BNG.

27
THANK YOU

2010 KPIT Cummins Infosystems Limited

You might also like