Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Issue in downloaded xml file format

Former Member
0 Kudos


Hi All ,

We have a requirement where we need to generate an xml file format in the following way ( attached file : DHR_XML_EXAMPLE.xml ).

We have developed an RFC for it. It works fine. But , we face an issue here the node RPT_OVERVIEW repeats itself everytime unlike the required file.

PFA the generated file from rfc , XML_RFC.xml.

I think ,the issue is we are
having a final structure ZMQMR003, with both the fields RPT_OVERVIEW and
REPORT.

  TYPES : BEGIN OF zmqmr003,


      rpt_overview TYPE rpt_overview,


      report TYPE report,                                

*      prodstatus TYPE char100,


  END OF zmqmr003.

  TYPES: BEGIN OF report,


          sernr       TYPE char100,                      


          lineno      TYPE i,                     


          reportdata  TYPE char200,


   END OF report,



      BEGIN OF rpt_overview,


        sernr       TYPE   char100,


        rundate     TYPE   char100,


        runtime     TYPE   char100,


        prodorder   TYPE   char100,


        buildstatus TYPE   char100,


      END OF rpt_overview.



 

So , each time the append happens to the report field , the RPT_OVERVIEW is also being filled.

If the work area is cleared ,then the value is blank but the fields still appear with blank values.

So, we need to find if there is any way to HIDE/DELETE these fields from appearing .

I have tried the MODIFY , INSERTand also the SORT and DELETE ADJACENT DUPLICATES statements. None of them
worked as expected.

I have also tried by separating the final structure into 2 internal tables and finally trying to merge them
into one final table. But still when the merge happens, the RPT_OVERVIEW is filled either blank or with values.

Any suggestion/Help is greatly appreciated.


 
 
 
 
 
 
 





1 ACCEPTED SOLUTION

Former Member
0 Kudos

It appears you are working with internal table with flat structure having rpt_overview and report.

Instead you need to use deep structure having first field as rpt_overview and second field as internal table of report.

1 REPLY 1

Former Member
0 Kudos

It appears you are working with internal table with flat structure having rpt_overview and report.

Instead you need to use deep structure having first field as rpt_overview and second field as internal table of report.