| icCompanyCode1 | input | character | CompanyCode: Mandatory. |
| icCompanyCode2 | input | character | Compamny Code: Mandatory |
| icJournalCode | input | character | JornalCode: Mandatory. The type of this journal should be Periodic-costing |
| iiPostingYear | input | integer | PostingYear: Mandatory. accounting-year format 9999 |
| iiPostingPeriod | input | integer | PostingPeriod: Mandatory. accounting-period format 99 |
| oiReturnStatus | output | integer | Return status of the method. |
/* =============================== */
/* Exception handling - main block */
/* Empty output table */
/* =============================== */
assign oiReturnStatus = -98
viLocalReturnStatus = 0.
/* ======================================================================================================================== */
/* Call the api-method for the first company and then once more for the second company */
/* Note this method does not return tApiPeriodicCostingPostings so we can forget about holding the content of the tem-table */
/* ======================================================================================================================== */
TESTBLOCK : DO :
if icCompanyCode1 <> "":U and
icCompanyCode1 <> ?
then do :
<M-13 run ApiMassDeletePeriodicCostingPostings
(input icCompanyCode1 (icCompanyCode),
input icJournalCode (icJournalCode),
input iiPostingYear (iiPostingYear),
input iiPostingPeriod (iiPostingPeriod),
output tApiPeriodicCostingPostings (tApiPeriodicCostingPostings),
output viFcReturnSuper (oiReturnStatus)) in BPosting>
if viFcReturnSuper <> 0
then assign viLocalReturnStatus = viFcReturnSuper.
if viFcReturnSuper < 0
then Leave TESTBLOCK.
end. /* if icCompanyCode1 <> "":U and */
if icCompanyCode2 <> "":U and
icCompanyCode2 <> ?
then do :
<M-31 run ApiMassDeletePeriodicCostingPostings
(input icCompanyCode2 (icCompanyCode),
input icJournalCode (icJournalCode),
input iiPostingYear (iiPostingYear),
input iiPostingPeriod (iiPostingPeriod),
output tApiPeriodicCostingPostings (tApiPeriodicCostingPostings),
output viFcReturnSuper (oiReturnStatus)) in BPosting>
if viFcReturnSuper <> 0
then assign viLocalReturnStatus = viFcReturnSuper.
if viFcReturnSuper < 0
then Leave TESTBLOCK.
end. /* if icCompanyCode2 <> "":U and */
END. /* TESTBLOCK */
/* =============================== */
/* Exception handling - main block */
/* =============================== */
assign oiReturnStatus = viLocalReturnStatus.