Description
Method: calls an MFG/PRO API that will be used to update the invoice number and invoice date on a legal document record.
Parameters
| icDomainCode | input | character | Domain code for the working domain. |
| icLegalDocNbr | input | character | The legal document number to be updated. |
| icSupplier | input | character | The supplier code used on the supplier invoice. |
| itEffectiveIssueDate | input | date | Effective issue date of the legal document to be updated. |
| itCInvoiceDate | input | date | Supplier invoice date. |
| iiCInvoiceYear | input | integer | Posting year used on the supplier invoice. |
| icCInvoiceJournalCode | input | character | The daybook code used on the supplier invoice. |
| iiCInvoiceVoucher | input | integer | Supplier invoice voucher number. |
| oiReturnStatus | output | integer | Return status of the method. |
Internal usage
unused
program code (program1/pmfglegaldocument.p)
if oiReturnStatus = 0 then
assign oiReturnStatus = -98.
create tLegalDocument.
assign tLegalDocument.tcDomainCode = icDomainCode
tLegalDocument.tcSupplier = icSupplier
tLegalDocument.tcLegalDocNbr = icLegalDocNbr
tLegalDocument.ttEffectiveIssueDate = itEffectiveIssueDate
tLegalDocument.ttCInvoiceDate = itCInvoiceDate
tLegalDocument.tiCInvoiceVoucher = iiCInvoiceVoucher
tLegalDocument.tiCInvoiceYear = iiCinvoiceYear
tLegalDocument.tcCInvoiceJournalCode = icCInvoiceJournalCode.
assign vhIn = ?
vhInOut = dataset tLegalDocument:handle
vhOut = ?.
<M-81 run CallService
(input vcDefaultMfgProgram (icProgramName),
input 'UpdateLegalDocument':U (icMethodName),
input vhIn (izInput),
input-output vhInOut (bzInputOutput),
input-output vhOut (bzOutput),
input ? (icAsyncHandler),
output viFcReturnSuper (oiReturnStatus)) in PMFGLegalDocument>
if viFcReturnSuper <> 0 then
assign oiReturnStatus = viFcReturnSuper.
for first tLegalDocument:
assign oiReturnStatus = tLegalDocument.tiReturnStatus.
end. /* for first...*/
if oiReturnStatus = -98 then
assign oiReturnStatus = 0.
delete object vhInOut.