SAP CPE_GUI_DETERM_CHANGED_FIELDS Function Module for CPE: Determine changed fields after UI processing
CPE_GUI_DETERM_CHANGED_FIELDS is a standard cpe gui determ changed fields SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for CPE: Determine changed fields after UI processing processing and below is the pattern details for this FM, showing its interface including any import and export parameters, exceptions etc. there is also a full "cut and paste" ABAP pattern code example, along with implementation ABAP coding, documentation and contribution comments specific to this or related objects.
See here to view full function module documentation and code listing for cpe gui determ changed fields FM, simply by entering the name CPE_GUI_DETERM_CHANGED_FIELDS into the relevant SAP transaction such as SE37 or SE38.
Function Group: CPE_GUI
Program Name: SAPLCPE_GUI
Main Program: SAPLCPE_GUI
Appliation area:
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:

Function CPE_GUI_DETERM_CHANGED_FIELDS pattern details
In-order to call this FM within your sap programs, simply using the below ABAP pattern details to trigger the function call...or see the full ABAP code listing at the end of this article. You can simply cut and paste this code into your ABAP progrom as it is, including variable declarations.CALL FUNCTION 'CPE_GUI_DETERM_CHANGED_FIELDS'"CPE: Determine changed fields after UI processing.
EXPORTING
* IV_DDIC_STRUCNAME = "Table Name
* IS_STRUCTURE_OLD = "
* IS_STRUCTURE_NEW = "
* IV_STRUCTURE_TABIX = '1' "Index of Internal Tables
* IT_INPUT_FIELDNAMES_STRUC = "CPE - Names of Displayed Fields and Input Fields
* IV_DDIC_TABNAME = "Table Name
* IT_TABLE_OLD = "
* IT_TABLE_NEW = "
* IT_INPUT_FIELDNAMES_TAB = "CPE - Names of Displayed Fields and Input Fields
IMPORTING
ET_CHANGED_FIELDNAMES_STRUC = "CPE - Names of Changed Fields
ET_CHANGED_FIELDNAMES_TAB = "CPE - Names of Changed Fields
ET_CHANGED_TERMNO = "CPE - Communication Structure Table for Changed Term Numbers
ET_CHANGED_ROUNDIN = "CPE - Communication Table for Changed Rounding Input Keys
ET_CHANGED_CONVIN = "CPE - Communication Table for Changed Conversion Input Keys
EXCEPTIONS
STRUCNAME_NOT_FOUND_IN_DDIC = 1 TABNAME_NOT_FOUND_IN_DDIC = 2
IMPORTING Parameters details for CPE_GUI_DETERM_CHANGED_FIELDS
IV_DDIC_STRUCNAME - Table Name
Data type: TABNAMEOptional: Yes
Call by Reference: Yes
IS_STRUCTURE_OLD -
Data type: ANYOptional: Yes
Call by Reference: Yes
IS_STRUCTURE_NEW -
Data type: ANYOptional: Yes
Call by Reference: Yes
IV_STRUCTURE_TABIX - Index of Internal Tables
Data type: SYTABIXDefault: '1'
Optional: No
Call by Reference: Yes
IT_INPUT_FIELDNAMES_STRUC - CPE - Names of Displayed Fields and Input Fields
Data type: CPET_INPUT_FIELDNAMES_TABOptional: Yes
Call by Reference: Yes
IV_DDIC_TABNAME - Table Name
Data type: TABNAMEOptional: Yes
Call by Reference: Yes
IT_TABLE_OLD -
Data type: TABLEOptional: Yes
Call by Reference: Yes
IT_TABLE_NEW -
Data type: TABLEOptional: Yes
Call by Reference: Yes
IT_INPUT_FIELDNAMES_TAB - CPE - Names of Displayed Fields and Input Fields
Data type: CPET_INPUT_FIELDNAMES_TABOptional: Yes
Call by Reference: Yes
EXPORTING Parameters details for CPE_GUI_DETERM_CHANGED_FIELDS
ET_CHANGED_FIELDNAMES_STRUC - CPE - Names of Changed Fields
Data type: CPET_CHANGED_FIELDNAMES_TABOptional: No
Call by Reference: Yes
ET_CHANGED_FIELDNAMES_TAB - CPE - Names of Changed Fields
Data type: CPET_CHANGED_FIELDNAMES_TABOptional: No
Call by Reference: Yes
ET_CHANGED_TERMNO - CPE - Communication Structure Table for Changed Term Numbers
Data type: CPET_CHANGED_TERMNO_COM_TABOptional: No
Call by Reference: Yes
ET_CHANGED_ROUNDIN - CPE - Communication Table for Changed Rounding Input Keys
Data type: CPET_CHANGED_ROUNDIN_KEY_TABOptional: No
Call by Reference: Yes
ET_CHANGED_CONVIN - CPE - Communication Table for Changed Conversion Input Keys
Data type: CPET_CHANGED_CONVIN_KEY_TABOptional: No
Call by Reference: Yes
EXCEPTIONS details
STRUCNAME_NOT_FOUND_IN_DDIC - The specified struture name does not exist in DDIC
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
TABNAME_NOT_FOUND_IN_DDIC - The specified table name does not exist in DDIC
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for CPE_GUI_DETERM_CHANGED_FIELDS Function Module
The ABAP code below is a full code listing to execute function module POPUP_TO_CONFIRM including all data declarations. The code uses the original data declarations rather than the latest in-line data DECLARATION SYNTAX but I have included an ABAP code snippet at the end to show how declarations would look using the newer method of declaring data variables on the fly. This will allow you to compare and fully understand the new inline method. Please note some of the newer syntax such as the @DATA is not available until a later 4.70 service pack (SP8), which i why i have stuck to the origianl for this example.| DATA: | ||||
| lv_iv_ddic_strucname | TYPE TABNAME, " | |||
| lv_et_changed_fieldnames_struc | TYPE CPET_CHANGED_FIELDNAMES_TAB, " | |||
| lv_strucname_not_found_in_ddic | TYPE CPET_CHANGED_FIELDNAMES_TAB, " | |||
| lv_is_structure_old | TYPE ANY, " | |||
| lv_et_changed_fieldnames_tab | TYPE CPET_CHANGED_FIELDNAMES_TAB, " | |||
| lv_tabname_not_found_in_ddic | TYPE CPET_CHANGED_FIELDNAMES_TAB, " | |||
| lv_is_structure_new | TYPE ANY, " | |||
| lv_et_changed_termno | TYPE CPET_CHANGED_TERMNO_COM_TAB, " | |||
| lv_et_changed_roundin | TYPE CPET_CHANGED_ROUNDIN_KEY_TAB, " | |||
| lv_iv_structure_tabix | TYPE SYTABIX, " '1' | |||
| lv_et_changed_convin | TYPE CPET_CHANGED_CONVIN_KEY_TAB, " | |||
| lv_it_input_fieldnames_struc | TYPE CPET_INPUT_FIELDNAMES_TAB, " | |||
| lv_iv_ddic_tabname | TYPE TABNAME, " | |||
| lv_it_table_old | TYPE TABLE, " | |||
| lv_it_table_new | TYPE TABLE, " | |||
| lv_it_input_fieldnames_tab | TYPE CPET_INPUT_FIELDNAMES_TAB. " |
|   CALL FUNCTION 'CPE_GUI_DETERM_CHANGED_FIELDS' "CPE: Determine changed fields after UI processing |
| EXPORTING | ||
| IV_DDIC_STRUCNAME | = lv_iv_ddic_strucname | |
| IS_STRUCTURE_OLD | = lv_is_structure_old | |
| IS_STRUCTURE_NEW | = lv_is_structure_new | |
| IV_STRUCTURE_TABIX | = lv_iv_structure_tabix | |
| IT_INPUT_FIELDNAMES_STRUC | = lv_it_input_fieldnames_struc | |
| IV_DDIC_TABNAME | = lv_iv_ddic_tabname | |
| IT_TABLE_OLD | = lv_it_table_old | |
| IT_TABLE_NEW | = lv_it_table_new | |
| IT_INPUT_FIELDNAMES_TAB | = lv_it_input_fieldnames_tab | |
| IMPORTING | ||
| ET_CHANGED_FIELDNAMES_STRUC | = lv_et_changed_fieldnames_struc | |
| ET_CHANGED_FIELDNAMES_TAB | = lv_et_changed_fieldnames_tab | |
| ET_CHANGED_TERMNO | = lv_et_changed_termno | |
| ET_CHANGED_ROUNDIN | = lv_et_changed_roundin | |
| ET_CHANGED_CONVIN | = lv_et_changed_convin | |
| EXCEPTIONS | ||
| STRUCNAME_NOT_FOUND_IN_DDIC = 1 | ||
| TABNAME_NOT_FOUND_IN_DDIC = 2 | ||
| . " CPE_GUI_DETERM_CHANGED_FIELDS | ||
ABAP code using 7.40 inline data declarations to call FM CPE_GUI_DETERM_CHANGED_FIELDS
The below ABAP code uses the newer in-line data declarations. This allows you to see the coding differences/benefits of the later inline syntax. Please note some of the newer syntax below, such as the @DATA is not available until 4.70 EHP 8.| DATA(ld_iv_structure_tabix) | = '1'. | |||
Search for further information about these or an SAP related objects