06-11-2011 12:20 PM
Dear All,
I have written a program to bring the data from xml to internal table Below is the strucutre of my xml file .
- <Data>
- <MT Type="CR">
<MatType>FERT</MatType>
</MT>
- <OP Type="CR">
<MatNumber>9901040103-000115</MatNumber>
- <Activities Element="AT">
- <AT Type="CR">
<MaterialNumber>115</MaterialNumber>
<ActivityType>DEPR.</ActivityType>
</AT>
- <AT Type="CR">
<MaterialNumber>117</MaterialNumber>
<ActivityType>L.C.R</ActivityType>
</AT>
</Activities>
</OP>
</Data>
.However I am not able to handle the multiple entries which comes together . ie
- <AT Type="CR">
<MaterialNumber>115</MaterialNumber>
<ActivityType>DEPR.</ActivityType>
</AT>
- <AT Type="CR">
<MaterialNumber>117</MaterialNumber>
<ActivityType>L.C.R</ActivityType>
</AT>
Please let me know how to handle this . Thanks!
Regards,
Syed
06-11-2011 8:37 PM
06-12-2011 1:59 PM
06-12-2011 8:03 PM
Hi ,
To convert XML data into internal table u have to use FM "SMUM_XML_PARSE", this FM takes XString as input ,so first u have to
convert ur xml string into XString using FM "SCMS_STRING_TO_XSTRING".
Thanks
jitendra
06-12-2011 8:58 PM
if you are in ECC 6.0, use Transformation (Please search the forum or help.sap.com to know more)
It is easy to use with table handling (only have pain in nested structure and control break-up) and really fast with bot-way handling.
Thanks.