SAP Function Modules

CS_SO_DEL_ASSEMBLY SAP Function module







CS_SO_DEL_ASSEMBLY is a standard SAP function module available within R/3 SAP systems depending on your version and release level. Below is the pattern details for this FM showing its interface including any import and export parameters, exceptions etc as well as any documentation contributions (Comments) specific to the object.

See here to view full function module documentation and code listing, simply by entering the name CS_SO_DEL_ASSEMBLY into the relevant SAP transaction such as SE37 or SE80.

Associated Function Group: CSSO
Released Date: Not Released
Processing type: Normal fucntion module
Normal function module settings


Pattern for FM CS_SO_DEL_ASSEMBLY - CS SO DEL ASSEMBLY





CALL FUNCTION 'CS_SO_DEL_ASSEMBLY' "
* EXPORTING
*   i_vbeln =                   " rc29l-vbeln
*   i_vbpos =                   " rc29l-vbpos
*   i_pspnr =                   " rc29l-pspnr
*   i_multi_level =             " csdata-xfeld
*   i_datum = SY-DATUM          " rc29l-datuv
*   i_stlal = '01'              " rc29l-stlal
*   i_stlnr =                   " kdst-stlnr
*   i_matnr =                   " rc29l-matnr
*   i_stlan =                   " rc29l-stlan
*   i_werks =                   " rc29l-werks
*   i_capid =                   " rc29l-capid
*   i_cuobj =                   " vbap-cuobj
*   i_matnr_top =               " rc29l-matnr
*   i_stufe =                   " stpox-stufe
*   i_wegxx =                   " stpox-wegxx
*   i_del_stlty =               " stpox-stlty
  EXCEPTIONS
    WRONG_INPUT = 1             "
    PROBLEMS_WITH_BOM_READ = 2  "
    PROBLEMS_WITH_BOM_DELETE = 3  "
    STRUCTURE_HAS_CHANGED = 4   "
    USER_CANCLED = 5            "
    BOM_IS_LOCKED = 6           "
    NO_BOM_FOUND = 7            "
    .  "  CS_SO_DEL_ASSEMBLY

ABAP code example for Function Module CS_SO_DEL_ASSEMBLY





The ABAP code below is a full code listing to execute function module CS_SO_DEL_ASSEMBLY including all data declarations. The code uses 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 original method of declaring data variables up front. 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).



DATA(ld_i_vbeln) = some text here

DATA(ld_i_vbpos) = Check type of data required

DATA(ld_i_pspnr) = Check type of data required

DATA(ld_i_multi_level) = some text here

DATA(ld_i_datum) = 20210129

DATA(ld_i_stlal) = some text here

SELECT single STLNR
FROM KDST
INTO @DATA(ld_i_stlnr).


DATA(ld_i_matnr) = some text here

DATA(ld_i_stlan) = some text here

DATA(ld_i_werks) = some text here

DATA(ld_i_capid) = some text here

SELECT single CUOBJ
FROM VBAP
INTO @DATA(ld_i_cuobj).


DATA(ld_i_matnr_top) = some text here

DATA(ld_i_stufe) = Check type of data required

DATA(ld_i_wegxx) = Check type of data required

DATA(ld_i_del_stlty) = some text here . CALL FUNCTION 'CS_SO_DEL_ASSEMBLY' * EXPORTING * i_vbeln = ld_i_vbeln * i_vbpos = ld_i_vbpos * i_pspnr = ld_i_pspnr * i_multi_level = ld_i_multi_level * i_datum = ld_i_datum * i_stlal = ld_i_stlal * i_stlnr = ld_i_stlnr * i_matnr = ld_i_matnr * i_stlan = ld_i_stlan * i_werks = ld_i_werks * i_capid = ld_i_capid * i_cuobj = ld_i_cuobj * i_matnr_top = ld_i_matnr_top * i_stufe = ld_i_stufe * i_wegxx = ld_i_wegxx * i_del_stlty = ld_i_del_stlty EXCEPTIONS WRONG_INPUT = 1 PROBLEMS_WITH_BOM_READ = 2 PROBLEMS_WITH_BOM_DELETE = 3 STRUCTURE_HAS_CHANGED = 4 USER_CANCLED = 5 BOM_IS_LOCKED = 6 NO_BOM_FOUND = 7 . " CS_SO_DEL_ASSEMBLY
IF SY-SUBRC EQ 0. "All OK ELSEIF SY-SUBRC EQ 1. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 2. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 3. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 4. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 5. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 6. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 7. "Exception "Add code for exception here ENDIF.







ABAP code to compare 7.40 inline data declaration with original syntax

The below ABAP code uses the older none in-line data declarations. This allows you to see the coding differences/benefits of the later inline syntax. It may also be useful if you are using an older version of SAP as some of the newer syntax above, such as the @DATA is not available until 4.70 EHP 8.

DATA:
ld_i_vbeln  TYPE RC29L-VBELN ,
ld_i_vbpos  TYPE RC29L-VBPOS ,
ld_i_pspnr  TYPE RC29L-PSPNR ,
ld_i_multi_level  TYPE CSDATA-XFELD ,
ld_i_datum  TYPE RC29L-DATUV ,
ld_i_stlal  TYPE RC29L-STLAL ,
ld_i_stlnr  TYPE KDST-STLNR ,
ld_i_matnr  TYPE RC29L-MATNR ,
ld_i_stlan  TYPE RC29L-STLAN ,
ld_i_werks  TYPE RC29L-WERKS ,
ld_i_capid  TYPE RC29L-CAPID ,
ld_i_cuobj  TYPE VBAP-CUOBJ ,
ld_i_matnr_top  TYPE RC29L-MATNR ,
ld_i_stufe  TYPE STPOX-STUFE ,
ld_i_wegxx  TYPE STPOX-WEGXX ,
ld_i_del_stlty  TYPE STPOX-STLTY .


ld_i_vbeln = some text here

ld_i_vbpos = Check type of data required

ld_i_pspnr = Check type of data required

ld_i_multi_level = some text here

ld_i_datum = 20210129

ld_i_stlal = some text here

SELECT single STLNR
FROM KDST
INTO ld_i_stlnr.


ld_i_matnr = some text here

ld_i_stlan = some text here

ld_i_werks = some text here

ld_i_capid = some text here

SELECT single CUOBJ
FROM VBAP
INTO ld_i_cuobj.


ld_i_matnr_top = some text here

ld_i_stufe = Check type of data required

ld_i_wegxx = Check type of data required

ld_i_del_stlty = some text here

Contribute (Add Comments)

Please help keep this info upto date and use the comments section below to add useful hints, tips and information specific to this SAP function. This will then be available for you and other users to easily find by simply searching on the object name CS_SO_DEL_ASSEMBLY or its description.