SAP PM_COPY_SUBOBJECTS Function Module for PM: Copy Sub-objects, e.g. Classification for Equipment
PM_COPY_SUBOBJECTS is a standard pm copy subobjects SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for PM: Copy Sub-objects, e.g. Classification for Equipment 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 pm copy subobjects FM, simply by entering the name PM_COPY_SUBOBJECTS into the relevant SAP transaction such as SE37 or SE38.
Function Group: ILCP
Program Name: SAPLILCP
Main Program: SAPLILCP
Appliation area: I
Release date: N/A
Mode(Normal, Remote etc): Remote-Enabled
Update:

Function PM_COPY_SUBOBJECTS 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 'PM_COPY_SUBOBJECTS'"PM: Copy Sub-objects, e.g. Classification for Equipment.
EXPORTING
* SOURCE_OBTAB = ' ' "DDIC name of reference object
* TARGET_ADDRESS_GROUP = 'PM01' "
RILOCP_COM = "Structure with copy indicators
* I_DOCS_CV140 = 'X' "
* SOURCE_OBKEY = ' ' "Key of reference object
* SOURCE_OBJNR = ' ' "Object no. of reference object
* SOURCE_ADRNR = ' ' "
* SOURCE_LANGU = SY-LANGU "Language of long text reference
TARGET_OBTAB = "DDIC name of target object
* TARGET_OBKEY = ' ' "Key of the Target Object
* TARGET_OBJNR = ' ' "Object no. of target object
* TARGET_TPLMA = ' ' "Superior functional location
IMPORTING
UPDATE_ADDRESS = "
UPDATE_MEAS_POINTS = "X = Update requiremenr for MeasPoints
UPDATE_LTXT = "
UPDATE_INTN = "
UPDATE_DOCS = "
IND_UPD_IHSG = "X = Update requirement for permits
KLASSE = "
KLASSENART = "
KLASSENTEXT = "
IMPORTING Parameters details for PM_COPY_SUBOBJECTS
SOURCE_OBTAB - DDIC name of reference object
Data type: TCLA-OBTABDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
TARGET_ADDRESS_GROUP -
Data type: ADRG-ADDR_GROUPDefault: 'PM01'
Optional: Yes
Call by Reference: No ( called with pass by value option)
RILOCP_COM - Structure with copy indicators
Data type: RILOCPOptional: No
Call by Reference: No ( called with pass by value option)
I_DOCS_CV140 -
Data type: IREF-IINDDefault: 'X'
Optional: Yes
Call by Reference: No ( called with pass by value option)
SOURCE_OBKEY - Key of reference object
Data type: RMCLF-OBJEKDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
SOURCE_OBJNR - Object no. of reference object
Data type: ONR00-OBJNRDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
SOURCE_ADRNR -
Data type: ADRC-ADDRNUMBERDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
SOURCE_LANGU - Language of long text reference
Data type: TTXIT-TDSPRASDefault: SY-LANGU
Optional: Yes
Call by Reference: No ( called with pass by value option)
TARGET_OBTAB - DDIC name of target object
Data type: TCLA-OBTABOptional: No
Call by Reference: No ( called with pass by value option)
TARGET_OBKEY - Key of the Target Object
Data type: RMCLF-OBJEKDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
TARGET_OBJNR - Object no. of target object
Data type: ONR00-OBJNRDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
TARGET_TPLMA - Superior functional location
Data type: IFLOT-TPLMADefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
EXPORTING Parameters details for PM_COPY_SUBOBJECTS
UPDATE_ADDRESS -
Data type: IREF-IINDOptional: No
Call by Reference: No ( called with pass by value option)
UPDATE_MEAS_POINTS - X = Update requiremenr for MeasPoints
Data type: IREF-IINDOptional: No
Call by Reference: No ( called with pass by value option)
UPDATE_LTXT -
Data type: IREF-IINDOptional: No
Call by Reference: No ( called with pass by value option)
UPDATE_INTN -
Data type: IREF-IINDOptional: No
Call by Reference: No ( called with pass by value option)
UPDATE_DOCS -
Data type: IREF-IINDOptional: No
Call by Reference: No ( called with pass by value option)
IND_UPD_IHSG - X = Update requirement for permits
Data type: RM63E-INDUOptional: No
Call by Reference: No ( called with pass by value option)
KLASSE -
Data type: RMCLF-CLASSOptional: No
Call by Reference: No ( called with pass by value option)
KLASSENART -
Data type: RMCLF-KLARTOptional: No
Call by Reference: No ( called with pass by value option)
KLASSENTEXT -
Data type: RMCLF-KTEXTOptional: No
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for PM_COPY_SUBOBJECTS 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_source_obtab | TYPE TCLA-OBTAB, " SPACE | |||
| lv_update_address | TYPE IREF-IIND, " | |||
| lv_target_address_group | TYPE ADRG-ADDR_GROUP, " 'PM01' | |||
| lv_rilocp_com | TYPE RILOCP, " | |||
| lv_i_docs_cv140 | TYPE IREF-IIND, " 'X' | |||
| lv_source_obkey | TYPE RMCLF-OBJEK, " SPACE | |||
| lv_update_meas_points | TYPE IREF-IIND, " | |||
| lv_update_ltxt | TYPE IREF-IIND, " | |||
| lv_source_objnr | TYPE ONR00-OBJNR, " SPACE | |||
| lv_update_intn | TYPE IREF-IIND, " | |||
| lv_source_adrnr | TYPE ADRC-ADDRNUMBER, " SPACE | |||
| lv_update_docs | TYPE IREF-IIND, " | |||
| lv_source_langu | TYPE TTXIT-TDSPRAS, " SY-LANGU | |||
| lv_ind_upd_ihsg | TYPE RM63E-INDU, " | |||
| lv_target_obtab | TYPE TCLA-OBTAB, " | |||
| lv_klasse | TYPE RMCLF-CLASS, " | |||
| lv_target_obkey | TYPE RMCLF-OBJEK, " SPACE | |||
| lv_klassenart | TYPE RMCLF-KLART, " | |||
| lv_target_objnr | TYPE ONR00-OBJNR, " SPACE | |||
| lv_klassentext | TYPE RMCLF-KTEXT, " | |||
| lv_target_tplma | TYPE IFLOT-TPLMA. " SPACE |
|   CALL FUNCTION 'PM_COPY_SUBOBJECTS' "PM: Copy Sub-objects, e.g. Classification for Equipment |
| EXPORTING | ||
| SOURCE_OBTAB | = lv_source_obtab | |
| TARGET_ADDRESS_GROUP | = lv_target_address_group | |
| RILOCP_COM | = lv_rilocp_com | |
| I_DOCS_CV140 | = lv_i_docs_cv140 | |
| SOURCE_OBKEY | = lv_source_obkey | |
| SOURCE_OBJNR | = lv_source_objnr | |
| SOURCE_ADRNR | = lv_source_adrnr | |
| SOURCE_LANGU | = lv_source_langu | |
| TARGET_OBTAB | = lv_target_obtab | |
| TARGET_OBKEY | = lv_target_obkey | |
| TARGET_OBJNR | = lv_target_objnr | |
| TARGET_TPLMA | = lv_target_tplma | |
| IMPORTING | ||
| UPDATE_ADDRESS | = lv_update_address | |
| UPDATE_MEAS_POINTS | = lv_update_meas_points | |
| UPDATE_LTXT | = lv_update_ltxt | |
| UPDATE_INTN | = lv_update_intn | |
| UPDATE_DOCS | = lv_update_docs | |
| IND_UPD_IHSG | = lv_ind_upd_ihsg | |
| KLASSE | = lv_klasse | |
| KLASSENART | = lv_klassenart | |
| KLASSENTEXT | = lv_klassentext | |
| . " PM_COPY_SUBOBJECTS | ||
ABAP code using 7.40 inline data declarations to call FM PM_COPY_SUBOBJECTS
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 OBTAB FROM TCLA INTO @DATA(ld_source_obtab). | ||||
| DATA(ld_source_obtab) | = ' '. | |||
| "SELECT single IIND FROM IREF INTO @DATA(ld_update_address). | ||||
| "SELECT single ADDR_GROUP FROM ADRG INTO @DATA(ld_target_address_group). | ||||
| DATA(ld_target_address_group) | = 'PM01'. | |||
| "SELECT single IIND FROM IREF INTO @DATA(ld_i_docs_cv140). | ||||
| DATA(ld_i_docs_cv140) | = 'X'. | |||
| "SELECT single OBJEK FROM RMCLF INTO @DATA(ld_source_obkey). | ||||
| DATA(ld_source_obkey) | = ' '. | |||
| "SELECT single IIND FROM IREF INTO @DATA(ld_update_meas_points). | ||||
| "SELECT single IIND FROM IREF INTO @DATA(ld_update_ltxt). | ||||
| "SELECT single OBJNR FROM ONR00 INTO @DATA(ld_source_objnr). | ||||
| DATA(ld_source_objnr) | = ' '. | |||
| "SELECT single IIND FROM IREF INTO @DATA(ld_update_intn). | ||||
| "SELECT single ADDRNUMBER FROM ADRC INTO @DATA(ld_source_adrnr). | ||||
| DATA(ld_source_adrnr) | = ' '. | |||
| "SELECT single IIND FROM IREF INTO @DATA(ld_update_docs). | ||||
| "SELECT single TDSPRAS FROM TTXIT INTO @DATA(ld_source_langu). | ||||
| DATA(ld_source_langu) | = SY-LANGU. | |||
| "SELECT single INDU FROM RM63E INTO @DATA(ld_ind_upd_ihsg). | ||||
| "SELECT single OBTAB FROM TCLA INTO @DATA(ld_target_obtab). | ||||
| "SELECT single CLASS FROM RMCLF INTO @DATA(ld_klasse). | ||||
| "SELECT single OBJEK FROM RMCLF INTO @DATA(ld_target_obkey). | ||||
| DATA(ld_target_obkey) | = ' '. | |||
| "SELECT single KLART FROM RMCLF INTO @DATA(ld_klassenart). | ||||
| "SELECT single OBJNR FROM ONR00 INTO @DATA(ld_target_objnr). | ||||
| DATA(ld_target_objnr) | = ' '. | |||
| "SELECT single KTEXT FROM RMCLF INTO @DATA(ld_klassentext). | ||||
| "SELECT single TPLMA FROM IFLOT INTO @DATA(ld_target_tplma). | ||||
| DATA(ld_target_tplma) | = ' '. | |||
Search for further information about these or an SAP related objects