You are on page 1of 28

OTC_FS_4.1.

3 ENH 1067_Discount Pool


Version 4.3

SAP
Functional Specification - Enhancement
OTC_FS_4.1.3_ENH1067_Discount Pool

Version: 4.3
Date: 01 Aug 2016

<Page 1 of 28>

This document is considered Mead Johnson Nutrition confidential and proprietary information. The information contained herein may not be
disclosed or distributed without Mead Johnson Nutrition prior written approval. Any person using a copy of this document is responsible for
ensuring that the copy is current.
OTC_FS_4.1.3_ENH 1067_Discount Pool
Version 4.3

Approval Page

Signature Role
27/10/16 16:59:49 +00:00 Author/Process Area OTC Support Team

X
V aradkar, V inay , Sr Solution A naly s t
I s ubmit f or approv al

01/11/16 16:11:37 +00:00 Reviewer/OTC Information Management (IM)


Solution Analyst

X
Maury a, V ikas , .
I approv e

01/11/16 17:49:17 +00:00 Approver/IM Technical Development Process


Lead

X
V enkates w arlu, A rjun , .
I approv e

01/11/16 17:13:36 +00:00 Approver/Global Process Owner – OTC

X
Wiandt, Walter , .
I approv e

Note: The eSignature timestamp is displayed as dd/mm/yy with Military time in UTC.

Page 2 of 28

This document is considered Mead Johnson Nutrition confidential and proprietary information. The information contained herein may not be
disclosed or distributed without Mead Johnson Nutrition prior written approval. Any person using a copy of this document is responsible for
ensuring that the copy is current.
OTC_FS_4.1.3_ENH 1067_Discount Pool
Version 4.3

Revision History
Version Summary of changes Revised By Date (DD-Mon-YYYY)
4.0 Initial Release CQ: MJNC00207486 Gopal Kolli 12-Dec-15
Build discount pool functionality to
aggregate credits for China Kirin.
4.1 MJNC00207486: Add table names and Gopal Kolli 01-Mar-16
additional details of discount pool logic.
4.2 MJNC00207486 - Changes added for Vinay Varadkar 08 Apr 2016
a. Discount pool accounting
b. Discount pool Program
c. Discount Pool report
4.3 MJNC00225340 – Accounting – Billing Vinay Varadkar 01 Aug 2016
Document Cancellation not posting to
Special GL

Page 3 of 28

This document is considered Mead Johnson Nutrition confidential and proprietary information. The information contained herein may not be
disclosed or distributed without Mead Johnson Nutrition prior written approval. Any person using a copy of this document is responsible for
ensuring that the copy is current.
OTC_FS_4.1.3_ENH 1067_Discount Pool
Version 4.3

Table of Contents

1. BUSINESS NEEDS & REQUIREMENTS ....................................................................... ERROR! BOOKMARK NOT DEFINED.


2. ASSUMPTIONS ............................................................................................................. ERROR! BOOKMARK NOT DEFINED.
3. FUNCTIONAL DETAILS ................................................................................................ ERROR! BOOKMARK NOT DEFINED.
4. SUGGESTED TECHNICAL DETAILS (OPTIONAL) ............................................................................................................... 19
4.1 CUSTOM TRANSACTION.................................................................................................................................................. 19
4.2 REQUIREMENT ROUTINE................................................................................................................................................. 20
4.3 BUSINESS TRANSACTION EVENT (IF ANY..) ................................................................................................................. 22
4.4 SUBSTITUTION ................................................................................................................................................................. 22
4.5 CUSTOM TABLES/STRUCTURE IN SAP .......................................................................................................................... 22
5. DATA SOURCE CONSIDERATION ....................................................................................................................................... 26
5.1 DATA VERIFICATION ........................................................................................................................................................ 26
6. ERROR HANDLING ............................................................................................................................................................... 27
6.1 ERROR MESSAGES .......................................................................................................................................................... 27
7. UNIT TESTING SCENARIOS ................................................................................................................................................. 27
8. ADDITIONAL INFORMATION ................................................................................................................................................ 28
9. ATTACHMENTS ..................................................................................................................................................................... 28

Page 4 of 28

This document is considered Mead Johnson Nutrition confidential and proprietary information. The information contained herein may not be
disclosed or distributed without Mead Johnson Nutrition prior written approval. Any person using a copy of this document is responsible for
ensuring that the copy is current.
OTC_FS_4.1.3_ENH 1067_Discount Pool
Version 4.3

AREA (SAP SYSTEM COMPONENTS): ECC


This enhancement will enable MJN, to build a discount pool with
Short description: Vistex claims, Sales return & credit memos and apply some portion
as discount on Distributors Sales.
Program Transaction code: YODISCPOOL
Complexity: High Medium Low
Volume of data: High
Mode: Online Background
Daily Weekly Monthly Biweekly
Frequency:
Others (Specify) :
Technical information:
UserExit BADI Requirement routine
1. Type of Enhancement
Custom transaction Business transaction
event
Substitution & Verification Others
Sap Std program modification

2.Module /Sub-module
Information
Module OTC Submodule Vistex

3. Data Object (Purchase


Sales Orders/Sales Returns/ Vistex claims/Credit Memos
order/sales order etc.)

4. Dependency on any object


OTC_PDD_4.1.3_150_R01
OTC_PDD_4.1.3_150_R02
OTC_PDD_4.1.3_150_R03
OTC_PDD_4.1.3_150_R04
PDD/Requirements Number OTC_PDD_4.1.3_150_R05
OTC_PDD_4.1.3_150_R06
OTC_PDD_4.1.3_150_R07
OTC_PDD_4.1.3_150_R08
OTC_PDD_4.1.3_150_R09

