SAP CP_SE_ALT_SELECT_AUTO Function Module for Automatic selection of alternative task lists









CP_SE_ALT_SELECT_AUTO is a standard cp se alt select auto SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Automatic selection of alternative task lists 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 se alt select auto FM, simply by entering the name CP_SE_ALT_SELECT_AUTO into the relevant SAP transaction such as SE37 or SE38.

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



Function CP_SE_ALT_SELECT_AUTO 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_SE_ALT_SELECT_AUTO'"Automatic selection of alternative task lists
EXPORTING
* EQUNR = '' "
* PLNAW = '' "
* PLNME = '' "
* PLNNR = '' "
* PLNTY = '' "
* SCHED_TYPE = '' "
* SEL_ID = '' "
* STATU = '' "
STTAG = "
* VAGRP = '' "
* VERID = '' "
* FLG_DELKZ = 'X' "
* VERWE1 = '' "
* VERWE2 = '' "
* VERWE3 = '' "
* VERWE4 = '' "
* VERWE5 = '' "
* WERKS_ALT = '' "Plant of alternative
* WERKS_MAT = '' "Plant of the material
* PLOBJ = '' "
* STFNA = '' "
* TCA43_FLG = '' "
* IWERK = '' "
* CHECK_COST = '' "
* VBELN = '' "
* POSNR = 0 "
* PSPNR = 0 "
* KUNR = '' "
* LIFNR = '' "
* LOSGR = 0 "
* MATNR = '' "
OBJECT = "
* PLNAL = '' "

IMPORTING
PLNAL = "
PLNNR = "
PLNTY = "
TCA43_COUNT = "

EXCEPTIONS
INVALID_PARAS = 1 INVALID_PLNTY_PLNAW = 2 NOT_FOUND = 3 TCA43_NOT_FOUND = 4 TCA43_NO_SELECTION = 5
.



IMPORTING Parameters details for CP_SE_ALT_SELECT_AUTO

EQUNR -

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

PLNAW -

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

PLNME -

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

PLNNR -

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

PLNTY -

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

SCHED_TYPE -

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

SEL_ID -

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

STATU -

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

STTAG -

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

VAGRP -

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

VERID -

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

FLG_DELKZ -

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

VERWE1 -

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

VERWE2 -

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

VERWE3 -

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

VERWE4 -

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

VERWE5 -

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

WERKS_ALT - Plant of alternative

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

WERKS_MAT - Plant of the material

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

PLOBJ -

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

STFNA -

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

TCA43_FLG -

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

IWERK -

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

CHECK_COST -

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

VBELN -

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

POSNR -

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

PSPNR -

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

KUNR -

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

LIFNR -

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

LOSGR -

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

MATNR -

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

OBJECT -

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

PLNAL -

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

EXPORTING Parameters details for CP_SE_ALT_SELECT_AUTO

PLNAL -

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

PLNNR -

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

PLNTY -

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

TCA43_COUNT -

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

EXCEPTIONS details

INVALID_PARAS - Import parameter incomplete

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

INVALID_PLNTY_PLNAW -

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

NOT_FOUND - No appropriate alternative found

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

TCA43_NOT_FOUND -

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

TCA43_NO_SELECTION -

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

