Functional Description
Purpose
This function is used to close a batch.
Setup Notes and Prerequisites
This function is normally called from ER on the Cancel Button Is Clicked event, however it can be
called anytime from ER or another function. This function should be called when you want to close a
batch. This function will send a PPM message if Batch Control is allowed and the Batch is Out Of Balance.
Don't forget that System Constants are determined by Batch Type, if you are using a Batch Type that
the function cannot determine System Constants for, the G/L System Constants will be defaulted.
Special Note: Please disregard the Override Mode parameter, it is not used in this function.
Special Logic
If the Batch Documents total is "0" (the batch is empty) when the batch is closed, the batch will
automatically be deleted. If you need to force an empty batch, pass a "1" in the Suppress Delete flag
parameter.
Batch Control can be overridden by passing a "1" in the Suppress Batch Control parameter. You should
only use this if you are positive you never want to see Batch Control (i.e. Calling this BSFN from a
UBE).
A PPM message will be sent if Batch Control is allowed and the Batch is Out Of Balance.
If you wish to force the Batch Status or reset the Batch Status when the batch is closed, pass the
desired Batch Status in the Previous Batch Status and set the Batch Status Flag parameter to "1". If
you want to set the Batch to "Error" then pass a "2" in the Batch Status Flag parameter, the Batch will
be set to "E". If anything else is passed in the Batch Status Flag parameter, the System Constants
will determine the Batch Status.
and Entered, the the function will set the corresponding flag to a "Y", else it will set it an "N".
set the corresponding batch flag to a "Y" else, it will set to an "N".
Technical Specification
Main BSFN:
Open F0011 table
Fetch Batch from F0011 table
Retrieve Batch Control/Management Approval Constants
If Batch Control is "ON" and Suppress Batch Control is not "1"
End BSFN
Close F0011 table
'b7'b7'b7
Retrieve M & D Constants:
Open F41001 table
Fetch M & D Constant based on Batch Type
Close F41001 table
D0000008 - Batch - Revise On Exit
^
Parameter Name | Data Item | Data Type | Req/Opt | I/O/Both |
---|---|---|---|---|
mnBatchNumber | ICU | MATH_NUMERIC | NONE | NONE |
Special Input Expected
| ||||
szBatchType | ICUT | char | NONE | NONE |
| ||||
cPreviousBatchStatus | EV01 | char | NONE | NONE |
Special Input Expected
| ||||
cFLAGBatchStatus | EV02 | char | NONE | NONE |
| ||||
cFLAGTransactionInBalance | EV03 | char | NONE | NONE |
Special Input Expected
| ||||
cFLAGSuppressBatchControl | EV04 | char | NONE | NONE |
Special Input Expected
| ||||
cOverrideMode | EV01 | char | NONE | NONE |
Special Input Expected
| ||||
cSuppressDeleteFlag | EV01 | char | NONE | NONE |
|
B0100011 Error Message Processor to PPAT System | ||||
B0100025 Initialize PPAT Error Message API | ||||
BLM0015 Batch Out Of Balance PPAT Error Message |
F0011 Batch Control Records | ||||
F41001 Inventory Constants |