The following references are the current versions as of the date on the title page.

Reference
SAP System Overview
GL-IM-SOP-05433 Mead Johnson Nutrition System Development LifeCycle (SDLC)
OTC_PDD_4.1.3_Trade_Promotion_and_Execution

Page 5 of 28

This document is considered Mead Johnson Nutrition confidential and proprietary information. The information contained herein may not be
disclosed or distributed without Mead Johnson Nutrition prior written approval. Any person using a copy of this document is responsible for
ensuring that the copy is current.
OTC_FS_4.1.3_ENH 1067_Discount Pool
Version 4.3

2. Business Needs & Requirements


Business Needs and Requirements:
 There are four components to build the Discount pool: 1) Sales orders 2) Vistex Claims
3) Credit memo 4) Debit memo.
 Document Types which will augment the Discount pool are Vistex Trade Promotion
Claims ZT01, ZCR1 and ZCR2 sales documents. Discount pool is consumed by ZOR,
ZDR1 and ZDR2 sales documents.
 Two new tables will be created to capture all the additions to the discount pool and
consumptions from the pool. Also, a configurable Z-table will be created to maintain the
cross reference between source and target condition types.
 For Vistex credit memo, credits to discount pool have to be mapped from condition type
ZCCL. For credit/debit memo documents, condition types ZGM4, ZGM5, ZGM8 and
ZGM9 have to be considered.
 Discount pool balance will be consumed when a sales order is created. First, off invoice
discounts have to be applied, second the total free goods value (condition type Z100)
and then condition types ZA09 – Return, ZA18 – Rebates and ZA17 Promotion discount
in the same order.
 A new condition type ZMDS (Maximum allowable discount) will be configured and a
condition record with 30% is maintained.

***** Begin changes for FS version 4.2 - Discount Pool Accounting *****

Business Requirement:
Discount pool has 6 FI touch points:
3 in Vistex:
1. Expected Accrual ZT02
2. Actual Accrual ZT01
3. Actual Settlement ZT01
3 in SD
4. Credit Memo ZCR1
5. Debit Memo ZDR1
6. Standard Sales Order ZOR

Below are expected accounting entries for each of these points:

GL accounts
Discount pool steps Expected Accounting entry
Dr Cr
Additions to Discount pool
- Vistex ZT02 Expected Accrual Dr Expenses, Cr Provision 430070 232040
- Vistex ZT01 Actual Accrual Dr232040 Cr 232040 232040 232040
- Vistex ZT01 Settlement Dr232040 Cr 232040 232040 232070

- ZCR1 Credit Memo - ZGM4 Dr Provision, Cr Customer 232015 232070

Page 6 of 28

This document is considered Mead Johnson Nutrition confidential and proprietary information. The information contained herein may not be
disclosed or distributed without Mead Johnson Nutrition prior written approval. Any person using a copy of this document is responsible for
ensuring that the copy is current.
OTC_FS_4.1.3_ENH 1067_Discount Pool
Version 4.3

- ZCR1 Credit Memo - ZGM5 Dr Provision, Cr Customer 232020 232070


- ZCR1 Credit Memo - ZGM8 Dr Provision, Cr Customer 232020 232070
- ZCR1 Credit Memo - ZGM9 Dr Provision, Cr Customer 232040 232070
Withdrawals from Discount
pool
- ZDR1 Credit Memo - ZGM4 Cr Customer, Dr Provision 232070 232015
- ZDR1 Credit Memo - ZGM5 Cr Customer, Dr Provision 232070 232020
- ZDR1 Credit Memo - ZGM8 Cr Customer, Dr Provision 232070 232020
- ZDR1 Credit Memo - ZGM9 Cr Customer, Dr Provision 232070 232040
- ZOR Sales Order
- ZA09 – Manual Returns
Cr Customer, Dr Provision 232070 A/R 120000
Credit
- ZA18 – Manual Rebate Cr Customer, Dr Provision 232070 A/R 120000
- ZA17 – Manual Promotional
Cr Customer, Dr Provision 232070 A/R 120000
Discount

The highlighted cells show Special GL Indicator controlled Alternate Reconciliation account.
So, all these entries would be posted to the customer account and can be tracked using
Special GL indicators as mentioned below:

Condition Special GL GL
Type Indicator Account
ZA09 1 232070
ZA17 2 232070
ZA18 3 232070

***** End changes for FS version 4.2 - Discount Pool Accounting *****

***** Begin changes for CQ MJNC00225340 *****


MJNI583868 - While posting Billing document Cancellation, the Discount amounts are not
posting to special GL Accounts.

As per SAP reply, a Code change is needed as suggested in SAP note 1259505.

***** End changes for CQ MJNC00225340 *****

3. Assumptions
 Discount pool functionality is only applicable for China

Page 7 of 28

This document is considered Mead Johnson Nutrition confidential and proprietary information. The information contained herein may not be
disclosed or distributed without Mead Johnson Nutrition prior written approval. Any person using a copy of this document is responsible for
ensuring that the copy is current.
OTC_FS_4.1.3_ENH 1067_Discount Pool
Version 4.3

 All the calculations will be done at the sales order item level and the discount pool will be
refreshed whenever an order is changed. If there is any change from order to invoice, it
is assumed that business will update the sales order
 No maintenance view will be provided for YO1067_DP_SOURCE and
YO1067_DP_TARGET tables. All the additions and deletions have to be done by
creating a sales document or a claim.
 Once a credit memo/debit memo request is released (block is removed), discount pool is
