AddChangeDeleteShipmentPieces

F4943 Add Change Delete Shipment Pieces

Minor Business Rule

Object Name: N4900840

Parent DLL: CTRAN

Location: Client/Server

Language: NER

F4943 Add Change Delete Shipment Pieces

Source NameN4900840
Data Structure 
D4900840A
Function Name
F4943Add Change Delete Shipment PiecesSystem Code49
Function Category
Function Use

Revisions Log 
DateProgrammerSAR NumberDescription
07/08/982233692Created.

11/03/982456749



Purpose

The purpose of this function is to give a common interface where programs can add, change, and delete Shipment Pieces rows (F4943).  This 
interface will perform the edits on the shipment piece information, then optionally perform the necessary updates to all of the shipment tables.

Setup Notes and Prerequisites
N/A
Special Logic
The units of measures that are passed to this function will be converted to the default units of measure, if necessary, from the Transportation 
Constants.

Requirements 
N/A
Technical Specifications
Parameters:
Data Item Data Structure DescriptionI/ORequiredNotes
EV01Add Change Delete FlagIYes1 = Add 2 = Change 3 = Delete
EV01Edit ModeIYes'1' = Edit Mode '0' or ' ' = Update Mode.  Edits are performed.  If there are no errors, add change or delete the 

piece based on the Add Change Delete Flag.

SHPNShipment NumberIYesThis is the Shipment Number.

RSSNRouting Step NumberIYesThis is the Shipment Routing Step Number.

OSEQSequence NumberIDependsThis is the Sequence Number.  It is one of the key columns used when fetching a row from 

the Shipment Pieces table.

PLTSSCC Number Tare Level IDependsThis is the SSCC Number Tare Level.  It is one of the key columns used when fetching a 

row from the Shipment Pieces table.

TRPKTare Pack IndicatorINo

CNIDContainer IDIDependsThis is the Container ID.  It is one of the key columns used when fetching a row from the Shipment 

Pieces table.

EQTYContainer CodeIDepends

GWEIGross WeightIDependsThis is the Gross Weight of the piece It will be updated to the Shipment Pieces table.  If in Add 

Mode, it will be added to shipment totals. In Change Mode, it will be subtracted from the previous piece weight and the difference will be added to the 

shipment totals. Depending on the situation, either Gross Weight or Net Weight Change should be passed to this function.

WTEMWeight EmptyIDependsThis is the weight of an empty piece.


WGTSNet Weight ChangeIDependsThis is the Net Weight Change.  It will be added to shipment totals. If in Add Mode, it will 

be added to the Weight Empty.  This total will be written to the Shipment Pieces table.  If in Change Mode, it will be added to the previous weight.  This 

total will be updated to the shipment pieces table.  Depending on the situation, either Gross Weight or Net Weight Change should be passed to this 

function.

WTUMWeight UoMIYesThis is the Weight UoM

PIDProgram IdIYesThis is the Program Id.

HGTSShipment HeightINoThis is the piece height.

WTHSShipment WidthINoThis is the piece width.

LGTSShipment LengthINoThis is the piece length.

GTHSShipment GirthINoThis is the piece girth.

LUOMLinear UoMINo This is the linear UoM for the piece dimensions. 

VCUDVolume Cubic DimensionsINoThis is cubic container space.  It is added the shipment total.  When a shipment is rated by volume 

and this column is not equal to zeros in the shipment routing step table, it is used to rate the shipment.

CVUMCubic Volume UoMINoThis is the cubic volume.

REFQRef Number QualifierINoThis code identifies the type of reference number in the following field.  For example, this could 

specify that the reference number is an air waybill number.

REFNReference NumberINoThis is the reference number for this piece.  This could be a box tracking number or air waybill 

number, for instance.

SUPPSSuppress Error MessageINo'1' = Suppress Error Message

DTAIError Message IDONo

JOBNTransportation Job NumberINoThis should be passed only when the shipment is still in cache.


Related Tables 
Table Table Description
None.



Related Business Functions

Source NameFunction Name
None.


Processing 


The following table identifies table and data structure prefixes that are used for specific columns referred to later in this document


PrefixTable/Data StructureDescription

BFD4900840AF4943 Add Change Delete Shipment Pieces business function data structure.
SPF4943Shipment Pieces Table

IDF46091Container and Carton Codes data structure.

STD4900050F4215 Update Shipment Totals business functions data structure.



Initialize Variables

Set VA Type Of Update to 'A'.

Set VA Number of Pieces to '0'

Call the Get Audit Information (B9800100) to get date and time stamp information.

VA User Id<AD User Name

VA Date Updated<AD Date

VA Time Of Day<AP Time

VA Workstation ID<AD Workstation ID

Set VA Program ID to BF Program ID.


Fetch a row from the Shipment Routing Step table (F4941) based on BF Shipment Number to default weight and volume unit of measures and piece 

counts.


If BF Add Change Delete Flag equal to 2 or 3,

