/*
Üܱ±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±
ÚÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄ
¿±±±±³Program ³MyACTBA276³ Author ³ ³
±±±±ÃÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄ´±±±±³
Description ³Example of calling CTBA276 via MSExecAuto() ³
±±±±ÃÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´±±±±³
Uso ³SIGACTB
³±±±±ÀÄÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ
±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±
ßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßß
*/
User Function MyCTBA276()
Local aDadosAuto := {} // Array with data to be sent by MsExecAuto() for automatic recording.
Local aItens := {} // Array with data to be sent by MsExecAuto() for automatic recording.
Private lMsHelpAuto := .F. // Determine whether help messages must be directed to log file
Private lMsErroAuto := .F. // Determine whether any inconsistency occurred when running the routine in relation to
//ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿//³ Do not pass the branch value as a parameter. ³
//ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ
aDadosAuto:= {{'CW1_CODIGO' , "900001" , Nil},; // Apportionment Group Code
{'CW1_DESCRI' , "APPORTIONMENT GROUP DESCRIPTION 000001" , Nil},; // Apportionment Group Description
{'CW1_TIPO' , "1" , Nil},; // Type
{'CW1_INDICE' , "" , Nil},; // index
{'CW1_ENTID' , "1" , Nil}} // entity
//ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿//³ Do not pass the branch and code values as parameters.³
//ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ
aAdd(aItens, {{'CW1_SEQUEN' , "001" , Nil},; // sequence
{'CW1_CONTA' , "101010100" , Nil},; // Account
{'CW1_CCUSTO' , "" , Nil},; // Cost Center
{'CW1_ITEM' , "" , Nil},; // Accounting Item
{'CW1_CLVL' , "" , Nil},; // Value Class
{'CW1_PERCEN' , 50 , Nil},; // Percentage
{'CW1_FATOR' , 0 , Nil},; // Factor
{'CW1_FORMUL' , "" , Nil},; // Formula
{'CW1_STATUS' , "1" , Nil}}) // Status
aAdd(aItens, {{'CW1_SEQUEN' , "002" , Nil},; // sequence
{'CW1_CONTA' , "101010200" , Nil},; // Account
{'CW1_CCUSTO' , "" , Nil},; // Cost Center
{'CW1_ITEM' , "" , Nil},; // Accounting Item
{'CW1_CLVL' , "" , Nil},; // Value Class
{'CW1_PERCEN' , 50 , Nil},; // Percentage
{'CW1_FATOR' , 0 , Nil},; // Factor
{'CW1_FORMUL' , "" , Nil},; // Formula
{'CW1_STATUS' , "1" , Nil}}) // Status
MSExecAuto({|X, Y, Z| CTBA276(X, Y, Z)}, aDadosAuto, aItens, 3)
If lMsErroAuto
lRetorno := .F.
MostraErro()
Else
lRetorno:=.T.
MsgAlert("Record Add," "Alert!")
EndIf
Return