project QadFinancials > class BAPMatching > method AdditionalUpdatesAllExtQCrossCyPosting
Description
This method creates new request for cross company daemon.
Parameters
oiReturnStatus | output | integer | Return status of the method. |
Internal usage
QadFinancials
program code (program6/bapmatching.p)
/* ========================================================================================== */
/* Call method in BQCrossCyPosting to make creation of cross company posting */
/* Return in case there are no such records */
/* ========================================================================================== */
if not can-find (first tExtQCrossCyPostingAPM)
then Return.
/* ======================== */
/* Set default ReturnStatus */
/* ======================== */
assign oiReturnStatus = -98.
/* ============================ */
/* Start&Open or Open the class */
/* ============================ */
if viBQCrossCyPostingAPMID <> 0 and
viBQCrossCyPostingAPMID <> ?
then do :
<I-1 {bFcOpenInstance
&CLASS = "BQCrossCyPosting"}>
end. /* if viBMfgPendingVoucherAPMID <> 0 and */
else do :
<I-2 {bFcStartAndOpenInstance
&ADD-TO-TRANSACTION = "true"
&CLASS = "BQCrossCyPosting"}>
assign vlBQCrossCyPostingStart = true.
end. /* Not if viBCInvoiceAPMID <> 0 and */
/* ===================================================== */
/* Run the method that performs the updates in the class */
/* Run the Validate & AddUpd in the class aas well */
/* ===================================================== */
<M-6 run ApiCreateQCrossCyPosting
(input tExtQCrossCyPostingAPM (tNewQCrossCyPosting),
output viExternalReturnStatus (oiReturnStatus)) in BQCrossCyPosting>
if viExternalReturnStatus <> 0
then assign oiReturnStatus = viExternalReturnStatus.
/* ========================================================================================================= */
/* Normally we would here close BQCrossCyPosting but we will not do it for performance */
/* reasons as this way the Commit of the transaction does not have to re-open the instance to commit it. */
/* And in all other scenario's the instance of the class ill be closed by the de-activiate procedure of the */
/* appserver that is executed after each call to the appserver */
/* ========================================================================================================= */
/* ========================================================== */
/* Check for errors in the previous block */
/* ========================================================== */
if viExternalReturnStatus < 0
then return.
/* ======================== */
/* Set ReturnStatus = OK */
/* ======================== */
if oiReturnStatus = -98
then assign oiReturnStatus = 0.