Friday, 10 November 2017

S/4 HANA F4 Help values, Key & Text display in ABAP CDS Views based reports

Overview:


F4 help values, Key & Text display is standard feature in SAP however in Embedded Analytics reports (Custom ABAP CDS views Development) these two functionalities will not come by default. This blog will help how to leverage these functionalities in custom developed reports in Embedded Analytics.

Version: S/4 HANA 1610

Problem Statement:


For custom developed ABAP CDS views based reports in Embedded Analytics F4 help values, Key & Text display was not appearing in reports by default as in ABAP reports or in BW reports.

Solution:


Follow the below steps to leverage these two standard functionalities in Embedded Analytics reports.

Prerequisite: In this blog we are using standard Basic Views to bring F4 help values, Key & Text usage in reports. By default highlighted annotations should be there in the standard ABAP CDS views if not add these two annotations to leverage F4 help values, Key & Text display in reports.

SAP S/4HANA, SAP Live, SAP All Modules, SAP Module, SAP Certifications

Scenario 1:


When dimension (Material) is inherited from custom/standard CDS view in the basic/composite CDS view. Report should show F4 help values, Key & Text display.

Step 1: In the basic CDS view Material should come from I_PurchasingDocumentItem hence association is created in the standard CDS view.

SAP S/4HANA, SAP Live, SAP All Modules, SAP Module, SAP Certifications

I_PurchasingDocumentItem CDS view

SAP S/4HANA, SAP Live, SAP All Modules, SAP Module, SAP Certifications

In I_PurchasingDocumentItem CDS view I_Material is already associated hence it is not required to associate separately with I_Material in our CDS view, directly we can consume those associations in our views as mentioned below.

This is required because we are directly bringing the text in composite view hence the below code is mandatory.

_PurchaseItem._Material

Step 2: In the composite view mention the below highlighted annotations so that text can derive from the Basic view (Step 1).

SAP S/4HANA, SAP Live, SAP All Modules, SAP Module, SAP Certifications

In the above code we have to mention the Text associated view name next to the Key hence _Material is mentioned after _Purchase.Material

Step 3: In Consumption view mention the query display as Key and Text as mentioned below.

SAP S/4HANA, SAP Live, SAP All Modules, SAP Module, SAP Certifications

Step 4: Now run the report in RSRT or Analysis Office, highlighted (Yellow) is text for Material which wasn’t appearing earlier.

SAP S/4HANA, SAP Live, SAP All Modules, SAP Module, SAP Certifications

Scenario 2:


When dimension (GL Account) is coming from table, report should have F4 help values, Key & Text display.

Step 1: Here GL Account number is directly coming from EKKN table.

SAP S/4HANA, SAP Live, SAP All Modules, SAP Module, SAP Certifications

Mention the foreign key association as mentioned below.

SAP S/4HANA, SAP Live, SAP All Modules, SAP Module, SAP Certifications

Step 2: GL Account number is coming from table hence we need to separately associate GL Account to bring the F4 help value hence the standard CDS view I_GLAccount is used in our composite view.

SAP S/4HANA, SAP Live, SAP All Modules, SAP Module, SAP Certifications

Mention the foreign key association as mentioned below.

SAP S/4HANA, SAP Live, SAP All Modules, SAP Module, SAP Certifications

GL Account F4 help value need to display Text as well hence in the composite view we have mentioned the association name 

SAP S/4HANA, SAP Live, SAP All Modules, SAP Module, SAP Certifications

No need to mention the association name next to GL Account Number as mentioned in Scenario 1 (Step2) because here we are explicitly associating GL Account basic view in the composite view hence it is not required.

Step 4: In Consumption view mention the query display as Key and Text.

SAP S/4HANA, SAP Live, SAP All Modules, SAP Module, SAP Certifications

Step 5: Run the report through RSRT or Analysis office, earlier F4 help for GL Account wasn’t appearing earlier.

SAP S/4HANA, SAP Live, SAP All Modules, SAP Module, SAP Certifications

As GL account standard ABAP CDS view will bring text, we have enabled the text in our CDS view so report will display the text as well. Highlighted (Yellow) columns are text fields in report which wasn’t appearing earlier.

SAP S/4HANA, SAP Live, SAP All Modules, SAP Module, SAP Certifications

