especificaciones comunicaciÓn entre mapexbp v10 y …

73
ESPECIFICACIONES DE COMUNICACIÓN ENTRE MAPEXBP V10 Y ERP MAPEXAGENT V5/V6 Revisión de 27/06/2022

Upload: others

Post on 20-Jul-2022

1 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: ESPECIFICACIONES COMUNICACIÓN ENTRE MAPEXBP V10 Y …

ESPECIFICACIONES DE

COMUNICACIÓN ENTRE

MAPEXBP V10 Y ERP

MAPEXAGENT V5/V6

Revisión de 27/06/2022

Page 2: ESPECIFICACIONES COMUNICACIÓN ENTRE MAPEXBP V10 Y …

2

Contenido

INTRODUCCIÓN 4

SINCRONIZACION AUTOMATICA DE TABLAS ERP > MAPEXBP 7

FORMATO TABLA DE ERP->MAPEX 9

TIPOS DE OPERACIONES A IMPORTAR DEL ERP->MAPEX 11

Reporte planificación OFs de ERP -> MAPEX 11

Mantenimiento del maestro de operarios 27

Mantenimiento del maestro de escandallo 30

Reporte Productividad por Modo Funcionamiento de ERP -> MAPEX 35

Mantenimiento de la documentación 38

Mantenimiento del maestro de producto 41

Reporte de Líneas de Pedido (WAM) 46

TAREAS DE MAPEXAGENT 50

REPORTE MAPEXBP –> ERP 51

TIPOS DE OPERACIONES A IMPORTAR DEL MAPEX -> ERP 53

Reporte de producción parcial por OF de ERP -> MAPEX 53

Reporte Inicio/Fin de OF-Operación con traspaso Totales MAPEX -> ERP 56

Trazabilidad entrante/saliente per SSCC/lote del proceso ON-LINE MAPEX -> ERP 59

Reporte de presencia de operario 61

Export Op300 To File: Production export from the previous shift 63

TAREAS DE MAPEXAGENT 64

HISTÓRICO DE ERRORES 65

CONTROL IMPORTACIÓN 65

Mantenimiento de Productos 66

Page 3: ESPECIFICACIONES COMUNICACIÓN ENTRE MAPEXBP V10 Y …

3

Mantenimiento del maestro de operarios 67

Reporte planificación OFs 67

Mantenimiento del maestro de escandallo 68

Reporte Productividad por Modo Funcionamiento 68

Mantenimiento de la documentación 68

CONTROL EXPORTACIÓN 69

Reporte de producción parcial 71

Reporte Inicio/Fin de OF-Operación con traspaso Totales 71

Trazabilidad entrante/saliente per SSCC/lote del proceso ON-LINE 71

Reporte de presencia de operario 72

Export Op300 To File: Production export from the previous shift 72

TEMAS PENDIENTES 73

Page 4: ESPECIFICACIONES COMUNICACIÓN ENTRE MAPEXBP V10 Y …

4

INTRODUCCIÓN

El objetivo de este documento es definir la comunicación (importación/exportación) entre el

sistema ERP y el sistema MapexBP (operativa, protocolos y canales de comunicación).

La arquitectura para la importación de datos se ha diseñado mediante unas tareas de

MapexAgent, una por cada tipo de importación, que de una forma estándar procesan los

registros de importación de la tabla PRD_ERP_IN cargando las tablas del sistema MapexBP.

En este proceso se marcan los registros cómo OK, ERROR o WARNING en función de lo

crítico que sea el problema, identificando el detalle del procesamiento en la tabla SYS_LOG.

Un front-end amigable mostrará el estado de tratamiento permitiendo identificar problemas

y reprocesar registros si fuera necesario. Recordar que es importante el orden de proceso

de los registros, y si se realiza de manera manual un reproceso se debe respetar, no dando

lugar a procesar un registro antiguo tras uno más nuevo del mismo elemento.

Es posible que en ocasiones sea necesario implementar tareas de MapexAgent a medida

para un proyecto específico para alimentar la tabla PRD_ERP_IN de las fuentes

proporcionadas por el cliente. Éstas se realizarán respetando el espacio de campos estándar

y campos a medida definidos para cada tipo de importación.

La arquitectura para la exportación de datos se ha diseñado mediante unas tareas de

MapexAgent, una por cada tipo de exportación, que exportan la información del sistema a la

tabla PRD_ERP_OUT del MapexBP.

Page 5: ESPECIFICACIONES COMUNICACIÓN ENTRE MAPEXBP V10 Y …

5

En este proceso se marcan los registros de las tablas origen con ERP=1 una vez se registra

en la PRD_ERP_OUT. A su vez, el proceso que lo inserte en el sistema del cliente deberá

marcar los registros de la tabla PRD_ERP_OUT cómo OK, ERROR o WARNING en función

de lo crítico que sea el problema, identificando, de manera opcional, el detalle del

procesamiento en la tabla SYS_LOG.

Un front-end amigable mostrará el estado de tratamiento permitiendo identificar problemas

y reprocesar registros si fuera necesario. Recordar que es importante el orden de proceso

de los registros, y si se realiza de manera manual un reproceso se debe respetar, no dando

lugar a procesar un registro antiguo tras uno más nuevo del mismo elemento.

Para la Fase 1, es posible que en ocasiones sea necesario implementar tareas de

MapexAgent a medida para un proyecto específico para alimentar la tabla PRD_ERP_OUT

porque no exista la operación de exportación deseada. Antes de realizar la tarea a medida

se debe comunicar con el departamento de Producto para acordar el estándar del espacio

de campos.

Page 6: ESPECIFICACIONES COMUNICACIÓN ENTRE MAPEXBP V10 Y …

6

Para la Fase 2, que de manera excepcional la puede implementar Mapex, se proporciona

algunos ejemplos de migración al ERP del cliente: una tarea estándar para alimentar la tabla

PRD_ERP_OUT del cliente y un ejemplo de exportación a fichero.

Revisiones del documento

Las diferencias respecto a las revisiones anteriores se marcan en diferentes colores.

Fecha Autor Descripción de la modificación

dd/mm/yyyy .. ..

dd/mm/yyyy .. ..

Page 7: ESPECIFICACIONES COMUNICACIÓN ENTRE MAPEXBP V10 Y …

7

SINCRONIZACION AUTOMATICA DE TABLAS ERP > MAPEXBP

En este apartado del documento se debe describir la manera en que se alimenta la tabla

“PRD_ERP_IN” para el proyecto específico.

El ERP registrará la información cada vez que se realice una inserción, modificación o

eliminación en algún elemento de la importación. (Se recomienda hacerlo a través de

eventos (triggers) que gestione la propia base de datos).

Los métodos más comunes son:

• El cliente alimenta directamente la tabla PRD_ERP_IN del MapexBP.

• Mediante una tabla PRD_ERP_IN ubicada en la base de datos del cliente.

Una tarea estándar de MapexAgent copiará el registro a la base de datos de

MapexBP para su posterior tratamiento estándar.

ATENCIÓN: ESTA TAREA REQUIERE QUE EL CAMPO ID_PRD_ERP_IN DE

MAPEXBP NO SEA AUTONUMÉRICO (IDENTITY) PUES VIENE DADO POR EL

ERP.

El canal de comunicación será un servidor vinculado en el servidor de base de datos

del MapexBP o bien un sinónimo si el entorno del ERP fuese SQLServer.

A continuación, se muestra un ejemplo de la configuración del servidor vinculado del

ERP mediante driver ODBC.

Page 8: ESPECIFICACIONES COMUNICACIÓN ENTRE MAPEXBP V10 Y …

8

• Mediante archivos de texto. El ERP creará un archivo de texto con uno o varios

registros en una carpeta compartida del servidor donde el programa de Mapex tenga

acceso, llamada \\SERVIDOR\MAPEX\ERP\IN.

El archivo debe llamarse ERPyyyyMMdd_hhmmss.txt (para que cada archivo tenga

un nombre diferente cada vez).

El archivo deberá alimentarse o crearse cada vez que se realice una inserción,

modificación o eliminación en alguno de los importados. (Se recomienda hacerlo a

través de eventos (triggers) que gestione la propia base de datos). Una tarea a

medida de MapexAgent tratará cada archivo alimentando la tabla PRD_ERP_IN del

para su posterior tratamiento estándar.

Para MapexBP no es necesario realizar una carga inicial de las entidades contempladas en

la importación. Ésta es on-line.

Por ejemplo, MapexBP creará los productos, operaciones y fases cada vez que se cree una

OF-operación en el ERP y MapexBP no disponga de ella en sus ficheros. (Para esta fase

del proyecto no es necesario el producto hasta el momento que se lanza una

operación, por eso no es necesario sincronizar los ficheros de productos y fases ya

que se crean automáticamente al recibirlos del ERP).

ATENCIÓN: El carácter decimal que se debe utilizar debe ser el mismo que el configurado en el

Servidor donde está ubicado el MapexAgent.

Page 9: ESPECIFICACIONES COMUNICACIÓN ENTRE MAPEXBP V10 Y …

9

FORMATO TABLA DE ERP->MAPEX

Tabla PRD_ERP_IN

CAMPO SIGNIFICADO

Id_prd_erp_in (Long) Primary Key. Autonumérico.

Id_operacion (int) Identifica la tabla a

sincronizar. P.ej.:

100 Maestro de productos

200 Maestro de operarios

301 Planificación OFs

303 Productividad por Modo

Funcionamiento

400 Maestro de escandallo

500 Documentación

600 Purchase Order (PO)

Fecha_generacion

(Fecha/hora)

Timestamp de creación

Fecha_proceso (Fecha/hora) Día hora en que se ha procesado por Mapex

Ack (int) Inicialmente a cero. MAPEX lo pondrá a 1 cuando lo procese con

éxito. En caso de error grave, se marcará ACK=2. En caso de

error leve se marcará ACK=100.

ErrorMessage Log del tratamiento

ErrorNum Número de errores que el registro ha sido procesado con error.

En la tarea de MapexAgent se define el Nº Errores que se tienen

que producir para marcar el ACK cómo error.

ErrorMail_Ack Una tarea de MapexAgent gestiona el envío de mails para

informar de los errores.

ErrorMail_Ack = 0 Pendiente de envío

ErrorMail_Ack = 1 Enviado

ErrorMail_Fecha Fecha en la que se ha enviado el mail

P1 (Varchar) Significado depende del ID_Operacion

Page 10: ESPECIFICACIONES COMUNICACIÓN ENTRE MAPEXBP V10 Y …

10

...

P_n (Varchar) Los primeros N parámetros se reservan para el estándar del

programa.

P_m (Varchar) Primer campo CUSTOM de cliente

MapexBP realizará peticiones sobre la tabla de comandos cada 5 minutos (configurable),

para leer los comandos de sincronización no procesados (con campo Ack = 0) enviados

por el ERP.

IMPORTANTE: Cualquier campo Warning que el cliente no tenga información debe dejarse a

DBNULL para que el proceso recoja el valor del DefaultValue de las tablas de la entidad relacionada.

Page 11: ESPECIFICACIONES COMUNICACIÓN ENTRE MAPEXBP V10 Y …

11

TIPOS DE OPERACIONES A IMPORTAR DEL ERP->MAPEX

REPORTE PLANIFICACIÓN OFS DE ERP -> MAPEX

Configurable por tarea de MapexAgent:

CreateWorkCenter It's possible to create WorkCenters. You must check the default value of the

WorkCenter Active field.

ActivateWorkCenter To be able to configure whether WorkCenters should be activated when

receiving planning on them in case of being inactive.

CreateOperationType It's possible to create OperationTypes.

CreateOperationWorkCenter It's possible to create WorkCenters.

HisOperationWorkCenter UNIQUE If True the His Operation is only planned on one workcenter, remove the

workcenter if it is different from the imported one.

AllowUpdatePlanningInfo

If it is True it allows the modification of Status/Units/Times/Schedule

dates/Schedule workCenter. False: not allowed because Planner is available

in MapexBP.

AllowUpdatePlanningInfoMode

If Allow Update Planning Info = True :

0 PlanningInfo is modified except “operation Status”(P53) if WOPhase Status

Is PRODUCTION;

1 PlanningInfo is modified if WOPhase Status Is Not PRODUCTION;

2 PlanningInfo is modified if WOPhase Status Is Not PRODUCTION Or

PLANNED;

WOStatusInformed

If It's True fields O(P5) His WO.WO Status.Code & O(P53) His Operation.WO

