You are on page 1of 23

Scheme Type Scheme Number Scheme Description Scheme Basis Valid from Valid to

Scheme Base
Will be like
Scheme description as Order, Billing,
per scheme number Payment as
Scheme Type Scheme Number enterred by user selected during Scheme Scheme
Like Article, generated after during scheme scheme Valid from Valid to
Amount Scheme Creation creation creation date date
Points
1- Each linear scheme should be exclude from main scheme traget and achievement
2- Article related scheme or Amount Related scheme Both cannot be created in same validity period against which one schem
Relavent for secondary Sale Customer number Customer Name Customer Region Partner Role

Pass Customer
Number into KNA1-
KUNNR and pick
REGIO than pass
REGIO, SPRAS
(Language) = EN,
Customer Numbers Pass customer LAND1 (Country)= Partner Role
as per scheme number into IN in Table T005U selected by
master app except KNA1-KUNNR and Pick BEZEI user during
Yes/NO as per check box 'Excluded than Pick NAME1 (Region scheme
selection in scheme master customers' and NAME2 Description) creation
validity period against which one scheme is already exist.
Total Target
Quantity Amount

~If Scheme Type is Article than ~If Scheme Type is Amount than
Case1- Total Prerequisite quantity enterred case 1- Total Prerequisite Target amount
(When case2 and Case3 not found) enterred (When case2 and Case3 not found)

Case 2-To calculate Last Year Percentage- Case 2-To calculate Last Year Percentage-
First get last year material Quantity by First get last year material amount by Passing
Passing customer Number into VBRK-KUNAG, customer Number into VBRK-KUNAG, get
get Valid from and Valid To date of scheme Valid from and Valid To date of scheme
number and Convert/change year to previous number and Convert/change year to
year metioned in both dates than pass new previous year metioned in both dates than
dates to VBRK-ERDAT by filtering, Now check pass new dates to VBRK-ERDAT by filtering,
FKSTO is Blank, VBTYP is M, pick All VBELN, Now check FKSTO is Blank, VBTYP is M, pick
than pass all VBELN into VBRP-VBELN and All VBELN, than pass all VBELN into VBRP-
pass Material number enterred in this VBELN and pass Material number enterred in
scheme number into VBRP-MATNR and pick this scheme number into VBRP-MATNR and
all FKIMG and Sum pick all NETWR and Sum
Now calculate Formula = last year material Now calculate Formula = last year material
quantity + last year material quantity multiply Amount + last year material Amount multiply
by Last year Percentage enterred in scheme by Last year Percentage enterred in scheme
creation Devide by 100 creation Devide by 100

Case3- Last year Fixed = Last year material Case3- Last year Fixed = Last year material
quantity as above + Last year fixed entered in amount as above + Last year fixed entered in
scheme creation scheme creation
Last Year return are excluded from calculating achievement
Qty

A)- When Scheme Type is Quantity based and Scheme bases is Order -
Calculate Order quantity- Pass customer Number and Valid from and Valid to date into VBAK-KUNNR and ERDAT, check VBTYP
pass Material number from scheme number into VBAP-MATNR, check ABGRU is blank than Pick all KWMENG and Sum
Now Calculate Return quantity - Pass all above VBAP-VBELN (Which got after passing MATNR) into VBRP-AUBEL and get all VB
FKSTO is blank than pick all VBELN pass to VBAK-XBLNR check VBTYP is H than pick all VBELN and Pass to VBRP-AUBEL and get
check FKSTO is Blank get all VBELN and pass to VBRP-VBELN and get all FKIMG and sum
Now calculate Order quantity minus Return Quantity and show remaining quantity

B)- When Scheme type is quantity and Scheme Bases is Billing


Calculate Billing Quantity - pass customer number and valid from and valid to dates into VBRK-KUNAG and ERDAT than check
all VBELN into VBRP-VBELN and pass material number from scheme number to VBRP-MATNR, than pick FKIMG and sum,
Now Calculate Return quantity - Pass all above VBRP-VBELN (Which got after passing MATNR) into VBAK-XBLNR than check VB
material Number as per scheme number in MATNR and get all VBELN and pass them to VBRK-VBELN check FKSTO is blank now
Now Calculate Billing quantity minus Return Quantity than show remaining quantity

C)- When Scheme Type is quantity and bases is Payment -