Scenario 3:


When dimension (Document Year) is coming from table, report should have F4 help values no need of Key & Text display.

Step 1: Here Material Document Year is directly coming from EKBE table in our basic view.

SAP S/4HANA, SAP Live, SAP All Modules, SAP Module, SAP Certifications

Step 2: Material Document Year is coming from table hence we need to separately associate Document Year in composite view to bring the F4 help value hence the standard ABAP CDS view I_CalendarYear is used.

SAP S/4HANA, SAP Live, SAP All Modules, SAP Module, SAP Certifications

Mention the foreign key association as mentioned below.

SAP S/4HANA, SAP Live, SAP All Modules, SAP Module, SAP Certifications

Step 3: In Consumption view mention your selection prompt annotations.

SAP S/4HANA, SAP Live, SAP All Modules, SAP Module, SAP Certifications

Step 4: Run the report through RSRT or Analysis office, earlier F4 help for Document Year wasn’t appearing earlier.

SAP S/4HANA, SAP Live, SAP All Modules, SAP Module, SAP Certifications

Thursday, 9 November 2017

ABAP Performance Test: Hashed Tables vs Database Buffers

There are two significant techniques to avoid repetitive access to database records: Hashed internal tables and database buffers.

If we decide to use the former method, we need to get the database record into a hashed internal table. Whenever we need to access the record, we read the internal table instead of the database table.

If we decide to use the latter method, all we need to do is to activate the table buffer in SE11. If we do that, the accessed data is cached on the application server, and the cache is used whenever possible. Thus, database access is reduced. There are exceptional cases where the buffer is bypassed, but that’s beyond the scope of this article.

Wondering how they compare in terms of performance, I created a fully buffered database table with example data.

SAP ABAP Development, SAP ABAP Guides, SAP Live, SAP Certifications

I also wrote a program, which accesses the data using both techniques and compares the runtime.

It turns out that hashed access is 3-4 times faster than database buffering.

SAP ABAP Development, SAP ABAP Guides, SAP Live, SAP Certifications

You can use the attached source code yourself and repeat the test; I would like to hear about any disproving results.

REPORT  zdummy01.

CLASS main DEFINITION.
  PUBLIC SECTION.
    CLASS-METHODS execute.
  PROTECTED SECTION.
  PRIVATE SECTION.

    CONSTANTS:
      c_do_times TYPE i     VALUE 100,
      c_matnr    TYPE matnr VALUE 'M1'.

    CLASS-DATA:
      go_text  TYPE REF TO cl_demo_text,
      gv_begin TYPE i.

    CLASS-METHODS:
      hash,
      select,
      start_chrono,
      stop_chrono.

ENDCLASS.                    "main DEFINITION

CLASS main IMPLEMENTATION.

  METHOD execute.

    go_text = cl_demo_text=>get_handle( ).

    start_chrono( ).
    hash( ).
    stop_chrono( ).

    start_chrono( ).
    select( ).
    stop_chrono( ).

    go_text->display( ).

  ENDMETHOD.                    "execute

  METHOD hash.

    DATA:
      lt_dummy
        TYPE HASHED TABLE OF zdummy01
        WITH UNIQUE KEY primary_key COMPONENTS matnr.

    FIELD-SYMBOLS:
      <ls_dummy> LIKE LINE OF lt_dummy.

    go_text->add_line( 'Starting hash read' ).

    SELECT * INTO TABLE lt_dummy FROM zdummy01.

    DO c_do_times TIMES.

      READ TABLE lt_dummy
        ASSIGNING <ls_dummy>
        WITH TABLE KEY primary_key
        COMPONENTS matnr = c_matnr.

    ENDDO.

  ENDMETHOD.                    "hash

  METHOD select.

    DATA ls_dummy TYPE zdummy01.

    go_text->add_line( 'Starting select' ).

    DO c_do_times TIMES.

      SELECT SINGLE *
        INTO ls_dummy
        FROM zdummy01
        WHERE matnr EQ c_matnr.

    ENDDO.

  ENDMETHOD.                    "select

  METHOD start_chrono.
    GET RUN TIME FIELD gv_begin.
  ENDMETHOD.                    "start_chrono

  METHOD stop_chrono.

    DATA:
      lv_diff  TYPE i,
      lv_difft TYPE cl_demo_text=>t_line,
      lv_end   TYPE i.

    GET RUN TIME FIELD lv_end.
    lv_diff = lv_end - gv_begin.
    WRITE lv_diff TO lv_difft LEFT-JUSTIFIED.

    go_text->add_line(:
      'Runtime result:' ),
      lv_difft ).

  ENDMETHOD.                    "stop_chrono