If BF SSCC Number Tare Level not equal to blanks,
Fetch Shipment Pieces row(F4943) by,
BF Shipment Number>SP Shipment Number,

0>SP Route Number,

BF SSCC Number Tare Level>SP SSCC Number Tare Level,


Else
If BF Container ID is not equal to blanks,
Fetch Shipment Pieces row(F4943) by,
BF Shipment Number>SP Shipment Number,

0> SP Route Number,

BF Container ID>SP SSCC Number Tare Level,


Else
If BF Sequence Number is not equal to zeros,
Fetch Shipment Pieces row(F4943) by,
BF Shipment Number>SP Shipment Number,

0>SP Route Number,

BF Sequence Number>SP SSCC Number Tare Level,

Else
Set BF Error Message ID to Data Dictionary Error Id that informs the user that Shipment Piece row now found.
End If
End If
End If
VA Container Code <SP Container Code
VA Shipment Length<SP Shipment Length

VA Shipment Width<SP Shipment Width

VA Shipment Height<SP Shipment Height

VA Shipment Girth<SP Shipment Girth

VA Linear UoM<SP Linear UoM

VA Gross Weight<SP Gross Weight

VA Weight Empty<SP Weight Empty

VA Weight UoM<SP Weight UoM

VA Volume Cubic Dimensions <SP Volume Cubic Dimensions

VA Volume UoM<SP Volume UoM

VA Container ID<SP Container Code

VA SSCC Number Tare Level<SP SSCC Number Tare Level

VA Reference Number Qualifier<SP Reference Number Qualifier

VA Reference Number<SP Reference Number

End If



If BF Error Message ID is equal to blanks,

If BF Add Change Delete Flag is equal to 3,
Set VA Gross Weight = VA Gross Weight * -1.
Set VA Volume Cubic Dimensions = VA Volume Cubic Dimensions * -1.

Set VA Number of Pieces to 1.


Else

If BF Edit Mode not equal to '1'
If BF Cubic Volume UoM is not equal to blank,
Check the special handling flag from the UDC table for BF UoM Cubic Volume.  
If it is not equal to 'V' and not equal to 'v',

Set BF Error Message ID to '4408' informing the user that the type of unit of measure is not a volume.
End If
End If

If BF Weight UoM is not equal to blank, 

Check the special handling flag from the UDC table. 
If it is not equal to 'W' and not equal to 'w',

Set BF Error Message ID to '4409' informing the user that the type of unit of measure is not a weight.
End If
End If

If BF Linear UoM is not equal to blank,

Call the Get UDC business function to the BF Linear UoM.
End If
End If

If BF Error Message ID is equal to blanks,
If BF Add Change Delete Flag is equal to 1,
If BF Container Code is not equal to blanks,

If BF Business Unit is equal to blanks,
Fetch a row from the Shipment Header table (F4215).
BF Shipment Number >Shipment Number

VA Business Unit<Business Unit

Else
Set VA Business Unit to BF Business Unit.
End If

Fetch a row from the Container and Carton Codes table (F46091)

VA Business Unit>ID Business Unit

BF Container Code>ID Container Code

BF Shipment Width<ID Gross Width

BF Shipment Length<ID Gross Depth

BF Shipment Height<ID Gross Height

BF Linear UoM<ID Dimensions UoM

BF Volume Cubic Dimensions<ID Cubic Dimensions

BF UoM Cubic Volume <ID Unit of Measure Display

BF Weight Empty<ID Weight Empty

BF UoM Weight<ID UoM Weight


If BF Net Weight Change is greater than 0,

Set VA Gross Weight to VA Gross Weight + BF Net Weight Change.
If BF Add Change Delete Flag = 1,

Set VA Gross Weight to VA Gross Weight + BF Weight Empty.
End If
Else
Set VA Gross Weight to BF Gross Weight.
Set VA Gross Weight Difference to BF Gross Weight -VA Gross Weight.

End If
End If
Else
Fetch a row form the Shipment Pieces table.
BF Shipment Number>Shipment Number


If a row is not found,

Set VA Type of Update to 'R'.
End If
End If
End If

Set VA Container Code to BF Container Code.

Set VA Shipment Length to BF Shipment Length.

Set VA Shipment Width to BF Shipment Width.

Set VA Shipment Height to BF Shipment Height.

Set VA Shipment Girth to BF Shipment Girth.

Set VA Linear UoM to BF Linear UoM.

Set VA Container ID to BF Container Code.

Set VA SSCC Number Tare Level to BF SSCC Number Tare Level.

Set VA Reference Number Qualifier to BF Reference Number Qualifier.

Set VA Reference Number to BF Reference Number.


VA Container Code 

Data Structure

D4900840A - F4943 Add Update Delete Shipment Piece

Parameter NameData ItemData TypeReq/OptI/O/Both
cAddChangeDeleteFlagEV01charOPTNONE

An option that specifies the type of processing for an event.

cEditModeEV01charOPTNONE

An option that specifies the type of processing for an event.

