std zcl pf rev selkf revaluation biip

Click here to load reader

Upload: blll

Post on 04-Apr-2015

67 views

Category:

Documents


9 download

TRANSCRIPT

Design Specification for CERPS DS CF Planning Function Exits [STD_ZCL_PF_REV_SELKF_revaluation_BIIP] STD_00000109775

IQMS Role and Reason for ApprovalNote: 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 Role Author

IQMS Reason for Approval

Kah Jun, Lai

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. 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

Developer

Table of ContentsDesign 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.

2Item SAP BI-IP NA

Definition/AcronymsDefinition SAP R/3 version 4.7 as implemented in CERPS Business Intelligence Integrated Planning Not Applicable

3

General Statement of DesignNormal Class ZPF_REV_SELKF shall be created for P&L revaluation 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

Design methodology/principles

Tools + version Programming standards

ABAP/4 GSK Programming Standards GSOP_0290_05_01

3.1

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

4

ReferencesDocument Title CERPS Upgrade Project - Quality Plan SAP programming standards. Enhancement Generic Design C&ES Document Management Plan

Document Id INS_00000066939 STD_00000017956 STD_00000055959 INS_00000016038

5NA

Platform Architecture and Environment

6

Software ArchitectureDeveloped Software Unit name ID Programming Language(s) Description of Purpose

Element ID

STD_00000109 775/0001 STD_00000109 775/0002

Normal Class Method of the Normal Class ZCL_PF_R EV_SELKF Method of the Normal Class ZCL_PF_R EV_SELKF

ZPF_REV_SELKF IF_RSPLFA_SRVTYPE_ IMP_EXEC~INIT_EXEC UTION

ABAP/4 ABAP/4

Planning Class call for P&L revaluation Initialization Method of the Planning Function Type call for P&L revaluation Execution Method of the Planning Function Type call for P&L revaluation

STD_00000109 775/0003

IF_RSPLFA_SRVTYPE_ IMP_EXEC~EXECUTE

ABAP/4

6.1N/A

Generic Solution Details

Authorisations

Message Class and Messages N/A

Selection Screen Three fields are relevant on the Selection Screen of the corresponding Planning Layout:

Field parameter ZV_SEL_KF ZV_REV_TYPE ZV_REV_VAL

Field short description Key Figure Revaluation Type Revaluation Value

Short explanation The Key Figure to be modified. Procentual Revaluation Methodology 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 001

Function Type part 1: 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 BIIP 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 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20 Short Description Volume Normal Volume Tender Volume SD Stock Volume Sample Volume Free Goods Price Normal Price Tender Price SD Stock Dis. Nor Price Allowance % Dis.Nor - Effcy. Building % Dis.Nor - Fin Arrangements % Dis.Nor - Bus.Building % Dis.Nor - Other Disc. % Dis.Ten - Price Allowance % Dis.Ten - Other Disc. % Dis.SDS - Price Allowance % Dis.SDS - Other Disc. % R&A Normal % R&A Normal Adj R&A Tender %

21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41

R&A Tender Adj R&A SD Stock % R&A SD Stock Adj Reb.Nor - Price Allowance % Reb.Nor - Effcy. Building % Reb.Nor - Fin Arrangements % Reb.Nor - Bus.Building % Reb.Nor - Other Rebates % Reb.Nor Adjustment Reb.Ten - Price Allowance % Reb.Ten - Other Rebates % Reb.Ten Adjustment Reb.SDS - Price Allowance % Reb.SDS - Other Rebates % Reb.SDS - Adjustment Co-Promotional Income Cost Nor - Std/Unit Cost Nor Variance Cost Nor Other Cost Ten - Std/Unit Cost Ten Variance

42 43 44 45 46 47 48 49 50 51 52 53 54 55 56