ENDCLASS.                    "main IMPLEMENTATION

START-OF-SELECTION.
  main=>execute( ).

Wednesday, 8 November 2017

Unified Legacy Decommissioning using SAP Information Lifecycle Management

Introduction


In today’s Enterprise Information is critical to business with multiple SAP and Non SAP Enterprise applications. These applications have both structured and unstructured data used for business, legal and audit requirement.

The challenge now before all Enterprise, is to understand how their data evolves, determine how it grows, monitor how its usage changes over time, and decide how long the data should be retained in the system. Whilst adhering to all the rules and regulations that now apply to that specific structured and unstructured data.

ILM has become especially critical to enterprises in the last two or three years. Compliance mandates, and especially legal reporting requirements, have changed and increased dramatically in number. This forces companies to think more carefully about how they compile their legal reports, what the ideal legal reporting process should look like, and how this all fits into the management of information.

SAP Information Lifecycle Management (ILM) is designed to address these challenges with a combination of processes, policies, software and hardware so that the appropriate technology shall be used for each phase of the lifecycle of the data.

Typical challenges (or) risks that are to be addressed in a data lifecycle:

◉ How to ensure that the data that is required for an audit or regulatory compliance are readily available or the data that must be deleted have actually been purged from the systems?
◉ How to ensure that data from the legacy systems is still be reported
◉ How to address the increasing TCO of the unsupported legacy application and unstable legacy infrastructure?

SAP NW ILM is introducing a new approach to streamline Productive SAP System archiving and legacy system decommissioning, new support for consolidated data storage environments using SAP Sybase IQ, and a new tool to helps ILM administrators efficiently manage the information life cycle and data archiving processes.

SAP Information Lifecycle Management (SAP ILM) is based on the following pillars: ·

◉ Data archiving (active data and system)
◉ Retention management (end-of-life data)
◉ Perform e-discovery and set legal holds
◉ System decommissioning (end-of-life system)

SAP ILM Key Features:

◉ Policy Management
◉ Data Destruction
◉ Legal Holds & eDiscovery
◉ Support for Sybase IQ
◉ Audit compliant decommission of legacy SAP and Non-SAP systems
◉ Flexible reporting on legacy systems tax content and product liability content
SAP ILM Key Benefits:

◉ Archive obsolete data to enhance performance
◉ Reduction in HANA appliance footprint.
◉ Support data retention rules by creating separate archives based on varying data lifetimes
◉ Preserve compliance auditing and reporting capabilities for decommissioned systems
◉ Reduce the cost and risk of legal discovery
◉ Reduction in overall TCO

Unified approach for Legacy Decommissioning for SAP and Non-SAP environment

SAP NW ILM provides a new unified approach for retiring the Legacy SAP and Non SAP environment using the SAP SLT (System Landscape Transformation), Legacy Extraction workbench (CDE archive Objects) and SAP ILM Retention warehouse with ILM Certified stored based on Sybase IQ / SAP HANA or any SAP Certified ILM Store.

The new decommissioning solution helps to automate many manual steps, reduce the risk of errors, increase the overall data quality, and lower the overall costs and duration of decommissioning projects. The typical legacy decommissioning process is as below:

SAP ERP, SAP All Module, SAP Live, SAP Materials, SAP Certification

◉ Perform Data profiling to identify the scope of the data / tables to be archived
◉ Extract and load data from legacy system using SLT into the mapping tables in to target SLT environment.
     ◉ The process of mapping non-SAP content to SAP structures is automated, but can be fine-tuned to ensure correct reporting and data display later in the decommissioning process.
◉ Perform Legacy Extraction workbench (LEW) configuration to define archiving objects

SAP ERP, SAP All Module, SAP Live, SAP Materials, SAP Certification

◉ Define Audit Area, ILM Policies and Rules
◉ Perform LEW run to create archive objects with retentions rules
◉ Transfer Archive files to SAP ILM RW and store in ILM Certified store (Sybase IQ)

