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 Resource PCP / Machine SFC: Machine_1_000.xsd
Message Identifier: Machine
Version: 1_000
Protheus Module: SIGAPCP, SIGASFC
Sending Type: Synchronous

 

MessageTagDescription

Table/Field:

Protheus PCP

Table Field:

Protheus SFC

TypeTable/Field: PC-FactoryType
BusinessContentType
      
 CodeMachine CodeSH1.H1_CODECYB.CYB_CDMQCHAR(20)TBLInResource.codeCHAR(15)
 DescriptionMachine DescriptionSH1.H1DESCRICYB.CYB_DSMQCHAR(40)

TBLInResource.Name

TBLInResource.Nickname

CHAR(20)
 WorkCenterCodeWork Center CodeSH1.H1_CTRABCYB.CYB_CDCETRCHAR(10)

TBLInResource.ManagerGrpCode

CHAR(15)
 WorkCenterDescriptionWork Center DescriptionSHB.HB_NAMECYB.CYB_DSCETRCHAR(40)

TBLInResource.WorkCenterDescription

CHAR(15)
 CostCenterCodeCost Center CodeSH1.H1_CCUSTCYB.CYB_CDCECSCHAR(20)  
 ProcessorTypeType of Processing 

CYB.CYB_TPPC

1=Monoprocess;2=By Batch;

3=Multiple Processes;4=Manual

CHAR(01)  
 LaborTypeType MOD 

CYB.CYB_TPMOD

1=Does not Report;2=Operator;3=Team

CHAR(01)  
 VolumeMachineQuantityMachine Volume Quantity CYB.CYB_QTVMMQDEC(12,4)  
 EfficiencyMachineValueMachine Efficiency CYB.CYB_VLEFMQDEC(05,2)  
 OperatorMachineQuantityMachine Operator Quantity CYB.CYB_QTOEMQNUM(02)  
 SimultaneousActivityQuantityQuantity Simultaneous Operations CYB.CYB_QTATSMNUM(03)  
 IsSetupIt is set up CYB.CYB_LGSUBOOLEAN  
 IsOverlapReportOverlaps Annotation CYB.CYB_LGOVRPBOOLEAN  
 ProductionAreaCodeProduction Area CYB.CYB_CDARPOCHAR(10)  
 InitialValidateDateValidity Initial Date CYB.CYB_DTBGVDDATE  
 FinalValidateDateValidity End Date CYB.CYB_DTEDVDDATE  
ListOfResources
      
  ResourceTypeResource Type 

CYC.CYC_TPRC

1=Operator;2=Tool;

3=Team;4=Equipment

CHAR(01)  
 ResourceCodeResource Code CYC.CYC_CDRCCHAR(20)TBLInUser.CodeCHAR(30)
 ResourceNameResource Name CYC.CYC_NMRCCHAR(40)

 TBLInUser.Name

 TBLInUser.Nickname
CHAR(60)
 UnitTimeTypeMeasure Time Type 

CYC.CYC_TPUNTE

1=Hours;2=Minutes;3=Seconds

CHAR(01)  
 StartExpirationDateValidity Start Date CYC.CYC_DTBGVDDATE  
 EndExpirationDateValidity End Date CYC.CYC_DTEDVDDATE  
 CycleQuantityNumber Cycles CYC.CYC_QTCIDEC(11,4)  
 IsTimeActivityDetermines time CYC.CYC_LGTEATBOOLEAN  
ListOfProductionShifts       
 ProductionShiftCodeCode Shift Model CYL.CYL_CDTNCHAR(08)  
 ProductionShiftDescriptionDescription Shift Model CYL.CYL_DSTNCHAR(40)  
 BeginDateValidity Start Date CYL.CYL_DTVDBGDATE  
 EndDateValidity End Date CYL.CYL_DTVDEDDATE 

...

Message

Tag

Description

Table/Field:

Protheus PCP

Table Field:

Protheus SFC

Type

Table/Field: PC-Factory

Type

BusinessContentType

 

 

 

 

 

 

 

 

Code

Resource Code

SH4.H4_CODE

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)

 

 

Nota
titleNotaNote:
  • The Resource in the PCP indicates the machine, in the shop floor indicates toosl, operator etc;
  • When origin is PCP the tag Type (Resource Type) is generated in fixed value '2';
  • When origin is PCP the tag UnitCycleQuantity (Cycles Unit) is generated in fixed value '1';
  • When origin is PCP the tag UnitCycleQuantity (Cycles Unit) is generated in fixed value '1';
  • When origin is PCP the tag StartExpirationDate (Start Validity) is generated with date of message generation;
  • When origin is PCP the tag EndExpirationDate (End Validity) is generated in fixed value '1';
    Current date (dDataBase) + lifespan of tool (H4_VIDAUTI). Consider type of lifec ycle (H4_TIPOVID) - D=Days;H=Hours;M=Month;A=Year

...

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

 

MessageTagDescriptionTable/Field: ProtheusTypeTable/Field: PC-FactoryType
BusinessContentTypeCompanyIdCompany Code CHAR(02)  
 CompanyInternalIdCompany+BranchCOMPANY + SG1.G1_BRANCH   
 ItemInternalIdCompany+Branch+code parent item

COMPANY + SG1.G1_BRANCH +

SG1.G1_COD

   
 ItemCodeCode parent itemSG1.G1_CODCHAR(15)

TBLInWOHD.ProductCode

TBLInWOHD.WOCode

CHAR(30)
 ItemAmountBase quantity of parent itemSB1.B1_QBNUM(07)TBLInWOHD.TotalQTYDEC(19,4)
ItemComponentType      
 ItemSequenceSequence of componentSG1.G1_TRTNUM(05)TBLInBillMat.BillMatExtCodeCHAR(20)
 ItemComponentCodeCode item componentSG1.G1_COMPCHAR(15)TBLInBillMat.ProductCodeCHAR(20)
 ItemComponentInternalIdInternal Id of Item ComponentCOMPANY + SG1.G1_BRANCH + SG1.G1_COMP   
 InitialDateValidity Initial DateSG1.G1_INIDATETBLInWOHD.DtPlanStartDATETIME
 FinalDateValidity End DateSG1.G1_FIMDATETBLInWOHD.DtPlanEndDATETIME
 IsGhostMaterialIndicates whether it is ghostSB1.B1_FANTASMBOOLEAN ( FALSE ou TRUE)  
 ItemComponentAmountQuantity of component itemSG1.G1_QUANTDEC(12,6)  
 LossFactorFactor of lossSG1.G1_LOSSDEC(05,2)  
(mais) ListOfScript      
 ScriptcodeCode of ScriptSGF.GF_SCRIPTCHAR(02)TBLInWOHD.ExtCodeCHAR(20)
 ScriptAlternativeAlternative of Script--   
 ActivityIntenalIDID Operation--   
 ActivityCodeCode of OperationSGF.GF_OPERACCHAR(02)TBLInWodet.CodeCHAR(10)
 ActivityComponentSequenceSequence of component in the operationSGF.GF_TRTNUM(03) 

...

MessageTagDescriptionTable/Field: ProtheusTypeTable/Field: PC-FactoryType
BusinessContentTypeItemCodeItem CodeSG2.G2_PRODUTOPRODUCTCHAR(15)

TBLInWOHD.ProductCode

TBLInWOHD.WOCode