Status.Code are mandatory, else those can be DBNULL because will be

ignored.

Create Product Type It's possible to create ProductTypes.

DocTypeIdDefaultValue Default value of the Id of the type of documentation created. The standar

defaultvalue is 1.

CalculatePlannedProductionSeconds

If True and P45<>"0", makes calculation for the field P43:

HisOperation.PlannedProductionSeconds = HisOperation.PlanningUnits /

HisOperation.NominalProductivity * 3600.0

Page 12: ESPECIFICACIONES COMUNICACIÓN ENTRE MAPEXBP V10 Y …

12

GenerateBOM

If it’s True creates BOM for operation from Product BOM configuration. This

option is incompaticle with the OP400 import for OP400 operations.

If the product does not have BOM configured, it will give a Warning with the

error "ProcessedRows=0".

W/O: Warning / Obligatory

Page 13: ESPECIFICACIONES COMUNICACIÓN ENTRE MAPEXBP V10 Y …

13

Tabla: PRD_ERP_IN

GRUPO Descripción Campo MAPEXBP Campo Tipo campo W/O Modif Comments

PROTOCOL Identificador del registro Id_prd_erp_in Int 11 Autonumeric (PK)

PROTOCOL Identificador operación Id_operacion NUMBER Value = 301

PROTOCOL Fecha_generacion Fecha_generacion Timestamp Generation date

PROTOCOL Fecha_proceso Fecha_proceso DATETIME Process date

PROTOCOL Ack Ack Int 1 0: Pdt; 1: OK; 2: ERROR Throw Exception; 100: WARNING: add ErrorMessage

PROTOCOL Mensaje de Error ErrorMessage VARCHAR(MAX) Error message

PROTOCOL Número de errores ErrorNum TINYINT NUMBER OF ERRORS that have to occur before being marked as error: Must be marked as ERROR If

ErrorNum>=ErrorsProcessNumberBeforeERROR

PROTOCOL ErrorMail_Ack ErrorMail_Ack TINYINT 0: Pdt; 1: Sent

PROTOCOL ErrorMail_Fecha ErrorMail_Fecha DATETIME Email sending date

OF Código OF P1 VARCHAR 25 O HisWO.Code [his_of.Cod_of]

OF Descripción OF P2 VARCHAR 100 W X HisWO.Description [his_of.Desc_of]. DefaultValue = “”

Page 14: ESPECIFICACIONES COMUNICACIÓN ENTRE MAPEXBP V10 Y …

14

OF Código Tipo de OF P3 VARCHAR 25 W X HisWO.WOType.Code [his_of.Id_tipoof, cfg_tipoof.Cod_tipoof]. A change in the WOType code will create a

new WOType. DefaultValue = “--”

OF Descripción Tipo de OF P4 VARCHAR 50

W

X HisWO.WOType.Description [his_of.It_tipoof, cfg_tipoof.Cod_of]. DefaultValue = “”

OF Código de Estado de OF. P5 VARCHAR 25 O X HisWO.WOStatus.Code [his_of.Id_estadoof, cfg_estadoof.Cod_estadoof]. Possible Values established by

application: 'NO PLANIFICADA', 'PLANIFICACION', 'CERRADA', ‘ELIMINADA’

OF Fecha hora inicio planif. OF P6 VARCHAR 50 O X

HisWO.PlanningStartDate [his_of.Fecha_ini].

The date format is configured in the task.

Ex.: DateTimeFormatImported="yyyyMMdd HH:mm:ss"

OF Fecha hora fin planif. OF P7 VARCHAR 50 O X

HisWO.PlannedEndDate. [his_of.Fecha_fin].

The date format is configured in the task.

Ex.: DateTimeFormatImported="yyyyMMdd HH:mm:ss"

OF Fecha de expedición de OF P8 VARCHAR 50 W X

HisWO.DeliveryDate [his_of.Fecha_entrega].

The date format is configured in the task.

P.e.: DateTimeFormatImported="yyyyMMdd HH:mm:ss". Can be DBNULL.Value

Page 15: ESPECIFICACIONES COMUNICACIÓN ENTRE MAPEXBP V10 Y …

15

OF Unidades planificadas P9 VALOR O X HisWO.PlanningUnits [his_of.Unidades_planning]

OF Unidades planificadas 2 P10 VALOR W X HisWO.PlanningUnits2 [his_of.Unidades_planning2]. DefaultValue = “0”

OF Observaciones OF (HTML) P11 VARCHAR 1000 W X HisWO.Html [his_of.Html]. DefaultValue = “”

OF Código cliente P12 VARCHAR 25 W X

HisWO.Customer.Code [his_of.Id_cliente, cfg_cliente.Cod_cliente].

A change in the client code will create a new client. DefaultValue = “--”

OF Descripción cliente P13 VARCHAR50 W X HisWO.Customer.Description [cfg_cliente.Desc_cliente]. DefaultValue = “”

OF Código de producto P14 VARCHAR 50 O

HisWO.Product.Code [his_of.Id_producto, cfg_producto.Cod_producto, cfg_fase.Id_producto_final].

It's not possible to change the WO Product

OF Descripción de producto P15 VARCHAR 250 W X HisWO.Product.Name [cfg_producto.Desc_producto]

OF Código tipo de producto (familia) P16 VARCHAR 25 W X

HisWO.Product.ProductType.Code [cfg_producto.Id_tipoproducto, cfg_tipoproducto.Cod_tipoproducto].

A change in the product type code will create a new product type. DefaultValue = “”

OF Descripción tipo de producto (familia) P17 VARCHAR 50 W X HisWO.Product.ProductType.Description [cfg_tipoproducto.Desc_tipoproducto]. DefaultValue = “”

OF Imagen del producto P18 VARCHAR 250 W X HisWO.Product.PhotoPath [cfg_producto.Imagen]. DefaultValue = “”

Page 16: ESPECIFICACIONES COMUNICACIÓN ENTRE MAPEXBP V10 Y …

16

OF RESERVADO P19 VARCHAR 50 HisWO.Reserved

OF CUSTOM P20 VARCHAR 50 HisWO.Custom

OF CUSTOM P21 VARCHAR 50 HisWO.Custom

OF CUSTOM P22 VARCHAR 50 HisWO.Custom

OF CUSTOM P23 VARCHAR 50 HisWO.Custom

OF CUSTOM P24 VARCHAR 50 HisWO.Custom

OF CUSTOM P25 VARCHAR 50 HisWO.Custom

OF CUSTOM P26 VARCHAR 50 HisWO.Custom

OF CUSTOM P27 VARCHAR 50 HisWO.Custom

OF CUSTOM P28 VARCHAR 50 HisWO.Custom

OF CUSTOM P29 VARCHAR 50 HisWO.Custom

OPERACIÓN Código operación P30 VARCHAR 50 O HisOperation.Code [his_fase.Cod_his_fase]. Ex. 10,20,30

OPERACIÓN Descripción operación P31 VARCHAR 250 W X HisOperation.Description [his_fase.Desc_his_fase]. DefaultValue = “”

Page 17: ESPECIFICACIONES COMUNICACIÓN ENTRE MAPEXBP V10 Y …

17

OPERACIÓN Prioridad de la Operación P32 VARCHAR 50 W X HisOperation.Priority [his_fase.Orden]. DefaultValue = “0”

OPERACIÓN Orden de Operación P33 VARCHAR 50 W X HisOperation.OperationOrder [his_fase.Orden_his_fase]. DefaultValue = “0”

OPERACIÓN Código Tipo de centro de trabajo P34 VARCHAR 25 W X HisOperation.WorkCenterType.Code [cfg_maquina.Id_tipomaquina, cfg_tipomaquina.Cod_tipomaquina].

DefaultValue = “”

OPERACIÓN Descripción Tipo de centro de trabajo P35 VARCHAR 50 W X HisOperation.WorkCenterType.Description [cfg_tipomaquina.Desc_tipomaquina]. DefaultValue = “”

OPERACIÓN Código Centro de trabajo planificado

(CT) P36 VARCHAR 25 O X

HisOperation.WorkCenter.Code/PlanningType.Code

[his_fase_maquina.Id_maquina, cfg_maquina.Cod_maquina]

[his_fase.Id_tipoplaning,cfg_tipoplaning.Cod_tipoplanning]

OPERACIÓN Fecha hora inicio planif. Op. P37 VARCHAR 50 O X

HisOperation.PlanningStartDate [his_fase.Fecha_ini].

The date format is configured in the task.

Ex: DateTimeFormatImported="yyyyMMdd HH:mm:ss"

OPERACIÓN Fecha hora fin planif. Op. P38 VARCHAR 50 O X

HisOperation.PlannedEndDate [his_fase.Fecha_fin].

The date format is configured in the task. Ex: DateTimeFormatImported="yyyyMMdd HH:mm:ss"

OPERACIÓN Unidades planificadas P39 VALOR O X HisOperation.PlanningUnits [his_fase.Unidades_planning].

Page 18: ESPECIFICACIONES COMUNICACIÓN ENTRE MAPEXBP V10 Y …

18

OPERACIÓN Unidades planificadas 2 P40 VALOR W X HisOperation.PlanningUnits2 [his_fase.Unidades_planning2]. DefaultValue = “0”

OPERACIÓN Unidades planificadas preparación P41 VALOR W X

HisOperation.PlannedPreparationUnits

[Unidades_planning_Preparacion]. DefaultValue = “0”

OPERACIÓN T preparacion (segundos) P42 VARCHAR 50 W X

HisOperation.PlannedPreparationSeconds

[his_fase.Seg_Planning_Preparacion]. DefaultValue = “0”

OPERACIÓN T producción (segundos) P43 VARCHAR 50 W X HisOperation.PlannedProductionSeconds [his_fase.Seg_Planning_Produccion]. DefaultValue = “0”

OPERACIÓN Factor Multiplicativo(fase-CT) P44

DECIMAL[8,2]

VALOR(0-25)

O X HisOperation.MultiplicativeFactor [his_fase.Factor_multiplicativo].

OPERACIÓN Productividad Técnico (fase-CT) P45 DECIMAL[8,2] O X HisOperation.NominalProductivity [his_fase.Rendimientonominal1]. Units / hour

OPERACIÓN Productividad Cronometrado (fase-

CT) P46 DECIMAL[8,2] W X

HisOperation.NominalProductivity2 [his_fase.Rendimientonominal2]. Units / hour

DefaultValue = “0”

OPERACIÓN Código de fase de semielaborado P47 VARCHAR 50 O

HisOperation.Operation.Code [his_fase.Id_fase, cfg_fase.Cod_fase]

UK CFG_FASE.ID_FASE (COD_FASE, ID_PRODUCTO)

A change to the semi-finished product phase code will create a new phase/operation.

Page 19: ESPECIFICACIONES COMUNICACIÓN ENTRE MAPEXBP V10 Y …

19

OPERACIÓN Descripción de fase semielaborado P48 VARCHAR 150 W X HisOperation.Operation.Description [cfg_fase.Desc_fase]. DefaultValue = “”

OPERACIÓN Última operación P49

VALOR

(0 = No, 1= Si)

W X HisOperation.Operation.LastOperation [cfg_fase.Ultima_fase].DefaultValue = “0”

OPERACIÓN Versión o revisión de producto P50 VALOR W X HisOperation.Operation.VersionId [cfg_fase.Id_version]. DefaultValue = “0”

OPERACIÓN Código de Tipo de Fase de OF P51 VARCHAR 25 W HisOperation.Operation.OperationType.Code [cfg_fase.Id_tipofase, cfg_tipofase.Cod_tipofase]. DefaultValue

= “--”. Ej. MECANIZADO, PINTURA, CORTE…

OPERACIÓN Descripción de Tipo de Fase de OF P52 VARCHAR 50 W X

HisOperation.Operation.OperationType.Description

[his_fase.Id_fase, cfg_tipofase.Desc_tipofase]. DefaultValue = “--”

OPERACIÓN Código de Estado de Operación. P53 VARCHAR 25 O X

HisOperation.WOStatus.Code [his_fase.Id_estadoof, cfg_estadoof.Cod_estadoof]. Possible Values

established by application:

'NO PLANIFICADA', 'PLANIFICACION', 'CERRADA', ‘ELIMINADA’

OPERACIÓN Código del modo de funcionamiento

por defecto para la operación P54 VALOR(1-1000) W

HisOperation.Operation.OperationModeId [his_fase_maquina.Id_modofuncionamientofase,

cfg_fase_maquina.Id_modofuncionamientofase]. DefaultValue = “1”

