SAP CP_EX_PLAN_READ Function Module for NOTRANSL: Arbeitsplan lesen für externe Anwendungen (neu)









CP_EX_PLAN_READ is a standard cp ex plan read 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: Arbeitsplan lesen für externe Anwendungen (neu) 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 ex plan read FM, simply by entering the name CP_EX_PLAN_READ into the relevant SAP transaction such as SE37 or SE38.

Function Group: CPEX
Program Name: SAPLCPEX
Main Program: SAPLCPEX
Appliation area: C
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:



Function CP_EX_PLAN_READ 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_EX_PLAN_READ'"NOTRANSL: Arbeitsplan lesen für externe Anwendungen (neu)
EXPORTING
* CMODE_IMP = 'R' "
* TCA11_IMP = ' ' "
* FLG_VAL_REC_IMP = ' ' "Flag: recipe must be approved
* STLNR_IMP = "
* I_PLAS_KEY_TAB = "
* PRODCOST = ' ' "Indicator: operations
* I_BUSINESS_OBJECT = "
* I_FLG_CHARACTERISTICS_PLANNING = ' ' "
* I_EDGNO = "Internal number for edge of object dependencies tree
* VBELN_IMP = ' ' "Sales Document
* POSNR_IMP = 0 "Sales document item
* PLNTY_IMP = 'N' "
* LOSGR_IMP = 1 "Total Order Quantity
* I_PLANT = "Plant
* I_FLG_CALLED_F_MRP = ' ' "
PLNNR_IMP = "
PLNAL_IMP = "
STTAG_IMP = "Key Date for Explosion
* CHECK_IMP = 'X' "
* CUOBJ_IMP = "
* PARNT_IMP = ' ' "
* FCAPO_IMP = ' ' "

IMPORTING
RES_APPR_CHK_EXP = "Result of approval check
ERROR_EXP = "
E_MAPL = "
PI_SET_USED = "General Indicator

TABLES
* MLST_EXP = "
PLPO_EXP = "
* PLTX_EXP = "
* AENNR_EXP = "Earliest change statuses before explosion date
* PLMK_EXP = "Inspection characteristic - document table
* PLMW_EXP = "MAPL-Dependent Charac. Specifications (Inspection Plan)
* PLAB_EXP = "
* PLAS_EXP = "
* PLFH_EXP = "
* PLFL_EXP = "
* PLFT_EXP = "
* PLFV_EXP = "
* PLKO_EXP = "
* PLMZ_EXP = "

EXCEPTIONS
NOT_FOUND = 1 PLNAL_INITIAL = 2
.



IMPORTING Parameters details for CP_EX_PLAN_READ

CMODE_IMP -

Data type: SY-DATAR
Default: 'R'
Optional: Yes
Call by Reference: No ( called with pass by value option)

TCA11_IMP -

Data type: TCA11
Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)

FLG_VAL_REC_IMP - Flag: recipe must be approved

Data type: T399X-VAL_REC
Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)

STLNR_IMP -

Data type: PLMZ-STLNR
Optional: Yes
Call by Reference: No ( called with pass by value option)

I_PLAS_KEY_TAB -

Data type: CPCL_OPR_IDENT_TAB_TYPE
Optional: Yes
Call by Reference: No ( called with pass by value option)

PRODCOST - Indicator: operations

Data type: TCA11-FLG_OPR
Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)

I_BUSINESS_OBJECT -

Data type: IBXX_BUSINESS_OBJECT
Optional: Yes
Call by Reference: No ( called with pass by value option)

I_FLG_CHARACTERISTICS_PLANNING -

Data type:
Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)

I_EDGNO - Internal number for edge of object dependencies tree

Data type: M60I-EDGNO
Optional: Yes
Call by Reference: No ( called with pass by value option)

VBELN_IMP - Sales Document

Data type: MAPL-VBELN
Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)

POSNR_IMP - Sales document item

Data type: MAPL-POSNR
Optional: Yes
Call by Reference: No ( called with pass by value option)

PLNTY_IMP -

Data type: PLKO-PLNTY
Default: 'N'
Optional: Yes
Call by Reference: No ( called with pass by value option)

