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.

...

The aim of the PC Factory Integration (MES software of company PPI Multitask) X PCP PROTHEUS is to make available to TOTVS customers a new option to control the production through the automation of processes, enabling the updating and extraction of online information to simplify the customers flow.

 

Scope

 Image Added

 

Enables the integration between the PCP module of SIGASFC Protheus with MES PC-Factory of PPI Multitask, aiming at controlling the annotation of production orders. Protheus is responsible by the creation of production orders and the PC-Factory with annotation.

...

  1. Parameterization: Enables to parameterize the use of integration, indicating if it is ACTIVE. Indicates whether there is generation of XML files of information that is transferred between the systems, and also enables to define filters that are applied to information.
  2. Integrators: Adapters are functions responsible for sending or receiving information that is transferred between Protheus and PC Factory systems. Integration contemplates the following information: Product, stock location, resource, machine, tools, script, structure, address, production order, balance in stock, movements and transfer of stock, annotation or production and stoppage annotation.
  3. Pendencies: Enables to manage the pendencies of PCP Protheus delivery to PC-Factory as well as to check the history and errors of integration process.
  4. WebService: Enables to process the annotation of production and stoppage sent from PC-Factory to Protheus;
  5. Synchronization: Enables to execute the synchronization of data from Protheus and PC-Factory. Able to send data from Products, Stock Location, Resource, Machine, Script, Structure, Address, Balance in Stock and Production Order.
  6. Import Log: Enables to query the integration process of annotation of production and stoppage sent from PC-Factory to Protheus.


Nota
titleNote:

Integration does not contemplate the generation of orders by APS.

Install/Implement/Use Requirements

...

Selecting the field Generate XML, the XML of the exchanged messages is generated. If you do not select it, the system saves it only in tables. You are not required to create files. It works as a useful tool to find problems and it can be saved in XML directory successfully sent or pending XMLs.
The file names follow these standard:

OK_<MSG>_<DATAHORA>_<REGISTRO>
PEND_<MSG>_<DATAHORA>_<REGISTRO>
ERR_<MSG>_<DATAHORA>_<REGISTRO>
Where: OK - Message sent with no problems
           PEND- Message not sent
           ERR - Message sent, but returned with error.
          MSG - Name of message. Ex.: Item, Wharehouse, Workcenter, etc.
           DATETIME: Date and Time of sending
           RECORD: Record code being sent. Ex.: Item code, order number, etc.

...

All lines are responsible for support to integration resources; hence, the support teams of RM Connector and Protheus® Back Office products are ready to make the first analysis and, whenever needed, to transfer it to the fittest team in each case.


Nota
titleNote:

This support model is being reviewed by TOTVS.


Transactions/Entities/Singles Messages

The following transactions are exchanged between TOTVS and PPI-Multitask:

Image Added

 

Method

ID

Description

Source

Target

XSD (versions may vary)

Programs

Table

Files

01

Product

Protheus

PC-Factory

Item_3_001.xsd

MATA010

SB1

02

Stock Location

Protheus

PC-Factory

Warehouse_1_001.xsd

AGRA045

NNR

03

Machines

Protheus

PC-Factory

Machine_1_000.xsd

MATA610

SFCA002

SH1

CYB

04

Resources

Protheus

PC-Factory

Resource_1_000

MATA620

SFCA006

SH4

CYH

05

Structure

Protheus

PC-Factory

ItemStructure_1_000

MATA200

SG1

06

Script

Protheus

PC-Factory

 ItemScript_1_000

MATA632

MATA637

SG2

07

Production Order

Protheus

PC-Factory

ProductionOrder_2_001.xsd

MATA650

MATA651

MATA380

MATA381

MATA690

MATA712

PCPA107

SFCA310

SC2

08

Address

Protheus

PC-Factory

 AddressStock_1_000

MATA015

SBE

09

Stock

Protheus

PC-Factory

ItemStockLevel_1_000

B2ATUCOMD1

B2ATUCOMD2

B2ATUCOMD3

MATA220

MATA805

SB2

SB8

SBF

Processes

09

Stoppage Reason

PC-Factory

Protheus

StopReason_1_000

CFGX016

SFCA004

SX5

CYN

10

Scrap Reason

PC-Factory

Protheus

WasteReason_1_000

CFGX016

SFCA003

SX5

CYO

11

Production Annotation

PC-Factory

Protheus

ProductionAppointment_1_001

MATA681

SFCA316

SH6

SD3

CYV

12

Stoppage Annotation

PC-Factory

Protheus

StopReport_1_001

MATA682

SFCA311

SH6

CYX

13

Estoque - Request

PC-Factory

Protheus

StockLevel_2_00

 

SB2

SB8

SBF

14

Movements

PC-Factory

Protheus

 MovementsInternal_1_001

MATA240

MATA250

SD3

15

Transfer

PC-Factory

Protheus

TransferWarehouse_1_001

MATA261

SD3

Information Flow

Transactions information flow:

...

  • Scripts
  • Structure
  • Address
  • Movimentos e transferência
    Os movimentos de estoque, entrada ou saída e também as transferências são arquivos recebidos pelo Protheus. Não necessita de filtros, porém deverão ser criados alguns parâmetros para o processamento. São eles:
    Type of Input Movement: Use field SOE.OE_VAR1
    Type of Output Movement: Use field SOE.OE_VAR2
    These types of movements are registered in MATA230
  • Stock balance
    For Stock balance folder, the option has three filters. Table SB2, SB8 and SBF.  
    It can also indicate in which process of movement, balance is sent to PC-Factory
    Where: 
    Inbound Invoice: SOE.OE_VAR1 (Marked = 1; Unmarked = 0 )
    Sale Invoice     : SOE.OE_VAR2 (Marked = 1; Unmarked = 0 )
    Internal movements: SOE.PARINTG (Marked = 1; Unmarked = 0 )
    Balance Implementation: SOE_OE_VAR3(Marked = 1; Unmarked = 0 )
    These options are valid only for sending from Protheus to PC-Factory. For request (request of PC-Factory) will not have filters.

  