UK CFG_FASE_MAQUINA(ID_FASE,ID_MAQUINA,ID_MODOFUNCIONAMIENTOFASE,

NUMOPERARIOS)

A change in the operating mode code of the operation will create a new mode.

Page 20: ESPECIFICACIONES COMUNICACIÓN ENTRE MAPEXBP V10 Y …

20

OPERACIÓN

Número de operarios asociado a la

productividad nominal (P45/46) para

el modo de funcionamiento del P54

P55 VALOR(0-20) W

HisOperation.Operation.OperationMode.WorkerNum / OperationWorkCenterImported.WorkerNum

[cfg_fase_maquina.NumOperarios]. DefaultValue = “1”

OPERACIÓN Fecha de caducidad P56 VARCHAR 50 W

HisOperation.ExpirationDate [his_fase.FechaCaducidad].

The date format is configured in the task.

Ex: DateTimeFormatImported="yyyyMMdd HH:mm:ss". Can be DBNULL.Value

OPERACIÓN Segundos de tiempo de ciclo nominal P57 VALOR W X

HisOperation.NominalCycleSeconds

[his_fase.SegCicloNominal , his_fase_maquina.SegCicloNominal]

OPERACIÓN

Código de agrupación P58 VARCHAR 50 W X HisOperation.GroupingCode [his_fase.cod_agrupacion]. DefaultValue = ""

This field can be used in the sequencer to group OFs with the same mold, for example.

OPERACIÓN RESERVADO P59 VARCHAR 50 HisOperation.Reserved

OPERACIÓN CUSTOM P60 VARCHAR 50 HisOperation.Custom

OPERACIÓN CUSTOM P61 VARCHAR 50 HisOperation.Custom

OPERACIÓN CUSTOM P62 VARCHAR 50 HisOperation.Custom

Page 21: ESPECIFICACIONES COMUNICACIÓN ENTRE MAPEXBP V10 Y …

21

OPERACIÓN CUSTOM P63 VARCHAR 50 HisOperation.Custom

OPERACIÓN CUSTOM P64 VARCHAR 50 HisOperation.Custom

OPERACIÓN CUSTOM P65 VARCHAR 50 HisOperation.Custom

OPERACIÓN CUSTOM P66 VARCHAR 50 HisOperation.Custom

OPERACIÓN CUSTOM P67 VARCHAR 50 HisOperation.Custom

OPERACIÓN CUSTOM P68 VARCHAR 50 HisOperation.Custom

OPERACIÓN CUSTOM P69 VARCHAR 50 HisOperation.Custom

PRODUCTO Código de producto semielaborado P70 VARCHAR 50 O

HisOperation.Operation.Product.Code.

[his_fase.Id_fase, cfg_producto.Cod_producto, cfg_fase.Id_producto]

UK CFG_FASE.ID_FASE (COD_FASE, ID_PRODUCTO)

A change on semi-finished product code will create a new product/phase/operation.

PRODUCTO Descripción de producto P71 VARCHAR 250 W X HisOperation.Operation.Product.Name [cfg_producto.Desc_producto]

PRODUCTO Código tipo de producto (familia) P72 VARCHAR 25 W X

HisOperation.Operation.Product.ProductType.Code [cfg_tipoproducto.Cod_tipoproducto].

A change in the product code type will create a new product type. DefaultValue = “”

Page 22: ESPECIFICACIONES COMUNICACIÓN ENTRE MAPEXBP V10 Y …

22

PRODUCTO Descripción tipo de producto (familia) P73 VARCHAR 50 W X HisOperation.Operation.Product.ProductType.Description [cfg_tipoproducto.Desc_tipoproducto].

DefaultValue = “”

PRODUCTO Imagen del producto P74 NVARCHAR250 W X HisOperation.Operation.Product.Product.PhotoPath [cfg_producto.Imagen]. DefaultValue = “”

PRODUCTO RESERVADO P75 VARCHAR 50 HisOperation.Operation.Product.Reserved

PRODUCTO RESERVADO P76 VARCHAR 50 HisOperation.Operation.Product.Reserved

PRODUCTO RESERVADO P77 VARCHAR 50 HisOperation.Operation.Product.Reserved

PRODUCTO RESERVADO P78 VARCHAR 50 HisOperation.Operation.Product.Reserved

PRODUCTO RESERVADO P79 VARCHAR 50 HisOperation.Operation.Product.Reserved

PRODUCTO CUSTOM P80 VARCHAR 50 HisOperation.Operation.Product.Custom

PRODUCTO CUSTOM P81 VARCHAR 50 HisOperation.Operation.Product.Custom

PRODUCTO CUSTOM P82 VARCHAR 50 HisOperation.Operation.Product.Custom

PRODUCTO CUSTOM P83 VARCHAR 50 HisOperation.Operation.Product.Custom

PRODUCTO CUSTOM P84 VARCHAR 50 HisOperation.Operation.Product.Custom

PRODUCTO CUSTOM P85 VARCHAR 50 HisOperation.Operation.Product.Custom

Page 23: ESPECIFICACIONES COMUNICACIÓN ENTRE MAPEXBP V10 Y …

23

PRODUCTO CUSTOM P86 VARCHAR 50 HisOperation.Operation.Product.Custom

PRODUCTO CUSTOM P87 VARCHAR 50 HisOperation.Operation.Product.Custom

PRODUCTO CUSTOM P88 VARCHAR 50 HisOperation.Operation.Product.Custom

PRODUCTO CUSTOM P89 VARCHAR 50 HisOperation.Operation.Product.Custom

DOC Documentación de Tipo de Producto P90 VARCHAR 250 W X DocProductType HisOperation.Operation.Product.ProductType.DocPath [his_doc.Path]

DOC Documentación de Producto P91 VARCHAR 250 W X DocProduct HisOperation.Operation.SemifinishedProduct.DocPath [his_doc.Path]

DOC Documentación de Tipo de Fase P92 VARCHAR 250 W X DocOperationType HisOperation.Operation.OperationType.DocPath [his_doc.Path]

DOC Documentación de Fase P93 VARCHAR 250 W X DocOperation HisOperation.Operation.DocPath [his_doc.Path]

DOC Documentación de Tipo de CT P94 VARCHAR 250 W X DocWorkCenterType HisOperation.WorkCenterImported.WorkCenterType.DocPath [his_doc.Path]

DOC Documentación de CT P95 VARCHAR 250 W X DocWorkCenter HisOperation.WorkCenterImported.DocPath [his_doc.Path]

DOC Documentación de Operación P96 VARCHAR 250 W X DocHisOperation HisOperation.DocPath DocOperacion [his_doc.Path]

DOC RESERVADO P97 VARCHAR 250 DOC Reserved

DOC RESERVADO P98 VARCHAR 250 DOC Reserved

Page 24: ESPECIFICACIONES COMUNICACIÓN ENTRE MAPEXBP V10 Y …

24

DOC RESERVADO P99 VARCHAR 250 DOC Reserved

DOC RESERVADO P100 VARCHAR 250 DOC Reserved

DOC RESERVADO P101 VARCHAR 250 DOC Reserved

DOC RESERVADO P102 VARCHAR 250 DOC Reserved

DOC RESERVADO P103 VARCHAR 250 DOC Reserved

DOC RESERVADO P104 VARCHAR 250 DOC Reserved

DOC RESERVADO P105 VARCHAR 250 DOC Reserved

DOC RESERVADO P106 VARCHAR 250 DOC Reserved

DOC RESERVADO P107 VARCHAR 250 DOC Reserved

DOC RESERVADO P108 VARCHAR 250 DOC Reserved

DOC RESERVADO P109 VARCHAR 250 Los primeros 109 parámetros se reservan para el estándar del programa.

CUSTOM CUSTOM P110 Primer campo CUSTOM de cliente

CUSTOM CUSTOM P…

Page 25: ESPECIFICACIONES COMUNICACIÓN ENTRE MAPEXBP V10 Y …

25

Definición de acciones de planificación entre el ERP y Mapex:

Acción de Nuevo Registro:

Controles sobre la acción:

Si el nuevo registro no pasa alguno de los controles, el proceso enviará un mail a través de

su histórico de incidencias con un mensaje descriptivo.

✓ El proceso verificará que el código de OF no exista en las tablas de históricos del

sistema.

✓ El proceso verificará la existencia y correcta relación de: Codigo_tipoof, Codigo_cliente,

Codigo_tipofase, Codigo_tipoproducto, Codigo_producto, Codigo_fase,

Codigo_tipomaquina, Codigo_maquina,

✓ En caso de no existir el producto o la operación, el proceso creará automáticamente

estos registros en las tablas correspondientes.

Inserción de datos:

Una vez estos controles han sido validados, el proceso realizará las inserciones

correspondientes en sus tablas de históricos de OF y planificación de máquinas, dejando la

OF en el estado que venga indicado (p.e."PLANIFICADA").

Acción de modificar planificación:

En general, el proceso permitirá realizar modificaciones de:

✓ Unidades a fabricar

✓ Fecha inicio OF (día y hora)

✓ Prioridad de la OF

✓ Máquina

Page 26: ESPECIFICACIONES COMUNICACIÓN ENTRE MAPEXBP V10 Y …

26

El detalle exacto de los cambios que permitirán modificaciones son los que están marcados

en la columna “MODIF”.

Las replanificaciones de máquina, día, orden se realizarán desde el ERP.

Controles:

Si el nuevo registro no pasa alguno de los controles, el proceso enviará un mensaje a través

de su histórico de incidencias con un mensaje descriptivo.

✓ El proceso verificará que la OF exista y esté en un estado que no sea producción.

Inserción de datos:

Una vez estos controles han sido validados, el proceso realizará las modificaciones

correspondientes (fecha inicio, unidades a fabricar, orden, centro de trabajo) en sus tablas

de históricos de of y operación.

✓ En caso de estar la operación en producción NO se permitirán realizar modificaciones

en la planificación.

Acción de eliminar planificación:

Esto supondrá un cambio de estado de la entidad correspondiente mediante

Parametro5=’ELIMINADA’ en caso de eliminarse una OF o bien Parametro53=’ELIMINADA’

en caso de eliminarse una operación.

Es necesario enviar la eliminación de cada operación para poder eliminar

completamente la OF.

Tablas implicadas:

Las tablas que alimenta son: CFG_TIPOOF, CFG_CLIENTE, CFG_TIPOMAQUINA,

CFG_MAQUINA, CFG_TIPOPRODUCTO, CFG_PRODUCTO, CFG_TIPOFASE,

CFG_FASE, CFG_FASE_MAQUINA (CreateOperationWorkCenter), HIS_OF, HIS_FASE

La clave es: HisWO.Code, HisOperation.Code, HisOperation.Code

Page 27: ESPECIFICACIONES COMUNICACIÓN ENTRE MAPEXBP V10 Y …

27

MANTENIMIENTO DEL MAESTRO DE OPERARIOS

Configurable por tarea de MapexAgent:

CreateWorkerType It's possible to create WorkerType

WorkerActiveInformed If It's True Worker.Active is informed and it will be updated, else is ignored and Activation /

desactivation is done from MapexBP

WorkerTypeActiveInformed If It's True Worker.WorkerType.Active is informed and it will be updated, else is ignored and Activation /

desactivation is done from MapexBP

W/O: Warning / Obligatory

Tabla: PRD_ERP_IN

Descripción

Campo MAPEXBP

Campo Tipo campo W/O Modif Comentarios

Identificador del

registro

Id_prd_erp_in Int 11 Autonumeric (PK)

Identificador

operación

Id_operacion NUMBER Value = 200

Fecha_generacion Fecha_generacion Timestamp Generation date

Fecha_proceso Fecha_proceso DATETIME Process date

Ack Ack Int 1 0: Pdt; 1: OK; 2: ERROR Throw Exception; 100: WARNING:

add error message

Mensaje de Error ErrorMessage VARCHAR(MAX) Error message

Número de errores

previo a error

ErrorNum TINYINT NUMBER OF ERRORS that have to occur before being

marked as error: Must be marked as ERROR If

ErrorNum>=ErrorsProcessNumberBeforeERROR

ErrorMail_Ack ErrorMail_Ack TINYINT 0: Pdt; 1: Sent

ErrorMail_Fecha ErrorMail_Fecha DATETIME Email sending date

Estado Operario P1 VALOR (0,1) W X Worker.Active [cfg_operario.Activo] (0 = No, 1= Yes)