updated. It is assumed that these documents will be released to accounting. Even
though debit/credit memo document is not billed, but released, amount is already added
to discount pool tables.
 Document types Sales order ZOR, Credit memo ZCR1, ZCR2, Debit memo ZDR1,
ZDR2 and Vistex claim type ZT01 are in scope.

4. Functional Details
 Create custom tables YO1067_DP_SOURCE to capture all the additions into the
discount pool and YO1067_DP_TARGET to capture all the consumptions from the
discount pool.
 An additional table YO1067_DP_GROUP will be created to maintain cross reference
between customer and a group id. This group ID, which is generated from a custom
number range will be used in source and target tables.

A configuration table (YO1067_DP_CONFIG) will be created to maintain the priority of


conditions to be applied on the sales order. Source document type refers to a claim or credit
memo and corresponding condition. Target condition type refers to the condition in sales order
which will be used to apply the discount pool condition. Below table can be extended for
additional order types as needed in future.

Source Document Source Condition


TargTy TrgCon S.Num Type Type
ZDR1 ZGM4 10 ZCR1 ZGM4
ZDR1 ZGM4 14 ZCR2 ZGM4
ZDR1 ZGM5 11 ZCR1 ZGM5
ZDR1 ZGM5 15 ZCR2 ZGM5
ZDR1 ZGM8 12 ZCR1 ZGM8
ZDR1 ZGM8 16 ZCR2 ZGM8
ZDR1 ZGM9 13 ZCR1 ZGM9
ZDR1 ZGM9 17 ZCR2 ZGM9
ZDR2 ZGM4 18 ZCR1 ZGM4
ZDR2 ZGM4 22 ZCR2 ZGM4
ZDR2 ZGM5 19 ZCR1 ZGM5
ZDR2 ZGM5 23 ZCR2 ZGM5
ZDR2 ZGM8 12 ZCR1 ZGM8
ZDR2 ZGM8 16 ZCR2 ZGM8
ZDR2 ZGM9 13 ZCR1 ZGM9
ZDR2 ZGM9 17 ZCR2 ZGM9
Page 8 of 28

This document is considered Mead Johnson Nutrition confidential and proprietary information. The information contained herein may not be
disclosed or distributed without Mead Johnson Nutrition prior written approval. Any person using a copy of this document is responsible for
ensuring that the copy is current.
OTC_FS_4.1.3_ENH 1067_Discount Pool
Version 4.3

ZOR ZA09 2 ZCR1 ZGM4


ZOR ZA09 6 ZCR2 ZGM4
ZOR ZA17 1 ZT01 ZCCL
ZOR ZA17 5 ZCR1 ZGM9
ZOR ZA17 9 ZCR2 ZGM9
ZOR ZA18 3 ZCR1 ZGM5
ZOR ZA18 4 ZCR1 ZGM8
ZOR ZA18 7 ZCR2 ZGM5
ZOR ZA18 8 ZCR2 ZGM8

Logic to augment the pool:

Claims
 When a Vistex claim is settled, logic has to be added in
YO_IRM_BADI_IPBBDOC~SETTLEMENT_CREATE to populate
YO1067_DP_SOURCE table. An entry will be created in the table
YO1067_DP_SOURCE with condition type ZCCL. Total amount that will be populated to
source table will be the net value (/IRM/IPBBHDR-NETWR).
 Discount pool is updated only for ZT01/CN01 claims.
 Validation is added so that claims for China cannot be reverse settled.

Credit memos:
 When a credit memo is created for CN01, an entry has to be logged to
YO1067_DP_SOURCE table. When this credit memo is changed or repriced, source
has to be updated with new values. Logic has to be written in sales order user exit to
update the table after releasing the order.
 Only after credit memo is released (VBAK-FAKSK is initial), then discount pool table has
to be updated. YO1067_DP_SOURCE table is updated with condition type ZGM4,
ZGM5, ZGM8 or ZGM9 depending on the condition type that is used in that particular
credit memo.

Debit memos:

 When a debit memo is created for CN01, an entry has to be logged to


YO1067_DP_TARGET table referring the source document from which the amount is
consumed. When this debit memo is changed or repriced, target has to be updated with
new values. Logic has to be written in sales order user exit to update the table after
releasing the order.
 Only after debit memo is released (VBAK-FAKSK is initial), then discount pool table has
to be updated. YO1067_DP_TARGET table is updated with condition type ZGM4,
ZGM5, ZGM8 or ZGM9 depending on the condition type that is used in that particular
credit memo.

Page 9 of 28

This document is considered Mead Johnson Nutrition confidential and proprietary information. The information contained herein may not be
disclosed or distributed without Mead Johnson Nutrition prior written approval. Any person using a copy of this document is responsible for
ensuring that the copy is current.
OTC_FS_4.1.3_ENH 1067_Discount Pool
Version 4.3

Sales orders:

 When a sales order is created, first maximum allowable discount is calculated in a


subtotal. ZMDS condition record * Gross price.
 Then off invoice discounts (subtotal: suppress discount) are reduced from maximum
allowable discount. Then free goods (z100) is reduced. If additional discounts can still be
applied, then discounts from discount pool are applied now.
 First ZA09 is applied and if additional discount can be applied then ZA18 is applied and
then ZA17.
 YO1067_DP_CONFIG table is used to maintain cross reference between source
condition types and target condition types. When the control is at ZA09, example, routine
has to look at YO1067_DP_CONFIG table to find our relevant source condition types.

 A calculation routine will be assigned to these three conditions ZA09, ZA18 and ZA17. In
