SAP CS_ALT_SELECT_DOC Function Module for NOTRANSL: Stücklistenkopfdaten (Dokumentstückliste)









CS_ALT_SELECT_DOC is a standard cs alt select doc 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: Stücklistenkopfdaten (Dokumentstückliste) 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 doc FM, simply by entering the name CS_ALT_SELECT_DOC into the relevant SAP transaction such as SE37 or SE38.

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



Function CS_ALT_SELECT_DOC 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_DOC'"NOTRANSL: Stücklistenkopfdaten (Dokumentstückliste)
EXPORTING
* DATUV = 00000000 "Valid On
DOCAR = "Document type
DOCNR = "Document number
DOCTL = "Document part
DOCVR = "Document version

TABLES
DOSTB_WA = "Work area (int. table) for DOSTB
STKOB_WA = "Work area (int. table) for STKOB
STZUB_WA = "Work area (int. table) for STZUB

EXCEPTIONS
BOM_NOT_ACTIVE = 1 BOM_NOT_FOUND = 2 NO_ALT_FOUND = 3 NO_BOM_FOUND = 4
.



IMPORTING Parameters details for CS_ALT_SELECT_DOC

DATUV - Valid On

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

DOCAR - Document type

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

DOCNR - Document number

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

DOCTL - Document part

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

DOCVR - Document version

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

TABLES Parameters details for CS_ALT_SELECT_DOC

DOSTB_WA - Work area (int. table) for DOSTB

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

STKOB_WA - Work area (int. table) for STKOB

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

STZUB_WA - Work area (int. table) for STZUB

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

EXCEPTIONS details

BOM_NOT_ACTIVE - BOM not active (status)

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

BOM_NOT_FOUND - (Specific) BOM not found

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

NO_ALT_FOUND - No (valid) alternative found

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

NO_BOM_FOUND - No BOMs found

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

Copy and paste ABAP code example for CS_ALT_SELECT_DOC 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_datuv  TYPE STKOB-DATUV, "   00000000
lt_dostb_wa  TYPE STANDARD TABLE OF CS01_DOSTB_TAB, "   
lv_bom_not_active  TYPE CS01_DOSTB_TAB, "   
lv_docar  TYPE DOSTB-DOKAR, "   
lt_stkob_wa  TYPE STANDARD TABLE OF CS01_STKOB_TAB, "   
lv_bom_not_found  TYPE CS01_STKOB_TAB, "   
lv_docnr  TYPE DOSTB-DOKNR, "   
lt_stzub_wa  TYPE STANDARD TABLE OF CS01_STZUB_TAB, "   
lv_no_alt_found  TYPE CS01_STZUB_TAB, "   
lv_doctl  TYPE DOSTB-DOKTL, "   
lv_no_bom_found  TYPE DOSTB, "   
lv_docvr  TYPE DOSTB-DOKVR. "   

  CALL FUNCTION 'CS_ALT_SELECT_DOC'  "NOTRANSL: Stücklistenkopfdaten (Dokumentstückliste)
    EXPORTING
         DATUV = lv_datuv
         DOCAR = lv_docar
         DOCNR = lv_docnr
         DOCTL = lv_doctl
         DOCVR = lv_docvr
    TABLES
         DOSTB_WA = lt_dostb_wa
         STKOB_WA = lt_stkob_wa
         STZUB_WA = lt_stzub_wa
    EXCEPTIONS
        BOM_NOT_ACTIVE = 1
        BOM_NOT_FOUND = 2
        NO_ALT_FOUND = 3
        NO_BOM_FOUND = 4
. " CS_ALT_SELECT_DOC




ABAP code using 7.40 inline data declarations to call FM CS_ALT_SELECT_DOC

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 DATUV FROM STKOB INTO @DATA(ld_datuv).
DATA(ld_datuv) = 00000000.
 
 
 
"SELECT single DOKAR FROM DOSTB INTO @DATA(ld_docar).
 
 
 
"SELECT single DOKNR FROM DOSTB INTO @DATA(ld_docnr).
 
 
 
"SELECT single DOKTL FROM DOSTB INTO @DATA(ld_doctl).
 
 
"SELECT single DOKVR FROM DOSTB INTO @DATA(ld_docvr).
 


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!