SAP PRODUCTGROUP_CHANGE Function Module for Change the structure of a product group
PRODUCTGROUP_CHANGE is a standard productgroup change SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Change the structure of a product group 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 productgroup change FM, simply by entering the name PRODUCTGROUP_CHANGE into the relevant SAP transaction such as SE37 or SE38.
Function Group: MCP3
Program Name: SAPLMCP3
Main Program:
Appliation area:
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update: 1

Function PRODUCTGROUP_CHANGE 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 'PRODUCTGROUP_CHANGE'"Change the structure of a product group.
TABLES
PGMI_D = "Structure to be deleted according to PGMI
PGMI_I = "Structure to be inserted according to PGMI
PGMI_U = "Structure to be changed according to PGMI
PGZU_D = "Structure to be deleted according to PGZU
PGZU_I = "Structure to be inserted according to PGZU
PGZU_U = "Structure to be changed according to PGZU
EXCEPTIONS
PG_OR_MATERIAL_NOT_FOUND = 1 ERROR_WITH_INT_NUMBER = 2
TABLES Parameters details for PRODUCTGROUP_CHANGE
PGMI_D - Structure to be deleted according to PGMI
Data type: PGMIOptional: No
Call by Reference: No ( called with pass by value option)
PGMI_I - Structure to be inserted according to PGMI
Data type: PGMIOptional: No
Call by Reference: No ( called with pass by value option)
PGMI_U - Structure to be changed according to PGMI
Data type: PGMIOptional: No
Call by Reference: No ( called with pass by value option)
PGZU_D - Structure to be deleted according to PGZU
Data type: PGZUOptional: No
Call by Reference: No ( called with pass by value option)
PGZU_I - Structure to be inserted according to PGZU
Data type: PGZUOptional: No
Call by Reference: No ( called with pass by value option)
PGZU_U - Structure to be changed according to PGZU
Data type: PGZUOptional: No
Call by Reference: No ( called with pass by value option)
EXCEPTIONS details
PG_OR_MATERIAL_NOT_FOUND -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
ERROR_WITH_INT_NUMBER -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for PRODUCTGROUP_CHANGE 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: | ||||
| lt_pgmi_d | TYPE STANDARD TABLE OF PGMI, " | |||
| lv_pg_or_material_not_found | TYPE PGMI, " | |||
| lt_pgmi_i | TYPE STANDARD TABLE OF PGMI, " | |||
| lv_error_with_int_number | TYPE PGMI, " | |||
| lt_pgmi_u | TYPE STANDARD TABLE OF PGMI, " | |||
| lt_pgzu_d | TYPE STANDARD TABLE OF PGZU, " | |||
| lt_pgzu_i | TYPE STANDARD TABLE OF PGZU, " | |||
| lt_pgzu_u | TYPE STANDARD TABLE OF PGZU. " |
|   CALL FUNCTION 'PRODUCTGROUP_CHANGE' "Change the structure of a product group |
| TABLES | ||
| PGMI_D | = lt_pgmi_d | |
| PGMI_I | = lt_pgmi_i | |
| PGMI_U | = lt_pgmi_u | |
| PGZU_D | = lt_pgzu_d | |
| PGZU_I | = lt_pgzu_i | |
| PGZU_U | = lt_pgzu_u | |
| EXCEPTIONS | ||
| PG_OR_MATERIAL_NOT_FOUND = 1 | ||
| ERROR_WITH_INT_NUMBER = 2 | ||
| . " PRODUCTGROUP_CHANGE | ||
ABAP code using 7.40 inline data declarations to call FM PRODUCTGROUP_CHANGE
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.Search for further information about these or an SAP related objects