07-18-2014 11:11 AM
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.
07-18-2014 12:24 PM
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.
07-18-2014 12:24 PM
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.