SAP CP_DB_EAPL_READ_BY_PLNNR Function Module for NOTRANSL: Pläne Instandhaltung: Objektzuordnung DB Zugriffe
CP_DB_EAPL_READ_BY_PLNNR is a standard cp db eapl read by plnnr SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for NOTRANSL: Pläne Instandhaltung: Objektzuordnung DB Zugriffe 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 cp db eapl read by plnnr FM, simply by entering the name CP_DB_EAPL_READ_BY_PLNNR into the relevant SAP transaction such as SE37 or SE38.
Function Group: CZDB
Program Name: SAPLCZDB
Main Program: SAPLCZDB
Appliation area: I
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:

Function CP_DB_EAPL_READ_BY_PLNNR 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 'CP_DB_EAPL_READ_BY_PLNNR'"NOTRANSL: Pläne Instandhaltung: Objektzuordnung DB Zugriffe.
EXPORTING
* DATUB = 0 "Maximum date for DB selection
* DATUV = 0 "Minimum date for DB selection
* EQUNR = ' ' "Equipment number
* PLNAL = ' ' "Planned alternative for DB selecti
PLNNR = "Routing number
PLNTY = "Routing type
* WERKS = ' ' "Maintenance plant of the equipment
IMPORTING
ZAEHL_MAX = "max. change counter
ZKRIZ_MAX = "Maximum value additional criterion counter
TABLES
EQUPL = "Equipment/task list document table
EXCEPTIONS
NO_RECORDS = 1
IMPORTING Parameters details for CP_DB_EAPL_READ_BY_PLNNR
DATUB - Maximum date for DB selection
Data type: PLKO-DATUVOptional: Yes
Call by Reference: No ( called with pass by value option)
DATUV - Minimum date for DB selection
Data type: PLKO-DATUVOptional: Yes
Call by Reference: No ( called with pass by value option)
EQUNR - Equipment number
Data type: EAPL-EQUNRDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
PLNAL - Planned alternative for DB selecti
Data type: PLKO-PLNALDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
PLNNR - Routing number
Data type: EAPL-PLNNROptional: No
Call by Reference: No ( called with pass by value option)
PLNTY - Routing type
Data type: PLKO-PLNTYOptional: No
Call by Reference: No ( called with pass by value option)
WERKS - Maintenance plant of the equipment
Data type: MAPL-WERKSDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
EXPORTING Parameters details for CP_DB_EAPL_READ_BY_PLNNR
ZAEHL_MAX - max. change counter
Data type: EAPL-ZAEHLOptional: No
Call by Reference: No ( called with pass by value option)
ZKRIZ_MAX - Maximum value additional criterion counter
Data type: EAPL-ZKRIZOptional: No
Call by Reference: No ( called with pass by value option)
TABLES Parameters details for CP_DB_EAPL_READ_BY_PLNNR
EQUPL - Equipment/task list document table
Data type: EAPLBOptional: No
Call by Reference: No ( called with pass by value option)
EXCEPTIONS details
NO_RECORDS - No valid data records to routing n
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for CP_DB_EAPL_READ_BY_PLNNR 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_datub | TYPE PLKO-DATUV, " 0 | |||
| lt_equpl | TYPE STANDARD TABLE OF EAPLB, " | |||
| lv_zaehl_max | TYPE EAPL-ZAEHL, " | |||
| lv_no_records | TYPE EAPL, " | |||
| lv_datuv | TYPE PLKO-DATUV, " 0 | |||
| lv_zkriz_max | TYPE EAPL-ZKRIZ, " | |||
| lv_equnr | TYPE EAPL-EQUNR, " SPACE | |||
| lv_plnal | TYPE PLKO-PLNAL, " SPACE | |||
| lv_plnnr | TYPE EAPL-PLNNR, " | |||
| lv_plnty | TYPE PLKO-PLNTY, " | |||
| lv_werks | TYPE MAPL-WERKS. " SPACE |
|   CALL FUNCTION 'CP_DB_EAPL_READ_BY_PLNNR' "NOTRANSL: Pläne Instandhaltung: Objektzuordnung DB Zugriffe |
| EXPORTING | ||
| DATUB | = lv_datub | |
| DATUV | = lv_datuv | |
| EQUNR | = lv_equnr | |
| PLNAL | = lv_plnal | |
| PLNNR | = lv_plnnr | |
| PLNTY | = lv_plnty | |
| WERKS | = lv_werks | |
| IMPORTING | ||
| ZAEHL_MAX | = lv_zaehl_max | |
| ZKRIZ_MAX | = lv_zkriz_max | |
| TABLES | ||
| EQUPL | = lt_equpl | |
| EXCEPTIONS | ||
| NO_RECORDS = 1 | ||
| . " CP_DB_EAPL_READ_BY_PLNNR | ||
ABAP code using 7.40 inline data declarations to call FM CP_DB_EAPL_READ_BY_PLNNR
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 DATUV FROM PLKO INTO @DATA(ld_datub). | ||||
| "SELECT single ZAEHL FROM EAPL INTO @DATA(ld_zaehl_max). | ||||
| "SELECT single DATUV FROM PLKO INTO @DATA(ld_datuv). | ||||
| "SELECT single ZKRIZ FROM EAPL INTO @DATA(ld_zkriz_max). | ||||
| "SELECT single EQUNR FROM EAPL INTO @DATA(ld_equnr). | ||||
| DATA(ld_equnr) | = ' '. | |||
| "SELECT single PLNAL FROM PLKO INTO @DATA(ld_plnal). | ||||
| DATA(ld_plnal) | = ' '. | |||
| "SELECT single PLNNR FROM EAPL INTO @DATA(ld_plnnr). | ||||
| "SELECT single PLNTY FROM PLKO INTO @DATA(ld_plnty). | ||||
| "SELECT single WERKS FROM MAPL INTO @DATA(ld_werks). | ||||
| DATA(ld_werks) | = ' '. | |||
Search for further information about these or an SAP related objects