cancel
Showing results for 
Search instead for 
Did you mean: 

Issue with XML Target Nodes...

Former Member
0 Kudos

Hi Experts,

I am in a process of generating XML files through BODS..when I tries to generate xml target files am getting output as below

<query>

      <Node1>

            <GeneratedDate>2015/11/05</GeneratedDate>

       </Node1>

               <Node2>

                      <ID>2526</ID>

                        <Name>ABC</Name>

                </Node2>

                           <Node3>

                                     <dEPT>10</dEPT>

                                     <Sal>5000</Sal>

                            </Node3>

        <Node1>

                <GeneratedDate>2015/11/05</GeneratedDate>

         </Node1>

                    <Node2>

                           <ID>4545</ID>

                           <Name>pqr</Name>

                    </Node2>

                           <Node3>

                                <dEPT757</dEPT>

                                <Sal>7000</Sal>

                             </Node3>

</Query>

As of now am getting is ok for me....But here issue starts..

I was given a requirement like Node1 should not repete all the time..It shot occur only on 1st hierarchy as below

<query>

      <Node1>

            <GeneratedDate>2015/11/05</GeneratedDate>

       </Node1>

               <Node2>

                      <ID>2526</ID>

                        <Name>ABC</Name>

                </Node2>

                           <Node3>

                                     <dEPT>10</dEPT>

                                     <Sal>5000</Sal>

                            </Node3>

                    <Node2>

                           <ID>4545</ID>

                           <Name>pqr</Name>

                    </Node2>

                           <Node3>

                                <dEPT757</dEPT>

                                <Sal>7000</Sal>

                             </Node3>

</Query>

Please help me is very urgent..

Thanks for you support

Regards,

Abhi

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi All,

Any suggestion for the above request.

Abhi

Former Member
0 Kudos

Hello

Modify the where clause for the node1 nested table, it is probably mapped to the wrong source (often a row generation is used to fix a node to a single instance).

This is a key principle when working with with NRDM, mapping the nested tables to the correct source.

Michael

Former Member
0 Kudos

Hi Michael,

Thanks for you reply ..

I have only one source table from that am generating XML target.. do I need to use where condition for that??

below design I preferred..

SourceTable------>>Query(here am creating nodes)-------.>> XML Target

                                 Row generator

Data is not looping in my design ,but the thing is 1st Node  should occurs only at 1st hierarcy

Regards,

Abhi.

Former Member
0 Kudos

Sorry, I meant the from clause!  I have jetlag (that's my excuse and I'm sticking to it).

Check the from clause for each nested table.

Former Member
0 Kudos

no problem Michael ...

Every thing is perfect in my query ..

the only thing is I need to arrest node 1 in 1st hierarchy

Is  there any options I need to change in  node level properties ...or any other option to edit DTD schema manually to arrest

Abhi

Former Member
0 Kudos

You can map a row generation to a node to ensure only 1 instance is created.  Map the row generation to the node, then delete any other entries in the from clause.

Former Member
0 Kudos

am not clear Michael..can you please explain me more clearly ..

Message was edited by: Abhinav sukla

Former Member
0 Kudos

and one more thing Michael there is no link between Node 1 and (node 2 & node 3 (node 2 and node 3 have data link) ) Node 1 will act like a Header Node it has two columns one is default hard code value one have sysdate value.  ...

Abhi

severin_thelen
Contributor
0 Kudos

Here are 2 screenshots, to explain, what Michael want to say.

From the left side comes the previous queries or source tables. The Row_Generation counts from 0 to 1.

Here the From Tab

I hope the screenshots help you, to understand the DF design.


Regards

Severin

Former Member
0 Kudos

Check this document - it has a worked example - http://scn.sap.com/docs/DOC-19788

It's old, but the technique is still the same.

Former Member
0 Kudos

Hi Michael,

My problem resolved... document which you have shared is very usefull.

many thanks..

Bhanu

Former Member
0 Kudos

Hi Severin,

Issue resolved... many thanks for your support

Regards,

Abhi

Former Member
0 Kudos

Hi All,

Can any one help me on above?????

Regards,

Abhi