Image Added

Synchronization - PCPA111

The synchronization is the process that is used to populate or update the base of PC-Factory with data from Protheus. It will work the same manner the other routines of integration do, by integrating a XML message to WebService of PC-Factory, following the parameterizations defined in PCPA109. The only difference is that all data of the table being integrated are viewed (following the filters) instead of only one record.

  

Image Added

 

Pendencies - PCPA110

...

  • Reprocess: 
    For each line selected, the messages must be sent.
  • Delete
    Delete selected records
  • Save XML
    This option enables to save the XML in a directory location of the machine that is processing the pendencies routine.
  • Update
    Redo the search of records, updating data on screen

  

Image Added

Import Log - PCPA112

...

  • Production annotation
  • Stoppage annotation
  • Scrap Reason
  • Stoppage Reason
  • Stock movements
  • Transfer

  

Image Added

 

Messages

Registers

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

 

Message

Tag

Description

Table/Field: Protheus

Type

Table/Field: PC-Factory

Type

BusinessContentType

CompanyId 

Logged Company Code

 

 

CHAR(02)

 

 

 

BranchId 

Branch Code

 SB1.B1_FILIAL

CHAR(02)

 

 

 

CompanyInternalId

Company+Branch

 COMPANY + SB1.B1_FILIAL

 

 

 

 

Code 

Product code

SB1.B1_COD

CHAR(15)

 

 

 

Name 

Product Description

SB1.B1_DESC

CHAR(30)

 

 

 

InternalId

Company+branch+product code

COMPANY + SB1.B1_FILIAL + SB1.B1_COD

 

 

 

 

ShortName 

Short name

SB1.B1_DESC

CHAR(30)

 

 

 

Active 

Active item?

SB1.B1_ATIVO

CHAR(01)

 

 

 

UnitOfMeasureCode 

Unit of Measurement:

SB1.B1_UM

CHAR(02)

 

 

 

UnitOfMeasureInternalId

Company+branch+unit or measure

COMPANY + SB1.B1_FILIAL + SB1.B1_UM

 

 

 

 

StockGroupCode

Inventory Group

SB1.B1_GRUPO

CHAR(04)

 

 

 

StockGroupInternalId

Company+branch+stock group

COMPANY + SB1.B1_FILIAL + SB1.B1_GRUPO

 

 

 

 

StockGroupDescription

Stock Group Description

SBM.BM_DESC

CHAR(30)

 

 

 

StandardWarehouseCode

Stock Location

SB1.B1_LOCPAD

CHAR(02)

 

 

 

StandardWarehouseInternalId

Company+branch+stock location

COMPANY + SB1.B1_FILIAL + SB1.B1_LOCPAD

 

 

 

 

StandardWarehouseDescription

Stock Location Description

NNR.NNR_DESCRI

CHAR(40)

 

 

 

EconomicLot 

Economic Lot

SB1.B1_LE

DEC(12,2)

 

 

 

MinimumLot 

Minimum Lot

SB1.B1_LM

DEC(12,2)

 

 

 

FamilyCode 

Family

SB1.B1_FPCOD

CHAR(10)

 

 

 

FamilyInternalId

Company+branch+family

COMPANY + SB1.B1_FILIAL + SB1.B1_FPCOD

 

 

 

 

FamilyDescription 

Family Description

SYC.YC_NOME

CHAR(40)

 

 

 

NetWeight

Item Weight

SB1.B1_PESO

DEC(11,4)

 

 

 

GrossWeigh

Gross Weight

SB1.B1_PESBRU

DEC(11,4)

 

 

 

Trail

Trace

SB1.B1_RASTRO

CHAR(01)

 

 

 

BinControl

Controls Address

SB1.B1_LOCALIZ

CHAR(01)

 

 

 

SecondUnitOfMeasureCode

Second Measurement Unit

SB1.B1_SEGUM

CHAR(02)

 

 

 

SecondUnitOfMeasureInternalId

Company+branch+ sec. measure unit

COMPANY + SB1.B1_FILIAL + SB1.B1_SEGUM

 

 

 

 

MultiplicationFactorValue 

Conversion Factor

SB1.B1_CONV

DEC(5,2)

 

 

 

ProductType

Type of Item

SB1.B1_TIPO

CHAR(02)

 

 

 

PackingQuantity 

Package Quantity

SB1.B1_QE

NUM(09)

 

 

 

CostCenterCode

Cost Center

SB1.B1_CC

CHAR(09)

 

 

Nota
title

...

Nota:

If it is an undefined type, it must be saved as GENERIC. Example: Type = SAMPLER.

 

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

 

Message

Tag

Description

Table/Field: Protheus

Type

Table/Field: PC-Factory

Type

BusinessContentType

CompanyId

Company Code

 

CHAR(02)

 

 

 

BranchId

Branch Code

NNR.NNR_FILIAL

CHAR(02)

 

 

 

CompanyInternalId

Company+Branch

COMPANY + NNR.NNR_FILIAL

 

 

 

 

Code

Code of Stock Location(warehouse/deposit)

NNR.NNR_CODIGO

CHAR(02)

 

 

 

InternalId

Company+Branch+location code

COMPANY + NNR.NNR_FILIAL +

NNR.NNR_CODIGO

 

 

 

 

Description

