cancel
Showing results for 
Search instead for 
Did you mean: 

How can i map a file with different structures to several deep structures?

Former Member
0 Kudos

Hey experts,

here is my situation. I have to build a file2file scenario. The file has a flat structure without any separators. Depending on the value of the keyfield, i have to determinate, which kind of structure in the current sequence there is. Like i wrote, there isn't any fieldseparator, but for every possible structure (overall 4 types) i know the type by the length of every field in the structure.

My task is:

1. Read the file into PI and transform to XML

2. Map the flat structure depending on the keyvalue to the deep structure

3. Transform several fields in the different structures like the requirement

4. Write back the file via FTP as the same flat structure as before

Do you have any approach to solve the item number 2 (the other steps are clear for me)?

Do i need several mapping-programs? If so, how can i determinate the right mapping-program, deping on the keyvalue?

Thanks in advance

Tobi

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

hi Tobias,

your flat file is called as fixed length file, there will be no field separaters, except the length that is predefined.

if your inbound file is of four types then do you want the outbound to be same file or different files.

can you elobrate your requirement by giving example files (input and output you want)?

Former Member
0 Kudos

Hey Chirumamilla,

here an example of the file content:


000105608F181600812800020080905000549PGRR3010  T20080905 ...
100105608F18160081280002008090420080904                  ...
400105608F1816008128001SS30611102  17AB          00000000...
400105608F1816008128002SS30611102  17AA          00000000...
400105608F1816008128003SH98900025  17AB          00000000...
400105608F1816008128004SS99500116  1705          00000000...
400105608F1816008128005SH99500116  17AB          00000000...
400105608F1816008128006SS99500116  17AB          00000000...
400105608F1816008128007SH99500116  17AA          00000000...
400105608F1816008128008SS99500116  17AA          00000000...
400105608F1816008128009SS20519109  17AB          00000000...
400105608F1816008128010SS20519109  17AA          00000000...
900105608F181600812801020080905000549PGRR3010  0000000003...

Every line has a length of 250 characters and ends with an 'E' as an endSeperator. The first character is the keyvalue (0, 1, 4 or 9). Then there are several fields like MANDT, BUKRS, BLART etc. which are the same in each line. After these fields the linetypes getting different to each other, depending on the discribing keyvalue.

So, my requirement is, to read the file into the XI/PI and transform some fields i.e. KOSTL (costcenter) to another value. But before im getting able to transform, i have to sparate the different structures to the suitable structuretype.

When the tranformation is done, i have to write the file down to the same directory i got it from, without changing the structure or format.

I hope its more obvious what i need!?

Regards

Tobi

Former Member
0 Kudos

if i understood your problem correctly

when you want to place file with same structure in same directory with changing some values in fileds, why you want to separate the different structures to the sutable structuretype?

because each line that you pick from the flat file would be a record set, you can differentiate each and every record set by key value.

so if you want to transform the values for particular filed in the record, you can simple use same inbound and outbound structures and write your logic in the mapping of particular fileds which needs transformation.

Former Member
0 Kudos

Hey!

You are right my thougths were to complicated. I just need a multi-mapping with the same four structures on outbound and inbound side.

So i builded a little scenario like that, but there is a problem with the output file. The cotent conversion on the sender cc is fine and parses the different flat structures in XML. But after the multi-mapping as i can see in the tracelog, the xml payload is sorted by the keyvalue 0,1,4,9. Also the outputfile is sort by the keyvalue (first charachter).

Example unsorted (before mapping)


000105608F181600812800020080905000549PGRR3010  T20080905 ...
100105608F18160081280002008090420080904                  ...
400105608F1816008128008SS99500116  17AA          00000000...
400105608F1816008128009SS20519109  17AB          00000000...
400105608F1816008128010SS20519109  17AA          00000000...
900105608F181600812801020080905000549PGRR3010  0000000003...
000105608F181600812800020080905000549PGRR3010  T20080905 ...
100105608F18160081280002008090420080904                  ...
400105608F1816008128008SS99500116  17AA          00000000...
400105608F1816008128009SS20519109  17AB          00000000...
400105608F1816008128010SS20519109  17AA          00000000...
900105608F181600812801020080905000549PGRR3010  0000000003...

Example sorted (after mapping)


