Árvore de páginas

Versões comparadas

Chave

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

...

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()  // Parâmetros Padrões

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

    /* ---- Parâmetros Adicionais ---- */
	oParam["cEmpAnt"]                    := cEmpAnt
    oParam["allocationSuggestion"]       := "1"
    oParam["blockedLot"]                 := "1"
    oParam["consignedIn"]                := "1"
    oParam["consignedOut"]               := "2"
    oParam["consolidateProductionOrder"] := "1"
    oParam["consolidatePurchaseRequest"] := "1"
    oParam["demandEndDate"]              := SToD("20220313")
    oParam["demandStartDate"]            := SToD("20220101")
    oParam["demandType"]["EMP_PROJETO"]  := .T.
    oParam["demandsProcessed"]           := .T.
    oParam["eventLog"]                   := .T.
    oParam["firmHorizon"]                := 1
    oParam["lGeraDoc"]                   := .T.
    oParam["lRastreiaEntradas"]          := .T.
    oParam["leadTime"]                   := "3"
    oParam["mrpStartDate"]               := SToD("20220118")
    oParam["numberOfPeriods"]            := "30 "
    oParam["orderPoint"]                 := "2"
    oParam["periodType"]                 := "2"
    oParam["productionOrderNumber"]      := "1"
    oParam["productionOrderType"]        := "2"
    oParam["purchaseRequestNumber"]      := "1"
    oParam["rejectedQuality"]            := "1"
    oParam["safetyStock"]                := "2"
    oParam["structurePrecision"]         := 7

    PCPA712JOB(oParam)

    RESET ENVIRONMENT

Return



Em seguida será necessário configurar o Schedule por meio do SIGACFG.


Para maiores detalhes sobre a utilização do cadastro de schedules e agendamentos, confira o documento Schedule - Como agendar a execução de rotinas.

...