Description of Stock Location (warehouse/deposit)

NNR.NNR_DESCRI

CHAR(20)

 

 

 

Active

Location of Active Stock?

TRUE

CHAR(01)

 

 

 

Type

Type of Stock Location

NNR.NNR_TIPO

CHAR(01)

 

 

 

WarehouseClassification

Classification

NNR.NNR_INTP

CHAR(01)

 

 

...

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

Message

Tag

Description

Table/Field:

Protheus PCP

Table Field:

Protheus SFC

Type

Table/Field: PC-Factory

Type

BusinessContentType

 

 

 

 

 

 

 

 

Code

Machine Code

SH1.H1_CODIGO

CYB.CYB_CDMQ

CHAR(20)

 

 

 

Description

Machine Description

SH1.H1DESCRI

CYB.CYB_DSMQ

CHAR(40)

 

 

 

WorkCenterCode

Work Center Code

SH1.H1_CTRAB

CYB.CYB_CDCETR

CHAR(10)

 

 

 

WorkCenterDescription

Work Center Description

SHB.HB_NOME

CYB.CYB_DSCETR

CHAR(40)

 

 

 

CostCenterCode

Cost Center Code

SH1.H1_CCUST

CYB.CYB_CDCECS

CHAR(20)

 

 

 

ProcessorType

Type of Processing

 

CYB.CYB_TPPC

1=Single processing; 2=Batch processing;

3=Multiple Processings;4=Manual

CHAR(01)

 

 

 

LaborType

Type MOD

 

CYB.CYB_TPMOD

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

CHAR(01)

 

 

 

VolumeMachineQuantity

Machine Volume Quantity

 

CYB.CYB_QTVMMQ

DEC(12,4)

 

 

 

EfficiencyMachineValue

Machine Efficiency

 

CYB.CYB_VLEFMQ

DEC(05,2)

 

 

 

OperatorMachineQuantity

Machine Operator Quantity

 

CYB.CYB_QTOEMQ

NUM(02)

 

 

 

SimultaneousActivityQuantity

Simultaneous Operations Quantity

 

CYB.CYB_QTATSM

NUM(03)

 

 

 

IsSetup

Has Setup

 

CYB.CYB_LGSU

BOOLEAN

 

 

 

IsOverlapReport

Overlap annotation

 

CYB.CYB_LGOVRP

BOOLEAN

 

 

 

ProductionAreaCode

Production Area

 

CYB.CYB_CDARPO

CHAR(10)

 

 

 

InitialValidateDate

Validity Start Date

 

CYB.CYB_DTBGVD

DATE

 

 

 

FinalValidateDate

Validity End Date

 

CYB.CYB_DTEDVD

DATE

 

 

ListOfResources

 

 

 

 

 

 

 

 

 ResourceType

Resource Type

 

CYC.CYC_TPRC

1=Operator;2=Tool;

3=Team;4=Equipment

CHAR(01)

 

 

 

ResourceCode

Resource Code

 

CYC.CYC_CDRC

CHAR(20)

 

 

 

ResourceName

Resource Name

 

CYC.CYC_NMRC

CHAR(40)

 

 

 

UnitTimeType

Time Measure Type

 

CYC.CYC_TPUNTE

1 = Hours;2=Minutes;3=Seconds

CHAR(01)

 

 

 

StartExpirationDate

Expiration Start Date

 

CYC.CYC_DTBGVD

DATE

 

 

 

EndExpirationDate

Expiration End Date

 

CYC.CYC_DTEDVD

DATE

 

 

 

CycleQuantity

Number Cycles

 

CYC.CYC_QTCI

DEC(11,4)

 

 

 

IsTimeActivity

Determines time

 

CYC.CYC_LGTEAT

BOOLEAN

 

 

ListOfProductionShifts

 

 

 

 

 

 

 

 

ProductionShiftCode

Shift Model Code

 

CYL.CYL_CDTN

CHAR(08)

 

 

 

ProductionShiftDescription

Shift Model Description

 

CYL.CYL_DSTN

CHAR(40)

 

 

 

BeginDate

Expiration Start Date

 

CYL.CYL_DTVDBG

DATE

 

 

 

EndDate

Expiration End Date

 

CYL.CYL_DTVDED

DATE

 

 

...

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)

 

 

 

Name

Resource Name

SH4.H4_DESCRI

CYH.CYH_NMRC

CHAR(40)

 

 

 

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

 

 

 

EndExpirationDate

End Validity Date

 

CYH.CYH_DTVDED

DATE

 

 

 

UnitCycleQuantity

Units Cycles

 

CYH.CYH_QTUNCI

NUM(07)

 

 

 

ToolCode

Tool

 

CYH.CYH_CDMPRC

CHAR(15)

 

 

 

ToolDescription

Tool Description

 

CYH.CYH_DSMPRC

CHAR(40)

 

 

Nota
title

...

Nota:
  • 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

 

Message

Tag

Description

Table/Field: Protheus

Type

Table/Field: PC-Factory

Type

BusinessContentType

CompanyId

Company Code

 

CHAR(02)

 

 

 

CompanyInternalId

Company+Branch

COMPANY + SG1.G1_FILIAL

 

 

 

 

ItemInternalId

Company+Branch+parent item code

COMPANY + SG1.G1_FILIAL +

SG1.G1_COD

 

 

 

 

ItemCode

Parent Item Code

SG1.G1_COD

CHAR(15)

 

 

 

ItemAmount

Base quantity of parent item

SB1.B1_QB

NUM(07)

 

 

ItemComponentType

 

 

 

 

 

 

 

ItemSequence

Component sequence

SG1.G1_TRT

NUM(05)

 

 

 