Cost Ten Other Cost SDS - Std/Unit Cost SDS Variance Cost SDS - Other Cost Sam - Std/Unit Cost Sam - Variance Cost Sam - Other Cost FG - Std/Unit Cost FG - Variance Cost FG - Other Royalties % Royalties Adjustment SB14 - Release/Unit SB14 - Variance 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 FN Revaluation Function ZKFTYP E Revaluation Key Figure Type G_CWW IC Invoice Category ZKEYFI GURE Revaluation Key Figure ZKFREF 1 Reference KF 1 ZKFREF 2 Reference KF 2 ZKFREF 3 Reference KF 3

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 Figure Type(s) A C D M O P R S V Short Description Returns & Allowance Standard Cost Discount Co-Promotional Income Other Costs Price Rebate SB14 Volume

Invoice Category(s): Invoice Category(s) 1 Short Description Sales

2 3 4 5 6

Samples Tenders Free Goods Short Dated Stock Management alloc.

Revaluation Key Figure(s) (PLEASE CHECK THEM): Revaluation Key Figure(s) 0G_QVV901 YFIVOLADJ YMKVOLADJ YSUPCONST YIMPTRD YVOLTOTAL YVOLPROMO YPRICE 0G_AVV001 YPADISPER 0G_AVV023 YFADISPER 0G_AVV028 YEBDISPER 0G_AVV026 Short Description Invoiced Quantity VOL: Fin Adjustments VOL: Marketing Adjustments Supply Constraints Impact of parallel Trade Vol- Total Promo Volume Unit Price Gross Sales Price Allowance discount % Price Allownace Disc. Amt Financial Agreement discount % Fin. Arrangement Disc.Amt Efficiency Building Discount % Eff. Bldg Disc. Amt

YBBDISPER 0G_AVV029 YOTDISPER 0G_AVV021 YRNAPER 0G_AVV050 YRNAADJ YPAREBPER 0G_AVV224 YFAREBPER 0G_AVV230 YEBREBPER 0G_AVV228 YBBREBPER 0G_AVV232 YOTREBPER 0G_AVV221 YREBADJ YPTPRICE YPTVALIMP

Business Building Discount % Business Bldg Disc Amt Other Discount % Other Discount Amt R&A - Customer Returns % R&A Amt R&A Customer Returns Adjustments Price Allowance Rebate % Price Allowance Rebate Amt Financial Agreement Rebate % Fin Arrangement. Reb. Amt Efficiency Building Rebate % Eff. Bldg Reb. Amt Business Building Rebate %

Business Bldg Reb AmtOther Rebates % Other Reb. Amt. Rebates Adjustments Parallel Trade Ref Price Parallel Trade Value

Impact YPTIMPORT YPTEXPORT YROYPER YROYADJ YSB14VAR YSB14RATE YSB14OTH Parallel Trade Import Value Parallel Trade Export Value Royalty % Royalty Adjustments SB14 Variance SB14 Rate 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 Class Text Type of Class Business Object Authorisation

Z_BPS_GM_PL_EXIT_FC IP Function : Revaluate Selected Key Figures Normal class NA NA

Refer to Appendix Class Details for further information.

Element ID

STD_00000109775/0002

Class Name Class Text Type of Class Method Name Method Text Business Object Authorisation

Z_BPS_GM_PL_EXIT_FC IP Function : Revaluate Selected Key Figures Normal class IF_RSPLFA_SRVTYPE_IMP_EXEC~INIT_EXECUTION Initialization for Execution NA NA

Refer to Appendix Class Details for further information

Element ID

STD_00000109775/0003

Class Name Class Text Type of Class Method Name Method Text Business Object Authorisation

Z_BPS_GM_PL_EXIT_FC IP Function : Revaluate Selected Key Figures Normal class IF_RSPLFA_SRVTYPE_IMP_EXEC~EXECUTE Execution NA NA

Refer to Appendix Class Details for further information

7NA

User Interface

8NA

System Operation SpecificationElement Id Description

NA

9

DataTable Name Field Field description Key Field Data Element .