the condition formula routine, for each condition type maximum allowable discount is
calculated and then validated from Z-tables if that discount is available in the pool
o When control comes to ZA09 in pricing procedure, total allowed discount (Max
allowed – Off invoice – Free goods) is calculated. If total allowed discount is
greater than discount in Z-tables, then the discount in Z-tables for ZA09 is
applied. If not, total allowed discount is applied and next two condition types
need not be executed.
o Similarly when control comes to ZA18, total allowed discount (Max allowed – Off
invoice – Free goods – ZA09) is calculated. Same logic as above is used to apply
discounts.
o When control comes to ZA17 total allowed discount (Max allowed – Off invoice –
Free goods – ZA09 – ZA17) is calculated

 After every change to the sales order, discount pool has to be recalculated and applied
correctly.

Below is an example for discount pool logic:

Maximum discount = Gross Price at header * Maximum Discount % from Additional Data
B at header
11,806.27 * .30 = 3541.88

Minus 1) off invoice discount condition records that applied = suppress discount
at header level = 690.40
Minus 2) free goods value = 1943.50
Minus 3) Discount pool in priority order – ZA09 (returns) = 10.00 - even though
shows as 8.25 here
and then ZA18 rebates = 30.00
and then ZA17 promotions = 20.00

Page 10 of 28

This document is considered Mead Johnson Nutrition confidential and proprietary information. The information contained herein may not be
disclosed or distributed without Mead Johnson Nutrition prior written approval. Any person using a copy of this document is responsible for
ensuring that the copy is current.
OTC_FS_4.1.3_ENH 1067_Discount Pool
Version 4.3

Reporting:

 Business needs a report with following fields as selection parameters.

Technical
Name Field Name Range O/M
VKORG Sales Org Range Mandatory
VTWEG Distribution Channel Range Mandatory
SPART Division Range Mandatory
ERDAT Created on Range Optional
KUNAG Sold-to party Range Mandatory
REGIO Region Range Optional
BZIRK Area (Sales district) Range Optional
AUART Document Type Range Optional
Page 11 of 28

This document is considered Mead Johnson Nutrition confidential and proprietary information. The information contained herein may not be
disclosed or distributed without Mead Johnson Nutrition prior written approval. Any person using a copy of this document is responsible for
ensuring that the copy is current.
OTC_FS_4.1.3_ENH 1067_Discount Pool
Version 4.3

Report output:

Description Field Table


Transaction ID SLNO Line Number
Date SY-DATUM SY-DATUM
Distributor Sold to KUNAG SOURCE Table
Distributor Name (SP) NAME1 KNA1-NAME1
Region REGIO KNA1-REGIO
Sales Org VKORG SOURCE Table
DC VTWEG SOURCE Table
DIV SPART SOURCE Table
Document Type AUART SOURCE Table
Document Number VBELN SOURCE Table
Activity ID XBLNR /IRM/GCRHDR
Activity Name ZUONR /IRM/GCRHDR
Tactic ID TACTIC /IRM/IPBBASP
Tactic Name DESCR /IRM/TIPATAC
Amount AMOUNT SOURCE Table
Currency WAERK SOURCE Table
Sales Order VBELN TARGET Table
PO Number BSTKD TARGET Table
Amount AMOUNT TARGET Table
Currency WAERK TARGET Table

***** Begin changes for FS version 4.2 - Discount Pool Report*****

Below new columns have been added to Discount pool report output.

Description Field Table


Source Acc Doc No. BKPF-BELNR BKPF
Target Acc Doc No. VBRK-VBELN VBRK
Source PO# BSTKD TARGET Table
Target PO# BSTKD TARGET Table

Page 12 of 28

This document is considered Mead Johnson Nutrition confidential and proprietary information. The information contained herein may not be
disclosed or distributed without Mead Johnson Nutrition prior written approval. Any person using a copy of this document is responsible for
ensuring that the copy is current.
OTC_FS_4.1.3_ENH 1067_Discount Pool
Version 4.3

Discount Pool
Report Output layout.xlsx

Changes done:

1. PO number population for Credit Memo & Debit Memo: Pick up value of BSTNK from
VBAK and populate it in this column.
2. Tactic id – It was populating Last 4 characters from XBLNR for IPNUM from
/IRM/GCRHDR: It should be picked up from agreement table /IRM/IPBBASP-TACTIC.
For this, get Agreement number from /IRM/GCRHDR – KNUMA-DET and pass it to
/IRM/IPBBASP.
3. Tactic description – From configuration table /IRM/TIPATAC - Picked from
/IRM/TIPATACT-DESCR for the TACTIC code from field TACTIC for language LANGU
= E.
4. Activity id – Display 1st 10 characters of /IRM/GCRHDR-XBLNR.
5. Activity description – Available from KONA-ABREX. For this, get Agreement number
from /IRM?GCRHDR – KNUMA-DET and pass it to table KONA.
6. Payment ID -- /IRM/GCRHDR-KIDNO: No change.

***** End changes for FS version 4.2 - Discount Pool Report*****

 This report will be used by the business to get information of all the debits and credits
that make up the discount pool.
 Each line item will only have either a debit or a credit in the report.
 Depending the data entered in the selection screen, all the entries are pulled from
YO1067_DP_SOURCE and YO1067_DP_TARGET tables and then additional entries
as explain below have to be populated for each line item.
o Sold to number is populated in the file and customer name has to be retrieved
from KNA1-NAME1 field.
o Region will be mapped from KNA1-REGIO.
o Sales org, DC, Division are mapped from sales document details.
o Columns F- R are populated for source documents and columns S-V are
populated for target documents.