ItemComponentCode

Component item code

SG1.G1_COMP

CHAR(15)

 

 

 

ItemComponentInternalId

Internal Id of Component Item

COMPANY +SG1.G1_FILIAL +SG1.G1_COMP

 

 

 

 

InitialDate

Start validity date

SG1.G1_INI

DATE

 

 

 

FinalDate

End Validity Date

SG1.G1_FIM

DATE

 

 

 

IsGhostMaterial

Indicates if is ghost

SB1.B1_FANTASM

CHAR(01)

 

 

 

ItemComponentAmount

Component Item Quantity

SG1.G1_QUANT

DEC(12,6)

 

 

 

LossFactor

Loss factor

SG1.G1_PERDA

DEC(05,2)

 

 

 ListOfScript

 

 

 

 

 

 

 

Scriptcode

Script Code

SGF.GF_ROTEIRO

CHAR(02)

 

 

 

ScriptAlternative

Script Alternative

--

 

 

 

 

ActivityIntenalID

Operation ID

--

 

 

 

 

ActivityCode

Operation Code

SGF.GF_OPERAC

CHAR(02)

 

 

 

ActivityComponentSequence

Sequence of component in operation

SGF.GF_TRT

NUM(03)

 

 

 

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

 

Message

Tag

Description

Table/Field: Protheus

Type

Table/Field: PC-Factory

Type

BusinessContentType

ItemCode

Item code

SG2.G2_PRODUTO

CHAR(15)

 

 

 

ItemDescription

Item Description

SB1.B1_DESC

CHAR(40)

 

 

 

ItemInternalId

Company|Branch|Item

COMPANY + SG2.G2_FILIAL +

SG2.G2_PRODUTO

 

 

 

 

ScriptCode

Script Code

SG2.G2_CODIGO

CHAR(02)

 

 

 

ScriptDescription

Script Description

--

CHAR(40)

 

 

 

ScriptAlternative

Alternative Script

--

CHAR(02)

 

 

ListOfActivity

 

 

 

 

 

 

 

ActivityInternalID

Operation ID

SG2.R_E_C_N_O_

NUM(05)

 

 

 

ActivityCode

Operation Code

SG2.G2_OPERAC

CHAR(02)

 

 

 

ActivityDescription

Operation Description

SG2.G2_DESCRI

CHAR(60)

 

 

 

MachineCode

Machine Code

SG2.G2_RECURSO

CHAR(06)

 

 

 

ToolCode

Tool Code

SG2.G2_FERRAM

CHAR(06)

 

 

 

ActivityType

Operation Type

1 = Executes operation; 2 = Does not execute.

CHAR(01)

 

 

 

WorkCenterCode

Work Center Code

SG2.G2_CTRAB

CHAR(06)

 

 

 

WorkCenterInternalId

Work Center Id

COMPANY + SG2.G2_FILIAL +SG2.G2_CTRAB

 

 

 

 

UnitItemNumber

Standard lot 

SG2.G2_LOTEPAD

NUM(06)

 

 

 

TimeResource

Resource Time

0

 

 

 

 

TimeMachine

Machine Time

SG2.G2_TEMPAD

DEC(05,2)

 

 

 

TimeSetup

Preparation Time

SG2.G2_SETUP

DEC(05,2)

 

 

 

UnitTimeType

Time Unit Type

1 = Hours;2=Minutes;3=Seconds;4=Days

 

 

 

 

ScriptAlternative

Alternative

SG2.G2_ROTALT

CHAR(02)

 

 

 

InitialDate

Start Date

SG2.G2_DTINI

DATE

 

 

 

FinalDate

End Date

SG2.G2_DTFIM

DATE

 

 

 

PercentageScrapValue

% Scrap

--

 

 

 

 

PercentageValue

Proportion

--

 

 

 

 

ResourceQuantity

Resource Quantity

--

 

 

 

Nota
title

...

Nota:
  • 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

 

Message

Tag

Description

Table/Field: Protheus

Type

Table/Field: PC-Factory

Type

BusinessContentType

WarehouseCode

Warehouse/Deposit

SBE.BE_LOCAL

CHAR(02)

 

 

 

LocationCode

Address/Location

SBE.BE_LOCALIZ

CHAR(15)

 

 

 

AdressInternalId

Address full key

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

 

 

 

 

AdressStockDescription

Address description

SBE.BE_DESCRIC

CHAR(30)

 

 

 

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

 

Message

Tag

Description

Table/Field: Protheus

Type

Table/Field: PC-Factory

Type

BusinessContentType

ItemCode

Product code

SB2.B2_COD

CHAR(15)

 

 

 

ItemDescription

Item Description

SB1.B1_DESC

CHAR(30)

 

 

ListOfStock

 

 

 

 

 

 

 

ReferenceCode

Reference

--

 

 

 

 

WarehouseCode

Deposit/Stock location/Warehouse

SB2.B2_LOCAL

CHAR(02)

 

 

 

LotCode

Lot Number

SB8.B8_LOTECTL

CHAR(10)

 

 

 

SubLotCode

Sub-lot

SB8.B8_NUMLOTE

CHAR(06)

 

 

 

NumberSeries

Serial Number

SBF.BF_NUMSERI

CHAR(20)

 

 

 

AddressCode

Address/Location

SBF.BF_LOCALIZ

CHAR(15)

 

 

 

LotDueDate

Expiration Date

SB8.B8_DTVALID

DATE

 

 

 

CurrentStockAmount

Stock balance

SB2.B2_QATU

SB8.B8_SALDO

SBF.BF_QUANT

DEC(12,2)

 

 

 

BookedStockAmount

Reserved Quantity

