Skip to Content
0
Former Member
Dec 09, 2008 at 09:16 PM

Dynamic XSLT Transformation for ABAP

346 Views

Hi Team,

I have a simple requirement, but could not get it to work. Tried different posts but need some help.

I have an input XML file as follows:

<ITEM>

<ITEMQUALF>

<MATERIAL>

<UPC>

<VENDORMATERIAL>

<ITEM>

I created my internal table with the exact fields as above and created a transformation which works fine. The problem is, there are scenario's where only one tag "MATERIAL", "UPC", OR "VENDORMATERIAL" is passed in the input XML. Empty tags are not passed. For E.G.

<ITEM>

<ITEMQUALF>

<UPC>

<ITEM>

My transformation fails in this scenario because it does not finds the MATERIAL and VENDORMATERIAL tags. I tried using the <tt:cond/> tag, but no luck. I have some specific questions:

1) How to take care of this scenario where empty tags are not passed? (I have the Superset of all the Tags available in an XSD). A quick Sample would help me a lot because I have spent weeks breaking my head with this.

2) Is there any other method or Option to parse a very larger input file (~40 MB) as above? I have seen the iXML ABAP methods but don't know if we should use XSLT or iXML or is there any other method. We don't have XI in our landscape. Our system is ECC 6.0, ABAP 7.0 - SP 17, Enhancement Pack 3.

Any pointers would help a lot. Thanks for your time.

Regards

Sanjay