This entry point is used to determine the accounting code to be used during the generation of the postings. This entry point has been added to the source for the USA, which had to add and modify some accounting code types as part of its WIP costing localization.
There is one transaction in progress.
A log file is normally open (this depends on the context).
The "INIACCCOD" entry point is located in the loop carried out on the setup of the accounting codes defined for the automatic journal line that is currently being generated. It is called just after the initialization of the accounting code to be used for the generation of a posting. It is then used to overwrite the initialization carried out as standard for the accounting code type. It is also used to initialize the accounting code for an accounting code type that has been added and is used in the automatic journals.
The journal is stored before its validation in the GACCENT0 [HAE0], GACCENT1 [HAE1] and GACCENT2 [HAE2] screens. All the fields in these screens are accessible and can be modified provided that the general rules for document validation are respected. If new fields are added to the accounting document tables, they must also be added in these screens.
The "INIACCCOD" entry point is called in the loop for accounting codes set up for the automatic journal line. K is the index used (For K=0 To [F :GAD]NBRTYP-1). [F:GAD]TYPACCCOD(K) corresponds to the accounting code type defined on the K-1 line in the accounting code setup table for the automatic journal line that is currently being generated.
The "CLECPT" local variable contains the value of the key for the table where the search is being carried out for the accounting code.
The "CODCPT" local variable is that which will contain the accounting code to be used in the generation of the posting line.
In order to modify the initialization carried out as standard or to initialize the accounting code for a new accounting code type defined and not managed as standard, it is necessary to write in the specific processing:
Case [F:GAD]TYPACCCOD(K)
when 20
Call LECTURE("ONA",CLECPT,"") from CONTOBJ
If fstat: CODCPT: Else: CODCPT = [F:ONA]ACCCOD: Endif
when ...
Endcase
All the tables related to the creation of an accounting entry are open.
Table | Significant content | Table title |
GAUTACE [GAU] | Yes | Automatic journals |
GAUTACED [GAD] | Yes | Automatic journal lines |
GACCOUNT [GAC] | No | Accounts |
GACCCODE [CAC] | No | Sales invoice lines |
CACNA [CNA] | No | Natures |
COMPANY [CPY] | No | Companies |
FACILITY[FCY] | No | Sites |
In addition, the triggering table and the linked tables are on line.
Other tables can be on line depending on the call context.