Page 13 of 28

This document is considered Mead Johnson Nutrition confidential and proprietary information. The information contained herein may not be
disclosed or distributed without Mead Johnson Nutrition prior written approval. Any person using a copy of this document is responsible for
ensuring that the copy is current.
OTC_FS_4.1.3_ENH 1067_Discount Pool
Version 4.3

o Activity can be populated from /IRM/GCRHDR-TRACKCC_NUM (remove last 4


characters) and activity name from KONA-ABREX.
o Tactic and tactic id can be populated from /IRM/IPBBASP-TACTIC (Last 4
characters of XBLNR) and /IRM/TIPATAC-DESCR.
o Payment ID has to be populated from /IRM/GCRHDR-KIDNO.
o Source amounts and target amounts are mapped from YO1067_DP_SOURCE
and YO1067_DP_TARGET tables.
o If multiple documents use the same source document, then multiple entries will
be shown in the report for that source document.
o Target PO number has to be mapped from sales document PO number field.

Page 14 of 28

This document is considered Mead Johnson Nutrition confidential and proprietary information. The information contained herein may not be
disclosed or distributed without Mead Johnson Nutrition prior written approval. Any person using a copy of this document is responsible for
ensuring that the copy is current.
OTC_FS_4.1.3_ENH 1067_Discount Pool
Version 4.3

***** Begin changes for FS version 4.2 - Discount Pool Accounting *****

As per standard SAP, all these entries are posted to Regular Customer Reconciliation
account. But for Discount pool for China, it needs to be posted to Alternate Reconciliation
account.

New Custom table needs to be created which will hold below mentioned parameters based
on which Custom code will populate Necessary Posting Key and special GL Indicator in the
Accounting Interface ACCIT during run time.

Custom Table: YO1067_DP_GL_ACC

Current New Special


Sales Distribution Billing Condition
Division Posting Posting GL
Org channel type type
Key key Indicator
CN01 20 0 ZF2 ZA09 40 09 1
CN01 20 0 ZF2 ZA17 40 09 1
CN01 20 0 ZF2 ZA18 40 09 1
CN01 20 0 ZG3 11 19 1
CN01 20 0 ZL3 01 09 1
CN01 20 0 ZS1 50 19 1
CN01 20 0 ZS2 50 19 1

*This table should be maintainable through Transports as well as SM30 in each


environment.

A] Scenario set 1:

1. Vistex ZT01 Settlement


2. Credit memo ZDR1
3. Debit memo ZCR1

While creating Billing document through t-code VF01, the Custom code should read:
 Sales Org/Distribution channel/Division: VKORG/VTWEG/SPART
 Billing type : FKART and
 Current posting Key: BSCHL

 Then compare it with corresponding values maintained in above table.


 If scenario matches, the Current Posting key should be replaced with new Posting
key BSCHL and Special GL Indicator UMSKZ.
 The accounting entry will be posted further by Standard process.
 GL account on the other side of the Accounting entry shall be picked up from
standard VKOA settings.

B] For Standard Sales order ZOR scenario, the Discount GL account needs to be flipped to
Special GL account.

Page 15 of 28

This document is considered Mead Johnson Nutrition confidential and proprietary information. The information contained herein may not be
disclosed or distributed without Mead Johnson Nutrition prior written approval. Any person using a copy of this document is responsible for
ensuring that the copy is current.
OTC_FS_4.1.3_ENH 1067_Discount Pool
Version 4.3

Custom code should read:


 Sales Org/Distribution channel/Division: VKORG/VTWEG/SPART
 Billing type : FKART
 Condition type: KSCHL

 From only those lines where the KSCHL populated in structure is matching with the
table entry, code should check ‘Current posting Key: BSCHL’.
 If scenario matches, the Current Posting key should be replaced with new Posting
key BSCHL and Special GL Indicator UMSKZ.
 In addition to above,
 Remove the value of HKONT, before populating KUNNR.
 Populate Customer number: Pick the Sales Order number VBEL2 from the
structure. Pass it to table VBAK and pick corresponding value of KUNNR.
 GL accounts in other lines shall be picked up from standard VKOA settings.

***** End changes for FS version 4.2 - Discount Pool Accounting *****

***** Begin changes for FS version 4.2 - Discount Pool Program*****

1. Free goods Scenarios:


a. Condition ZMDS not getting Zeroed out – In UAT this issue was observed,
where when a Material is marked as Free goods by assigning Item category
ZTNN, condition ZMDS and discount conditions ZA09/18/17 were not getting
zeroed out. The amount was getting reduced from the Zero Net value and
creating a Negative Pricing and tax. A code is added to ignore these 4
conditions when the material Item category is ZTNN. Moreover, if ZR00 is
inactive, discount pool related conditions should be inactive.
b. Condition ZA15 and ZA16 are active for ZTNN materials: Due to this,
the Net amount was negative. A configuration fix was added, by adding these
two conditions to Condition Exclusion group ZA01.

2. If one Material is deleted from Sales order, the discount calculation becomes
incorrect: Addition of logic to re-price and re-distribute the Discount amount in Only
those Items which are active.

3. Wrong Tax base calculation:


Tax base is calculated by subtracting All Off invoice discounts and Discount pool
conditions ZA09/18/17 from Gross condition ZR00.
It needs to be ensured that going forward any new discount condition added in the
pricing will have an equal entry in the TVARVC variable
Z_1067_DP_DISCOUNT_COND_TYPE.