The Meta information of the legacy tables are transferred through special archiving objects that enables to retain the Meta information of the legacy tables in ILM RW for retrieval and reporting.

Retrieval and Reporting

In the newer version of SAP NW ILM, delivers enhanced reporting to address various legal and auditing reporting requirement. There are multiple reporting options including local reporting, accelerated / business user reporting and BW reporting

SAP ERP, SAP All Module, SAP Live, SAP Materials, SAP Certification

ILM Provides a Choice for Different Reporting Needs
  • Flexible
    • Use pre-delivered/existing BW content or check out increasingly available HANA content
    • Use available BO portfolio and existing export functions (AIS)
    • Choose between basic (local) reporting or complex queries based on (easy) modelling
    • Load only data that is needed for the reporting purpose
  • Comprehensive
    • Extend the scope of reporting by SAP HANA (e.g. open items without sec. indices
    • Report both live SAP and legacy data (SAP and Non-SAP data)Support of new scenarios (e.g. partial migration/conversion)
  • Fast
    • Increase the overall performance with SAP HANA (DB)
    • Shorten project implementation time through content reuse
Innovative Integrate archiving solution using SAP ILM and Sybase IQ for Production environment

The customer used to use NLS for OLAP and Archivelink (or) WebDAV storage for OLTP applications. With the new SAP ILM Retention management solution for operational (live) archiving with Sybase IQ, address the challenge of having two dedicated storage for OLAP and OTLP environment.

Netweaver ILM functionality has the option to store operational data on Sybase IQ (using ILM Store Retention Services), along with the new analytical data using new native BW NLS interface for Sybase IQ (available as of SAP NW 7.30 SP09 and NW 7.31 SP07).

Storing your data in SAP Sybase IQ enables customer to consolidate the storage infrastructure on a single platform and avoid the software, hardware, network, and operations requirements associated with the integration of third-party compliant stores.

SAP ERP, SAP All Module, SAP Live, SAP Materials, SAP Certification

Key Benefits

◉ Unified Storage for OLTP and OLAP archiving
◉ Reduction of the volume of data and archive indexes stored
◉ Improved Performance for data archiving and accessing archived data
◉ Increased search capabilities

Tuesday, 7 November 2017

How to Create and Read Flat IDocs from Files in SAP

I have recently come  across the need to “manually” move an IDoc for testing purposes form one SAP system to another. The two systems were in two different environments and not planned to be connected network wise. So we needed a way to export and import an IDoc.

The idea was to export the IDoc on system A to a file and then import it in system B from that file. It seemed an easy task, but turned out to be quite tricky. I haven’t found much help from searching online or in SAP docs but enough to put something together that worked at the end. I’d like to share this here in a step-by-step guide.

Please note that this is only for manual testing purposes for single cases and not intended to serve as any kind of IDoc interface.

We firsts export an existing IDoc from source system, download the file to the local computer and then upload it to another system:

1. How to export a flat IDoc file in SAP ERP:


SAP GUI, Transaction Code: WE19

1. Load an existing Idoc (see we02) via idoc number.

2. Click on “inbound file” (note: this is actually confusing. You’re going to write a file to the file system, but the function is called inbound file. But it’s all right and you can go ahead.)

3. Enter a path on the server (use transaction AL11 to find a suitable path) and a filename. The file name can be chosen freely. Execute the function and ignore the error about the not found port!

SAP ERP, SAP Tutorial, Material and Certification, SAP Guides, SAP Module, SAP Live

4. Download the exported file to your local machine using Transaction Code: CG3Y (or FM ARCHIVFILE_SERVER_TO_CLIENT as per a reader’s comment).
You can also use AL11 which displays a list of all available files. Select the file and then click the button marked below (“Download File as Text”):

SAP ERP, SAP Tutorial, Material and Certification, SAP Guides, SAP Module, SAP Live

5. Target is a patch on your local machine.

6. Choose ASC for ASCII mode.

7. Execute the download.

8. You can now edit the file on your PC if needed, or further process/distribute it. Or you can now upload it e.g. to another SAP system and edit it there before processing (see next chapter).

SAP ERP, SAP Tutorial, Material and Certification, SAP Guides, SAP Module, SAP Live

2. Upload and Inbound Process a Flat IDoc File


1. Upload the file using transaction code CG3Z (or FM ARCHIVFILE_CLIENT_TO_SERVER as per a reader’s comment) e.g. to a temp directory.

2. Use t.code WE19 and select “File as Template”.

3. Enter the path where you’ve uploaded the file and the filename.

SAP ERP, SAP Tutorial, Material and Certification, SAP Guides, SAP Module, SAP Live

4. The test tool displays your IDoc, you can also change it here.

5. You also need to create the control record (I don’t go into details of this here as this is required knowledge about the standard IDoc processing and can be found elsewhere). To create the control record, click on the first line in the editor and enter the data as needed (of course, change the name to your IDoc’s message type. Here it’s a business partner IDoc) :

SAP ERP, SAP Tutorial, Material and Certification, SAP Guides, SAP Module, SAP Live

6. When you’re ready, click “Standard Inbound”. If a partner profile (WE20) exists, it will be processed after executing the function (or collected for later processing). See the status of the new IDoc in WE02.

Monday, 6 November 2017

SD Pricing : Cross Module Reference Condition Type (Config)

Some times we may need to copy price from MM Condition record to SD condition Record. There can be various reasons as mentioned below:

1) In India, Excise calculation Base needs to be kept same for Intra Company STO / Inter Company STO and Billing Document.

