Friday, May 29, 2020

Ensuring Data Integrity

It is critical to the success of an IBP implementation that data integrity is protected. IBP has

many built-in checks. Additionally, IBP can be configured to do further checks. During a data

load, when CPI is finished processing, IBP performs these checks.


If your source system is a single system such as SAP ERP, much of the most critical data

integrity is built in. Data integrity checks become most critical when data is received from

external sources, since the external systems may not be 100% in sync with your internal

systems. Even if all data is received from a single SAP ECC system, there can be records with

integrity errors due to timing differences between master data loads and transactional data

loads. If IBP is not configured to perform these integrity checks, CPI-DS should be used to find

errors and generate error reports.


When data integrity checks do not occur, faulty data can be loaded, aggregated values many

not equal the more granular data, and plans generated may be inaccurate. The CPI-DS

configuration specialist needs to understand what integrity checks are built into the IBP

system to deliver the best possible data to IBP. In addition, knowledge of these rules

facilitates the loading of data into IBP in the correct sequence.

Additional integrity checks can be built into the IBP data model. Attribute checks can be

added to check for:

● Attributes and keys of a simple master data type can be checked against another master

data type (this is similar to the concept of check table in ABAP) . For example: The Base UOM (UOMID) on product could be checked against UOMTOID on UOMTO and PRODUCTIONSOURCE simple master data should have its keys

checked against LOCATION (for LOCID) and PRODUCT (for PRDID).

● Attributes of a compound master data type can be checked against another master data

type. For example: The LOCATIONPRODUCT compound master data type should have its

subnetwork ID (PLUNITID) checked against PLUNITID on PLANNINGUNIT.


In addition, data loads are always checked for:

● Missing values and duplicate records

● Missing values occur when a key figure load does NOT have all its base planning level roots

populated

● Duplicate records occur when two records in a load have the same planning level root combination

- For example: Key figure ACTUALSTOCKTRANS is being loaded and its planning level is MTHPRDCUST. 

If two records in a single data load are updating CUSTID = ABC, PRDID = 123, and DATE = 09/30/2018, 

both records are reported as errors.

● When records fail these tests, the records do not update IBP.

Example to configure Attribute check

In this example, we are loading a compound master data for LOCATIONPRODUCT. The IBP

configuration specialist has added a check to ensure that the PLUNITIDs (planning unit) on the

LOCATIONPRODUCT records exist in IBP before loading. This check must be configured

because PLUNITID is not a key to LOCATIONPRODUCT. Because of this configuration, record

3 is rejected by the IBP Data Integration Job.

To configure this check, the master data type must be changed. For example, to implement

the PLUNIT check, you must perform the following steps:

1. Go to LOCATIONPRODUCT master data type configuration editing.

2. Select Attribute Checks .

3. Turn on Attribute Checks .

4. Select New Attribute Check

5. Specify that PLUITID should be checked against attribute PLUNIT on the PLANNINGUNIT

master data type.

You can see that the attribute check is active.


Example to configure Key Figure Check

In this example, we are loading key figure data. 

The IBP configuration specialist has added a check to ensure that a key figure cannot be loaded 

if the product location combination is not already in the LOCATIONPRODUCT master in IBP before loading. 

Because of this configuration, record 3 is rejected by the IBP Data Integration Job.


The data integration log reports:

Mandatory non-root "MATTRLOCATIONPRODUCT" in source MD

T##LOCATIONPRODUCT root WKPRODLOC PLEVEL "LOCID";"PRDID" not found.


The steps to implement a key figure load check against compound master data includes creating an attribute, 

adjusting the planning area, and adjusting the planning levels containing the compound master data type. 

To implement a key figure load check against the LOCATIONPRODUCT, 

the following steps are required using LOCATIONPRODUCT as an example:

1. Create attribute MATTRLOCATIONPRODUCT.

● Description: Mandatory Attribute Location Product

● Type: NVARCHAR

● Length: 1

2. Add MATTRLOCATIONPRODUCT to the T##LOCATIONPRODUCT master data type and activate.

3. Add MATTRLOCATIONPRODUCT to the planning area. Mark the attribute as having an

attribute category of Required.

A key configuration step is the setting of the attribute’s category on the planning area configuration tab. 

The attribute category specifies whether master data has to exist for the attribute when new planning records are added in IBP using either the Excel add-in or during data integration. 

By default, all attributes have the category NULL (optional). When optional, a check is not carried out.

4. Add MATTRLOCATIONPRODUCT to planning levels that use product and location as

shown in the following figure.

5. Activate the planning area.


Friday, February 21, 2020

IDOC Tutorial

What is IDOC, ALE and EDI 

IDOC (stands for Intermediate Document) is a SAP standard format for transferring data between systems. Each IDOC exists as an ASCII text file that can be transmitted directly to the requesting workstation without a central database. 

ALE and EDI 

IDOC uses ALE (Application Link Enabling) and EDI (Electronic Data Interchange) to deliver the data to the receiving systems.  

When the data needs to be transferred between two SAP systems, then IDOC uses the ALE Technology.  

For exchanging data between a SAP system and a non-SAP system, IDOC uses EDI to convert and deliver the data. 

 

IDOC Structure 

Ex: 

 

An IDOC consists of three parts: 

  • One Record Control: It is always the first line of the file and contains administrative information such as the IDOC’s functional category (Message Type/Basic IDOC Type), as well as its origin (Sender) and destination (Receiver) as in conventional EDI. 

 

  • One or Many Data Record: Includes application data in the segments and describes the hierarchy of these segments in the IDOC. An IDOC always contains a header segments consisting of 6 fields: 

  • SEGNAM – Segment 

  • MANDT – Client 

  • DOCNUM – IDOC Number 

  • SEGNUM – Segment Number 

  • PSGNUM – Number of the Parent Segment 

  • HLEVEL – Hierarchy Level 

 

  • One or Many Status Record: contains all previous processing status as well as messages… 

You can see the IDOC structure as illustrated as image below: 

 

IDOC Types 

An I DOC Type, (Basic) defines the structure and format of the business document that is to be exchanged. An IDOC is an instance of an IDOC Type , just like the concept of variables and variables types in programming languages. You can define IDOC types using WE30 

What is Extension IDOC type? 

An IDOC is of 2 types:- 

  1. Basic 

  1. Extension 

SAP IDOC Tutorial: Definition, Structure, Types, Format & Tables 

SAP provides many a pre-defined Basic IDOC Types which can not be modified. In case you want to add more data to these restricted basic type you may use an extension type. Most of the times you will NOT use extension. 

SAP IDOC Tutorial: Definition, Structure, Types, Format & Tables 

Message Type 

A message represents a specific type of document that is transmitted between two partners Ex. Orders, orders responses, invoices etc 

An idoc type can be associated with many message types 

Also, a message type can be associated with different idoc types. Transaction WE81 

SAP IDOC Tutorial: Definition, Structure, Types, Format & Tables 

IDOC Views 

An IDOC type can be used for more than one message type, which results in IDOCs containing more fields than required for a particular message type. 

IDOC views are used to improve performance in generating IDOCs to ensure only the relevant segments are filled with data. IDOC Views are important only for Outbound Processing. 

SAP IDOC Tutorial: Definition, Structure, Types, Format & Tables 

Partner Profiles 

A partner is defined as a business partner with whom you conduct business and exchange documents 

In the partner profile of a partner that we exchange Idocs with, we maintain the parameters that are necessary for exchanging the data. The transaction used is WE20. 

SAP IDOC Tutorial: Definition, Structure, Types, Format & Tables 


Goods Movement against Production Order