We will now show you how to define a characteristic derivation for the product group from the material master. Firstly, we make sure that the “Basic Data 1” view in material “A1” contains an entry for the product hierarchy. As you can see, here, product type “PA1” and product group “PG2” are assigned. We want to derive both of these items of information in the corresponding CO-PA characteristics via table lookup. To do this, in the CO-PA Customizing menu, we select “Master Data Define Characteristic Derivation.”
We are now in the maintenance transaction for the characteristic derivation strategy. We go to change mode and then create a new step. In this case, we want to access data that is available in an SAP standard table. Therefore, we select step type “Table Lookup.” The general master data of materials is stored in table “MARA” and therefore we specify this table. In the characteristic derivation we maintain a name.
The source field defines which table field in table MARA the system is to use for selection for the derivation. In this case, the system proposes the material number field. The selection field for table MARA is thus transferred from the CO-PA characteristic for the product number. When assigning the table fields to the target fields, we define the fields in table MARA from which data is transferred, and the CO-PA characteristics in which this data is to be updated. We want to derive two characteristics from the product hierarchy of the material: the product type, which we can take from the first three characters of the product hierarchy, and the product group, which we find in characters 4 to 6 of the product hierarchy.
To derive the product type, we therefore select the field for the product hierarchy as source (technically: MARA-PRDHA). Correspondingly, as the target field (that is, the CO-PA characteristic to which the data is to be transferred), we select the characteristic for the product type. However, we do not want to transfer the entire field contents from the product hierarchy; we only want the first three characters, which identify the product type. To do this, in the detail view of the assignment, we define that only part of the field content is to be derived: the first three characters. We proceed in the same way for the product group: as the source we select the field for the product hierarchy again, and we link it to the CO-PA characteristic for the product group. This time, in the details, we define that three characters from the third position of the product hierarchy onwards are to be transferred.
Now we save the derivation and return to the characteristic derivation strategy. As you can see, the table lookup that we have just created is already entered here.
The characteristics for the product type and product group are user-defined characteristics and therefore, we have to maintain values for these characteristics. To do this, in the application menu, we proceed as follows: “Accounting Controlling Profitability Analysis Master Data Characteristic Values Change Characteristic Values.”
Firstly we select the “Product Type” characteristic and then enter values. We then proceed in the same way for the product group. To test whether our characteristic derivation works, we now enter a manual document in CO-PA. To do this, we enter transaction KE21 directly. We enter a posting date and a record type, and then confirm. In the invoice header data, we enter the company code and then click “Enter” to continue to the next screen. There we enter product A1, which is the basis for our example, and continue to the next screen by clicking “Enter” again. There we click “Derivation.” As you can see, the characteristics for the product type and the product group are derived via our table lookup.