Вы находитесь на странице: 1из 23

Design Specification for

CERPS DS – CF – Planning Function Exits


[STD_ZCL_PF_REV_SELKF_revaluation_BIIP]
STD_00000109775

IQMS Role and Reason for Approval


Note: signatories to this document are confirming that they have Read and Understood the predicate iQMS
procedure used to create this document

Name Job Title or IQMS Reason for Approval


Role

Kah Jun, Lai Author The author is signing to confirm that this document has been prepared in
accordance with an approved document management process, that content is
consistent with the deliverable definition found in the GSOP_0286 Design System,
that relevant input from any contributory authors has been included and that an
appropriate review / editing process has been conducted.

Developer The developer, selected by the Project Manager as responsible for the design of
the system, is signing to confirm that the Design Specification is fit for purpose,
that it will deliver a computer system that satisfies the System Requirements and
that it will be used for the development or configuration of the computer system
Table of Contents
Design Specification for...............................................................................................................................1
CERPS DS – CF – Planning Function Exits................................................................................................1
IQMS Role and Reason for Approval..........................................................................................................1
1 Introduction 3
2 Definition/Acronyms...................................................................................................................................3
3 General Statement of Design.....................................................................................................................3
3.1 Assumptions..............................................................................................................................................4
4 References 4
5 Platform Architecture and Environment...................................................................................................5
6 Software Architecture.................................................................................................................................5
6.1 Generic Solution Details............................................................................................................................5
6.2 Specific Solution Details .........................................................................................................................15
7 User Interface............................................................................................................................................16
8 System Operation Specification..............................................................................................................17
9 Data 17
10 Security 18
11 Revision History......................................................................................................................................18
12 Appendices.............................................................................................................................................19
1 Introduction
This document aims to describe the specification for the Revaluation Functionality. The Revaluation
Functionality is based on the developed Class ‘ZCL_PF_REV_SELKF’. The Revaluation Functionality is
used to modifiy the values of the Gross Margin Planning. In this DS the Class ‘ZCL_PF_REV_SELKF’ will be
described in detail.

2 Definition/Acronyms
Item Definition
SAP SAP R/3 version 4.7 as implemented in CERPS

BI-IP Business Intelligence Integrated Planning

NA Not Applicable

3 General Statement of Design


Design Normal Class ‘ZPF_REV_SELKF’ shall be created for P&L revaluation
methodology/principles containing with:
Class -> ‘ZCL_PF_REVSELKF’:

The ‘ZCL_PF_REVSELKF’ class is splitted into two methods


‘IF_RSPLFA_SRVTYPE_IMP_EXEC~INIT_EXECUTION’ - Initialization for
Execution

‘IF_RSPLFA_SRVTYPE_IMP_EXEC~EXECUTE’ – Execution

The ‘ZCL_PF_REVSELKF’ class has the following parameters:

IA_KYF, IA_VALID_PARMS, IA_REV_FACTOR, IA_REV_TYPE,


IA_KYF_MAIN, IA_KYF_REF1, IA_KYF_REF2, IA_KYF_REF3, IA_KYF_TYP

Parameters:
‘ZV_SEL_KF’ – Key Figure,
‘ZV_REV_TYPE’ – Revaluation Type,
‘ZV_REV_PCT’ – Revaluation Percentage.

The traceability between design elements and the System Requirements (SR)
is recorded in the Trace Matrix in Appendix
Tools + version ABAP/4

Programming GSK Programming Standards –GSOP_0290_05_01


standards

3.1 Assumptions

• Function Type call shall be trigger by a function pool program to immediately start update.

4 References

Document Id Document Title


INS_00000066939 CERPS Upgrade Project - Quality Plan

STD_00000017956 SAP programming standards.

STD_00000055959 Enhancement Generic Design

INS_00000016038 C&ES Document Management Plan


5 Platform Architecture and Environment

NA

6 Software Architecture

Element ID Developed ID Programming Description of


Software Language(s) Purpose
Unit name
STD_00000109 Normal ZPF_REV_SELKF ABAP/4 Planning Class call
775/0001 Class for P&L revaluation

STD_00000109 Method of IF_RSPLFA_SRVTYPE_ ABAP/4 Initialization Method


775/0002 the Normal IMP_EXEC~INIT_EXEC of the Planning
Class UTION Function Type call
‘ZCL_PF_R for P&L revaluation
EV_SELKF’
STD_00000109 Method of IF_RSPLFA_SRVTYPE_ ABAP/4 Execution Method
775/0003 the Normal IMP_EXEC~EXECUTE of the Planning
Class Function Type call
‘ZCL_PF_R for P&L revaluation
EV_SELKF’

