New Table PRCD - ELEMENTS in S - 4 HANA
New Table PRCD - ELEMENTS in S - 4 HANA
New Table PRCD - ELEMENTS in S - 4 HANA
Dear SAPLearners, in this blog post we will learn about KONV SD pricing data model changes and
new table PRCD_ELEMENTS in S/4 HANA.
This blog post is part of S/4 HANA technical tutorials, you can find all tutorials here.
Introduction
Firstly, we all know that SD pricing results are stored in the KONV table for sales business
documents such as sales order and we have been using this table in custom code SELECT queries
etc..
In S/4 HANA system, SAP has reviewed this table and new changes were implemented. When you
are moving to S/4 HANA system from ECC, these changes to be followed and custom code is
modified accordingly.
x
1. New table PRCD_ELEMENTS
https://saplearners.com/new-table-prcd_elements-in-s-4-hana-konv-table-is-obsolete/ 1/9
2022/4/28 下午5:49 New table PRCD_ELEMENTS in S/4 HANA
A new database table called PRCD_ELEMENTS is introduced to replace the KONV table to store all x
SD document conditions. It is of type Transparent table.
The data is no longer stored in the KONV table. You need to use new table PRCD_ELEMENTS in
custom code to SELECT pricing conditions.
https://saplearners.com/new-table-prcd_elements-in-s-4-hana-konv-table-is-obsolete/ 2/9
2022/4/28 下午5:49 New table PRCD_ELEMENTS in S/4 HANA
x
In addition to the CDS view, an API is also available to Get, Update and Delete the pricing
conditions.
3. New API
The factory class CL_PRC_RESULT_FACTORY is used to retrieve the pricing data.
https://saplearners.com/new-table-prcd_elements-in-s-4-hana-konv-table-is-obsolete/ 3/9
2022/4/28 下午5:49 New table PRCD_ELEMENTS in S/4 HANA
Following methods are provided within the API to read, write and delete the data. x
GET_PRICE_ELEMENT_DB Get price elements from DB
GET_PRICE_ELEMENT_DB_BY_KEY Get price elements from DB by semantic key
SAVE_PRICE_ELEMENT_DB Save price elements on DB
Delete price element from DB by semantic key (one
DELETE_PRICE_ELEMENT_DB_BY_KEY
document)
DELETE_PRICE_ELEMENT_DB Delete price elements from DB (multiple documents)
Delete list of dedicated price elements (multiple
DELETE_PRICE_ELEMENTS_DB
documents)
Now you know quite a bit about data model changes to KONV. Its time to see the how we can
migrate our custom code to S/4 HANA system compatible.
Here is the old code from ECC system to get SD pricing conditions.
SELECT knumv
kposn
stunr
zaehk
kappl
x
kschl
https://saplearners.com/new-table-prcd_elements-in-s-4-hana-konv-table-is-obsolete/ 4/9
2022/4/28 下午5:49 New table PRCD_ELEMENTS in S/4 HANA
SELECT knumv
kposn
stunr
zaehk
kappl
kschl
x
With V_KONV CDS view:
https://saplearners.com/new-table-prcd_elements-in-s-4-hana-konv-table-is-obsolete/ 5/9
2022/4/28 下午5:49 New table PRCD_ELEMENTS in S/4 HANA
stunr
zaehk
kappl
kschl
TRY.
cl_prc_result_factory=>get_instance( )->get_prc_result( )-
>get_price_element_db_by_key(
EXPORTING
iv_knumv = vbak-knumv
IMPORTING
et_prc_element_classic_format = hkonv ).
ENDTRY.
TRY.
cl_prc_result_factory=>get_instance( )->get_prc_result( )-
>get_price_element_db(
EXPORTING
IMPORTING
x
et_prc_element_classic_format = hkonv ).
https://saplearners.com/new-table-prcd_elements-in-s-4-hana-konv-table-is-obsolete/ 6/9
2022/4/28 下午5:49 New table PRCD_ELEMENTS in S/4 HANA
4. DDIC enhancements
At some times we need to enhance KONV table with custom fields catering to the customer
requirements. This is usually achieved using append structure to the database table KONV
In S/4 HANA system, you should NOT append directly to PRCD_ELEMENTS table.
Instead add append structure to the new structure PRCS_ELEMENTS_DATA which is included in
database table PRCD_ELEMENTS.
https://saplearners.com/new-table-prcd_elements-in-s-4-hana-konv-table-is-obsolete/ 7/9
2022/4/28 下午5:49 New table PRCD_ELEMENTS in S/4 HANA
Click here to know how you can extend a CDS view with custom fields. x
Congrats!!! 👍 you have successfully KONV SD pricing data model changes in S/4 HANA.
Please feel free to comment and let us know your feedback. Subscribe for more updates
https://saplearners.com/new-table-prcd_elements-in-s-4-hana-konv-table-is-obsolete/ 8/9
2022/4/28 下午5:49 New table PRCD_ELEMENTS in S/4 HANA
x
https://saplearners.com/new-table-prcd_elements-in-s-4-hana-konv-table-is-obsolete/ 9/9