000105608F181600812800020080905000549PGRR3010  T20080905 ...
000105608F181600812800020080905000549PGRR3010  T20080905 ...
100105608F18160081280002008090420080904                  ...
100105608F18160081280002008090420080904                  ...
400105608F1816008128008SS99500116  17AA          00000000...
400105608F1816008128009SS20519109  17AB          00000000...
400105608F1816008128010SS20519109  17AA          00000000...
400105608F1816008128008SS99500116  17AA          00000000...
400105608F1816008128009SS20519109  17AB          00000000...
400105608F1816008128010SS20519109  17AA          00000000...
900105608F181600812801020080905000549PGRR3010  0000000003...
900105608F181600812801020080905000549PGRR3010  0000000003...

I dont need a sort and its would be a problem in the further processing.

Do you have any idea?

Thanks!

Former Member
0 Kudos

This is because of your trasformation logic....can you give me the transformation logic that is used?

Former Member
0 Kudos

In the first step for testing, i haven't specific tranformation logic. I make a simple 1:1 field mapping to read and write the file.

Former Member
0 Kudos

can you check the inbound payload in MONI? it might be picking values from the flat file on key value ..

Former Member
0 Kudos

the sequence of the inbound payload is fine. Its changes in MONI at the point "mapping the request.message". Then its sorted ascending.

Like i wrote, i didn't do nothing then a 1:1 mapping in the message-mapping.

Former Member
0 Kudos

can you paste inbound and outbound payloads?

Former Member
0 Kudos

Here the inbound payload:

<?xml version="1.0" encoding="utf-8" ?> 
- <ns:MT_MULTI_TYPES xmlns:ns="namespace">
- <VORSATZ>
  <ZSATA>0</ZSATA> 
  <MANDT>001</MANDT> 
  <BUKRS>0560</BUKRS> 
  <BLART>8F</BLART> 
  <BELNR>1816008128</BELNR> 
  <BUZEI>000</BUZEI> 
  <ERDAT>20080905</ERDAT> 
  <UZEIT>000549</UZEIT> 
  <ZPROG>PGRR3010</ZPROG> 
  <ZLIEF>T</ZLIEF> 
  <START>20080905</START> 
  <ZFILL /> 
  <ZENDE>E</ZENDE> 
  </VORSATZ>
- <KOPFSATZ>
  <ZSATA>1</ZSATA> 
  <MANDT>001</MANDT> 
  <BUKRS>0560</BUKRS> 
  <BLART>8F</BLART> 
  <BELNR>1816008128</BELNR> 
  <BUZEI>000</BUZEI> 
  <BUDAT>20080904</BUDAT> 
  <BLDAT>20080904</BLDAT> 
  <XBLNR /> 
  <WAERS /> 
  <HWAE2>EUR</HWAE2> 
  <HWAE3 /> 
  <KURS2>000000000</KURS2> 
  <KURS3>000000000</KURS3> 
  <BKTXT /> 
  <ZFILK /> 
  <ZENDE>E</ZENDE> 
  </KOPFSATZ>
- <POSITIONSSATZ>
  <ZSATA>4</ZSATA> 
  <MANDT>001</MANDT> 
  <BUKRS>0560</BUKRS> 
  <BLART>8F</BLART> 
  <BELNR>1816008128</BELNR> 
  <BUZEI>001</BUZEI> 
  <KOART>S</KOART> 
  <SHKZG>S</SHKZG> 
  <NEWKO>30611102</NEWKO> 
  <GSBER>17AB</GSBER> 
  <ZUBUK /> 
  <VBUND /> 
  <WRBTR>0000000000000</WRBTR> 
  <ZBTR1>0000000057576</ZBTR1> 
  <ZBTR2>0000000000000</ZBTR2> 
  <ZSTEU /> 
  <VALUT>20080904</VALUT> 
  <KOSTL /> 
  <AUFNR /> 
  <ZUONR>X4025V64RE460XXXXX</ZUONR> 
  <SGTXT>REX</SGTXT> 
  <BEWAR /> 
  <ZFPOS /> 
  <ZENDE>E</ZENDE> 
  </POSITIONSSATZ>