6.1 Generic Solution Details


Authorisations

N/A

Message Class and Messages

N/A

Selection Screen

Three fields are relevant on the Selection Screen of the corresponding Planning Layout:
Field Field short description Short explanation
parameter
ZV_SEL_KF Key Figure The Key Figure to be modified.

ZV_REV_TYPE Revaluation Type Procentual Revaluation Methodology

ZV_REV_VAL Revaluation Value Absolute Revaluation Methodology

Input Format

N/A

Output Format

N/A

Output Medium

N/A

Screen Summary

N/A

Business Logic

Element ID Logic Description

STD_00000109775/0 Function Type part 1:


001
‘ZPF_REV_SELKF’ Function Type for revaluation of the P&L items

Introduction

This Function Type ‘ZPF_REV_SELKF’ will be used to revaluate the P&L items
and will be called at the time of execution of the assigned BI-IP function. The
Function Type is assigned to exactly one Class which will be explained in more
detail.

The BI-IP system uses this Function in the BI-IP configuration, however the
Detailed Description of the BI-IP configuration is not part of this document.

Program logic
A Planning Function –which uses this function- reads all planning line items
within a specific planning subarea (described in the detailed description of the BI-
IP configuration). The User will choose from a drop down variable field which
Revaluation Function she/he wants to modify. Following Revaluation Function
values can be choosen:

Revaluation Function Short Description

01 Volume Normal

02 Volume Tender

03 Volume SD Stock

04 Volume Sample

05 Volume Free Goods

06 Price Normal

07 Price Tender

08 Price SD Stock

09 Dis. Nor – Price


Allowance %

10 Dis.Nor - Effcy. Building


%

11 Dis.Nor - Fin
Arrangements %

12 Dis.Nor - Bus.Building %

13 Dis.Nor - Other Disc. %

14 Dis.Ten - Price
Allowance %

15 Dis.Ten - Other Disc. %

16 Dis.SDS - Price
Allowance %

17 Dis.SDS - Other Disc. %

18 R&A Normal %

19 R&A Normal Adj

20 R&A Tender %
21 R&A Tender Adj

22 R&A SD Stock %

23 R&A SD Stock Adj

24 Reb.Nor - Price
Allowance %

25 Reb.Nor - Effcy. Building


%

26 Reb.Nor - Fin
Arrangements %

27 Reb.Nor - Bus.Building
%

28 Reb.Nor - Other
Rebates %

29 Reb.Nor – Adjustment

30 Reb.Ten - Price
Allowance %

31 Reb.Ten - Other
Rebates %

32 Reb.Ten – Adjustment

33 Reb.SDS - Price
Allowance %

34 Reb.SDS - Other
Rebates %

35 Reb.SDS - Adjustment

36 Co-Promotional Income

37 Cost Nor - Std/Unit

38 Cost Nor – Variance

39 Cost Nor – Other

40 Cost Ten - Std/Unit

41 Cost Ten – Variance


42 Cost Ten – Other

43 Cost SDS - Std/Unit

44 Cost SDS – Variance

45 Cost SDS - Other

46 Cost Sam - Std/Unit

47 Cost Sam - Variance

48 Cost Sam - Other

49 Cost FG - Std/Unit

50 Cost FG - Variance

51 Cost FG - Other

52 Royalties %

53 Royalties Adjustment

54 SB14 - Release/Unit

55 SB14 - Variance

56 SB14 - Other

After the User chose the proper ‘Revaluation Function’ Variable Field value, then
the Planning Function will read the ‘ZCFGM_TT_REVAL’ table. This table will
determine the corresponding ‘Revaluation Key Figure Type(s)’ and the
corresponding ‘Invoice Category(s)’ and the ‘Revaluation Key Figure(s)’ and the
corresponding ‘Key Figure(s) 1 - 3’ to each ‘Revaluation Function’.

Structure of the ‘ZCFGM_TT_REVAL’ table:

ZREVAL ZKFTYP G_CWW ZKEYFI ZKFREF ZKFREF ZKFREF


FN E IC GURE 1 2 3

Revalua- Revalua- Invoice Revalua- Referen- Referen- Referen-


tion tion Key Category tion Key ce KF 1 ce KF 2 ce KF 3
Function Figure Figure
Type
Short explanation to the table:

ZREVALFN (Revaluation Function) –> Key of the table

ZKFTYPE (Revaluation Key Figure Type) –> Derived Key Figure Type from
Revaluation Function

