COMPARE_QUANTS SAP Method Compare Quantities with Any Different Units
Below is documentation, parameters and attributes of ABAP Method COMPARE_QUANTS within SAP class /SCTM/CL_MTR. There is also a number of example ABAP code snipts to help you use the functionality of this method.
This method is available within SAP systems depending on your version and release level, you can view further information by entering the class name /SCTM/CL_MTR into the relevant SAP transactions such as SE24 or SE80, and then selecting the method you are interested in.
Method Type - Static
This is a Static Method so you can call it directlyThe following technical details of method COMPARE_QUANTS can also be found below:
- Importing parameters
- Exporting parameters
- Changing parameters
- Returning parameters
- Exceptions
- Coding Examples
Parameters of Method COMPARE_QUANTS
.| Name | Type | Data Type | Description | Default Value |
| IV_QUAN1 | Importing | TYPE ANY | Quantity | |
| IV_QUAN2 | Importing | TYPE ANY | Quantity | |
| IV_UOM1 | Importing | TYPE /SCMB/MDL_UNIT | Unit of Measure | |
| IV_UOM2 | Importing | TYPE /SCMB/MDL_UNIT | Unit of Measure | |
| EV_QUAN1_EQ_QUAN2 | Exporting | TYPE BOOLE_D | Data Element for Domain BOOLE: TRUE (='X') and FALSE (=' ') | |
| EV_QUAN1_GT_QUAN2 | Exporting | TYPE BOOLE_D | Data Element for Domain BOOLE: TRUE (='X') and FALSE (=' ') | |
| EV_QUAN1_LT_QUAN2 | Exporting | TYPE BOOLE_D | Data Element for Domain BOOLE: TRUE (='X') and FALSE (=' ') |
Exceptions of Method COMPARE_QUANTS
/SCTM/CX_TM_RG_CODE - Internal Programming Error in Routing GuideExample ABAP coding
DATA: lv_EV_QUAN1_EQ_QUAN2 TYPE BOOLE_D,
lv_EV_QUAN1_GT_QUAN2 TYPE BOOLE_D,
lv_EV_QUAN1_LT_QUAN2 TYPE BOOLE_D,
lv_IV_QUAN1 TYPE ANY,
lv_IV_QUAN2 TYPE ANY,
lv_IV_UOM1 TYPE /SCMB/MDL_UNIT,
lv_IV_UOM2 TYPE /SCMB/MDL_UNIT,
lv_other TYPE c.
CALL METHOD /SCTM/CL_MTR=>COMPARE_QUANTS(
EXPORTING
IV_QUAN1 = lv_IV_QUAN1
IV_QUAN2 = lv_IV_QUAN2
IV_UOM1 = lv_IV_UOM1
IV_UOM2 = lv_IV_UOM2
IMPORTING
EV_QUAN1_EQ_QUAN2 = lv_EV_QUAN1_EQ_QUAN2
EV_QUAN1_GT_QUAN2 = lv_EV_QUAN1_GT_QUAN2
EV_QUAN1_LT_QUAN2 = lv_EV_QUAN1_LT_QUAN2 ).
Links to Related Class(s)
/SCTM/CL...Full list of available SAP object classes
Search for further information about these or an SAP related objects