4. ZMDS added to Tax base calculation: Condition ZMDS is used only as a reference
for maximum allowed discount in any sales order. Its value is only for guidance and
should not be added to Tax base or Net value. This issue is handled using ‘condition
exclusion’ configuration.
The logic is: If ZR00 is active in pricing procedure, ZMDs would become inactive.
Page 16 of 28

This document is considered Mead Johnson Nutrition confidential and proprietary information. The information contained herein may not be
disclosed or distributed without Mead Johnson Nutrition prior written approval. Any person using a copy of this document is responsible for
ensuring that the copy is current.
OTC_FS_4.1.3_ENH 1067_Discount Pool
Version 4.3

5. New requirement: User should be able to maintain ZMDS condition at


header:
ZMDS is a line item condition because the usage of it is limited by maintaining access
sequence for China Sales areas. Its default value is 30%. But China users need to
maintain it at the header level whenever there is any occasional change in the
Discount percentage to be given to any specific customer.

For achieving this, a new header Condition ZMD1 is created which is editable at
header.

A requirement 916 is created and assigned to ZMDS.

Logic:
 If user enters value in ZMD1 condition, the routine 916 shall pick its % condition
value and overwrite ZMDS.
 If ZMD1 is blank, routine 916 will not trigger.

6. Warehouse Cut – Reason for Rejection :


The inactivation of Pricing procedure changes for each Reason for rejection. China
business uses two Reasons for rejections.
XX – Cancelled by Customer
DS – Discontinued Product
When these two reasons are added, the whole pricing procedure becomes inactive,
except ZMDs and ZA09/18/17. It also impacts the Discount pool calculation. The
ZMDs condition shows incorrect value.
a. A code needs to be added where if ZR00 condition is inactive ZMDs and
ZA09/18/17 should also become inactive.

Page 17 of 28

This document is considered Mead Johnson Nutrition confidential and proprietary information. The information contained herein may not be
disclosed or distributed without Mead Johnson Nutrition prior written approval. Any person using a copy of this document is responsible for
ensuring that the copy is current.
OTC_FS_4.1.3_ENH 1067_Discount Pool
Version 4.3

b. If there are multiple materials in a Sales order and one of them is marked
with Reason for rejection, the Distribution of Header ZMDS and ZA09/18/17
should ignore conditions in this material and allocate the whole amount in
remaining items.

***** End changes for FS version 4.2 - Discount Pool Program*****

***** Begin changes for CQ MJNC00225340 *****


MJNI583868 - While posting Billing document Cancellation, the Discount amounts are not
posting to special GL Accounts.

When the posted billing document is reversed using T-code VF11, the accounting entry gets
reversed. Ideally, it should pick up the Reversal Posting Keys from Standard SAP
configuration. So, for posting key 19, Reversal Posting key assigned is 09.

But system picks up Posting key 40 instead and posts with No Special GL Indicator. This is
causing incorrect accounting.

Reason being: The code gets triggered for SD Document Category VBTYP = M. It is not
getting triggered for Type N. In the standard code, any of the existing User exits for Billing
Page 18 of 28

This document is considered Mead Johnson Nutrition confidential and proprietary information. The information contained herein may not be
disclosed or distributed without Mead Johnson Nutrition prior written approval. Any person using a copy of this document is responsible for
ensuring that the copy is current.
OTC_FS_4.1.3_ENH 1067_Discount Pool
Version 4.3

document Cancellation VF11 is not getting called, for making this addition. So, we had to
raise ticket to SAP.

Reply from SAP on Note # 213168/2016.

---------------------------------------
Dear Sir or Madam,

As described in note #1259505 the new cancellation procedure is performed by default. If this procedure
is executed then then user exits in the SD-FI interface are not performed at all.
This is standard. However you have the possibility to force the system to perform the old cancellation thus
your modification will work.

You could consider to add a certain logic in USEREXIT_FILL_XKOMK1 (include RV60BFZA) to fill
parameter RULE_NEW_CANCEL with value 'A'. In this way the old cancellation will be performed.

Please read following note in this topic: #339928.

In case of further questions your local SD consultant should be contacted.

Best regards,
Tamas
--------------------------

***** End changes for CQ MJNC00225340 *****

5. Suggested Technical Details (optional)


The following section is only suggested technical details. The actual technical details will be
documented in the technical specifications.

5.1 Custom Transaction


YO_DP_CONFIG  Maintenance view for discount pool config table

Page 19 of 28

This document is considered Mead Johnson Nutrition confidential and proprietary information. The information contained herein may not be
disclosed or distributed without Mead Johnson Nutrition prior written approval. Any person using a copy of this document is responsible for
ensuring that the copy is current.
OTC_FS_4.1.3_ENH 1067_Discount Pool
Version 4.3

5.2 Requirement routine


As a General Instruction, no blanks should be left in this document. Not Applicable
or N/A is sufficient if the question does not apply.

Menu/Submenu

Routine number RV64A915 (Calculation routine 915)

Business logic required  In the condition formula routine, for


each condition type maximum
allowable discount is calculated and
then validated from Z-tables if that
discount is available in the pool
o When control comes to ZA09 in
pricing procedure, total allowed
discount (Max allowed – Off
invoice – Free goods) is
calculated. If total allowed
discount is greater than
discount in Z-tables, then the
discount in Z-tables for ZA09 is
applied. If not, total allowed
discount is applied and next two
condition types need not be
executed.
o Similarly when control comes to
ZA18, total allowed discount
(Max allowed – Off invoice –
Free goods – ZA09) is
calculated. Same logic as above
is used to apply discounts.
o When control comes to ZA17
total allowed discount (Max
allowed – Off invoice – Free
goods – ZA09 – ZA17) is
calculated

