fb01 in t codes
T FB01 to create new SAP document, replicate existing document or reversal
D SAP transaction FB01 to create new SAP document, replicate existing document or reversal
& Help SAP transaction FB01 to create new SAP document, replicate existing document or reversal
Execute tcode FB01 to create a new SAP document

Use post with reference to copy and existing document

Enter document you want to copy, note you can also create reverse postings and other functionality

SAP ABAP code to create a new document as a copy of an existing SAP document
https://www.se80.co.uk/sap-help/sales-distribution/?topic=recreate-sap-doc-fb01
SAP ABAP code to create a new document as a reverse copy of an existing SAP document
https://www.se80.co.uk/sap-help/sales-distribution/?topic=create-reverse-sap-doc-fb01