Multiplicação de eventos do sistema em tabelas

Ao extrair de um sistema SAP, tem a opção de criar eventos adicionais do sistema com base em uma tabela de eventos do sistema.

No nível do sistema de origem, pode existir um relacionamento 1: n que não pode ser resolvido ao determinar os eventos do sistema. Use a classe com.idsscheer.ppm.xmlextractortools.extractor.sap2ppm.ZTableMultiplyEvents_sap2ppm para criar vários eventos de sistema a partir de um evento do sistema e resolver assim a relação 1:n.

Exemplo

<configuration name="MultiplyEvents">

<docspec>

<doctable name="VBAK" tablename="VBAK">

<condition fieldname="VBELN" logicaloperator="in">

<value>0000006662</value>

<value>0000006741</value>

</condition>

<pkfield name="VBELN" />

</doctable>

</docspec>

<table name="VBAP" classtouse="com.idsscheer.ppm.xmlextractortools.extractor.sap2ppm.ZTableMultiplyEvents_sap2ppm">

<pkfield name="VBELN" fktablename="VBAK" fkfieldname="VBELN"/>

<fieldtoread name="POSNR"/>

<fieldtoread name="MATNR"/>

</table>

<table name="MAKT">

<condition fieldname="SPRAS" logicaloperator="eq">

<value>de</value>

</condition>

<pkfield name="MATNR" fktablename="VBAP" fkfieldname="MATNR"/>

<fieldtoread name="MAKTX"/>

</table>

</configuration>

Este é o arquivo de saída de evento do sistema:

<?xml version="1.0" encoding="UTF-8"?>

<!DOCTYPE eventlist SYSTEM "event.dtd">

<eventlist>

<event>

<attribute type="VBAK-VBELN">0000006662</attribute>

</event>

<event>

<attribute type="MAKT-MAKTX">Flatscreen MS 1460 P</attribute>

<attribute type="VBAK-VBELN">0000006741</attribute>

<attribute type="VBAP-MATNR">M-06</attribute>

<attribute type="VBAP-POSNR">000010</attribute>

</event>

<event>

<attribute type="MAKT-MAKTX">Flatscreen MS 1775P</attribute>

<attribute type="VBAK-VBELN">0000006741</attribute>

<attribute type="VBAP-MATNR">M-10</attribute>

<attribute type="VBAP-POSNR">000020</attribute>

</event>

<event>

<attribute type="MAKT-MAKTX">MAG PA/DX 175</attribute>

<attribute type="VBAK-VBELN">0000006741</attribute>

<attribute type="VBAP-MATNR">M-14</attribute>

<attribute type="VBAP-POSNR">000030</attribute>

</event>

<event>

<attribute type="MAKT-MAKTX">Jotachi SN4500</attribute>

<attribute type="VBAK-VBELN">0000006741</attribute>

<attribute type="VBAP-MATNR">M-18</attribute>

<attribute type="VBAP-POSNR">000040</attribute>

</event>

</eventlist>

O exemplo seguinte (excluindo a classe descrita) explica o procedimento durante a extração:

<configuration name="MultiplyEvents_Doctable_Only">

<docspec>

<doctable name="VBAK" tablename="VBAK">

<condition fieldname="VBELN" logicaloperator="in">

<value>0000006662</value>

<value>0000006741</value>

</condition>

<pkfield name="VBELN" />

</doctable>

</docspec>

<table name="VBAP" >

<pkfield name="VBELN" fktablename="VBAK" fkfieldname="VBELN"/>

<fieldtoread name="POSNR"/>

<fieldtoread name="MATNR"/>

</table>

<table name="MAKT">

<condition fieldname="SPRAS" logicaloperator="eq">

<value>de</value>

</condition>

<pkfield name="MATNR" fktablename="VBAP" fkfieldname="MATNR"/>

<fieldtoread name="MAKTX"/>

</table>

</configuration>

Uma vez que várias entradas na tabela VBAP são associadas a uma entrada na tabela VBAK, apenas uma linha aleatória é extraída da tabela VBAP.

Este é o arquivo de saída de evento do sistema:

<?xml version="1.0" encoding="UTF-8"?>

<!DOCTYPE eventlist SYSTEM "event.dtd">

<eventlist>

<event>

<attribute type="VBAK-VBELN">0000006662</attribute>

</event>

<event>

<attribute type="MAKT-MAKTX">Flatscreen MS 1775P</attribute>

<attribute type="VBAK-VBELN">0000006741</attribute>

<attribute type="VBAP-MATNR">M-10</attribute>

<attribute type="VBAP-POSNR">000020</attribute>

</event>

</eventlist>