SAP CS_ALT_SELECT_COUPLED_PRODUCT Function Module for NOTRANSL: Manuelle Alternativenselektion für Kuppelprodukte









CS_ALT_SELECT_COUPLED_PRODUCT is a standard cs alt select coupled product 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: Manuelle Alternativenselektion für Kuppelprodukte 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 cs alt select coupled product FM, simply by entering the name CS_ALT_SELECT_COUPLED_PRODUCT into the relevant SAP transaction such as SE37 or SE38.

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



Function CS_ALT_SELECT_COUPLED_PRODUCT 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 'CS_ALT_SELECT_COUPLED_PRODUCT'"NOTRANSL: Manuelle Alternativenselektion für Kuppelprodukte
EXPORTING
MATNR = "
GAMNG = "
GMEIN = "
PLNAW = "
ARBPA = "
* NOTAB = 'X' "
* DIALOG = 'X' "
* CALC_VERID = "
* PVSEL = '0' "
* AUTYP = "
WERKS = "
STTAG = "
STLAN = "
STLAL = "
CAPID = "
* VERSIONS = 'X' "
* USAGES = 'X' "
AUTO = "

IMPORTING
I_MATNR = "Material number
I_STLAL = "
I_LGORT = "
I_STLNR = "
I_MATKO_VERID = "
I_WERKS = "Plant
I_VERTO = "
I_VERID = "
I_CSPLIT = "
I_GAMNG = "
I_GMEIN = "
I_ALNAL = "
I_STLAN = "

TABLES
* TAB_MKAL = "
* TAB_MASTB = "
* TAB_STPOV = "

EXCEPTIONS
NO_BOM_FOUND = 1 NO_ALT_FOUND = 2 CALL_INVALID = 3
.



IMPORTING Parameters details for CS_ALT_SELECT_COUPLED_PRODUCT

MATNR -

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

GAMNG -

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

GMEIN -

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

PLNAW -

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

ARBPA -

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

NOTAB -

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

DIALOG -

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

CALC_VERID -

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

PVSEL -

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

AUTYP -

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

WERKS -

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

STTAG -

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

STLAN -

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

STLAL -

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

CAPID -

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

VERSIONS -

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

USAGES -

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

AUTO -

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

EXPORTING Parameters details for CS_ALT_SELECT_COUPLED_PRODUCT

I_MATNR - Material number

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

I_STLAL -

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

I_LGORT -

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

I_STLNR -

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

I_MATKO_VERID -

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

I_WERKS - Plant

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

I_VERTO -

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

I_VERID -

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

I_CSPLIT -

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

I_GAMNG -

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

I_GMEIN -

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

I_ALNAL -

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

I_STLAN -

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

TABLES Parameters details for CS_ALT_SELECT_COUPLED_PRODUCT

TAB_MKAL -

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

TAB_MASTB -

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

TAB_STPOV -

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

EXCEPTIONS details

NO_BOM_FOUND - No BOMs found

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

NO_ALT_FOUND - No alternatives found

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

CALL_INVALID - Invalid call

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

Copy and paste ABAP code example for CS_ALT_SELECT_COUPLED_PRODUCT 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_matnr  TYPE MASTB-MATNR, "   
lv_i_matnr  TYPE MASTB-MATNR, "   
lt_tab_mkal  TYPE STANDARD TABLE OF MKAL, "   
lv_no_bom_found  TYPE MKAL, "   
lv_gamng  TYPE CAUFV-GAMNG, "   
lv_i_stlal  TYPE MKAL-ALNAL, "   
lv_gmein  TYPE CAUFV-GMEIN, "   
lv_i_lgort  TYPE MKAL-ALORT, "   
lv_plnaw  TYPE TCO01-PLNAW, "   
lv_i_stlnr  TYPE MASTB-STLNR, "   
lv_arbpa  TYPE T399X-ARBPA, "   
lv_i_matko_verid  TYPE MKAL-VERID, "   
lv_notab  TYPE MASTB-SELKZ, "   'X'
lv_dialog  TYPE MASTB-SELKZ, "   'X'
lv_calc_verid  TYPE MKAL-VERID, "   
lv_pvsel  TYPE T399X-PVSEL, "   '0'
lv_autyp  TYPE CAUFV-AUTYP, "   
lv_werks  TYPE MASTB-WERKS, "   
lv_i_werks  TYPE MASTB-WERKS, "   
lt_tab_mastb  TYPE STANDARD TABLE OF MASTB, "   
lv_no_alt_found  TYPE MASTB, "   
lv_sttag  TYPE STKOB-DATUV, "   
lv_i_verto  TYPE MKAL-VERTO, "   
lt_tab_stpov  TYPE STANDARD TABLE OF STPOV, "   
lv_call_invalid  TYPE STPOV, "   
lv_stlan  TYPE CAUFV-STLAN, "   
lv_i_verid  TYPE MKAL-VERID, "   
lv_stlal  TYPE CAUFV-STLAL, "   
lv_i_csplit  TYPE MKAL-CSPLT, "   
lv_capid  TYPE T399X-CAPID, "   
lv_i_gamng  TYPE CAUFV-GAMNG, "   
lv_i_gmein  TYPE CAUFV-GMEIN, "   
lv_versions  TYPE MASTB-SELKZ, "   'X'
lv_usages  TYPE MASTB-SELKZ, "   'X'
lv_i_alnal  TYPE MKAL-ALNAL, "   
lv_auto  TYPE MASTB-SELKZ, "   
lv_i_stlan  TYPE CAUFV-STLAN. "   

  CALL FUNCTION 'CS_ALT_SELECT_COUPLED_PRODUCT'  "NOTRANSL: Manuelle Alternativenselektion für Kuppelprodukte
    EXPORTING
         MATNR = lv_matnr
         GAMNG = lv_gamng
         GMEIN = lv_gmein
         PLNAW = lv_plnaw
         ARBPA = lv_arbpa
         NOTAB = lv_notab
         DIALOG = lv_dialog
         CALC_VERID = lv_calc_verid
         PVSEL = lv_pvsel
         AUTYP = lv_autyp
         WERKS = lv_werks
         STTAG = lv_sttag
         STLAN = lv_stlan
         STLAL = lv_stlal
         CAPID = lv_capid
         VERSIONS = lv_versions
         USAGES = lv_usages
         AUTO = lv_auto
    IMPORTING
         I_MATNR = lv_i_matnr
         I_STLAL = lv_i_stlal
         I_LGORT = lv_i_lgort
         I_STLNR = lv_i_stlnr
         I_MATKO_VERID = lv_i_matko_verid
         I_WERKS = lv_i_werks
         I_VERTO = lv_i_verto
         I_VERID = lv_i_verid
         I_CSPLIT = lv_i_csplit
         I_GAMNG = lv_i_gamng
         I_GMEIN = lv_i_gmein
         I_ALNAL = lv_i_alnal
         I_STLAN = lv_i_stlan
    TABLES
         TAB_MKAL = lt_tab_mkal
         TAB_MASTB = lt_tab_mastb
         TAB_STPOV = lt_tab_stpov
    EXCEPTIONS
        NO_BOM_FOUND = 1
        NO_ALT_FOUND = 2
        CALL_INVALID = 3