***** Begin changes for FS version 4.2 - Discount Pool Program*****

Menu/Submenu

Routine number RV64A916 (Calculation routine 916)

Business logic required  In this Requirement type routine, for

Page 20 of 28

This document is considered Mead Johnson Nutrition confidential and proprietary information. The information contained herein may not be
disclosed or distributed without Mead Johnson Nutrition prior written approval. Any person using a copy of this document is responsible for
ensuring that the copy is current.
OTC_FS_4.1.3_ENH 1067_Discount Pool
Version 4.3

ZMDS condition, the value of


Percentage is picked up from condition
ZMAS.
 If ZMD1 is blank, no change should be
done to ZMDS.

***** End changes for FS version 4.2 - Discount Pool Program*****

Page 21 of 28

This document is considered Mead Johnson Nutrition confidential and proprietary information. The information contained herein may not be
disclosed or distributed without Mead Johnson Nutrition prior written approval. Any person using a copy of this document is responsible for
ensuring that the copy is current.
OTC_FS_4.1.3_ENH 1067_Discount Pool
Version 4.3

5.3 Business Transaction event (If any..)


5.4 Substitution

<For FI related transaction specifically>

Verification Fields required for Point of Table used Business Rules


Description Verification Verification in
Verification

Substituted Field Derived from Field Table used in Substitution Business Rules

5.5 Custom Tables/Structure in SAP

Table Name YO1067_DP_SOURCE


Short text Source table for Discount Pool
Size category 0
Table maintenance allowed Display/Maintenance allowed with Restructions

Page 22 of 28

This document is considered Mead Johnson Nutrition confidential and proprietary information. The information contained herein may not be
disclosed or distributed without Mead Johnson Nutrition prior written approval. Any person using a copy of this document is responsible for
ensuring that the copy is current.
OTC_FS_4.1.3_ENH 1067_Discount Pool
Version 4.3

Data class APPL1


Buffering Not allowed
Table maintenance
generation
Authorization Group
Field Data Element Domain Type Length Check Key Fore Description
Name Table- Field ign
Field Key
MANDT MANDT MANDT CLNT 3 X Client
YY_GRO YY1067_GROUP CHAR1 CHAR 10 X Group ID for Sales
UP 0 Area & Distributor
YY_SDO YY1067_SDOCT CHAR4 CHAR 4 X Source Document
CTYPE YPE Type
YY_SCO YY1067_SCOND CHAR4 CHAR 4 X Source Condition
ND Type
YY_SDO YY1067_SDOC CHAR1 CHAR 10 X Source Document
C 0 Number
NETWR YY1067_VALUE WERTV CURR 15 Source Document
8 Value
WAERK WAERK WAERS CUKY 5 SD Document
Currency
AENAM AENAM USNAM CHAR 12 Name of Person Who
Changed Object
ERDAT ERDAT DATUM DATS 8 Date on Which Record
Was Created
ERZET ERZET UZEIT TIMS 6 Entry time
Comments

Table Name YO1067_DP_TARGET


Short text Target table for Discount Pool
Size category 0
Table maintenance allowed Display/Maintenance allowed with Restructions
Data class APPL1
Page 23 of 28

This document is considered Mead Johnson Nutrition confidential and proprietary information. The information contained herein may not be
disclosed or distributed without Mead Johnson Nutrition prior written approval. Any person using a copy of this document is responsible for
ensuring that the copy is current.
OTC_FS_4.1.3_ENH 1067_Discount Pool
Version 4.3

Buffering Not allowed


Table maintenance
generation
Authorization Group
Field Data Element Domain Type Length Check Key Fore Description
Name Table- Field ign
Field Key
MANDT MANDT MANDT CLNT 3 X Client
YY_GRO YY1067_GROUP CHAR1 CHAR 10 X Group ID for Sales
UP 0 Area & Distributor
YY_SDO YY1067_SDOCT CHAR4 CHAR 4 X Source Document
CTYPE YPE Type
YY_SCO YY1067_SCOND CHAR4 CHAR 4 X Source Condition
ND Type
YY_SDO YY1067_SDOC CHAR1 CHAR 10 X Source Document
C 0 Number
YY_TDO YY1067_TDOC VBEL CHAR 4 X Target Document
C N Number
YY_TCO YY1067_TCOND KSCH CHAR 4 X Target Condition Type
ND L
YY_TDO YY1067_TDOCT AUAR CHAR 15 X Target Document
CTYPE YPE T Type
NETWR YY1067_VALUE WERTV CURR 15 Source Document
8 Value
WAERK WAERK WAERS CUKY 5 SD Document
Currency
AENAM AENAM USNAM CHAR 12 Name of Person Who
Changed Object
ERDAT ERDAT DATUM DATS 8 Date on Which Record
Was Created
ERZET ERZET UZEIT TIMS 6 Entry time
Comments

Table Name YO1067_DP_GROUP


Short text Group table for Discount Pool
Size category 0
Table maintenance allowed Display/Maintenance allowed with Restructions
Data class APPL0
Page 24 of 28

This document is considered Mead Johnson Nutrition confidential and proprietary information. The information contained herein may not be
disclosed or distributed without Mead Johnson Nutrition prior written approval. Any person using a copy of this document is responsible for
ensuring that the copy is current.
OTC_FS_4.1.3_ENH 1067_Discount Pool
Version 4.3

Buffering Not allowed