G_CWWIC (Invoice Category) -> Derived Invoice Category from Revaluation


Function

ZKEYFIGURE (Revaluation Key Figure) –> Key Figure to be revaluated

ZKFREF1 (Reference KF 1) -> Additional Key Figure(s) by volume planning


calculation should be taken into consideration

ZKFREF2 (Reference KF 2) -> Additional Key Figure(s) by volume planning


calculation should be taken into consideration

ZKFREF3 (Reference KF 3) -> Additional Key Figure(s) by volume planning


calculation should be taken into consideration

Revaluation Key Figure Type(s):

Revaluation Key Short Description


Figure Type(s)

A Returns & Allowance

C Standard Cost

D Discount

M Co-Promotional Income

O Other Costs

P Price

R Rebate

S SB14

V Volume

Invoice Category(s):

Invoice Category(s) Short Description

1 Sales
2 Samples

3 Tenders

4 Free Goods

5 Short Dated Stock

6 Management alloc.

Revaluation Key Figure(s) (PLEASE CHECK THEM):

Revaluation Key Short Description


Figure(s)

0G_QVV901 Invoiced Quantity

YFIVOLADJ VOL: Fin Adjustments

YMKVOLADJ VOL: Marketing


Adjustments

YSUPCONST Supply Constraints

YIMPTRD Impact of parallel Trade

YVOLTOTAL Vol- Total

YVOLPROMO Promo Volume

YPRICE Unit Price

0G_AVV001 Gross Sales

YPADISPER Price Allowance


discount %

0G_AVV023 Price Allownace Disc.


Amt

YFADISPER Financial Agreement


discount %

0G_AVV028 Fin. Arrangement


Disc.Amt

YEBDISPER Efficiency Building


Discount %

0G_AVV026 Eff. Bldg Disc. Amt


YBBDISPER Business Building
Discount %

0G_AVV029 Business Bldg Disc Amt

YOTDISPER Other Discount %

0G_AVV021 Other Discount Amt

YRNAPER R&A - Customer


Returns %

0G_AVV050 R&A Amt

YRNAADJ R&A – Customer


Returns Adjustments

YPAREBPER Price Allowance Rebate


%

0G_AVV224 Price Allowance Rebate


Amt

YFAREBPER Financial Agreement


Rebate %

0G_AVV230 Fin Arrangement. Reb.


Amt

YEBREBPER Efficiency Building


Rebate %

0G_AVV228 Eff. Bldg Reb. Amt

YBBREBPER Business Building


Rebate %

0G_AVV232 Business Bldg Reb


Amt

YOTREBPER Other Rebates %

0G_AVV221 Other Reb. Amt.

YREBADJ Rebates Adjustments

YPTPRICE Parallel Trade Ref Price

YPTVALIMP Parallel Trade Value


Impact

YPTIMPORT Parallel Trade Import


Value

YPTEXPORT Parallel Trade Export


Value

YROYPER Royalty %

YROYADJ Royalty Adjustments

YSB14VAR SB14 Variance

YSB14RATE SB14 Rate

YSB14OTH SB14 Other

The User will have two Buttons on the Entry Screen. These Buttons will
determine, whether the revaluation should be executed according to the
percentual or according to the absolute calculation methodology.

Percentual Revaluation means, that a percentage will be used to


increase/decrease the original value. If the percentage value is not correct, then a
message will be sent:

‘Please enter a correct value instead of...’

Example:

The original value of the Key Figure is 100 and the Percentual Revaluation factor
is 5. In that case the new value will be 105.

Absolute Revaluation means, that absolute value will be used to


increase/decrease the original value.

Example:

The original value of the Key Figure is 1000 and the Absolute Revaluation factor
is 5. In that case the new value will be 1005.

The Program reads the original Line Items and the original Key Figure(s) and
reads the ‘ZCFGM_TT_REVAL’ Table Items (Key is the ‘ZREVALFN’ field). The
Program modifies the values of the ‘ZKEYFIGURE‘ Key Figure, which is in the
corresponding line item of the ‘ZCFGM_TT_REVAL’ table.

If the ‘Key Figure Type’ is equal ‘V’ = ‘Volume’, then additional Key Figures
(‘ZKFREF1’, ‘ZKFREF2’, ‘0G_QVV901‘, 'YFIVOLADJ', 'YMKVOLADJ',
'YSUPCONST') should be taken into consideration by the ‘Volume’ Key Figure
calculation.

_______________________________________________________________