SB2.B2_RESERVA

SB8.B8_EMPENHO

SBF.BF_EMPENHO

DEC(12,2)

 

 

 

AvailableStockAmount

Available balance

SB2.B2_QATU - SB2.B2_RESERVA

SB8.B8_SALDO - SB8.B8_EMPENHO

SBF.BF_QUANT - SBF.BF_EMPENHO

DEC(12,2)

 

 

 

QuantityUpdated

Updated Quantity

 

DEC(12,2)

 

 

 

InputOutput

Input or Output

1=Input or 2=Output.

CHAR(01)

 

 

Nota
title

...

Nota:
  • 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.

 


Waste Reason Transaction: WasteReason_1_000.xsd 

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

 

Message

Tag

Description

Table/Field:

Protheus PCP

Table Field:

Protheus SFC

Type

Table/Field: PC-Factory

Type

BusinessContentType

Code

Waste Code

SX5.X5_CHAVE

CYO.CYO_CDRF

CHAR(08)

 

 

 

Description

Scrap Description

X5_DESCRI

X5_DESCSPA

X5_DESCENG

CYO.CYO_DSRF

CHAR(40)

 

 

 

IsRework

Rework

 

CYO.CYO_LGRT

BOOLEAN

 

 

 

IsScrapMaterial

Scrap Material

SBE.BE_DESCRIC

CYO.CYO_LGRFMP

BOOLEAN

 

 

Nota
title

...

Nota:
    • 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.

 

Stop Reason Transaction: StopReason_1_000.xsd

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

 

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)

 

 

 

Description

Stoppage Description

X5_DESCRI

X5_DESCSPA

X5_DESCENG

CYN.CYN_DSSP

CHAR(40)

 

 

 

IsEfficiency

Change Efficiency

--

--

 

 

 

 

IsEmailEquipment

E-mail Planner

--

--

 

 

 

 

IsServiceRequest

Issue Service Request

--

--

 

 

 

 

IsSetup

Setup Stoppage

--

--

 

 

 

...

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_003.xsd

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

Message

Tag

Description

Table/Field

Type

Table/Field: PC-Factory

Type

BusinessContentType

Number

Production Order Number

SC2.C2_NUM + SC2.C2_ITEM + SC2.C2_SEQUEN

CHAR(20)

 

 

 

ProductionOrderUniqueID

Company+Branch+Production Order

COMPANY + SC2.C2_FILIAL + SC2.C2_NUM +

SC2.C2_ITEM + SC2.C2_SEQUEN

CHAR(30)

 

 

 

ItemCode

Item Code

SC2.C2_PRODUTO

CHAR(15)

 

 

 

ItemDescription

Item Description

SB1.B1_DESC

CHAR(40)

 

 

 

Type

Order type

1= Internal; 2=External; 3=Internal/External; 4=Rework;

5=Repair; 6=Maintenance; 7=Fixed Asset;

8=Tool Shop; 9=Reuse

 

CHAR(01)

 

 

 

Quantity

Quantity

SC2.C2_QUANT

DEC(12,2)

 

 

 

ReportQuantity

Reported Quantity

SC2.C2QUJE

DEC(12,2)

 

 

 

UnitOfMeasureCode

Measurement Unit

SC2.C2_UM

CHAR(02)

 

 

 

RequestOrderCode

Production Order Code

SC2.C2_PEDIDO

CHAR(06)

 

 

 

StatusOrderType

Order status

Estimated/Opened = 1

Started = 6

Partial/Total Closed = 7

Idle = 9

CHAR(01)

 

 

 

WarehouseCode

Deposit Code

SC2.C2_LOCAL

CHAR(02)

 

 

 

EndOrderDateTime

CP Production Order End Date

SC2.C2_DATPRF

DATE

 

 

 

StartOrderDateTime

CP Production Order Start Date

SC2.C2_DATPRI

DATE

 

 

 

AbbreviationProviderName

Customer Name

SC5.C5_CLIENTE ( SA1.A1_NOME)

CHAR(30)

 

 

 

ScriptCode

Script Code

SC2.C2_ROTEIRO

CHAR(02)

 

 

ListOfActivityOrders

 

 

 

 

 

 

 

ProductionOrderNumber

Production Order

SC2.C2_NUM + SC2.C2_ITEM +

SC2.C2_SEQUEN

CHAR(20)

 

 

 

ActivityID

Record ID

RECNO (SG2,SHY or SH8)

CHAR(10)

 

 

 

ActivityCode

Operation Code

SG2.G2_OPERAC

SHY.HY_OPERAC

SH8.H8_OPER

CHAR(02)

 

 

 

ActivityDescription

Operation Description

SG2.G2_DESCRI

CHAR(40)

 

 

 

Split

Operation split

SH8.H8_DESDOBR

CHAR(04)

 

 

 

ItemCode

Item Code

SC2.C2_PRODUTO

CHAR(15)

 

 

 

ItemDescription

Item Description

SB1.B1_DESC

CHAR(40)

 

 

 

ActivityType

Operation Type

1 - Register ; 2-Does not Register

CHAR(01)

 

 

 

WorkCenterCode

Work Center Code

SG2.G2_CTRAB

SHY.HY_CTRAB

SH8.H8_CTRAB

CHAR(06)

 

 

 

WorkCenterDescription

Work Center Description

SHB.HB_NOME

CHAR(30)

 

 

 

UnitTimeType

Time Unit Type

1 - Hours; 2 - Minutes; 3- Seconds 4 - Days

CHAR(01)

 

 

 

TimeResource

Resource Time (Standard time for a lot)

SG2.G2_TEMPAD

DEC(05,2)

 

 

 

TimeMachine