. " CS_ALT_SELECT_COUPLED_PRODUCT




ABAP code using 7.40 inline data declarations to call FM CS_ALT_SELECT_COUPLED_PRODUCT

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 MATNR FROM MASTB INTO @DATA(ld_matnr).
 
"SELECT single MATNR FROM MASTB INTO @DATA(ld_i_matnr).
 
 
 
"SELECT single GAMNG FROM CAUFV INTO @DATA(ld_gamng).
 
"SELECT single ALNAL FROM MKAL INTO @DATA(ld_i_stlal).
 
"SELECT single GMEIN FROM CAUFV INTO @DATA(ld_gmein).
 
"SELECT single ALORT FROM MKAL INTO @DATA(ld_i_lgort).
 
"SELECT single PLNAW FROM TCO01 INTO @DATA(ld_plnaw).
 
"SELECT single STLNR FROM MASTB INTO @DATA(ld_i_stlnr).
 
"SELECT single ARBPA FROM T399X INTO @DATA(ld_arbpa).
 
"SELECT single VERID FROM MKAL INTO @DATA(ld_i_matko_verid).
 
"SELECT single SELKZ FROM MASTB INTO @DATA(ld_notab).
DATA(ld_notab) = 'X'.
 
"SELECT single SELKZ FROM MASTB INTO @DATA(ld_dialog).
DATA(ld_dialog) = 'X'.
 
"SELECT single VERID FROM MKAL INTO @DATA(ld_calc_verid).
 
"SELECT single PVSEL FROM T399X INTO @DATA(ld_pvsel).
DATA(ld_pvsel) = '0'.
 
"SELECT single AUTYP FROM CAUFV INTO @DATA(ld_autyp).
 
"SELECT single WERKS FROM MASTB INTO @DATA(ld_werks).
 
"SELECT single WERKS FROM MASTB INTO @DATA(ld_i_werks).
 
 
 
"SELECT single DATUV FROM STKOB INTO @DATA(ld_sttag).
 
"SELECT single VERTO FROM MKAL INTO @DATA(ld_i_verto).
 
 
 
"SELECT single STLAN FROM CAUFV INTO @DATA(ld_stlan).
 
"SELECT single VERID FROM MKAL INTO @DATA(ld_i_verid).
 
"SELECT single STLAL FROM CAUFV INTO @DATA(ld_stlal).
 
"SELECT single CSPLT FROM MKAL INTO @DATA(ld_i_csplit).
 
"SELECT single CAPID FROM T399X INTO @DATA(ld_capid).
 
"SELECT single GAMNG FROM CAUFV INTO @DATA(ld_i_gamng).
 
"SELECT single GMEIN FROM CAUFV INTO @DATA(ld_i_gmein).
 
"SELECT single SELKZ FROM MASTB INTO @DATA(ld_versions).
DATA(ld_versions) = 'X'.
 
"SELECT single SELKZ FROM MASTB INTO @DATA(ld_usages).
DATA(ld_usages) = 'X'.
 
"SELECT single ALNAL FROM MKAL INTO @DATA(ld_i_alnal).
 
"SELECT single SELKZ FROM MASTB INTO @DATA(ld_auto).
 
"SELECT single STLAN FROM CAUFV INTO @DATA(ld_i_stlan).
 


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!