- <POSITIONSSATZ>
  <ZSATA>4</ZSATA> 
  <MANDT>001</MANDT> 
  <BUKRS>0560</BUKRS> 
  <BLART>8F</BLART> 
  <BELNR>1816008128</BELNR> 
  <BUZEI>009</BUZEI> 
  <KOART>S</KOART> 
  <SHKZG>S</SHKZG> 
  <NEWKO>20519109</NEWKO> 
  <GSBER>17AB</GSBER> 
  <ZUBUK /> 
  <VBUND /> 
  <WRBTR>0000000000000</WRBTR> 
  <ZBTR1>0000000021070</ZBTR1> 
  <ZBTR2>0000000000000</ZBTR2> 
  <ZSTEU /> 
  <VALUT>20080904</VALUT> 
  <KOSTL /> 
  <AUFNR /> 
  <ZUONR>X4025V64RE460XXXXX</ZUONR> 
  <SGTXT>REX</SGTXT> 
  <BEWAR /> 
  <ZFPOS /> 
  <ZENDE>E</ZENDE> 
  </POSITIONSSATZ>
- <POSITIONSSATZ>
  <ZSATA>4</ZSATA> 
  <MANDT>001</MANDT> 
  <BUKRS>0560</BUKRS> 
  <BLART>8F</BLART> 
  <BELNR>1816008128</BELNR> 
  <BUZEI>010</BUZEI> 
  <KOART>S</KOART> 
  <SHKZG>S</SHKZG> 
  <NEWKO>20519109</NEWKO> 
  <GSBER>17AA</GSBER> 
  <ZUBUK /> 
  <VBUND /> 
  <WRBTR>0000000000000</WRBTR> 
  <ZBTR1>0000000009796</ZBTR1> 
  <ZBTR2>0000000000000</ZBTR2> 
  <ZSTEU /> 
  <VALUT>20080904</VALUT> 
  <KOSTL /> 
  <AUFNR /> 
  <ZUONR>X4027V63RE460XXXXX</ZUONR> 
  <SGTXT>REX</SGTXT> 
  <BEWAR /> 
  <ZFPOS /> 
  <ZENDE>E</ZENDE> 
  </POSITIONSSATZ>
- <NACHSATZ>
  <ZSATA>9</ZSATA> 
  <MANDT>001</MANDT> 
  <BUKRS>0560</BUKRS> 
  <BLART>8F</BLART> 
  <BELNR>1816008128</BELNR> 
  <BUZEI>010</BUZEI> 
  <ERDAT>20080905</ERDAT> 
  <UZEIT>000549</UZEIT> 
  <ZPROG>PGRR3010</ZPROG> 
  <ZZSOL>000000000359502</ZZSOL> 
  <ZZHAB>000000000359502</ZZHAB> 
  <ZZBEL>0000001</ZZBEL> 
  <ZZPOS>000000010</ZZPOS> 
  <ZFILN /> 
  <ZENDE>E</ZENDE> 
  </NACHSATZ>
- <VORSATZ>
  <ZSATA>0</ZSATA> 
  <MANDT>001</MANDT> 
  <BUKRS>0560</BUKRS> 
  <BLART>8F</BLART> 
  <BELNR>1816008128</BELNR> 
  <BUZEI>000</BUZEI> 
  <ERDAT>20080905</ERDAT> 
  <UZEIT>000549</UZEIT> 
  <ZPROG>PGRR3010</ZPROG> 
  <ZLIEF>T</ZLIEF> 
  <START>20080905</START> 
  <ZFILL /> 
  <ZENDE>E</ZENDE> 
  </VORSATZ>
- <KOPFSATZ>
  <ZSATA>1</ZSATA> 
  <MANDT>001</MANDT> 
  <BUKRS>0560</BUKRS> 
  <BLART>8F</BLART> 
  <BELNR>1816008128</BELNR> 
  <BUZEI>000</BUZEI> 
  <BUDAT>20080904</BUDAT> 
  <BLDAT>20080904</BLDAT> 
  <XBLNR /> 
  <WAERS /> 
  <HWAE2>EUR</HWAE2> 
  <HWAE3 /> 
  <KURS2>000000000</KURS2> 
  <KURS3>000000000</KURS3> 
  <BKTXT /> 
  <ZFILK /> 
  <ZENDE>E</ZENDE> 
  </KOPFSATZ>
