PORLEGLIB1 script: X3 connection properties

SET_FARMER_DOC entry point

SET_FARMER_DOC: Set farmers transport document.

This entry point allows you to define a transport document that has the farmer's transport document when the document is about to be communicated to the fiscal authorities via a web service.

Context and operating method

Transaction

There is no transaction in progress.

Log file

There is an open log file.

Different call cases

This entry point is called after gathering all relevant data from the document and before it is communicated via the web service.

Available variables

If the document is to be set as a farmer’s transport document, the FARMERDOC variable's value should be set to 1. In this case, the following variable values should also be provided (mandatory):

Open tables

Depending on the document type (DOCTYP variable), the following tables are open and with significant content:

TRDCOMTRACE: Prevents initialization of a new trace file during communication with Portuguese authorities.

Context and operating method

Transaction

A transaction is in progress.

Log file

There is a log file open.

Code context

This entry point is located in the PORLEGLIB1 process. It is used to prevent the initialization of a new trace file when a transport document is being communicated to the Portuguese authorities.

It is only activated if the communication is triggered via web services ([V]GWEBSERV ≠ 0).

The [L]PRIVTRACE local variable is available for use. It is initialized to 0.

To prevent the trace file from being opened, set PRIVTRACE to any value other than 0.

If PRIVTRACE = 0 and no other trace is open, a new trace file will be created.

This entry point is placed after variable declarations and table openings, but before any values are assigned or records are read.

Available variables and masks

Variable Description
PRIVTRACE Local variable (ShortInt). Set to a value other than 0 to prevent trace file creation.

Open tables

All necessary tables for the process are already open at the time this entry point is called.