SAP CS_BOM_EXPL_TPL_V1 Function Module for BOM explosion for functional location









CS_BOM_EXPL_TPL_V1 is a standard cs bom expl tpl v1 SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for BOM explosion for functional location 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 bom expl tpl v1 FM, simply by entering the name CS_BOM_EXPL_TPL_V1 into the relevant SAP transaction such as SE37 or SE38.

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



Function CS_BOM_EXPL_TPL_V1 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_BOM_EXPL_TPL_V1'"BOM explosion for functional location
EXPORTING
* ALTVO = ' ' "Alternative Priority
* COSPR = ' ' "Internal: (CO) order-spec. MatPreRead
* DATUV = 00000000 "Valid On
* DELNL = ' ' "Delete items not kept in stock from list
* EHNDL = ' ' "
* EMENG = 0 "Required quantity
* ERSKZ = ' ' "Spare part indicator
* ERSSL = ' ' "Spare part selection indicator
* FBSTP = ' ' "Limited multi-level - stop explosion at externally procured item
* MBWLS = ' ' "Read Material Valuation
* MDMPS = ' ' "Limited multi-level - explode phantom assemblies at least
* AUFSW = ' ' "Determine and enter order level and channel
* MEHRS = ' ' "Multi-level explosion
* MKMAT = ' ' "Limited multi-level; explode KMAT
* MMORY = ' ' "Memory Mgmt ('1'=On;'0'=Off;' '=No Reaction)
* POSTP = ' ' "Item category
* RVREL = ' ' "Relevant to sales
* SANFR = ' ' "Production
* SANIN = ' ' "Maintenance
* SANKA = ' ' "Costing
* SANKO = ' ' "Engineering/design
* SANVS = ' ' "Shipping
* AUSKZ = ' ' "Take Scrap into Account
* SCHGT = ' ' "Bulk material
* STKKZ = ' ' "PM assembly
* STLAL = ' ' "Alternative BOM
* STLAN = ' ' "BOM usage
TPNRV = "Functional location number
WERKS = "Plant
* BAGRP = ' ' "Assembly restriction
* BEIKZ = ' ' "Material Provision Indicator
* BESSL = ' ' "Material provision selection indicator
* BGIXO = ' ' "Load assembly information for exploded assemblies only
* BREMS = ' ' "Limited explosion
* CAPID = 'STD1' "Application ID

IMPORTING
TOPTPL = "Data for start object (functional location)

TABLES
STB = "Collective item data table
MATCAT = "Material catalog (sub-assemblies)

EXCEPTIONS
ALT_NOT_FOUND = 1 CALL_INVALID = 2 FUNCTIONAL_LOCATION_NOT_FOUND = 3 MISSING_AUTHORIZATION = 4 NO_BOM_FOUND = 5 NO_PLANT_DATA = 6 NO_SUITABLE_BOM_FOUND = 7
.



IMPORTING Parameters details for CS_BOM_EXPL_TPL_V1

ALTVO - Alternative Priority

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

COSPR - Internal: (CO) order-spec. MatPreRead

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

DATUV - Valid On

Data type: STKO-DATUV
Default: 00000000
Optional: Yes
Call by Reference: No ( called with pass by value option)

DELNL - Delete items not kept in stock from list

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

EHNDL -

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

EMENG - Required quantity

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

ERSKZ - Spare part indicator

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

ERSSL - Spare part selection indicator

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

FBSTP - Limited multi-level - stop explosion at externally procured item

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

MBWLS - Read Material Valuation

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

MDMPS - Limited multi-level - explode phantom assemblies at least

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

AUFSW - Determine and enter order level and channel

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

MEHRS - Multi-level explosion

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

MKMAT - Limited multi-level; explode KMAT

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

MMORY - Memory Mgmt ('1'=On;'0'=Off;' '=No Reaction)

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

POSTP - Item category

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

RVREL - Relevant to sales

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

SANFR - Production

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

SANIN - Maintenance

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

SANKA - Costing

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

SANKO - Engineering/design

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

SANVS - Shipping

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

AUSKZ - Take Scrap into Account

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

SCHGT - Bulk material

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

STKKZ - PM assembly

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

STLAL - Alternative BOM

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

STLAN - BOM usage

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

TPNRV - Functional location number

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

WERKS - Plant

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

BAGRP - Assembly restriction

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

BEIKZ - Material Provision Indicator

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

BESSL - Material provision selection indicator

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

BGIXO - Load assembly information for exploded assemblies only

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

BREMS - Limited explosion

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

CAPID - Application ID

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

EXPORTING Parameters details for CS_BOM_EXPL_TPL_V1

TOPTPL - Data for start object (functional location)

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

TABLES Parameters details for CS_BOM_EXPL_TPL_V1

STB - Collective item data table

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

MATCAT - Material catalog (sub-assemblies)

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

EXCEPTIONS details

ALT_NOT_FOUND - Alternative not found

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

CALL_INVALID - Incorrect parameter combination

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

FUNCTIONAL_LOCATION_NOT_FOUND - Functional location does not exist

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

