Description
OIAdjRollBack; undo the transaction in case the Cancel btn is pressed on the UI
Parameters
oiReturnStatus | output | integer | Return status of the method. |
Internal usage
unused
program code (program6/bopenitemadjustment.p)
/* ========================= */
/* Set default return-status */
/* ========================= */
assign oiReturnStatus = -98.
/* ======================================================== */
/* Make sure all external components except BJE are stopped */
/* ======================================================== */
<M-1 run StopExternalInstancesExceptBJE (output viFcReturnSuper (oiReturnStatus)) in BOpenItemAdjustment>
if viFcReturnSuper <> 0
then do :
assign oiReturnStatus = viFcReturnSuper.
if oiReturnStatus < 0 then return.
end. /* if viFcReturnSuper <> 0 */
/* ======================================================== */
/* Make sure external component BJE is stopped */
/* Reset the Main data-items */
/* ======================================================== */
<I-4 {bFcStopInstance &CLASS = "BJournalEntry"
&ERROR-STATEMENT = "assign vifcreturnSuper = -1."}>
if viFcReturnSuper = -1
then do :
assign vcMsgOIAdj = trim(substitute(#T-6'Internal error. The system is unable to stop the journal entry instance (ID = &1).':255(2899)t-6#,string(viBJournalEntryID)))
oiReturnStatus = -3.
<M-5 run SetMessage (input vcMsgOIAdj (icMessage),
input '':U (icArguments),
input '':U (icFieldName),
input '':U (icFieldValue),
input 'S':U (icType),
input 1 (iiSeverity),
input '':U (icRowid),
input 'QADFIN-705':U (icFcMsgNumber),
input '' (icFcExplanation),
input '' (icFcIdentification),
input '' (icFcContext),
output viFcReturnSuper (oiReturnStatus)) in BOpenItemAdjustment>
Return.
end. /* if viFcReturnSuper <> 0 */
assign viBJournalEntryID = 0
viMainPostingID = 0
viMainPostingVoucher = 0
vcMainPostingJournalCode = "":U
vcMainPostingTcRowid = "":U.
/* ========================= */
/* Set return-status = OK */
/* ========================= */
assign oiReturnStatus = 0.