Table maintenance
generation
Authorization Group
Field Data Element Domain Type Length Check Key Fore Description
Name Table- Field ign
Field Key
MANDT MANDT MANDT CLNT 3 X Client
VKORG VKORG VKOR CHAR 4 X Sales Organization
G
VTWEG VTWEG VTWE CHAR 2 X Distribution Channel
G
SPART SPART SPAR CHAR 2 X Division
T
KUNAG KUNAG KUNN CHAR 10 X Sold-to party
R
YY_GRO YY1067_GROUP CHAR CHAR 10 Group ID for Sales
UP 10 Area & Distributor
Comments

Table Name YO1067_DP_CONFIG


Short text Discount Pool Configuration
Size category 0
Table maintenance allowed Display/Maintenance allowed with Restructions
Data class APPL0
Buffering Switched on
Table maintenance
generation
Authorization Group
Field Data Element Domain Type Length Check Key Fore Description
Name Table- Field ign
Field Key
MANDT MANDT MANDT CLNT 3 X Client
YY_TDO YY1067_TDOCT AUAR CHAR 4 X Target Document
CTYPE YPE T Type
YY_TCO YY1067_TCOND KSCH CHAR 4 X Target Condition Type
ND L
Page 25 of 28

This document is considered Mead Johnson Nutrition confidential and proprietary information. The information contained herein may not be
disclosed or distributed without Mead Johnson Nutrition prior written approval. Any person using a copy of this document is responsible for
ensuring that the copy is current.
OTC_FS_4.1.3_ENH 1067_Discount Pool
Version 4.3

YY_SERI YY1067_SERIAL NUMC NUM 10 X Serial Number


ALNO NO 10 C
YY_SDO YY1067_SDOCT AUAR CHAR 4 Source Document
CTYPE YPE T Type
YY_SCO YY1067_SCOND KSCH CHAR 4 Source Condition
ND L Type
Comments

6. Data Source Consideration

Description Field Table


Transaction ID SLNO Line Number
Date SY-DATUM SY-DATUM
Distributor Sold to KUNAG SOURCE Table
Distributor Name (SP) NAME1 KNA1-NAME1
Region REGIO KNA1-REGIO
Sales Org VKORG SOURCE Table
DC VTWEG SOURCE Table
DIV SPART SOURCE Table
Document Type AUART SOURCE Table
Document Number VBELN SOURCE Table
Activity ID XBLNR /IRM/GCRHDR
Activity Name ZUONR /IRM/GCRHDR
Tactic ID TACTIC /IRM/IPBBASP
Tactic Name DESCR /IRM/TIPATAC
Amount AMOUNT SOURCE Table
Currency WAERK SOURCE Table
Sales Order VBELN TARGET Table
PO Number BSTKD TARGET Table
Amount AMOUNT TARGET Table
Currency WAERK TARGET Table

***** Begin changes for FS version 4.2 - Discount Pool Report*****

Below new columns have been added to Discount pool report output.

Page 26 of 28

This document is considered Mead Johnson Nutrition confidential and proprietary information. The information contained herein may not be
disclosed or distributed without Mead Johnson Nutrition prior written approval. Any person using a copy of this document is responsible for
ensuring that the copy is current.
OTC_FS_4.1.3_ENH 1067_Discount Pool
Version 4.3

Description Field Table


Source Acc Doc No. BKPF-BELNR BKPF
Target Acc Doc No. VBRK-VBELN VBRK
Source PO# BSTKD TARGET Table
Target PO# BSTKD TARGET Table

***** End changes for FS version 4.2 - Discount Pool Report*****

Data Verification

Table Field Name Verification Rule

7. Error Handling

7.1 Error Messages

Describe the expected error messages for different error conditions.

Error Message Error Message Text Error Conditions


Number (70 characters)
1.

8. Unit Testing Scenarios


Identify any specific requirements for testing that must be considered. These must be defined
and testable in the Technical Specification

Normal Functionality - test cases that ensure the enhancement functions as it should.
ID Description
1 Create a Vistex ZT01 IP document and Settle – Discount pool is updated
2 Reverse Settled a ZT01 IP document – Discount pool is cleared.
3 Create a ZCR1 credit memo—Discount pool is updated with corresponding mapping from config table.
4 Create a ZDR1 debit memo—Discount pool is depleted and an entry is added in YDEP_POOL table.
5 Create a sales order and off invoice discounts, free goods make up 30% of order. No consumption from
discount pool happends
6 Create a sales order and discount for a claim is applied  An entry is logged to YDEP_POOL table
Page 27 of 28

This document is considered Mead Johnson Nutrition confidential and proprietary information. The information contained herein may not be
disclosed or distributed without Mead Johnson Nutrition prior written approval. Any person using a copy of this document is responsible for
ensuring that the copy is current.
OTC_FS_4.1.3_ENH 1067_Discount Pool
Version 4.3

Exception - special logic or exceptions (e.g. report should exclude certain specific condition)

5 Create a credit memo and just save the credit memo.  Discount pool is not updated.
6 Create a debit memo and just save the debit memo.  Discount pool is not updated.
Error Handling - functionality in case of errors (e.g. Error Message or Error Log )

7 Reverse settle a Vistex claim  Error message that claim cannot be reverse settled.
8 Create a debit memo with balance greater that available in the pool  Error issued when debit memo is
released.

9. Additional Information

10. Attachments

Page 28 of 28

This document is considered Mead Johnson Nutrition confidential and proprietary information. The information contained herein may not be
disclosed or distributed without Mead Johnson Nutrition prior written approval. Any person using a copy of this document is responsible for
ensuring that the copy is current.

You might also like