1.0 Access Management
List of application role + menu role and explanation if we have several applications role with specials rules.
| Role Code | Role Description | Explanation |
|---|---|---|
ZR_RCS_CA_M09 | PS - Project Costs | Role menu for all project costs queries |
ZBI_RCS_PS_A02 | Project Costs and Structures Analysis - End User role | Application Role:
|
ZBI_RCS_CO_A21 | CBS Project costs Reporting Analysis - End User role | Application Role:
|
List of authorization objects mandatory for the application.
| Authorization object | Explanation |
|---|---|
| 0COMP_CODE;C_COMPCDE;C_PMORDER__0COMP_CODE | Company, role: ZR_*_CA_P01 |
| 0PROFIT_CTR__CPFCTR1_2; 0PROFIT_CTR__C_PFCTR1;CPFCTR1_2;C_AGRITM__CPFCTR1_2; C_ASSET2__C_PFCTR1;C_ASSET__C_PFCTR1;C_MATPLNT__CPFCTR1_2; C_MATPLNT__C_PFCTR1;C_MATPNT2__CPFCTR1_2;C_PFCTR1; C_PMORDER__C_PFCTR1;C_PMORDR__C_PFCTR1;C_PRDEQUI__CPFCTR1_2; C_RECONTR__CPFCTR1_2;C_RESP_CC__CPFCTR1_2;C_SUBACT2__CPFCTR1_2 C_TECMAT__CPFCTR1_2;C_WBS_EL2__CPFCTR1_2;C_WBS_EL2__C_ZSECT;C_WBS_ELE__CPFCTR1_2; C_WBS_ELE__C_ZSECT;C_ZSECT | GBU, role: ZR_*_CA_P05 |
| C_FAMIL;C_WBS_EL2__C_FAMIL;C_WBS_ELE__C_FAMIL | Family, role: ZR_*_CA_P04 |
2.0 DataFlow
2.1 Overview
Use the google presentation below as a template. This google presentation must be saved in the Reporting GDrive folder under the corresponding application. Then post the link to the document here.
Reporting documentation drive folder:
https://drive.google.com/drive/folders/0B0qn89R0RGdqYkZZOFZyYXlXVkE
Exemple of dataflow overview :
Template Application name DataFlow
2.2 Technical Rules on Workbench
6DB_GL_COST_PURCHASE DW2 → DSO_PCP2
Fields routines
There are 3 individual rountines in this transformation to divide the following key figure values that are of currencies Korean Won (KRW) and Japanese Yen (JPY) by 100.
C_AMT_CP
C_AMT_CNP
C_AMT_AMO
DSO_PCP1
1) DTS_KEKO_CKIS → IFS_KEKO_CKIS
Fields routines
Fiscal Variant 0FISCVARNT is fixed to K4.
Cost Component Structure 0CCOMPSTRUC is fixed to Z1.
Fiscal Year/Period required some ABAP codings to convert the incoming data into the correct format to be updated.
For the key figure Variable Amount, abap code is required to take the total amount minus the fixed amount to get just the variable amount. (WRTFW_KPF - WRTFW_KFX).
2) FS_KEKO_CKIS → ODS_PCP1
Start routineA select is done on master data global filter in internal table ITB_PLANT_REPLACE_PLANT
A select is done to take all records from ODS_PCP2 into table gt_matrix.
Delete all records where the amount and quantity is equal to zero.
Fields routines
0COSTCOMP (Cost Component):
If source record for 0COSTCOMP is equal to ' ' (space = null / empty), we make a loop on gt_matrix (Else we keep 0COSTCOMP from source).
If gs_matrix-/BIC/C_COSTEL1 <= SOURCE_FIELDS-COSTELMNT and gs_matrix-/BIC/C_COSTEL2 >= SOURCE_FIELDS-COSTELMNT, we take the COSTCOMP from gt_matrix (ODS_PCP2).
In all cases, if 0COSTCOMP from source or from ODS_PCP2 is equal to ' ', the defaul value = 100.
0PLANT_COMP (Issuing Plant):
If C_MATNR = C_COMPNT and PLANT = PLANT_COMP and PCPITEMCAT = 'L' and VENDOR is not empty.
Read table ITB_PLANT_REPLACE_PLANT with help of field VENDOR (VENDOR from source = C_LOW from master data C_GLBFILT).
If something is found, the PLANT_COMP = PLANT from ITB_PLANT_REPLACE_PLANT (field C_HIGH from master data global filter).
Else, keep source PLANT_COMP.
ODS_PCP1 → ODS_PCP1
Collect into ITB_REF_DATE value from master data global filter (C_GLBFILT) for STREAM = F_COPC and RULE = ODS_PCP1
COSTDATE = low value from ITB_REF_DATE.
DTS_KEKO_CKIS → DSO_PCP1
Start routine
A select is done to take all records from ODS_PCP2 into table gt_matrix.
Delete all records where the amount and quantity is equal to zero.
Delete records with Valuation variants ( BWVAR ) not equal to ZFO, Z25 and ZEP.
Fields routines
Fiscal Variant 0FISCVARNT is fixed to K4.
Cost Component Structure 0CCOMPSTRUC is fixed to Z1.
Costing Variant (0COSTVAR) is fixed to ZIP.
Fiscal Year/Period required some ABAP codings to convert the incoming data into the correct format to be updated.
For the key figure Variable Amount, abap code is required to take the total amount minus the fixed amount to get just the variable amount. (WRTFW_KPF - WRTFW_KFX).
DSO_PCP1 → DSO_PCP1
Start routine
- Load DSO_PCP1 into itself with a look-up at DSO_PCP2 for matching records of the month with the following field value assigments:
- Generic Fields:
- DSO_PCP1-C_PRODVER = ''.
- DSO_PCP1-ACTTYPE = ''.
- DSO_PCP1-C_COSTCTR = ''.
- DSO_PCP1-PCP_RES = ''.
- DSO_PCP1-WORKCENTER = ''.
- DSO_PCP1-C_BOMNUM = ''.
- DSO_PCP1-C_BOMUSAG = ''.
- DSO_PCP1-C_BOMALT = ''.
- DSO_PCP1-PLANT_COMP = DSO_PCP2-PLANT.
- DSO_PCP1-C_COMPNT = DSO_PCP2-/BIC/C_MATPLNT.
- DSO_PCP1-LOTSIZE_IT = DSO_PCP2-LOTSIZE.
- DSO_PCP1-CURRENCY = DSO_PCP2-CURRENCY.
- DSO_PCP1-UNIT = DSO_PCP2-UNIT.
- DSO_PCP1-BASE_UOM = DSO_PCP1-UNIT.
- DSO_PCP1-OI_MENGE = DSO_PCP1-LOTSIZE_IT.
- DSO_PCP1-PRICE_UNIT = DSO_PCP1-LOTSIZE_IT.
- Variable Amount (CP):
- DSO_PCP1-C_KAPOSNR = '1'.
- DSO_PCP1-AMOUNT = DSO_PCP2-C_AMT_CP.
- DSO_PCP1-AMOUNTVR = DSO_PCP1-AMOUNT.
- DSO_PCP1-AMOUNTFX = 0.
- DSO_PCP1-COSTELMNT = '0098150974'.
- DSO_PCP1-COSTCOMP = '100'.
- Fixed Amount (CNP):
- DSO_PCP1-C_KAPOSNR = '2'.
- DSO_PCP1-AMOUNT = DSO_PCP2-C_AMT_CNP.
- DSO_PCP1-AMOUNTVR = 0.
- DSO_PCP1-AMOUNTFX = DSO_PCP1-AMOUNT.
- DSO_PCP1-COSTELMNT = '0099430120'.
- DSO_PCP1-COSTCOMP = '220'.
- DSO_PCP1-PCPITEMCAT = 'E'.
- DSO_PCP1-C_COMPNT = ''.
- Depreciation Amount (AMO):
- DSO_PCP1-C_KAPOSNR = '3'.
- DSO_PCP1-AMOUNT = LV_DSO_PCP2-C_AMT_AMO.
- DSO_PCP1-AMOUNTVR = 0.
- DSO_PCP1-AMOUNTFX = WA_PCP1_SP-AMOUNT.
- DSO_PCP1-COSTELMNT = '0099438000'.
- DSO_PCP1-COSTCOMP = '300'.
- DSO_PCP1-PCPITEMCAT = 'E'.
- DSO_PCP1-C_COMPNT = ''.
- Generic Fields:
0CO_PC_PCP_02 → DSO_PCP3
Keys figures in summation
Start routine
Delete records with KLVAR (Costing Variant) not equal to ZFO and ZEP and Z25.
Delete records with CURTYP (Currency Type) not equal to 10.
Fields routines
Costing Variant (COSTVAR) = ZIP.
AMOUNT = WERTF (Fixed value) + WERTV (Variable value)
K_CCR_100 (100 Raw Materials):
IF SOURCE_FIELDS-ELEMT (Cost Component) = '100'.
RESULT = SOURCE_FIELDS-WERTF (Fixed value) + SOURCE_FIELDS-WERTV (Variable value).
K_CCR_110 (110 Toll Manufacturing):
IF SOURCE_FIELDS-ELEMT = '110'.
RESULT = SOURCE_FIELDS-WERTF + SOURCE_FIELDS-WERTV.
K_CCR_120 (120 Utilities - VC):
IF SOURCE_FIELDS-ELEMT = '120'.
RESULT = SOURCE_FIELDS-WERTF + SOURCE_FIELDS-WERTV.
K_CCR_200 (200 Labor Costs):
IF SOURCE_FIELDS-ELEMT = '200'.
RESULT = SOURCE_FIELDS-WERTF + SOURCE_FIELDS-WERTV.
K_CCR_210 (210 Supplies & Misc.):
IF SOURCE_FIELDS-ELEMT = '210'.
RESULT = SOURCE_FIELDS-WERTF + SOURCE_FIELDS-WERTV.
K_CCR_220 (220 Maintenance):
IF SOURCE_FIELDS-ELEMT = '220'.
RESULT = SOURCE_FIELDS-WERTF + SOURCE_FIELDS-WERTV.
K_CCR_230 (230 Overheads):
IF SOURCE_FIELDS-ELEMT = '230'.
RESULT = SOURCE_FIELDS-WERTF + SOURCE_FIELDS-WERTV.
K_CCR_240 (240 Utilities -FC):
IF SOURCE_FIELDS-ELEMT = '240'.
RESULT = SOURCE_FIELDS-WERTF + SOURCE_FIELDS-WERTV.
K_CCR_300 (300 Depreciation):
IF SOURCE_FIELDS-ELEMT = '300'.
RESULT = SOURCE_FIELDS-WERTF + SOURCE_FIELDS-WERTV.
K_CCR_310 (310 N/A):
IF SOURCE_FIELDS-ELEMT = '310'.
RESULT = SOURCE_FIELDS-WERTF + SOURCE_FIELDS-WERTV.
End routine
The purpose of this routine is to check if the current incoming record already exists in the DSO_PCP3 from the previous month loading. If it exists, delete the incoming record.
DSO_PCP3 → DSO_PCP3
Start routine
In internal table LV_DSO_PCP2, we take records from ODS_PCP2 in function of PLANT, C_MATNR, FISCPER and FISCVAR.
DSO_PCP3-AMOUNT = LV_DSO_PCP2-C_AMT_CP + LV_DSO_PCP2-C_AMT_CNP + LV_DSO_PCP2-C_AMT_AMO
DSO_PCP3-AMOUNTVR = LV_DSO_PCP2-C_AMT_CP.
DSO_PCP3-AMOUNTFX = LV_DSO_PCP2-C_AMT_CNP + LV_DSO_PCP2-C_AMT_AMO
DSO_PCP3-LOTSIZE = LV_DSO_PCP2-LOTSIZE.
DSO_PCP3-CURRENCY = LV_DSO_PCP2-CURRENCY.
DSO_PCP3-UNIT = LV_DSO_PCP2-UNIT.
DSO_PCP3-K_CCR_100 = DSO_PCP3-AMOUNTVR.
DSO_PCP3-K_CCR_110 = 0.
DSO_PCP3-K_CCR_120 = 0.
DSO_PCP3-K_CCR_200 = 0.
DSO_PCP3-K_CCR_210 = 0.
DSO_PCP3-K_CCR_220 = LV_DSO_PCP2-C_AMT_CNP.
DSO_PCP3-K_CCR_230 = 0.
DSO_PCP3-K_CCR_240 = 0.
DSO_PCP3-K_CCR_300 = LV_DSO_PCP2-C_AMT_AMO.
DSO_PCP3-K_CCR_310 = 0.
DSO_PCP3-LOTSIZE = LV_DSO_PCP2-LOTSIZE.
DSO_PCP3-CURRENCY = LV_DSO_PCP2-CURRENCY.
DSO_PCP3-UNIT = LV_DSO_PCP2-UNIT.
0CO_PC_PCP_02 → ODS_PCP3
Keys figures in summation
Fields routines
Costing Variant (COSTVAR) = ZIP.
AMOUNT = WERTF (Fixed value) + WERTV (Variable value)
K_CCR_100 (100 Raw Materials):
IF SOURCE_FIELDS-ELEMT (Cost Component) = '100'.
RESULT = SOURCE_FIELDS-WERTF (Fixed value) + SOURCE_FIELDS-WERTV (Variable value).
K_CCR_105 (105 Packagings):
IF SOURCE_FIELDS-ELEMT = '105'.
RESULT = SOURCE_FIELDS-WERTF + SOURCE_FIELDS-WERTV.
K_CCR_110 (110 Toll Manufacturing):
IF SOURCE_FIELDS-ELEMT = '110'.
RESULT = SOURCE_FIELDS-WERTF + SOURCE_FIELDS-WERTV.
K_CCR_120 (120 Utilities - VC):
IF SOURCE_FIELDS-ELEMT = '120'.
RESULT = SOURCE_FIELDS-WERTF + SOURCE_FIELDS-WERTV.
K_CCR_200 (200 Labor Costs):
IF SOURCE_FIELDS-ELEMT = '200'.
RESULT = SOURCE_FIELDS-WERTF + SOURCE_FIELDS-WERTV.
K_CCR_210 (210 Supplies & Misc.):
IF SOURCE_FIELDS-ELEMT = '210'.
RESULT = SOURCE_FIELDS-WERTF + SOURCE_FIELDS-WERTV.
K_CCR_220 (220 Maintenance):
IF SOURCE_FIELDS-ELEMT = '220'.
RESULT = SOURCE_FIELDS-WERTF + SOURCE_FIELDS-WERTV.
K_CCR_230 (230 Overheads):
IF SOURCE_FIELDS-ELEMT = '230'.
RESULT = SOURCE_FIELDS-WERTF + SOURCE_FIELDS-WERTV.
K_CCR_240 (240 Utilities -FC):
IF SOURCE_FIELDS-ELEMT = '240'.
RESULT = SOURCE_FIELDS-WERTF + SOURCE_FIELDS-WERTV.
K_CCR_300 (300 Depreciation):
IF SOURCE_FIELDS-ELEMT = '300'.
RESULT = SOURCE_FIELDS-WERTF + SOURCE_FIELDS-WERTV.
K_CCR_310 (310 N/A):
IF SOURCE_FIELDS-ELEMT = '310'.
RESULT = SOURCE_FIELDS-WERTF + SOURCE_FIELDS-WERTV.
End routine
The purpose of this routine is to check if the current incoming record already exists in the DSO_PCP3 from the previous month loading. If it exists, delete the incoming record.
DBCOPA01 → DBCOPA24
Key figures in summation
Start routine
In internal tables we collect data from:
- master data c_custid where logsys and custid are the same as in source package, and plant is not empty → itb_shipto
- master data c_plant → itb_plant
- DSO UOMC_MAT → itb_uomc_mat
- DSO dbcopa24 → itb_dbcopa24
- Matser data c_matnr2 in function of logsys and c_matnr from source → itb_matnr2
- Master data c_glbfilt in function of interval defined in master data C_GLBFILT (stream Z_INT_MG, rule VFIELD)→ itb_fieldn
- Master data c_glbfilt in function of interval defined in master data C_GLBFILT (stream Z_INT_MG, rule CALMONTH)→ itb_fieldn
Then, if source of data are not in ITB_FIELDN or ITB_CALMONTH or ITB_SHIPTO we delete the data.
Field routines
0LOTSIZE_IT = 1000
CPFCTR1_2 = CPFCTR1_2 from master data C_MATPNT2 in function of /BIC/C_PLANT & LOGSYS & /BIC/C_MATPNT2 from source of data.
K_CSTUNIT = empty.
C_DSPLANT = c_plant from itb_shipto.
C_PLANT = c_plant from itb_shipto.
End routine
Field routines
In function of records in result package. If a correspondance is found in ITB_MATNR2 and unit in ITB_UOMC_MAT:
k_lotsze = k_lotsze * ITB_UOMC_MAT-uomz1d (Quantity - Nominator) / ITB_UOMC_MAT-uomn1d (Quantity -Denominator).
unit = itb_matnr2-base_uom.
In function of records in result package. If a correspondance is found in ITB_PLANT and if the source currency is defferent from currency in ITB_PLANT:
Module function " Z_CONVERT_CURRENCY " is used to convert k_intdut ( Integrated Duty unit cost ) in plant currency.
K_INTDUT = SUM OF K_INDUT * 1000 / SUM OF LOT_SIZE
In function of records in result package (fields calmonth, logsys, c_dpplant, c_dsplant, c_matnr2) if a correcpondance is found in itb_dbcopa24, k_lotsze = 1000 else k_lotsze = 0.
( LOT_SIZE = 1000 ONLY IF KEY DOESN'T ALREADY EXIST)
In function of records in result package, if a correcpondance is NOT found in itb_matnr2, C_PFCTR1_2 is empty.
Delete data with C_PFCTR1_2 empty.
Delete data with k_intdut = 0.
ODS_PCP6
ODS_PCP6 is loaded by programs Z_M_INT and Z_M_INT_IP in process chain PC_INT_MARGIN.
Z_M_INT
This program updates ODS_PCP6. Because of the number of line of the program and is aim, a program is more appropriated than a start routine.
The aim of is program is to split the cost for each article in the cost types : VC/FC/DEP.
If a product is used on another product costing structure, its VC/FC/DEP are applied on the product which it is a component even if there are some exchanges between plant of different controlling area.
If VC/FC/DEP can’t be determined for a component, we take standard VC/FC/DEP from ODS_PCP3
This program also takes account of :
- Transport cost between plants.
- Change of currency, weight, between the initial CCR calculation and its using as component for a product,
- Weight conversion from TMA/KAM to TO/KG.
On input for this program, we have several lines.
On output, only one line for each date/article/plant.
This program updates a transactional ODS. (ODS_PCP6)
Functional rules and algorithm.
Selection screen
Multi selection on article, Costing variant, and plant.
Only one possible selection and obligatory for period. (Format 001.2006)
Treatment
Extraction of general data
Extraction of data in internals tables for better performance
- ODS_MARM (Material units of quantity)
→ for Alternative Unit of Measure (/BIC/U_MEINH) = KGW ou TOP.
- ODS_PCP5 (CCR : plant transfer - cost transport)
- TCURR (conversion rate)
→ for Exchange rate type (KURST) = CAR1 et To-currency (TCURR) = EUR.
Euro is master currency to convert.
- ODS_PCP2 (CCR: Cost elements matrix)
→ for Chart of accounts (CHRT_ACCTS) = Z001.
- ODS_PCP1 (CCR: Product Cost Items)
→ For data input on selection screen and for Costing variant (COSTVAR) not equal to ZI
- ODS_PCP3 (CCR: released costs)
→ For data input on selection screen, for Currency Type = 10 and period of the selection screen.
- dbcopa24 (Transport Costs & Duties)
Extraction of the unit data.
FOR each line of ODS_PCP1.
Build of block of data with all the cost items for a product and for all its components (in an iterative way).
The principle is to extract the cost items as long as there are components (and components of components).
The principle is iterative because each new extraction is added in the table of treatment of the cost items in progress.
‘Cost item’ already used ? (access to internal table which is storing ‘Cost item’ used : ITB_TRAITE)
IF not, go on.
Extraction of all the Cost item for the Cost item in treatment on ODS_PCP1.
Put them in ITB_STOCK.
FOR each ‘Cost item’ (ITB_STOCK)
Sorting and suppressing duplicates in list of product already used (ITB_TEMOIN)
We store the Article/Division couple in internal table (ITB_TEMOIN) in order to be able to stop the extraction in the event of recursive call.
FOR each new ‘block’ of Cost item.
Incrementing of the ‘level’ (W_LVL)
(The goal is to note the order of calculation of the Cost item in order to low reflect the costs of the components on the components superior).
ENDFOR.
Affecting of this ‘lvl’ to the Cost item in treatment (in ITB_STOCK).
IF the Cost item has no component, or IF the component is the product in treatment and component’s plant is the same as the product’s plant.
Go on until the next Cost item (in ITB_STOCK)
ELSE.
IF the component’s ‘Cost item’ have not already been extract (field duplicates)
Extraction of all the ‘Cost item’ of the component (ODS_PCP100) for Costing Date,
Costing Variant, Costing Version, Fiscal year variant, component’s plant, component,
Fiscal year / period (Month), and Item Category Cost Estimate Itemization not equal ‘V’.
IF not found, same access but without Costing Version and with Costing Variant not
Equal to ‘ZI’ or ‘ZRE’.
ENDIF.
Component already extract ?
Access to table ITB_TEMOIN for component and component’s plant.
IF found, put a flag as duplicate
ENDIF
We store the ‘Cost item’ in ITB_STOCK.
ENDIF (no duplicates)
ENDIF (extraction)
ENDFOR (each ‘Cost item’ (ITB_STOCK))
Now we have all the structure
We start with the more over low level ‘Cost control’
Sort of table ITB_STOCK by LVL decreasing.
We don’t calculate duplicate records
Deletion of duplicate records in ITB_STOCK (doublon = ‘X’)
Treatment of extracted data
FOR each ‘Cost item’ in ITB_STOCK.
We determine the element cost with the cost element.
Access to ODS_PCP2 with cost element of ‘Cost item’ --> cost element determination
We store ‘Cost item’ by number in order to treat all of the ‘Cost item’ of one component at the same
time. (creation of a “ ‘Cost item’ block “ --> ITB_TEMPS)
In end of ‘Cost item block’ (AT END)
Product already calculated ?
Access to ITB_RESULT to verify is the product is calculated or not.
IF not, we calculate it.
First we calculate ‘Cost item’ without component.
Sort of ITB_TEMPS by component (growing)
FOR all of the product’s ‘Cost item’ (ITB_TEMPS)
We populate ‘general’ fields of the component if it is not already done :
Costing Date, Costing Variant, Costing Version, Costing type, Ledger for Controlling objects, Costs entered manually in additive or automatic cost est. Reference object, Fiscal year variant, Plant, Material, Lot Size, Unit of measure, Currency key, Base Unit of Measure.
IF ‘Cost item’ hasn’t components or if the component is equal to the product but on the same plant.
IF the component is a reject (itself)
We take the standards cost of the reject component (because we are calculating its cost)
--> access to ODS_PCP3 with C_MATNR = ITB_TEMPS-C_COMPNT & PLANT = ITB_TEMPS-PLANT_COMP
If correspondance found in ODS_PCP3:
We populate fields and key figures with values from ODS_PCP3:
costvar, costvers, fiscvarnt, lotsize_it, cp, cnp, amo, cp_raw, cp_pck, cp_tol, cp_uti, unit, currency.
ELSE we don't change the fields and key figures.
We assign the key figures calculated (same as source or from ods_pcp3) in key_figures CP_AMOUNT, CNP_AMOUNT, AMOU_AMOUNT, CP_RAW_AMOUNT, CP_PCK_AMOUNT, CP_TOL_AMOUNT, CP_UTI_AMOUNT.
We affect the rest in function of standart cost:
If material is empty
Calculate standard amontvr / amountfx / amount, in function of cost component.
If cost component = 100, the key figure "CP_RAW" are calculated.
If cost component = 105, the key figure "CP_PCK" are calculated.
If cost component = 110, the key figure "CP_TOL" are calculated.
If cost component = 120, the key figure "CP_UTI" are calculated.
If material is not empty:
Check if the unit from the component is not the same from material:
If units are not the same, use module function Z_MD_CONVERT_MATERIAL_UNIT_ F to convert component to same unit as material.
Calculate "PARENT" key_figures CP_AMOUNT, CNP_AMOUNT, AMOU_AMOUNT, CP_RAW_AMOUNT, CP_PCK_AMOUNT, CP_TOL_AMOUNT, CP_UTI_AMOUNT.
ELSE, this is a classic unit.
IF ‘Cost item’ start by ‘1’.
Calculate the CP
ELSE ‘Cost item’ start by ‘2’.
Calculate the CNP
ELSE ‘Cost item’ start by ‘3’.
Calculate the AMO
ELSE ‘Cost item’ start by ‘4’.
Integrated Duty with data from CPX (assigned in cost component 400 and 500 in loading of DSO ABDSOPCP1)
ELSE ‘Cost item’ start by ‘5’.
Integrated Freight with data from CPX (assigned in cost component 400 and 500 in loading of DSO ABDSOPCP1)
ENDIF.
ENDIF (component is a reject).
ELSE cost’s component treatment.
We take components with the same cost variant.
--> access to ITB_RESULT
IF we find nothing, same access but without cost variant and we take the first
we find. --> access to ITB_RESULT
IF we find nothing, we take the standard costs
ENDIF.
ENDIF.
ENDIF.
Weight conversion TMA and KMA
IF component’s unit is ‘TOP’ or ‘KWG’ or ' KRE'
Access to ODS_MARM to take numerator and denominator.
Quantity = quantity * numerator / denominator.
Change of unit quantity : TOP --> TO and KWG --> KG and KRE → base unit
ENDIF.
IF this is a sale of a product between two plants, we add the transport cost only if the company of issuing plant is not the same of the destination plant.
Access to DBCOPA24 (itb_mat_tran_duty) with Plant at destination point = Product’s plant, Plant at point of departure = component’s plant, material = component's material, to get the transportation cost from material level.
If correspondance.
If currencies are not the same:
Currency conversion with Z_CONVERT_CURRENCY_F.
ENDIF.
If not correcpondance with DBCOPA24:
Access to ODS_PCP5 with Plant at destination point = Product’s plant
Plant at point of departure = component’s plant
Cost’s date in validity date.
IF there is a change of weight unit between ITB_TEMPS-MENGE and LOTSIZE_IT.
Weight conversion with MF ' Z_MD_CONVERT_MATERIAL_UNIT_F '.
ENDIF.
The cost is on local currency so there is no currency change. But we have to add the transport cost to the VC cost already calculated (proportional).
ENDIF.
IF there is a change of currency between product and component
Conversion for component → MF 'Z_CONVERT_CURRENCY_F'.
ENDIF.
We convert if necessary the CP, CNP, AMO, DUTY and FREIGH with FM Z_CONVERT_CURRENCY_F .
Storage of the integrated costs key figures in internal table → ITB_RESULT
ENDIF (IF not, we calculate it.)
ENDAT (In end of ‘Cost item block’)
Storage of the ‘Cost item’ used in internal table → ITB_TRAITE.
ENDFOR (all ‘Cost item’ in ITB_STOCK)
ENDIF (FOR each ‘Cost item’ in ITB_STOCK.)
ENDFOR (FOR each ‘Cost item’ in ODS_PCP1)
Storage of the cost’s products in ODS_PCP6
→ deletion of all records in ODS_PCP6
→ insertion of the new records.
ODS_PCP6 → ODS_PCP4
End routine
If the unit is different from "KG", module function Z_MD_CONVERT_MATERIAL_UNIT_F is used to convert the k_lotsize in KG.
- 2.2 Dependencies with other applications
- We should have the information where the application is sending or receiving information (e.g. APD open hub)
3.0 Data Loading
3.1 Info Providers and objects loaded
Detail of process chain, list + link between or special event done for the loading
| Main Process Chain | Final Provider Loading | Frequency | Time start | Duration |
|---|---|---|---|---|
| RSP_COPCP_MONTHLY | DSO_PCP2 DSO_PCP1 / ODS_PCP1 | |||
| RPC_CCR_PCP1_MTHLY_CHAIN | DSO_PCP3 / ODS PCP3 / CUB_PCP1 / | |||
| PC_COPA_PL_46 | ODS_PCP5 | |||
| PC_COPA_PL_21 | DBCOPA24 | |||
| PC_INT_MARGIN | ODS_PCP6 / ODS_PCP4 | |||
























