MISSING_AUTHORIZATION - No authorization (bill of material)

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

NO_BOM_FOUND - No BOM for functional location

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

NO_PLANT_DATA - Plant data is missing

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

NO_SUITABLE_BOM_FOUND - Bill of material does not exist

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

Copy and paste ABAP code example for CS_BOM_EXPL_TPL_V1 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_stb  TYPE STANDARD TABLE OF STPOX, "   
lv_altvo  TYPE CSDATA-XFELD, "   SPACE
lv_toptpl  TYPE CSTTPL, "   
lv_alt_not_found  TYPE CSTTPL, "   
lv_cospr  TYPE CSDATA-XFELD, "   SPACE
lv_datuv  TYPE STKO-DATUV, "   00000000
lv_delnl  TYPE CSDATA-XFELD, "   SPACE
lv_ehndl  TYPE CSDATA-XFELD, "   SPACE
lv_emeng  TYPE STKO-BMENG, "   0
lv_erskz  TYPE STPO-ERSKZ, "   SPACE
lv_erssl  TYPE CSDATA-XFELD, "   SPACE
lv_fbstp  TYPE CSDATA-XFELD, "   SPACE
lv_mbwls  TYPE CSDATA-XFELD, "   SPACE
lv_mdmps  TYPE CSDATA-XFELD, "   SPACE
lv_aufsw  TYPE CSDATA-XFELD, "   SPACE
lt_matcat  TYPE STANDARD TABLE OF CSCMAT, "   
lv_call_invalid  TYPE CSCMAT, "   
lv_mehrs  TYPE CSDATA-XFELD, "   SPACE
lv_mkmat  TYPE CSDATA-XFELD, "   SPACE
lv_mmory  TYPE CSDATA-XFELD, "   SPACE
lv_postp  TYPE STPO-POSTP, "   SPACE
lv_rvrel  TYPE STPO-RVREL, "   SPACE
lv_sanfr  TYPE STPO-SANFE, "   SPACE
lv_sanin  TYPE STPO-SANIN, "   SPACE
lv_sanka  TYPE STPO-SANKA, "   SPACE
lv_sanko  TYPE STPO-SANKO, "   SPACE
lv_sanvs  TYPE STPO-SANVS, "   SPACE
lv_auskz  TYPE CSDATA-XFELD, "   SPACE
lv_functional_location_not_found  TYPE CSDATA, "   
lv_schgt  TYPE STPO-SCHGT, "   SPACE
lv_stkkz  TYPE STPO-STKKZ, "   SPACE
lv_stlal  TYPE STKO-STLAL, "   SPACE
lv_stlan  TYPE STZU-STLAN, "   SPACE
lv_tpnrv  TYPE IFLO-TPLNR, "   
lv_werks  TYPE MARC-WERKS, "   
lv_bagrp  TYPE MARA-MATNR, "   SPACE
lv_missing_authorization  TYPE MARA, "   
lv_beikz  TYPE STPO-BEIKZ, "   SPACE
lv_no_bom_found  TYPE STPO, "   
lv_bessl  TYPE CSDATA-XFELD, "   SPACE
lv_no_plant_data  TYPE CSDATA, "   
lv_bgixo  TYPE CSDATA-XFELD, "   SPACE
lv_no_suitable_bom_found  TYPE CSDATA, "   
lv_brems  TYPE CSDATA-XFELD, "   SPACE
lv_capid  TYPE TC04-CAPID. "   'STD1'

  CALL FUNCTION 'CS_BOM_EXPL_TPL_V1'  "BOM explosion for functional location
    EXPORTING
         ALTVO = lv_altvo
         COSPR = lv_cospr
         DATUV = lv_datuv
         DELNL = lv_delnl
         EHNDL = lv_ehndl
         EMENG = lv_emeng
         ERSKZ = lv_erskz
         ERSSL = lv_erssl
         FBSTP = lv_fbstp
         MBWLS = lv_mbwls
         MDMPS = lv_mdmps
         AUFSW = lv_aufsw
         MEHRS = lv_mehrs
         MKMAT = lv_mkmat
         MMORY = lv_mmory
         POSTP = lv_postp
         RVREL = lv_rvrel
         SANFR = lv_sanfr
         SANIN = lv_sanin
         SANKA = lv_sanka
         SANKO = lv_sanko
         SANVS = lv_sanvs
         AUSKZ = lv_auskz
         SCHGT = lv_schgt
         STKKZ = lv_stkkz
         STLAL = lv_stlal
         STLAN = lv_stlan
         TPNRV = lv_tpnrv
         WERKS = lv_werks
         BAGRP = lv_bagrp
         BEIKZ = lv_beikz
         BESSL = lv_bessl
         BGIXO = lv_bgixo
         BREMS = lv_brems
         CAPID = lv_capid
    IMPORTING
         TOPTPL = lv_toptpl
    TABLES
         STB = lt_stb
         MATCAT = lt_matcat
    EXCEPTIONS
        ALT_NOT_FOUND = 1
        CALL_INVALID = 2
        FUNCTIONAL_LOCATION_NOT_FOUND = 3
        MISSING_AUTHORIZATION = 4
        NO_BOM_FOUND = 5
        NO_PLANT_DATA = 6
        NO_SUITABLE_BOM_FOUND = 7