Page 28: ESPECIFICACIONES COMUNICACIÓN ENTRE MAPEXBP V10 Y …

28

Cod.operario P2 VARCHAR(25) O Worker.Code [cfg_operario.Cod_operario].

A change in the operator code will create a new operator.

Nombre P3 VARCHAR(50) W X Worker.Name [cfg_operario.Desc_operario].

Cod. tipo operario P4 VARCHAR(25) W X WorkerType.Code

[cfg_operario.Id_tipooperario,

cfg_tipooperario.Cod_tipooperario].

A change in the operator code type will create a new operator

type.

Desc. tipo operario P5 VARCHAR(50) W X WorkerType.Description

[cfg_tipooperario.Desc_tipooperario].

Tipo op. Activo P6 VALOR (0, 1) W X WorkerType.Active [cfg_tipooperario.Activo]. (0=No, 1=Yes)

Level Prod P7 VALOR (0..9) W X Worker.ProductionLevel [cfg_operario.Level_prod]

Level Mant (0..9) P8 VALOR (0..9) W X Worker.MaintenanceLevel [cfg_operario.Level_mant]

Level Cal (0..9) P9 VALOR (0..9) W X Worker.QualityLevel [cfg_operario.Level_cal]

Level Wam (0..9) P10 VALOR (0..9) W X Worker.WamLevel [cfg_operario.Level_wam]

Coste por hora P11 VALOR (0-120) W X Worker.CostPerHour [cfg_operario.Coste_hora]

Coste por hora

extra

P12 VALOR (0-120) W X Worker.CostPerExtraHour [cfg_operario.Coste_hora_extra]

NIF P13 VARCHAR(10) W X Worker.NIF [cfg_operario.NIF]

Dirección operario P14 VARCHAR(50) W X Worker.Adress [cfg_operario.Direccion]

Teléfono P15 VARCHAR(25) W X Worker.PhoneNumber [cfg_operario.Telefono]

Path Foto P16 VARCHAR(250) W X Worker.PhotoPath [cfg_operario.Imagen]

RFID P17 VARCHAR(30) W X Worker.RFID [cfg_operario.RFID]

Comentarios P18 VARCHAR(500) W X Worker.Comments [cfg_operario.Observaciones]

Coste por hora Tipo

Operario

P19 VALOR (0-120) W X WorkerType.CostPerHour [cfg_tipooperario.Coste]

Reservado P20 Worker.Reserved

Page 29: ESPECIFICACIONES COMUNICACIÓN ENTRE MAPEXBP V10 Y …

29

Reservado P21 Worker.Reserved

Reservado P22 Worker.Reserved

Reservado P23 Worker.Reserved

Reservado P24 Worker.Reserved

Reservado P25 Worker.Reserved

Reservado P26 Worker.Reserved

Reservado P27 Worker.Reserved

Reservado P28 Worker.Reserved

Reservado P29 Worker.Reserved

Custom P30 Worker.Custom

Acción de Nuevo Registro (N):

✓ Crea el operario si no existe en las tablas MapexBP.

✓ Crea el grupo de operarios si no existe en las tablas MapexBP (Configurable).

Page 30: ESPECIFICACIONES COMUNICACIÓN ENTRE MAPEXBP V10 Y …

30

MANTENIMIENTO DEL MAESTRO DE ESCANDALLO

Si el código de OF no viene informado únicamente alimentará la CFG_FASE_PRODUCTO.

Si viene informado alimentará HIS_FASE_PRODUCTO, y si CreateOperationProduct=True

además alimentará la CFG_FASE_PRODUCTO.

Creará los componentes si no existen.

Configurable por tarea de MapexAgent:

DateTimeFormatImported Default Value "yyyyMMdd HH:mm:ss"

CreateOperationProduct

It's possible to create OperationProduct in addition to HisOperationProduct

CreateProductType It's possible to create ProductTypes

TraceabilityTypeRequired If MapexBP manages the TraceabilityType fields, TraceabilityTypeRequired must be False

ProductActiveInformed If It's True Product.Active is informed and it will be updated, else is ignored and Activation /

desactivation is done from MapexBP

CalculateParallelUnits

If It's True and ParallelUnitsUnits=0, ParallelUnitsUnits will be calculated:

ParallelUnitsUnits = Units

* ProductClass.ConversionFactorToParallelUnitOfMeasure. DefaultValue = False.

UnitCostFromMasterOfProduct

If It's True and UnitCost=0, UnitCost will be calculated:

UnitCost=ProductClass.UnitCost. DefaultValue = False.

WeightFromMasterOfProduct

If It's True and Weight=0, Weight will be calculated:

Weight=ProductClass.UnitWeight*Units. DefaultValue = False.

PrcMermaFromMasterOfProduct

If It's True and Prc_MermaMin=0 Or Prc_MermaMax=0, Prc_Merma will be:

Prc_Merma=ProductClass.Prc_Merma. DefaultValue = False.

W/O: Warning / Obligatory

Page 31: ESPECIFICACIONES COMUNICACIÓN ENTRE MAPEXBP V10 Y …

31

Tabla: PRD_ERP_IN

Descripción Campo

MAPEXBP

Campo Tipo campo W/O Modif Comentarios

Identificador del

registro

Id_prd_erp_in Int 11 Autonumeric (PK)

Identificador operación Id_operacion NUMBER Value = 400

Fecha_generacion Fecha_generacion Timestamp Generation date

Fecha_proceso Fecha_proceso DATETIME Process date

Ack Ack Int 1 0: Pdt; 1: OK; 2: ERROR Throw Exception; 100:

WARNING: add ErrorMessage

Mensaje de Error ErrorMessage VARCHAR(MAX) Error message

Número de errores que

se han de dar para

marcarse cómo error

ErrorNum TINYINT NUMBER OF ERRORS that have to occur before

being marked as error: Must be marked as ERROR If

ErrorNum>=ErrorsProcessNumberBeforeERROR

Id 400 has defined that 2 errors must be given before

being marked as an error, to avoid false errors due to

the processing of consecutive tasks.

ErrorMail_Ack ErrorMail_Ack TINYINT 0: Pdt; 1: Sent

ErrorMail_Fecha ErrorMail_Fecha DATETIME Email sending date

Código OF P1 VARCHAR(25) O HisWO.Code [his_fase_producto.Id_his_fase,

his_of.Cod_of] [OPTIONAL] (DefaultValue=“” If BOM

doesn’t go by WO => cfg_fase_producto)

Código Operación P2 VARCHAR(50) O Operation.Code [his_fase.Id_fase /

cfg_fase.Cod_fase]

Código Producto P3 VARCHAR(50) O HisOperation.Operation.FinalProduct.Code

[his_fase.Id_producto / cfg_fase.Id_producto_final,

cfg_producto.Cod_producto]

Orden P4 VALOR W X Order [his_fase_producto.Orden,

cfg_fase_producto.Orden]

Código Componente P5 VARCHAR(50) O Product.Code [Raw

Material(EntradaSalida=0)/Product(ES=1)/Byproduct(

ES=2)] [his_fase_producto.Id_producto/

Page 32: ESPECIFICACIONES COMUNICACIÓN ENTRE MAPEXBP V10 Y …

32

cfg_fase_producto.Id_producto,

cfg_producto.Cod_producto]

Descripción

Componente

P6 VARCHAR(250) W X Product.Description [cfg_producto.Desc_producto]

Unidades P7 DECIMAL[18,4] O X Units [his_fase_producto.Unidades /

cfg_fase_producto.Unidades]

FormatValue: #.####

Código Tipo de Materia

Prima

P8 VARCHAR(25) W X Product.ProductType.Code

[cfg_producto.Id_tipoproducto,

cfg_tipoproducto.Cod_tipoproducto]

Descripción Tipo de

Materia Prima

P9 VARCHAR(50) W X Product.ProductType.Description

[cfg_tipoproducto.Desc_tipoproducto]

EntradaSalida P10 VALOR (0,1,2) W X InboundOutbound [his_fase_producto.EntradaSalida

/ cfg_fase_producto.EntradaSalida] (Inbound = 0;

Outbound = 1; Subproduct = 2). DefaultValue=“0”.

Cod.Tipo Trazabilidad

Entrada

P11 VARCHAR(50) W X InboundTraceabilityType.Cod

[his_fase_producto.id_tipotrazabilidadEntrada /

cfg_fase_producto.id_tipotrazabilidadEntrada,

cfg_tipotrazabilidadEntrada.Cod_tipotrazabilidadEntr

ada]

DefaultValue=“--”. If you don't have input traceability.

It is required to have Input or Output traceability.

Cod.Tipo Trazabilidad

Salida

P12 VARCHAR(50) W X OutboundTraceabilityType.Cod.

[his_fase_producto.id_tipotrazabilidadSalida /

cfg_fase_producto.id_tipotrazabilidadSalida,

cfg_tipotrazabilidadSalida.Cod_tipotrazabilidadSalida

]

DefaultValue=“--”. If you don't have output

traceability.

It is required to have Input or Output traceability.

Activo P13 VALOR (0 = No,

1= Si)

O X Active [his_fase_producto.Activo /

cfg_fase_producto.Activo]. DefaultValue=“1”.

Page 33: ESPECIFICACIONES COMUNICACIÓN ENTRE MAPEXBP V10 Y …

33

Activo Materia Prima P14 VALOR (0 = No,

1= Si)

W X Product.Active [cfg_producto.Activo].

DefaultValue=“1”.

Unidad Medida Base P15 NVARCHAR(5) W X Product.BaseUnitOfMeasure

[Cfg_producto.UnidadMedidaBase] DefaultValue=“”

Unidades Paralela P16 DECIMAL[18,4] W X HisOperationProduct.ParallelUnitOfMeasure

[his_fase_producto.UnidadesParalela].

DefaultValue=“0”.

Unidad Medida

Paralela

P17 NVARCHAR(5) W X Product.ParallelUnitOfMeasure

[Cfg_producto.UnidadMedidaParalela]

DefaultValue=“”

CosteUnitario P18 DECIMAL[10,4] W X HisOperationProduct.UnitCost

[his_fase_producto.CosteUnitario]. DefaultValue=“0”.

Peso P19 DECIMAL[18,4] W X HisOperationProduct.Weight

[his_fase_producto.Peso /cfg_fase_producto.Peso].

DefaultValue=“0”.

RESERVADO -

CUSTOM

P20 Reserved - Custom

%Merma Min P21 DECIMAL[18,4] W X HisOperationProduct.prc_MermaMin

[his_fase_producto.prc_MermaMin].

DefaultValue=“0”.

%Merma Max P22 DECIMAL[18,4] W X HisOperationProduct.prc_MermaMax

[his_fase_producto.prc_MermaMax].

DefaultValue=“0”.

RESERVADO P23 Reserved

RESERVADO P24 Reserved

RESERVADO P25 Reserved

RESERVADO P26 Reserved

RESERVADO P27 Reserved

RESERVADO P28 Reserved

RESERVADO P29 Reserved

Page 34: ESPECIFICACIONES COMUNICACIÓN ENTRE MAPEXBP V10 Y …

34

RESERVADO P30 Reserved

RESERVADO P31 Reserved

RESERVADO P32 Reserved

RESERVADO P33 Reserved

RESERVADO P34 Reserved

RESERVADO P35 Reserved

RESERVADO P36 Reserved

RESERVADO P37 Reserved

RESERVADO P38 Reserved

RESERVADO P39 Reserved

CUSTOM P40 Custom

Acción de Nuevo Registro (N):

✓ Crea el escandallo si no existe en las tablas MapexBP.

✓ Si viene informada la OF (P1) el escandallo se registra a este nivel, si no se informa

el escandallo se registrará a nivel de Fase.

o HIS_FASE_PRODUCTO: Clave HisWO.Code, Operation.Code,

Operation.Product.Code

o CFG_FASE_PRODUCTO: Clave Operation.Code, Operation.Product.Code

Page 35: ESPECIFICACIONES COMUNICACIÓN ENTRE MAPEXBP V10 Y …

35

REPORTE PRODUCTIVIDAD POR MODO FUNCIONAMIENTO DE ERP -> MAPEX

W/O: Warning / Obligatory

Tabla: PRD_ERP_IN

Descripción Campo

MAPEXBP

Campo Tipo campo W/O Modif Comentarios

Identificador del

registro

Id_prd_erp_in Int 11 Autonumeric (PK)

Identificador operación Id_operacion NUMBER Value = 303

