...
Bloco de código | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||
FISA061( [aWizAuto], [aFilAuto], cDir, cArq, nTipo ) --> Nil |
...
Bloco de código | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||
Nil |
Dica | ||
---|---|---|
| ||
The aWizAuto Array with the contents of the wizard MUST be entered as in the example shown below when "Example: Using FISA061 as an automatic routine". The xMagLeWiz feature (automatically loads the Wizard data and displays the wizard on screen) should NOT be used, as this function only works in the GRAPHIC MODE. The second parameter containing the processing branches is optional. In the example below, it was shown using the MatFilCalc feature (load branches of the current company). If used as shown in the example, it should be invoked by setting the first parameter to .F. E.g.: MatFilCalc(.F.). For correct operation, the positions 1 and 2 of the aWizAuto array referring to the 'from date' and 'to date' must be entered in the format (YYYYMMDD) - YearMonthDay. |
...
Bloco de código | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||
#Include "PROTHEUS.CH" User Function FCI() Local lMostraTela := .F. Local aWizAuto := \{\} // Array with the content fields filled in the wizard Local aFilAuto := \{\} // Array with the branches that will be processed Local cDir := "\FCI\" // Directory cannot be the same as StartPath entered Local cArq := "FCI.TXT" Local nTipo := 3 // 1-Process; 2-Import; 3-Generate file Private lMsErroAuto := .F. Private lMsHelpAuto := .T. Private lAutoErrNoFile := .F. IF SELECT("SX2") == 0 cCodEmpcCodEmp := aParams\[1\] cCodFil := aParams\[2\] PREPARE ENVIRONMENT EMPRESA cCodEmp FILIAL cCodFil \\ ENDIF aFilAuto := MatFilCalc(.F.) Aadd(aWizAuto,\{ "20180201", ; // From date "20180228", ; // To date "FCI_P001", ; // From product "FCI_P003", ; // To product "2" , ; // Select branches ? 1-Yes|2-No "100" , ; // Version "2" , ; // Consider blocked products ? 1-Yes|2-No "1"\}) // Use previous FCI code for same range? 1-Yes|2-No MSExecAuto(\{|x,y,z,m,n|FISA061(x,y,z,m,n)\}, aWizAuto, aFilAuto, cDir, cArq, nTipo) If lMsErroAuto MostraErro() EndIf RESET ENVIRONMENT Return Nil |
...