cancel
Showing results for 
Search instead for 
Did you mean: 

MES Interface Development (Standard IDOC-MATMAS enriched with Z-Fields)

Former Member
0 Kudos

Hello Everyone,

We have an issue that we want to sent IDOC data to our local MES System. The XML Target Structure of the MES System is given and cannot be changed.

Most of the fields to be sent are in the MATMAS IDOC but some fields need to be enriched with material classification data which are maintained for each material individually in the ERP. To retrieve the data out of ERP we using the u201CBAPI_OBJCL_GETDETAILu201D. Here we perform an iteration about all these fields to read the classification description and the associated characteristic value. Sometimes it can happen that not for each material the value are maintained and then we are getting blank values

Now I coming back to my main questions.

The target structure of the MES XML File is given and need basically just two core segments from MATMAS IDOC.

E1MARAM SEGMENT="1" -> Key fields needed: Material Number, MEINH, EAN Number etc.

E1MAKTM SEGMENT="1" -> Key fields needed:: Material Description

The n- Classifcation field need to be listed directly under the segment E1MARM Segment. So the target structure need to be dynamically built with these n Z Field under den Segment with the following structure.

_______________________________________________________________________________________________________

E1MARAM SEGMENT="1" Material Number, MEINH, EAN Number etc.

1

u2026<ZL161AUSPM SEGMENT="1">

<ATNAM>MGBEZ_</ATNAM>

<ATWRT>Galenical Bulk Prod.</ATWRT>

..</ZL161AUSPM>

n

E1MAKTM SEGMENT="1"  Material Description

_______________________________________________________________________________________________________

As stated out above the information from the classification data are filled in an internal table (XML document with several Row)

Questions:

How do I get the information from the internal XML Document into such ZL161AUSPM structure. Shall I rename the rows in the XML Document from Row to <ATMAN>? And how is this possible? I assume that I cannot change the row name in an "MII XML Document"

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

<Rowsets DateCreated="2009-09-04T14:24:58" EndDate="2009-08-31T14:43:13" StartDate="2009-08-31T14:43:13" Version="12.0.6 Build(12)"><Rowset><Columns><Column Description="CHARACT" MaxRange="1" MinRange="0" Name="CHARACT" SQLDataType="1" SourceColumn="CHARACT"/><Column Description="CHARACT_DESCR" MaxRange="1" MinRange="0" Name="CHARACT_DESCR" SQLDataType="1" SourceColumn="CHARACT_DESCR"/><Column Description="VALUE_NEUTRAL" MaxRange="1" MinRange="0" Name="VALUE_NEUTRAL" SQLDataType="1" SourceColumn="VALUE_NEUTRAL"/></Columns><Row><CHARACT>CH0_MES_01</CHARACT><CHARACT_DESCR>CH0_MES_01</CHARACT_DESCR><VALUE_NEUTRAL>AT</VALUE_NEUTRAL></Row><Row><CHARACT>CH0_MES_16</CHARACT><CHARACT_DESCR>CH0_MES_16</CHARACT_DESCR><VALUE_NEUTRAL>AAI-WC</VALUE_NEUTRAL></Row><Row><CHARACT>CH0_MES_01</CHARACT><CHARACT_DESCR>CH0_MES_01</CHARACT_DESCR><VALUE_NEUTRAL>AT</VALUE_NEUTRAL></Row><Row><CHARACT>CH0_MES_05</CHARACT><CHARACT_DESCR>CH0_MES_05</CHARACT_DESCR><VALUE_NEUTRAL>10000.0</VALUE_NEUTRAL></Row></Rowset></Rowsets

How do I get the dynamically the structure under the E1MARAM SEGMENT="1"? with n u2013 integration? This mean if the material has been assigned three characteristic then I need three time the structure under the segment u201CE1MARAMu201D

Is someone experienced with interface development of such Z-Message respectively has someone an idea or guideline to dealt with such issues?

Thanks in advance,

Markus

_

PGST

PT Business Solution Management- Manufacturing

F. Hoffmann-La Roche Ltd. Switzerland, Basel

Edited by: Markus Schmeckenbecher on Sep 4, 2009 2:33 PM

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Markus,

it is a bit difficult to get the structure from your post, but when I get it right you need to add new nodes in a predefined xml structure.

Did you have a look at the Link editor action "Data Item" from the SAP xMII XML Output? You can define a name and value and add it to a given xml structure. A problem might be the target xml if it is not an IlluminatorDocument (which is of kind /Rowsets / Rowset / Row).

If this does not work, you may try to build Local xml structures for all your Z fields, and append those xmls to your target, using the Link Editor Append XML function.

Michael