Fecha_generacion Fecha_generacion Timestamp Generation date

Fecha_proceso Fecha_proceso DATETIME Process date

Ack Ack Int 1 0: Pdt; 1: OK; 2: ERROR Throw Exception; 100: WARNING:

add ErrorMessage

Mensaje de Error ErrorMessage VARCHAR(MAX) Error message

Número de errores que

se han de dar para

marcarse cómo error

ErrorNum TINYINT NUMBER OF ERRORS that have to occur before being

marked as error: Must be marked as ERROR If

ErrorNum>=ErrorsProcessNumberBeforeERROR

ErrorMail_Ack ErrorMail_Ack TINYINT 0: Pdt; 1: Sent

ErrorMail_Fecha ErrorMail_Fecha DATETIME Email sending date

Código Producto P1 VARCHAR(50) O Product.Code

[cfg_fase.Id_producto_final,cfg_producto.Cod_producto]

Código Operación P2 VARCHAR(50) O Operation.Code [cfg_fase_maquina.Id_fase,

cfg_fase.Cod_fase]

Código Centro de

trabajo planificado (CT)

P3 VARCHAR(25) O WorkCenter.Code

[cfg_fase_maquina.Id_maquina,

cfg_maquina.Cod_maquina]

Modo Funcionamiento P4 VALOR(1-1000) W OperationWorkCenter.OperationModeId

[cfg_fase_maquina.Id_modofuncionamientofase]

Factor Multiplicativo

(fase-CT)

P5 DECIMAL[8,2] W X OperationWorkCenter.MultiplicativeFactor

[cfg_fase_maquina.Factor_multiplicativo]

Page 36: ESPECIFICACIONES COMUNICACIÓN ENTRE MAPEXBP V10 Y …

36

VALOR(0-25) FormatValue: #.##

Productividad Técnico

(fase-CT)

P6 DECIMAL[8,2] O X OperationWorkCenter.NominalProductivity

[cfg_fase_maquina.Rendimientonominal1]. Units/Hour

Productividad

Cronometrado(fase-

CT)

P7 DECIMAL[8,2] O X OperationWorkCenter.NominalProductivity2

[cfg_fase_maquina.Rendimientonominal2]. Units/Hour

Activo P8 VALOR (0,1) O X OperationWorkCenter.Active [cfg_fase_maquina.Activo]

Número de Operarios P9 VALOR(0-20) W X OperationWorkCenter.WorkerNum

[cfg_fase_maquina.NumOperarios]

Segundos Detección

Paro

P10 VALOR W X OperationWorkCenter.DowntimeDetectionSeconds

[cfg_fase_maquina.SegDeteccionParo]

Productividad de

Operario

P11 DECIMAL[8,2] W X OperationWorkCenter.OperatorProductivity

[cfg_fase_maquina.velocidadoperario]

Segundos de tiempo de

ciclo nominal

P12 VALOR W X OperationWorkCenter.NominalCycleSeconds

[cfg_fase_maquina.SegCicloNominal]

RESERVADO P13 Reserved

RESERVADO P14 Reserved

RESERVADO P15 Reserved

RESERVADO P16 Reserved

RESERVADO P17 Reserved

RESERVADO P18 Reserved

RESERVADO P19 Reserved

CUSTOM P20 Custom

Acción de Nuevo Registro (N):

✓ Crea modo de funcionamiento a nivel de producto-operación si no existe en las tablas

MapexBP.

Page 37: ESPECIFICACIONES COMUNICACIÓN ENTRE MAPEXBP V10 Y …

37

Tabla que alimenta: CFG_FASE_MAQUINA. Clave Product.Code, Operation.Code,

WorkCenter.Code, OperationWorkCenter.OperationModeId,

OperationWorkCenter.WorkerNum

Page 38: ESPECIFICACIONES COMUNICACIÓN ENTRE MAPEXBP V10 Y …

38

MANTENIMIENTO DE LA DOCUMENTACIÓN

Debe estar informado el campo (P1) Element.Code o el campo (P10) Element.Id para

asociar el documento al elemento correspondiente.

IMPORTANTE: Toda entidad nueva donde se quiera registrar documentación es necesaria crearla

en el maestro “Configuración de Tablas de Documentación”. Por ejemplo, si fuera necesario crear

documentación de BOM se debería registrar “CFG_FASE_PRODUCTO”.

Configurable por tarea de MapexAgent:

DateTimeFormatImported Default Value "yyyyMMdd HH:mm:ss"

CheckTableId If CheckTableId is True, it will verify that the item that the document is associated with exists. It will

search by field (P10) Element.Id, or by (P1) Element.Code if it is not informed.

CreateDocType It's possible to create DocType in addition to Doc

W/O: Warning / Obligatory

Tabla: PRD_ERP_IN

Descripción Campo

MAPEXBP

Campo Tipo campo W/O Modif Comentarios

Identificador del registro Id_prd_erp_in Int 11 Autonumeric (PK)

Identificador operación Id_operacion NUMBER Value = 500

Fecha_generacion Fecha_generacion Timestamp Generation date

Fecha_proceso Fecha_proceso DATETIME Process date

Ack Ack Int 1 0: Pdt; 1: OK; 2: ERROR Throw Exception; 100:

WARNING: add ErrorMessage

Mensaje de Error ErrorMessage VARCHAR(MAX) Error message

Número de errores que

se han de dar para

marcarse cómo error

ErrorNum TINYINT NUMBER OF ERRORS that have to occur before being

marked as error: Must be marked as ERROR If

ErrorNum>=ErrorsProcessNumberBeforeERROR

ErrorMail_Ack ErrorMail_Ack TINYINT 0: Pdt; 1: Sent

Page 39: ESPECIFICACIONES COMUNICACIÓN ENTRE MAPEXBP V10 Y …

39

ErrorMail_Fecha ErrorMail_Fecha DATETIME Email sending date

Código elemento P1 VARCHAR(50) W Element.Code [his_doc.Id_tabla]

Tipo elemento P2 VARCHAR(5-50) O ElementTable.Name [his_doc.Cod_doc_tabla] (CFG_*) –

Longitud mínima 5

Path P3 VARCHAR(250) O Doc.Path [his_doc.Path]

Activo P4 VALOR(0,1) W X Doc.Active [his_doc.Activo]

Código de Tipo

Documento

P5 VARCHAR(50) W DocType.Code [his_doc.Id_doc_tipodoc,

cfg_doc_tipodoc.Cod_doc_tipodoc]. DefaultValue = “--”

A change on DocType.Code will create a new doc.

Versión P6 VALOR(smallint) W X Doc.Version [his_doc.Version]. DefaultValue = “0”

Código documento P7 VARCHAR(100) W X Doc.Code [his_doc.Cod_his_doc]. Required if there is

more than one document per type.

Descripción documento P8 VARCHAR(200) W X Doc.Description [his_doc.Desc_his_doc]. DefaultValue =

“”

Comentarios P9 VARCHAR(300) W X Doc.Comments [his_doc.Comentario]. DefaultValue = “”

Id elemento P10 VALOR W X Element.Id [his_doc.Id_tabla]. If the key were composed

and required customization. For this case, P1 must be

DBNULL.

DefaultValue = “0”

Fecha de caducidad P11 VARCHAR(50) W X ExpirationDate [his_doc.FechaCaducidad].

The date format is configured in the task.

Ex: DateTimeFormatImported="yyyyMMdd HH:mm:ss"

DefaultValue = “”

RESERVADO P12 Reserved

RESERVADO P13 Reserved

RESERVADO P14 Reserved

Page 40: ESPECIFICACIONES COMUNICACIÓN ENTRE MAPEXBP V10 Y …

40

RESERVADO P15 Reserved

RESERVADO P16 Reserved

RESERVADO P17 Reserved

RESERVADO P18 Reserved

RESERVADO P19 Reserved

CUSTOM P20 Custom

Tipos elementos posibles:

“CFG_PRODUCTO”

“CFG_TIPOFASE”

“CFG_FASE”

“CFG_TIPOMAQUINA”

“CFG_MAQUINA”

“CFG_OPERARIO”

“CFG_DEFECTO”

“CFG_TIPOPRODUCTO”

“HIS_OF”

“HIS_FASE”

Acción de Nuevo Registro (N):

✓ Crea el documento si no existe en las tablas MapexBP.

Page 41: ESPECIFICACIONES COMUNICACIÓN ENTRE MAPEXBP V10 Y …

41

MANTENIMIENTO DEL MAESTRO DE PRODUCTO

Alimenta las tablas CFG_TIPOPRODUCTO y CFG_ PRODUCTO del MapexBP.

Si CreateOperation=True también gestiona la tabla CFG_FASE.

Configurable por tarea de MapexAgent:

DateTimeFormatImported Default Value "yyyyMMdd HH:mm:ss"

CreateProductType It's possible to create ProductType in addition to Product

PlanningBom -1: Doesn't update fields; 0: Update CanBePlanned field; 1: Update RawMaterial field; 2 Update

CanBePlanned&RawMaterial fields

TraceabilityTypeRequired If MapexBP manages the TraceabilityType fields, TraceabilityTypeRequired must be False

CanBePlannedRequired 0/1: CanBePlanned Required

RawMaterialRequired 0/1: RawMaterial required

MaxCost Max value cost of Material

CreateOperation If it’s true will create Operation when Product.CanBePlanned=1

CreateOperationType If True creates OperationTypes when Product.CanBePlanned=1

ProductActiveInformed If It's True Product.Active is informed else is ignored

W/O: Warning / Obligatory

Tabla: PRD_ERP_IN

Descripción Campo

MAPEXBP

Campo Tipo campo W/O Modif Comentarios

Identificador del registro Id_prd_erp_i

n

Int 11 Autonumeric (PK)

Identificador operación Id_operacion NUMBER Value = 100

Fecha_generacion Fecha_gene

racion

Timestamp Generation date

Page 42: ESPECIFICACIONES COMUNICACIÓN ENTRE MAPEXBP V10 Y …

42

Fecha_proceso Fecha_proce

so

DATETIME Process date

Ack Ack Int 1 0: Pdt; 1: OK; 2: ERROR Throw Exception; 100: WARNING: add

ErrorMessage

Mensaje de Error ErrorMessag

e

VARCHAR(

MAX)

Error message

Número de errores que

se han de dar para

marcarse cómo error

ErrorNum TINYINT NUMBER OF ERRORS that have to occur before being marked as

error: Must be marked as ERROR If

ErrorNum>=ErrorsProcessNumberBeforeERROR

ErrorMail_Ack ErrorMail_Ac

k

TINYINT 0: Pdt; 1: Sent

ErrorMail_Fecha ErrorMail_Fe

cha

DATETIME Email sending date

Código Producto

MP/PI/PA

P1 VARCHAR(5

0)

O Product.Code [cfg_producto.Cod_producto]/[cfg_fase.Id_producto]

(RawMaterial/Semifinished/Finished Product)

Descripción de Producto P2 VARCHAR(5

0)

W X Product.Description [cfg_producto.Desc_producto]

Código Tipo de Producto P3 VARCHAR(5

0)

W Product.ProductType.Code [cfg_producto.Id_tipoproducto,

cfg_tipoproducto.Cod_tipoproducto]. DefaultValue = “”

Descripción Tipo de

Producto

P4 VARCHAR(5

0)

W X Product.ProductType.Description

[cfg_tipoproducto.Desc_tipoproducto]. DefaultValue = “”

Path de la imagen del

Producto

P5 VARCHAR(5

0)

W X Product.PhotoPath [cfg_producto.Imagen]. DefaultValue = “”

Activo P6 VARCHAR(2

50)

W X Product.Active [cfg_producto.Activo].DefaultValue = “1”

Planificable P7 VALOR (0 =

No, 1= Si)

O/W X Product.CanBePlanned (0/1)

[cfg_producto.Planificable]. DefaultValue = “0”

CanBePlanned=0 for RawMaterial

CanBePlanned=1 for Semifinished/Finished Product

Page 43: ESPECIFICACIONES COMUNICACIÓN ENTRE MAPEXBP V10 Y …

43

Materia Prima P8 VARCHAR(2

5)

O/W X Product.RawMaterial (0/1) [cfg_producto.MatPrima]. DefaultValue =

“0”

Comentarios P9 VARCHAR(5

0)

W X Product.Comments [cfg_producto.Observaciones]

Coste Unitario del

Producto

P10 DECIMAL[10

,4]

W X Product.UnitCost [cfg_producto.CosteUnitario]

