Description
Update the posting header record : change year, period, posting date based on rowid
Parameters
iiBJournalEntryId | input | integer | Instance of Journal Entry |
icPostingRowId | input | character | RowId of Posting |
iiPeriodYear | input | integer | Year of Accounting Period |
iiPeriodPeriod | input | integer | Period of Accounting Period |
itPostingDate | input | date | posting date |
icPostingText | input | character | Header Description |
oiReturnStatus | output | integer | Return status of the method. |
Internal usage
unused
program code (program4/bbankentry.p)
if iiBJournalEntryId = ? then assign iiBJournalEntryId = 0.
if iiPeriodYear = ? then assign iiPeriodYear = 0.
if iiPeriodPeriod = ? then assign iiPeriodPeriod = 0.
if icPostingRowId = ? then assign icPostingRowId = "":U.
if icPostingText = ? then assign icPostingText = "":U. /*Defect: 10333-0184*/
if iiBJournalEntryId <> 0 and
icPostingRowId <> "" /*Defect: 10333-0184*/
then do:
<I-1 {bFcOpenInstance
&CLASS = "BJournalEntry"}>
<M-2 run UpdatePostingHeaderInInstance
(input icPostingRowId (icPostingRowId),
input iiPeriodYear (iiPeriodYear),
input iiPeriodPeriod (iiPeriodPeriod),
input itPostingDate (itPostingDate),
input icPostingText (icPostingText),
output viFcReturnSuper (oiReturnStatus)) in BJournalEntry>
<I-3 {bFcCloseInstance
&CLASS = "BJournalEntry"}>
if viFcReturnSuper < 0
then do :
assign vcMessage = trim(substitute(#T-5'An error (&1) has occurred while updating the posting header.':200(345)T-5#, string(viFcReturnSuper)))
oiReturnStatus = viFcReturnSuper.
<M-4 run SetMessage (input vcMessage (icMessage),
input '':U (icArguments),
input '':U (icFieldName),
input '':U (icFieldValue),
input 'E':U (icType),
input 3 (iiSeverity),
input '':U (icRowid),
input 'QADFIN-1834':U (icFcMsgNumber),
input '' (icFcExplanation),
input '' (icFcIdentification),
input '' (icFcContext),
output viFcReturnSuper (oiReturnStatus)) in BBankEntry>
end.
end.