SAP Function Modules

DEP_REQ_SCENARIO_SELECT SAP Function module







DEP_REQ_SCENARIO_SELECT 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 DEP_REQ_SCENARIO_SELECT into the relevant SAP transaction such as SE37 or SE80.

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


Pattern for FM DEP_REQ_SCENARIO_SELECT - DEP REQ SCENARIO SELECT





CALL FUNCTION 'DEP_REQ_SCENARIO_SELECT' "
  EXPORTING
    plscn =                     " plsc-plscn
    matnr =                     " mara-matnr
    werks =                     " t001w-werks
*   date_from =                 " mdsm-bdter
*   date_to =                   " mdsm-bdter
*   cm61b =                     " m61x_cm61b
  TABLES
    mdsm_tab =                  " mdsm_berid
    .  "  DEP_REQ_SCENARIO_SELECT

ABAP code example for Function Module DEP_REQ_SCENARIO_SELECT





The ABAP code below is a full code listing to execute function module DEP_REQ_SCENARIO_SELECT 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:
it_mdsm_tab  TYPE STANDARD TABLE OF MDSM_BERID,"TABLES PARAM
wa_mdsm_tab  LIKE LINE OF it_mdsm_tab .


SELECT single PLSCN
FROM PLSC
INTO @DATA(ld_plscn).


SELECT single MATNR
FROM MARA
INTO @DATA(ld_matnr).


SELECT single WERKS
FROM T001W
INTO @DATA(ld_werks).


SELECT single BDTER
FROM MDSM
INTO @DATA(ld_date_from).


SELECT single BDTER
FROM MDSM
INTO @DATA(ld_date_to).

DATA(ld_cm61b) = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_mdsm_tab to it_mdsm_tab. . CALL FUNCTION 'DEP_REQ_SCENARIO_SELECT' EXPORTING plscn = ld_plscn matnr = ld_matnr werks = ld_werks * date_from = ld_date_from * date_to = ld_date_to * cm61b = ld_cm61b TABLES mdsm_tab = it_mdsm_tab . " DEP_REQ_SCENARIO_SELECT
IF SY-SUBRC EQ 0. "All OK 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_plscn  TYPE PLSC-PLSCN ,
it_mdsm_tab  TYPE STANDARD TABLE OF MDSM_BERID ,
wa_mdsm_tab  LIKE LINE OF it_mdsm_tab,
ld_matnr  TYPE MARA-MATNR ,
ld_werks  TYPE T001W-WERKS ,
ld_date_from  TYPE MDSM-BDTER ,
ld_date_to  TYPE MDSM-BDTER ,
ld_cm61b  TYPE M61X_CM61B .


SELECT single PLSCN
FROM PLSC
INTO ld_plscn.


"populate fields of struture and append to itab
append wa_mdsm_tab to it_mdsm_tab.

SELECT single MATNR
FROM MARA
INTO ld_matnr.


SELECT single WERKS
FROM T001W
INTO ld_werks.


SELECT single BDTER
FROM MDSM
INTO ld_date_from.


SELECT single BDTER
FROM MDSM
INTO ld_date_to.

ld_cm61b = 'Check type of data required'.

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 DEP_REQ_SCENARIO_SELECT or its description.