Work with the LMS.dbo.submitExternalBatchSchedule
- Last UpdatedApr 24, 2025
- 5 minute read
Note: This stored procedure is expected to be executed on the Decision Support System (DSS). Datapump will then handle the replication of the submitted batch schedule into the AVEVA Enterprise SCADA domain.
The LMS.dbo.submitExternalBatchSchedule is a stored procedure that inserts or updates an entry in the batchSchedule table as an external unaccepted ticket. The following table details the parameters that can be passed to the LMS.dbo.submitExternalBatchSchedule procedure.
|
Parameter |
Data Type |
Default Value |
Legal Values |
Description |
|---|---|---|---|---|
|
schedule_ticket_number |
int |
N/A |
N/A |
This parameter is required. If you are adding a new ticket, leave the parameter blank. If you are modifying an existing ticket, enter an existing ticket number. An error will occur if the parameter is set to a ticket number that does not exist. |
|
schedule_code |
char(9) |
Blank |
N/A |
Optional customer field - informational only. |
|
schedule_sequence_number |
int |
0 |
N/A |
Optional customer field - informational only. |
|
company_code |
char(32) |
Blank |
N/A |
This parameter specifies the company code. |
|
available |
char(1) |
Y |
Y or y — Yes N or n — No |
Optional customer field - informational only. |
|
batchXfer_name |
char(32) |
N/A |
N/A |
This parameter is required. It specifies the RealTime database (RTDB) name of the batch transfer to which the ticket belongs |
|
isBatmtr |
T_YES_OR_NO_FLAG |
N |
Y or y — Yes N or n — No Blank Note: This parameter is deprecated. Type N or n. |
This parameter determines whether the batch schedule entry is a batmtr or not. |
|
begin_date |
T_DATETIME_CODE |
N/A |
datetime |
This parameter is required. It determines the date and time that the ticket is scheduled to begin. |
|
billable_movement_indicator |
T_YES_OR_NO_FLAG |
N |
Y or y — Yes N or n — No Blank |
Optional customer field - informational only. |
|
california_gasoline_indicator |
T_YES_OR_NO_FLAG |
N |
Y or y — Yes N or n — No Blank |
Optional customer field - informational only. |
|
consignee |
char(32) |
Blank |
N/A |
Optional customer field - informational only. |
|
contract_item |
char(8) |
Blank |
N/A |
Optional customer field - informational only. |
|
custody_point |
char(32) |
Blank |
N/A |
This parameter specifies the custody point. |
|
customer_integrity_indicator |
char(1) |
Blank |
Y or y — Yes N or n — No |
Optional customer field - informational only. |
|
customer_movement_code |
char(32) |
Blank |
N/A |
Optional customer field - informational only. |
|
end_date |
T_DATETIME_CODE |
N/A |
datetime |
This parameter is required. It specifies the date and time the ticket is scheduled to end. This value can be the same as the begin_date on ticket creation. |
|
issue_date |
T_DATETIME_CODE |
N/A |
datetime |
This parameter is required. It specifies to the date and time the ticket was issued. This value can be the same as the begin_date on ticket creation. |
|
lease_code |
char(32) |
Blank |
N/A |
This parameter specifies the lease code. |
|
location |
char(4) |
Blank |
N/A |
This parameter specifies the location. |
|
message |
varchar(254) |
Blank |
N/A |
This parameter allows you to enter a message with information about the ticket. This parameter is blank by default but can be set to any value. |
|
movement_code |
char(32) |
N/A |
N/A |
This parameter is required. It refers to the batch identifier. The character length is restricted to 31 characters because the last character is reserved for a null terminator. Note: If updated manually to 32 characters by other means, it is truncated to 31 characters when syncing to the RealTime database. |
|
movement_type |
T_MOVEMENT_TYPE |
Blank |
R or r — receipt D or d — delivery RI or ri RT or rt DI or di DT or dt Blank |
Optional customer field - informational only. |
|
origin_tax_indicator |
T_YES_OR_NO_FLAG |
N |
Y or y — Yes N or n — No Blank |
Optional customer field - informational only. |
|
packwash_indicator |
char(1) |
Blank |
Y or y — Yes N or n — No |
Optional customer field - informational only. |
|
percent_allocation_indicator |
T_YES_OR_NO_FLAG |
N |
Y or y — Yes N or n — No Blank |
Optional customer field - informational only. |
|
pipe_line_system_id |
int |
0 |
N/A |
Optional customer field - informational only. |
|
product_type |
char(32) |
N/A |
N/A |
This parameter is required. It specifies the name used in the RTDB to indicate that the product is moving. This value must match an existing product type in the RTDB prodtype table. |
|
pump_through_indicator |
T_YES_OR_NO_FLAG |
N |
Y or y — Yes N or n — No Blank |
Optional customer field - informational only. |
|
actionSequenceName |
char(32) |
Blank |
N/A |
This parameter specifies the Action Sequence name to execute on ticket start. |
|
scheduler |
char(32) |
Blank |
N/A |
This parameter specifies the scheduler. |
|
shipper |
char(32) |
Blank |
N/A |
This parameter specifies the shipping customer. |
|
tank_code |
char(32) |
Blank |
N/A |
This parameter specifies the tank code. |
|
transmix_indicator |
T_YES_OR_NO_FLAG |
N |
Y or y — Yes N or n — No Blank |
This parameter specifies if the ticket is a transmix indicator ticket. |
|
vessel_code |
char(32) |
Blank |
N/A |
Optional customer field - informational only. |
|
waived_measurement_indicator |
T_YES_OR_NO_FLAG |
N |
Y or y — Yes N or n — No Blank |
Optional customer field - informational only. |
|
audit |
char(1) |
N |
Y or y — Yes N or n — No |
This parameter specifies if the ticket was modified by a Controller. |
|
maintenance |
char(1) |
Blank |
Y or y — Yes N or n — No |
This parameter specifies that this is a maintenance ticket. |
|
contam |
char(1) |
N |
Y or y — Yes N or n — No |
This parameter specifies that the batch has be contaminated. |
|
csw |
float |
0.0 |
N/A |
This parameter specifies the sediment and water percent. |
|
opcomment |
char(80) |
Blank |
N/A |
This parameter allows you to enter Controller comments on the ticket record. The character length is restricted to 79 characters because the last character is reserved for a null terminator. Note: If updated manually to 80 characters by other means, it is truncated to 79 characters when syncing to the RealTime database. |
|
scheTemp |
float |
0.0 |
N/A |
This parameter specifies the scheduled temperature for the ticket. |
|
scheDens |
float |
0.0 |
N/A |
This parameter specifies the scheduled density for the ticket. |
|
schePres |
float |
0.0 |
N/A |
This parameter specifies the scheduled pressure for the ticket. |
|
scheVol |
float |
N/A |
N/A |
This parameter is required. It specifies the scheduled volume for the ticket. |
|
scheRate |
float |
0.0 |
N/A |
This parameter specifies the scheduled flow rate for the ticket. |
|
tempUnit |
varchar(15) |
Blank |
N/A |
This parameter specifies the units in which the temperature information is stored. |
|
densUnit |
varchar(15) |
Blank |
N/A |
This parameter specifies the units in which the density information is stored. |
|
presUnit |
varchar(15) |
Blank |
N/A |
This parameter specifies the units in which the pressure information is stored. |
|
volUnit |
varchar(15) |
Blank |
N/A |
This parameter specifies the units in which the volume information is stored. |
|
cutType |
varchar(4) |
MID |
HEAD MID TAIL |
This parameter is required. It defines the cut type that is being used. |
|
position |
int |
null |
N/A |
This parameter specifies the ticket's position in the batchXfer pending ticket queue. The position value defaults to null, which inserts the ticket at the end of the queue. |
|
user |
varchar(32) |
null |
N/A |
This parameter defines the user. The default value is set to null, which will set this to the dnaApp user. |
|
source |
varchar(80) |
N/A |
N/A |
This parameter specifies that the scheduling information is coming from an external source. If the scheduling is supplied by the Controller, the schedule source will be null. |
|
eventTimeout |
int |
60 |
N/A |
This parameter specifies the time in seconds required to elapse before eventing for a batchXfer. |