Páginas filhas
  • DI_PCP_Protheus_PPI_Multitask_Integration

Versões comparadas

Chave

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

...

Transaction Item: Item_3_001.xsd
Message Identifier: Item
Version: 3_001
Protheus Module: SiGAPCP
Sending Type: Synchronous

 

 

 

MessageDescriptionTableFieldTypeTableFieldTypeBranchCode   Companybranch+product codeCOMPANY  Active item   Companybranch+unit or measureCOMPANY Inventory GroupCompanybranch+stock groupCOMPANY Stock Group DescriptionStock LocationCompanybranch+stock locationCOMPANY Stock Location DescriptionMinimum Lot CompanybranchfamilyCOMPANY   WeightGross WeightTraceControls AddressSecond Measurement Unit Companybranch sec. measure unitCOMPANY Conversion Factor  Package QuantityCost Center
MensagemTag

Descrição

Tabela/Campo: ProtheusTipoTabela/Campo: PC-FactoryTipo
BusinessContentTypeCompanyId Código da Empresa LogadaLogged Company Code

 

 CHAR(02)  
 BranchId Código Filial SB1.B1_FILIALCHAR(02)

 

TBLInProduct.PlantCode

CHAR(15)
 CompanyInternalIdCompanyEmpresa+BranchFilial COMPANY EMPRESA + SB1.B1_FILIAL   
 Code Product codeCódigo do ProdutoSB1.B1_CODCHAR(15)

 

 TBLInProduct.CodeCHAR(20)
 Name Product DescriptionDescrição do produtoSB1.B1_DESCCHAR(30)

 

TBLInProduct.NameCHAR(70)
 InternalIdEmpresa+filial+código do produtoEMPRESA + SB1.B1_FILIAL + SB1.B1_COD   
 ShortName Short nameNome curtoSB1.B1_DESCCHAR(30)

 

TBLInProduct.SecondNameCHAR(30)
 Active Item ativo?SB1.B1_ATIVOCHAR(01)TBLInProduct.FlgEnableSMALLINT
 UnitOfMeasureCode Unit of Measurement:Unidade de MedidaSB1.B1_UMCHAR(02)

 

TBLInProduct.Unit1codeCHAR(05)
 UnitOfMeasureInternalIdEmpresa+filial+unidade de medidaEMPRESA + SB1.B1_FILIAL + SB1.B1_UM   
 StockGroupCodeGrupo de EstoqueSB1.B1_GRUPOCHAR(04)  
 StockGroupInternalIdEmpresa+filial+grupo de estoqueEMPRESA + SB1.B1_FILIAL + SB1.B1_GRUPO   
 StockGroupDescriptionDescrição do grupo estoqueSBM.BM_DESCCHAR(30)  
 StandardWarehouseCodeLocal de EstoqueSB1.B1_LOCPADCHAR(02)  
 StandardWarehouseInternalIdEmpresa+filial+local de estoqueEMPRESA + SB1.B1_FILIAL + SB1.B1_LOCPAD   
 StandardWarehouseDescriptionDescrição Local de EstoqueNNR.NNR_DESCRICHAR(40)  
 EconomicLot Economic LotLote econômicoSB1.B1_LEDEC(12,2)  
 MinimumLot Lote mínimoSB1.B1_LMDEC(12,2)  
 FamilyCode FamilyFamíliaSB1.B1_FPCODCHAR(10)

 

TBLInProduct.FamilyProductCodeCHAR(15)
 FamilyInternalIdEmpresa+filial+famíliaEMPRESA + SB1.B1_FILIAL + SB1.B1_FPCOD   
 FamilyDescription Family DescriptionDescrição da famíliaSYC.YC_NOMECHAR(40)

 

TBLInProduct.FamilyProductNameCHAR(30)
 NetWeightPeso do ItemSB1.B1_PESODEC(11,4)  
 GrossWeighPeso brutoSB1.B1_PESBRUDEC(11,4)  
 TrailRastroSB1.B1_RASTROCHAR(01)  
 BinControlControla EndereçoSB1.B1_LOCALIZCHAR(01)  
 SecondUnitOfMeasureCodeSegunda Unidade de medidaSB1.B1_SEGUMCHAR(02)

 

TBLInProduct.Unit2CodeCHAR(20)
 SecondUnitOfMeasureInternalIdEmpresa+filial+ seg. unidade de medidaEMPRESA + SB1.B1_FILIAL + SB1.B1_SEGUM   
 MultiplicationFactorValue Fator de conversãoSB1.B1_CONVDEC(5,2)

 

TBLInProduct.Unit2FactorDEC(8,4)
 ProductTypeType of Tipo do ItemSB1.B1_TIPOCHAR(02)

 

TBLInProduct.ProductTypeCodeCHAR(15)
 PackingQuantity Quantidade EmbalagemSB1.B1_QENUM(09)

 

 

TBLInProduct.QtyPackageDEC(19,4)
 CostCenterCodeCentro de CustoSB1.B1_CCCHAR(09)TBLInProduct.CostCenterCodeCHAR(20)
 StockControlTypeControle do estoque do item CHAR(01) 
Nota
titleNota:

 

  • If it is an undefined type, it must be saved as GENERIC. Example: Type = SAMPLER.
  • A tag StockControlType pode ser, 1=Serial;2=Nr. de Série;3=Lote;4=Referência. Se o campo B1_RASTRO for S=SubLote ou L=Lote deve gravar como '3'. Se o campo B1_LOCALIZ for S=Sim, deve gravar como 2. O produto pode controlar lote e série ao mesmo tempo, sendo registrado nas tags TRIAL e BINCONTROL.

 

Deposit Transaction: Warehouse_1_001.xsd
Message Identifier: Warehouse
Version: 1_001
Protheus Module: SiGAPCP
Sending Type: Synchronous

 

