Allows you to create a Factur-X electronic invoice.
Factur-X is a Franco-German standard for mixed electronic invoicing, based on a PDF file (PDF/A3 standard) representing the original invoice and including a structured data file (XML).
Syntax
CHGVAR |
VAR(&CMD) VALUE('PDFFACTX') |
CHGVAR |
VAR(&PARM1)
VALUE(' ;XMP=" Complete path of the XMP file" ;RelationShip="value"; ;Description="Factur-X description"; ;FacturX="Complete
path of the Factur-X file" |
CHGVAR |
VAR(&PARM2) VALUE(' ') |
CALL |
PGM(LNCCMD) PARM(&HANDLE &CMD &OPT &PARM1 + &PARM2 &RESULT) |
Parameters
Parameters |
|
Parm1 |
PDF: Complete path of the PDF/A3 file,
Xml: Complete path of the XML file.
XMP : Path of the XML file containing the XMP Meta data of the PDF/A.
RelationShip : Data relationship between the attached XML file and the PDF/A. Can take one of the following values (be careful to respect case): Data, Source, Alternative, Supplement or Unspecified.
Description : Factur-X description.
FacturX: Complete path of the Factur-X file to save.
|
Note
If you want to create the PDF/A3 from a Word document, you can use the WSAVEAS command with Format=PDF and PdfA=true.
See the following example
Example
PGM
DCL VAR(&FILE) TYPE(*CHAR) LEN(2000)
DCL VAR(&PATH) TYPE(*CHAR) LEN(2000)
CHGVAR VAR(&PATH) VALUE('C:\temp\4')
CHGVAR VAR(&FILE) VALUE('Doc2.docx')
LNCOPEN SVRADDR('*DEV')
LNCCMD CMD(WORDOPEN)
LNCCMD CMD(WOPENFILE) PARM1('File="' *TCAT &PATH +
*TCAT '\' *TCAT &FILE *TCAT '"')
LNCCMD CMD(WSAVEAS) +
PARM1('File="C:\temp\4\Doc3.pdf";Forma+
t=PDF;PdfA=true')
LNCCMD CMD(WORDCLOSE) PARM1('SAVE=FALSE')
LNCCMD
CMD(PDFFACTX) +
PARM1('PDF="C:\temp\5\Doc+
3.pdf";Xml="C:\temp\5\fa+
ctur-x.xml";FacturX="C:\temp+
\5\res29.PDF";DESCRIPTION="AURA +
FACTUR-X";RELATIONSHIP="Data";XMP="C:\temp+
\5\metadata_2023-22027.xml+
"')
LNCCLOSE
ENDPGM