DEQUEUE_EMDCRS 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 DEQUEUE_EMDCRS into the relevant SAP transaction such as SE37 or SE80.
Associated Function Group:
DWBEN/SAPLFEN0011
Released Date:
Not Released
Processing type: Normal fucntion module
CALL FUNCTION 'DEQUEUE_EMDCRS' "Release lock on object EMDCRS
* EXPORTING
* mode_tmdt_mdcrheader = 'E' " enqmode Lock mode for table TMDT_MDCRHEADER
* mode_tmdt_mdcrfactors = 'E' " enqmode Lock mode for table TMDT_MDCRFACTORS
* mode_tmdt_mdcrheadert = 'E' " enqmode Lock mode for table TMDT_MDCRHEADERT
* mode_tmdt_mdcrvalues = 'E' " enqmode Lock mode for table TMDT_MDCRVALUES
* mandt = SY-MANDT " tmdt_mdcrheader-mandt 01th enqueue argument
* mdcrsetid = " tmdt_mdcrheader-mdcrsetid 02th enqueue argument
* riskfactorno = " tmdt_mdcrfactors-riskfactorno 03th enqueue argument
* spras = " tmdt_mdcrheadert-spras 04th enqueue argument
* validfrom = " tmdt_mdcrvalues-validfrom 05th enqueue argument
* term = " tmdt_mdcrvalues-term 06th enqueue argument
* timeunit = " tmdt_mdcrvalues-timeunit 07th enqueue argument
* timestamp = " tmdt_mdcrvalues-timestamp 08th enqueue argument
* x_mdcrsetid = SPACE " Fill argument 02 with initial value?
* x_riskfactorno = SPACE " Fill argument 03 with initial value?
* x_spras = SPACE " Fill argument 04 with initial value?
* x_validfrom = SPACE " Fill argument 05 with initial value?
* x_term = SPACE " Fill argument 06 with initial value?
* x_timeunit = SPACE " Fill argument 07 with initial value?
* x_timestamp = SPACE " Fill argument 08 with initial value?
* _scope = '3' "
* _synchron = SPACE " Synchonous unlock
* _collect = ' ' " ddenqcoll Initially only collect lock
. " DEQUEUE_EMDCRS
The ABAP code below is a full code listing to execute function module DEQUEUE_EMDCRS 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_mode_tmdt_mdcrheader) = 'Check type of data required'.
DATA(ld_mode_tmdt_mdcrfactors) = 'Check type of data required'.
DATA(ld_mode_tmdt_mdcrheadert) = 'Check type of data required'.
DATA(ld_mode_tmdt_mdcrvalues) = 'Check type of data required'.
SELECT single MANDT
FROM TMDT_MDCRHEADER
INTO @DATA(ld_mandt).
SELECT single MDCRSETID
FROM TMDT_MDCRHEADER
INTO @DATA(ld_mdcrsetid).
SELECT single RISKFACTORNO
FROM TMDT_MDCRFACTORS
INTO @DATA(ld_riskfactorno).
SELECT single SPRAS
FROM TMDT_MDCRHEADERT
INTO @DATA(ld_spras).
SELECT single VALIDFROM
FROM TMDT_MDCRVALUES
INTO @DATA(ld_validfrom).
SELECT single TERM
FROM TMDT_MDCRVALUES
INTO @DATA(ld_term).
SELECT single TIMEUNIT
FROM TMDT_MDCRVALUES
INTO @DATA(ld_timeunit).
SELECT single TIMESTAMP
FROM TMDT_MDCRVALUES
INTO @DATA(ld_timestamp).
DATA(ld_x_mdcrsetid) = 'some text here'.
DATA(ld_x_riskfactorno) = 'some text here'.
DATA(ld_x_spras) = 'some text here'.
DATA(ld_x_validfrom) = 'some text here'.
DATA(ld_x_term) = 'some text here'.
DATA(ld_x_timeunit) = 'some text here'.
DATA(ld_x_timestamp) = 'some text here'.
DATA(ld__scope) = 'some text here'.
DATA(ld__synchron) = 'some text here'.
DATA(ld__collect) = 'Check type of data required'. . CALL FUNCTION 'DEQUEUE_EMDCRS' * EXPORTING * mode_tmdt_mdcrheader = ld_mode_tmdt_mdcrheader * mode_tmdt_mdcrfactors = ld_mode_tmdt_mdcrfactors * mode_tmdt_mdcrheadert = ld_mode_tmdt_mdcrheadert * mode_tmdt_mdcrvalues = ld_mode_tmdt_mdcrvalues * mandt = ld_mandt * mdcrsetid = ld_mdcrsetid * riskfactorno = ld_riskfactorno * spras = ld_spras * validfrom = ld_validfrom * term = ld_term * timeunit = ld_timeunit * timestamp = ld_timestamp * x_mdcrsetid = ld_x_mdcrsetid * x_riskfactorno = ld_x_riskfactorno * x_spras = ld_x_spras * x_validfrom = ld_x_validfrom * x_term = ld_x_term * x_timeunit = ld_x_timeunit * x_timestamp = ld_x_timestamp * _scope = ld__scope * _synchron = ld__synchron * _collect = ld__collect . " DEQUEUE_EMDCRS
IF SY-SUBRC EQ 0. "All OK ENDIF.
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_mode_tmdt_mdcrheader | TYPE ENQMODE , |
| ld_mode_tmdt_mdcrfactors | TYPE ENQMODE , |
| ld_mode_tmdt_mdcrheadert | TYPE ENQMODE , |
| ld_mode_tmdt_mdcrvalues | TYPE ENQMODE , |
| ld_mandt | TYPE TMDT_MDCRHEADER-MANDT , |
| ld_mdcrsetid | TYPE TMDT_MDCRHEADER-MDCRSETID , |
| ld_riskfactorno | TYPE TMDT_MDCRFACTORS-RISKFACTORNO , |
| ld_spras | TYPE TMDT_MDCRHEADERT-SPRAS , |
| ld_validfrom | TYPE TMDT_MDCRVALUES-VALIDFROM , |
| ld_term | TYPE TMDT_MDCRVALUES-TERM , |
| ld_timeunit | TYPE TMDT_MDCRVALUES-TIMEUNIT , |
| ld_timestamp | TYPE TMDT_MDCRVALUES-TIMESTAMP , |
| ld_x_mdcrsetid | TYPE STRING , |
| ld_x_riskfactorno | TYPE STRING , |
| ld_x_spras | TYPE STRING , |
| ld_x_validfrom | TYPE STRING , |
| ld_x_term | TYPE STRING , |
| ld_x_timeunit | TYPE STRING , |
| ld_x_timestamp | TYPE STRING , |
| ld__scope | TYPE STRING , |
| ld__synchron | TYPE STRING , |
| ld__collect | TYPE DDENQCOLL . |
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 DEQUEUE_EMDCRS or its description.