- <POSITIONSSATZ>
  <ZSATA>4</ZSATA> 
  <MANDT>001</MANDT> 
  <BUKRS>0560</BUKRS> 
  <BLART>8F</BLART> 
  <BELNR>1816008128</BELNR> 
  <BUZEI>001</BUZEI> 
  <KOART>S</KOART> 
  <SHKZG>S</SHKZG> 
  <NEWKO>30611102</NEWKO> 
  <GSBER>17AB</GSBER> 
  <ZUBUK /> 
  <VBUND /> 
  <WRBTR>0000000000000</WRBTR> 
  <ZBTR1>0000000057576</ZBTR1> 
  <ZBTR2>0000000000000</ZBTR2> 
  <ZSTEU /> 
  <VALUT>20080904</VALUT> 
  <KOSTL /> 
  <AUFNR /> 
  <ZUONR>X4025V64RE460XXXXX</ZUONR> 
  <SGTXT>REX</SGTXT> 
  <BEWAR /> 
  <ZFPOS /> 
  <ZENDE>E</ZENDE> 
  </POSITIONSSATZ>
- <POSITIONSSATZ>
  <ZSATA>4</ZSATA> 
  <MANDT>001</MANDT> 
  <BUKRS>0560</BUKRS> 
  <BLART>8F</BLART> 
  <BELNR>1816008128</BELNR> 
  <BUZEI>009</BUZEI> 
  <KOART>S</KOART> 
  <SHKZG>S</SHKZG> 
  <NEWKO>20519109</NEWKO> 
  <GSBER>17AB</GSBER> 
  <ZUBUK /> 
  <VBUND /> 
  <WRBTR>0000000000000</WRBTR> 
  <ZBTR1>0000000021070</ZBTR1> 
  <ZBTR2>0000000000000</ZBTR2> 
  <ZSTEU /> 
  <VALUT>20080904</VALUT> 
  <KOSTL /> 
  <AUFNR /> 
  <ZUONR>X4025V64RE460XXXXX</ZUONR> 
  <SGTXT>REX</SGTXT> 
  <BEWAR /> 
  <ZFPOS /> 
  <ZENDE>E</ZENDE> 
  </POSITIONSSATZ>
- <POSITIONSSATZ>
  <ZSATA>4</ZSATA> 
  <MANDT>001</MANDT> 
  <BUKRS>0560</BUKRS> 
  <BLART>8F</BLART> 
  <BELNR>1816008128</BELNR> 
  <BUZEI>010</BUZEI> 
  <KOART>S</KOART> 
  <SHKZG>S</SHKZG> 
  <NEWKO>20519109</NEWKO> 
  <GSBER>17AA</GSBER> 
  <ZUBUK /> 
  <VBUND /> 
  <WRBTR>0000000000000</WRBTR> 
  <ZBTR1>0000000009796</ZBTR1> 
  <ZBTR2>0000000000000</ZBTR2> 
  <ZSTEU /> 
  <VALUT>20080904</VALUT> 
  <KOSTL /> 
  <AUFNR /> 
  <ZUONR>X4027V63RE460XXXXX</ZUONR> 
  <SGTXT>REX</SGTXT> 
  <BEWAR /> 
  <ZFPOS /> 
  <ZENDE>E</ZENDE> 
  </POSITIONSSATZ>
- <NACHSATZ>
  <ZSATA>9</ZSATA> 
  <MANDT>001</MANDT> 
  <BUKRS>0560</BUKRS> 
  <BLART>8F</BLART> 
  <BELNR>1816008128</BELNR> 
  <BUZEI>010</BUZEI> 
  <ERDAT>20080905</ERDAT> 
  <UZEIT>000549</UZEIT> 
  <ZPROG>PGRR3010</ZPROG> 
  <ZZSOL>000000000359502</ZZSOL> 
  <ZZHAB>000000000359502</ZZHAB> 
  <ZZBEL>0000001</ZZBEL> 
  <ZZPOS>000000010</ZZPOS> 
  <ZFILN /> 
  <ZENDE>E</ZENDE> 
  </NACHSATZ>
  </ns:MT_MULTI_TYPES>

And here the outbound payload:

<?xml version="1.0" encoding="UTF-8" ?> 
- <ns0:MT_MULTI_TYPES xmlns:ns0="namespace">
- <VORSATZ>
  <ZSATA>0</ZSATA> 
  <MANDT>001</MANDT> 
  <BUKRS>0560</BUKRS> 
  <BLART>8F</BLART> 
  <BELNR>1816008128</BELNR> 
  <BUZEI>000</BUZEI> 
  <ERDAT>20080905</ERDAT> 
  <UZEIT>000549</UZEIT> 
  <ZPROG>PGRR3010</ZPROG> 
  <ZLIEF>T</ZLIEF> 
  <START>20080905</START> 
  <ZFILL /> 
  <ZENDE>E</ZENDE> 
  </VORSATZ>
- <VORSATZ>
  <ZSATA>0</ZSATA> 
  <MANDT>001</MANDT> 
  <BUKRS>0560</BUKRS> 
  <BLART>8F</BLART> 
  <BELNR>1816008128</BELNR> 
  <BUZEI>000</BUZEI> 
  <ERDAT>20080905</ERDAT> 
  <UZEIT>000549</UZEIT> 
  <ZPROG>PGRR3010</ZPROG> 
  <ZLIEF>T</ZLIEF> 
  <START>20080905</START> 
  <ZFILL /> 
  <ZENDE>E</ZENDE> 
  </VORSATZ>
- <KOPFSATZ>
  <ZSATA>1</ZSATA> 
  <MANDT>001</MANDT> 
  <BUKRS>0560</BUKRS> 
  <BLART>8F</BLART> 
  <BELNR>1816008128</BELNR> 
  <BUZEI>000</BUZEI> 
  <BUDAT>20080904</BUDAT> 
  <BLDAT>20080904</BLDAT> 
  <XBLNR /> 
  <WAERS /> 
  <HWAE2>EUR</HWAE2> 
  <HWAE3 /> 
  <KURS2>000000000</KURS2> 
  <KURS3>000000000</KURS3> 
  <BKTXT /> 
  <ZFILK /> 
  <ZENDE>E</ZENDE> 
  </KOPFSATZ>
- <KOPFSATZ>
  <ZSATA>1</ZSATA> 
  <MANDT>001</MANDT> 
  <BUKRS>0560</BUKRS> 
  <BLART>8F</BLART> 
  <BELNR>1816008128</BELNR> 
  <BUZEI>000</BUZEI> 
  <BUDAT>20080904</BUDAT> 
  <BLDAT>20080904</BLDAT> 
  <XBLNR /> 
  <WAERS /> 
  <HWAE2>EUR</HWAE2> 
  <HWAE3 /> 
  <KURS2>000000000</KURS2> 
  <KURS3>000000000</KURS3> 
  <BKTXT /> 
  <ZFILK /> 
  <ZENDE>E</ZENDE> 
  </KOPFSATZ>
- <POSITIONSSATZ>
  <ZSATA>4</ZSATA> 
  <MANDT>001</MANDT> 
  <BUKRS>0560</BUKRS> 
  <BLART>8F</BLART> 
  <BELNR>1816008128</BELNR> 
  <BUZEI>001</BUZEI> 
  <KOART>S</KOART> 
  <SHKZG>S</SHKZG> 
  <NEWKO>30611102</NEWKO> 
  <GSBER>17AB</GSBER> 
  <ZUBUK /> 
  <VBUND /> 
  <WRBTR>0000000000000</WRBTR> 
  <ZBTR1>0000000057576</ZBTR1> 
  <ZBTR2>0000000000000</ZBTR2> 
  <ZSTEU /> 
  <VALUT>20080904</VALUT> 
  <KOSTL /> 
  <AUFNR /> 
  <ZUONR>X4025V64RE460XXXXX</ZUONR> 
  <SGTXT>REX</SGTXT> 
  <BEWAR /> 
  <ZFPOS /> 
  <ZENDE>E</ZENDE> 
  </POSITIONSSATZ>
