CONSTRUCTOR SAP Method Constructor
Below is documentation, parameters and attributes of ABAP Method CONSTRUCTOR within SAP class /SCTM/CL_LEG_STOP. There is also a number of example ABAP code snipts to help you use the functionality of this method.
This method is a Class Constructor so it is called automatically when the class is accessed for the first time.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_LEG_STOP into the relevant SAP transactions such as SE24 or SE80, and then selecting the method you are interested in.
Method Type - Instance
This is an Instance Method so needs to be instantiated first before you can access any of the methods. I.e. you need to create a local variable of TYPE ref to the class.The following technical details of method CONSTRUCTOR can also be found below:
- Importing parameters
- Exporting parameters
- Changing parameters
- Returning parameters
- Exceptions
- Coding Examples
Parameters of Method CONSTRUCTOR
.| Name | Type | Data Type | Description | Default Value |
| IO_LEG | Importing | TYPE REF TO /SCTM/CL_LEG | Leg Zone | |
| IO_SPOT | Importing | TYPE REF TO /SCTM/CL_SPOT | (Geographical) Place | |
| IS_VOL_RESTRICT | Importing | TYPE /SCMB/S_VOLUME_RESTRICTIONS | Volume Restrictions for Individual and Complete Perspective | |
| IS_WAIT_ARRV | Importing | TYPE /SCMB/S_WAIT_ARRV_GOODS | Time Interval for Goods Wait Times of Incoming Goods | |
| IS_WAIT_DEPT | Importing | TYPE /SCMB/S_WAIT_DEPT_GOODS | Time Interval for Goods Wait Times of Outbound Goods | |
| IS_WGT_RESTRICT | Importing | TYPE /SCMB/S_WEIGHT_RESTRICTIONS | Weight Restrictions for Individual and Complete Perspective | |
| IV_GTS_EXPORT | Importing | TYPE /SCMB/DE_GTS_EXPORT_CODE | Export Relevancy | |
| IV_GTS_MOT_OUT | Importing | TYPE /SCMB/DE_GTS_MOT_OUT | Mode of Transport for Foreign Trade | |
| IV_LENGTH_STAY | Importing | TYPE /SCMB/DE_LENGTH_STAY | Length of Stay at a Location | |
| IV_SEQ_NUM | Importing | TYPE /SCMB/DE_SEQ_NUM | Sequence Number | |
| IV_TRANSP_TIME | Importing | TYPE /SCMB/DE_TRANSPORT_TIME | Transportation Duration | |
| IV_VISIT_RULE | Importing | TYPE /SCMB/DE_VISIT_RULE | Mandatory/Optional |
Exceptions of Method CONSTRUCTOR
/SCTM/CX_TM_RG_CODE - Internal Programming Error in Routing GuideExample ABAP coding
As the method is a Class Constructor the below code doesnt really make sense as it cant be executed as a stand alone method but this is how it would look if it was a normal static method.DATA: lo_class TYPE REF TO /SCTM/CL_LEG_STOP.
DATA: lv_IO_LEG TYPE /SCTM/CL_LEG,
lv_IO_SPOT TYPE /SCTM/CL_SPOT,
lv_IS_VOL_RESTRICT TYPE /SCMB/S_VOLUME_RESTRICTIONS,
lv_IS_WAIT_ARRV TYPE /SCMB/S_WAIT_ARRV_GOODS,
lv_IS_WAIT_DEPT TYPE /SCMB/S_WAIT_DEPT_GOODS,
lv_IS_WGT_RESTRICT TYPE /SCMB/S_WEIGHT_RESTRICTIONS,
lv_IV_GTS_EXPORT TYPE /SCMB/DE_GTS_EXPORT_CODE,
lv_IV_GTS_MOT_OUT TYPE /SCMB/DE_GTS_MOT_OUT,
lv_IV_LENGTH_STAY TYPE /SCMB/DE_LENGTH_STAY,
lv_IV_SEQ_NUM TYPE /SCMB/DE_SEQ_NUM,
lv_IV_TRANSP_TIME TYPE /SCMB/DE_TRANSPORT_TIME,
lv_IV_VISIT_RULE TYPE /SCMB/DE_VISIT_RULE,
lv_other TYPE c.
CALL METHOD lo_class=>CONSTRUCTOR(
EXPORTING
IO_LEG = lv_IO_LEG
IO_SPOT = lv_IO_SPOT
IS_VOL_RESTRICT = lv_IS_VOL_RESTRICT
IS_WAIT_ARRV = lv_IS_WAIT_ARRV
IS_WAIT_DEPT = lv_IS_WAIT_DEPT
IS_WGT_RESTRICT = lv_IS_WGT_RESTRICT
IV_GTS_EXPORT = lv_IV_GTS_EXPORT
IV_GTS_MOT_OUT = lv_IV_GTS_MOT_OUT
IV_LENGTH_STAY = lv_IV_LENGTH_STAY
IV_SEQ_NUM = lv_IV_SEQ_NUM
IV_TRANSP_TIME = lv_IV_TRANSP_TIME
IV_VISIT_RULE = lv_IV_VISIT_RULE ).
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