Machine Time (Time to do all order)

SG2.G2_TEMPAD *SC2.C2_QUANT

SHY.HY_TEMPO 

SH8.H8_HRINI - SH8.H8_HRFIM

DEC(14,4)

 

 

 

TimeSetup

Preparation Time

SG2.G2_SETUP

SHY.HY_TEMPOS

SH8.H8_SETUP

DEC(15,4)

 

 

 

ScriptCode

Script Code

SG2.G2_CODIGO

SHY.HY_ROTEIRO

SH8.H8_ROTEIRO

CHAR(02)

 

 

 

LaborCode

Direct Labor Code

MOD+CC

CHAR(08)

 

 

 

UnitItemNumber

Default Batch

SG2.G2_LOTEPAD

NUM(05)

 

 

 

IsActivityEnd

Last Operation

Last operation, pass TRUE.

In others FALSE.

BOOLEAN

 

 

 

MachineCode

Machine Code

SG2_RECURSO

SHY_RECURSO

H8_RECURSO

CHAR(06)

 

 

 

StartPlanDateTime

Schedule Start Date/Time

SHY.HY_HORAINI

SC2.C2_DATPRI

SH8.H8_DTINI

DATE

 

 

 

EndPlanDateTime

Schedule End Date/Time

SHY.HY_HORAFIM

SC2.C2_DATPRF

SH8.H8_DTFIM

DATE

 

 

 

ProductionQuantity

Quantity to produce in the operation

SHY.HY_QUANT 

SH8.H8_QUANT 

SC2.C2_QUANT

DEC(12,2)

 

 

 

UnitActivityCode

Measurement Unit

SB1.B1_UM

CHAR(02)

 

 

 

SecondUnitActivityCode

Second measure unit in operation

--

 

 

 

 

SecondUnitActivityFactor

Conversion factor for second unit in operation

--

 

 

 

ListOfMaterialOrders

 

 

 

 

 

 

 

ProductionOrderNumber

Production order

SC2.C2_NUM + SC2.C2_ITEM +

SC2.C2_SEQUEN

CHAR(20)

 

 

 

MaterialID

Reservation record ID

SD4.R_E_C_N_O_

CHAR(10)

 

 

 

MaterialCode

Reservation Item Code

SD4.D4_COD

CHAR(15)

 

 

 

MaterialDescription

Item Description

SB1.B1_DESC

CHAR(40)

 

 

 

ScriptCode

Script Code

SD4.D4_ROTEIRO

CHAR(02)

 

 

 

ActivityCode

Operation Code

SD4.D4_OPERAC

CHAR(02)

 

 

 

WarehouseCode

Deposit Code

SD4.D4_LOCAL

CHAR(02)

 

 

 

MaterialDate

Reservation Date

SD4.D4_DATA

DATE

 

 

 

MaterialQuantity

Reservation Quantity

SD4.D4_QUANT

DEC(12,2)

 

 

 

LotCode

Lot

SD4.D4_LOTECTL

CHAR(10)

 

 

 

PertMaterialNumber

Item sequence

SD4.D4_TRT

CHAR(03)

 

 

 

RequestType

Request type

SB1.B1_APROPRI

CHAR(01)

 

 

ListOfAllocatedMaterial

 

 

 

 

 

 

 

 

WarehouseCode

Deposit Code

SD4.D4_LOCAL

CHAR(02)

 

 

 

LotCode

Lot Code

SD4.D4_LOTECTL

SDC.DC_LOTECTL

CHAR(10)

 

 

 

LocationCode

Location/Address

SDC.DC_LOCALIZ

CHAR(15)

 

 

 

ActivityCode

Operation Code

SD4.D4_OPERAC

CHAR(02)

 

 

 

ScriptCode

Script Code

SD4.D4_ROTEIRO

CHAR(02)

 

 

 

 AllocationQuantity

Allocated Quantity

SD4.D4_QUANT 

SDC.DC_QUANT

DEC(12,2)

 

 

 

AllocationType

Allocation Type

1 = Add;2=Reduce;3=Absolut Value

CHAR(01)

 

 

 

SubLotCode

Sub-lot

SD4.D4_NUMLOTE

SDC.DC_NUMLOTE

CHAR(06)

 

 

 

NumberSeries

Serial Number

SDC.DC_NUMSERI

CHAR(20)

 

 

 

LotDueDate

Expiration Date

SD4.D4_DTVALID

DATE

 

 

ListOfQuotaActivity

 

 

 

 

 

 

 

ProductionOrderNumber

Production Order Number

CY9.CY9_NRORPO

CHAR(20)

 

 

 

ControlType

Split Selection

--

 

 

 

 

ActivityID

Operation ID

CY9.CY9_CDAT

CHAR(10)

 

 

 

ItemCode

Item code

CYY.CYY_CDAC

CHAR(15)

 

 

 

ItemDescription

Item Description

CYY.CYY_DSAC

CHAR(40)

 

 

 

StartActivityDateTime

Activity Start Date/Time

CYY.CYY_DTBGAT / CYY.CYY_HRBGAT

DATETIME

 

 

 

EndActivityDateTime

Activity End Date/Time

CYY.CYY_DTEDAT / CYY.CYY_HREDAT

DATETIME

 

 

 

ApprovedQuantity

Approved Quantity

CYY.CYY_QTATAP

DEC(13,4)

 

 

 

ScrapQuantity

Scrap Quantity

CYY.CYY_QTATRF

DEC(13,4)

 

 

 

MachineCode

Machine Code

CYY.CYY_CDMQ

CHAR(20)

 

 

 

MachineDescription

Machine Description

CYY.CYY_DSMQ

CHAR(40)

 

 

 