2) Base Price needs to be kept same Bet’n STO and Invoice.

3) Certain Discount or Surcharge needs to be copied from MM to SD or Vice Versa.

When first time I tried , I faced difficulty but got successful in the same, so thought to share it with you also.

Below are the steps which I had followed:

1. Created Identical Condition Type in SD and MM. It needs to be identical considering SAP needs controlling point like Condition Class / Calculation Type.

MM Condition Type:

SAP All Module, SAP SD, SAP Tutorial, Material and Certification, SAP Guides

MM Access Sequence:

SAP All Module, SAP SD, SAP Tutorial, Material and Certification, SAP Guides

SD Condition type: (It is identical to MM Condition type, Only Ref. Condition Type field is updated with MM Condition type and Application as Purchasing.)

SAP All Module, SAP SD, SAP Tutorial, Material and Certification, SAP Guides

SD Access Sequence: (Observe here, I have used Same Condition Table which was created in MM., If you will press F4, You will not see those Condition Table but If you will directly enter the same, System will allow MM Condition Table in SD as well.)

SAP All Module, SAP SD, SAP Tutorial, Material and Certification, SAP Guides

SD Pricing Procedure:

SAP All Module, SAP SD, SAP Tutorial, Material and Certification, SAP Guides

2) Maintain Condition Record for MM Condition Type by MEK1 T-Code.

SAP All Module, SAP SD, SAP Tutorial, Material and Certification, SAP Guides

3) Maintain Condition Record for SD Condition type by VK11 with Zero Price. (Why Do we need to maintain this ?? 

Ans: In SAP For Populating condition value from Other Module condition record, system search that if this condition has been proposed in Pricing or not. That’s why we need to maintain Condition record with Zero value so it get’s Populated in Pricing.)

SAP All Module, SAP SD, SAP Tutorial, Material and Certification, SAP Guides

SAP All Module, SAP SD, SAP Tutorial, Material and Certification, SAP Guides

4) Create STO and reach till Billing Creation with Standard way. Check the Pricing now in Invoice.

SAP All Module, SAP SD, SAP Tutorial, Material and Certification, SAP Guides

SAP All Module, SAP SD, SAP Tutorial, Material and Certification, SAP Guides

SAP All Module, SAP SD, SAP Tutorial, Material and Certification, SAP Guides

As per above Screenshots, system has called MM Condition record to SD Pricing.

Thursday, 2 November 2017

Free Goods Determination in SAP CRM

This document will cover steps for creating free goods determination procedure and conditions in SAP ERP and downloading the same in SAP CRM. The Sales order would be created in SAP CRM and the free goods would be determined for the same.

SAP ERP:


1. Maintain Free Goods Condition Table:

SPRO – SD – Basic Functions – Free Goods – Condition Technique for Free Goods – Maintain Condition Tables