CHAR(20)
 ItemDescriptionDescription of itemSB1.B1_DESCCHAR(40)  
 ItemInternalIdCompany[Branch|Item

EMPRESA COMPANY + SG2.G2_FILIAL BRANCH +

SG2.G2_PRODUTOPRODUCT

   
 ScriptCodeCode of ScriptoSG2.G2_CODIGOCODECHAR(02)  
 ScriptDescriptionDescription Script--CHAR(40)  
 ScriptAlternativeScript Alternative--CHAR(02)  
ListOfActivity      
 ActivityInternalIDID OperationSG2.R_E_C_N_O_NUM(05)  
 ActivityCodeCode of OperationSG2.G2_OPERACCHAR(02)TBLInWodet.CodeCHAR(10)
 ActivityDescriptionDescription OperationSG2.G2_DESCRICHAR(60)TBLInWodet.NameCHAR(40)
 MachineCodeMachine CodeSG2.G2_RECURSORESOURCECHAR(06)TBLInWodet.ResourceCHAR(15)
 ToolCodeCode ToolSG2.G2_FERRAMTOOLCHAR(06)  
 ActivityTypeType Operation

1 = Executa operaçãoExecutes operation; 2 = Não executaDoes not execute.

CHAR(01)  
 WorkCenterCodeCode Work CenterSG2.G2_CTRABCHAR(06)TBLInWodet.ManagerGrpCodeCHAR(15)
 WorkCenterInternalIdId Work CenterEMPRESA COMPANY + SG2.G2_FILIAL BRANCH + SG2.G2_CTRAB   
 UnitItemNumberStandard Lot SG2.G2_LOTEPADNUM(06)TBLInWodet. StdSpeedDEC(28,23)
 TimeResourceTime Resource0 TBLInWodet. StdSpeedDEC(28,23)
 TimeMachineTime MachineSG2.G2_TEMPADDEC(05,2)TBLInWodet. StdSpeedDEC(28,23)
 TimeSetupTime PreparationSG2.G2_SETUPDEC(05,2)TBLInWodet. SetUpTimeINT
 UnitTimeTypeType Unit Time1 = HorasHours;2=MinutosMinutes;3=SegundosSeconds;4=DiasDays TBLInWodet. StdSpeedFormatTINYINT
 ScriptAlternativeAlternativeSG2.G2_ROTALTCHAR(02)  
 InitialDateInitial DateSG2.G2_DTINIDATETBLInWodet.DtPlanStartDATETIME
 FinalDateFinal DateSG2.G2_DTFIMDATETBLInWodet.DtPlanEndDATETIME
 PercentageScrapValue% Scrap--   
 PercentageValueProportion--   
 ResourceQuantityQuantity Resource--  
Nota
titleNotaNote:
  • 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

 

MensagemMessageTagDescriçãoDescriptionTabelaTable/CampoField: ProtheusTipoTypeTabelaTable/CampoField: PC-FactoryTipoType
BusinessContentTypeWarehouseCodeArmazémWarehouse/DepósitoDepositSBE.BE_LOCALCHAR(02)TBLInAddress.WarehouseCodeCHAR(15)
 LocationCodeEndereçoAddress/LocalizaçãoLocationSBE.BE_LOCALIZCHAR(15)TBLInAddress.CodeCHAR(15)
 AdressInternalIdChave completa endereçoFull Key address

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

   
 AdressStockDescriptionDescrição do endereçoDescription of addressSBE.BE_DESCRICDESCRIPCHAR(30)TBLInAddress.ExtCodeCHAR(20)

...

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

 

MensagemMessageTagDescriçãoDescriptionTabelaTable/CampoField: ProtheusTipoTypeTabelaTable/CampoField: PC-FactoryTipoType
BusinessContentTypeItemCodeCódigo do produtoCode of productSB2.B2_CODCHAR(15)TBLInMovMat.ProductCodeCHAR(20)
 ItemDescriptionDescrição do Description of itemSB1.B1_DESCCHAR(30)  
ListOfStock  

 

   
 ReferenceCodeReferênciaReference--   
 WarehouseCodeDepósito/Local de estoqe/ArmazemDeposit/Location of stock/WarehouseSB2.B2_LOCALCHAR(02)TBLInMovMat.WarehouseCodeCHAR(15)
 LotCodeNúmero do LoteNumber of LotSB8.B8_LOTECTLCHAR(10)TBLInMovMat.LotCodeCHAR(41)
 SubLotCodeSub-LoteLotSB8.B8_NUMLOTENUMBATCHCHAR(06)  
 NumberSeriesNúmero de SérieNumber of SeriesSBF.BF_NUMSERICHAR(20)  
 AddressCodeEndereçoAddress/LocalizaçãoLocationSBF.BF_LOCALIZLOCALCHAR(15)TBLInMovMat.AddressCodeCHAR(15)
 LotDueDateData de ValidadeValidity DateSB8.B8_DTVALIDDATETBLInMovMat.LotDtValidityDATETIME
 CurrentStockAmountSaldo de estoqueBalance of stock

SB2.B2_QATU

SB8.B8_SALDOBALANCE

SBF.BF_QUANT

DEC(12,2)  
 BookedStockAmountQuantidade ReservadaReserved Quantiy

SB2.B2_RESERVARESERVATION

SB8.B8_EMPENHOALLOCATION

SBF.BF_EMPENHOALLOCATION

DEC(12,2)  
 AvailableStockAmountSaldo disponívelBalance available

SB2.B2_QATU - SB2.B2_RESERVA

SB8.B8_SALDO - SB8.B8_EMPENHOALLOCATION

SBF.BF_QUANT - SBF.BF_EMPENHOALLOCATION

DEC(12,2)  
 
QuantityUpdated
Quantidade AtualizadaUpdated Quantity DEC(12,2)TBLInMovMat.QtyDEC(18,2)
 
InputOutputEntrada ou SaídaInput or Output1 = Entrada ou Input or 2 = SaídaOutputCHAR(01)TBLInMovMat.ClassificationCHAR(15)
Nota
titleNotaNote:
  • 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

 

MessageMensagemTagDescriçãoDescription

TabelaTable/CampoField:

Protheus PCP

Tabela CampoTable Field:

Protheus SFC

TipoTypeTabelaTable/CampoField: PC-FactoryTipoType
BusinessContentTypeCodeCódigo RefugoScrap CodeSX5.X5_CHAVEKEYCYO.CYO_CDRFCHAR(08)TBLOutScrap.CodeCHAR(15)
 DescriptionDescrição do RefugoDescription of Scrap

X5_DESCRI

X5_DESCSPA

X5_DESCENG

CYO.CYO_DSRFCHAR(40)TBLOutScrap.NameCHAR(30)
 IsReworkRetrabalhoRework

 

CYO.CYO_LGRTBOOLEAN  
 IsScrapMaterialRefugo Material ScrapSBE.BE_DESCRICCYO.CYO_LGRFMPBOOLEAN 
Nota
titleNotaNote:
    • 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 TABLE = '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_MOTIVOREASON.

 

Stop Reason Transaction: StopReason_1_000.xsd

...

Message

Tag

Description

Table/Field:

Protheus PCP

Table Field:

Protheus SFC

Type

Table/Field: PC-Factory

Type

BusinessContentType

Code

Stoppage Reason Code

SX5.X5_CHAVEKEY

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
titleNotaNote:
    • 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_MOTIVOREASON
      When it uses the SIGASFC validate against the CYN.CYN_CDSP, CYX.CYX_CDSP and SH6.H6_MOTIVOREASON


Production Order Transaction: ProductionOrder_2_004.xsd

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

 

MesagemMessageTagDescriçãoDescription

TabelaTable/CampoField

TipoTypeTabelaTable/CampoField: PC-FactoryTipoType
BusinessContentTypeNumberNúmero Ordem ProduçãoNumber Production OrderSC2.C2_NUM + SC2.C2_ITEM + SC2.C2_SEQUENCHAR(20)TBLInWOHD.CodeCHAR(41)
 ProductionOrderUniqueIDEmpresaCompany+FilialBranch+Ordem ProduçãoProduction Order

EMPRESA COMPANY + SC2.C2_FILIAL BRANCH + SC2.C2_NUM +

SC2.C2_ITEM + SC2.C2_SEQUEN

CHAR(30)  
 ItemCodeCódigo Code ItemSC2.C2_PRODUTOPRODUCTCHAR(15)TBLInWOHD.ProductCodeCHAR(20)
 ItemDescriptionDescrição Description ItemSB1.B1_DESCCHAR(40)  
 TypeTipo da OrdemType of Order

1= InternaInternal; 2=ExternaExternal; 3=InternaInternal/ExternaExternal; 4=RetrabalhoRework;

5=ConsertoFixing; 6=ManutençãoMaintenance; 7=Ativo FixoFixed Asset;

8=FerramentariaTooling; 9=ReaproveitamentoReuse

 

CHAR(01)TBLInWOHD.WoTypeCodeCHAR(20)
 QuantityQuantidadeQuantitySC2.C2_QUANTDEC(12,2)TBLInWOHD.TotalQty

 DEC(19,4)

 ReportQuantityQuantidade ReportadaQuantity ReportedSC2.C2QUJEDEC(12,2)  
 UnitOfMeasureCodeUnidade MedidaUnit of MeasureSC2.C2_UMCHAR(02)TBLInWoDet.Unit1CodeCHAR(05)
 RequestOrderCodeCódigo Pedido Ordem ProduçãoRequest Code Production OrderSC2.C2_PEDIDOORDERCHAR(06)  
 StatusOrderTypeEstado da ordemOrder Status

Estimated/Opened Prevista/Aberta = 1

Iniciada Started = 6

Encerrada ParcialPartial/Total Closed = 7

Ociosa Idle = 9

CHAR(01)TBLInWOHD.StatusSMALLINT
 WarehouseCodeCódigo DepósitoCode DepositSC2.C2_LOCALCHAR(02)TBLInWOHD.AuxCode1CHAR(20)
 EndOrderDateTimeData Fim Ordem Produção End Date Production Order CPSC2.C2_DATPRFDATETBLInWOHD.DtPlanEndDATETIME
 StartOrderDateTimeData Início Ordem Produção Start Date Production Order CPSC2.C2_DATPRIDATETBLInWOHD.DtPlanStartDATETIME
 AbbreviationProviderNameNome ClienteName CustomerSC5.C5_CLIENTE ( SA1.A1_NOME)CHAR(30)  
 ScriptCodeCódigo RoteiroCode ScriptSC2.C2_ROTEIROSCRIPTCHAR(02)  
 ReportOrderTypeTipo de ReporteType of Report

1 = OrdemOrder; 2 = OperaçõesOperations; 3 = Ponto ControleControl Point; 4 = Item

 

CHAR(01)  
ListOfActivityOrders      
 ProductionOrderNumberOrdem de ProduçãoProduction Order

SC2.C2_NUM + SC2.C2_ITEM +

SC2.C2_SEQUEN

CHAR(20)TBLInWoDet.Wocode

CHAR(10)

 ActivityIDID do Registroof RecordRECNO (SG2,SHY ou SH8)CHAR(10)  
 ActivityCodeCódigo OperaçãoCode Operation

SG2.G2_OPERAC

SHY.HY_OPERAC

SH8.H8_OPER

CHAR(02)TBLInWoDet.WODetCode+Split

 CHAR(10)

 ActivityDescriptionDescrição OperaçãoDescription OperationSG2.G2_DESCRICHAR(40)TBLInWoDet.WODetName

CHAR(30)

 SplitDesdobramento da operaçãoSplit of operationSH8.H8_DESDOBRCHAR(04)  
 ItemCodeCódigo do Code of item

SC2.C2_PRODUTOPRODUCT

CHAR(15)  
 ItemDescriptionDescrição do Description of itemSB1.B1_DESCCHAR(40)  
 ActivityTypeTipo OperaçãoType Operation1 - Aponta Register ; 2-Não ApontaDoes not registerCHAR(01)  
 WorkCenterCodeCódigo Centro de TrabalhoCode Work Center

SG2.G2_CTRAB

SHY.HY_CTRAB

SH8.H8_CTRAB

CHAR(06)TLBInWODet.ManagerGrpCode CHAR(15)
 WorkCenterDescriptionDescrição Centro de TrabalhoDescription Work CenterSHB.HB_NOMECHAR(30)  
 UnitTimeTypeTipo Unidade TempoType Unit Time1 - HorasHours; 2 - MinutosMinutes; 3- SegundosSeconds; 4 - DiasDaysCHAR(01)TLBInWODet.StdSpeedFormat TINYINT
 TimeResourceTempo Recurso (Tempo padrão para um loteTime Resource (Standard time for lot)SG2.G2_TEMPADDEC(05,2)TLBInWODet.StdSpeed DEC(28,23)
 TimeMachineTempo Máquina (Tempo para fazer toda a ordemTime Machine (Time to order)

SG2.G2_TEMPAD * SC2.C2_QUANT

SHY.HY_TEMPOTIME 

SH8.H8_HRINI - SH8.H8_HRFIM

DEC(14,4)

TLBInWODet.StdSpeed

DEC(28,23)
 TimeSetupTempo PreparaçãoTiem Setup

SG2.G2_SETUP

SHY.HY_TEMPOSTIMES

SH8.H8_SETUP

DEC(15,4)TLBInWODet.SetUpTimeINT
 TimeMODTempo HomenTime Man--   
 TimeIndMESIindicador de tempo no Iindicator of time in MES1 = Tempo MáquinaMachine Time; 2 = Tempo mão-de-obraLabor Time; 3 = Escolha pelo Choice by MES.CHAR(01)  
 ScriptCodeCódigo RoteiroCode Script

SG2.G2_CODIGOCODE

SHY.HY_ROTEIROSCRIPT

SH8.H8_ROTEIROSCRIPT

CHAR(02)  
 LaborCodeCódigo Mão de Obra DiretaCode Direct LaborMOD+CCCHAR(08)  
 UnitItemNumberLote PadrãoStandard LotSG2.G2_LOTEPADNUM(05)TLBInWODet.StdSpeedDEC(28,23)
 IsActivityEndÚltima OperaçãoLast Operation

In the last operation, Na última operação passar TRUE.

Nas demais Otherwise, FALSE.

BOOLEANTLBInWODet.ReportTrigger

TINYINT

 MachineCodeCódigo MáquinaMachine Code

SG2_RECURSORESOURCE

SHY_RECURSORESOURCE

H8_RECURSORESOURCE

CHAR(06)  
 StartPlanDateTimeData/Hora Início ProgramaçãoDate/Time Start Schedule

SHY.HY_HORAINI

SC2.C2_DATPRI

SH8.H8_DTINI

DATETLBInWODet.StartPlanDateTimeDATETIME
 EndPlanDateTimeData/Hora Fim ProgramaçãoDate/Time End Schedule

SHY.HY_HORAFIM

SC2.C2_DATPRF

SH8.H8_DTFIM

DATETLBInWODet.EndPlanDateTimeDATETIME
 ProductionQuantityQuantidade a produzir na operaçãoQuantity to produce in operation

SHY.HY_QUANT 

SH8.H8_QUANT 

SC2.C2_QUANT

DEC(12,2)TLBInWODet.Qty DEC(19,4)
 ActivityQuantityQuantidade da operaçãoQuantity of operation

SHY.HY_QUANT 

SH8.H8_QUANT 

SC2.C2_QUANT

DEC(12,2)  
 UnitActivityCodeUnidade de medidaUnit of measureSB1.B1_UMCHAR(02)TLBInWODet.Unit1CodeCHAR(5)
 SecondUnitActivityCodeSegunda unidade de medida na operaçãoSecond unit of measure in operation-- TLBInWODet.Unit2CodeCHAR(5)
 SecondUnitActivityFactorFator de conversão para segunda un. na operaçãoConversor Factor for second unit in operation-- TLBInWODet.Unit2Factor DEC(8,4)
 ResourceQuantityQuantidade de recursosQuantity of resources

SG2.G2_MAOOBRA

SHY.HY_MAOOBRA

NUM(03)  
ListOfMaterialOrders      
 ProductionOrderNumberOrdem de produçãoProduction Order

SC2.C2_NUM + SC2.C2_ITEM +

SC2.C2_SEQUEN

CHAR(20)TBLInBillMat.WocodeCHAR(41)
 MaterialIDID do registro da reservaof reservation recordSD4.R_E_C_N_O_CHAR(10)  
 MaterialCodeCódigo Code Reservation Item ReservaSD4.D4_CODCHAR(15)TBLInBillMat.ProductCodeCHAR(20)
 MaterialDescriptionDescrição do Description of ItemSB1.B1_DESCCHAR(40)  
 ScriptCodeCódigo RoteiroCode ScriptSD4.D4_ROTEIROSCRIPTCHAR(02)  
 ActivityCodeCódigo OperaçãoCode OperationSD4.D4_OPERACCHAR(02)TBLInBillMat.WODetCodeCHAR(10)
 WarehouseCodeCódigo DepósitoCode DepositSD4.D4_LOCALCHAR(02)TBLInBillMat.ExtCodeCHAR(20)
 MaterialDateData ReservaDate ReservationSD4.D4_DATADATEDATE  
 MaterialQuantityQuantidade ReservaQuantity of ReservationSD4.D4_QUANTDEC(12,2)TBLInBillMat.TotalQtyDEC(19,4)
 LotCodeLoteLotSD4.D4_LOTECTLCHAR(10)  
 PertMaterialNumberSequência do Sequence of itemSD4.D4_TRTCHAR(03)  
 RequestTypeTipo da RequisiçãoType of RequestSB1.B1_APROPRICHAR(01)TBLInBillMat.CommentsCHAR(500)
(mais)ListOfAllocatedMaterial

 

      
 WarehouseCodeCódigo DepósitoCode DepositSD4.D4_LOCALCHAR(02)TBLInMovMat.WarehouseCodeCHAR(15)
 LotCodeCódigo LoteCode Lot

SD4.D4_LOTECTL

SDC.DC_LOTECTL

CHAR(10)TBLInMovMat.LotCodeCHAR(41)
 LocationCodeLocalizaçãoLocation/EndereçoAddressSDC.DC_LOCALIZCHAR(15)TBLInMovMat.AddressCodeCHAR(15)
 ActivityCodeCódigo OperaçãoCode OperationSD4.D4_OPERACCHAR(02)TBLInMovMat.WoDetCodeCHAR(10)
 ScriptCodeCódigo RoteiroCode ScriptSD4.D4_ROTEIROSCRIPTCHAR(02)  
 AllocationQuantityQuantidade AlocadaAllocated Quantity

SD4.D4_QUANT 

SDC.DC_QUANT

DEC(12,2)TBLInMovMat.Qty DEC(19,4)
 AllocationTypeTipo AlocaçãoType Allocation

1 = SomaAdds;2=DiminuiDecreases;3=Valor AbsolutoAbsolute Value

CHAR(01)TBLInMovMat.AllocationTypeINT
 SubLoteCodeSub LoteLot

SD4.D4_NUMLOTE

SDC.DC_NUMLOTE

CHAR(06)  
 NumberSeriesNúmero de SerieNumber of SeriesSDC.DC_NUMSERICHAR(20)  
 LotDueDateData de ValidadeValidity DateSD4.D4_DTVALIDDATETBLInMovMat.LotDtValidityDATETIME
ListOfQuotaActivity      
 ProductionOrderNumberNúmero Ordem ProduçãoNumber Production OrderCY9.CY9_NRORPOCHAR(20)  
 ControlTypeSeleção Selection Split--   
 ActivityIDID OperaçãoOperationCY9.CY9_CDATCHAR(10)  
 ItemCodeCódigo do itenCode of itemCYY.CYY_CDACCHAR(15)  
 ItemDescriptionDescrição do Description of itemCYY.CYY_DSACCHAR(40)  
 StartActivityDateTimeData/Hora Início AtividadeDate/Time Start ActivityCYY.CYY_DTBGAT / CYY.CYY_HRBGATDATETIMETBLInWODet.StartPlanDateTimeDATETIME
 EndActivityDateTimeData/Hora Fim AtividadeDate/Time End ActivityCYY.CYY_DTEDAT / CYY.CYY_HREDATDATETIME TBLInWODet.EndPlanDateTimeDATETIME
 ApprovedQuantityQuantidade AprovadaApproved QuantityCYY.CYY_QTATAPDEC(13,4)  
 ScrapQuantityQuantidade RefugadaScrapped QuantityCYY.CYY_QTATRFDEC(13,4)  
 MachineCodeCódigo MáquinaCode MachineCYY.CYY_CDMQCHAR(20)TBLInWODet.ResourceCodeCHAR(15)
 MachineDescriptionDescrição da MáquinaDescription of MachineCYY.CYY_DSMQCHAR(40)  
 ActivityQuantityQuantidade PrevistaEstimated QuantityCYY.CYY_QTATDEC(12,4)TBLInWODet.QTYDEC(19,4)
 StandardSetupTempo Padrão PreparaçãoStandard Time PreparationCYY.CYY_QTPASUNUM(10)  
 StandardActivityTempo Padrão OperaçãoStandard Time OperationCYY.CYY_QTPAATNUM(10)  
 StandardPostprocessingTempo Padrão Pós_processoStandard Time Post_processCYY.CYY_QTPAPPNUM(10)  
 StandardMachineTempo Padrão MáquinaStandard Time MachineCYY.CYY_QTPAMQNUM(10)  
 StandardOperatorTempo Padrão Standard Time MODCYY.CYY_QTPAOENUM(10)  
 UsedCapacityCapacidade UtilizadaCapacity UsedCYY.CYY_QTVMATDEC(12,4)  
 ActivityTimeQuantityHora Disponível AtividadeActivity Available TimeCYY.CYY_HRDICHAR(08)  
 ReportQuantityQuantidade ReportadaReported QuantityCYY.CYY_QTATRPDEC(13,4)  
 ReworkQuantityQuantidade RetrabalhadaReworked QuantityCYY.CYY_QTATRTDEC(12,4)  
 StartSetupDateTimeData/Hora Início PreparaçãoDate/Time Start SetupCYY.CYY_DTBGSU / CYY.CYY_HRBGSUDATETIME  
 EndSetupDateTimeData/Hora Fim PreparaçãoDate/Time End SetupCYY.CYY_DTEDSU / CYY.CYY_HREDSUDATETIME  
 TimeSetupTempo PreparaçãoTime SetupCY9.CY9_QTTESUNUM(10)TBLInWODet.SetUpTimeTINYINT
 TimeMachineTempo MáquinaMachine TimeCY9.CY9_QTTEMQNUM(10)TBLInWODet.StdSpeedDEC(28,23)
 TimeOperatorTempo Time MODCY9.CY9_QTTERCNUM(10)  
 TimePostprocessingTempo Pós ProcessoPost Process TimeCY9.CY9_QTTEPPNUM(10)  
 QuotaActivityIDID SplitCYY.CYY_IDATQOCHAR(05)

ActivityCode+

TBLInWODet.WODetCode
CHAR(10)
 WorkCenterCodeCentro de TrabalhoWork CenterCY9.CY9_CDCETRCHAR(10)TBLInWODet.ManagerGrpCodeCHAR(15)
 ReportedSplitReported Split ReportadoCYY.CYY_LGQORPBOOELAN  
 StatusActivityTypeEstado OperaçãoState OperationCYY.CYY_TPSTATCHAR(01)  
(mais) ListOfQuotaActivityTools      
 ToolCodeFerramentaToolCYY.CYY_CDFECHAR(20)  
 ToolQuantityQuantidade FerramentaQuantity ToolCYY.CYY_QTFENUM(03)  
Nota
titleNotaNote:
    • 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
    • O The co-produto será enviado ao product is sent to 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 the 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 with negative quantity, then the ERP understands that it is the input of a co-product in stock. The type of transaction for co-product, it is registered in the PCPA109 and must have content lower than 500, as it is an input and must be type RETURN and the field Update Allocation must be yes (routine MATA230).
    •  A tag TimeIndMES deve ser gerada como '3'. 

...

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


Nota
titleNotaNote:

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


MensagemMessageTagDescriçãoDescription

TabelaTable/CampoField

Protheus PCP

Tabela CampoTable Field

Protheus SFC

TipoTypeTabelaTable/CampoField: PC-FactoryTipo
BusinessContentTypeMachineCodeMáquinaMachineSH6.H6_RECURSORESOURCECYV.CYV_CDMQCHAR(06)TBLOutInteg.ResourceCodeCHAR(15)
 ProductionOrderNumberOrdem de ProduçãoProduction OrderSH6.H6_OPCYV.CYV_NRORPOCHAR(20)TBLOutInteg.WOCodeCHAR(41)
 ActivityCodeOperaçãoOperationSH6.H6_OPERACCYV.CYV_CDATCHAR(02)TBLOutInteg.WODetCodeCHAR(10)
 SplitSplitSH6.H6_DESDOBRCYV.CYV_IDATQOCHAR(04)TBLOutInteg.WODetCodeCHAR(10)
 ActivityIDID OperaçãoOperation----   
 ItemCodeProdutoProductSH6.H6_PRODUTOPRODUCTCYV.CYV_CDACRPCHAR(15)TBLOutInteg.ProductCodeCHAR(20)
 ApprovedQuantityQuantidade AprovadaApproved QuantitySH6.H6_QTDPRODCYV.CYV_QTATAPDEC(11,2)TBLOutInteg.QtyDEC(19,4)
 ScrapQuantityQuantidade RefugadaScrapped QuantitySH6.H6_QTDPERDCYV.CYV_QTATRFDEC(11,2)TBLOutInteg.QtyDEC(19,4)
 ReworkQuantityQuantidade RetrabalhadaReworked Quantity----   
 StartSetupDateTimeData/Hora Início PreparaçãoDate/Time Start Setup--

CYV_DTBGSU

CYV_HRBGSU

DATETIME  
 EndSetupDateTimeData/Hora Fim PreparaçãoDate/Time End Setup--

CYV_DTEDSU

CYV_HREDSU

DATETIME  
 SetupCodeCódigo PreparaçãoSetup Code--CYV_CDSUCHAR(10)  
 OpTimeIntTempo OperaçãoOperation Time--CYV.CYV_QTTERPNUM(10)  
 ProductionShiftCodeCódigo Modelo TurnoCode Shift Model--CYV.CYV_CDTNCHAR(08)  
 ProductionShiftNumberNúmero TurnoShift Number--CYV.CYV_NRTNCHAR(05)TBLOutInteg.ShiftSMALLINT
 DocumentCodeDocumentoDocument--CYV.CYV_NRDOCHAR(20)TBLOutInteg.DocNumberCHAR(20)
 DocumentSeriesSérie DocumentoSeries Document--CYV.CYV_NRSRCHAR(05)  
 StartReportDateTimeData/Hora Início ReporteDate/Time Start Report

SH6.H6_DATAINI

SH6.H6_HORAINI

CYV.CYV_DTRPBG

CYV.CYV_HRRPBG

DATETIMETBLMSGERP.StartDATETIME
 EndReportDateTimeData/Hora Fim ReporteDate/Time End Report

SH6.H6_DATAFIN

SH6.H6_HORAFIN

CYV.CYV_DTRPED

CYV.CYV_HRRPED

DATETIMETBLMSGERP.EndDATETIME
 ReversedReportEstorno do ApontamentoAnnotation ReversalTRUE ou or FALSETRUE ou FALSEBOOLEAN  
 ReversalDateData do estornoReversal Date--CYV.CYV_DTEODATETBLOutInteg.DTEvDATETIME
 ReportDateTimeDataDate/Hora ReporteTime ReportSH6.H6_DTAPONT

CYV.CYV_DTRP

CYV.CYV_HRRP

DATETIMETBLOutInteg.DtEvDATETIME
 WarehouseCodeCódigo DepósitoDepositSH6.H6_LOCALCYV.CYV_CDDPCHAR(02)TBLOutInteg.WarehouseCodeCHAR(15)
 LotCodeLoteLot/SérieSeriesSH6.H6_LOTECTLCYV.CYV_CDLOSRCHAR(10)TBLOutInteg.LotCodeCHAR(41)
 LotDueDateData Validade LoteDate Validity LotSH6.H6_DTVALIDCYV.CYV_DTVDLODATE

TBLLot.DtValidity

DATETIME
 CloseOperationEncerra OperaçãoClose OperationSH6.H6_PTCYV.CYV_LGEDRPBOOLEAN  
 LocationCodeLocalizaçãoLocation--CYV.CYV_CDLCCHAR(20)TBLOutInteg.Address1CodeCHAR(15)
ListOfReversalAppointments       
 IntegrationReportRegistro a ser estornadoRecord to be reversed  CHAR(10)TBLOutInteg.TransacTypeTINYINT
 ReversalTypeTipo do EstornoType of Reversal  CHAR(01)  
 ReversalQuantityQuantidade revertidaQuantity reverted-- DEC(18,4)  
WasteAppointment       
 WasteCodeCódigo RefugoCode Scrap

SBC.BC_MOTIVOREASON

CY0.CY0_CDRFCHAR(02)TBLOutInteg.ScrapCodeCHAR(15)
 WasteDescriptionDescrição RefugoDescription Scrap

SBC.BC_DESCRI

CY0.CY0_DSRFCHAR(40)  
 ScrapQuantityQuantidade RefugadaScrapped Quantity

SBC.BC_QUANT

CY0.CY0_QTRFDEC(11,2)TBLOutInteg.QtyDEC(18,4)
 ScrapProductProduto RefugadoScrapped ProductSBC.BC_PRODUTOPRODUCT--CHAR(15)  
 WareHouseCodeDepósito Produto RefugadoDeposit Scrapped ProductSBC.BC_LOCORIG--CHAR(10)  
 ScrapProductToRefugo GeradoGenerated ScrapSBC.BC_CODDEST--CHAR(15)  
 WareHouseCodeToDepósito do Refugo geradoDeposit of generated scrapSBC.BC_LOCAL--CHAR(10)  
 AdressCodeEndereço OrigemOrigin AddressSBC.BC_LOCALIZ CHAR(15)  
 AdressCodeToEndereço DestinoDestination AddressSBC.BC_LOCDEST CHAR(15)  
 NumberSeriesNúmero de SérieNumber of SeriesSBC.BC_NUMSERI CHAR(20)  
 NumberSeriesToNúmero de Série DestinoNumber of Series DestinationSBC.BC_NSEDEST CHAR(20)  
 LotCodeLoteLotSBC.BC_LOTECTL CHAR(10)  
 SubLoteCodeSub LoteLotSBC.BC_NUMLOTE CHAR(06)  
 LotDueDateData de ValidadeValidity DateSBC.BC_DTVALID DATE  
 CostCenterCodeCentro de CustoCost CenterSBC.BC_CC CHAR(09)  
ResourceAppointment       
 OperatorCodeCódigo OperadorOperator Code--CYW.CYW_CDOECHAR(20)TBLOutInteg.UserCodeCHAR(30)
 StartDateTimeDataStart Date/Hora InícioTime--

CYW.CYW_DTBGRP

CYW.CYW_HRBGRP

DATETIMETBLMSGERP.StartDATETIME
 EndDateTimeDataEnd Date/Hora FimTime--

CYW.CYW_DTEDRP

CYW.CYW_HREDRP

DATETIMETBLMSGERP.EndDATETIME
 MOBTimeTempo Mão de Obra DiretaTime Direct Labor--CYW.CYW_QTTEOENUM(10)  
 ExtraTimeTempo Extra Time--CYW.CYW_QTTEEXNUM(10)  
 UtilTimeTempo ÚtilUseful Time--CYW.CYW_QTTEUTNUM(10)  
 ProductionShiftCodeCódigo Modelo TurnoCode Shift Model--CYW.CYW_CDTNCHAR(08)  
 ProductionShiftNumberNúmero TurnoNumber Shift--CYW.CYW_NRTNCHAR(05)TBLOutInteg.ShiftSMALLINT
SupplyOrder       
 ProductionOrderNumberNúmero Ordem ProduçãoNumber Production OrderSD3.D3_OPCZP.CZP_NRORPOCHAR(20)

TBLOutInteg.WOCode

CHAR(41)
 MaterialCodeCódigo Code Reservation Item ReservaSD3.D3_CODCZP.CZP_CDMTCHAR(15)TBLOutInteg.ProductCodeCHAR(20)
 UsedQuantityQuantidade UtilizadaQuantity UsedSD3.D3_QUANTCZP.CZP_QTRPPODEC(12,2)TBLOutInteg.Qty DEC(19,4)
 WarehouseCodeCódigo DepósitoCode DepositSD3.D3_LOCALCZP.CZP_CDDPCHAR(02)TBLOutInteg.WarehouseCodeCHAR(15)
 LocationCodeLocalizaçãoLocationSD3.D3_LOCALIZCZP.CZP_CDLCCHAR(15)TBLOutInteg.Address1CodeCHAR(15)
 LotCodeLoteLot/SérieSeries

SD3.D3_LOTECTL

ou

SD3.D3_NUMSERI

CZP.CZP_CDLOCHAR(20)TBLOutInteg.LotCodeCHAR(41)
 ActivityCodeCódigo OperaçãoCode Operation--CZP.CZP_CDATCHAR(02)TBLOutInteg.WODetCodeCHAR(10)
 ScriptCodeRoteiroScript--CZP.CZP_CDRTCHAR(02)  
ReportToolActivity       
 ToolCodeCódigo FerramentaCode Tool--CZ0.CZ0_IDFECHAR(20)  
Nota
titleNotaNote:
    • 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 The subproduct is handled in the ListOfWasteAppointments, tags ScrapProduct e and ScrapProductTo. As movimentações dependem da parametrizaçãoThe movements depend on the parameterization(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 of MATA685, indicating whether the origin product is consumed. Do not enter scrapped products generated scrap. In this case, register only the defects.
      For the subproduct to be generated, the parameter MV_DIGIPER, must be set as '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 For Reuse, the generated Scrap must be the same product of the order. In this case, only the deposit will change, in which there will be a own location to store the scrap. This functionality is for companis that resue the finished product with defect (without generating subproduct) in the composition of other product. For this case, the deposit of the scrap can be parameterized in PCPA109. The movements depend on the parameterization (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 destinoIf this parameterization is 'S' the routine will download the balance of the product/origin location and add/generate the balance of the product/destination location. If 'N', it will only update the balance of the product/destination location.


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 For the annotation, the type of movement is the one in the parameter MV_TMPAD, para o for SIGAPCP e and SIGASFC.
    Quando When back-flush, usará os tipos de movimentos padrões da rotinait uses the types of standard movements of the routine.
  • In PC Factory, batch and number of series are not used at the same time. O retorno desse conteúdo será via The return of this content is through tag SupplyOrder - LotCode, que pode ser o Lote ou número de série, conforme o cadastro do which can be the Lot or number of series, according to register of 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

...

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

 

Nota
titleNotaNote:

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

MensagemMessageTagDescriçãoDescription

TabelaTable/CampoField

Protheus PCP

TabelaTable/CampoField

Protheus SFC

TipoTypeTabelaTable/CampoField: PC-FactoryTipoType
 MachineCodeCódigo MáquinaMachine CodeSH6.H6_RECURSORESOURCECYX.CYX_CDMQCHAR(06)TBLOutRSEv.ResourceCodeCHAR(15)
 MachineDescriptionDescrição MaquinaMachine Description     
 StopReasonCodeCódigo Motivo ParadaCode Reason StoppageSH6.H6_MOTIVOREASONCYX.CYX_CDSPCHAR(02)TBLOutRSEv.ResourceStatusCodeCHAR(20)
 StopReasonDescriptionDescrição Motivo ParadaDescription Reason StoppageSX5.X5_DESCRI *CYX.CYX_DSSPCHAR(40)  
 StartDateTimeDataSt Date/Hora InícioTime

SH6.H6_DATAINI

SH6.H6_HORAINI

CYX.CYX_DTBGSP

CYX_HRBGSP

DATETBLOutRSEv.ShiftDtStartDATETIME
 EndDateTimeDataEnd Date/Hora FimTime

SH6.H6_DATAFIN

SH6.H6_HORAFIN

CYX.CYX_DTEDSP

CYX.CYX_HREDSP

DATETBLOutRSEv.ShiftDtEndDATETIME
 OperatorCodeCódigo OperadorOperator CodeSH6.H6_OPERADOCYX.CYX_CDOECHAR(20)TBLOutRSEv.UserCodeStartCHAR(30)
 ReportDateTimeDataReport Date/Hora ReporteTimeSH6.H6_DTAPONTCYX.CYX_DTRPDATETBLOutRSEv.DtTimeStampDATETIME
 ToolCodeCódigo FerramentaCode Tool-- CYX.CYX_CDFEPO   
 ProductionTeamCodeCódigo EquipeCode Team--CYX.CYX_CDGROE   
 StopTypeTipo Parada Type Stoppage (1=Não ProgramadaNot Scheduled;2=ProgramadaScheduled)--CYX.CYX_TPSP   
 ReportSequenceID PC-Factory---- TBLOutRSEv.IDOutRSEv 
Nota
titleNotaNote:
  • 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. 

...

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

 

 

Request

MensagemMessage
Tag
DescriçãoDescription
TipoType
ListOfRequestItemInternalIdCódigo do produtoCode of productCHAR(15)
 ReferenceCodeReferênciaReferenceCHAR(20)
 WarehouseInternalIdCódigo do depósito/local de estoque/ArmazémCode of deposit/location of stock/WarehouseCHAR(10)
 LotNumberLoteLotCHAR(10)
 SubLotCodeSubLoteSubLotCHAR(10)
 SerialNumberNúmero de SérieNumber of SeriesCHAR(20)
 AddressLocalizaçãoLocationCHAR(15)
 LotExpirationDateData de ValidadeValidity DateDATE
Nota
titleNotaNote:
    • 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

MensagemMessage
Tag
DescriçãoDescription
TabelaTable/CampoField
TipoType
ReturnContentTypeClosingStockDateData fechamento estoqueStock closing date-- 
ListOfReturnItemCompanyIdEmpresaCompany  
 BranchIdFilialBranch  
 CompanyInternalIdEmpresa Company + FilialBranch  
 ItemInternalIdCódigo do produtoCode of productSB2.B2_CODCHAR(15)
 ReferenceCodeReferenciaReference-- 
(mais) ListOfStockBalance    
 WarehouseInternalIdLocal de Estoque (Armazém/DepósitoLocation of Stock (Warehouse/Deposit)SB2.B2_LOCALCHAR(10)
 LotNumberNúmero do LoteNumber of LotSB8.B8_LOTECTL CHAR(10)
 SubLotCodeSub LoteLotSB8.B8_NUMLOTECHAR(10)
 LotExpirationDateData de validadeValidity DateSB8.B8_DTVALIDDATE
 SerialNumberNúmero de sérieNumber of seriesSBF.BF_NUMSERI CHAR(20)
 AddressLocalizaçãoLocationSBF.BF_LOCALIZCHAR(15)
 CurrentStockAmountSaldo do Produto em quantidadeBalance of Product in quantity

SB2.B2_QATU

SB8.B8_SALDOBALANCE

SBF.BF_QUANT

DEC(17,4)
 BookedStockAmountQuantidade reservada em EstoqueQuantity reserved in Stock

SB2.B2_RESERVARESERVATION

SB8.B8_EMPENHOALLOCATION

SBF.BF_EMPENHOALLOCATION

DEC(17,4)
 AvailableStockAmountSaldo disponível do Produto em quantidadeBalance available of Product in quantity

SB2.B2_QATU - SB2.B2_RESERVARESERVATION

SB8.B8_SALDO - SB8.B8_EMPENHOALLOCATION

SBF.BF_QUANT - SBF.BF_EMPENHOALLOCATION

DEC(17,4)
 UnitItemCostCusto unitário do ProdutoUnitary cost of Product-- 
 AverageUnitItemCostCusto médio do ProdutoAverage cost of Product-- 
 ValueOfCurrentStockAmountSaldo atual do estoque do produto em valorCurrent balance of stock of product 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.

 
MensagemMessage
Tag
DescriçãoDescription
TabelaTable/CampoField
TipoType
TabelaTable/CampoField: PC-Factory
TipoType
BusinessContentTypeCompanyIdCódigo da empresaCode of company    
 BranchIdFilialBranch    
 CompanyInternalIdInternalId da chave completa da empresaof full key of the company    
 InternalIdInternalId da movimentaçãoof movement.    
 TypeMovementCodeCódigo do Tipo de Movimento internoCode of Type of internal movementSD3.D3_TMCHAR(03)  
 EmissionDateData de EmissãoDate of IssueSD3.D3_EMISSAOISSUEDATETBLOutInteg. DtTimeStampDATETIME
 ItemCodeCódigo do ProdutoCode of ProductSD3.D3_CODCHAR(15)

TBLOutInteg.ProductCode

CHAR(20)
 UnitOfMeasureCodeUnidade de MedidaUnit of MeasureSD3.D3_UMCHAR(02)  
 QuantityQuantidadeQuantitySD3.D3_QUANTDEC(12,2)

TBLOutInteg.Qty

DEC(19,4)
 WarehouseCodeCódigo do ArmazémCode of WarehouseSD3.D3_LOCALCHAR(02)

TBLOutInteg.WarehouseCode

CHAR(15)
 LotNumberLoteLotSD3.D3_LOTECTLCHAR(10)

TBLOutInteg.LotCode

CHAR(41)
 SubLotNumberSubLoteSubLotSD3.D3_NUMLOTECHAR(06)  
 LotExpirationDateData Validade do LoteLot Validity DateSD3.D3_DTVALIDDATE

TBLLot.DTDUE

DATETIME
 AddressEndereçoAddressSD3.D3_LOCALIZCHAR(15)

TBLOutInteg.Address1Code

CHAR(15)
 NumberSeriesNumberSeriesSD3.D3_NUMSERICHAR(20)

TBLOutInteg.LotCode

CHAR(41)
 InputOrOutputMovimento de Entrada ou SaídaInput or Output MovementI=Input / O = OutputE=Entrada / S = SaídaCHAR(01)

TBLOutInteg.MovTypeCode

CHAR(05)
 ReferenceCodeReferênciaReference--   
 ScriptCodeRoteiroScriptSD4.D4_ROTEIROSCRIPTCHAR(02)  
 ActivityCodeOperaçãoOperationSD4.D4_OPERACCHAR(02)

TBLOutInteg.WODetCode

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

TBLOutInteg.WOCode

CHAR(41)
 FatherItemCodeParent Item Pai--  
       
Nota
titleNotaNote:
  • 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.

...

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

 

 

MensagemMessage
Tag
DescriçãoDescription
TabelaTable/CampoField
TipoType
TabelaTable/CampoField: PC-Factory
TipoType
BusinessContentTypeCompanyIdEmpresaCompany    
 BranchIdFilialBranch    
 CompanyInternalIdInternalId da chave completa da empresaof full key of the company    
 InternalIdInternalId da transferênciaof transfer    
 NumberNúmero da MovimentaçãoNumber of MovementSD3.D3_NUMSEQCHAR(06)  
 RegisterDateTimeData de Emissão da solicitaçãoDate of Issue of RequestSD3.D3_EMISSAOISSUEDATE  
TransferWarehouseType      
 InternalIdInternalId da transferênciaof transfer    
 EmissionDateData de EmissãoIssue DateSD3.D3_EMISSAOISSUEDATE

TBLOutInteg.DtTimeStamp

DATETIME
 ItemCodeFromItem/Produto OrigemProduct OriginSD3.D3_CODCHAR(15)

TBLOutInteg.ProductCode

CHAR(20)
 ItemCodeToItem/Produto DestinoProduct DestinationSD3.D3_CODCHAR(15)

TBLMovEv.ProductCode

CHAR(20)
 UnitOfMeasureFromUnidade de Medida OrigemUnit of Measure OriginSD3.D3_UMCHAR(02)  
 UnitOfMeasureToUnidade de Medida DestinoUnit of Measure DestinationSD3.D3_UMCHAR(02)  
 QuantityQuantidadeQuantitySD3.D3_QUANTDEC(12,2)

TBLOutInteg.Qty

DEC(19,4)
 WarehouseCodeFromCódigo do Armazém de OrigemCode of Origin WarehouseSD3.D3_LOCALCHAR(02)

TBLOutInteg.WarehouseCode

CHAR(15)
 WarehouseCodeToCódigo do Armazém DestinoCode of Destination WarehouseSD3.D3_LOCALCHAR(02)

TBLMovEv.WarehouseCode

CHAR(15)
 LotNumberFromNúmero do Lote de OrigemNumber of Origin LotSD3.D3_LOTECTLCHAR(10)

TBLOutInteg.LotCode

CHAR(41)
 LotNumberToNúmero do Lote de DestinoNumber of Destination LotSD3.D3_LOTECTLCHAR(10)

TBLMovEv.LotCode

CHAR(41)
 SubLotNumberNúmero do SubLoteNumber of SubLotSD3.D3_NUMLOTECHAR(06)  
 LotExpirationDateFromData de validade do Lote OrigemValidity Date of Origin LotSD3.D3_DTVALIDDATE

TBLLot.DtDue

DATETIME
 LotExpirationDateToData de validade do Lote DestinoValidity Date of Destination LotSD3.D3_DTVALIDDATE

TBLLot.DtDue

DATETIME
 AddressFromEndereço OrigemOrigin AddressSD3.D3_LOCALIZCHAR(15)

TBLOutInteg.Address1Code

CHAR(15)
 AddressToEndereço DestinoDestination AddressSD3.D3_LOCALIZCHAR(15)

TBLOutInteg.Address2Code

CHAR(15)
 NumberSeriesNúmero de sérieNumber of SeriesSD3.D3_NUMSERICHAR(20)

TBLOutInteg.LotCode

CHAR(41)
Nota
titleNotaNote:
  • 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.

 

Transação RecusaTransaction Refusal:  Refusal_1_000.xsd
Identificador da Mensagem Identifier of Message: Refusal
Versão Version: 1_000
Módulo Module 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:

Type of Delivery: Synchronous

This message is used to register the losses of production when good spare parts are registered, then later a defect is verified. It can be used to register the losses of raw material.

 

Note:

This message is generated by PC-Factory and sent to Esta mensagem será gerada pelo PC-Factory e enviada ao Protheus.

 

 

MensagemMessage

Tag

DescriçãoDescription

TabelaTable/CampoField

TipoType

TabelaTable/CampoField: PC-Factory

TipoType

BusinessContentType

ProductionOrderNumberOrdem

de ProduçãoProduction Order

SBC.BC_OP

CHAR(20)

 

 

 

IdReport

ID ApontamentoAnnotation

 

CHAR(10)

 

 

 

ItemCodeProduto

RecusadoRefused Product

SBC.BC_PRODUTOPRODUCT

CHAR(20)

 

 

 

WarehouseCodeCódigo

do depósitoDeposit Code

SBC.BC_LOCORIG

CHAR(02)

 

 

 

AddressCode

EndereçoAddress

SBC.BC_LOCALIZ

CHAR(15)

 

 

 

NumberSeries Número

de SérieSeries Number

SBC.BC_NUMSERI

CHAR(20)

 

 

 

TypeTipo

PerdaType Loss

SBC.BC_TIPO

CHAR(01)

 

 

 

WasteCodeMotivo de Perda

Reason of Loss

SBC.BC_MOTIVOREASON

CHAR(02)

 

 

 

WasteDescriptionDescrição da Perda

Description of Loss

SBC.BC_DESCRI

CHAR(40)

 

 

 

LossQuantityQuantidade de Perda

Quantity of Loss

SBC.BC_QUANT

DEC(11,2)

 

 

 

CostCenterCodeCentro

de CustoCost Center

SBC.BC_CC

CHAR(09)

 

 

 

ItemCodeToProduto

GeradoProduct Generated

SBC.BC_CODDEST

CHAR(20)

 

 

 

WarehouseCodeToCódigo do depósito Destino

Code of Destination deposit

SBC.BC_LOCAL

CHAR(02)

 

 

 

AdressCodeToEndereço

DestinoDestination Address

SBC.BC_LOCDEST

CHAR(15)

 

 

 

NumberSeriesToNr

. de Série DestinoNo. of Destination Series

SBC.BC_NSEDEST

CHAR(20)

 

 

 

QuantityToQuantidade

destinoDestination Quantity

SBC.BC_QTDDEST

DEC(11,2)

 

 

 

ActivityCode

OperaçãoOperation

SBC.BC_OPERAC

CHAR(10)

 

 

 

ResourceCode

MáquinaMachine/RecursoResource

SBC.BC_RECURSORESOURCE

CHAR(20)

 

 

 

LossDateData da Perda

Date of Loss

SBC.BC_DATADATE

DATE

 

 

 

LotCode

LoteLot

SBC.BC_LOTECTL

CHAR(10)

 

 

 

SubLotCode

SubLoteSubLot

SBC.BC_NUMLOTE

CHAR(06)

 

 

 

LotDueDateData

de ValidadeValidity Date

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:

 

This message will have the following purposes: 
Loss of Finished Product entering destination product:
Enables you to change certain amount that has already been registered and is in stock as good. It is called refusal of finished product, as you do not need to perform reversal and adjustment of annotation.
Example: OP of 50 units, 5 annotations of 10, Need of adjustment of 45 spare parts with deffects and 5 good.

Instead of reversing 5 annotation and register again 5 good ones and 45 scraps in ProductionAppointment, a Refusal message can be sent for OP, indicating the reason of refusal/defect and code of destination product.

Loss of Raw Material:

The message of refusal is also used to register loss of raw material during the productive process. The raw material can generated a subproduct or not.

Loss of Finished Product without entering destination product:

Used to enter the loss of finished product, without being necessary to generate the destination tags.

 

Note:

  • Routine MATA685 is executed
  • The tag IdReport is not mandatory. It indicates the production report that must be updated (Not used for Protheus)
  • The tag Type, indicates whether it is Scrap. 1 = No ; 2= Yes
  • 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

...