Get Payment quantity- pass customer number and valid from and valid to dates into VBRK-KUNAG and ERDAT than check VBT
BELNR and than pass all VBELN into VBRP-VBELN and pass all material number from scheme number to VBRP-MATNR, pick all
and now pick all VBRP-VBELN and pick all VBRK- BUKRS, GJAHR than pass to BKPF (VBELN to AWKEY), and Pick all BUKRS, BELN
BUKRS, BELNR, GJAHR, Customer number as KUNNR, BUDAT, AUGDT(Scheme Valid from and Valid to dates) into BSAD table, i
Now Match BELNR of VBELN who are fully cleared with upper mentioned temparory table than get all FKIMG and Sum.
Get Return Quantity :- pass all above VBRP- VBELN into VBAK-XBLNR than check VBTYP is H and get all VBELN now pass into V
VBRP-MATNR and get all VBELN and pass them to VBRK-VBELN check FKSTO is blank now get all VBELN and pass to VBRP-VBEL
Now Calculate Payment Quantity minus Return Quantity than show remaining quantity
In Payment Case- When customer made payment more than target qty in case Billing qty is more than Target qty and made pa
than above logic cant work
vement as On date
Amount

A)- When Scheme Type is Amount based and Scheme bases is Order -
Calculate Order Amount- Pass customer Number and Valid from and Valid to date into VBAK-KUNNR and ERDAT, check VBTYP
VBAP-VBELN and pass Material number from scheme number into VBAP-MATNR, check ABGRU is blank than Pick all NETWR a
Now Calculate Return Amount - Pass all above VBAP-VBELN (Which got after passing MATNR) into VBRP-AUBEL and get all VB
VBTYP is M and FKSTO is blank than pick all VBELN pass to VBAK-XBLNR check VBTYP is H than pick all VBELN and Pass to VBRP
these VBELN into VBRK-VBELN and check FKSTO is Blank get all VBELN and pass to VBRP-VBELN and get all NETWR and sum
Now calculate Order Amount minus Return Amount and show remaining Amount

B)- When Scheme type is Amount and Scheme Bases is Billing


Calculate Billing Amount - pass customer number and valid from and valid to dates into VBRK-KUNAG and ERDAT than check V
VBELN and than pass all VBELN into VBRP-VBELN and pass material number from scheme number to VBRP-MATNR, than pick N
Now Calculate Return Amount - Pass all above VBRP-VBELN (Which got after passing MATNR) into VBAK-XBLNR than check VB
VBRP-AUBEL, Check material Number as per scheme number in MATNR and get all VBELN and pass them to VBRK-VBELN chec
VBRP-VBELN and get all NETWR and sum
Now Calculate Billing Amount minus Return Amount than show remaining Amount

C)- When Scheme Type is Amount and bases is Payment


Get Payment Amount- pass customer number and valid from and valid to dates into VBRK-KUNAG and ERDAT than check VBT
BUKRS, GJAHR, BELNR and than pass all VBELN into VBRP-VBELN and pass all material number from scheme number to VBRP-M
and now pick all VBRP-VBELN and pick all VBRK- BUKRS, GJAHR than pass to BKPF (VBELN to AWKEY), and Pick all BUKRS, BELN
BLART than pass BUKRS, BELNR, GJAHR, Customer number as KUNNR, BUDAT, AUGDT(Scheme Valid from and Valid to dates) i
than its fully cleared.
Now Match BELNR of VBELN who are fully cleared with upper mentioned temparory table than get all FKIMG and Sum.
Get Return Amount :- pass all above VBRP-VBELN into VBAK-XBLNR than check VBTYP is H and get all VBELN now pass into VB
number in VBRP-MATNR and get all VBELN and pass them to VBRK-VBELN check FKSTO is blank now get all NETWR and sum
Now Calculate Payment Amount minus Return Amount than show remaining Amount
Return Total Achievement % Total required RunRate per da
Qty Amount Qty Amount Qty

First Check Reduce First Check Reduce


return from return from
achievement Check achievement Check
Box against This Box against This
scheme Number than scheme Number than
IF yes than follow IF yes than follow
below else ignore below else ignore Total target
below ---When Scheme below---When scheme Quantity
Type is Quantity than Type is Amount than Minus Total
Pass Customer number Pass Customer number Achievement
and Valid from and and Valid from and Quantity
Valid to dates in VBAK- Valid to dates in VBAK- Divide by
KUNNR and ERDAT, KUNNR and ERDAT, As per Scheme number of
check VBTYP is H than check VBTYP is H than Type, days
pick all VBELN and pass pick all VBELN and pass ~If Scheme Type remaining till
to VBAP-VBELN and to VBAP-VBELN and is Article than As per scheme Type Valid to date
pass scheme material pass scheme material Total ~If Scheme Type is from today
to VBAP_MATNR and to VBAP_MATNR and Achivement- Amount than Total date (i.e
check ABGRU is Blank check ABGRU is Blank quantity divide Achivement -amount Report
than pick all KWMENG than pick all NETWR by Total target divide by Total Target generating
and sum and sum quantity * 100 Amount * 100 date)
Total required RunRate per day Eligible Payout Payout Details
Amount

YES/NO

Show Yes/No
A)- When Scheme is relevant for Secondary sale than
User will manually qualify the customer than it will
show scheme achieved=YES, Else NO

