EWM_MD_CHECK_MARM_TY2TQ 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 EWM_MD_CHECK_MARM_TY2TQ into the relevant SAP transaction such as SE37 or SE80.
Associated Function Group:
SPL_MGD1
Released Date:
Not Released
Processing type: Normal fucntion module
CALL FUNCTION 'EWM_MD_CHECK_MARM_TY2TQ' "EWM-CW: Check MARM-TY2TQ
EXPORTING
iv_matnr = " matnr Materialnummer
iv_attyp = " attyp Materialtyp
iv_meins = " meins Basismengeneinheit
iv_meinh = " meinh Mengeneinheit für Anzeige
iv_ty2tq = " de_ewmty2tq EWM-CW: Typ der Catch Weight Parallel-Mengeneinheit
CHANGING
ct_meinh = " mat_meinh Mengeneinheiten zum Material
EXCEPTIONS
ALTERNATIVE_2TQ_WITHOUT_BASE = 1 " 2TQ-alternative UoM without 2TQ base UoM
BASE_2TQ_HAS_SAME_DIMENSION = 2 " 2TQ-base UoM has same dimension as BUoM
INVALID_2TQ_BASE_UNIT = 3 " Invalid 2TQ-base UoM
INVALID_2TQ_ALTERNATIVE_UNIT = 4 " Invalid 2TQ-alternative UoM
MULTIPLE_2TQ_BASE_UNITS = 5 " More than one 2TQ-base UoM
DISABLE_NOT_POSSIBLE = 6 " Disablement of CWM not possible
ENABLE_NOT_POSSIBLE = 7 " Enablement of CWM not possible
CHANGE_NOT_POSSIBLE = 8 " Change of CWM UoM not possible (anymore)
OTHER_ERROR_SEE_MESSAGE = 9 " Error in called function modules
. " EWM_MD_CHECK_MARM_TY2TQ
The ABAP code below is a full code listing to execute function module EWM_MD_CHECK_MARM_TY2TQ 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_ct_meinh) = 'Check type of data required'.
DATA(ld_iv_matnr) = 'Check type of data required'.
DATA(ld_iv_attyp) = 'Check type of data required'.
DATA(ld_iv_meins) = 'Check type of data required'.
DATA(ld_iv_meinh) = 'Check type of data required'.
DATA(ld_iv_ty2tq) = 'Check type of data required'. . CALL FUNCTION 'EWM_MD_CHECK_MARM_TY2TQ' EXPORTING iv_matnr = ld_iv_matnr iv_attyp = ld_iv_attyp iv_meins = ld_iv_meins iv_meinh = ld_iv_meinh iv_ty2tq = ld_iv_ty2tq CHANGING ct_meinh = ld_ct_meinh EXCEPTIONS ALTERNATIVE_2TQ_WITHOUT_BASE = 1 BASE_2TQ_HAS_SAME_DIMENSION = 2 INVALID_2TQ_BASE_UNIT = 3 INVALID_2TQ_ALTERNATIVE_UNIT = 4 MULTIPLE_2TQ_BASE_UNITS = 5 DISABLE_NOT_POSSIBLE = 6 ENABLE_NOT_POSSIBLE = 7 CHANGE_NOT_POSSIBLE = 8 OTHER_ERROR_SEE_MESSAGE = 9 . " EWM_MD_CHECK_MARM_TY2TQ
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 ELSEIF SY-SUBRC EQ 8. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 9. "Exception "Add code for exception here 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_ct_meinh | TYPE MAT_MEINH , |
| ld_iv_matnr | TYPE MATNR , |
| ld_iv_attyp | TYPE ATTYP , |
| ld_iv_meins | TYPE MEINS , |
| ld_iv_meinh | TYPE MEINH , |
| ld_iv_ty2tq | TYPE DE_EWMTY2TQ . |
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 EWM_MD_CHECK_MARM_TY2TQ or its description.