Copy and paste ABAP code example for CP_SE_ALT_SELECT_AUTO 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_equnr  TYPE RCPSE-EQUNR, "   ''
lv_plnal  TYPE RCPSE-PLNAL, "   
lv_invalid_paras  TYPE RCPSE, "   
lv_plnaw  TYPE RCPSE-PLNAW, "   ''
lv_plnme  TYPE RCPSE-PLNME, "   ''
lv_plnnr  TYPE RCPSE-PLNNR, "   ''
lv_plnty  TYPE RCPSE-PLNTY, "   ''
lv_sched_type  TYPE RCPSE-SCHED_TYPE, "   ''
lv_sel_id  TYPE RCPSE-SEL_ID, "   ''
lv_statu  TYPE RCPSE-STATU, "   ''
lv_sttag  TYPE RCPSE-STTAG, "   
lv_vagrp  TYPE RCPSE-VAGRP, "   ''
lv_verid  TYPE RCPSE-VERID, "   ''
lv_plnnr  TYPE RCPSE-PLNNR, "   
lv_flg_delkz  TYPE RCPSE-FLG_DELKZ, "   'X'
lv_invalid_plnty_plnaw  TYPE RCPSE, "   
lv_verwe1  TYPE RCPSE-VERWE1, "   ''
lv_verwe2  TYPE RCPSE-VERWE2, "   ''
lv_verwe3  TYPE RCPSE-VERWE3, "   ''
lv_verwe4  TYPE RCPSE-VERWE4, "   ''
lv_verwe5  TYPE RCPSE-VERWE5, "   ''
lv_werks_alt  TYPE RCPSE-WERKS_ALT, "   ''
lv_werks_mat  TYPE RCPSE-WERKS_MAT, "   ''
lv_plobj  TYPE RCPSE-PLOBJ, "   ''
lv_stfna  TYPE RCPSE-STFNA, "   ''
lv_tca43_flg  TYPE RCPSE-FLG_DELKZ, "   ''
lv_iwerk  TYPE RCPSE-WERKS_EQU, "   ''
lv_plnty  TYPE RCPSE-PLNTY, "   
lv_not_found  TYPE RCPSE, "   
lv_check_cost  TYPE RCPSE-CHECK_COST, "   ''
lv_vbeln  TYPE RCPSE-VBELN, "   ''
lv_posnr  TYPE RCPSE-POSNR, "   0
lv_pspnr  TYPE RCPSE-PSPNR, "   0
lv_kunr  TYPE RCPSE-KUNNR, "   ''
lv_tca43_count  TYPE PLKO-ZAEHL, "   
lv_tca43_not_found  TYPE PLKO, "   
lv_lifnr  TYPE RCPSE-LIFNR, "   ''
lv_tca43_no_selection  TYPE RCPSE, "   
lv_losgr  TYPE RCPSE-LOSGR, "   0
lv_matnr  TYPE RCPSE-MATNR, "   ''
lv_object  TYPE RCPSE-OBJECT, "   
lv_plnal  TYPE RCPSE-PLNAL. "   ''

  CALL FUNCTION 'CP_SE_ALT_SELECT_AUTO'  "Automatic selection of alternative task lists
    EXPORTING
         EQUNR = lv_equnr
         PLNAW = lv_plnaw
         PLNME = lv_plnme
         PLNNR = lv_plnnr
         PLNTY = lv_plnty
         SCHED_TYPE = lv_sched_type
         SEL_ID = lv_sel_id
         STATU = lv_statu
         STTAG = lv_sttag
         VAGRP = lv_vagrp
         VERID = lv_verid
         FLG_DELKZ = lv_flg_delkz
         VERWE1 = lv_verwe1
         VERWE2 = lv_verwe2
         VERWE3 = lv_verwe3
         VERWE4 = lv_verwe4
         VERWE5 = lv_verwe5
         WERKS_ALT = lv_werks_alt
         WERKS_MAT = lv_werks_mat
         PLOBJ = lv_plobj
         STFNA = lv_stfna
         TCA43_FLG = lv_tca43_flg
         IWERK = lv_iwerk
         CHECK_COST = lv_check_cost
         VBELN = lv_vbeln
         POSNR = lv_posnr
         PSPNR = lv_pspnr
         KUNR = lv_kunr
         LIFNR = lv_lifnr
         LOSGR = lv_losgr
         MATNR = lv_matnr
         OBJECT = lv_object
         PLNAL = lv_plnal
    IMPORTING
         PLNAL = lv_plnal
         PLNNR = lv_plnnr
         PLNTY = lv_plnty
         TCA43_COUNT = lv_tca43_count
    EXCEPTIONS
        INVALID_PARAS = 1
        INVALID_PLNTY_PLNAW = 2
        NOT_FOUND = 3
        TCA43_NOT_FOUND = 4
        TCA43_NO_SELECTION = 5
. " CP_SE_ALT_SELECT_AUTO




ABAP code using 7.40 inline data declarations to call FM CP_SE_ALT_SELECT_AUTO

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 EQUNR FROM RCPSE INTO @DATA(ld_equnr).
DATA(ld_equnr) = ''.
 
"SELECT single PLNAL FROM RCPSE INTO @DATA(ld_plnal).
 
 
"SELECT single PLNAW FROM RCPSE INTO @DATA(ld_plnaw).
DATA(ld_plnaw) = ''.
 
"SELECT single PLNME FROM RCPSE INTO @DATA(ld_plnme).
DATA(ld_plnme) = ''.
 