MessageDescriptionTableFieldTypeTableFieldType Branch Code Code of Stock Location(warehouse/deposit Description of Stock Location (warehouse/deposit   Type of Stock Location 
MensagemTagDescriçãoTabela/Campo: ProtheusTipoTabela/Campo: PC-FactoryTipo
BusinessContentTypeCompanyIdCompany CodeCódigo da Empresa CHAR(02)

 

TBLInWarehouse.ExtcodeCHAR(20)
 BranchIdCódigo da FilialNNR.NNR_FILIALCHAR(02)

 

TBLInWarehouse.PlantCodeCHAR(15)
 CompanyInternalIdCompanyEmpresa+BranchFilialCOMPANY EMPRESA + NNR.NNR_FILIAL   
 CodeCódigo do Local de Estoque(armazém/almoxarifado/depósito)NNR.NNR_CODIGOCHAR(02)

 

TBLInWarehouse.CodeCHAR(15)
 InternalIdCompanyEmpresa+BranchFilial+location codecódigo local

COMPANY EMPRESA + NNR.NNR_FILIAL +

NNR.NNR_CODIGO

   
 DescriptionDescrição do Local de Estoque (armazém/almoxarifado/depósito)NNR.NNR_DESCRICHAR(20)

 

TBLInWarehouse.NameCHAR(15)
 ActiveLocation of Active StockLocal de Estoque Ativo?TRUECHAR(01)TBLInWarehouse.FlgEnableSMALLINT
 TypeTipo do Local de EstoqueNNR.NNR_TIPOCHAR(01)  
 WarehouseClassificationClassificationClassificaçãoNNR.NNR_INTPCHAR(01) 

 


Transaction Resource PCP / Machine SFC: Machine_1_000.xsd
Message Identifier: Machine
Version: 1_000
Protheus Module: SIGAPCP, SIGASFC
Sending Type: Synchronous

MessageDescriptionTableFieldTable FieldTypeTableFieldTypeMachine Code Work Center Code  Cost Center CodeType of ProcessingSingle processingBatch processingMultiple ProcessingsType Does not reportOperatorTeamMachine QuantityMachine EfficiencyMachine Operator QuantitySimultaneous Operations QuantityHas SetupOverlap annotationProduction AreaValidity Start DateValidity End Date Resource TypeOperatorToolTeamEquipmentResource Code Resource NameTime Measure Type HoursMinutesSecondsExpiration Start DateExpiration End DateNumber CyclesDetermines timeShift Model CodeShift Model DescriptionExpiration Start DateExpiration End Date 
MensagemTagDescrição

Tabela/

Campo:

Protheus PCP

Tabela Campo:

Protheus SFC

TipoTabela/Campo: PC-FactoryTipo
BusinessContentType
      
 

 

CodeCódigo MáquinaSH1.H1_CODIGOCYB.CYB_CDMQCHAR(20)

 

TBLInResource.codeCHAR(15)
 DescriptionMachine DescriptionDescrição MáquinaSH1.H1DESCRICYB.CYB_DSMQCHAR(40)

 

 

TBLInResource.Name

TBLInResource.Nickname

CHAR(20)
 WorkCenterCodeCódigo Centro TrabalhoSH1.H1_CTRABCYB.CYB_CDCETRCHAR(10)

 

TBLInResource.ManagerGrpCode

CHAR(15)
 WorkCenterDescriptionWork Center DescriptionDescrição Centro TrabalhoSHB.HB_NOMECYB.CYB_DSCETRCHAR(40)

 

TBLInResource.WorkCenterDescription

CHAR(15)
 CostCenterCodeCódigo Centro CustoSH1.H1_CCUSTCYB.CYB_CDCECSCHAR(20)  
 ProcessorTypeTipo de Processamento 

CYB.CYB_TPPC

1=

Monoprocesso;2=

Por Batelada;

3=

Multiplos Processos;4=Manual

CHAR(01)  
 LaborTypeTipo MOD 

CYB.CYB_TPMOD

1=

Nao Reporta;2=

Operador;3=

Equipe

CHAR(01)  
 VolumeMachineQuantityQuantidade Volume Máquina CYB.CYB_QTVMMQDEC(12,4)  
 EfficiencyMachineValueEficiência Máquina CYB.CYB_VLEFMQDEC(05,2)  
 OperatorMachineQuantityQuantidade Operador Máquina CYB.CYB_QTOEMQNUM(02)  
 SimultaneousActivityQuantityQuantidade Operações Simultâneas CYB.CYB_QTATSMNUM(03)  
 IsSetupPossui Preparação CYB.CYB_LGSUBOOLEAN  
 IsOverlapReportSobrepõe Apontamento CYB.CYB_LGOVRPBOOLEAN  
 ProductionAreaCodeÁrea de Produção CYB.CYB_CDARPOCHAR(10)  
 InitialValidateDateData início validade CYB.CYB_DTBGVDDATE  
 FinalValidateDateData fim validade CYB.CYB_DTEDVDDATE  
ListOfResources
      
  ResourceTypeTipo do Recurso 

CYC.CYC_TPRC

1=

Operador;2=

Ferramenta;

3=

Equipe;4=

Equipamento

CHAR(01)  
 ResourceCodeCódigo Recurso CYC.CYC_CDRCCHAR(20)

 

TBLInUser.CodeCHAR(30)
 ResourceNameNome Recurso CYC.CYC_NMRCCHAR(40)

 

 

 TBLInUser.Name

 TBLInUser.Nickname
CHAR(60)
 UnitTimeTypeTipo Medida Tempo 

CYC.CYC_TPUNTE

1=

Horas;2=

Minutos;3=

Segundos

CHAR(01)  
 StartExpirationDateData Início Validade CYC.CYC_DTBGVDDATE  
 EndExpirationDateData Fim Validade CYC.CYC_DTEDVDDATE  
 CycleQuantityNúmero Ciclos CYC.CYC_QTCIDEC(11,4)  
 IsTimeActivityDetermina tempo CYC.CYC_LGTEATBOOLEAN  
ListOfProductionShifts       
 ProductionShiftCodeCódigo Modelo Turno CYL.CYL_CDTNCHAR(08)  
 ProductionShiftDescriptionDescrição Modelo Turno CYL.CYL_DSTNCHAR(40)  
 BeginDateData Início Validade CYL.CYL_DTVDBGDATE  
 EndDateData Fim Validade CYL.CYL_DTVDEDDATE 


In PCP, the machines are registered in the routine of resources MATA610 and in the Shop Floor, the routine is SFCA002. Nomenclature is also changed. When using Shop Floor, it is named MACHINE. When using only PCP. it is RESOURCE. The routine of parameters PCPA109 is ready to present the name according tothe use of the system.

...

SFC Resource Transaction: Resource_1_000
Message Identifier: Resource
Version: 1_000
Protheus Module: SIGAPCP
Sending Type: Synchronous

 

Message

Tag

Description

Table/Field:

Protheus PCP

Table Field:

Protheus SFC

Type

Table/Field: PC-Factory

Type

BusinessContentType

 

 

 

 

 

 

 

 

Code

Resource Code

SH4.H4_CODIGO

CYH.CYH_CDRC

CHAR(06)

 

TBLTooling.Code

CHAR(15) 

 

Name

Resource Name

SH4.H4_DESCRI

CYH.CYH_NMRC

CHAR(40)

 

TBLTooling.Name

CHAR(50) 

 

Type

Resource Type

1=Operator;2=Tool;

3=Team;4=Equipment.

 

CYH.CYH_TPRC

 1=Operator;2=Tool;

3=Team;4=Equipment

CHAR(25)

 

 

 

ProductionAreaCode

Production Area

 

CYH.CYH_CDARPO

CHAR(10)

 

 

 

ProductionAreaDescription

Production area description

 

CYA.CYA_DSARPO

CHAR(40)

 

 

 ItemComponentType

 

 

 

 

 

 

 

 

ProductionShiftNumber

Shift

SH4.H4_TURNO

CYH.CYH_NRTN

CHAR(05)

 

 

 

LaborCode

MOB

Fixed '1'

CYH.CYH_CDMOD

CHAR(08)

 

 

 

StartExpirationDate

Start validity date

Current Date

CYH.CYH_DTVDBG

DATE 

TBLTooling.Period

 INT

 

EndExpirationDate

End Validity Date

 

CYH.CYH_DTVDED

DATE 

TBLTooling.Period

 INT

 

UnitCycleQuantity

Units Cycles

 

CYH.CYH_QTUNCI

NUM(07)

 

 

 

ToolCode

Tool

 

CYH.CYH_CDMPRC

CHAR(15)

 

 

 

ToolDescription

Tool Description

 

CYH.CYH_DSMPRC

CHAR(40)

 

 

...

Transaction Structure: ItemStructure_1_000.xsd 
Message Identifier: ItemStructure
Version: 1_000
Protheus Module: SiGAPCP
Sending Type: Synchronous 

DescriptionTableFieldTypeTableFieldTypeCompanyBranchCOMPANY Parent Item Code   Component code Start validity date  End Validity Date  Indicates if is ghostCHAR01Component Item QuantityLoss factorScript Code Script AlternativeOperation Operation Code Sequence of component in operation
Mensagem

Message

TagDescriçãoTabela/Campo: ProtheusTipoTabela/Campo: PC-FactoryTipo
BusinessContentTypeCompanyIdCompany CodeCódigo da Empresa CHAR(02)  
 CompanyInternalIdEmpresa+FilialEMPRESA + SG1.G1_FILIAL   
 ItemInternalIdCompanyEmpresa+BranchFilial+parent código item codepai

COMPANY EMPRESA + SG1.G1_FILIAL +

SG1.G1_COD

   
 ItemCodeCódigo item paiSG1.G1_CODCHAR(15)

 

TBLInWOHD.ProductCode

TBLInWOHD.WOCode

CHAR(30)
 ItemAmountBase quantity of parent itemQuantidade base do item paiSB1.B1_QBNUM(07)

 

TBLInWOHD.TotalQTYDEC(19,4)
ItemComponentType      
 ItemSequenceComponent sequenceSequência do componenteSG1.G1_TRTNUM(05)

 

TBLInBillMat.BillMatExtCodeCHAR(20)
 ItemComponentCodeCódigo item componenteSG1.G1_COMPCHAR(15)

 

TBLInBillMat.ProductCodeCHAR(20)
 ItemComponentInternalIdInternal Id of Component do Item ComponenteCOMPANY EMPRESA +SG1 SG1.G1_FILIAL +SG1 SG1.G1_COMP   
 InitialDateData validade inicialSG1.G1_INIDATETBLInWOHD.DtPlanStartDATETIME
 FinalDateData validade finalSG1.G1_FIMDATETBLInWOHD.DtPlanEndDATETIME
 IsGhostMaterialIndica se é fantasmaSB1.B1_FANTASMBOOLEAN ( FALSE ou TRUE)  
 ItemComponentAmountQuantidade do item componenteSG1.G1_QUANTDEC(12,6)  
 LossFactorFator de perdaSG1.G1_PERDADEC(05,2)  
(mais) ListOfScript      
 ScriptcodeCódigo do RoteiroSGF.GF_ROTEIROCHAR(02)

 

TBLInWOHD.ExtCodeCHAR(20)
 ScriptAlternativeAlternativo do Roteiro--   
 ActivityIntenalIDID Operação--   
 ActivityCodeCódigo da OperaçãoSGF.GF_OPERACCHAR(02)

 

TBLInWodet.CodeCHAR(10)
 ActivityComponentSequenceSequência do componente na operaçãoSGF.GF_TRTNUM(03) 

 

 

Script Script Transaction - Item Operations: ItemScript_1_000.xsd 
Message Identifier: ItemScript
Version: 1_000
Protheus Module: SiGAPCP
Sending Type: Synchronous 

DescriptionTableFieldTypeTableFieldType Item DescriptionScript CodeAlternative ScriptOperation  Operation Description Machine Code Tool CodeOperation Type Executes operation Does not executeWork Center Code Work Center COMPANY SG2Standard lot  Resource Time Machine Time Preparation Time  Time Unit Type HoursMinutesSecondsDays  AlternativeStart Date  End Date   ScrapProportionResource Quantity 
Mensagem

Message

TagDescriçãoTabela/Campo: ProtheusTipoTabela/Campo: PC-FactoryTipo
BusinessContentTypeItemCodeItem codeCódigo itemSG2.G2_PRODUTOCHAR(15)

 

TBLInWOHD.ProductCode

TBLInWOHD.WOCode

CHAR(20)
 ItemDescriptionDescrição do itemSB1.B1_DESCCHAR(40)  
 ItemInternalIdCompanyEmpresa|BranchFilial|Item

COMPANY EMPRESA + SG2.G2_FILIAL +

SG2.G2_PRODUTO

   
 ScriptCodeCódigo do RoteiroSG2.G2_CODIGOCHAR(02)  
 ScriptDescriptionScript DescriptionDescrição Roteiro--CHAR(40)  
 ScriptAlternativeRoteiro Alternativo--CHAR(02)  
ListOfActivity      
 ActivityInternalIDID OperaçãoSG2.R_E_C_N_O_NUM(05)  
 ActivityCodeOperation CodeCódigo da OperaçãoSG2.G2_OPERACCHAR(02)

 

TBLInWodet.CodeCHAR(10)
 ActivityDescriptionDescrição OperaçãoSG2.G2_DESCRICHAR(60)

 

TBLInWodet.NameCHAR(40)
 MachineCodeCódigo da MáquinaSG2.G2_RECURSOCHAR(06)

 

TBLInWodet.ResourceCHAR(15)
 ToolCodeCódigo FerramentaSG2.G2_FERRAMCHAR(06)  
 ActivityTypeTipo Operação

1 =

Executa operação; 2 =

Não executa.

CHAR(01)  
 WorkCenterCodeCódigo Centro TrabalhoSG2.G2_CTRABCHAR(06)

 

TBLInWodet.ManagerGrpCodeCHAR(15)
 WorkCenterInternalIdId Centro de TrabalhoEMPRESA + SG2.G2_FILIAL + SG2.G2_CTRAB   
 UnitItemNumberLote padrão SG2.G2_LOTEPADNUM(06)

 

TBLInWodet. StdSpeedDEC(28,23)
 TimeResourceTempo Recurso0 

 

TBLInWodet. StdSpeedDEC(28,23)
 TimeMachineTempo MáquinaSG2.G2_TEMPADDEC(05,2)

 

TBLInWodet. StdSpeedDEC(28,23)
 TimeSetupTempo PreparaçãoSG2.G2_SETUPDEC(05,2)TBLInWodet. SetUpTimeINT
 UnitTimeTypeTipo Unidade Tempo1 = Horas;2=Minutos;3=Segundos;4=Dias TBLInWodet. StdSpeedFormatTINYINT
 ScriptAlternativeAlternativoSG2.G2_ROTALTCHAR(02)  
 InitialDateData InicialSG2.G2_DTINIDATETBLInWodet.DtPlanStartDATETIME
 FinalDateData FinalSG2.G2_DTFIMDATETBLInWodet.DtPlanEndDATETIME
 PercentageScrapValue% Refugo--   
 PercentageValueProporção--   
 ResourceQuantityQuantidade Recurso--  
Nota
titleNota:
  • The tag ActivityType (Operation Type) is generated with fixed value '1';
  • The tag ActivityType (Time Unit Type) is generated with fixed value '1';
  • The tag ListOfPertOrders is not generated for Protheus;
  • In the deletion of a script, do not delete if there is integrity with the routine of OPERATIONS x COMPONENTS, MATA637. In this case, you do not need to send any message to PC-Factory;
  • When adding, editing or deleting data from MATA637, structure message is sent, ItemStructure.

...

Addresses Transaction: AdressStock_1_000.xsd
Message Idenfier: AdressStock
Version: 1_000
Protheus Module: SiGAPCP
Sending Type: Synchronous 

DescriptionTableFieldTypeTableFieldType AddressLocation Address description
Mensagem

Message

TagDescriçãoTabela/Campo: ProtheusTipoTabela/Campo: PC-FactoryTipo
BusinessContentTypeWarehouseCodeWarehouseArmazém/DepositDepósitoSBE.BE_LOCALCHAR(02)

 

TBLInAddress.WarehouseCodeCHAR(15)
 LocationCodeEndereço/LocalizaçãoSBE.BE_LOCALIZCHAR(15)

 

TBLInAddress.CodeCHAR(15)
 AdressInternalId

Address full key

Chave completa endereço

 EMPRESA  COMPANY + SBE.BE_FILIAL + SBE.BE_LOCAL + SBE.BE_LOCALIZ

   
 AdressStockDescriptionDescrição do endereçoSBE.BE_DESCRICCHAR(30)

 

 

...

TBLInAddress.ExtCodeCHAR(20)

Balance Transaction: ItemStockLevel_1_000.xsd
Message Identifier: ItemStockLevel
Version: 1_000
Protheus Module: Various
Sending Type: Synchronous 

DescriptionTableFieldTypeTableFieldType Item DescriptionReferenceDeposit/Stock location/Warehouse Lot Number lotSerial NumberAddressLocation Expiration Date  Stock balanceReserved QuantityAvailable balanceUpdated Quantity Input or OutputInput or Output. 
Mensagem

Message

TagDescriçãoTabela/Campo: ProtheusTipoTabela/Campo: PC-FactoryTipo
BusinessContentTypeItemCodeProduct codeCódigo do produtoSB2.B2_CODCHAR(15)

 

TBLInMovMat.ProductCodeCHAR(20)
 ItemDescriptionDescrição do itemSB1.B1_DESCCHAR(30)  
ListOfStock  

 

   
 ReferenceCodeReferência--   
 WarehouseCodeDepósito/Local de estoqe/ArmazemSB2.B2_LOCALCHAR(02)

 

TBLInMovMat.WarehouseCodeCHAR(15)
 LotCodeNúmero do LoteSB8.B8_LOTECTLCHAR(10)

 

TBLInMovMat.LotCodeCHAR(41)
 SubLotCodeSub-LoteSB8.B8_NUMLOTECHAR(06)  
 NumberSeriesNúmero de SérieSBF.BF_NUMSERICHAR(20)  
 AddressCodeEndereço/LocalizaçãoSBF.BF_LOCALIZCHAR(15)

 

TBLInMovMat.AddressCodeCHAR(15)
 LotDueDateData de ValidadeSB8.B8_DTVALIDDATETBLInMovMat.LotDtValidityDATETIME
 CurrentStockAmountSaldo de estoque

SB2.B2_QATU

SB8.B8_SALDO

SBF.BF_QUANT

DEC(12,2)  
 BookedStockAmountQuantidade Reservada

SB2.B2_RESERVA

SB8.B8_EMPENHO

SBF.BF_EMPENHO

DEC(12,2)  
 AvailableStockAmountSaldo disponível

SB2.B2_QATU - SB2.B2_RESERVA

SB8.B8_SALDO - SB8.B8_EMPENHO

SBF.BF_QUANT - SBF.BF_EMPENHO

DEC(12,2)  
 
QuantityUpdated
Quantidade Atualizada DEC(12,2)

 

TBLInMovMat.QtyDEC(18,2)
 
InputOutputEntrada ou Saída1 = Entrada ou 2 = SaídaCHAR(01)

 

TBLInMovMat.ClassificationCHAR(15)
Nota
titleNota:
  • When updating new balance in ERP, message is sent to PC-Factory.
    Transactions generating movement of stock and executing balance updating routines activating integration:
    Inbound Inv.  - Function B2ATUCOMD1
    Sale Inv. - Function B2ATUCOMD2 Internal Transac. - Function B2ATUCOMD3
  • When the balance is updated by an update of PC-Factory do not generated the balance updating message. When the origin of the balance change is TOTVSMES, message is not generated.
    In production annotation message, tag Product Name indicates what is sent to record. For TOTVS MES, this information is saved in SH6.H6_OBSERVA = 'TOTVSMES'.
    If the movement is internal, it is registered in SD3.D3_OBSERVA = 'TOTVSMES'.
  • The field QuantityUpdated corresponds to the updated quantity, that is, quantity being moved. 
  • The field InputOutput indicates if the movement is input or output. 
  • When the item controls address (B1_LOCALIZ), the balance message must be generated only in the confirmation of MATA265, routine executing the address.
  • The routines of initial balance of PCP and Stock, MATA220 and MATA805 also generated the balance message.

...

Message Identifier: WasteReason
Version: 1_000
Protheus Module: SIGAPCP/SIGASFC
Sending Type: Synchronous 

DescriptionTableFieldTable FieldTypeTableFieldType Scrap Description Scrap
Mensagem

Message

TagDescrição

Tabela/

Campo:

Protheus PCP

Tabela Campo:

Protheus SFC

TipoTabela/Campo: PC-FactoryTipo
BusinessContentTypeCodeWaste CodeCódigo RefugoSX5.X5_CHAVECYO.CYO_CDRFCHAR(08)

 

TBLOutScrap.CodeCHAR(15)
 DescriptionDescrição do Refugo

X5_DESCRI

X5_DESCSPA

X5_DESCENG

CYO.CYO_DSRFCHAR(40)

 

TBLOutScrap.NameCHAR(30)
 IsReworkReworkRetrabalho

 

CYO.CYO_LGRTBOOLEAN  
 IsScrapMaterialRefugo MaterialSBE.BE_DESCRICCYO.CYO_LGRFMPBOOLEAN 

 

Nota
titleNota:
    • When no is integrated with Shop Floor, MV_INTSFC equal to '0' the scrap is registered in generic table SX5. 
    • It must search in SX5 table according to command below:
      select X5_CHAVE from sx5990 where X5_TABELA = '43'
      Where:
      - Code of reason is X5_CHAVE
      Table of reason is '43'.
    • When it is integrated with  Shop Floor, MV_INTSFC equal to '1' is generated only the table of  Shop Floor - CYO. Routine SFCA003. If in the message there is no indicator of scrap or rework, consider scrap (CYO_LGRFMP = 'T').
    • Waste reasons have different sizes in tables. Validate it if receipt code does not exceed the size of columns in Protheus.
    • When uses the SIGAPCP it must validate a SX5.X5_CHAVE and SBC.BC_MOTIVO.
    • When uses the SIGASFC validate against the CYO.CYO_CDRF, CY0.CY0_CDRF  and SBC.BC_MOTIVO.

...

Message

Tag

Description

Table/Field:

Protheus PCP

Table Field:

Protheus SFC

Type

Table/Field: PC-Factory

Type

BusinessContentType

Code

Stoppage Reason Code

SX5.X5_CHAVE

CYN.CYN_CDSP

CHAR(10)

 

TBLOutResourceStatus.Code

CHAR(05) 

 

Description

Stoppage Description

X5_DESCRI

X5_DESCSPA

X5_DESCENG

CYN.CYN_DSSP

CHAR(40)

 

TBLOutResourceStatus.Name

CHAR(30) 

 

IsEfficiency

Change Efficiency

--

--

 

 

 

 

IsEmailEquipment

E-mail Planner

--

--

 

 

 

 

IsServiceRequest

Issue Service Request

--

--

 

 

 

 

IsSetup

Setup Stoppage

--

--

  

TBLOutResourceStatus.FlgSetup

 SMALLINT

Nota
titleNota:
    • When no is integrated with Shop Floor, MV_INTSFC equal to '0' the stoppage reason is registered in generic table SX5. 
    • It must search in SX5 table according to command below:
      select X5_CHAVE from sx5990 where X5_TABELA = '44'
      Where:
      - Code of reason is X5_CHAVE
      Table of reason is '44'.
    • When it is integrated with  Shop Floor, MV_INTSFC equal to '1' is generated only the table of  Shop Floor - CYN. Routine SFCA004. 
    • Stoppage reasons have different sizes in tables. Validate it if receipt code does not exceed the size of columns in Protheus.
      When it uses the SIGAPCP it must validate against the SX5.X5_CHAVE and SH6.H6_MOTIVO
      When it uses the SIGASFC validate against the CYN.CYN_CDSP, CYX.CYX_CDSP and SH6.H6_MOTIVO

...

Production Order Transaction: ProductionOrder_2_003004.xsd

Message Identifier: ProductionOrder
Version: 2_003
Module Protheus: SIGAPCP
Sending Type: Synchronous

MessageDescriptionTableFieldTypeTableFieldType CompanyBranchProduction OrderCOMPANY   Description Quantity Measurement Unit Estimated/Opened Started Partial Closed Idle    CP Production Order End Date    Customer Name  Production Order Record or  Operation Description Operation splitItem CodeItem DescriptionOperation Type Register Does not Register Work Center Description  Resource Time (Standard time for a lot  Preparation TimeDirect Labor CodeDefault Batch Last operation, pass In others   Schedule Start Date/Time   Quantity to produce in the operationMeasurement Unit Second measure unit in operation Conversion factor for second unit in operationProduction order Reservation record   DescriptionOperation Code  Reservation Date LotItem sequenceRequest typeDeposit Code Lot Code LocationAddress Operation Code Script Code AllocationQuantityAllocated Quantity Allocation Type AddReduceAbsolut Value  SubLotCode-lotSerial NumberExpiration Date  Production Order Number SelectionOperation Item codeItem DescriptionActivity Start Date/Time  Activity End Date/Time  Approved QuantityScrap QuantityMachine Code Machine DescriptionExpected Quantity Standard Setup TimeStandard Operation TimeStandard Post-process TimeStandard Machine TimeStandard Time Used CapacityAvailable Activity TimeReported QuantityReworked QuantitySetup Start Date/TimeSetup End Date/TimePreparation Time  Machine Time Time Post-processing Time Work Center Reported Operation StatusListOfQuotaActivityToolsToolTool Quantity
MesagemTagDescrição

Tabela/

Campo

TipoTabela/Campo: PC-FactoryTipo
BusinessContentTypeNumberProduction Order NumberNúmero Ordem ProduçãoSC2.C2_NUM + SC2.C2_ITEM + SC2.C2_SEQUENCHAR(20)

 

TBLInWOHD.CodeCHAR(41)
 ProductionOrderUniqueIDEmpresa+Filial+Ordem Produção

EMPRESA + SC2.C2_FILIAL + SC2.C2_NUM +

SC2.C2_ITEM + SC2.C2_SEQUEN

CHAR(30)  
 ItemCodeCódigo Item CodeSC2.C2_PRODUTOCHAR(15)

 

TBLInWOHD.ProductCodeCHAR(20)
 ItemDescriptionDescrição ItemSB1.B1_DESCCHAR(40)  
 TypeOrder typeTipo da Ordem

1= InternalInterna; 2=ExternalExterna; 3=InternalInterna/ExternalExterna; 4=ReworkRetrabalho;

5=RepairConserto; 6=MaintenanceManutenção; 7=Fixed AssetAtivo Fixo;

8=Tool ShopFerramentaria; 9=ReuseReaproveitamento

 

CHAR(01)

 

TBLInWOHD.WoTypeCodeCHAR(20)
 QuantityQuantidadeSC2.C2_QUANTDEC(12,2)

 

TBLInWOHD.TotalQty

 DEC(19,4)

 ReportQuantityReported QuantityQuantidade ReportadaSC2.C2QUJEDEC(12,2)  
 UnitOfMeasureCodeUnidade MedidaSC2.C2_UMCHAR(02)

 

TBLInWoDet.Unit1CodeCHAR(05)
 RequestOrderCodeProduction Order CodeCódigo Pedido Ordem ProduçãoSC2.C2_PEDIDOCHAR(06)  
 StatusOrderType

Order status

Estado da ordem

Prevista/Aberta = 1

Iniciada = 6

Encerrada Parcial/Total

= 7

Ociosa = 9

CHAR(01)TBLInWOHD.StatusSMALLINT
 WarehouseCodeDeposit CodeCódigo DepósitoSC2.C2_LOCALCHAR(02)

 

TBLInWOHD.AuxCode1CHAR(20)
 EndOrderDateTimeData Fim Ordem Produção CPSC2.C2_DATPRFDATETBLInWOHD.DtPlanEndDATETIME
 StartOrderDateTimeCP Production Order Start DateData Início Ordem Produção CPSC2.C2_DATPRIDATETBLInWOHD.DtPlanStartDATETIME
 AbbreviationProviderNameNome ClienteSC5.C5_CLIENTE ( SA1.A1_NOME)CHAR(30)  
 ScriptCodeScript CodeCódigo RoteiroSC2.C2_ROTEIROCHAR(02)  

ListOfActivityOrders

 ReportOrderType

 

Tipo de Reporte

1 = Ordem; 2 = Operações; 3 = Ponto Controle; 4 = Item

 

CHAR(01)  

ProductionOrderNumber

ListOfActivityOrders      
 ProductionOrderNumberOrdem de Produção

SC2.C2_NUM + SC2.C2_ITEM +

SC2.C2_SEQUEN

CHAR(20)

 

TBLInWoDet.Wocode

CHAR(10)

 ActivityIDID do RegistroRECNO (SG2,SHY ou SH8)CHAR(10)  
 ActivityCodeOperation CodeCódigo Operação

SG2.G2_OPERAC

SHY.HY_OPERAC

SH8.H8_OPER

CHAR(02)

 

TBLInWoDet.WODetCode+Split

 CHAR(10)

 ActivityDescriptionDescrição OperaçãoSG2.G2_DESCRICHAR(40)

 

TBLInWoDet.WODetName

CHAR(30)

 SplitDesdobramento da operaçãoSH8.H8_DESDOBRCHAR(04)  
 ItemCodeCódigo do item

SC2.C2_PRODUTO

CHAR(15)  
 ItemDescriptionDescrição do itemSB1.B1_DESCCHAR(40)  
 ActivityTypeTipo Operação1 - Aponta ; 2-Não ApontaCHAR(01)  
 WorkCenterCodeWork Center CodeCódigo Centro de Trabalho

SG2.G2_CTRAB

SHY.HY_CTRAB

SH8.H8_CTRAB

CHAR(06)

 

TLBInWODet.ManagerGrpCode CHAR(15)
 WorkCenterDescriptionDescrição Centro de TrabalhoSHB.HB_NOMECHAR(30)  
 UnitTimeTypeTime Unit TypeTipo Unidade Tempo1 - HoursHoras; 2 - MinutesMinutos; 3- Seconds Segundos; 4 - DaysDiasCHAR(01)TLBInWODet.StdSpeedFormat TINYINT
 TimeResourceTempo Recurso (Tempo padrão para um lote)SG2.G2_TEMPADDEC(05,2)

 

TLBInWODet.StdSpeed DEC(28,23)
 TimeMachineMachine Time (Time to do all orderTempo Máquina (Tempo para fazer toda a ordem)

SG2.G2_TEMPAD * SC2.C2_QUANT

SHY.HY_TEMPO TEMPO 

SH8.H8_HRINI - SH8.H8_HRFIM

DEC(14,4)

 

TLBInWODet.StdSpeed

DEC(28,23)
 TimeSetupTempo Preparação

SG2.G2_SETUP

SHY.HY_TEMPOS

SH8.H8_SETUP

DEC(15,4)TLBInWODet.SetUpTimeINT
 TimeMODTempo Homen--   
 TimeIndMESIindicador de tempo no MES1 = Tempo Máquina; 2 = Tempo mão-de-obra; 3 = Escolha pelo MES.CHAR(01)  
 ScriptCodeCódigo Roteiro

ScriptCode

Script Code

SG2.G2_CODIGO

SHY.HY_ROTEIRO

SH8.H8_ROTEIRO

CHAR(02)  
 LaborCodeCódigo Mão de Obra DiretaMOD+CCCHAR(08)  
 UnitItemNumberLote PadrãoSG2.G2_LOTEPADNUM(05)

 

TLBInWODet.StdSpeedDEC(28,23)
 IsActivityEnd

Last Operation

Última Operação

Na última operação passar TRUE.

Nas demais FALSE.

BOOLEANTLBInWODet.ReportTrigger

TINYINT

 MachineCodeMachine CodeCódigo Máquina

SG2_RECURSO

SHY_RECURSO

H8_RECURSO

CHAR(06)  
 StartPlanDateTimeData/Hora Início Programação

SHY.HY_HORAINI

SC2.C2_DATPRI

SH8.H8_DTINI

DATETLBInWODet.StartPlanDateTimeDATETIME
 EndPlanDateTimeSchedule End Date/TimeData/Hora Fim Programação

SHY.HY_HORAFIM

SC2.C2_DATPRF

SH8.H8_DTFIM

DATETLBInWODet.EndPlanDateTimeDATETIME
 ProductionQuantityQuantidade a produzir na operação

SHY.HY_QUANT 

SH8.H8_QUANT 

SC2.C2_QUANT

DEC(12,2)TLBInWODet.Qty DEC(19,4)
 

ProductionQuantity

ActivityQuantityQuantidade da operação

SHY.HY_QUANT 

SH8.H8_QUANT 

SC2.C2_QUANT

DEC(12,2)  
 UnitActivityCodeUnidade de medidaSB1.B1_UMCHAR(02)

 

TLBInWODet.Unit1CodeCHAR(5)
 SecondUnitActivityCodeSegunda unidade de medida na operação-- 

 

TLBInWODet.Unit2CodeCHAR(5)
 SecondUnitActivityFactorFator de conversão para segunda un. na operação-- 

 

 

TLBInWODet.Unit2Factor DEC(8,4)
 ResourceQuantityQuantidade de recursos

SG2.G2_MAOOBRA

SHY.HY_MAOOBRA

NUM(03)  
ListOfMaterialOrders      
 ProductionOrderNumberOrdem de produção

SC2.C2_NUM + SC2.C2_ITEM +

SC2.C2_SEQUEN

CHAR(20)

 

TBLInBillMat.WocodeCHAR(41)
 MaterialIDID do registro da reservaSD4.R_E_C_N_O_CHAR(10)  
 MaterialCodeReservation Código Item CodeReservaSD4.D4_CODCHAR(15)

 

TBLInBillMat.ProductCodeCHAR(20)
 MaterialDescriptionDescrição do ItemSB1.B1_DESCCHAR(40)  
 ScriptCodeScript CodeCódigo RoteiroSD4.D4_ROTEIROCHAR(02)  
 ActivityCodeCódigo OperaçãoSD4.D4_OPERACCHAR(02)

 

TBLInBillMat.WODetCodeCHAR(10)
 WarehouseCodeDeposit CodeCódigo DepósitoSD4.D4_LOCALCHAR(02)

 

TBLInBillMat.ExtCodeCHAR(20)
 MaterialDateData ReservaSD4.D4_DATADATE  
 MaterialQuantityReservation QuantityQuantidade ReservaSD4.D4_QUANTDEC(12,2)

 

TBLInBillMat.TotalQtyDEC(19,4)
 LotCodeLoteSD4.D4_LOTECTLCHAR(10)  
 PertMaterialNumberSequência do itemSD4.D4_TRTCHAR(03)  
 RequestTypeTipo da RequisiçãoSB1.B1_APROPRICHAR(01)

 

 

TBLInBillMat.CommentsCHAR(500)
(mais)ListOfAllocatedMaterial

 

      
 WarehouseCodeCódigo DepósitoSD4.D4_LOCALCHAR(02)

 

TBLInMovMat.WarehouseCodeCHAR(15)
 LotCodeCódigo Lote

SD4.D4_LOTECTL

SDC.DC_LOTECTL

CHAR(10)

 

TBLInMovMat.LotCodeCHAR(41)
 LocationCodeLocalização/EndereçoSDC.DC_LOCALIZCHAR(15)

 

TBLInMovMat.AddressCodeCHAR(15)
 ActivityCodeCódigo OperaçãoSD4.D4_OPERACCHAR(02)

 

TBLInMovMat.WoDetCodeCHAR(10)
 ScriptCodeCódigo RoteiroSD4.D4_ROTEIROCHAR(02)  
 AllocationQuantityQuantidade Alocada

SD4.D4_QUANT 

SDC.DC_QUANT

DEC(12,2)

 

TBLInMovMat.Qty DEC(19,4)
 AllocationTypeTipo Alocação

1 =

Soma;2=

Diminui;3=

Valor Absoluto

CHAR(01)TBLInMovMat.AllocationTypeINT
 SubLoteCodeSub Lote

SD4.D4_NUMLOTE

SDC.DC_NUMLOTE

CHAR(06)  
 NumberSeriesNúmero de SerieSDC.DC_NUMSERICHAR(20)  
 LotDueDateData de ValidadeSD4.D4_DTVALIDDATETBLInMovMat.LotDtValidityDATETIME
ListOfQuotaActivity      
 ProductionOrderNumberNúmero Ordem ProduçãoCY9.CY9_NRORPOCHAR(20)  
 ControlTypeSeleção Split--   
 ActivityIDID OperaçãoCY9.CY9_CDATCHAR(10)  
 ItemCodeCódigo do itenCYY.CYY_CDACCHAR(15)  
 ItemDescriptionDescrição do itemCYY.CYY_DSACCHAR(40)  
 StartActivityDateTimeData/Hora Início AtividadeCYY.CYY_DTBGAT / CYY.CYY_HRBGATDATETIMETBLInWODet.StartPlanDateTimeDATETIME
 EndActivityDateTimeData/Hora Fim AtividadeCYY.CYY_DTEDAT / CYY.CYY_HREDATDATETIME TBLInWODet.EndPlanDateTimeDATETIME
 ApprovedQuantityQuantidade AprovadaCYY.CYY_QTATAPDEC(13,4)  
 ScrapQuantityQuantidade RefugadaCYY.CYY_QTATRFDEC(13,4)  
 MachineCodeCódigo MáquinaCYY.CYY_CDMQCHAR(20)

 

TBLInWODet.ResourceCodeCHAR(15)
 MachineDescriptionDescrição da MáquinaCYY.CYY_DSMQCHAR(40)  
 ActivityQuantityQuantidade PrevistaCYY.CYY_QTATDEC(12,4)

 

TBLInWODet.QTYDEC(19,4)
 StandardSetupTempo Padrão PreparaçãoCYY.CYY_QTPASUNUM(10)  
 StandardActivityTempo Padrão OperaçãoCYY.CYY_QTPAATNUM(10)  
 StandardPostprocessingTempo Padrão Pós_processoCYY.CYY_QTPAPPNUM(10)  
 StandardMachineTempo Padrão MáquinaCYY.CYY_QTPAMQNUM(10)  
 StandardOperatorTempo Padrão MODCYY.CYY_QTPAOENUM(10)  
 UsedCapacityCapacidade UtilizadaCYY.CYY_QTVMATDEC(12,4)  
 ActivityTimeQuantityHora Disponível AtividadeCYY.CYY_HRDICHAR(08)  
 ReportQuantityQuantidade ReportadaCYY.CYY_QTATRPDEC(13,4)  
 ReworkQuantityQuantidade RetrabalhadaCYY.CYY_QTATRTDEC(12,4)  
 StartSetupDateTimeData/Hora Início PreparaçãoCYY.CYY_DTBGSU / CYY.CYY_HRBGSUDATETIME  
 EndSetupDateTimeData/Hora Fim PreparaçãoCYY.CYY_DTEDSU / CYY.CYY_HREDSUDATETIME  
 TimeSetupTempo PreparaçãoCY9.CY9_QTTESUNUM(10)TBLInWODet.SetUpTimeTINYINT
 TimeMachineTempo MáquinaCY9.CY9_QTTEMQNUM(10)

 

TBLInWODet.StdSpeedDEC(28,23)
 TimeOperatorTempo MODCY9.CY9_QTTERCNUM(10)  
 TimePostprocessingTempo Pós ProcessoCY9.CY9_QTTEPPNUM(10)  
 QuotaActivityIDID SplitCYY.CYY_IDATQOCHAR(05)

 

ActivityCode+

TBLInWODet.WODetCode
CHAR(10)
 WorkCenterCodeCentro de TrabalhoCY9.CY9_CDCETRCHAR(10)

 

TBLInWODet.ManagerGrpCodeCHAR(15)
 ReportedSplitSplit ReportadoCYY.CYY_LGQORPBOOELAN  
 StatusActivityTypeEstado OperaçãoCYY.CYY_TPSTATCHAR(01)  
(mais) ListOfQuotaActivityTools      
 ToolCodeFerramentaCYY.CYY_CDFECHAR(20)  
 ToolQuantityQuantidade FerramentaCYY.CYY_QTFENUM(03)  
Nota
titleNota:
    • The tags not used by PCP Protheus x PC-Factory integration, even in messages, described in Schema of TOTVS Single Message are not mentioned in this document.
    • The tag Type (Order Type) is generated with value "1" - Internal Order.
    • The tag RequestType (Request Type) identifies if the request can be done separately from the production report, according to rule below:
      If parameter MV_REQAUT has 'D' the DIRECT materials are entered and the INDIRECT are automatically loaded;
      If parameter MV_REQAUT has 'A' the consumption of materials is executed in all components;
      This tag has the following values: 1-Direct, 2-Indirect.
    • The tag Allocation Type (Allocation Type) is generated with value "3" - Absolute Order.
    • The session ListOfAllocatedMaterial follows some rules for allocation: 
      If item controls address and did not generate SBC it does not generate data from list  ListOfAllocatedMaterial (verificar only when parameter MV_LOCALIZ = S);
      If item controls trace and did not generate the batch in SD4,  it does not generate data from list ListOfAllocatedMaterial;
      If item does not control address or batch, it must generate data from list  ListOfAllocatedMaterial based on SD4.
    • The tags of operations os session order ListOfActivityOrders can have different origin according to parameterization or executed routines. If you execute the machine MATA690, table SH8 is used. When parameter MV_PCPATOR has 'S', table SHY is used. If parameter MV_PCPATOR has 'N', table SG2 is used. 
    • The tag Split of session ListOfActivityOrders is generated when there is unfolding of operation in several resources. Generated when using Shop Floor.
    • The tag ActivityType (Operation Type) is generated with value '1' - Register;
    • The tag UnitTimeType (Unit Measure Type) is generated with value '1' - Time;
    • The tag UnitItemNumber is used to register the standard batch of operation production.
    • For PC-Factory, indicate in which operation the component is consumed. When component x operation concept is not used, link components in last operation.
    • The tag TimeMachine (Machine Time) indicates time for production order.
      By using parameter MV_PCPATOR the time is SHY.HY_TEMPOM.
      When machine load is used, use the difference between SH8.H8_HRINI and SH8.H8_HRFIM.
      The time can have variation according to Operation Type (when it is not in SHY):
      Operation Type 1 Regular: Apply the batch time the quantity of order. Which are: (SG2.G2_TEMPAD / SG2.G2_LOTEPAD) * SC2.C2_QUANT) / SH1.H1_MAOOBRA. Note: If time and lot are zero, consider 1.
      Operation Type 2 Fixed and 3 Unlimited: Regardless of amount, the time is the same. Which are: SG2.G2_TEMPAD. Note: If zero delivers 1.
      Operation Type 4 Minimum Time: Considers the multiple quantity of batch. Example: Lot = 10. Time = 5. Order Amt. = 7. It must consider time to make 10 spare parts. The same calculation is type 1 Regular.
      Another point to consider is the PC-Factory waits time in Centesimal. When parameter MV_TPHR is other than 'C', time is converted to centesimal.
    • The tag TimeResource (Resource Time) indicates tiem to make standard batch.
    • The tag LaborCode (Labor Code) is indicated by 'MOD' + Cost Center.
    • The session ListOfQuotaActivity is generated only when Shop Floor is active.
    • The tag StatusActivityType has the following values: 1=Not Started;2=Programmed;3=Released;4=Started;5=Finished;6=Suspended

Processes

Production Annotation Transaction: ProductionAppointment_1_001.xsd
Message Identifier: ProductionAppointment
Version: 1_001
Protheus Module: SIGAPCP/SIGASFC
Sending Type: Synchronous 

Nota
titleNota:

This message is generated by PC-Factory and sent to Protheus.

 

    • O co-produto será enviado ao PC-Factory na ListOfMaterialOrders, tag MaterialQuantity, e na ListOfAllocatedMaterial, tag AllocationQuantity (quando existir) com quantidade negativa. O PC-Factory deverá enviar ao Protheus na mensagem de apontamento ProductionAppointment na SupplyOrder a tag UsedQuantity com quantidade negativa, com isso o ERP entenderá que se trata de uma entrada de co-produto no estoque. O tipo de movimento para co-produto, será cadastrado no PCPA109 e deverá ter um conteúdo menor que 500 por se tratar de uma entrada e também deve ser do tipo de DEVOLUÇÃO e o campo Atualiza Empenho deve estar como sim (rotina MATA230).
    •  A tag TimeIndMES deve ser gerada como '3'. 


Processes

Production Annotation Transaction: ProductionAppointment_2_000.xsd
Message Identifier: ProductionAppointment
Version: 2_003
Protheus Module: SIGAPCP/SIGASFC
Sending Type: Synchronous 

Nota
titleNota:

This message is generated by PC-Factory and sent to Protheus.


  Operation Product  Scrap Quantity Reworked QuantitySetup Start Date/TimeSetup End Date/TimeSetup CodeOperation TimeShift Model CodeShift Number  Document Document SeriesReport Start Date/Time    Annotation Reversal or or   Report DateTime   LotSeries   Closes OperationLocationWasteAppointmentCY0.CY0_CDRF02  CY0.CY0_DSRF40ScrapQuantityCY0.CY0_QTRF112ResourceAppointmentOperatorCodeCYW.CYW_CDOE20 DATETIMENUM(10Over timeNUMWorking TimeNUM(10Shift Model Code08ProductionShiftNumberCYW.CYW_NRTN05SupplyOrder   CZP.CZP_NRORPOCZP.CZP_CDMT15UsedQuantityUsed QuantitySD3D3QUANTDEC(12,2WarehouseCodeDeposit CodeSD3D3LOCALCZP.CZP_CDDP02LocationCodeLocationSD3D3LOCALIZCHAR(15)CHAR(20ActivityCodeOperation CodeScriptCodeScriptCZPCZPCDRT02 Tool CodeCZ0CZ0IDFE
MensagemTagDescrição

Tabela/Campo

Protheus PCP

Tabela Campo

Protheus SFC

TipoTabela/Campo: PC-FactoryTipo
BusinessContentTypeMachineCodeMáquinaSH6.H6_RECURSOCYV.CYV_CDMQCHAR(06)TBLOutInteg.ResourceCodeCHAR(15)
 ProductionOrderNumberOrdem de ProduçãoSH6.H6_OPCYV.CYV_NRORPOCHAR(20)TBLOutInteg.WOCodeCHAR(41)
 ActivityCodeOperaçãoSH6.H6_

Message

Tag

Description

Table/Field

Protheus PCP

Table Field

Protheus SFC

Type

Table/Field: PC-Factory

Type

BusinessContentType

MachineCode

Machine

SH6.H6_RECURSO

CYV.CYV_CDMQ

CHAR(06)

 

 

 

ProductionOrderNumber

Production Order

SH6.H6_OP

CYV.CYV_NRORPO

CHAR(20)

 

 

 

ActivityCode

Operation

SH6.H6_OPERACCYV.CYV_CDATCHAR(02)

 

TBLOutInteg.WODetCodeCHAR(10)
 SplitSplitSH6.H6_DESDOBRCYV.CYV_IDATQOCHAR(04)

 

TBLOutInteg.WODetCodeCHAR(10)
 ActivityIDID Operação----   
 ItemCodeProdutoSH6.H6_PRODUTOCYV.CYV_CDACRPCHAR(15)

 

TBLOutInteg.ProductCodeCHAR(20)
 ApprovedQuantityApproved QuantityQuantidade AprovadaSH6.H6_QTDPRODCYV.CYV_QTATAPDEC(11,2)

 

TBLOutInteg.QtyDEC(19,4)
 ScrapQuantityQuantidade RefugadaSH6.H6_QTDPERDCYV.CYV_QTATRFDEC(11,2)

 

TBLOutInteg.QtyDEC(19,4)
 ReworkQuantityQuantidade Retrabalhada----   
 StartSetupDateTimeData/Hora Início Preparação--

CYV_DTBGSU

CYV_HRBGSU

DATETIME  
 EndSetupDateTimeData/Hora Fim Preparação--

CYV_DTEDSU

CYV_HREDSU

DATETIME  
 SetupCodeCódigo Preparação--CYV_CDSUCHAR(10)  
 OpTimeIntTempo Operação--CYV.CYV_QTTERPNUM(10)  
 ProductionShiftCodeCódigo Modelo Turno--CYV.CYV_CDTNCHAR(08)  
 ProductionShiftNumberNúmero Turno--CYV.CYV_NRTNCHAR(05)TBLOutInteg.ShiftSMALLINT
 DocumentCodeDocumento--CYV.CYV_NRDOCHAR(20)

 

TBLOutInteg.DocNumberCHAR(20)
 DocumentSeriesSérie Documento--CYV.CYV_NRSRCHAR(05)  
 StartReportDateTimeData/Hora Início Reporte

SH6.H6_DATAINI

SH6.H6_HORAINI

CYV.CYV_DTRPBG

CYV.CYV_HRRPBG

DATETIMETBLMSGERP.StartDATETIME
 EndReportDateTimeReport End Date/TimeData/Hora Fim Reporte

SH6.H6_DATAFIN

SH6.H6_HORAFIN

CYV.CYV_DTRPED

CYV.CYV_HRRPED

DATETIMETBLMSGERP.EndDATETIME
 ReversedReportEstorno do ApontamentoTRUE ou FALSETRUE ou FALSEBOOLEAN  
 ReversalDateReversal DateData do estorno--CYV.CYV_DTEODATETBLOutInteg.DTEvDATETIME
 ReportDateTimeData/Hora ReporteSH6.H6_DTAPONT

CYV.CYV_DTRP

CYV.CYV_HRRP

DATETIMETBLOutInteg.DtEvDATETIME
 WarehouseCodeDeposit CodeCódigo DepósitoSH6.H6_LOCALCYV.CYV_CDDPCHAR(02)

 

TBLOutInteg.WarehouseCodeCHAR(15)
 LotCodeLote/SérieSH6.H6_LOTECTLCYV.CYV_CDLOSRCHAR(10)

 

TBLOutInteg.LotCodeCHAR(41)
 LotDueDateLot Validity DateData Validade LoteSH6.H6_DTVALIDCYV.CYV_DTVDLODATE

TBLLot.DtValidity

DATETIME
 

IntegrationReport

Record to be reversed

 

 

CHAR(10)

 

 

 

CloseOperation

CloseOperationEncerra OperaçãoSH6.H6_PTCYV.CYV_LGEDRPBOOLEAN  
 LocationCodeLocalização--CYV.CYV_CDLCCHAR(20)

 

 

TBLOutInteg.Address1CodeCHAR(15)
ListOfReversalAppointments       
 

WasteCode

Waste Code

SBC.BC_MOTIVO

IntegrationReportRegistro a ser estornado  CHAR(10)TBLOutInteg.TransacTypeTINYINT
 

WasteDescription

Waste Description

SBC.BC_DESCRI

ReversalTypeTipo do Estorno  CHAR(01)  
 ReversalQuantity

Scrap Quantity

SBC.BC_QUANT

Quantidade revertida-- DEC(18,4)  
WasteAppointment       
 WasteCode

Operator Code

--

Código Refugo

SBC.BC_MOTIVO

CY0.CY0_CDRFCHAR(02)

 

TBLOutInteg.ScrapCodeCHAR(15)
 

StartDateTime

Start Date/Time

--

CYW.CYW_DTBGRP

CYW.CYW_HRBGRP

WasteDescriptionDescrição Refugo

SBC.BC_DESCRI

CY0.CY0_DSRFCHAR(40)  
 

EndDateTime

End Date/Time

--

CYW.CYW_DTEDRP

CYW.CYW_HREDRP

DATETIME

 

 

 

MOBTime

Direct Labor Time

--

CYW.CYW_QTTEOE

ScrapQuantityQuantidade Refugada

SBC.BC_QUANT

CY0.CY0_QTRFDEC(11,2)TBLOutInteg.QtyDEC(18,4)
 ScrapProductProduto RefugadoSBC.BC_PRODUTO--CHAR(15)  
 WareHouseCode

ExtraTime

Depósito Produto RefugadoSBC.BC_LOCORIG--

CYW.CYW_QTTEEX

CHAR(10)  
 ScrapProductTo

UtilTime

Refugo GeradoSBC.BC_CODDEST--

CYW.CYW_QTTEUT

CHAR(15)  
 

ProductionShiftCode

WareHouseCodeToDepósito do Refugo geradoSBC.BC_LOCAL--

CYW.CYW_CDTN

CHAR(10)  
 AdressCode

Shift Number

--

Endereço OrigemSBC.BC_LOCALIZ CHAR(15)  
 AdressCodeTo

 

Endereço DestinoSBC.BC_LOCDEST CHAR(15)  
 

ProductionOrderNumber

Production Order Number

SD3.D3_OP

NumberSeriesNúmero de SérieSBC.BC_NUMSERI CHAR(20)  
 

MaterialCode

Reservation Item Code

SD3.D3_COD

NumberSeriesToNúmero de Série DestinoSBC.BC_NSEDEST CHAR(20)  
 LotCodeLoteSBC.BC_

CZP.CZP_QTRPPO

LOTECTL CHAR(10)  
 SubLoteCodeSub LoteSBC.BC_NUMLOTE CHAR(06)  
 LotDueDateData de ValidadeSBC.BC_

CZP.CZP_CDLC

DTVALID DATE  
 

LotCode

Lot/Series

SD3.D3_LOTECTL

or

SD3.D3_NUMSERI

CZP.CZP_CDLO

CostCenterCodeCentro de CustoSBC.BC_CC CHAR(09)  
ResourceAppointment   

--

CZP.CZP_CDAT

CHAR(02)

    
 OperatorCodeCódigo Operador--CYW.CYW_CDOECHAR(20)TBLOutInteg.UserCodeCHAR(30)
 

ReportToolActivity

 

 

 

 

 

 

 

StartDateTimeData/Hora Início--

CYW.CYW_DTBGRP

CYW.CYW_HRBGRP

DATETIMETBLMSGERP.StartDATETIME
 EndDateTimeData/Hora Fim

 

ToolCode

--

CYW.

CYW_

CHAR(20)

 

 

Nota
titleNota:
    • The default annotation for this integration is MATA681.
    • The fields Machine, Production Order, Operation, Product and Date/Time Report are mandatory.
    • If Report Date/Time is earlier than the current date, the system uses the current Date/Time, that is, date and time the integration is being processed.
    • If the deposit code field is without completion, use the default location of item register(SB1.B1_LOCPAD).
    • The field CloseOperation indicates whether the annotation is TOTAL or PARTIAL. If you send true, it must be T=total. If false, it is considered as P=Partial. 
      The following rule is used to finish the order/production in Protheus is used.
      Close OPERATION: The following TAGS must be entered: ProductionOrderNumber, ActivityCode, CloseOperation (TRUE when TOTAL annotation or closed/finished operation), ReportDateTime. The other quantity fields(ApprovedQuantity and ScrapQuantity) and date/time start/end (StartReportDateTime and EndReportDateTime) must be passed without value (blank)
      Close ORDER: Annotation of quantity in the last operation with tag CloseOperation = TRUE.
    • Every annotation must send a return message, indicating possible problems or processing performed with success. 
      In case of success, the number of annotation is sent to Pc-Factory in the return message of ProductionAnnotation and corresponds to RECNO of SH6. This same number is used when a reverse must be registered(IntegrationReport).
    • The reversal when the field ReversedReport (Annotation Reversal) with content TRUE.
      When is reversal, it must have  the number of annotation, field IntegrationReport. 
    • The reversal can be generated in two ways in the file: only reversal or reversal + annotation. 
      Only reversal: it has approved quantity and zeroed scrap (or without content) and ReversedReport data.
      Reversal + annotation: with ReversedReport indicated and order data and quantity approved or scrap than zero.
    • The field SH6.H6_OBSERVA = 'TOTVSMES' is automatically registered to indicate the record was generated through TOTVSMES integration.
    • The system PC-Factory uses the format of hours with HH:MM:SS. For PCP Protheus, only HH:MM is considered. Annotation with time lower than 1 minute is rejected.
    • Import respects parameters defined in routines MATA681 through function F12 for user "admin".
    • As in PC-Factory, the operation can be issued later to the annotation, the following rule is used:
      The following TAGS must be entered:
      ProductionOrderNumber: Production Order 
      ActivityCode: Operation 
      CloseOperation: True or False. If TRUE when TOTAL annotation or closed/finalized operation. False in case of PARTIAL operation. 
      ReportDateTime: Annotation date.
    • The other quantity fields(ApprovedQuantity and ScrapQuantity) and date/time start/end (StartReportDateTime and EndReportDateTime) must be passed without value (blank)
    • The integration follows the rules and triggers defined by customers. Example: The start and end date/time are not mandatory, but the customer can define the obligatoriness through dictionary making tags to be filled out.
    • If is integrated to Shop Floor SIGASFC, it must save tables in this system. The base will be the process of Annotation Model 2, SFCA316

Consumption notes of components:

  • The consumption of components must follow the parameterization of PCPA109. In parameters routine is defined how the treatment of components consumption:
    1 - BackFlush: Whenever issue of components is executed according to what is defined in Engineering. Disregard the list of consumption SupplyOrder.
    2 - Actual Consumption: It consumes according to the list of components SupplyOrder sent in message.
  • In the consumption of components, the process must follow this rule, according to parameterization:
    If parameter MV_REQAUT is 'D' the DIRECT materials are entered and the INDIRECT are automatically loaded. To load the Indirects the type of movement must have field Ind Approp as O in routine MATA230.
    If parameter MV_REQAUT is 'A', the consumption of materials is executed for all components.
  • It must consider the movement type of register of parameters PCPA109, folder MOVEMENTS. If input, use field OE_VAR1. If output, use field OE_VAR2. When Shop Floor is used, it must use movements parameterized in SIGASFC (MV_SFRQMB and MV_TMPAD).
  • In PC Factory, batch and number of series are not used at the same time. O retorno desse conteúdo será via tag SupplyOrder - LotCode, que pode ser o Lote ou número de série, conforme o cadastro do item.

 

Shop Floor Notes

  • Quantity reported  CYV_QTATRP, sum of quantity approved and rejected.
  • Start and End Date/Time and code of Preparation despite being virtual, if machine demands setup (CYB_LGUSU) must send tags SetupCode, StartSetupDateTime and EndSetupDateTime.
  • If document, tag DocumentCode, is blank, the production order number is saved.
  • The fields Reservation Date 'CZP_DTMT' must receive the content of table CYP.CYP_DTMT 
    The reservation quantity 'CZP_QTMT' must receive the content of table  CYP.CYP_QTMT
    State 'CZP_TPST' must receive content of table CYP.CYP_TPST 
  • The operation unit time, CZ0_QTTEUN, must be generated according to rule SFCA314

 

Scrap Notes

  • Register scrap reason (tags of ListOfWasteAppointments), updating data from table SBC
  • If reason of scrap is not registered, it is added to reasons register of table SX5. 
    Where:  
    Code of reason is X5_CHAVE
    Table of reason is '44'. 
    For Shop Floor, table - CY0 must be generated.
  • Scrap reasons have different sizes in tables. Validate it if receipt code does not exceed the size of columns in Protheus.
    When it uses the PCP it must validate a SX5.X5_CHAVE and SBC.BC_MOTIVO.
    When it uses the SIGASFC validate against the CYO.CYO_CDRF, CY0.CY0_CDRF and SBC.BC_MOTIVO.

 

Machine Stoppage Annotation Transaction: StopReport_1_001.xsd StopReport_1_001.xsd

Message Identifier: StopReport
Version: 1_001
Protheus Module: SIGAPCP
Sending Type: Synchronous

Nota
titleNota:

This message is generated by PC-Factory and sent to Protheus.

Message

Tag

Description

Table/Field

Protheus PCP

Table/Field

Protheus SFC

Type

Table/Field: PC-Factory

Type

 

MachineCode

Machine Code

SH6.H6_RECURSO

CYX.CYX_CDMQ

 

 

 

 

MachineDescription

Machine Description

 

 

 

 

 

 

StopReasonCode

Stoppage Reason Code

SH6.H6_MOTIVO

CYX.CYX_CDSP

 

 

 

 

StopReasonDescription

Stoppage Reason Description

SX5.X5_DESCRI *

CYX.CYX_DSSP

 

 

 

 

StartDateTime

Start Date/Time

SH6.H6_DATAINI

SH6.H6_HORAINI

CYX.CYX_DTBGSP

CYX_HRBGSP

 

 

 

 

EndDateTime

End Date/Time

SH6.H6_DATAFIN

SH6.H6_HORAFIN

CYX.CYX_DTEDSP

CYX.CYX_HREDSP

 

 

 

 

OperatorCode

Operator Code

SH6.H6_OPERADO

CYX.CYX_CDOE

 

 

 

 

ReportDateTime

Report Date/Time

SH6.H6_DTAPONT

CYX.CYX_DTRP

 

 

 

 

ToolCode

Tool Code

-- 

CYX.CYX_CDFEPO

 

 

 

 

ProductionTeamCode

Team Code

--

CYX.CYX_CDGROE

 

 

 

 

StopType

Stop Type (1=Not Programmed;2=Programmed)

--

CYX.CYX_TPSP

 

 

 

 

ReportSequence

ID PC-Factory

--

--

 

 

 

Nota
titleNota:
  • The annotation of standard stoppage for this integration is MATA682 in PCP and in Shop Floor the routine is SFCA311.
  • The fields Machine,Stoppage Reason, Start and End Date/Time and Report Date/Time are mandatory.
  • If Report Date/Time is earlier than the current date, the system uses the current Date/Time, that is, date and time the integration is being processed.
  • Stoppage annotation sets SH6.H6_TIPO = 'I'.
  • Product must be labor. Generated by system. Example: SH6.H6_PRODUTO = MOD001
  • The quantity loss is generated by the system. SH6.H6_QTDPERD.
  • The field SH6.H6_IDENT is also generated by the system.
  • The field SH6.H6_TEMPO must be calculated by adapter. It must be the stoppage total time.
  • Stoppage Reason:
    The reason can be registered through integration. It must check the stoppage reason is registered. If not, you must add the reason used in annotation in table SX5.
    Where:
    Code of reason is X5_CHAVE
    Table of reason is '44'.
    For Shop Floor, table - CYN must be generated.
  • Every annotation must send a return message, indicating possible problems or processing performed with success. 
  • In case of success, the number of annotation is sent to PV-Factory in the return message of StopReport and corresponds to RECNO of SH6. This same number is used when a reverse must be registered(IntegrationReport).
  • The reversal when the field ReversedReport (Annotation Reversal) with content TRUE.
    When is reversal, it must have  the number of annotation, field IntegrationReport.
  • The reversal can be generated in two ways in the file: only reversal or reversal + annotation. When the message has the reversal and the annotation only can commit the movements when both are concluded.
    To identify whether the message only has reversal or reversal + annotation, the following status must be checked:
    Only reversal: it only has the information of ReverseReport and IntegrationReport with other tags without data. 
    Reversal + annotation: has ReversedReport and IntegrationReport entered and the other mandatory data (Machine, Stoppage Reason, Start and End Date/Time and Report Date/Time) filled out.
  • The field SH6.H6_OBSERVA = 'PPI' is automatically registered to indicate the record was generated through PCP Protheus x PC-Factory.
  • The system PC-Factory uses the format of hours with HH:MM:SS. For PCP Protheus, only HH:MM is considered. Annotation with time lower than 1 minute is rejected.
  • The field ReportSequence is used to register ID of table registering the stoppage information. It must be used in MATI681CRG entry point.
  • Shift model and number is automatically generated by routine SFCA311. Only when using Shop Floor.
  • If message does not send StopType, it is considered as 2= Not Scheduled. Only when using Shop Floor.
  • Stoppage reasons have different sizes in tables. Validate it if receipt code does not exceed the size of columns in Protheus.
    When it uses the PCP it must validate SX5.X5_CHAVE and SBC.BC_MOTIVO.
    When it uses the SIGASFC validate against the CYO.CYO_CDSF, CY0.CY0_CDSP and SH6.H6_MOTIVO. 

 

Transaction Balance in Stock - Request: StockLevel_2_000.xsd
Message Identifier: StockLevel
Version: 2_000
Protheus Module: SIGAPCP
Sending Type: Synchronous

 

For this type of updating the PC Factory requests balance to Protheus. Message has two parts. Request, in which parameters for balance query and the Return, which has the balance return, are displayed.

This Request is generated by PC-Factory and sent to Protheus. This Return is generated by Protheus to PC-Factory.

 

Request

Message

Tag

Description

Type

ListOfRequest

ItemInternalId

Product code

CHAR(15)

 

ReferenceCode

Reference

CHAR(20)

 

WarehouseInternalId

Code of deposit/stock location/Warehouse

CHAR(10)

 

LotNumber

Lot

CHAR(10)

 

SubLotCode

Sub-lot

CHAR(10)

 

SerialNumber

Serial Number

CHAR(20)

 

Address

Location

CHAR(15)

 

LotExpirationDate

Expiration Date

DATE

Nota
titleNota:
    • The search can happen as follows:
      Per Product: It returns information of all location of product stock.
      By Stock Location (Warehouse): It returns information of all products in stock location.
    • By Stock Location (Warehouse) and Product: It returns information on Product of Stock Location defined.
      For other fields, Batch, Sub-Batch, series number, location and validity date consider only if you enter product code. If you send these fields without the product code, it must return error message.
    • The Request may be a request list.

Return

Message

Tag

Description

Table/Field

Type

ReturnContentType

ClosingStockDate

Stock closing date

--

 

ListOfReturnItem

CompanyId

Company

 

 

 

BranchId

Branch

 

 

 

CompanyInternalId

Company+Branch

 

 

 

ItemInternalId

Product code

SB2.B2_COD

CHAR(15)

 

ReferenceCode

Referencia

--

 

 ListOfStockBalance

 

 

 

 

 

WarehouseInternalId

Location of Stock (Warehouse/Deposit)

SB2.B2_LOCAL

CHAR(10)

 

LotNumber

Lot Number

SB8.B8_LOTECTL 

CHAR(10)

 

SubLotCode

Sub-lot

SB8.B8_NUMLOTE

CHAR(10)

 

LotExpirationDate

Expiration date

SB8.B8_DTVALID

DATE

 

SerialNumber

Serial number

SBF.BF_NUMSERI 

CHAR(20)

 

Address

Location

SBF.BF_LOCALIZ

CHAR(15)

 

CurrentStockAmount

Product balance in quantity

SB2.B2_QATU

SB8.B8_SALDO

SBF.BF_QUANT

DEC(17,4)

 

BookedStockAmount

Amount reserved in Stock

SB2.B2_RESERVA

SB8.B8_EMPENHO

SBF.BF_EMPENHO

DEC(17,4)

 

AvailableStockAmount

Available balance of the Product in quantity

SB2.B2_QATU - SB2.B2_RESERVA

SB8.B8_SALDO - SB8.B8_EMPENHO

SBF.BF_QUANT - SBF.BF_EMPENHO

DEC(17,4)

 

UnitItemCost

Product unit price

--

 

 

AverageUnitItemCost

Product average price

--

 

 

ValueOfCurrentStockAmount

Current balance of product stock in value

--

 

 

Stock Movement Transactions:  MovementsInternal_1_001.xsd 
Message Identifier: MovementsInternal
Version: 1_001
Protheus Module: SIGAPCP
Sending Type: Synchronous

Note: This message is generated by PC-Factory and sent to Protheus.

 

DTEDRP

CYW.CYW_HREDRP

DATETIMETBLMSGERP.EndDATETIME
 MOBTimeTempo Mão de Obra Direta--CYW.CYW_QTTEOENUM(10)  
 ExtraTimeTempo Extra--CYW.CYW_QTTEEXNUM(10)  
 UtilTimeTempo Útil--CYW.CYW_QTTEUTNUM(10)  
 ProductionShiftCodeCódigo Modelo Turno--CYW.CYW_CDTNCHAR(08)  
 ProductionShiftNumberNúmero Turno--CYW.CYW_NRTNCHAR(05)TBLOutInteg.ShiftSMALLINT
SupplyOrder       
 ProductionOrderNumberNúmero Ordem ProduçãoSD3.D3_OPCZP.CZP_NRORPOCHAR(20)

TBLOutInteg.WOCode

CHAR(41)
 MaterialCodeCódigo Item ReservaSD3.D3_CODCZP.CZP_CDMTCHAR(15)TBLOutInteg.ProductCodeCHAR(20)
 UsedQuantityQuantidade UtilizadaSD3.D3_QUANTCZP.CZP_QTRPPODEC(12,2)TBLOutInteg.Qty DEC(19,4)
 WarehouseCodeCódigo DepósitoSD3.D3_LOCALCZP.CZP_CDDPCHAR(02)TBLOutInteg.WarehouseCodeCHAR(15)
 LocationCodeLocalizaçãoSD3.D3_LOCALIZCZP.CZP_CDLCCHAR(15)TBLOutInteg.Address1CodeCHAR(15)
 LotCodeLote/Série

SD3.D3_LOTECTL

ou

SD3.D3_NUMSERI

CZP.CZP_CDLOCHAR(20)TBLOutInteg.LotCodeCHAR(41)
 ActivityCodeCódigo Operação--CZP.CZP_CDATCHAR(02)TBLOutInteg.WODetCodeCHAR(10)
 ScriptCodeRoteiro--CZP.CZP_CDRTCHAR(02)  
ReportToolActivity       
 ToolCodeCódigo Ferramenta--CZ0.CZ0_IDFECHAR(20)  
Nota
titleNota:
    • The default annotation for this integration is MATA681.
    • The fields Machine, Production Order, Operation, Product and Date/Time Report are mandatory.
    • If Report Date/Time is earlier than the current date, the system uses the current Date/Time, that is, date and time the integration is being processed.
    • If the deposit code field is without completion, use the default location of item register(SB1.B1_LOCPAD).
    • The field CloseOperation indicates whether the annotation is TOTAL or PARTIAL. If you send true, it must be T=total. If false, it is considered as P=Partial. 
      The following rule is used to finish the order/production in Protheus is used.
      Close OPERATION: The following TAGS must be entered: ProductionOrderNumber, ActivityCode, CloseOperation (TRUE when TOTAL annotation or closed/finished operation), ReportDateTime. The other quantity fields(ApprovedQuantity and ScrapQuantity) and date/time start/end (StartReportDateTime and EndReportDateTime) must be passed without value (blank)
      Close ORDER: Annotation of quantity in the last operation with tag CloseOperation = TRUE. Encerrar a ORDEM: Realizar o encerramento da ordem sem necessidade de informações de apontamento no XML. Considera somente as tags ProductionOrderNumber e CloseOperation(TRUE). Sendo que, deverá verificar se tem apontamento na última operação. Deverá executar o mesmo procedimento da opção "Encerrar" do MATA681. Devendo fazer as movimentações e atualização do campo SC.C2_DATRF.
    • Every annotation must send a return message, indicating possible problems or processing performed with success. 
      In case of success, the number of annotation is sent to Pc-Factory in the return message of ProductionAnnotation and corresponds to RECNO of SH6. This same number is used when a reverse must be registered(IntegrationReport).
    • The reversal when the field ReversedReport (Annotation Reversal) with content TRUE.
      When is reversal, it must have  the number of annotation, field IntegrationReport. Poderá conter uma lista de Ids(ListOfReversalAppointments) que serão estornados. Pode estornar registros de apontamentos de produção e registros de recusa. Para isso a tag ReversalType indica qual o processo a ser executado, sendo, 1 = Produção; 2 = Recusa
    • The reversal can be generated in two ways in the file: only reversal or reversal + annotation. 
      Only reversal: it has approved quantity and zeroed scrap (or without content) and ReversedReport data.
      Reversal + annotation: with ReversedReport indicated and order data and quantity approved or scrap than zero.
    • The field SH6.H6_OBSERVA = 'TOTVSMES' is automatically registered to indicate the record was generated through TOTVSMES integration.
    • The system PC-Factory uses the format of hours with HH:MM:SS. For PCP Protheus, only HH:MM is considered. Annotation with time lower than 1 minute is rejected.
    • Import respects parameters defined in routines MATA681 through function F12 for user "admin".
    • As in PC-Factory, the operation can be issued later to the annotation, the following rule is used:
      The following TAGS must be entered:
      ProductionOrderNumber: Production Order 
      ActivityCode: Operation 
      CloseOperation: True or False. If TRUE when TOTAL annotation or closed/finalized operation. False in case of PARTIAL operation. 
      ReportDateTime: Annotation date.
    • The other quantity fields(ApprovedQuantity and ScrapQuantity) and date/time start/end (StartReportDateTime and EndReportDateTime) must be passed without value (blank)
    • The integration follows the rules and triggers defined by customers. Example: The start and end date/time are not mandatory, but the customer can define the obligatoriness through dictionary making tags to be filled out.
    • If is integrated to Shop Floor SIGASFC, it must save tables in this system. The base will be the process of Annotation Model 2, SFCA316
    • O subproduto é tratado na ListOfWasteAppointments, tags ScrapProduct e ScrapProductTo. As movimentações dependem da parametrização(F12) do MATA685, que indica se consome o produto origem ou não. Não é obrigatório digitar os produtos refugados refugo gerado. Neste caso vai registrar somente os defeitos.
      Para que o subproduto seja gerado o parâmetro MV_DIGIPER, deve estar setado como 'S'.
    • Para o Reaproveitamento, o Refugo gerado deverá ser o mesmo produto da ordem. Nesse caso o que vai mudar será somente o depósito, onde existirá um local próprio para armazenar o refugo. Esta funcionalidade é para empresas que reaproveitam o produto acabado com defeito (sem gerar subproduto) na composição de outro produto.Para este caso o depósito do refugo poderá ser parametrizado no PCPA109. As movimentações dependem da parametrização (F12) do MATA685. Se esta parametrização estiver como 'S'  a rotina irá baixar o saldo do produto/local origem e acrescentar/gerar o saldo do produto/local destino. Se estiver como 'N' só irá atualizar o saldo do produto/local destino.


Consumption notes of components:

  • The consumption of components must follow the parameterization of PCPA109. In parameters routine is defined how the treatment of components consumption:
    1 - BackFlush: Whenever issue of components is executed according to what is defined in Engineering. Disregard the list of consumption SupplyOrder.
    2 - Actual Consumption: It consumes according to the list of components SupplyOrder sent in message.
  • In the consumption of components, the process must follow this rule, according to parameterization:
    If parameter MV_REQAUT is 'D' the DIRECT materials are entered and the INDIRECT are automatically loaded. To load the Indirects the type of movement must have field Ind Approp as O in routine MATA230.
    If parameter MV_REQAUT is 'A', the consumption of materials is executed for all components.
  • It must consider the movement type of register of parameters PCPA109, folder MOVEMENTS. If input, use field OE_VAR1. If output, use field OE_VAR2. When Shop Floor is used, it must use movements parameterized in SIGASFC (MV_SFRQMB and MV_TMPAD).
  • Quando consumo real, deverá considerar o tipo de movimento do cadastro de parâmetros PCPA109, folder "Movimentos e Transferência". Para saídas usar o campo OE_VAR2. Quando usa o Chão de Fábrica, deverá usar as movimentações parametrizadas no SIGASFC (MV_SFRQMB).
  • Para o apontamento, o tipo de movimento será o que estiver no parâmetro MV_TMPAD, para o SIGAPCP e SIGASFC.
    Quando back-flush, usará os tipos de movimentos padrões da rotina.
  • In PC Factory, batch and number of series are not used at the same time. O retorno desse conteúdo será via tag SupplyOrder - LotCode, que pode ser o Lote ou número de série, conforme o cadastro do item.

 

Shop Floor Notes

  • Quantity reported  CYV_QTATRP, sum of quantity approved and rejected.
  • Start and End Date/Time and code of Preparation despite being virtual, if machine demands setup (CYB_LGUSU) must send tags SetupCode, StartSetupDateTime and EndSetupDateTime.
  • If document, tag DocumentCode, is blank, the production order number is saved.
  • The fields Reservation Date 'CZP_DTMT' must receive the content of table CYP.CYP_DTMT 
    The reservation quantity 'CZP_QTMT' must receive the content of table  CYP.CYP_QTMT
    State 'CZP_TPST' must receive content of table CYP.CYP_TPST 
  • The operation unit time, CZ0_QTTEUN, must be generated according to rule SFCA314

 

Scrap Notes

  • Register scrap reason (tags of ListOfWasteAppointments), updating data from table SBC
  • If reason of scrap is not registered, it is added to reasons register of table SX5. 
    Where:  
    Code of reason is X5_CHAVE
    Table of reason is '44'. 
    For Shop Floor, table - CY0 must be generated.
  • Scrap reasons have different sizes in tables. Validate it if receipt code does not exceed the size of columns in Protheus.
    When it uses the PCP it must validate a SX5.X5_CHAVE and SBC.BC_MOTIVO.
    When it uses the SIGASFC validate against the CYO.CYO_CDRF, CY0.CY0_CDRF and SBC.BC_MOTIVO.

 

Machine Stoppage Annotation Transaction: StopReport_1_001.xsd StopReport_1_001.xsd

Message Identifier: StopReport
Version: 1_001
Protheus Module: SIGAPCP
Sending Type: Synchronous

Nota
titleNota:

This message is generated by PC-Factory and sent to Protheus.

MensagemTagDescrição

Tabela/Campo

Protheus PCP

Tabela/Campo

Protheus SFC

TipoTabela/Campo: PC-FactoryTipo
 MachineCodeCódigo MáquinaSH6.H6_RECURSOCYX.CYX_CDMQCHAR(06)TBLOutRSEv.ResourceCodeCHAR(15)
 MachineDescriptionDescrição Maquina     
 StopReasonCodeCódigo Motivo ParadaSH6.H6_MOTIVOCYX.CYX_CDSPCHAR(02)TBLOutRSEv.ResourceStatusCodeCHAR(20)
 StopReasonDescriptionDescrição Motivo ParadaSX5.X5_DESCRI *CYX.CYX_DSSPCHAR(40)  
 StartDateTimeData/Hora Início

SH6.H6_DATAINI

SH6.H6_HORAINI

CYX.CYX_DTBGSP

CYX_HRBGSP

DATETBLOutRSEv.ShiftDtStartDATETIME
 EndDateTimeData/Hora Fim

SH6.H6_DATAFIN

SH6.H6_HORAFIN

CYX.CYX_DTEDSP

CYX.CYX_HREDSP

DATETBLOutRSEv.ShiftDtEndDATETIME
 OperatorCodeCódigo OperadorSH6.H6_OPERADOCYX.CYX_CDOECHAR(20)TBLOutRSEv.UserCodeStartCHAR(30)
 ReportDateTimeData/Hora ReporteSH6.H6_DTAPONTCYX.CYX_DTRPDATETBLOutRSEv.DtTimeStampDATETIME
 ToolCodeCódigo Ferramenta-- CYX.CYX_CDFEPO   
 ProductionTeamCodeCódigo Equipe--CYX.CYX_CDGROE   
 StopTypeTipo Parada (1=Não Programada;2=Programada)--CYX.CYX_TPSP   
 ReportSequenceID PC-Factory---- TBLOutRSEv.IDOutRSEv 
Nota
titleNota:
  • The annotation of standard stoppage for this integration is MATA682 in PCP and in Shop Floor the routine is SFCA311.
  • The fields Machine,Stoppage Reason, Start and End Date/Time and Report Date/Time are mandatory.
  • If Report Date/Time is earlier than the current date, the system uses the current Date/Time, that is, date and time the integration is being processed.
  • Stoppage annotation sets SH6.H6_TIPO = 'I'.
  • Product must be labor. Generated by system. Example: SH6.H6_PRODUTO = MOD001
  • The quantity loss is generated by the system. SH6.H6_QTDPERD.
  • The field SH6.H6_IDENT is also generated by the system.
  • The field SH6.H6_TEMPO must be calculated by adapter. It must be the stoppage total time.
  • Stoppage Reason:
    The reason can be registered through integration. It must check the stoppage reason is registered. If not, you must add the reason used in annotation in table SX5.
    Where:
    Code of reason is X5_CHAVE
    Table of reason is '44'.
    For Shop Floor, table - CYN must be generated.
  • Every annotation must send a return message, indicating possible problems or processing performed with success. 
  • In case of success, the number of annotation is sent to PV-Factory in the return message of StopReport and corresponds to RECNO of SH6. This same number is used when a reverse must be registered(IntegrationReport).
  • The reversal when the field ReversedReport (Annotation Reversal) with content TRUE.
    When is reversal, it must have  the number of annotation, field IntegrationReport.
  • The reversal can be generated in two ways in the file: only reversal or reversal + annotation. When the message has the reversal and the annotation only can commit the movements when both are concluded.
    To identify whether the message only has reversal or reversal + annotation, the following status must be checked:
    Only reversal: it only has the information of ReverseReport and IntegrationReport with other tags without data. 
    Reversal + annotation: has ReversedReport and IntegrationReport entered and the other mandatory data (Machine, Stoppage Reason, Start and End Date/Time and Report Date/Time) filled out.
  • The field SH6.H6_OBSERVA = 'PPI' is automatically registered to indicate the record was generated through PCP Protheus x PC-Factory.
  • The system PC-Factory uses the format of hours with HH:MM:SS. For PCP Protheus, only HH:MM is considered. Annotation with time lower than 1 minute is rejected.
  • The field ReportSequence is used to register ID of table registering the stoppage information. It must be used in MATI681CRG entry point.
  • Shift model and number is automatically generated by routine SFCA311. Only when using Shop Floor.
  • If message does not send StopType, it is considered as 2= Not Scheduled. Only when using Shop Floor.
  • Stoppage reasons have different sizes in tables. Validate it if receipt code does not exceed the size of columns in Protheus.
    When it uses the PCP it must validate SX5.X5_CHAVE and SBC.BC_MOTIVO.
    When it uses the SIGASFC validate against the CYO.CYO_CDSF, CY0.CY0_CDSP and SH6.H6_MOTIVO. 

 

Transaction Balance in Stock - Request: StockLevel_2_000.xsd
Message Identifier: StockLevel
Version: 2_000
Protheus Module: SIGAPCP
Sending Type: Synchronous

 

For this type of updating the PC Factory requests balance to Protheus. Message has two parts. Request, in which parameters for balance query and the Return, which has the balance return, are displayed.

This Request is generated by PC-Factory and sent to Protheus. This Return is generated by Protheus to PC-Factory.

 

 

Request

Mensagem
Tag
Descrição
Tipo
ListOfRequestItemInternalIdCódigo do produtoCHAR(15)
 ReferenceCodeReferênciaCHAR(20)
 WarehouseInternalIdCódigo do depósito/local de estoque/ArmazémCHAR(10)
 LotNumberLoteCHAR(10)
 SubLotCodeSubLoteCHAR(10)
 SerialNumberNúmero de SérieCHAR(20)
 AddressLocalizaçãoCHAR(15)
 LotExpirationDateData de ValidadeDATE
Nota
titleNota:
    • The search can happen as follows:
      Per Product: It returns information of all location of product stock.
      By Stock Location (Warehouse): It returns information of all products in stock location.
    • By Stock Location (Warehouse) and Product: It returns information on Product of Stock Location defined.
      For other fields, Batch, Sub-Batch, series number, location and validity date consider only if you enter product code. If you send these fields without the product code, it must return error message.
    • The Request may be a request list.


Return

Mensagem
Tag
Descrição
Tabela/Campo
Tipo
ReturnContentTypeClosingStockDateData fechamento estoque-- 
ListOfReturnItemCompanyIdEmpresa  
 BranchIdFilial  
 CompanyInternalIdEmpresa + Filial  
 ItemInternalIdCódigo do produtoSB2.B2_CODCHAR(15)
 ReferenceCodeReferencia-- 
(mais) ListOfStockBalance    
 WarehouseInternalIdLocal de Estoque (Armazém/Depósito)SB2.B2_LOCALCHAR(10)
 LotNumberNúmero do LoteSB8.B8_LOTECTL CHAR(10)
 SubLotCodeSub LoteSB8.B8_NUMLOTECHAR(10)
 LotExpirationDateData de validadeSB8.B8_DTVALIDDATE
 SerialNumberNúmero de sérieSBF.BF_NUMSERI CHAR(20)
 AddressLocalizaçãoSBF.BF_LOCALIZCHAR(15)
 CurrentStockAmountSaldo do Produto em quantidade

SB2.B2_QATU

SB8.B8_SALDO

SBF.BF_QUANT

DEC(17,4)
 BookedStockAmountQuantidade reservada em Estoque

SB2.B2_RESERVA

SB8.B8_EMPENHO

SBF.BF_EMPENHO

DEC(17,4)
 AvailableStockAmountSaldo disponível do Produto em quantidade

SB2.B2_QATU - SB2.B2_RESERVA

SB8.B8_SALDO - SB8.B8_EMPENHO

SBF.BF_QUANT - SBF.BF_EMPENHO

DEC(17,4)
 UnitItemCostCusto unitário do Produto-- 
 AverageUnitItemCostCusto médio do Produto-- 
 ValueOfCurrentStockAmountSaldo atual do estoque do produto em valor-- 
     

 

Stock Movement Transactions:  MovementsInternal_1_001.xsd 
Message Identifier: MovementsInternal
Version: 1_001
Protheus Module: SIGAPCP
Sending Type: Synchronous

Note: This message is generated by PC-Factory and sent to Protheus.

 
Mensagem
Tag
Descrição
Tabela/Campo
Tipo
Tabela/Campo: PC-Factory
Tipo
BusinessContentTypeCompanyIdCódigo da empresa    
 BranchIdFilial    
 CompanyInternalIdInternalId da chave completa da empresa    
 InternalIdInternalId da movimentação.    
 TypeMovementCodeCódigo do Tipo de Movimento internoSD3.D3_TMCHAR(03)  
 EmissionDateData de EmissãoSD3.D3_EMISSAODATETBLOutInteg. DtTimeStampDATETIME
 ItemCodeCódigo do ProdutoSD3.D3_CODCHAR(15)

TBLOutInteg.ProductCode

CHAR(20)
 UnitOfMeasureCodeUnidade de MedidaSD3.D3_UMCHAR(02)  
 QuantityQuantidadeSD3.D3_QUANTDEC(12,2)

TBLOutInteg.Qty

DEC(19,4)
 WarehouseCodeCódigo do ArmazémSD3.D3_LOCALCHAR(02)

TBLOutInteg.WarehouseCode

CHAR(15)
 LotNumberLoteSD3.D3_LOTECTLCHAR(10)

TBLOutInteg.LotCode

CHAR(41)
 SubLotNumberSubLoteSD3.D3_NUMLOTECHAR(06)  
 LotExpirationDateData Validade do LoteSD3.D3_DTVALIDDATE

TBLLot.DTDUE

DATETIME
 AddressEndereçoSD3.D3_LOCALIZCHAR(15)

TBLOutInteg.Address1Code

CHAR(15)
 NumberSeriesNumberSeriesSD3.D3_NUMSERICHAR(20)

TBLOutInteg.LotCode

CHAR(41)
 InputOrOutputMovimento de Entrada ou SaídaE=Entrada / S = SaídaCHAR(01)

TBLOutInteg.MovTypeCode

CHAR(05)
 ReferenceCodeReferência--   
 ScriptCodeRoteiroSD4.D4_ROTEIROCHAR(02)  
 ActivityCodeOperaçãoSD4.D4_OPERACCHAR(02)

TBLOutInteg.WODetCode

CHAR(15)
 ProductionOrderNumberOrdem de Produção/DocumentoSD3.D3_OP e SD3.D3_DOCCHAR(13)

TBLOutInteg.WOCode

CHAR(41)
 FatherItemCodeItem Pai--  
       
Nota
titleNota:
  • It registers the movement had origin in integration with PC-Factory. The field SD3.D3_OBSERVA is saved as content "TOTVSMES".
  • If tag InputOrOutput is I (input) it must execute routine MATA250. If O (output), it executes the process of routine MATA240. Different than I or O, reject message.
  • The tag InputOrOutput indicates if it is input or output. Based on this information, consider the type of movement of register PCPA109, folder MOVEMENTS. If input, use field OE_VAR1. If output, use field OE_VAR2.
  • No option of reversal. To execute a reversal process, it must send the opposite movement, that is, to reverse an input, it must send an output movement.
  • For tag ProductionOrderNumber, it is validate if content is production order (SC2), If OP saves in field SD3.D3_OP, otherwise, saves in field SD3.D3_DOC.
  • When Shop Floor is in use, the routine does not allow to execute movement of manual input. Only annotation through Shop Floor.

 

Transaction Transfers:  TransferWarehouse_1_003.xsd 
Message Identifier: TransferWarehouse 
Version: 1_003
Protheus Module: SIGAPCP
Sending Type: Synchronous

Note: This message is generated by PC-Factory and sent to Protheus.

 

 

LotSub-lotLot Expiration DateAddressLOCALIZCHAR(15)NumberSeriesNumberSeriesNUMSERI20CHAR(01ReferenceCodeSD4.D4_ROTEIRO02SD4.D4_OPERAC02Production Order/DocumentOP and SD3.D3_DOC13
Mensagem
Tag
Descrição
Tabela/Campo
Tipo
Tabela/Campo: PC-Factory
Tipo
BusinessContentTypeCompanyIdEmpresa    
 BranchIdFilial    
 CompanyInternalIdInternalId da chave completa da empresa    
 InternalIdInternalId da transferência    
 NumberNúmero da MovimentaçãoSD3.D3_NUMSEQCHAR(06)  
 RegisterDateTimeData de Emissão da solicitaçãoSD3.D3_EMISSAODATE  
TransferWarehouseType      
 InternalIdInternalId da transferência    
 EmissionDateData de EmissãoSD3.D3_EMISSAODATE

TBLOutInteg.DtTimeStamp

DATETIME
 ItemCodeFromItem/Produto OrigemSD3.D3_CODCHAR(15)

TBLOutInteg.ProductCode

CHAR(20)
 ItemCodeToItem/Produto DestinoSD3.D3_CODCHAR(15)

TBLMovEv.ProductCode

CHAR(20)
 UnitOfMeasureFromUnidade de Medida OrigemSD3.D3_UMCHAR(02)  
 UnitOfMeasureToUnidade de Medida DestinoSD3.D3_UMCHAR(02)  
 QuantityQuantidadeSD3.D3_QUANTDEC(12,2)

TBLOutInteg.Qty

DEC(19,4)
 WarehouseCodeFromCódigo do Armazém de OrigemSD3.D3_LOCALCHAR(02)

TBLOutInteg.WarehouseCode

CHAR(15)
 WarehouseCodeToCódigo do Armazém DestinoSD3.D3_LOCALCHAR(02)

TBLMovEv.WarehouseCode

CHAR(15)
 LotNumberFromNúmero do Lote de OrigemSD3.D3_LOTECTLCHAR(10)

TBLOutInteg.LotCode

CHAR(41)
 LotNumberToNúmero do Lote de Destino

Message

Tag

Description

Table/Field

Type

BusinessContentType

CompanyId

Company code

 

 

 

BranchId

Branch

 

 

 

CompanyInternalId

InternalId of full key of company

 

 

 

InternalId

InternalId of movement.

 

 

 

TypeMovementCode

Code of internal movement type

SD3.D3_TM

CHAR(03)

 

EmissionDate

Date of Issue

SD3.D3_EMISSAO

DATE

 

ItemCode

Product Code

SD3.D3_COD

CHAR(15)

 

UnitOfMeasureCode

Unit of Measurement:

SD3.D3_UM

CHAR(02)

 

Quantity

Quantity

SD3.D3_QUANT

DEC(12,2)

 

WarehouseCode

Warehouse Code

SD3.D3_LOCAL

CHAR(02)

 

LotNumber

SD3.D3_LOTECTLCHAR(10)

TBLMovEv.LotCode

CHAR(41)
 SubLotNumberNúmero do SubLoteSD3.D3_NUMLOTECHAR(06)  
 

LotExpirationDate

LotExpirationDateFromData de validade do Lote OrigemSD3.D3_DTVALIDDATE

TBLLot.DtDue

DATETIME
 

Address

LotExpirationDateToData de validade do Lote DestinoSD3.D3_DTVALIDDATE

TBLLot.DtDue

DATETIME
 AddressFromEndereço OrigemSD3.D3_LOCALIZCHAR(15)

 

InputOrOutput

Input or Output Movement

I=Input / O = Output

TBLOutInteg.Address1Code

CHAR(15)
 AddressTo

Reference

--

 

 

ScriptCode

Script

Endereço DestinoSD3.D3_LOCALIZCHAR(15)

 

ActivityCode

Operation

TBLOutInteg.Address2Code

CHAR(15)
 

ProductionOrderNumber

NumberSeriesNúmero de sérieSD3.D3_NUMSERICHAR(20)

 

FatherItemCode

Parent Item

--

 

TBLOutInteg.LotCode

CHAR(41)
Nota
titleNota:
  • It registers the movement had origin in integration with PC-Factory. The field SD3.D3_OBSERVA is saved as content "TOTVSMES".
  • If tag InputOrOutput is I (input) it must execute routine MATA250. If O (output), it executes the process of routine MATA240. Different than I or O, reject message.
  • is registered that its origin transfers was through integration with  PC-Factory. The field SD3.D3_OBSERVA is saved as content "TOTVSMES".
  • For transfers, routine MATA261 is executedThe tag InputOrOutput indicates if it is input or output. Based on this information, consider the type of movement of register PCPA109, folder MOVEMENTS. If input, use field OE_VAR1. If output, use field OE_VAR2.
  • No option of reversal. To execute a reversal process, it must send the opposite movement, that is, to reverse an inputa transfer from X to Y, it must send an output movement.
  • For tag ProductionOrderNumber, it is validate if content is production order (SC2), If OP saves in field SD3.D3_OP, otherwise, saves in field SD3.D3_DOC.
  • When Shop Floor is in use, the routine does not allow to execute movement of manual input. Only annotation through Shop Floor.

 

Transaction Transfers:  TransferWarehouse_1_003.xsd 
Message Identifier: TransferWarehouse 
Version: 1_003
Protheus Module: SIGAPCP
Sending Type: Synchronous

Note: This message is generated by PC-Factory and sent to Protheus.

 

  • a transfer movement from Y to X.

 

Transação Recusa:  Refusal_1_000.xsd
Identificador da Mensagem: Refusal
Versão: 1_000
Módulo Protheus: SIGAPCP
Tipo de Envio: Síncrona

 

Esta mensagem será utilizada para registrar as perdas da produção quando são registradas peças boas e posteriormente verificado que houve algum defeito. Também pode ser utilizada para registrar as perdas da matéria-prima.

 

Nota:

Esta mensagem será gerada pelo PC-Factory e enviada ao Protheus.

 

 

InternalId of transferInternalId of transferSD3.D3_COD15SD3.D3_UM02DEC(12,2CHAR(02)SD3.D3_LOTECTL10

Mensagem

Tag

Descrição

Tabela/Campo

Tipo

Tabela/Campo: PC-Factory

Tipo

BusinessContentType

ProductionOrderNumber

Ordem de Produção

SBC.BC_OP

CHAR(20)

 

 

 

IdReport

ID Apontamento

 

CHAR(10)

 

 

 

ItemCode

Produto Recusado

SBC.BC_PRODUTO

CHAR(20)

 

 

 

WarehouseCode

Código do depósito

SBC.BC_LOCORIG

CHAR(02)

 

 

 

AddressCode

Endereço

SBC.BC_LOCALIZ

CHAR(15)

 

 

 

NumberSeries

 Número de Série

SBC.BC_NUMSERI

CHAR(20)

 

 

 

Type

Tipo Perda

SBC.BC_TIPO

CHAR(01)

 

 

 

WasteCode

Motivo de Perda

SBC.BC_MOTIVO

CHAR(02)

Message

Tag

Description

Table/Field

Type

BusinessContentType

CompanyId

Company

 

 

 

BranchId

Branch

 

 

 

CompanyInternalId

InternalId of full key of company

 

 

 

InternalId

 

 

 

Number

movement Number

WasteDescription

Descrição da Perda

SBC.BC_DESCRISD3.D3_NUMSEQ

CHAR(0640)

 

RegisterDateTime

Request issue date

SD3.D3_EMISSAO

DATE

 

 

LossQuantity

Quantidade de Perda

SBC.BC_QUANT

DEC(11,2)TransferWarehouseType

 

 

  

CostCenterCode

 

InternalId

Centro de Custo

SBC.BC_CC

CHAR(09)

 

 

 

EmissionDate

Date of Issue

SD3.D3_EMISSAO

ItemCodeTo

Produto Gerado

SBC.BC_CODDEST

CHAR(20)

 

 DATE

 

ItemCodeFrom

Item/Source Product

WarehouseCodeTo

Código do depósito Destino

SBC.BC_LOCAL

CHAR(

02)

 

 

 

ItemCodeTo

Item/Target Product

AdressCodeTo

Endereço Destino

SBC.BC_LOCDESTSD3.D3_COD

CHAR(15)

 

 

 

UnitOfMeasureFrom

Unit of Origin Measurement:

NumberSeriesTo

Nr. de Série Destino

SBC.BC_NSEDEST

CHAR(

20)

 

UnitOfMeasureTo

Unit of Destination Measurement:

SD3.D3_UM

 

 

QuantityTo

Quantidade destino

SBC.BC_QTDDEST

DEC(11,2CHAR(02)

 

Quantity

Quantity

SD3.D3_QUANT

 

 

ActivityCode

Operação

SBC.BC_OPERAC

CHAR(10)

 

 

 

ResourceCode

Máquina/Recurso

SBC.BC_RECURSO

WarehouseCodeFrom

Origin Warehouse Code

SD3.D3_LOCAL

CHAR(0220)

 

 

 

WarehouseCodeTo

Destination Warehouse Code

SD3.D3_LOCAL

LossDate

Data da Perda

SBC.BC_DATA

DATE

 

 

 

LotNumberFromLotCode

Origin Lot NumberLote

SD3SBC.D3BC_LOTECTL

CHAR(10)

 

LotNumberTo

Destination Lot Number

 

 

SubLotCode

SubLote

SBC.BC_NUMLOTE

CHAR(

06)

 

SubLotNumber

Sub-lot Number

SD3.D3_NUMLOTE

CHAR(06)

 

LotExpirationDateFrom

Validity Date of Origin Batch

SD3.D3_DTVALID

DATE

 

LotExpirationDateTo

Validity Date of Destination Batch

SD3.D3_DTVALID

DATE

 

AddressFrom

Origin Address

SD3.D3_LOCALIZ

CHAR(15)

 

AddressTo

Destination Address

SD3.D3_LOCALIZ

CHAR(15)

 

NumberSeries

Serial number

SD3.D3_NUMSERI

CHAR(20)

Nota
titleNota:
  • It is registered that its origin transfers was through integration with  PC-Factory. The field SD3.D3_OBSERVA is saved as content "TOTVSMES".
  • For transfers, routine MATA261 is executed.
  • No option of reversal. To execute a reversal process, it must send the opposite movement, that is, to reverse a transfer from X to Y, it must send a transfer movement from Y to X.

...

 

 

LotDueDate

Data de Validade

SBC.BC_DTVALID

DATE

 

 

Esta mensagem terá as seguintes finalidades: 
Perda do Produto Acabado informando produto destino:
Permite que seja alterado uma determinada quantidade que já foi apontada e está no estoque como boa. Denomina-se recusa do produto acabado, pois não será necessário realizar os estornos e depois o ajuste do apontamento.
Exemplo: OP de 50 unidades, 5 apontamentos de 10, Necessidade de acerto de 45 peças com defeitos e 5 boas.

Ao invés de estornar os 5 apontamentos e "reapontar" 5 boas e 45 refugos na ProductionAppointment poderá ser enviada uma mensagem de Recusa de 45 para a OP, informando o motivo da recusa/defeito e código do produto destino.

Perda de Matéria Prima:

A mensagem de recusa também será utilizada para registrar perda de matéria prima durante o processo produtivo. A matéria prima pode gerar um subproduto ou não.

Perda do Produto Acabado sem informar produto destino:

Poderá ser utilizado para informar a perda do produto acabado sem que seja necessário gerar as tags de destino.

 

Nota:

  • Será executada a rotina MATA685
  • A tag IdReport não será obrigatória. Indica o reporte de produção que deverá ser atualizado (Não usado para o Protheus)
  • A tag Type, indica se é Refugo ou Scrap. 1 = Refugo; 2= Scrap.

General Limitations/Restrictions

The integration does not contempalte the generation of orders by APs, register through Fluig (WorkFlow) or routines not described in this document.
Build must be equal to or later than 7.00.131227A and date 9/8/2014.

 

Common Situations 

Possible common problematic status that can happen during the work of the integration and how to solve it.

...

Change waiting time of WebService PC-Factory.

 

Application support checklist

Verification Checklist:

  • In the parameters routine, PCPA109, check whether the active field is "1 - ACTIVE"
  • In the parameters routine, PCPA109, tstar connection with WebService of PPI entered through the button Test.
  • Configuration of sessions WEBSERVICE and PROXY from APPSERVER.INI;
  • Adjust integration in relation to configuration or business.

...