Process TRTPCE: TRTPCE
INIACCCOD: After initialization of the accounting code
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, who need to add an modify certain accounting code type within the area of the WIP costing localization.
Context and operating method
Transaction
There is one transaction in progress.
Log file
A log file is normally open (can depend on the context).
Different call cases
The entry point "INIACCCOD" is located in the loop carried out on the setup of the accounting codes defined in 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 erase 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 that is used in the automatic journals.
Available variables and masks
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 on the condition of respecting the general validation rules for a document, if new fields are added to the accounting document tables these must be added in these screens.
The entry point "INIACCCOD" is called in the loop for the accounting codes set up on 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 grid for the automatic journal line that is currently being generated.
The local variable "CLECPT" contains the value of the key for the table where the search is being carried out for the accounting code.
The local variable "CODCPT" is that which will contain the accounting code to be used in the generation of the posting line.
Thus it is used to modify the initialization carried out or to initialize the accounting code for a new accounting code type defined and not managed by the standard, it is necessary to write in the specific process :
Case [F:GAD]TYPACCCOD(K)
when 20
Call LECTURE("ONA",CLECPT,"") from CONTOBJ
If fstat : CODCPT = "" : Else : CODCPT = [F:ONA]ACCCOD : Endif
when ...
Endcase
Open tables
All the tables related to the creation of an accounting document 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 according to the call context.