ngbl
Member
Does anyone knows how to check on Fetch Next table IO function? I was working on B7332 program R42565 invoice. This program was working fine until I want to summarized by item which is activated thru the PO tab 'item summary' = '1'. I noticed that my invoice line are summarized by two's. That means my Sales Order line 1 and 2 are summarized and print and then line 3 and 4 summarized and print and so on.
Thru debuging, I noticed that the Fetch next line on table F42565 for record 3, File_IO_status show "Error" eventhough I have already record summarized (for record 1 and 2) written to F42565. The pgm logic is when there is Error it will create new record in F42565.
Is there any way to check whether Fetch Next function is functioning properly?
Thank you for assistance.
Program R42565
Section Phase 1 - Build work file
Event Do Section
logic statement where debuging is done.
// SAR# 3574085 End
If RV Invoice Consolidation (A5) WF is equal to "Y"
If VA evt_EV02_InvoiceBeenUsed is equal to "1"
RV Previous Invoice Num WF = BC Document (Voucher, Invoice, etc.) (F4211)
RV Previous Doc Type WF = BC Document Type (F4211)
RV Previous Doc Key Coy WF = BC Document Company (F4211)
// SAR# 2952620
//
// If running in proof mode, then assign the invoice number so it can be
// consolidated.
If PO cPreventARAssignment is equal to "1"
RV Work File Invoice Number = BC Document (Voucher, Invoice, etc.) (F4211)
End If
Else
F42565.Select
VA rpt_LineWholeNumber = floor([BC Line Number (F4211)])
F42565.Fetch Next
If SV File_IO_Status is equal to CO SUCCESS
RV Previous Invoice Num WF = RV DOC - CONS Document Number(wf)
RV Previous Doc Type WF = RV DCT- CONS Document Type(wf)
RV Previous Doc Key Coy WF = RV KCO - CONS Document Company(wf)
// SAR# 2952620
//
// If running in proof mode, assign the invoice number of F42565 to work file
// invoice number so it can be used. Setting the invoice has been used flag
// allows it to not assign the invoice number.
//
If PO cPreventARAssignment is equal to "1"
RV Work File Invoice Number = RV DOC - CONS Document Number(wf)
VA evt_EV02_InvoiceBeenUsed = "1"
End If
Else
RV New Invoice Flag WF = "1"
RV Change in Pay Terms Flag WF = "0"
End If
End If
End If
End If
Bee Lay
Thru debuging, I noticed that the Fetch next line on table F42565 for record 3, File_IO_status show "Error" eventhough I have already record summarized (for record 1 and 2) written to F42565. The pgm logic is when there is Error it will create new record in F42565.
Is there any way to check whether Fetch Next function is functioning properly?
Thank you for assistance.
Program R42565
Section Phase 1 - Build work file
Event Do Section
logic statement where debuging is done.
// SAR# 3574085 End
If RV Invoice Consolidation (A5) WF is equal to "Y"
If VA evt_EV02_InvoiceBeenUsed is equal to "1"
RV Previous Invoice Num WF = BC Document (Voucher, Invoice, etc.) (F4211)
RV Previous Doc Type WF = BC Document Type (F4211)
RV Previous Doc Key Coy WF = BC Document Company (F4211)
// SAR# 2952620
//
// If running in proof mode, then assign the invoice number so it can be
// consolidated.
If PO cPreventARAssignment is equal to "1"
RV Work File Invoice Number = BC Document (Voucher, Invoice, etc.) (F4211)
End If
Else
F42565.Select
VA rpt_LineWholeNumber = floor([BC Line Number (F4211)])
F42565.Fetch Next
If SV File_IO_Status is equal to CO SUCCESS
RV Previous Invoice Num WF = RV DOC - CONS Document Number(wf)
RV Previous Doc Type WF = RV DCT- CONS Document Type(wf)
RV Previous Doc Key Coy WF = RV KCO - CONS Document Company(wf)
// SAR# 2952620
//
// If running in proof mode, assign the invoice number of F42565 to work file
// invoice number so it can be used. Setting the invoice has been used flag
// allows it to not assign the invoice number.
//
If PO cPreventARAssignment is equal to "1"
RV Work File Invoice Number = RV DOC - CONS Document Number(wf)
VA evt_EV02_InvoiceBeenUsed = "1"
End If
Else
RV New Invoice Flag WF = "1"
RV Change in Pay Terms Flag WF = "0"
End If
End If
End If
End If
Bee Lay