"SELECT single PLNNR FROM RCPSE INTO @DATA(ld_plnnr).
DATA(ld_plnnr) = ''.
 
"SELECT single PLNTY FROM RCPSE INTO @DATA(ld_plnty).
DATA(ld_plnty) = ''.
 
"SELECT single SCHED_TYPE FROM RCPSE INTO @DATA(ld_sched_type).
DATA(ld_sched_type) = ''.
 
"SELECT single SEL_ID FROM RCPSE INTO @DATA(ld_sel_id).
DATA(ld_sel_id) = ''.
 
"SELECT single STATU FROM RCPSE INTO @DATA(ld_statu).
DATA(ld_statu) = ''.
 
"SELECT single STTAG FROM RCPSE INTO @DATA(ld_sttag).
 
"SELECT single VAGRP FROM RCPSE INTO @DATA(ld_vagrp).
DATA(ld_vagrp) = ''.
 
"SELECT single VERID FROM RCPSE INTO @DATA(ld_verid).
DATA(ld_verid) = ''.
 
"SELECT single PLNNR FROM RCPSE INTO @DATA(ld_plnnr).
 
"SELECT single FLG_DELKZ FROM RCPSE INTO @DATA(ld_flg_delkz).
DATA(ld_flg_delkz) = 'X'.
 
 
"SELECT single VERWE1 FROM RCPSE INTO @DATA(ld_verwe1).
DATA(ld_verwe1) = ''.
 
"SELECT single VERWE2 FROM RCPSE INTO @DATA(ld_verwe2).
DATA(ld_verwe2) = ''.
 
"SELECT single VERWE3 FROM RCPSE INTO @DATA(ld_verwe3).
DATA(ld_verwe3) = ''.
 
"SELECT single VERWE4 FROM RCPSE INTO @DATA(ld_verwe4).
DATA(ld_verwe4) = ''.
 
"SELECT single VERWE5 FROM RCPSE INTO @DATA(ld_verwe5).
DATA(ld_verwe5) = ''.
 
"SELECT single WERKS_ALT FROM RCPSE INTO @DATA(ld_werks_alt).
DATA(ld_werks_alt) = ''.
 
"SELECT single WERKS_MAT FROM RCPSE INTO @DATA(ld_werks_mat).
DATA(ld_werks_mat) = ''.
 
"SELECT single PLOBJ FROM RCPSE INTO @DATA(ld_plobj).
DATA(ld_plobj) = ''.
 
"SELECT single STFNA FROM RCPSE INTO @DATA(ld_stfna).
DATA(ld_stfna) = ''.
 
"SELECT single FLG_DELKZ FROM RCPSE INTO @DATA(ld_tca43_flg).
DATA(ld_tca43_flg) = ''.
 
"SELECT single WERKS_EQU FROM RCPSE INTO @DATA(ld_iwerk).
DATA(ld_iwerk) = ''.
 
"SELECT single PLNTY FROM RCPSE INTO @DATA(ld_plnty).
 
 
"SELECT single CHECK_COST FROM RCPSE INTO @DATA(ld_check_cost).
DATA(ld_check_cost) = ''.
 
"SELECT single VBELN FROM RCPSE INTO @DATA(ld_vbeln).
DATA(ld_vbeln) = ''.
 
"SELECT single POSNR FROM RCPSE INTO @DATA(ld_posnr).
 
"SELECT single PSPNR FROM RCPSE INTO @DATA(ld_pspnr).
 
"SELECT single KUNNR FROM RCPSE INTO @DATA(ld_kunr).
DATA(ld_kunr) = ''.
 
"SELECT single ZAEHL FROM PLKO INTO @DATA(ld_tca43_count).
 
 
"SELECT single LIFNR FROM RCPSE INTO @DATA(ld_lifnr).
DATA(ld_lifnr) = ''.
 
 
"SELECT single LOSGR FROM RCPSE INTO @DATA(ld_losgr).
 
"SELECT single MATNR FROM RCPSE INTO @DATA(ld_matnr).
DATA(ld_matnr) = ''.
 
"SELECT single OBJECT FROM RCPSE INTO @DATA(ld_object).
 
"SELECT single PLNAL FROM RCPSE INTO @DATA(ld_plnal).
DATA(ld_plnal) = ''.
 


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!