1. Introduction
Company finalizes standard cost estimates for a given period in advance. That means all costs, including raw material, in the costing run need to be considered as applicable in future date. Standard Cost Estimates Transactions CK40N and CK11N read standard cost of raw material at the time of executing Standard Cost Estimates. So we need to develop process to load future standard cost and configure product costing valuation variant to read future standard cost from accounting view.
2. Configuration and Development
2.1 Create LSMW to load future standard cost of Raw Material
2.1.1 Use Business Object Method (BAPI)
Business Object | BUS1001006 |
Method | SAVEDATA |
Message Type | MATMAS_BAPI |
Basic Type | MATMAS_BAPI01 |
2.1.2 Source Fields
MATNO | C(018) | material number |
VALID | DMDY(010) | Valid from |
PLANT | C(004) | Plant |
PRICE | AMT1(015) | Price |
PUNIT | N(006) | Price unit |
2.1.3 Structure Relations
E1BPMATHEAD | Header Segment with Control Information | <<<< MAT_PRICES Material prices |
E1BP_MARA | Material Data at Client Level | |
E1BP_MARAX | Checkbox Structure for BAPI_MARA | |
E1BP_MARC | Material Data at Plant Level | |
E1BP_MARCX | Checkbox Structure for BAPI_MARC | |
E1BP_MPOP | Forecast Parameters | |
E1BP_MPOPX | Checkbox Structure for BAPI_MPOP | |
E1BP_MPGD | Change Document Structure for Material Master / Produc Group | |
E1BP_MPGDX | Checkbox Structure for BAPI_MPGD | |
E1BP_MARD | Material Data at Storage Location Level | |
E1BP_MARDX | Checkbox Structure for BAPI_MARD | |
E1BP_MBEW | Valuation Data | <<<< MAT_PRICES Material prices |
E1BP_MBEWX | Checkbox Structure for BAPI_MBEW | <<<< MAT_PRICES Material prices |
E1BP_MLGN | Warehouse Number Data | |
E1BP_MLGNX | Checkbox Structure for BAPI_MLGN | |
E1BP_MVKE | Sales Data | |
E1BP_MVKEX | Checkbox Structure for BAPI_MVKE | |
E1BP_MLGT | Storage Type Data | |
E1BP_MLGTX | Checkbox Structure for BAPI_MLGT | |
E1BP_MAKT | Material Descriptions | |
E1BP_MARM | Units of Measure | |
E1BP_MARMX | Checkbox Structure for BAPI_MARM | |
E1BP_MEAN | International Article Numbers (EANs) | |
E1BP_MLTX | Long Texts | |
E1BP_MLAN | Tax Data | |
E1BP_MATRETURN2 | Substitute Structure for Return Parameter BAPIRET2 | |
E1BP_MFHM | Production Resource Tool (PRT) Fields in the Material Master | |
E1BP_MFHMX | Checkbox Structure for BAPI_MFHM | |
E1BPPAREX |
| |
E1BPPAREXX | Checkbox Structure for Extension In/Extension Out |
2.1.4 Field Mapping and Conversion Rules
E1BPMATHEAD MATERIAL | Material Number Source: MAT_PRICES-MATNO (material number) Code: E1BPMATHEAD-MATERIAL = MAT_PRICES-MATNO. CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT' EXPORTING INPUT = MAT_PRICES-MATNO IMPORTING OUTPUT = E1BPMATHEAD-MATERIAL . |
E1BPMATHEAD ACCOUNT_VIEW | Accounting View Rule: Constant Code: E1BPMATHEAD-ACCOUNT_VIEW = 'X'. |
E1BPMATHEAD VAL_AREA | Valuation Area Code: E1BP_MBEW-VAL_AREA = MAT_PRICES-PLANT. |
E1BP_MBEW VAL_AREA | Code: E1BP_MBEW-VAL_AREA = MAT_PRICES-PLANT. |
E1BP_MBEW
PRICE_UNIT | Code: E1BP_MBEW-PRICE_UNIT = MAT_PRICES-PUNIT. |
E1BP_MBEW
FUTURE_PR | Code: * Keep computing format for amount value (1234.56-) E1BP_MBEW-FUTURE_PR = MAT_PRICES-PRICE. translate E1BP_MBEW-FUTURE_PR using '" , '. condense E1BP_MBEW-FUTURE_PR no-gaps. |
E1BP_MBEW
VALID_FROM | Date as of which the price is valid Code: * date as MMDDYYYY E1BP_MBEW-VALID_FROM = MAT_PRICES-VALID. |
2.2 Create a background job to perform mass load from a flat file
2.2.1 Use Program /SAPDMC/SAP_LSMW_INTERFACE to create a job which will need to create a variant to reference the LSMW.
2.3 Proposed configuration
2.3.1 Change Valuation Variant assigned to the costing variant
Product Cost Controlling --> Product Cost Planning --> Material Cost Estimate with Quantity Structure --> Define Costing Variants
Strategy G should be maintained as priority 1. It means System would read future price first. if future standard price is not available then it would look for current standard Price. Standard Cost Estimates Execution When we execute CK40N or CK11N, we have to specify various dates based on Valuation Date, system derives Standard cost from MBEW .
Scenario A: MBEW Table
Materials Number | Valuation Area | Pricing Indicator | per | Moving Avg | Standard Prce | Future Price | Valid From |
A110001 | 1001 | S | 100 | 0 | 1,103,443.00 | 1,104,554.00 | 2/1/2014 |
Above Costing Run in Scenario A for a Material# A110001 would read Future Standard Price 1,104,554.00 which is valid effective 02/01/2014 from the table MBEW: This is because Valuation date in the costing variant if 02/01/2014
Scenario B: MBEW Table
Materials Number | Valuation Area | Pricing Indicator | per | Moving Avg | Standard Prce | Future Price | Valid From |
A110001 | 1001 | S | 100 | 0 | 1,103,443.00 | 1,104,554.00 | 3/1/2014 |
Above Costing Run in Scenario B for a Material# A110001 would read Standard Price 1,103,443.00 which is valid effective 02/01/2014 as current price from the table MBEW: This is because Future Price Valid from date is out of range for the valuation date in the costing variant if 02/01/2014.