ActivityQuantity

Expected Quantity

CYY.CYY_QTAT

DEC(12,4)

 

 

 

StandardSetup

Standard Setup Time

CYY.CYY_QTPASU

NUM(10)

 

 

 

StandardActivity

Standard Operation Time

CYY.CYY_QTPAAT

NUM(10)

 

 

 

StandardPostprocessing

Standard Post-process Time

CYY.CYY_QTPAPP

NUM(10)

 

 

 

StandardMachine

Standard Machine Time

CYY.CYY_QTPAMQ

NUM(10)

 

 

 

StandardOperator

Standard Time MOD

CYY.CYY_QTPAOE

NUM(10)

 

 

 

UsedCapacity

Used Capacity

CYY.CYY_QTVMAT

DEC(12,4)

 

 

 

ActivityTimeQuantity

Available Activity Time

CYY.CYY_HRDI

CHAR(08)

 

 

 

ReportQuantity

Reported Quantity

CYY.CYY_QTATRP

DEC(13,4)

 

 

 

ReworkQuantity

Reworked Quantity

CYY.CYY_QTATRT

DEC(12,4)

 

 

 

StartSetupDateTime

Setup Start Date/Time

CYY.CYY_DTBGSU / CYY.CYY_HRBGSU

DATETIME

 

 

 

EndSetupDateTime

Setup End Date/Time

CYY.CYY_DTEDSU / CYY.CYY_HREDSU

DATETIME

 

 

 

TimeSetup

Preparation Time

CY9.CY9_QTTESU

NUM(10)

 

 

 

TimeMachine

Machine Time

CY9.CY9_QTTEMQ

NUM(10)

 

 

 

TimeOperator

Time MOD

CY9.CY9_QTTERC

NUM(10)

 

 

 

TimePostprocessing

Post-processing Time

CY9.CY9_QTTEPP

NUM(10)

 

 

 

QuotaActivityID

ID Split

CYY.CYY_IDATQO

CHAR(05)

 

 

 

WorkCenterCode

Work Center

CY9.CY9_CDCETR

CHAR(10)

 

 

 

ReportedSplit

Reported Split

CYY.CYY_LGQORP

BOOELAN

 

 

 

StatusActivityType

Operation Status

CYY.CYY_TPSTAT

CHAR(01)

 

 

ListOfQuotaActivityTools

 

 

 

 

 

 

 

ToolCode

Tool

CYY.CYY_CDFE

CHAR(20)

 

 

 

ToolQuantity

Tool Quantity

CYY.CYY_QTFE

NUM(03)

 

 

Nota
title

...

Nota:
    • 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
title

...

Nota:

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

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_OPERAC

CYV.CYV_CDAT

CHAR(02)

 

 

 

Split

Split

SH6.H6_DESDOBR

CYV.CYV_IDATQO

CHAR(04)

 

 

 

ActivityID

Operation ID

--

--

 

 

 

 

ItemCode

Product

SH6.H6_PRODUTO

CYV.CYV_CDACRP

CHAR(15)

 

 

 

ApprovedQuantity

Approved Quantity

SH6.H6_QTDPROD

CYV.CYV_QTATAP

DEC(11,2)

 

 

 

ScrapQuantity

Scrap Quantity

SH6.H6_QTDPERD

CYV.CYV_QTATRF

DEC(11,2)

 

 

 

ReworkQuantity

Reworked Quantity

--

--

 

 

 

 

StartSetupDateTime

Setup Start Date/Time

--

CYV_DTBGSU

CYV_HRBGSU

DATETIME

 

 

 

EndSetupDateTime

Setup End Date/Time

--

CYV_DTEDSU

CYV_HREDSU

DATETIME

 

 

 

SetupCode

Setup Code

--

CYV_CDSU

CHAR(10)

 

 

 

OpTimeInt

Operation Time

--

CYV.CYV_QTTERP

NUM(10)

 

 

 

ProductionShiftCode

Shift Model Code

--

CYV.CYV_CDTN

CHAR(08)

 

 

 

ProductionShiftNumber

Shift Number

--

CYV.CYV_NRTN

CHAR(05)

 

 

 

DocumentCode

Document

--

CYV.CYV_NRDO

CHAR(20)

 

 

 

DocumentSeries

Document Series

--

CYV.CYV_NRSR

CHAR(05)

 

 

 

StartReportDateTime

Report Start Date/Time

SH6.H6_DATAINI

SH6.H6_HORAINI

CYV.CYV_DTRPBG

CYV.CYV_HRRPBG

DATETIME

 

 

 

EndReportDateTime

Report End Date/Time

SH6.H6_DATAFIN

SH6.H6_HORAFIN

CYV.CYV_DTRPED

CYV.CYV_HRRPED

DATETIME

 

 

 

ReversedReport

Annotation Reversal

TRUE or FALSE

TRUE or FALSE

BOOLEAN

 

 

 

ReversalDate

Reversal Date

--

CYV.CYV_DTEO

DATE

 

 

 

ReportDateTime

Report Date/Time

SH6.H6_DTAPONT

CYV.CYV_DTRP

CYV.CYV_HRRP

DATETIME

 

 

 

WarehouseCode

Deposit Code

SH6.H6_LOCAL

CYV.CYV_CDDP

CHAR(02)

 

 

 

LotCode

Lot/Series

SH6.H6_LOTECTL

CYV.CYV_CDLOSR

CHAR(10)

 

 

 

LotDueDate

Lot Validity Date

SH6.H6_DTVALID

CYV.CYV_DTVDLO

DATE

 

 

 

IntegrationReport

Record to be reversed

 

 

CHAR(10)

 

 

 

CloseOperation