B)- When Total Target Quantity/Amount is belogs to


Case2 and Case 3 mentioned in target logic than it will
check for Prerequisite Quantity/Amount will be
treated as Total Target Quantity/Amount With
respect to Scheme Type Quantity/Amount has been
either equal to or less than to Total Achievement with
respect to quantity and amount as per scheme type
Means customer qualify the scheme = Yes, Else NO

C)- When Total Target belongs to Case1 mentioned in


target logic, With respect to scheme type
Quantity/Amount has been either equal to or less
than to Total Achievement with respect to quantity Show all Pay
Total target Amount Minus and amount as per scheme type Means customer outs mentioned
Total Achievement Amount qualify the scheme, Else NO for this scheme
Divide by number of days number under
remaining till Valid to date So when Yes comes than user can click upon Yes and Main scheme
from today date (i.e Report it will show all eligible scheme Pay outs referring and show all
generating date) scheme number payouts as text
Linearity Type Linearity Valid From Linearity Valid To Linearity Quantity target UoM
From To

This Coulmn
will be the
basis for
showing
line items

Unit
of
meas
ure
select
ed by
user
durin
g
linear
sche
All Linearity Linear me
Types Created Scheme - creati
against this FROM Linear Scheme - on
scheme number Linearity Valid To - Target TO Target under
mentioned in Linearity Valid From- - under scheme Quantity as Quantity as per main
linear scheme under scheme number number for same per scheme scheme Type- sche
tab for same linearity type linearity type Type-Article Amount me
Linearity Qty Achievement

A)- When Scheme Type is Quantity based and Scheme bases is Order -
Calculate Order quantity- Pass customer Number and Linearity Valid from and Valid to date into VBAK-KUNNR and ERDAT, che
Sum
Now Calculate Return quantity - Pass all above VBAP-VBELN (Which got after passing MATNR) into VBRP-AUBEL and get all VB
VBRP-VBELN and than pass these VBELN into VBRK-VBELN and check FKSTO is Blank get all VBELN and pass to VBRP-VBELN an
Now calculate Order quantity minus Return Quantity and show remaining quantity

B)- When Scheme type is quantity and Scheme Bases is Billing


Calculate Billing Quantity - pass customer number and Linearity valid from and valid to dates into VBRK-KUNAG and ERDAT th
sum,
Now Calculate Return quantity - Pass all above VBRP-VBELN (Which got after passing MATNR) into VBAK-XBLNR than check VB
now get all VBELN and pass to VBRP-VBELN and get all FKIMG and sum
Now Calculate Billing quantity minus Return Quantity than show remaining quantity

C)- When Scheme Type is quantity and bases is Payment


Get Payment quantity- pass customer number and Linearity valid from and valid to dates into VBRK-KUNAG and ERDAT than c
MATNR, pick all VBELN, MATNR, FKIMG
and now pick all VBRP-VBELN and pick all VBRK- BUKRS, GJAHR than pass to BKPF (VBELN to AWKEY), and Pick all BUKRS, BELN
into BSAD table, if Record Appear against BELNR than its fully cleared.
Now Match BELNR of VBELN who are fully cleared with upper mentioned temparory table than get all FKIMG and Sum.
Get Return Quantity :- pass all above VBRP-VBELN into VBAK-XBLNR than check VBTYP is H and get all VBELN now pass into VB
and get all FKIMG and sum
Now Calculate Payment Quantity minus Return Quantity than show remaining quantity
Calculate Order quantity- Pass customer Number and Valid from and Valid to date into VBAK-KUNNR and ERDAT, check VBTYP
Now Calculate Return quantity - Pass all above VBAP-VBELN (Which got after passing MATNR) into VBRP-AUBEL and get all VB
Now calculate Order quantity minus Return Quantity and show remaining quantity
Lineartity Amount Target

Linear Scheme - FROM


Target Amount as per
scheme Type-Amount
and get all VBRP-VBELN and than pass these VBELN into VBRK-VBELN and check FKSTO is Blank get all VBELN and pass to VBRP-VBELN and
Lineartity Amount Achievement

A)- When Scheme Type is Amount based and Scheme bases is Order -
Calculate Order Amount- Pass customer Number and Linearity Valid from and Valid to date into VBAK-KUNNR and ERDAT, che
into VBAP-VBELN and pass Material number from scheme number into VBAP-MATNR, check ABGRU is blank than Pick all NETW
Now Calculate Return Amount - Pass all above VBAP-VBELN (Which got after passing MATNR) into VBRP-AUBEL and get all VB
M and FKSTO is blank than pick all VBELN pass to VBAK-XBLNR check VBTYP is H than pick all VBELN and Pass to VBRP-AUBEL a
VBRK-VBELN and check FKSTO is Blank get all VBELN and pass to VBRP-VBELN and get all NETWR and sum
Now calculate Order Amount minus Return Amount and show remaining Amount