mnShipmentNumberSHPNMATH_NUMERICOPTNONE

A "next number" that uniquely identifies a shipment.

mnRoutingStepNumberRSSNMATH_NUMERICOPTNONE

This is the number assigned to a shipment routing step. The movement of a shipment from the origin to the final destination (ship to 
address) can be made up of one or more routing steps, each with an intermediate destination.

mnSequenceNumberOSEQMATH_NUMERICOPTNONE

For OneWorld, the sequence by which users can set up the order in which their valid environments are displayed. For World, a sequence or 
sort number that the system uses to process records in a user defined order.

szSSCCNumberTareLevelPLTcharOPTNONE

The tare level Serialized Shipping Container Code. Must conform to the UCC structure for SSCC numbers.

cTarePackIndicatorTRPKcharOPTNONE

This internal field indicates whether a shipment piece contains a tare level or pack level SSCC.

szContainerIDCNIDcharOPTNONE

A code on the container or that you assign to the container in which the items on this purchase order or order line were shipped to you. You 
can assign container information to an order during receipts entry.

szContainerCodeEQTYcharOPTNONE

A code (46/EQ) that identifies a storage container or a shipping carton. A storage container can be an open container where items are 
stored on the container (for example, a pallet), or a closed container where items are stored in the container (for example, a box). You use the 
Container and Carton Codes program (P46091) to define storage containers.

mnGrossWeightGWEIMATH_NUMERICOPTNONE

The gross weight of one unit of the item in this unit of measure, or the weight of an empty storage container or shipping carton. These values 
default to the location detail (F4602) and the system uses the values in maximum weight calculations for specified locations during putaway.

mnWeightEmptyWTEMMATH_NUMERICOPTNONE

The certified weight of this vehicle, including fuel, but excluding cargo.

mnNetWeightChangeWGTSMATH_NUMERICOPTNONE

The shipment weight is qualified by a Weight Qualifier (WGQ) that identifies the type of weight.

szWeightUnitOfMeasureWTUMcharOPTNONE

The unit of measure that indicates the weight of an individual item. Typical weight units of measure are:    GM Gram    OZ Ounce    LB Pound    
KG Kilogram    CW Hundredweight    TN Ton 

szProgramIdPIDcharOPTNONE

The number that identifies the batch or interactive program (batch or interactive object). For example, the number of the Sales Order Entry 
interactive program is P4210, and the number of the Print Invoices batch process report is R42565. The program ID is a variable length value. 
It is assigned according to a structured syntax in the form TSSXXX, where: T The first character of the number is alphabetic and identifies the 
type, such as P for Program, R for Report, and so on. For example, the value P in the number P4210 indicates that the object is a 
program. SS The second and third characters of the number are numeric and identify the system code. For example, the value 42 in the number P4210 
indicates that this program belongs to system 42, which is the Sales Order Processing system. XXX The remaining characters of the numer are 
numeric and identify a unique program or report. For example, the value 10 in the number P4210 indicates that this is the Sales Order Entry 
program.

mnShipmentHeightHGTSMATH_NUMERICOPTNONE

The height of a shipment or shipment piece.

mnShipmentWidthWTHSMATH_NUMERICOPTNONE

The width of a shipment or shipment piece.

mnShipmentLengthLGTSMATH_NUMERICOPTNONE

The length of a shipment or shipment piece.

mnShipmentGirthGTHSMATH_NUMERICOPTNONE

The girth of a shipment or shipment piece.

szUnitofMeasureLinearLUOMcharOPTNONE

The width, height, or length unit of measure for a vehicle.

mnVolumeCubicDimensionsVCUDMATH_NUMERICOPTNONE

The numeric value of the cubic volume of this item - computed by the Item Master Revisions program.

szUnitofMeasureCubicVolumeCVUMcharOPTNONE

A user defined code (00/UM) that identifies the unit of measure that the system uses to indicate volume for this item. You can specify cubes, 
liters, gallons, and so on, as volume standards. The system uses this unit of measure for the item or overrides it for an individual item or 
container.

szRefNumberQualifierREFQcharOPTNONE

A code qualifying the Reference Number. Must conform to one of the accepted values for EDI X12 data element 128.

szReferenceNumberREFNcharOPTNONE

A Reference number or identification number as defined for a particular EDI transaction set or as specified by the Reference Number 
Qualifier.

cSuppressErrorMessageSUPPScharOPTNONE

A flag indicating whether or not runtime error messaging will occur when an error message is issued from a business function.        0 = allow 
runtime error message handling.        1 = suppress runtime error message handling.

szErrorMessageIDDTAIcharOPTNONE

A code that identifies and defines a unit of information. It is an alphanumeric code up to 8 characters long that does not allow blanks or 
special characters such as %, &, or +. You create new data items using system codes 55-59. You cannot change the alias.

mnTransportationJobNumberJOBSMATH_NUMERICOPTNONE

The job number (work station ID) which executed the particular job.

Related Functions

None

Related Tables

None