Closes Operation

SH6.H6_PT

CYV.CYV_LGEDRP

BOOLEAN

 

 

 

LocationCode

Location

--

CYV.CYV_CDLC

CHAR(20)

 

 

WasteAppointment

 

 

 

 

 

 

 

 

WasteCode

Waste Code

SBC.BC_MOTIVO

CY0.CY0_CDRF

CHAR(02)

 

 

 

WasteDescription

Waste Description

SBC.BC_DESCRI

CY0.CY0_DSRF

CHAR(40)

 

 

 

ScrapQuantity

Scrap Quantity

SBC.BC_QUANT

CY0.CY0_QTRF

DEC(11,2)

 

 

ResourceAppointment

 

 

 

 

 

 

 

 

OperatorCode

Operator Code

--

CYW.CYW_CDOE

CHAR(20)

 

 

 

StartDateTime

Start Date/Time

--

CYW.CYW_DTBGRP

CYW.CYW_HRBGRP

DATETIME

 

 

 

EndDateTime

End Date/Time

--

CYW.CYW_DTEDRP

CYW.CYW_HREDRP

DATETIME

 

 

 

MOBTime

Direct Labor Time

--

CYW.CYW_QTTEOE

NUM(10)

 

 

 

ExtraTime

Over time

--

CYW.CYW_QTTEEX

NUM(10)

 

 

 

UtilTime

Working Time

--

CYW.CYW_QTTEUT

NUM(10)

 

 

 

ProductionShiftCode

Shift Model Code

--

CYW.CYW_CDTN

CHAR(08)

 

 

 

ProductionShiftNumber

Shift Number

--

CYW.CYW_NRTN

CHAR(05)

 

 

SupplyOrder

 

 

 

 

 

 

 

 

ProductionOrderNumber

Production Order Number

SD3.D3_OP

CZP.CZP_NRORPO

CHAR(20)

 

 

 

MaterialCode

Reservation Item Code

SD3.D3_COD

CZP.CZP_CDMT

CHAR(15)

 

 

 

UsedQuantity

Used Quantity

SD3.D3_QUANT

CZP.CZP_QTRPPO

DEC(12,2)

 

 

 

WarehouseCode

Deposit Code

SD3.D3_LOCAL

CZP.CZP_CDDP

CHAR(02)

 

 

 

LocationCode

Location

SD3.D3_LOCALIZ

CZP.CZP_CDLC

CHAR(15)

 

 

 

LotCode

Lot/Series

SD3.D3_LOTECTL

or

SD3.D3_NUMSERI

CZP.CZP_CDLO

CHAR(20)

 

 

 

ActivityCode

Operation Code

--

CZP.CZP_CDAT

CHAR(02)

 

 

 

ScriptCode

Script

--

CZP.CZP_CDRT

CHAR(02)

 

 

ReportToolActivity

 

 

 

 

 

 

 

 

ToolCode

Tool Code

--

CZ0.CZ0_IDFE

CHAR(20)

 

 

Nota
title

...

Nota:
    • 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:

...

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
title

...

Nota:
  • 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

...

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
title

...

Nota:
    • 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

--

 

...

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

 

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

Lot

SD3.D3_LOTECTL

CHAR(10)

 

SubLotNumber

Sub-lot

SD3.D3_NUMLOTE

CHAR(06)

 

LotExpirationDate

Lot Expiration Date

SD3.D3_DTVALID

DATE

 

Address

Address

SD3.D3_LOCALIZ

CHAR(15)

 

NumberSeries

NumberSeries

SD3.D3_NUMSERI

CHAR(20)

 

InputOrOutput

Input or Output Movement

I=Input / O = Output

CHAR(01)

 

ReferenceCode

Reference

--

 

 

ScriptCode

Script

SD4.D4_ROTEIRO

CHAR(02)

 

ActivityCode

Operation

SD4.D4_OPERAC

CHAR(02)

 

ProductionOrderNumber

Production Order/Document

SD3.D3_OP and SD3.D3_DOC

CHAR(13)

 

FatherItemCode

Parent Item

--

 

Nota
title

...

Nota:
  • 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.

 

Message

Tag

Description

Table/Field

Type

BusinessContentType

CompanyId

Company

 

 

 

BranchId

Branch

 

 

 

CompanyInternalId

InternalId of full key of company

 

 

 

InternalId

InternalId of transfer

 

 

 

Number

movement Number

SD3.D3_NUMSEQ

CHAR(06)

 

RegisterDateTime

Request issue date

SD3.D3_EMISSAO

DATE

TransferWarehouseType

 

 

 

 

 

InternalId

InternalId of transfer

 

 

 

EmissionDate

Date of Issue

SD3.D3_EMISSAO

DATE

 

ItemCodeFrom

Item/Source Product

SD3.D3_COD

CHAR(15)

 

ItemCodeTo

Item/Target Product

SD3.D3_COD

CHAR(15)

 

UnitOfMeasureFrom

Unit of Origin Measurement:

SD3.D3_UM

CHAR(02)

 

UnitOfMeasureTo

Unit of Destination Measurement:

SD3.D3_UM

CHAR(02)

 

Quantity

Quantity

SD3.D3_QUANT

DEC(12,2)

 

WarehouseCodeFrom

Origin Warehouse Code

SD3.D3_LOCAL

CHAR(02)

 

WarehouseCodeTo

Destination Warehouse Code

SD3.D3_LOCAL

CHAR(02)

 

LotNumberFrom

Origin Lot Number

SD3.D3_LOTECTL

CHAR(10)

 

LotNumberTo

Destination Lot Number

SD3.D3_LOTECTL

CHAR(10)

 

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.

...

 

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.

...