cancel
Showing results for 
Search instead for 
Did you mean: 

making file desin with elements and attributes implementation

Former Member
0 Kudos

hello

this is an FILE to IDOC

I have an xml file that need to be enter to the XI. the XML has attributes and elements.

I would like to know how can I make an element with some attributes and below there should be a subelement.

for example, in delivery there will be all the attributes, and I would like to make it an array so there will be below subelemnt in the name of carrier for example.

(if any one has other ways to implement this file feel free to suggest.)

- <delivery number="1234567890" shipment-type="Y014" shipping-point="1910" ifm-reference="125" status="final">

- <!-- status initial, change or final

-->

<carrier>123456</carrier>

- <!-- This will be the SAP vendor code

-->

<scheduled-departure>200810011000</scheduled-departure>

- <!-- Precalculated departure date and time format YYYYMMDDHH24MI

-->

<scheduled-arrival>200810031600</scheduled-arrival>

- <!-- Precalculated delivery date and time

-->

<actual-departure>200810011015</actual-departure>

- <!-- Actual departure reported by carrier

-->

<actual-arrival>200810031545</actual-arrival>

- <!-- Actual arrival reported by carrier

-->

</delivery>

Accepted Solutions (1)

Accepted Solutions (1)

santhosh_kumarv
Active Contributor
0 Kudos

Hi,

While creating the data type you can insert both attribute and sub-element for an element.

By this way you can read the XML with attribute.

Thanks

SaNv...

Former Member
0 Kudos

that what I thought, but after I do the attributes for the element, I dont have the option to write for the element sub-element.

santhosh_kumarv
Active Contributor
0 Kudos

>>that what I thought, but after I do the attributes for the element, I dont have the option to write for the element sub-element.

I guess the current row that is selected would be an attribute thus the option insert subelement is disabled. Always select the element and insert either attribute or subelement to it.

Thanks

SaNv...

Answers (1)

Answers (1)

Former Member
0 Kudos

Check whether u have specified the type for root element. if type is specified then subelements cannot be created but attributes can be created.