Select the fields combining which you want the free goods conditions to be created. For eg. you can check the standard condition table, 010, wherein  the fields Sales Org, Distribution Channel, Customer and Material is used for creating free goods conditions.

2. Maintain the Access Sequence:

SPRO – SD – Basic Functions – Free Goods – Condition Technique for Free Goods – Maintain Access Sequence

Select the condition tables created above and maintain them in the desired sequence in the access sequence.

SAP CRM, SAP All Modules, SAP Guides, SAP Module, SAP Live, SAP Learning

3. Maintain the Condition Type

SPRO – SD – Basic Functions – Free Goods – Condition Technique for Free Goods – Maintain Condition Types

Create a Condition Type and assign the Access Sequence created above to it.

4. Maintain Free Goods Procedure

SPRO – SD – Basic Functions – Free Goods – Condition Technique for Free Goods – Maintain Pricing Procedure

Create a Procedure and maintain the Condition Types created above in desired sequence.

SAP CRM, SAP All Modules, SAP Guides, SAP Module, SAP Live, SAP Learning

5. Activate Free Goods Determination:

SPRO – SD – Basic Functions – Free Goods – Condition Technique for Free Goods – Activate Free Goods Determination

Maintain the Free Goods Determination Procedure created above against the combination of Sales Area/Doc. PP and Cust. PP.

6. Create Free Goods Record

Go to Transaction VBN1. Create a free goods record. The below screenshot shows a record which would give inclusive free goods. Suppose a customer purchases 2 quantities, then 1 quantity would be considered as free. The Customer would be charged for only one quantity.

SAP CRM, SAP All Modules, SAP Guides, SAP Module, SAP Live, SAP Learning

This will be stored in table, KOTN<condition table>. In our case, condition table was 010, hence the table will be KOTN010.

SAP CRM:


1. Download the condition record by using adaptor object: DNL_COND_N010. If you are using custom condition tables then create a new adaptor object same as this and maintain the custom table in it.

2. Download access sequence, condition tables and condition types by using: DNL_CUST_CND_FG.

The condition records when downloaded from ERP will appear in CRM in table, /1CN/CCF<condition table>. In our case the table is SAP010 as it is standard table which was used, hence the table will be /1CN/CCFSAP010. The records once downloaded can be seen in it.

Create Sales Order in CRM WebUI for the same combination of Customer/Sales Area and Material:

A Sub-item gets created automatically as soon as it meets the criteria of free goods determination. In the below case, actually 2 quantities were entered, the system detects the free goods determination and creates a sub-item of quantity 1 as free item. The customer is charged for only one quantity. This is inclusive free goods scenario. In Exclusive, the customer would have got an additional quantity as set by the conditions. 

SAP CRM, SAP All Modules, SAP Guides, SAP Module, SAP Live, SAP Learning

Wednesday, 1 November 2017

Splitting Price Difference with SAP S/4HANA Finance

In this blog, I will explain about the SAP S/4 Finance functionality for “Split of Price Difference “. Normally Semi Finish and Finish Products are managed with price Indicator ‘S’ Standard Price.

Normally Semi Finish and Finish Material Valuated with standard price method value gets calculated from Standard Product Cost Estimation. Standard Product cost estimation is done using production planning master data and Controlling master data like BOM, Routing, Activity Price, Raw Material Price.

In actual scenario, once the production order gets processed and completed we found there is the difference between planned (Standard Cost Estimation) and in actual cost. In SAP this difference gets calculated at the month end using settlement process. Once the settlement completed system pass the accounting entries for the difference value.

Earlier in ECC is get recorded only on one account of “ Price Difference Account” and Costing base COPA is get distributed as per variance categories but not within Finance to GL’s. To get recorded this difference in Finance and get real-time reconciled with SAP COPA, SAP come with functionality Price Difference Split in S/4 HANA.

Configuration Steps required for “Price Difference Split “


1. GL master data need to be created as per different type of variance category.
2. Assign PRD account in OBYC.
3. Define Price Difference Split Profile
4. Assign GL Master to different Variance categories
5. Assign Company Code to Price Difference Split Profile

To get in details how it works we need follow Process steps as enlisted below.


1. COPC (Product costing of Finish Product) to get Standard Price of the Material.
2. Create Master data for BOM and routing in PP.
3. Create Production Order to GRN from production order process (TECO Status of the order).
4. Variance Calculation
5. Order Settlement.