FormatValue: ####.#

Cod.Tipo Trazabilidad

Entrada

P11 VARCHAR(5

0)

O/W X Product.InboundTraceabilityType.Cod

[cfg_producto.id_tipotrazabilidadEntrada /

cfg_tipotrazabilidadEntrada.Cod_tipotrazabilidadEntrada]

DefaultValue=“--”. If you don't have input traceability.

It is required to have Input or Output traceability.

Cod.Tipo Trazabilidad

Salida

P12 VARCHAR(5

0)

O/W X Product.OutboundTraceabilityType.Cod.

[his_fase_producto.id_tipotrazabilidadSalida /

cfg_fase_producto.id_tipotrazabilidadSalida,

cfg_tipotrazabilidadSalida.Cod_tipotrazabilidadSalida]

DefaultValue=“--”. If you don't have output traceability.

It is required to have Input or Output traceability.

Peso Variable P13 VALOR (0 =

No, 1= Si)

W X Product.HasVariableWeight (0/1) [cfg_producto.PesoVariable]

Código de producto OF P14 VARCHAR

50

W X Product.Code [cfg_fase.Id_producto_final,

cfg_producto.Cod_producto].

DefaultValue:

If CreateOperation=True and P14 is DBNULL, then

P14=P1

Código de fase de

semielaborado

P15 VARCHAR

50

W Operation.Code [cfg_fase.Cod_fase]

UK CFG_FASE.ID_FASE (COD_FASE, ID_PRODUCTO)

A change to the semi-finished product phase code will create a new

phase.

Page 44: ESPECIFICACIONES COMUNICACIÓN ENTRE MAPEXBP V10 Y …

44

Descripción de fase

semielaborado

P16 VARCHAR

150

W X Operation.Description [cfg_fase.Desc_fase]. DefaultValue = “”

Código de Tipo de Fase P17 VARCHAR

25

W X Operation.OperationType.Code [cfg_fase.Id_tipofase,

cfg_tipofase.Cod_tipofase]. DefaultValue = “--”

Ej. MECANIZADO, PINTURA, CORTE…

Descripción de Tipo de

Fase

P18 VARCHAR

50

W X Operation.OperationType.Description

[cfg_tipofase.Desc_tipofase]. DefaultValue = “--”

Última operación P19 (0 = No, 1=

Si)

W X Operation.LastOperation [cfg_fase.Ultima_fase].DefaultValue = “0”

UnidadMedidaParalelaFa

ctorConversion

P20 DECIMAL[10

,4]

W X Product.ConversionFactorToParallelUnitOfMeasure [cfg_producto.

UnidadMedidaParalelaFactorConversion] DefaultValue =1

FormatValue: ####.#

Unidad Medida Base P21 NVARCHAR(

5)

W X Product.BaseUnitOfMeasure [Cfg_producto.UnidadMedidaBase]

DefaultValue=“”

Unidad Medida Paralela P22 NVARCHAR(

5)

W X Product.ParallelUnitOfMeasure

[Cfg_producto.UnidadMedidaParalela] DefaultValue=“”

Unidad Paralela variable P23 VALOR (0 =

No, 1= Si)

W X Product.HasVariableParallelUnit [Cfg_producto.

UnidadParalelaVariable] DefaultValue=“0”

Peso Unitario P24 DECIMAL[10

,4]

W X Product.UnitWeight [Cfg_producto.PesoUnitario] DefaultValue=“0”

%Merma Min P25 DECIMAL[18

,4]

W X Product.prc_MermaMin [Cfg_producto.prc_MermaMin].

DefaultValue=“0”.

%Merma Max P26 DECIMAL[18

,4]

W X Product.prc_MermaMax [Cfg_producto prc_MermaMax].

DefaultValue=“0”.

RESERVADO P27 Reserved

RESERVADO P28 Reserved

RESERVADO P29 Reserved

CUSTOM P30 Custom

Page 45: ESPECIFICACIONES COMUNICACIÓN ENTRE MAPEXBP V10 Y …

45

Cfg_producto (HisWO.Product): todo proceso tiene que estar en la misma unidad de medida

para los cálculos de YIELD)

• UnidadMedidaBase (Base o principal) (Ej. Unidad, bobina, bombo, barra)

• PesoUnitario (his_trazabilidad.Peso)

• UnidadMedidaParalela

• UnidadMedidaParalelaFactorConversion (Ej. Ancho de bobina)

• PesoVariable

• UnidadParalelaVariable

Acción de Nuevo Registro (N):

✓ Crea el tipo de producto si no existe en las tablas MapexBP (CONFIGURABLE si

CreateOperationType=true)).

✓ Crea el producto si no existe en las tablas MapexBP.

✓ Crea la operación si no existe en las tablas MapexBP (CONFIGURABLE si

CreateOperation=True).

o CFG_TIPOPRODUCTO: Clave ProductType.Code

o CFG_ PRODUCTO: Clave Product.Code

o CFG_FASE: Clave Operation.Code + Product.Code [UK

CFG_FASE.ID_FASE (COD_FASE, ID_PRODUCTO)]

Page 46: ESPECIFICACIONES COMUNICACIÓN ENTRE MAPEXBP V10 Y …

46

REPORTE DE LÍNEAS DE PEDIDO (WAM)

Configurable por tarea de MapexAgent:

DateTimeFormatImported Default Value "yyyyMMdd HH:mm:ss"

CreateOperationProduct

It's possible to create OperationProduct in addition to HisOperationProduct

UniqueKeyMode 0 UniqueKey Cod_his_wam_pedido; 1 UniqueKey Cod_his_wam_pedido&Cod_proveedor.

DefaultValue =0

CreateSupplier If True creates Suppliers if it doesn't exist. DefaultValue = False.

CreateProductSupplier If True creates Product-Supplier relationship. DefaultValue = True.

POStatusInformed

If It's True fields “O(P5) HisPurchaseOrder.Status.Code” are mandatory, else “W(P5)” those

can be DBNULL and will be ignored or have code “SUSP” for CANCEL Status. DefaultValue

= True.

W/O: Warning / Obligatory

PO: Purchase Order

The P2/P3 fields contain the Supplier or Customer depending on the type of purchase order:

• P6 = ‘RECEP’: P2= HisPurchaseOrder.Supplier.Code

• P6 = ‘EXPED’: P2= HisPurchaseOrder.Customer.Code

Tabla: PRD_ERP_IN

Descripción Campo

MAPEXBP

Campo Tipo campo W/O Modif Comentarios

Identificador del

registro

Id_prd_erp_in Int 11 Autonumeric (PK)

Identificador operación Id_operacion NUMBER Value = 600

Fecha_generacion Fecha_generacion Timestamp Generation date

Page 47: ESPECIFICACIONES COMUNICACIÓN ENTRE MAPEXBP V10 Y …

47

Fecha_proceso Fecha_proceso DATETIME Process date

Ack Ack Int 1 0: Pdt; 1: OK; 2: ERROR Throw Exception; 100:

WARNING: add ErrorMessage

Mensaje de Error ErrorMessage VARCHAR(MAX) Error message

Número de errores que

se han de dar para

marcarse cómo error

ErrorNum TINYINT NUMBER OF ERRORS that have to occur before

being marked as error: Must be marked as ERROR If

ErrorNum>=ErrorsProcessNumberBeforeERROR

ErrorMail_Ack ErrorMail_Ack TINYINT 0: Pdt; 1: Sent

ErrorMail_Fecha ErrorMail_Fecha DATETIME Email sending date

Código PO

P1 VARCHAR 50 O

HisPurchaseOrder.Code

[his_wam_pedido.cod_his_wam_pedido]

MaxLength=50

Código

Proveedor/Cliente

P2 VARCHAR 100 O

HisPurchaseOrder.[Supplier/Customer].Code

[cfg_proveedor.cod_proveedor]

[his_wam_pedido.id_proveedor] /

[cfg_cliente.cod_cliente]

[his_wam_pedido.id_cliente]. It is not possible to

change the supplier/customer once it has been

created.

MaxLength=50

Desc.Proveedor/Client

e P3 VARCHAR 25 W X

HisPurchaseOrder.Supplier.Description (W)

[cfg_proveedor.desc_proveedor].DefaultValue = “”

MaxLength=250

Fecha Entrega de PO

P4 VARCHAR W X

HisPurchaseOrder.DeliveryDate (W)

[his_wam_pedido.fechaEntrega]. DefaultValue = “”

MaxLength = Length(DateTimeFormatImported)

Código Estado de PO

P5 VARCHAR 25 O/W X

HisPurchaseOrder.Status.Code

[cfg_wam_estadoPedido.cod_wam_estadoPedido]

[his_wam_pedido.id_wam_estadoPedido].

If POStatusInformed=True then O(P5) else W(P5) .

** If the PO is not pending nor cancelled and

P5=“SUSP” status code it will return a warning.

Page 48: ESPECIFICACIONES COMUNICACIÓN ENTRE MAPEXBP V10 Y …

48

** If POStatusInformed=True and P5 is prior to the

current status code it will return a warning.

Possible Values established by application: ‘PEND’,

‘START’, ‘END’, ‘SUSP’

Código de Tipo de PO

P6 VARCHAR 50 O

HisPurchaseOrder.PurchaseOrderType.Code

[cfg_wam_tipoPedido.cod_wam_tipoPedido]

[his_wam_pedido.id_wam_tipoPedido]

MaxLength=50

Possible Values established by application:

‘RECEP’; ‘EXPED’

Observaciones de PO

P11 VARCHAR 1000 W X

HisPurchaseOrder.Comments (W).

[his_wam_pedido.observaciones]. DefaultValue= “”

MaxLength=1000

RESERVADO P7..29 VARCHAR 250 W X HisPurchaseOrder.Reserved

Código de línea de PO P30 VARCHAR 50

O

HisPurchaseOrderLine.Code

[his_wam_pedidoLinea.cod_his_wam_pedidoLinea]

MaxLength=50

Línea Activa P31 VALOR (0 = No,

1= Si) O X

HisPurchaseOrderLine.Active (0/1)

[his_wam_pedidoLinea.activo]. DefaultValue=“0”.

Fecha Entrega de

Línea

P32

VARCHAR W X

HisPurchaseOrderLine.DeliveryDate

[his_wam_pedidoLinea.fechaEntrega].

DefaultValue=“0”.

MaxLength = Length(DateTimeFormatImported)

Código Producto P33

VARCHAR 50 O

HisPurchaseOrderLine.Product.Code

[cfg_producto.cod_producto]

[his_wam_pedidoLinea.id_producto] MaxLength=50

Cantidad P34 DECIMAL[18,4] O X

HisPurchaseOrderLine.Quantity

[his_wam_pedidoLinea cantidad]

Lote P35 W X

HisPurchaseOrderLine.Batch

[his_wam_pedidoLinea.lote] MaxLength=200

Page 49: ESPECIFICACIONES COMUNICACIÓN ENTRE MAPEXBP V10 Y …

49

Observaciones de

Línea

P36

W X

HisPurchaseOrderLine.Comments (W)

[his_wam_pedidoLinea observaciones].

MaxLength=250

RESERVADO P37..59 HisPurchaseOrderLine.Reserved

CUSTOM P40 HisPurchaseOrderLine.Custom

La clave única de la tabla HIS_WAM_PEDIDO es configurable (UniqueKeyMode):

o 0: HisPurchaseOrder.Cod_his_wam_pedido

o 1: HisPurchaseOrder.Cod_his_wam_pedido&Cod_proveedor

Acción de Nuevo Registro (N):

✓ Crea el pedido/líneas si no existe en las tablas MapexBP

o HIS_WAM_PEDIDO / HIS_WAM_PEDIDOLINEA

✓ Crea el proveedor si no existen en las tablas MapexBP (CONFIGURABLE si

CreateSupplier=True).

o CFG_PROVEEDOR

✓ Crea la relación producto-proveedor si no existen en las tablas MapexBP

(CONFIGURABLE si CreateProductSupplier=True).

o CFG_PRODUCTO_PROVEEDOR

Page 50: ESPECIFICACIONES COMUNICACIÓN ENTRE MAPEXBP V10 Y …

50

TAREAS DE MAPEXAGENT

En este apartado se identificarán las tareas de MapexAgent utilizadas en el proyecto. Éstas

son las disponibles actualmente:

En la fase de implantación y validación se recomienda disponer de la constante

“debugMode” de configuración de las tareas a True para que registre los identificadores de