LOSGR_IMP - Total Order Quantity

Data type: CAUFVD-GAMNG
Default: 1
Optional: Yes
Call by Reference: No ( called with pass by value option)

I_PLANT - Plant

Data type: MAPL-WERKS
Optional: Yes
Call by Reference: No ( called with pass by value option)

I_FLG_CALLED_F_MRP -

Data type:
Default: ' '
Optional: Yes
Call by Reference: No ( called with pass by value option)

PLNNR_IMP -

Data type: PLKO-PLNNR
Optional: No
Call by Reference: No ( called with pass by value option)

PLNAL_IMP -

Data type: PLKO-PLNAL
Optional: No
Call by Reference: No ( called with pass by value option)

STTAG_IMP - Key Date for Explosion

Data type: PLKO-DATUV
Optional: No
Call by Reference: No ( called with pass by value option)

CHECK_IMP -

Data type: PLKO-FLG_CHK
Default: 'X'
Optional: Yes
Call by Reference: No ( called with pass by value option)

CUOBJ_IMP -

Data type: INOB-CUOBJ
Optional: Yes
Call by Reference: No ( called with pass by value option)

PARNT_IMP -

Data type: MARA-MATNR
Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)

FCAPO_IMP -

Data type: PLKO-FLG_CAPO
Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)

EXPORTING Parameters details for CP_EX_PLAN_READ

RES_APPR_CHK_EXP - Result of approval check

Data type: PLKO-CHRULE
Optional: No
Call by Reference: No ( called with pass by value option)

ERROR_EXP -

Data type: PLKO-FLG_CHK
Optional: No
Call by Reference: No ( called with pass by value option)

E_MAPL -

Data type: MAPL
Optional: No
Call by Reference: No ( called with pass by value option)

PI_SET_USED - General Indicator

Data type: FLAG
Optional: No
Call by Reference: No ( called with pass by value option)

TABLES Parameters details for CP_EX_PLAN_READ

MLST_EXP -

Data type: MLSTD
Optional: Yes
Call by Reference: Yes

PLPO_EXP -

Data type: COPLPO
Optional: No
Call by Reference: No ( called with pass by value option)

PLTX_EXP -

Data type: PLTXD
Optional: Yes
Call by Reference: Yes

AENNR_EXP - Earliest change statuses before explosion date

Data type: RC280
Optional: Yes
Call by Reference: No ( called with pass by value option)

PLMK_EXP - Inspection characteristic - document table

Data type: PLMKB
Optional: Yes
Call by Reference: Yes

PLMW_EXP - MAPL-Dependent Charac. Specifications (Inspection Plan)

Data type: PLMW
Optional: Yes
Call by Reference: Yes

PLAB_EXP -

Data type: PLAB
Optional: Yes
Call by Reference: Yes

PLAS_EXP -

Data type: PLAS
Optional: Yes
Call by Reference: Yes

PLFH_EXP -

Data type: PLFH
Optional: Yes
Call by Reference: Yes

PLFL_EXP -

Data type: PLFL
Optional: Yes
Call by Reference: Yes

PLFT_EXP -

Data type: PLFT
Optional: Yes
Call by Reference: Yes

PLFV_EXP -

Data type: PLFV
Optional: Yes
Call by Reference: Yes

PLKO_EXP -

Data type: PLKO
Optional: Yes
Call by Reference: Yes

PLMZ_EXP -

Data type: PLMZ
Optional: Yes
Call by Reference: Yes

EXCEPTIONS details

NOT_FOUND -

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

PLNAL_INITIAL - Task list alternative not specified

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

