Páginas filhas
  • FINA100 Import bank transactions via Mile


01. OVERVIEW

How to import bank transactions into the routine FINA100 - Banking transactions using Mile.

02. MILE CONFIGURATION


To import the data in the routine FINA100 - Bank Transactions using MILE, some additional configurations are necessary, as you will see below, since the order of the parameters received by the routine FINA100 is different from the call by the MILE structure, not allowing the import using simply the configuration of channels.

Basically, MILE works as follows: for each channel created, an array will be sent sequentially to the routine in question, followed by the inclusion 3 nOpc.
When calling MsExecAuto from routine FINA100, it will be sent as follows:
If there is 1 channel (1 Master):

Funcao100(vetor[1], 3)

If there are 2 channels:

Funcao100(vetor[1], vetor[2], 3)
And so on.

Therefore, we have an incompatibility of use, because for the inclusion of the bank transaction in the routine FINA100, the parameters received are in the following positions:

FINA100(nPosArotina,aRotAuto,nOpcAuto)
where:

nPosArotina - Numeric- Desired menu option without executing mBrowse
aRotAuto - Array - Contains the data of the fields and their contents for inclusion via automatic routine.
nOpcAuto - Numeric - Desired menu option via automatic routine, where 3 = Pay, 4 = Receive, 5 = Delete, 6 = Cancel, 7 = Transfer and 8 = Transfer reversal
In this case, we need to send the Master channel vector as a second parameter (aRotAuto) and the menu option as third parameter (nOpcAuto).
We will need to manipulate the array of channels created by MILE through user function.

03. MILE CONFIGURATION EXAMPLE

Assuming the following MILE layout configuration:
1) Routine information:



2 Set the file formatting. Pay attention to the Pre-Execution field, where we will use a function to change the vector created by MILE, before calling MsExecAuto from FINA100.

3) Define the MsExecAuto type. In this case, we can use Model 1, as it is only 1 table. As the routine is not in MVC, there is no need to configure the Adapters in MVC.

4) Define channel A as Master to receive the bank transaction data for table SE5.

5) Define the order of the fields that will be in the import file.

04.  USER FUNCTION FPR THE MANIPULATION OF PARAMETERS

We will use a user function in the pre-execution of Mile. The function must return a new vector with the correct order of the parameters to be sent to the FINA100 routine.

In the example below, we are creating the aRotAuto array in the second position and the nOpcAuto in the third position.

User function UFINA100(lInterface, aInfos, aLayOut, aSaidas, aVetores)

Local aNewVet := array(3)
aNewVet[1] := {3}//nPosRotinaaNewVet[2] := aClone(aVetores[1]) //aRotAutoaNewVet[3] := {3} // nOpcAuto where 3 = Pay, 4 = Receive, and the option may be according to the aVetores position

Return aClone(aNewVet)

05. IMPORT FILE EXAMPLE

02/01/2019;M1;3370,09;NAT1;237;1020;102030;BAIXA AUTOMATICA FUNDOS;BRADESCO;P;BA;

02/01/201902/01/2019;M1;11736,10;NAT1;237;1020;102030;RESGATE INVEST FACIL;BRADESCO;P;BA;02/01/2019


IMPORTANT!

The import file must be created according to the rules defined in the Mile register.



06. TABLES

  • Bank Transactions - SE5