icPostingTcRowid | input | character | PostingTcRowid; tc_rowid of the posting: If a value is passed for this parameter then parameter iiPostingID is of no use |
iiPostingID | input | integer | PostingID; _ID of the posting: If a value is passed for parameter icPostingTcRowid then this parameter is of no use |
tPostingLineMinimalData | output | temp-table | temp-table holding some elementary fields of the postinglines |
oiReturnStatus | output | integer | Return status of the method. |
/* ======================================= */ /* Exception handling and empty result set */ /* ======================================= */ assign oiReturnStatus = -98. empty temp-table tPostingLineMinimalData. /* ========================================================================== */ /* Try to find the posting based on rowid when provided, else based on the ID */ /* If posting is not found then exit without errors */ /* ========================================================================== */ if icPostingTcRowid <> "":U and icPostingTcRowid <> ? then find tPosting where tPosting.tc_Rowid = icPostingTcRowid and tPosting.tc_Status <> "D":U no-lock no-error. else find tPosting where tPosting.Posting_ID = iiPostingID and tPosting.tc_Status <> "D":U no-lock no-error. if not available tPosting then do : assign oiReturnStatus = 0. Return. end. /* if not available tPosting */ /* ============================================================================== */ /* Create records in the output temp-table for every posting-line of the posting */ /* ============================================================================== */ for each tPostingLine where tPostingLine.tc_ParentRowid = tPosting.tc_Rowid and tPostingLine.tc_Status <> "D":U no-lock : create tPostingLineMinimalData. assign tPostingLineMinimalData.tiPostingLineID = tPostingLine.PostingLine_ID tPostingLineMinimalData.tcPostingLineTcRowid = tPostingLine.tc_Rowid tPostingLineMinimalData.tcPostingLineGLCode = tPostingLine.tcGLCode tPostingLineMinimalData.tcPostingLineCurrencyCode = tPostingLine.tcCurrencyCode tPostingLineMinimalData.tdPostingLineDebitTC = tPostingLine.PostingLineDebitTC tPostingLineMinimalData.tdPostingLineCreditTC = tPostingLine.PostingLineCreditTC tPostingLineMinimalData.tdPostingLineDebitLC = tPostingLine.PostingLineDebitLC tPostingLineMinimalData.tdPostingLineCreditLC = tPostingLine.PostingLineCreditLC. end. /* for each tPostingLine where */ /* ======================================= */ /* Exception handling */ /* ======================================= */ assign oiReturnStatus = 0.