System Configuration with screen shot


1. GL master data: As per requirement created GL Master Data for a different type of variance category.GL master Screenshot

SAP S/4HANA Finance, SAP Guides, SAP All Modules, SAP Live, SAP Learning

As shown above, GL masters created all 9 different types of the variances.

GL master List Screenshot

SAP S/4HANA Finance, SAP Guides, SAP All Modules, SAP Live, SAP Learning

2. Price difference account assignment as MM FICO IntegrationScreen Shot for OBYC

SAP S/4HANA Finance, SAP Guides, SAP All Modules, SAP Live, SAP Learning

3. Price Difference Split Profile: Here we have to define profile for price difference with combination of Chart of Accounts and Controlling Area.

SPRO:

Financial Accounting (New) > General Ledger Accounting (New) > Periodic Processing > Integration > Materials Management > Define Accounts for Splitting Price Differences

Screenshot for Price Difference Split Profile

SAP S/4HANA Finance, SAP Guides, SAP All Modules, SAP Live, SAP Learning

4. Assign GL with Price Variance Categories: We have created Different GLS Master for each of the price variance will assign that GLS over here to get split single price variance account in this different GLS.For example, for Price Variance, we assigned 52071000 GL

Screenshot for GL assignment with Categories

SAP S/4HANA Finance, SAP Guides, SAP All Modules, SAP Live, SAP Learning

List of the GL Assignment

Screenshot with all categories assignment with GL’s

SAP S/4HANA Finance, SAP Guides, SAP All Modules, SAP Live, SAP Learning

5. Price Diff Split and Company Code Assignment: Once we complete with split profile configuration we have to do an assignment of Company code to split profile. In this, we have to give valid from date. From this dating system will start price variance split for company code.

Screen shot for Company code assignment with Price Difference Profile

SAP S/4HANA Finance, SAP Guides, SAP All Modules, SAP Live, SAP Learning

Now we have done with pre requites system configuration steps, we will processed with process steps to see how its work,

1. Product Costing for Finish Product: I have created Semi Finish product master and completed product costing run for the same using CK40N.

Screen shot for Product Cost for Material

SAP S/4HANA Finance, SAP Guides, SAP All Modules, SAP Live, SAP Learning

2. BOM & Routing Master : Before go for product costing system should have master data for BOM and Routing in Production Planning,

Screen shot for Bill of Material Master and Routing Master

SAP S/4HANA Finance, SAP Guides, SAP All Modules, SAP Live, SAP Learning

Routing

SAP S/4HANA Finance, SAP Guides, SAP All Modules, SAP Live, SAP Learning

3. Production Order Process : Once production order completed and finish product received from order its should be set as TECO Status

Screen shot for Production order Technical Completed

SAP S/4HANA Finance, SAP Guides, SAP All Modules, SAP Live, SAP Learning

4. Variance Calculation: As the month end activate to calculated variance of the production order and category of the variance we have to run variance calculation for the order.

Tcode: KKS2

Screen shot for Variance Calculation

SAP S/4HANA Finance, SAP Guides, SAP All Modules, SAP Live, SAP Learning

Once the variance is get calculated we have perform next steps of the process it’s the settlement of the order.

5. Order Settlement: As the month end activity , Production orders need to be settled to record actual cost and variance of the production order. This activity is completed using Tcode KO88

Screen Shot for Order Settlement

SAP S/4HANA Finance, SAP Guides, SAP All Modules, SAP Live, SAP Learning

Order settlement result shows details for the settlement with sender and receiver details and accounting document details,

Screen Shot for Settlement Receiver and Senders

SAP S/4HANA Finance, SAP Guides, SAP All Modules, SAP Live, SAP Learning

Accounting Document for Price Difference with settlement generated by system, Document posted with line item for each variance category.

Screenshot for Settlement Generated Accounting for Price Difference with Split

SAP S/4HANA Finance, SAP Guides, SAP All Modules, SAP Live, SAP Learning

Document

SAP S/4HANA Finance, SAP Guides, SAP All Modules, SAP Live, SAP Learning

In the above example, System has distributed total price variance in two categories as calculated in variance calculation to Resource-Usage Variance and Output Price Variance.