- <POSITIONSSATZ>
  <ZSATA>4</ZSATA> 
  <MANDT>001</MANDT> 
  <BUKRS>0560</BUKRS> 
  <BLART>8F</BLART> 
  <BELNR>1816008128</BELNR> 
  <BUZEI>009</BUZEI> 
  <KOART>S</KOART> 
  <SHKZG>S</SHKZG> 
  <NEWKO>20519109</NEWKO> 
  <GSBER>17AB</GSBER> 
  <ZUBUK /> 
  <VBUND /> 
  <WRBTR>0000000000000</WRBTR> 
  <ZBTR1>0000000021070</ZBTR1> 
  <ZBTR2>0000000000000</ZBTR2> 
  <ZSTEU /> 
  <VALUT>20080904</VALUT> 
  <KOSTL /> 
  <AUFNR /> 
  <ZUONR>X4025V64RE460XXXXX</ZUONR> 
  <SGTXT>REX</SGTXT> 
  <BEWAR /> 
  <ZFPOS /> 
  <ZENDE>E</ZENDE> 
  </POSITIONSSATZ>
- <POSITIONSSATZ>
  <ZSATA>4</ZSATA> 
  <MANDT>001</MANDT> 
  <BUKRS>0560</BUKRS> 
  <BLART>8F</BLART> 
  <BELNR>1816008128</BELNR> 
  <BUZEI>010</BUZEI> 
  <KOART>S</KOART> 
  <SHKZG>S</SHKZG> 
  <NEWKO>20519109</NEWKO> 
  <GSBER>17AA</GSBER> 
  <ZUBUK /> 
  <VBUND /> 
  <WRBTR>0000000000000</WRBTR> 
  <ZBTR1>0000000009796</ZBTR1> 
  <ZBTR2>0000000000000</ZBTR2> 
  <ZSTEU /> 
  <VALUT>20080904</VALUT> 
  <KOSTL /> 
  <AUFNR /> 
  <ZUONR>X4027V63RE460XXXXX</ZUONR> 
  <SGTXT>REX</SGTXT> 
  <BEWAR /> 
  <ZFPOS /> 
  <ZENDE>E</ZENDE> 
  </POSITIONSSATZ>
- <POSITIONSSATZ>
  <ZSATA>4</ZSATA> 
  <MANDT>001</MANDT> 
  <BUKRS>0560</BUKRS> 
  <BLART>8F</BLART> 
  <BELNR>1816008128</BELNR> 
  <BUZEI>001</BUZEI> 
  <KOART>S</KOART> 
  <SHKZG>S</SHKZG> 
  <NEWKO>30611102</NEWKO> 
  <GSBER>17AB</GSBER> 
  <ZUBUK /> 
  <VBUND /> 
  <WRBTR>0000000000000</WRBTR> 
  <ZBTR1>0000000057576</ZBTR1> 
  <ZBTR2>0000000000000</ZBTR2> 
  <ZSTEU /> 
  <VALUT>20080904</VALUT> 
  <KOSTL /> 
  <AUFNR /> 
  <ZUONR>X4025V64RE460XXXXX</ZUONR> 
  <SGTXT>REX</SGTXT> 
  <BEWAR /> 
  <ZFPOS /> 
  <ZENDE>E</ZENDE> 
  </POSITIONSSATZ>
- <POSITIONSSATZ>
  <ZSATA>4</ZSATA> 
  <MANDT>001</MANDT> 
  <BUKRS>0560</BUKRS> 
  <BLART>8F</BLART> 
  <BELNR>1816008128</BELNR> 
  <BUZEI>009</BUZEI> 
  <KOART>S</KOART> 
  <SHKZG>S</SHKZG> 
  <NEWKO>20519109</NEWKO> 
  <GSBER>17AB</GSBER> 
  <ZUBUK /> 
  <VBUND /> 
  <WRBTR>0000000000000</WRBTR> 
  <ZBTR1>0000000021070</ZBTR1> 
  <ZBTR2>0000000000000</ZBTR2> 
  <ZSTEU /> 
  <VALUT>20080904</VALUT> 
  <KOSTL /> 
  <AUFNR /> 
  <ZUONR>X4025V64RE460XXXXX</ZUONR> 
  <SGTXT>REX</SGTXT> 
  <BEWAR /> 
  <ZFPOS /> 
  <ZENDE>E</ZENDE> 
  </POSITIONSSATZ>
