Parse Reports in Xtract Universal
This articles shows how to use Xtract Universal to parse ABAP reports that contain groups of data sets and merge them into a single data set. The depicted example uses the report FBL3N that contains multiple groups where each group has its own header and calculation rows.
The article leads you through the following steps to merge all groups into a single data set:
- Remove rows that calculate the content of the rows before.
- Select a header for the report and remove duplicates.
- Parse rows that contain additional headers as columns.
Remove Rows
Follow the steps below to remove rows that calculate the content of the rows before. Calculation rows are marked with an * symbol.
- Look up a report that contains groups of data. The depicted example uses report FBL3N (RFITEMGL).
- If the report has variants, select a variant.
- Click [Load Preview] to load a preview of the first 100 rows.
- Click [Automatically detect columns] to define the columns of the report.
- Open the tab Skip and Parse Rows.
- Click [Add rows to skip].
- To remove calculation rows, enter the keyword *.
All rows that contain the keyword are displayed in a gray font in the preview section.
- To remove additional rows that separate calculation rows and headers, enter the keyword ---.
- Click [OK] to save the changes.
The calculation rows are skipped during the report extraction.
For more information on how to manipulate rows in report extractions, see Documentation: Define Rows.
Select a Header
Follow the steps below to select one of multiple available headers as the report header:
- Open the report extraction from Remove Rows or any other report that contains multiple headers.
- Click [Load Preview] to load a preview of the first 100 rows.
- Open the tab Skip and Parse Rows.
-
In the preview section, right-click the header row and select Select as header from the context menu. All rows that contain the header are displayed in a blue font in the preview section.
Tip
If the header is not part of the preview (first 100 rows of the report), enter a pattern in the field Header pattern to scan all report rows for the pattern.
-
Click [OK] to save the changes.
The report parses the selected header as the report header during report extraction.
Any duplicates of the header are removed from the result set.
Parse Rows with Additional Headers as Columns
Follow the steps below to parse header rows that contain information about a data set as columns. The depicted example parses the header rows containing the G/L Account number and the Company Code of a data set as columns.
- Open the report extraction from Select a Header or any other report that contains multiple headers.
- Click [Load Preview] to load a preview of the first 100 rows.
- Open the tab Skip and Parse Rows.
- Click [Add row to parse as column] to add a new column.
- Click []. The window "Parse Helper" opens and a new preview of the report data is fetched. This can take a while.
- Under Search keyword enter a unique keyword from the row you want to parse as a column. Matching rows are displayed in the preview section of the window.
- Make sure only header rows are displayed in the preview section. If the preview includes regular rows, edit the keyword until only header rows remain.
- Under New Column Name enter a name for the new column.
- Mark the content of the column in the preview section by pressing and dragging the mouse pointer over the length of the content.
- Click [OK] to save the column properties. All rows that will be parsed as a column are displayed in a blue font in the preview section.
-
Repeat steps 4 to 9 for the Company Code.
Tip
If the Company Code is not relevant for your report analysis, remove the corresponding header row from the result set, see Remove Rows.
-
Click [OK] to save the changes.
- Run the extraction and check if the rows are parsed correctly.
The extracted report returns a single data set that includes the content of all original data set groups.