ZCFGM_TT_REVA L ZREVALFN ZKFTYPE

Revaluation Function Revaluation Key Figure Type Invoice Category Revaluation Key Figure Reference KF 1 Reference KF 2 Agg. Type of Key figure Aggregation Key figure

X X

ZZREVALFN ZZKFTYPE

ZINVCAT ZKEYFIGURE ZKFREF1 ZKFREF2 ZKFAGTYP ZKFAGRT

X

ZZINVCAT ZZKEYFIGURE ZZKFREF1 ZZKFREF2 ZZKFAGTYP ZZKFAGRT

Element Id NA

Description

10

Security

Table - ZCFGM_TT_REVAL

11Version

Revision HistoryReason For Revision

1.0

This is the first issue of this document. APSE number 436.

12

Appendices

Appendix Trace TableElement Number STD_00000109775/0001 STD_00000109775/0002 STD_00000109775/0003 TBC TBC TBC Input reference Comment

AppendicesThe 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 DetailAttribute Details Attribute IA_KYF IA_VALID_PARM S IA_REV_FACTO R Level Instance Attribute Instance Attribute Instance Attribute Visib ili-ty Priva te Priva te Priva te Typin g Type Type ia_rev_factor type p length 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 . Type Associated Type Description CF-GM Revaluation Function Boolean variable

IA_REV_TYPE

Instance Attribute

Priva te

IA_KYF_MAIN IA_KYF_REF2 IA_KYF_REF1 IA_KYF_TYP IA_KYF_INVC IA_MAT_SEL IA_AGG_TYPE IA_KYF_SUM

Instance Attribute Instance Attribute Instance Attribute Instance Attribute Instance Attribute Instance Attribute Instance Attribute Instance Attribute

Priva te Priva te Priva te Priva te Priva te Priva te Priva te Priva te

Type Type Type Type Type Type Type Type Reference KF 2 Reference KF 1 Revaluation Key Figure Type Invoice Category Material Selection Agg. Type of Key figure Aggregation Key figure

Interface IF_RSPLFA_SRVTYPE _IMP_EXEC

Abstract

Final

Modeled only

Description Planning Function Type: Execution (Without Reference Data)

Methods Method Name IF_RSPLFA_SRVTYPE_IMP_EXEC ~INIT_EXECUTION IF_RSPLFA_SRVTYPE_IMP_EXEC ~EXECUTE IF_RSPLFA_SRVTYPE_IMP_EXEC ~FINISH_EXECUTIONLevel Visibility Method type

Description Initialization for Execution Execution Actions at End of Execution

Instance Method Instance Method Instance Method

Public Public Public

Method Name Technical Description

IF_RSPLFA_SRVTYPE_IMP_EXEC~INIT_EXECUTION 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 I_R_SRVTYPE_D EF I_R_SRV I_R_INFOPROV_ DESC I_R_MSG I_T_DATA_CHAR SEL Type Importing Importing Importing Importing Importing Pass by Value x x x x x Typing Method Type Ref To Type Ref To Type Ref To Type Ref To Type Associated Type IF_RSPLFA_SRVTYPE_DEF IF_RSPLFA_SRV IF_RSPLFA_INFOPROV_DE SC IF_RSPLFA_MSG RSPLF_T_CHARSEL Description Service Type (Definition) Planning Service InfoProvider (Metadata) Messages Filter Selection

Method Name Technical Description

IF_RSPLFA_SRVTYPE_IMP_EXEC~EXECUTE Execution of the calculation according to the settings in the initialization method See business logic description.

Parameters Parameter Type Pass by Typing Associated Type Description

Value I_R_PARAM_SET I_S_BLOCK_LINE I_R_MSG C_TH_DATA Importing Importing Importing Changing x x x

Method Type Ref To Type Type Ref To Type IF_RSPLFA_PARAM_S ET ANY IF_RSPLFA_MSG HASHED TABLE Parameter Record (Values) Current Data Block Messages Transaction Data