Calculation logic of the percentage values by the ‘Volume’ ‘Key Figure Type (both
for Key Figure Type ’C’ and for Key Figure Type ‘N’:

Key Figure value = (original Key Figure value + additional Key Figure 1 value
(‘ZKFREF1’) + additional Key Figure 2 value (‘ZKFREF2’) + Key Figure value of
the (YSUPCONST) KF) * Revaluation Factor - additional Key Figure 1 value
(‘ZKFREF1’) - additional Key Figure 2 value (‘ZKFREF2’) - Key Figure value of the
(YSUPCONST) KF.

Calculation logic of the percentage values by the ‘non Volume’ ‘Key Figure Type’:

Key Figure Value = (original Key Figure Value) * Revaluation Factor.

______________________________________________________________

Calculation logic of the absolute values by the ‘Volume’ ‘Key Figure Type’ if
aggregation type eq ‘N’:

Key Figure value = (Revaluation value - additional Key Figure 1 value


(‘ZKFREF1’) - additional Key Figure 2 value (‘ZKFREF2’))

Calculation logic of the absolute values by the ‘non Volume’ ‘Key Figure Type’ if
aggregation type eq ‘N’:

Key Figure Value = Revaluation value.

______________________________________________________________

Calculation logic of the absolute values by the ‘Volume’ ‘Key Figure Type’ if
aggregation type eq ‘C’:

Key Figure value = (Revaluation value) * ( ('0G_QVV901' KF) + ('YFIVOLADJ'


KF) + ('YMKVOLADJ' KF) + ('YSUPCONST' KF)) - additional Key Figure 1 value
(‘ZKFREF1’) - additional Key Figure 2 value (‘ZKFREF2’) - Key Figure value of the
(YSUPCONST) KF

Key Figure Value = Revaluation value * Aggregation Key Figure / lv_total.

Calculation logic of lv_total:

If KF equal (‘YVOLTOTAL’), then the program checks, whether the KF


'YSUPCONST' is lower then zero, then the formula is:
lv_total = 'YSUPCONST' + '0G_QVV901' (for all relevant line items). If the KF
'YFIVOLADJ' is lower then zero, then the formula is: lv_total = 'YFIVOLADJ' (for
all relevant line items). If the KF 'YMKVOLADJ' is ,lower then zero, then the
formula is: lv_total = 'YMKVOLADJ' .
If KF not equal (‘YVOLTOTAL’), then the formula is: lv_total = aggregation key
figure (for all relevant line items).

_______________________________________________________________

Run Mode

Function Call

Error Handling

NA

6.2 Specific Solution Details

Function Module / RFC / BAPI

Element ID STD_00000109775/0001

Class Name Z_BPS_GM_PL_EXIT_FC

Class Text IP Function : Revaluate Selected Key Figures

Type of Class Normal class

Business Object NA

Authorisation NA

Refer to Appendix – Class Details for further information.


Element ID STD_00000109775/0002

Class Name Z_BPS_GM_PL_EXIT_FC

Class Text IP Function : Revaluate Selected Key Figures

Type of Class Normal class

Method Name IF_RSPLFA_SRVTYPE_IMP_EXEC~INIT_EXECUTION

Method Text Initialization for Execution

Business Object NA

Authorisation NA

Refer to Appendix – Class Details for further information

Element ID STD_00000109775/0003

Class Name Z_BPS_GM_PL_EXIT_FC

Class Text IP Function : Revaluate Selected Key Figures

Type of Class Normal class

Method Name IF_RSPLFA_SRVTYPE_IMP_EXEC~EXECUTE

Method Text Execution

Business Object NA

Authorisation NA

Refer to Appendix – Class Details for further information

7 User Interface

NA
8 System Operation Specification
NA

Element Id Description

NA

9 Data
Table Name Field Field Key Field Data Element ….
description
ZCFGM_TT_REVA
L

ZREVALFN Revaluation X ZZREVALFN


Function

ZKFTYPE Revaluation X ZZKFTYPE


Key Figure
Type

ZINVCAT Invoice X ZZINVCAT


Category

ZKEYFIGURE Revaluation ZZKEYFIGURE


Key Figure

ZKFREF1 Reference KF ZZKFREF1


1

ZKFREF2 Reference KF ZZKFREF2


2

ZKFAGTYP Agg. Type of ZZKFAGTYP


Key figure

ZKFAGRT Aggregation ZZKFAGRT


Key figure

Element Id Description

NA
10 Security

Table - ZCFGM_TT_REVAL

11 Revision History
Version Reason For Revision
1.0 This is the first issue of this document. APSE number 436.
12 Appendices

Appendix – Trace Table


Element Number Input reference Comment

STD_00000109775/0001 TBC

STD_00000109775/0002 TBC

STD_00000109775/0003 TBC
Appendices
The appendices below are optional and contain additional detailed specifications to the technical
developer where necessary during the development phase.

Each Appendix below is as a placeholder for this extra information. If it is not used for a particular
design, the content of that Appendix must be deleted and “N/A” inserted. Tables must not be left
blank if not used and the whole Table deleted..

During the Maintenance phase of the system, Operations staff may delete this optional developer
information if it creates duplication of maintenance effort e.g. program logic with actual code.

Appendix – Class Detail


Attribute Details

Attribute Level Visib Typin Associated Type Description


ili-ty g

IA_KYF Instance Priva Type CF-GM Revaluation


Attribute te Function

IA_VALID_PARM Instance Priva Type Boolean variable


S Attribute te

IA_REV_FACTO Instance Priva ia_rev_factor type p length


R Attribute te 9 deci-mals 4 .
data IA_REV_TYPE type /BIC
/OIZIP_REV .
data IA_KYF_MAIN type ZZKE
YFIGURE .
data IA_KYF_REF2 type ZZKF
REF2 .
data IA_KYF_REF1 type ZZKF
REF1 .
data IA_KYF_TYP type ZZKFT
YPE .
data IA_KYF_INVC type
/BI0/OIG_CWWIC .
data IA_MAT_SEL type DDSIG
N .
data IA_AGG_TYPE type ZZKF
AGTYP .
data IA_KYF_SUM type ZZKFA
GRT .

IA_REV_TYPE Instance Priva Type


Attribute te
IA_KYF_MAIN Instance Priva Type
Attribute te

IA_KYF_REF2 Instance Priva Type Reference KF 2


Attribute te

IA_KYF_REF1 Instance Priva Type Reference KF 1


Attribute te

IA_KYF_TYP Instance Priva Type Revaluation Key Figure


Attribute te Type

IA_KYF_INVC Instance Priva Type Invoice Category


Attribute te

IA_MAT_SEL Instance Priva Type Material Selection


Attribute te

IA_AGG_TYPE Instance Priva Type Agg. Type of Key figure


Attribute te

IA_KYF_SUM Instance Priva Type Aggregation Key figure


Attribute te

Interface Abstract Final Modeled Description


only
IF_RSPLFA_SRVTYPE Planning Function Type: Execution
_IMP_EXEC (Without Reference Data)

Methods

Method Name Description


Level Visibility Method
type
IF_RSPLFA_SRVTYPE_IMP_EXEC Instance Public Initialization for Execution
~INIT_EXECUTION Method

IF_RSPLFA_SRVTYPE_IMP_EXEC Instance Public Execution


~EXECUTE Method

IF_RSPLFA_SRVTYPE_IMP_EXEC Instance Public Actions at End of Execution


~FINISH_EXECUTION Method
Method Name IF_RSPLFA_SRVTYPE_IMP_EXEC~INIT_EXECUTION

Technical Description 1, Reading of the BI-IP parameters:

- 'ZV_SEL_KF'

- 'ZV_REV_VAL'

- 'ZV_REV_TYPE'

2, Read Key Figure to be changed from the ‘ZCFGM_TT_REVAL’ table


-> selection according to the parameters in 1,

Parameters

Parameter Type Pass by Typing Associated Type Description


Value Method

I_R_SRVTYPE_D Impor- x Type Ref To IF_RSPLFA_SRVTYPE_DEF Service Type


EF ting (Definition)

I_R_SRV Impor- x Type Ref To IF_RSPLFA_SRV Planning


ting Service

I_R_INFOPROV_ Impor- x Type Ref To IF_RSPLFA_INFOPROV_DE InfoProvider


DESC ting SC (Metadata)

I_R_MSG Impor- x Type Ref To IF_RSPLFA_MSG Messages


ting

I_T_DATA_CHAR Impor- x Type RSPLF_T_CHARSEL Filter


SEL ting Selection

Method Name IF_RSPLFA_SRVTYPE_IMP_EXEC~EXECUTE

Technical Description Execution of the calculation according to the settings in the initialization
method

See business logic description.

Parameters

Parameter Type Pass Typing Associated Type Description


by
Value Method

I_R_PARAM_SET Importing x Type Ref To IF_RSPLFA_PARAM_S Parameter


ET Record (Values)

I_S_BLOCK_LINE Importing x Type ANY Current Data


Block

I_R_MSG Importing x Type Ref To IF_RSPLFA_MSG Messages

C_TH_DATA Changing Type HASHED TABLE Transaction Data

Вам также может понравиться