Árvore de páginas

Versões comparadas

Chave

  • Esta linha foi adicionada.
  • Esta linha foi removida.
  • A formatação mudou.

...

Os parâmetros da função podem ser encontrados na tabela abaixo.

ParâmetroTipoDescriçãoObrigatórioDefault
oParametrosObjectJson com os parâmetros de execução do MRP.X
lCancelLógicoIndica se irá cancelar o ticket reservado.
.F.
lIntegraLógicoIndica se irá realizar a integração no caso de pendencias.
.F.

02. EXEMPLO DE UTILIZAÇÃO

...

Bloco de código
languagejava
titleExemplo
linenumberstrue
#INCLUDE "PROTHEUS.CH"
#INCLUDE "TBICONN.CH"

User Function MrpSchdl()
    Local oParam := Nil

    PREPARE ENVIRONMENT EMPRESA "99" FILIAL "01" MODULO "PCP"
    
    oParam := PCPA712Par(.T.)  // Parâmetros Padrões

    /* ---- Parâmetros Obrigatórios ---- */
	oParam["cEmpAnt"] := cEmpAnt
	oParam["cFilAnt"] := cFilAnt
    oParam["user"]    := "000000"

    /* ---- Parâmetros Adicionais ---- */
    oParam[ 'TELA_1' ][ 'HW2_CODIGO' ]      := "01"
    oParam["allocationSuggestion"]          := "2"
    oParam["blockedLot"]                    := "2"
    oParam["consignedIn"]                   := "2"
    oParam["consignedOut"]                  := "1"
    oParam["consolidateProductionOrder"]    := "3"
    oParam["consolidatePurchaseRequest"]    := "3"
    oParam["demandCodes"]["LISTA"]          := "|003|"
    oParam["demandEndDate"]                 := SToD("20220313")
    oParam["demandsProcessed"]              := .T.
    oParam["demandStartDate"]               := SToD("20220101")
    oParam["demandType"]["EMP_PROJETO"]     := .T.
    oParam["demandType"]["MANUAL"]          := .T.
    oParam["demandType"]["PEDIDO_VENDA"]    := .T.
    oParam["demandType"]["PLANO_MESTRE"]    := .T.
    oParam["demandType"]["PREV_VENDAS"]     := .T.
    oParam["documents"]["LISTA"]            := "|003A01|"
    oParam["documentType"]["PREVISTOS"]     := "1"
    oParam["documentType"]["SACRAMENTADOS"] := .T.
    oParam["documentType"]["SUSPENSOS"]     := .T.
    oParam["eventLog"]                      := .F.
    oParam["firmHorizon"]                   := 2
    oParam["leadTime"]                      := "1"
    oParam["lGeraDoc"]                      := .F.
    oParam["lRastreiaEntradas"]             := .F.
    oParam["numberOfPeriods"]               := "30 "
    oParam["orderPoint"]                    := "1"
    oParam["periodType"]                    := "1"
    oParam["productGroups"]["LISTA"]        := "|0007|"
    oParam["productionOrderNumber"]         := "2"
    oParam["productionOrderType"]           := "1"
    oParam["products"]["LISTA"]             := "|PA001|PA002|PA003|PA004|"
    oParam["productTypes"]["LISTA"]         := "|PA|"
    oParam["purchaseRequestNumber"]         := "2"
    oParam["rejectedQuality"]               := "2"
    oParam["safetyStock"]                   := "1"

    If PCPA712(oParam, .T., .T.)
        ConOut(" ---- Concluido com Sucesso! ---- ")
    Else
        ConOut(" ---- Não Foi Concluido com Sucesso! ----")
    EndIf

    RESET ENVIRONMENT

Return


...