Copy and paste ABAP code example for CP_EX_PLAN_READ 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_mlst_exp  TYPE STANDARD TABLE OF MLSTD, "   
lv_cmode_imp  TYPE SY-DATAR, "   'R'
lv_not_found  TYPE SY, "   
lv_res_appr_chk_exp  TYPE PLKO-CHRULE, "   
lt_plpo_exp  TYPE STANDARD TABLE OF COPLPO, "   
lv_tca11_imp  TYPE TCA11, "   SPACE
lt_pltx_exp  TYPE STANDARD TABLE OF PLTXD, "   
lv_flg_val_rec_imp  TYPE T399X-VAL_REC, "   SPACE
lt_aennr_exp  TYPE STANDARD TABLE OF RC280, "   
lv_stlnr_imp  TYPE PLMZ-STLNR, "   
lt_plmk_exp  TYPE STANDARD TABLE OF PLMKB, "   
lv_i_plas_key_tab  TYPE CPCL_OPR_IDENT_TAB_TYPE, "   
lt_plmw_exp  TYPE STANDARD TABLE OF PLMW, "   
lv_prodcost  TYPE TCA11-FLG_OPR, "   SPACE
lv_i_business_object  TYPE IBXX_BUSINESS_OBJECT, "   
lv_i_flg_characteristics_planning  TYPE IBXX_BUSINESS_OBJECT, "   SPACE
lv_i_edgno  TYPE M60I-EDGNO, "   
lv_vbeln_imp  TYPE MAPL-VBELN, "   SPACE
lv_posnr_imp  TYPE MAPL-POSNR, "   0
lt_plab_exp  TYPE STANDARD TABLE OF PLAB, "   
lv_error_exp  TYPE PLKO-FLG_CHK, "   
lv_plnty_imp  TYPE PLKO-PLNTY, "   'N'
lv_plnal_initial  TYPE PLKO, "   
lv_losgr_imp  TYPE CAUFVD-GAMNG, "   1
lv_i_plant  TYPE MAPL-WERKS, "   
lv_i_flg_called_f_mrp  TYPE MAPL, "   ' '
lv_e_mapl  TYPE MAPL, "   
lt_plas_exp  TYPE STANDARD TABLE OF PLAS, "   
lv_plnnr_imp  TYPE PLKO-PLNNR, "   
lt_plfh_exp  TYPE STANDARD TABLE OF PLFH, "   
lv_plnal_imp  TYPE PLKO-PLNAL, "   
lv_pi_set_used  TYPE FLAG, "   
lt_plfl_exp  TYPE STANDARD TABLE OF PLFL, "   
lv_sttag_imp  TYPE PLKO-DATUV, "   
lt_plft_exp  TYPE STANDARD TABLE OF PLFT, "   
lv_check_imp  TYPE PLKO-FLG_CHK, "   'X'
lt_plfv_exp  TYPE STANDARD TABLE OF PLFV, "   
lv_cuobj_imp  TYPE INOB-CUOBJ, "   
lt_plko_exp  TYPE STANDARD TABLE OF PLKO, "   
lv_parnt_imp  TYPE MARA-MATNR, "   SPACE
lt_plmz_exp  TYPE STANDARD TABLE OF PLMZ, "   
lv_fcapo_imp  TYPE PLKO-FLG_CAPO. "   SPACE

  CALL FUNCTION 'CP_EX_PLAN_READ'  "NOTRANSL: Arbeitsplan lesen für externe Anwendungen (neu)
    EXPORTING
         CMODE_IMP = lv_cmode_imp
         TCA11_IMP = lv_tca11_imp
         FLG_VAL_REC_IMP = lv_flg_val_rec_imp
         STLNR_IMP = lv_stlnr_imp
         I_PLAS_KEY_TAB = lv_i_plas_key_tab
         PRODCOST = lv_prodcost
         I_BUSINESS_OBJECT = lv_i_business_object
         I_FLG_CHARACTERISTICS_PLANNING = lv_i_flg_characteristics_planning
         I_EDGNO = lv_i_edgno
         VBELN_IMP = lv_vbeln_imp
         POSNR_IMP = lv_posnr_imp
         PLNTY_IMP = lv_plnty_imp
         LOSGR_IMP = lv_losgr_imp
         I_PLANT = lv_i_plant
         I_FLG_CALLED_F_MRP = lv_i_flg_called_f_mrp
         PLNNR_IMP = lv_plnnr_imp
         PLNAL_IMP = lv_plnal_imp
         STTAG_IMP = lv_sttag_imp
         CHECK_IMP = lv_check_imp
         CUOBJ_IMP = lv_cuobj_imp
         PARNT_IMP = lv_parnt_imp
         FCAPO_IMP = lv_fcapo_imp
    IMPORTING
         RES_APPR_CHK_EXP = lv_res_appr_chk_exp
         ERROR_EXP = lv_error_exp
         E_MAPL = lv_e_mapl
         PI_SET_USED = lv_pi_set_used
    TABLES
         MLST_EXP = lt_mlst_exp
         PLPO_EXP = lt_plpo_exp
         PLTX_EXP = lt_pltx_exp
         AENNR_EXP = lt_aennr_exp
         PLMK_EXP = lt_plmk_exp
         PLMW_EXP = lt_plmw_exp
         PLAB_EXP = lt_plab_exp
         PLAS_EXP = lt_plas_exp
         PLFH_EXP = lt_plfh_exp
         PLFL_EXP = lt_plfl_exp
         PLFT_EXP = lt_plft_exp
         PLFV_EXP = lt_plfv_exp
         PLKO_EXP = lt_plko_exp
         PLMZ_EXP = lt_plmz_exp
    EXCEPTIONS
        NOT_FOUND = 1
        PLNAL_INITIAL = 2