los elementos que cree/modifique que se pueden consultar desde la parte inferior de la

pantalla de gestión de importación de datos.

'MODE DEBUG=True records in SYS_LOG table

Const debugMode As Boolean = True

Aunque una vez sea estable la importación ésta constante se debe poner a False para que

únicamente registre los errores. Esto reducirá a la mitad el tiempo de proceso de los

registros.

Para obtener mayor información del funcionamiento interno de las tareas se puede activar

puntualmente el modo “debug” de la configuración del MapexAgent, que registrará las

SQLs lanzadas en el log del MapexAgent, lo que puede ayudar a identificar con más

celeridad un error no controlado. Atención, no se debe dejar este modo activado pues

aumenta el tiempo de proceso.

Page 51: ESPECIFICACIONES COMUNICACIÓN ENTRE MAPEXBP V10 Y …

51

REPORTE MAPEXBP –> ERP

Para que el ERP pueda integrar los datos de producción de MapexBP, MAPEXBP registrará

en su tabla “PRD_ERP_OUT”, en tiempo real o en un momento dado según el tipo de

operación, la información de los históricos del MapexBP que se detalle con el siguiente

formato.

GRUPO Descripción

Campo Campo Tipo de Campo Comentarios

PROTOCOL Id_prd_erp_out Id_prd_erp_out NUMBER LONG Autonumeric (PK)

PROTOCOL Tipo de mensaje Id_Operacion NUMBER Export type identifier

PROTOCOL Fecha generacion Fecha_generacion DATETIME Generation date

PROTOCOL Fecha proceso Fecha_proceso DATETIME Process date

PROTOCOL Ack Ack Int 1 0: Pdt; 1: OK; 2: ERROR; 100: WARNING

PROTOCOL Mensaje de Error ErrorMessage VARCHAR(MAX) Error message

PROTOCOL Estado envío

error

ErrorMail_Ack TINYINT 0: Pdt; 1: Sent

PROTOCOL Fecha envío error ErrorMail_Fecha DATETIME Email sending date

OPERATION Código P1 VARCHAR 50 The meaning depends on the type of

operation

OPERATION .. P.. VARCHAR 50 ..

OPERATION .. Pn VARCHAR 50 The first N parameters are reserved for the

program standard

OPERATION .. Pm VARCHAR 50 First custom field

Los campos de control “Fecha proceso”, “Ack”, “Mensaje de Error” son actualizados por el

mecanismo que procesa los registros de la tabla PRD_ERP_OUT para comunicarlos al ERP.

Page 52: ESPECIFICACIONES COMUNICACIÓN ENTRE MAPEXBP V10 Y …

52

En este apartado del documento se debe describir la manera en que se exporta la tabla

“PRD_ERP_OUT” al sistema del cliente para el proyecto específico, Fase 2.

Los métodos más comunes son:

• El cliente trata los registros directamente de la tabla “PRD_ERP_OUT” y los

introduzca en su sistema actualizando los campos de control (“Fecha proceso”, “Ack”,

“Mensaje de Error” & SYS_LOG)

• Mediante tabla “PRD_ERP_OUT” ubicada en la base de datos del cliente. Una tarea

estándar de MapexAgent copiará el registro a la base de datos del cliente para su

posterior tratamiento por parte de un proceso interno del cliente, que actualizará los

campos de control (“Fecha proceso”, “Ack”, “Mensaje de Error”). Se deberá disponer

de una pantalla “PRD_ERP_OUT ERP” que apunte a la conexión del cliente para

poder controlar este proceso.

ATENCIÓN: ESTA TAREA REQUIERE QUE EL CAMPO ID_PRD_ERP_OUT DEL

CLIENTE NO SEA AUTONUMÉRICO (IDENTITY) PUES VIENE DADO POR MAPEXBP.

El canal de comunicación será un servidor vinculado en el servidor de base de datos

del MapexBP o bien un sinónimo si el entorno del ERP fuese SQLServer.

• Mediante archivos de texto. El MapexBP, mediante una tarea estándar, creará un

archivo de texto con varios registros en una carpeta compartida del servidor donde

el proceso del cliente tenga acceso, llamada: \\SERVIDOR\MAPEX\ERP\OUT.

El archivo debe llamarse, por ejemplo, PRODyyyyMMddhhmiss.txt (para que cada

archivo tenga un nombre diferente cada vez).

El archivo deberá crearse con la periodicidad escogida (10 minutos después del

cambio de turno, por ejemplo).

• Si el cliente decide algún otro método diferente al estándar (llamada a bapis, xml,

webservice…) se implementará la tarea a medida.

Page 53: ESPECIFICACIONES COMUNICACIÓN ENTRE MAPEXBP V10 Y …

53

TIPOS DE OPERACIONES A IMPORTAR DEL MAPEX -> ERP

REPORTE DE PRODUCCIÓN PARCIAL POR OF DE ERP -> MAPEX

Tabla: PRD_ERP_OUT

Campo de gestión: his_prod.ERP

Periodicidad:

MODO 1: (Modo por Defecto) 10 minutos después del inicio de turno, para que los operarios

del turno anterior puedan justificarlos. [Es necesario su revisión para adaptarlo a los turnos

del proyecto].

MODO 2: Si el proyecto tiene horarios con diferentes inicios de turno, se propone poner una

frecuencia de 1 minutos y poner el delay de los 10 minutos en la condición del “where”, para

10 minutos después del turno de cada máquina.

Tipo de registros: parciales HIS_MAQUINA del turno anterior

La tarea dispone de un parámetro de configuración a nivel de SQL que permite configurar si

se desea exportar únicamente actividades imputadas a OF (por defecto) o no.

Si se desea agrupar VELOCIDAD REDUCIDA & PRODUCCION, se puede renombrar el P7,

pero NO se debe realizar un “group by” para que devuelva un número menor de registros

pues se perdería la gestión del HIS_MAQUINA.

Configuración (@PRDERPOUT300_SQL_IMPRODUCTIVO):

La tarea tiene un parámetro de configuración a nivel SQL que te permite configurar se desea

exportar solo las actividades imputadas a OF (por defecto) o no.

Page 54: ESPECIFICACIONES COMUNICACIÓN ENTRE MAPEXBP V10 Y …

54

IMPORTANTE: Los operarios de cada turno son responsables de justificar los paros de

su turno. El “Tiempo de paro PNP” puede cambiar si cambia la justificación del paro si un

paro PNP pasa a PP.

IMPORTANTE: Si se desea regularizar unidades en planta, cuando en la máquina se está

fabricando otra OF, se tiene que realizar mediante un Centro de Trabajo de

“RETRABAJO” mediante los botones OK/NoOK, para que quede constancia que se ha

realizado a posteriori.

Descripción

Campo Campo Tipo de Campo Comentarios

Id_prd_erp_out Id_prd_erp_out NUMBER

LONG Autonumeric (PK)

Tipo de mensaje Id_Operacion NUMBER Value = 300 Production previous shift

Fecha generacion Fecha_generacion DATETIME Generation date

Fecha proceso Fecha_proceso DATETIME Process date

Ack Ack Int 1 0: Pdt; 1: OK; 2: ERROR Throw Exception; 100: WARNING: add

ErrorMessage

Mensaje de Error ErrorMessage VARCHAR

(MAX) Error message

Estado envío error ErrorMail_Ack TINYINT 0: Pdt; 1: Sent

Fecha envío error ErrorMail_Fecha DATETIME Email sending date

Código OF P1 VARCHAR 50 HisWO.Code [his_of.Cod_of]

Código Producto

OF P2 VARCHAR 50

HisWO.Product.Code [his_of.Id_producto,

cfg_producto.Cod_producto, cfg_fase.Id_producto_final].

Código de fase de

semielaborado P3 VARCHAR 50

HisOperation.Operation.Code [his_fase.Id_fase, cfg_fase.Cod_fase]

UK CFG_FASE.ID_FASE (COD_FASE, ID_PRODUCTO)

Page 55: ESPECIFICACIONES COMUNICACIÓN ENTRE MAPEXBP V10 Y …

55

Código Operación P4 VARCHAR 50 HisOperation.Code [his_fase.Cod_his_fase].

Código centro

trabajo P5 VARCHAR 50 WorkCenter.Code [cfg_maquina.Cod_maquina, his_prod.Id_maquina]

Estado de la

operación P6 VARCHAR 50

HisOperation.WOStatus.Code [his_fase.Id_estadoof,

cfg_estadoof.Cod_estadoof]. Possible Values established by

application:

'NO PLANIFICADA', 'PLANIFICACION',’EN CURSO’, 'CERRADA',

‘ELIMINADA’

Código de Actividad P7 VARCHAR 50 Activity Code

Día Productivo P8

Productive day

[His_prod.Dia_productivo]

Fecha Hora inicio P9 VARCHAR 50 Production start date time

Fecha Hora fin P10 VARCHAR 50 Production end date time

Código de Turno P11 VARCHAR 50 Shift Code

Unidades OK P12 VARCHAR 50 Units OK

Unidades NOK P13 VARCHAR 50 Units Not OK

Tiempo de marcha P14 VARCHAR 50 Running time (Seconds)

Tiempo de paro

PNP P15 VARCHAR 50 Downtime (Seconds)

Tiempo de operario P16 VARCHAR 50 Operator time (Seconds)

Identificador del

reporte parcial P17 VARCHAR 50 MOV Identifier (HIS_MAQUINA)

Código de producto

semielaborado P18 VARCHAR 50

HisOperation.Operation.Product.Code.

[his_fase.Id_fase, cfg_fase.Id_producto, cfg_producto.Cod_producto]

RESERVED P19-P30 VARCHAR 50

Page 56: ESPECIFICACIONES COMUNICACIÓN ENTRE MAPEXBP V10 Y …

56

REPORTE INICIO/FIN DE OF-OPERACIÓN CON TRASPASO TOTALES MAPEX -> ERP

Tabla: PRD_ERP_OUT

Campo de gestión: (Inicio) his_fase.ERP_ini; (Fin) his_fase.ERP_fin

Periodicidad: (cada minuto) al poner una OF en máquina por primera vez, o bien al cerrarse

la OF-Operación cuando todos los registros de producción se hayan exportado (al inicio de

turno).

