Overview
This article describes the steps required to extract long text data from SAP Systems using Replicate Preview.
User Authorization
Syniti recommends using a non-dialog RFC user with a non-expiring password. The user should at least be provisioned the authorizations provided in this article.
Table Access
Use the S_TABU_NAM authorization object to restrict by table. The minimum list of tables required are as follows. Additionally specific tables to be extracted will need to be added.
Authorization Object | Authorization Field | Authorization Value |
S_TABU_NAM | TABLE | AQGQCAT, DD01T, DD02L, DD02T, DD03L, DD04L, DD04T, DD05Q, DD07L, DD07T, TCDOB |
ACTVT | 03 (Display) |
Use the S_TABU_NAM authorization object to restrict by table group. The minimum list of table group are as follows. Additionally specific table groups to be extracted will need to be added.
Authorization Object | Authorization Field | Authorization Value |
S_TABU_DIS | DICBERCLS | &NC&, SS |
ACTVT | 03 (Display) |
Install SAP S/4HANA Transports
The first step required to set-up the solution, is to install the provided transport in the SAP Application Server. The SAP transport files are listed in this article.
Install Syniti SAP Query Read Text Transport
Install the provided transports into the SAP Application Server.
To extract SAP long texts, a single transport must be installed. To have it installed, please contact the Customer Basis team.
Transport Contents
Object Name | Type | Description |
/BOA/UTILITY | Package | Package that contains all objects related to Syniti SAP Query Read Text |
/BS4/READ_TEXT | Structure | Structure that defines available fields for Input parameters and Output table columns |
/BOA/QUERY | User Group | User Group for Syniti SAP Query Read Text |
/BS4/READ_TEXT | InfoSet | InfoSet for Syniti SAP Query Read Text. Assigned to User Group /BOA/QUERY. Main Query logic (input parameters definition and extraction logic) is implemented in this InfoSet. |
/BS4/QUERY BOAQ_READ_TEXT | Query | Query for Syniti SAP Query Read Text. Created based on InfoSet /BS4/READ_TEXT. Output format (columns displayed and their sequence) is defined in this Query. |
Executing Syniti SAP Query Read Text
Using RSAQ_REMOTE_QUERY_CALL
Once the Syniti SAP Query Read Text is installed, it is ready to be executed and to extract text for the objects in scope.
When executing the query using RSAQ_REMOTE_QUERY_CALL Remote Enabled Function Module, the following input parameters must be provided:
WORKSPACE: Value must be set to G as the Query was created under Global Area
QUERY: Name of the Query to be executed. Value must be BOAQ_READ_TEXT
USERGROUP: Name of the User Group that contains the Query. Value must be /BOA/QUERY (S/4HANA)
SKIP_SELSCREEN: Do not use Selection Screen. Selection Screen Parameters are populated from Input Table SELECTION_TABLE (see below). Value must be X.
DATA_TO_MEMORY: Export extraction results to memory and fill Output Table LDATA (see LDATA Output Table for more information)
SELECTION_TABLE:
SELNAME: Possible values are:
S_TDOBJ: Text Object
S_TDNAME: Text Name
S_TDID: Text ID
S_SPRAS: Language
KIND: Possible values are
P: Parameter
S: Select Option
SIGN: Possible values are:
I: Include
E: Exclude
OPTION: Possible values are:
EQ: Equal
NE: Not Equal
GT: Greater Than
GE: Greater or Equal Than
LT: Less Than
LE: Less or Equal Than
BT: Between
LOW: Lower Value
HIGH: Higher Value
LDATA Output Table
The output is exported to the LDATA output table. This table has a generic row type, and its contents must be parsed by the consumer application.
Note
In cases where the length of the result record is less than the length of the LDATA row, one row of Output Table LDATA may contain more than one result record from the Query. It is also possible for one result record from the Query to span more than one row of Output Table LDATA, in cases where the length of the result record is greater than the length of LDATA row.
LDATA encodes the results in the following format: <VALUE_LENGTH>:<VALUE>[<VALUE_LENGTH>:<VALUE>];
where:
VALUE_LENGTH: 3 digits describing the length of VALUE
VALUE: Actual field value
For Syniti SAP Query Read Text, every output record has the following eight fields:
Text Object
Text Name
Text ID
Text Language
Text Format
Text Line
Line Counter
SAP Client
Using Syniti Data Provider for SAP ERP
Once the Syniti SAP Query Read Text is installed, it is ready to be executed and to extract text for the objects in scope.
Replicate Preview uses their own driver, called Syniti Data Provider for SAP and it is responsible for converting SQL Query Language (i.e., SQL Select Statements) into a Remote Function Call using RSAQ_REMOTE_QUERY_CALL Remote Enabled Function Module. The Syniti Data Provider for SAP translates the SQL Query options into Importing and Table Parameters and parses the output of the Remote Function Call back into SQL compliant format. The Query Name must be informed in the From Clause and the following fields can be used in the Where Clause:
/BS4/READ_TEXT-OBJECT: Text Object
/BS4/READ_TEXT-NAME: Text Name
/BS4/READ_TEXT-ID: Text ID
/BS4/READ_TEXT-LANGUAGE: Language
The output can contain the fields below:
Text Object
Text Name
Text ID
Text Language
Text Format
Text Line
Line Counter
SAP Client
Execution Examples
Execution using RSAQ_REMOTE_QUERY_CALL
To consume Syniti SAP Query Read Text using RSAQ_REMOTE_QUERY_CALL, the following fields must be populated:
Workspace
Query
Usergroup
Skip_selscreen
Data_to_memory
Selection_table
See Using RSAQ_REMOTE_QUERY_CALL for more details for each parameter.

RSAQ_REMOTE_QUERY_CALL - Parameters

RSAQ_REMOTE_QUERY_CALL - SELECTION_TABLE
The generated results can be found in Table LDATA:

RSAQ_REMOTE_QUERY_CALL - LDATA
Using Long Text Query in Replicate Preview
Add the BOAQ_READ_TEXT table in your datastore and run a metadata scan for it.

Access your workspace in Replicate Preview and create a replication for the BOAQ_READ_TEXT source table.
Once created, click the Edit icon for the newly created replication.

Add the required source filter according to the required data extraction and click Save.

Execute your replication.
