SAP CLFM_GET_CHANGE_NR_FROM_OBJECT Function Module for
CLFM_GET_CHANGE_NR_FROM_OBJECT is a standard clfm get change nr from object SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used to perform a specific ABAP function and below is the pattern details, 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 clfm get change nr from object FM, simply by entering the name CLFM_GET_CHANGE_NR_FROM_OBJECT into the relevant SAP transaction such as SE37 or SE38.
Function Group: CLFM
Program Name: SAPLCLFM
Main Program: SAPLCLFM
Appliation area: M
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:

Function CLFM_GET_CHANGE_NR_FROM_OBJECT 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 'CLFM_GET_CHANGE_NR_FROM_OBJECT'".
EXPORTING
OBJECT = "Object key
TABLE = "Classifiable object
* CHANGE_SERVICE_NUMBER = "Change Number
* DATE_OF_CHANGE = "Change date
IMPORTING
USED_AENNR = "
EXCEPTIONS
ONLY_WITH_CHANGE_NUMBER = 1
Customer Function user exits
Below is a list of CUSTOMER FUNCTION exit user exits that are available within this program and maybe relevant for this FM.EXIT_SAPLCLFM_001 Influences Class and Value Assignment
EXIT_SAPLCLFM_002 Customer Exit for Changing Classification Data Before Saving
EXIT_SAPLCLFM_003 Customer Exit After Check on Assigned Characteristic Values
IMPORTING Parameters details for CLFM_GET_CHANGE_NR_FROM_OBJECT
OBJECT - Object key
Data type: RMCLF-OBJEKOptional: No
Call by Reference: No ( called with pass by value option)
TABLE - Classifiable object
Data type: TCLA-OBTABOptional: No
Call by Reference: No ( called with pass by value option)
CHANGE_SERVICE_NUMBER - Change Number
Data type: RMCLF-AENNR1Optional: Yes
Call by Reference: No ( called with pass by value option)
DATE_OF_CHANGE - Change date
Data type: RMCLF-DATUV1Optional: Yes
Call by Reference: No ( called with pass by value option)
EXPORTING Parameters details for CLFM_GET_CHANGE_NR_FROM_OBJECT
USED_AENNR -
Data type: RMCLF-AENNR1Optional: No
Call by Reference: No ( called with pass by value option)
EXCEPTIONS details
ONLY_WITH_CHANGE_NUMBER - Other change number with same date
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for CLFM_GET_CHANGE_NR_FROM_OBJECT 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_object | TYPE RMCLF-OBJEK, " | |||
| lv_used_aennr | TYPE RMCLF-AENNR1, " | |||
| lv_only_with_change_number | TYPE RMCLF, " | |||
| lv_table | TYPE TCLA-OBTAB, " | |||
| lv_change_service_number | TYPE RMCLF-AENNR1, " | |||
| lv_date_of_change | TYPE RMCLF-DATUV1. " |
|   CALL FUNCTION 'CLFM_GET_CHANGE_NR_FROM_OBJECT' " |
| EXPORTING | ||
| OBJECT | = lv_object | |
| TABLE | = lv_table | |
| CHANGE_SERVICE_NUMBER | = lv_change_service_number | |
| DATE_OF_CHANGE | = lv_date_of_change | |
| IMPORTING | ||
| USED_AENNR | = lv_used_aennr | |
| EXCEPTIONS | ||
| ONLY_WITH_CHANGE_NUMBER = 1 | ||
| . " CLFM_GET_CHANGE_NR_FROM_OBJECT | ||
ABAP code using 7.40 inline data declarations to call FM CLFM_GET_CHANGE_NR_FROM_OBJECT
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.| "SELECT single OBJEK FROM RMCLF INTO @DATA(ld_object). | ||||
| "SELECT single AENNR1 FROM RMCLF INTO @DATA(ld_used_aennr). | ||||
| "SELECT single OBTAB FROM TCLA INTO @DATA(ld_table). | ||||
| "SELECT single AENNR1 FROM RMCLF INTO @DATA(ld_change_service_number). | ||||
| "SELECT single DATUV1 FROM RMCLF INTO @DATA(ld_date_of_change). | ||||
Search for further information about these or an SAP related objects