Tipo de registros: único por OF-Operación para Inicio (Estado='EN CURSO’) y Fin

(Estado='CERRADA').

Configuración (@PRDERPOUT300_SQL_ERP):

La tarea tiene un parámetro de configuración a nivel SQL que te permite configurar que no

se envíe la finalización OF-Operación hasta que no se hayan exportado por completo los

registros de producción parciales correspondientes mediante Op300. Por tanto, si en un

proyecto no se utiliza la Op300, se debe poner este parámetro a cero para que se exporte

el cierre en el momento de producirse éste.

Descripción Campo Campo Tipo de

Campo Comentarios

Id_prd_erp_out Id_prd_erp_out NUMBER

LONG Autonumeric (PK)

Tipo de mensaje Id_Operacion NUMBER Value = 310 Start/End of WO-phase production

Fecha generacion Fecha_generacion DATETIME Generation date

Fecha proceso Fecha_proceso DATETIME Process date

Ack Ack Int 1

0: Pdt; 1: OK; 2: ERROR Throw Exception;

100: WARNING: add ErrorMessage

Mensaje de Error ErrorMessage VARCHAR

(MAX) Error message

Estado envío error ErrorMail_Ack TINYINT 0: Pdt; 1: Sent

Fecha envío error ErrorMail_Fecha DATETIME Email sending date

Page 57: ESPECIFICACIONES COMUNICACIÓN ENTRE MAPEXBP V10 Y …

57

Código OF P1 VARCHAR 50 HisWO.Code [his_of.Cod_of]

Código Producto OF P2 VARCHAR 50 HisWO.Product.Code [his_of.Id_producto,

cfg_producto.Cod_producto, cfg_fase.Id_producto_final].

Código de fase de

semielaborado P3 VARCHAR 50

HisOperation.Operation.Code [his_fase.Id_fase,

cfg_fase.Cod_fase]

UK CFG_FASE.ID_FASE (COD_FASE, ID_PRODUCTO)

Código Operación P4 VARCHAR 50 HisOperation.Code [his_fase.Cod_his_fase].

Código centro trabajo P5 VARCHAR 50 WorkCenter.Code [cfg_maquina.Cod_maquina,

his_prod.Id_maquina]

Estado de la operación P6 VARCHAR 50

HisOperation.WOStatus.Code [his_fase.Id_estadoof,

cfg_estadoof.Cod_estadoof]. Possible Values established by

application: 'EN CURSO’, 'CERRADA'

RESERVED P7 VARCHAR 1

Día Productivo P8

Productive day

[His_prod.Dia_productivo]

Fecha Hora inicio P9 VARCHAR 50 Production start date time

Fecha Hora fin P10 VARCHAR 50 Production end date time

Marca de Última

Operación P11 VARCHAR 50 HisOperation.Operation.LastOperation [cfg_fase.Ultima_fase]

Unidades OK P12 VARCHAR 50 Units OK

Unidades NOK P13 VARCHAR 50 Units Not OK

Tiempo de marcha P14 VARCHAR 50 Running time (Seconds)

Tiempo de paro PNP P15 VARCHAR 50 Downtime (Seconds)

Tiempo de operario P16 VARCHAR 50 Operator time (Seconds)

Id_his_fase P17 VARCHAR 50 HisOperation.Id

Código de producto

semielaborado P18 VARCHAR 50

HisOperation.Operation.Product.Code.

[his_fase.Id_fase, cfg_fase.Id_producto,

cfg_producto.Cod_producto]

Page 58: ESPECIFICACIONES COMUNICACIÓN ENTRE MAPEXBP V10 Y …

58

RESERVED P19-P30 VARCHAR 50

Page 59: ESPECIFICACIONES COMUNICACIÓN ENTRE MAPEXBP V10 Y …

59

TRAZABILIDAD ENTRANTE/SALIENTE PER SSCC/LOTE DEL PROCESO ON-LINE

MAPEX -> ERP

Tabla: PRD_ERP_OUT

Campo de gestión: his_trazabilidad.ERP

Periodicidad: (cada minuto) para cada registro de la tabla his_trazabilidad no activo en

máquina (estado=0).

Tipo de registros: consumos/producciones parciales - cada registro de his_trazabilidad

(Activo=1 & Estado=0). Mientras se dispone de la OF en máquina se pueden realizar

devoluciones que vendrán informadas con cantidad negativa.

IMPORTANTE: Si se desea crear un nuevo SSCC de dos picos de diferente lote, se tiene que

realizar mediante un Centro de Trabajo de “RETRABAJO” donde con una OF especial se

consuman los picos y se fabrique el nuevo SSCC. No puede ser la misma OF para que el

TRACETREE no entre en bucle.

Descripción

Campo Campo Tipo de Campo Comentarios

Id_prd_erp_out Id_prd_erp_out NUMBER LONG Autonumeric (PK)

Tipo de mensaje Id_Operacion NUMBER Value = 401 Inbound/outbound traceability of the process in real time

Fecha generacion Fecha_generacion DATETIME Generation date

Fecha proceso Fecha_proceso DATETIME Process date

Ack Ack Int 1 0: Pdt; 1: OK; 2: ERROR Throw Exception; 100: WARNING: add

ErrorMessage

Mensaje de Error ErrorMessage VARCHAR(MAX) Error message

Estado envío error ErrorMail_Ack TINYINT 0: Pdt; 1: Sent

Fecha envío error ErrorMail_Fecha DATETIME Email sending date

Código OF P1 VARCHAR 50 HisWO.Code [his_of.Cod_of]

Page 60: ESPECIFICACIONES COMUNICACIÓN ENTRE MAPEXBP V10 Y …

60

Código Producto

OF P2 VARCHAR 50

HisWO.Product.Code [his_of.Id_producto, cfg_producto.Cod_producto,

cfg_fase.Id_producto_final].

Código de fase de

semielaborado P3 VARCHAR 50

HisOperation.Operation.Code [his_fase.Id_fase, cfg_fase.Cod_fase]

UK CFG_FASE.ID_FASE (COD_FASE, ID_PRODUCTO)

Código Operación P4 VARCHAR 50 HisOperation.Code [his_fase.Cod_his_fase].

Código centro

trabajo P5 VARCHAR 50

WorkCenter.Code [cfg_maquina.Cod_maquina,

his_trazabilidad.Id_maquina]

Código

Componente P6 VARCHAR 50

Product.Code (Inbound/Outbound/Subproduct)

[his_trazabilidad.Id_producto, cfg_producto.Cod_producto].

Tipo movimiento P7 VARCHAR 50 MovementType: 0 Inbound; 1 Outbound; 2 Subproduct

Día Productivo P8 VARCHAR 50

Productive day

[His_prod.Dia_productivo]

Fecha Hora inicio P9 VARCHAR 50 Traceability start date time

Fecha Hora fin P10 VARCHAR 50 Traceability end date time

Lote P11 VARCHAR 50 Batch

Unidades P12 VARCHAR 50 Units

Unidades 2 P13 VARCHAR 50 Cantidad(Ex.KG)

Unidad de

Almacenaje P14 VARCHAR 50 Storage Unit [His_trazabilidad.StorageUnit]

SSCC (Id Palet) P15 VARCHAR 50 [His_trazabilidad.SSCC]

RESERVED P16 VARCHAR 50

Identificador del

reporte parcial P17 VARCHAR 50 MOV Identifier (ID_HIS_TRAZABILIDAD)

Código de

producto

semielaborado

P18 VARCHAR 50

HisOperation.Operation.Product.Code.

[his_fase.Id_fase, cfg_fase.Id_producto, cfg_producto.Cod_producto]

RESERVED P19-P30 VARCHAR 50

Page 61: ESPECIFICACIONES COMUNICACIÓN ENTRE MAPEXBP V10 Y …

61

REPORTE DE PRESENCIA DE OPERARIO

Operator time stamp (Operator presence report)

Tabla: PRD_ERP_OUT

Campo de gestión: his_prod_operario.ERP

Periodicidad: al inicio de turno se envía la información del turno anterior.

Tipo de registros: registro resumen (HIS_OPERARIO) por dia_productivo, turno, operario,

actividad de operario, maquina, mín(fecha_ini), máx(fecha_fin), tiempo de operario (en

segundos).

Descripción

Campo Campo Tipo de Campo Comentarios

Id_prd_erp_out Id_prd_erp_out NUMBER LONG Autonumeric (PK)

Tipo de mensaje Id_Operacion NUMBER Value = 201 Worker time

Fecha generacion Fecha_generacion DATETIME Generation date

Fecha proceso Fecha_proceso DATETIME Process date

Ack Ack Int 1 0: Pdt; 1: OK; 2: ERROR Throw Exception; 100: WARNING: add

ErrorMessage

Mensaje de Error ErrorMessage VARCHAR(MAX) Error message

Estado envío error ErrorMail_Ack TINYINT 0: Pdt; 1: Sent

Fecha envío error ErrorMail_Fecha DATETIME Email sending date

Código de

Operario P1 VARCHAR 50

Worker Code

[cfg_operario.Cod_operario, his_prod_operario.Id_operario]

Código de

Actividad de

Operario

P2 VARCHAR 50 Worker Activity Code [cfg_actividadoperario. Cod_actividadoperario,

his_prod_operario.Id_actividadoperario]

Tiempo de

operario P3 VARCHAR 50 Operator time (Seconds)

Page 62: ESPECIFICACIONES COMUNICACIÓN ENTRE MAPEXBP V10 Y …

62

Identificador del

reporte parcial P4 VARCHAR 50 MOV Identifier (HIS_OPERARIO)

Código centro

trabajo P5 VARCHAR 50

WorkCenter.Code [cfg_maquina.Cod_maquina,

his_trazabilidad.Id_maquina]

RESERVED P6 VARCHAR 50

RESERVED P7 VARCHAR 50

Día Productivo P8 VARCHAR 50

Productive day

[His_prod.Dia_productivo]

Fecha Hora inicio P9 VARCHAR 50 Production start date time

Fecha Hora fin P10 VARCHAR 50 Production end date time

Código de Turno P11 VARCHAR 50 Shift Code

RESERVED P12-P30 VARCHAR 50

Page 63: ESPECIFICACIONES COMUNICACIÓN ENTRE MAPEXBP V10 Y …

63

EXPORT OP300 TO FILE: PRODUCTION EXPORT FROM THE PREVIOUS SHIFT

La tarea PRDERPOUT003 exporta la información generada en la operación 300 a un archivo

de producción, y marca los registros como exportados (PRD_ERP_OUT=1).

La frecuencia se debe adaptar a la de la tarea 300.

Se puede configurar el path y el nombre del archivo generado en el tag TargetFile de la

tarea:

Page 64: ESPECIFICACIONES COMUNICACIÓN ENTRE MAPEXBP V10 Y …

64

TAREAS DE MAPEXAGENT

En este apartado se identificarán las tareas de MapexAgent utilizadas en el proyecto. Éstas

son las disponibles actualmente:

Page 65: ESPECIFICACIONES COMUNICACIÓN ENTRE MAPEXBP V10 Y …

65

HISTÓRICO DE ERRORES

MapexBP gestiona un histórico de errores en la comunicación entre los 2 sistemas, de

manera que se pueda verificar (de manera visual desde nuestro programa de oficina) que la

integración entre los sistemas está siendo correcta.

CONTROL IMPORTACIÓN

Se dispone de una pantalla con una vista para cada tipo de importación. En la parte inferior

se detalla el histórico del tratamiento del registro.

Menú: > Sistema > Supervisión > Comunicación > PRD_ERP_IN

La importación se da cómo validada cuando todos los registros dan ACK=1. Si alguno da

ACK=100 se debe corregir el problema.

Es posible reprocesar el registro poniendo ACK=0 una vez se haya corregido el problema.

Page 66: ESPECIFICACIONES COMUNICACIÓN ENTRE MAPEXBP V10 Y …

66

MANTENIMIENTO DE PRODUCTOS

Page 67: ESPECIFICACIONES COMUNICACIÓN ENTRE MAPEXBP V10 Y …

67

MANTENIMIENTO DEL MAESTRO DE OPERARIOS

REPORTE PLANIFICACIÓN OFS

Page 68: ESPECIFICACIONES COMUNICACIÓN ENTRE MAPEXBP V10 Y …

68

MANTENIMIENTO DEL MAESTRO DE ESCANDALLO

REPORTE PRODUCTIVIDAD POR MODO FUNCIONAMIENTO

MANTENIMIENTO DE LA DOCUMENTACIÓN

Page 69: ESPECIFICACIONES COMUNICACIÓN ENTRE MAPEXBP V10 Y …

69

CONTROL EXPORTACIÓN

Se dispone de una pantalla con una vista para cada tipo de exportación. En la parte inferior

se detalla el histórico del tratamiento del registro.

Menú: > Sistema > Supervisión > Comunicación > PRD_ERP_OUT

Los campos “Fecha proceso”, “Ack” [=1,2,100], “Mensaje de Error” son actualizados por el

mecanismo que procesa los registros de la tabla PRD_ERP_OUT para comunicarlos al ERP.

La exportación se da cómo validada cuando todos los registros dan ACK=1. Si alguno da

ACK=100 se debe corregir el problema.

Es posible reprocesar el registro poniendo ACK=0 una vez se haya corregido el problema.

Se dispone de unos filtros fijos, entre ellos el periodo de fechas que filtra por la fecha de

generación.

El filtro por “Código de OF” es el único que no se ve afectado por el filtro del periodo, para

que muestre los registros de la OF en todas las fechas. Los filtros por “Código de OF” ,

“Código de producto”, y “Código de Operario” unicamente aplicaran a las tipos de

operaciones en los que se disponga de esta entidad.

Page 70: ESPECIFICACIONES COMUNICACIÓN ENTRE MAPEXBP V10 Y …

70

Page 71: ESPECIFICACIONES COMUNICACIÓN ENTRE MAPEXBP V10 Y …

71

REPORTE DE PRODUCCIÓN PARCIAL

REPORTE INICIO/FIN DE OF-OPERACIÓN CON TRASPASO TOTALES

TRAZABILIDAD ENTRANTE/SALIENTE PER SSCC/LOTE DEL PROCESO ON-LINE

Page 72: ESPECIFICACIONES COMUNICACIÓN ENTRE MAPEXBP V10 Y …

72

REPORTE DE PRESENCIA DE OPERARIO

EXPORT OP300 TO FILE: PRODUCTION EXPORT FROM THE PREVIOUS SHIFT

En la pantalla de gestión se marcará el registro procesado incluido en el archivo con ACK=1

y el dia/hora del proceso.

Page 73: ESPECIFICACIONES COMUNICACIÓN ENTRE MAPEXBP V10 Y …

73

TEMAS PENDIENTES