. " CP_EX_PLAN_READ




ABAP code using 7.40 inline data declarations to call FM CP_EX_PLAN_READ

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 DATAR FROM SY INTO @DATA(ld_cmode_imp).
DATA(ld_cmode_imp) = 'R'.
 
 
"SELECT single CHRULE FROM PLKO INTO @DATA(ld_res_appr_chk_exp).
 
 
DATA(ld_tca11_imp) = ' '.
 
 
"SELECT single VAL_REC FROM T399X INTO @DATA(ld_flg_val_rec_imp).
DATA(ld_flg_val_rec_imp) = ' '.
 
 
"SELECT single STLNR FROM PLMZ INTO @DATA(ld_stlnr_imp).
 
 
 
 
"SELECT single FLG_OPR FROM TCA11 INTO @DATA(ld_prodcost).
DATA(ld_prodcost) = ' '.
 
 
DATA(ld_i_flg_characteristics_planning) = ' '.
 
"SELECT single EDGNO FROM M60I INTO @DATA(ld_i_edgno).
 
"SELECT single VBELN FROM MAPL INTO @DATA(ld_vbeln_imp).
DATA(ld_vbeln_imp) = ' '.
 
"SELECT single POSNR FROM MAPL INTO @DATA(ld_posnr_imp).
 
 
"SELECT single FLG_CHK FROM PLKO INTO @DATA(ld_error_exp).
 
"SELECT single PLNTY FROM PLKO INTO @DATA(ld_plnty_imp).
DATA(ld_plnty_imp) = 'N'.
 
 
"SELECT single GAMNG FROM CAUFVD INTO @DATA(ld_losgr_imp).
DATA(ld_losgr_imp) = 1.
 
"SELECT single WERKS FROM MAPL INTO @DATA(ld_i_plant).
 
DATA(ld_i_flg_called_f_mrp) = ' '.
 
 
 
"SELECT single PLNNR FROM PLKO INTO @DATA(ld_plnnr_imp).
 
 
"SELECT single PLNAL FROM PLKO INTO @DATA(ld_plnal_imp).
 
 
 
"SELECT single DATUV FROM PLKO INTO @DATA(ld_sttag_imp).
 
 
"SELECT single FLG_CHK FROM PLKO INTO @DATA(ld_check_imp).
DATA(ld_check_imp) = 'X'.
 
 
"SELECT single CUOBJ FROM INOB INTO @DATA(ld_cuobj_imp).
 
 
"SELECT single MATNR FROM MARA INTO @DATA(ld_parnt_imp).
DATA(ld_parnt_imp) = ' '.
 
 
"SELECT single FLG_CAPO FROM PLKO INTO @DATA(ld_fcapo_imp).
DATA(ld_fcapo_imp) = ' '.
 


Search for further information about these or an SAP related objects



Comments on this SAP object

What made you want to lookup this SAP object? Please tell us what you were looking for and anything you would like to be included on this page!