B)- When Scheme type is Amount and Scheme Bases is Billing


Calculate Billing Amount - pass customer number and Linearity valid from and valid to dates into VBRK-KUNAG and ERDAT th
VBELN and than pass all VBELN into VBRP-VBELN and pass material number from scheme number to VBRP-MATNR, than pick N
Now Calculate Return Amount - Pass all above VBRP-VBELN (Which got after passing MATNR) into VBAK-XBLNR than check VB
AUBEL, Check material Number as per scheme number in MATNR and get all VBELN and pass them to VBRK-VBELN check FKST
and get all NETWR and sum
Now Calculate Billing Amount minus Return Amount than show remaining Amount

C)- When Scheme Type is Amount and bases is Payment


Get Payment Amount- pass customer number and Linearity valid from and valid to dates into VBRK-KUNAG and ERDAT than c
VBELN, BUKRS, GJAHR, BELNR and than pass all VBELN into VBRP-VBELN and pass all material number from scheme number to
and now pick all VBRP-VBELN and pick all VBRK- BUKRS, GJAHR than pass to BKPF (VBELN to AWKEY), and Pick all BUKRS, BELN
than pass BUKRS, BELNR, GJAHR, Customer number as KUNNR, BUDAT, AUGDT(Scheme Linearity Valid from and Linearity Vali
BELNR than its fully cleared.
Now Match BELNR of VBELN who are fully cleared with upper mentioned temparory table than get all FKIMG and Sum.
Get Return Amount :- pass all above VBRP-VBELN into VBAK-XBLNR than check VBTYP is H and get all VBELN now pass into VB
number in VBRP-MATNR and get all VBELN and pass them to VBRK-VBELN check FKSTO is blank now get all NETWR and sum
Now Calculate Payment Amount minus Return Amount than show remaining Amount
han pass these VBELN into VBRK-VBELN and check FKSTO is Blank get all VBELN and pass to VBRP-VBELN and get all FKIMG and sum
Return Percentage of Achievement (%) Required Run Rate per day
Qty Amount Quantity Amount Quantity Amount

When Scheme When scheme


Type is Type is
Quantity than Amount than
Pass Customer Pass Customer
number and number and
Linearity Valid Linearity Valid
from and Valid from and Valid
to dates in to dates in
VBAK-KUNNR VBAK-KUNNR
and ERDAT, and ERDAT,
check VBTYP is check VBTYP is Total target
H than pick all H than pick all Amount Minus
VBELN and VBELN and Total
pass to VBAP- pass to VBAP- As per Scheme Linear target Achievement
VBELN and VBELN and Type, Quantity Minus Amount Divide
pass scheme pass scheme ~If Scheme Type Linear by number of
material to material to is Article than Achievement days remaining
VBAP_MATNR VBAP_MATNR Linearity As per scheme Type Quantity Divide by till Valid to
and check and check quantity ~If Scheme Type is number of days date from
ABGRU is ABGRU is Achivement- Amount than Linear remaining till Valid today date (i.e
Blank than pick Blank than pick divide by Linear amount Achivement to date from today Report
all KWMENG all NETWR and target quantity * -divide by Linear date (i.e Report generating
and sum sum 100 Amount Target * 100 generating date) date)
As per Scheme
Type,
~If Scheme
Type is Article
than Total
Linearity
Target
enterred in
From quantity
divide by Total
Linearity
Achivement
quantity
~If Scheme
Type is
Amount than
Total Linearity
Target
enterred in
From Amount
divide by Total
Linearity
Achivement
Amount
Eligible Payout

Show Yes/No
A)- When Scheme is relevant for Secondary sale than
User will manually qualify the customer than it will
show scheme achieved=YES, Else NO

B)- When Total Linearity Target Quantity/Amount


belogs to Case2 and Case 3 mentioned in linearity
target logic than it will check for Prerequisite
Quantity/Amount will be treated as Linearity Target
Quantity/Amount With respect to Scheme Type
Quantity/Amount has been either equal to or less
than to Linearity Achievement with respect to
quantity and amount as per scheme type Than
customer qualify the scheme = Yes, Else NO

C)- When Linearity Target belongs to Case1


mentioned in linearity target logic, With respect to
scheme type Quantity/Amount has been either equal
to or less than to Total Achievement with respect to
quantity and amount as per scheme type Means
customer qualify the scheme, Else NO

So when Yes comes than user can click upon Yes and
it will show all eligible scheme Pay outs referring
scheme number
If Yes than Show all eligible scheme Pay outs
1 Sceheme Code
2 Date range
3 Customer
4 Material
5 SO Billing Payment
6 Region

Zones should be there instead of Region


1-Each
linear
2-
Composit
Selection Check Box e/total

You might also like