SAP CP_BT_PLAN_READ_FROM_DB_EXT Function Module for NOTRANSL: Plankerndaten zu einem Stichtag u. ggf. zu einer Alt. von DB les
CP_BT_PLAN_READ_FROM_DB_EXT is a standard cp bt plan read from db ext 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: Plankerndaten zu einem Stichtag u. ggf. zu einer Alt. von DB les 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 bt plan read from db ext FM, simply by entering the name CP_BT_PLAN_READ_FROM_DB_EXT into the relevant SAP transaction such as SE37 or SE38.
Function Group: CPBT
Program Name: SAPLCPBT
Main Program: SAPLCPBT
Appliation area: M
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:

Function CP_BT_PLAN_READ_FROM_DB_EXT 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_BT_PLAN_READ_FROM_DB_EXT'"NOTRANSL: Plankerndaten zu einem Stichtag u. ggf. zu einer Alt. von DB les.
EXPORTING
* FLG_ALT_IMP = 'X' "Read out header data
* CUOBJ_IMP = "
* PARNT_IMP = "
* FLG_OPR_IMP = 'X' "Read out operation and sub-operati
* FLG_SEQ_IMP = 'X' "Read out subsequent data
* PLNAL_IMP = ' ' "Routing/plan/network alternative
PLNNR_IMP = "Routing/plan/network number
PLNTY_IMP = "Routing/plan/network type
STTAG_IMP = "Key date
* I_FLG_USE_CPEX = ' ' "
* FCAPO_IMP = "
IMPORTING
FLG_SOP_GIVEN = "
PLKO_PROFIDNETZ_EXP = "
EXCEPTIONS
NOT_FOUND = 1
IMPORTING Parameters details for CP_BT_PLAN_READ_FROM_DB_EXT
FLG_ALT_IMP - Read out header data
Data type:Default: 'X'
Optional: Yes
Call by Reference: No ( called with pass by value option)
CUOBJ_IMP -
Data type: INOB-CUOBJOptional: Yes
Call by Reference: No ( called with pass by value option)
PARNT_IMP -
Data type: MARA-MATNROptional: Yes
Call by Reference: No ( called with pass by value option)
FLG_OPR_IMP - Read out operation and sub-operati
Data type:Default: 'X'
Optional: Yes
Call by Reference: No ( called with pass by value option)
FLG_SEQ_IMP - Read out subsequent data
Data type:Default: 'X'
Optional: Yes
Call by Reference: No ( called with pass by value option)
PLNAL_IMP - Routing/plan/network alternative
Data type: PLKO-PLNALDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
PLNNR_IMP - Routing/plan/network number
Data type: PLKO-PLNNROptional: No
Call by Reference: No ( called with pass by value option)
PLNTY_IMP - Routing/plan/network type
Data type: PLKO-PLNTYOptional: No
Call by Reference: No ( called with pass by value option)
STTAG_IMP - Key date
Data type: PLKO-DATUVOptional: No
Call by Reference: No ( called with pass by value option)
I_FLG_USE_CPEX -
Data type:Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
FCAPO_IMP -
Data type: PLKO-FLG_CAPOOptional: Yes
Call by Reference: No ( called with pass by value option)
EXPORTING Parameters details for CP_BT_PLAN_READ_FROM_DB_EXT
FLG_SOP_GIVEN -
Data type: RC27X-FLG_SELOptional: No
Call by Reference: No ( called with pass by value option)
PLKO_PROFIDNETZ_EXP -
Data type: PLKO-PROFIDNETZOptional: No
Call by Reference: No ( called with pass by value option)
EXCEPTIONS details
NOT_FOUND -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for CP_BT_PLAN_READ_FROM_DB_EXT 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_not_found | TYPE STRING, " | |||
| lv_flg_alt_imp | TYPE STRING, " 'X' | |||
| lv_flg_sop_given | TYPE RC27X-FLG_SEL, " | |||
| lv_cuobj_imp | TYPE INOB-CUOBJ, " | |||
| lv_parnt_imp | TYPE MARA-MATNR, " | |||
| lv_flg_opr_imp | TYPE MARA, " 'X' | |||
| lv_plko_profidnetz_exp | TYPE PLKO-PROFIDNETZ, " | |||
| lv_flg_seq_imp | TYPE PLKO, " 'X' | |||
| lv_plnal_imp | TYPE PLKO-PLNAL, " SPACE | |||
| lv_plnnr_imp | TYPE PLKO-PLNNR, " | |||
| lv_plnty_imp | TYPE PLKO-PLNTY, " | |||
| lv_sttag_imp | TYPE PLKO-DATUV, " | |||
| lv_i_flg_use_cpex | TYPE PLKO, " SPACE | |||
| lv_fcapo_imp | TYPE PLKO-FLG_CAPO. " |
|   CALL FUNCTION 'CP_BT_PLAN_READ_FROM_DB_EXT' "NOTRANSL: Plankerndaten zu einem Stichtag u. ggf. zu einer Alt. von DB les |
| EXPORTING | ||
| FLG_ALT_IMP | = lv_flg_alt_imp | |
| CUOBJ_IMP | = lv_cuobj_imp | |
| PARNT_IMP | = lv_parnt_imp | |
| FLG_OPR_IMP | = lv_flg_opr_imp | |
| FLG_SEQ_IMP | = lv_flg_seq_imp | |
| PLNAL_IMP | = lv_plnal_imp | |
| PLNNR_IMP | = lv_plnnr_imp | |
| PLNTY_IMP | = lv_plnty_imp | |
| STTAG_IMP | = lv_sttag_imp | |
| I_FLG_USE_CPEX | = lv_i_flg_use_cpex | |
| FCAPO_IMP | = lv_fcapo_imp | |
| IMPORTING | ||
| FLG_SOP_GIVEN | = lv_flg_sop_given | |
| PLKO_PROFIDNETZ_EXP | = lv_plko_profidnetz_exp | |
| EXCEPTIONS | ||
| NOT_FOUND = 1 | ||
| . " CP_BT_PLAN_READ_FROM_DB_EXT | ||
ABAP code using 7.40 inline data declarations to call FM CP_BT_PLAN_READ_FROM_DB_EXT
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_flg_alt_imp) | = 'X'. | |||
| "SELECT single FLG_SEL FROM RC27X INTO @DATA(ld_flg_sop_given). | ||||
| "SELECT single CUOBJ FROM INOB INTO @DATA(ld_cuobj_imp). | ||||
| "SELECT single MATNR FROM MARA INTO @DATA(ld_parnt_imp). | ||||
| DATA(ld_flg_opr_imp) | = 'X'. | |||
| "SELECT single PROFIDNETZ FROM PLKO INTO @DATA(ld_plko_profidnetz_exp). | ||||
| DATA(ld_flg_seq_imp) | = 'X'. | |||
| "SELECT single PLNAL FROM PLKO INTO @DATA(ld_plnal_imp). | ||||
| DATA(ld_plnal_imp) | = ' '. | |||
| "SELECT single PLNNR FROM PLKO INTO @DATA(ld_plnnr_imp). | ||||
| "SELECT single PLNTY FROM PLKO INTO @DATA(ld_plnty_imp). | ||||
| "SELECT single DATUV FROM PLKO INTO @DATA(ld_sttag_imp). | ||||
| DATA(ld_i_flg_use_cpex) | = ' '. | |||
| "SELECT single FLG_CAPO FROM PLKO INTO @DATA(ld_fcapo_imp). | ||||
Search for further information about these or an SAP related objects