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 directly

The 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

.

NameTypeData TypeDescriptionDefault Value
IV_QUAN1ImportingTYPE
ANY
Quantity
IV_QUAN2ImportingTYPE
ANY
Quantity
IV_UOM1ImportingTYPE
/SCMB/MDL_UNIT
Unit of Measure
IV_UOM2ImportingTYPE
/SCMB/MDL_UNIT
Unit of Measure
EV_QUAN1_EQ_QUAN2ExportingTYPE
BOOLE_D
Data Element for Domain BOOLE: TRUE (='X') and FALSE (=' ')
EV_QUAN1_GT_QUAN2ExportingTYPE
BOOLE_D
Data Element for Domain BOOLE: TRUE (='X') and FALSE (=' ')
EV_QUAN1_LT_QUAN2ExportingTYPE
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 Guide

Example 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



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!