- <POSITIONSSATZ>
  <ZSATA>4</ZSATA> 
  <MANDT>001</MANDT> 
  <BUKRS>0560</BUKRS> 
  <BLART>8F</BLART> 
  <BELNR>1816008128</BELNR> 
  <BUZEI>010</BUZEI> 
  <KOART>S</KOART> 
  <SHKZG>S</SHKZG> 
  <NEWKO>20519109</NEWKO> 
  <GSBER>17AA</GSBER> 
  <ZUBUK /> 
  <VBUND /> 
  <WRBTR>0000000000000</WRBTR> 
  <ZBTR1>0000000009796</ZBTR1> 
  <ZBTR2>0000000000000</ZBTR2> 
  <ZSTEU /> 
  <VALUT>20080904</VALUT> 
  <KOSTL /> 
  <AUFNR /> 
  <ZUONR>X4027V63RE460XXXXX</ZUONR> 
  <SGTXT>REX</SGTXT> 
  <BEWAR /> 
  <ZFPOS /> 
  <ZENDE>E</ZENDE> 
  </POSITIONSSATZ>
- <NACHSATZ>
  <ZSATA>9</ZSATA> 
  <MANDT>001</MANDT> 
  <BUKRS>0560</BUKRS> 
  <BLART>8F</BLART> 
  <BELNR>1816008128</BELNR> 
  <BUZEI>010</BUZEI> 
  <ERDAT>20080905</ERDAT> 
  <UZEIT>000549</UZEIT> 
  <ZPROG>PGRR3010</ZPROG> 
  <ZZSOL>000000000359502</ZZSOL> 
  <ZZHAB>000000000359502</ZZHAB> 
  <ZZBEL>0000001</ZZBEL> 
  <ZZPOS>000000010</ZZPOS> 
  <ZFILN /> 
  <ZENDE>E</ZENDE> 
  </NACHSATZ>
- <NACHSATZ>
  <ZSATA>9</ZSATA> 
  <MANDT>001</MANDT> 
  <BUKRS>0560</BUKRS> 
  <BLART>8F</BLART> 
  <BELNR>1816008128</BELNR> 
  <BUZEI>010</BUZEI> 
  <ERDAT>20080905</ERDAT> 
  <UZEIT>000549</UZEIT> 
  <ZPROG>PGRR3010</ZPROG> 
  <ZZSOL>000000000359502</ZZSOL> 
  <ZZHAB>000000000359502</ZZHAB> 
  <ZZBEL>0000001</ZZBEL> 
  <ZZPOS>000000010</ZZPOS> 
  <ZFILN /> 
  <ZENDE>E</ZENDE> 
  </NACHSATZ>
  </ns0:MT_MULTI_TYPES>

Former Member
0 Kudos

hi Tobi,

here is the problem, actually you created the source structure with 4 header tags (VORSATZ,KOPFSATZ...), and target with four header tags, you are maping values from source to target by checking the header tag right?

if that is the case you will get all the records of one header tag in a sequence, you can avoid this by keeping a generic header tag to all the 4 structures, how ever you can recognize the 4 structures based on ZSATA field for your transformation right.

did u get the point?

Former Member
0 Kudos

okay, maybe thats the point, but i don't know how to recognize the 4 different structures without using the keyfiled!

And how can i give a generic header tag for VORSATZ, KOPFSATZ, etc, if i have to differentiate the 4 different structure?

Former Member
0 Kudos

but i don't know how to recognize the 4 different structures without using the keyfiled!

--you have to use the KeyField to recognize the structures, but i am asking you to change all the 4 header tags given in the data type as generic like <STRUCTURE> or some thing.

And how can i give a generic header tag for VORSATZ, KOPFSATZ, etc, if i have to differentiate the 4 different structure?

--if the header tag is generic then you will be able to write the records in the same sequence that you recieved it. if at all you give a generic header tag you can differentiate the 4 structures by field ZSATA in mapping.

try using generic header for all the structures, you will find sol for differentiating the structures.

Former Member
0 Kudos

sorry, but i don't know how to implement your suggestion. the problem is, that i have only one mapping-program and in that case i have to differntiate the 4 structures by differnt names. syntacticlly its not allowed to build message-types with two or more same structurenames on the similar level.

is there a way to use generic names? my idea is using a multiple interface-mapping with differnt mapping-programs.

do you understand my point, or am i one the wrong way?

jwalithtatikonda2
Participant
0 Kudos

Hi Tobi,

If we know that only 4 keys are possible. i.e 0,1,2,4,9 (for example), they why don't you go for java mapping, where you know the exact structure of each key, so accordingly we can write our java code in the java mapping either SAX or DOM.