cancel
Showing results for 
Search instead for 
Did you mean: 

Source Structure creation

Former Member
0 Kudos

Hi Friends,

I am well very new to SAP PI. Need some help to understand the things

1: How to create source strucuture from the given XML File(That to Hiearchy levels are given)

2: How to create sources structure form the .txt file(that to hiearchy is given).

<< Moderator message - Please do not promise points >>

<< Moderator message - Everyone's problem is important. But the answers in the forum are provided by volunteers. Please do not ask for help quickly. >>

Edited by: Rob Burbank on Jan 21, 2011 5:22 PM

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Deepak,

Q1) How to create source strucuture from the given XML File(That to Hiearchy levels are given)

For the XML file : first line would be <?xml version="1.0" encoding="utf-8" ?> i.e version of the XML file & encoding format of the file.

Next would be the Message Type with the interface name

Now after, Node and below to then are fields. you can identify the hierarchy levels easily.

Suppose the node is like - <MATERIALDATA>

next hierarchy level look: - <BATCHDATA>

See below:

- <MATERIALDATA>

<MATNR>1000009263</MATNR>

- <BATCHDATA>

Q2) How to create sources structure form the .txt file(that to hiearchy is given).

When you know the hierarchy levels, then you need to identify the fields & fieldnames. So that, you can define the structure.

Thanks,

Answers (1)

Answers (1)

former_member208856
Active Contributor
0 Kudos

For Structure for XML or txt file, you have to create Data type for the Message.

Hierarchy will be as per given in XML file.

Create Message type & Service Interface using that Data Type.

Only the part of Sender Communication Channel will be different for XML Message & TXT Message.

Use file Sender CC for Picking up XML File.

Use FCC in File Sender for TXT file.

Former Member
0 Kudos

Hi dear,

can you breief me, if my Xml strucutre has hiearchy, I had declared data strucuture for the same.

but how the system will understand that Line item has to go to line item(struc) and header to hearder (stru) both in case of Xml and txt file.

May be asking silly questions..buts begineer.

former_member208856
Active Contributor
0 Kudos

You have your XML with Hierarchy.

First create Data Type as per Hierarchy given in XML Structure

Like :

<Message_Name>

<Header>

<Item>

1. Now create Message Type for this Data Type.

2. Create Message Mapping.

Now Open your real XML message in EDIT Mode & Copy the complete XML.

3. In Message Mapping, there is one OPTION --> TEST --> There is one Button "SRC (Source Text View)",

In this test Option.

Here Paste your XML Message & Click on BUTTON "Tabular Tree View".

Check Every Detail is there & Nothing is in RED.

If everything is Green, now structure is OK, ELSE make nessary changes in your Data Type & check it again.