Define 2 variables in your report: PurchaseHeader and PurchaseLine.
Assign the field values to PurchaseHeader (eg. for the "Vendor No.") and insert the record with PurchaseHeader.INSERT(TRUE); A new Purchase Order no. will be assigned. With that info, you can use the PurchaseLine variable to assign the field values for your 1st purchase line. Use PurchaseLine.INSERT(TRUE) to create this 1st purchase line. Repeat this for your 2nd line, etc.
This is the basic idea. Don't expect us to write the complete code for you. If you don't have a specific question, you don't get a specific answer.
No support using PM or e-mail - Please use this forum. BC TechDays 2024: 13 & 14 June 2024, Antwerp (Belgium)
Comments
Assign the field values to PurchaseHeader (eg. for the "Vendor No.") and insert the record with PurchaseHeader.INSERT(TRUE); A new Purchase Order no. will be assigned. With that info, you can use the PurchaseLine variable to assign the field values for your 1st purchase line. Use PurchaseLine.INSERT(TRUE) to create this 1st purchase line. Repeat this for your 2nd line, etc.
This is the basic idea. Don't expect us to write the complete code for you. If you don't have a specific question, you don't get a specific answer.