. " CS_BOM_EXPL_TPL_V1




ABAP code using 7.40 inline data declarations to call FM CS_BOM_EXPL_TPL_V1

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 XFELD FROM CSDATA INTO @DATA(ld_altvo).
DATA(ld_altvo) = ' '.
 
 
 
"SELECT single XFELD FROM CSDATA INTO @DATA(ld_cospr).
DATA(ld_cospr) = ' '.
 
"SELECT single DATUV FROM STKO INTO @DATA(ld_datuv).
DATA(ld_datuv) = 00000000.
 
"SELECT single XFELD FROM CSDATA INTO @DATA(ld_delnl).
DATA(ld_delnl) = ' '.
 
"SELECT single XFELD FROM CSDATA INTO @DATA(ld_ehndl).
DATA(ld_ehndl) = ' '.
 
"SELECT single BMENG FROM STKO INTO @DATA(ld_emeng).
 
"SELECT single ERSKZ FROM STPO INTO @DATA(ld_erskz).
DATA(ld_erskz) = ' '.
 
"SELECT single XFELD FROM CSDATA INTO @DATA(ld_erssl).
DATA(ld_erssl) = ' '.
 
"SELECT single XFELD FROM CSDATA INTO @DATA(ld_fbstp).
DATA(ld_fbstp) = ' '.
 
"SELECT single XFELD FROM CSDATA INTO @DATA(ld_mbwls).
DATA(ld_mbwls) = ' '.
 
"SELECT single XFELD FROM CSDATA INTO @DATA(ld_mdmps).
DATA(ld_mdmps) = ' '.
 
"SELECT single XFELD FROM CSDATA INTO @DATA(ld_aufsw).
DATA(ld_aufsw) = ' '.
 
 
 
"SELECT single XFELD FROM CSDATA INTO @DATA(ld_mehrs).
DATA(ld_mehrs) = ' '.
 
"SELECT single XFELD FROM CSDATA INTO @DATA(ld_mkmat).
DATA(ld_mkmat) = ' '.
 
"SELECT single XFELD FROM CSDATA INTO @DATA(ld_mmory).
DATA(ld_mmory) = ' '.
 
"SELECT single POSTP FROM STPO INTO @DATA(ld_postp).
DATA(ld_postp) = ' '.
 
"SELECT single RVREL FROM STPO INTO @DATA(ld_rvrel).
DATA(ld_rvrel) = ' '.
 
"SELECT single SANFE FROM STPO INTO @DATA(ld_sanfr).
DATA(ld_sanfr) = ' '.
 
"SELECT single SANIN FROM STPO INTO @DATA(ld_sanin).
DATA(ld_sanin) = ' '.
 
"SELECT single SANKA FROM STPO INTO @DATA(ld_sanka).
DATA(ld_sanka) = ' '.
 
"SELECT single SANKO FROM STPO INTO @DATA(ld_sanko).
DATA(ld_sanko) = ' '.
 
"SELECT single SANVS FROM STPO INTO @DATA(ld_sanvs).
DATA(ld_sanvs) = ' '.
 
"SELECT single XFELD FROM CSDATA INTO @DATA(ld_auskz).
DATA(ld_auskz) = ' '.
 
 
"SELECT single SCHGT FROM STPO INTO @DATA(ld_schgt).
DATA(ld_schgt) = ' '.
 
"SELECT single STKKZ FROM STPO INTO @DATA(ld_stkkz).
DATA(ld_stkkz) = ' '.
 
"SELECT single STLAL FROM STKO INTO @DATA(ld_stlal).
DATA(ld_stlal) = ' '.
 
"SELECT single STLAN FROM STZU INTO @DATA(ld_stlan).
DATA(ld_stlan) = ' '.
 
"SELECT single TPLNR FROM IFLO INTO @DATA(ld_tpnrv).
 
"SELECT single WERKS FROM MARC INTO @DATA(ld_werks).
 
"SELECT single MATNR FROM MARA INTO @DATA(ld_bagrp).
DATA(ld_bagrp) = ' '.
 
 
"SELECT single BEIKZ FROM STPO INTO @DATA(ld_beikz).
DATA(ld_beikz) = ' '.
 
 
"SELECT single XFELD FROM CSDATA INTO @DATA(ld_bessl).
DATA(ld_bessl) = ' '.
 
 
"SELECT single XFELD FROM CSDATA INTO @DATA(ld_bgixo).
DATA(ld_bgixo) = ' '.
 
 
"SELECT single XFELD FROM CSDATA INTO @DATA(ld_brems).
DATA(ld_brems) = ' '.
 
"SELECT single CAPID FROM TC04 INTO @DATA(ld_capid).
DATA(ld_capid) = 'STD1'.
 


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!