SLT – Table Enhancement & Cluster Data Extraction
What is SLT?
SLT stands for SAP Landscape Transformation Replication Server (SLT) running on the NetWeaver Platform. SLT is the ideal solution for all HANA customers who need real-time (and non-real-time) data replication sourcing from SAP ERP or non-SAP systems into HANA
STXL table is available in ECC system. This is a BW object and having a cluster field. In HANA, we can not replicate the cluster field. To get those cluster data We have to enhance the STXL table with a new field / column and then populate the data with simple text format.
To Get Free HANA Clout system please have a look in this Vedio
Free SAP HANA Server Access in Cloud – YouTube
- Go to /LTRS transaction
- Go to Table Settings
- Add an new Table option
- Add STXL Table
- Add the name of the Table which you would like to add
- STXL will be added under Table settings folder
- Double click on the Table – A new window will be open as per the screen
- Go to Table Structure Tab
- You will find the current Table structure of STXL
- Last field ( line 9 ) is cluster field and data type is RAW.
- Select the last field / RAW field
- Remove That field by clicking the delete button at top
- Removed field will be added in right hand side(as shown in picture )
- Add new field with add button (as shown in picture ).
- Add other field as well (shown in picture ).
- Add other field as well (shown in picture ).
- Here We have added 3 more field as required
- Now you have to create the ABAP routine to Data conversion
- Go to SE38 to create a include program
- Please select Type as “Include Program”
- Status as “Client Production Program”
- Application is “Cross Component”
- Save the include program
- Open the include program is SE38
- Write the ABAP code
- One set of Code is attached. You can take an reference
- Go to Rule assignment
- Right click and select ADD Table option
- Add the Table (STXL)
- It will display under rule assignment folder
- Please select STXL table
- Go to the Rule option at Top
- Select Event Based Rule and continue…
- Please select Begin of Record (BOR) option from the dropdown
- It means : The routine will trigger before the record replication
- New window will be open
- Please attached the “Include Program
- Insert Include name as shown in the picture
- Change Status field to “RELEASE”
- Save and activate
- Go to LTRC T-Code to replicate the Field
- Click on the Data Provisioning Button
- You will get Multiple option
- Open Data Provisioning window
- Select on start replication radio button
- Provide the Table name & Execute
- Search for the Table in Replication window
- Check – whether it is schedule (as shown in the screen)
- Step 22
Open the Table from HANA Modeller perspective and check whether those field in the table is copied or not.
Please find the code attached here.
**& Include ZSLT_HANA_STXL_BOR_2
* TR-DGWK900010 Created by – CSATRAJIT – 04-09-2015
TYPES: BEGIN OF ty_stxl_raw,
clustr TYPE stxl-clustr,
clustd TYPE stxl-clustd,
END OF ty_stxl_raw.
DATA: lt_stxl_raw TYPE STANDARD TABLE OF ty_stxl_raw,
wa_stxl_raw TYPE ty_stxl_raw,
lt_tline TYPE STANDARD TABLE OF tline,
wa_tline TYPE tline,
oref TYPE REF TO cx_root.
**Filter out text records that we don’t need
IF <wa_s_stxl>-tdobject = ‘QMMA’
AND <wa_s_stxl>-tdid = ‘LTXT’
AND <wa_s_stxl>-tdspras = ‘E’
AND <wa_s_stxl>-srtf2 = 0.
* and <wa_s_stxl>-clustr < 5000.
** add check for deleted record
IF <wa_s_stxl>-clustd IS NOT INITIAL.
** end change 05/13/2014
*Put Source fields into internal table for IMPORT statement to work on
wa_stxl_raw-clustr = <wa_s_stxl>-clustr.
wa_stxl_raw-clustd = <wa_s_stxl>-clustd.
APPEND wa_stxl_raw TO lt_stxl_raw.
IF <wa_s_stxl>-clustr < 5000.
* IMPORT tline = lt_tline FROM INTERNAL TABLE lt_stxl_raw.
IMPORT tline = lt_tline
FROM INTERNAL TABLE lt_stxl_raw
IGNORING CONVERSION ERRORS.
IF lt_tline IS NOT INITIAL.
*Only read first line of text
READ TABLE lt_tline INTO wa_tline INDEX 1.
IF sy-subrc = 0.
<wa_r_stxl>-text = wa_tline-tdline.
* end change 05/13/2014
<wa_r_stxl>-qmnum = <wa_s_stxl>-tdname+0(12).
<wa_r_stxl>-fenum = <wa_s_stxl>-tdname+13(4).
Please let me know if you are facingany issue.
In your first step with picture, you say to go to LTRS, then "Add Table" as "STXL", however when we do so, we do not see all three tabs in your picture. We see "Table Settings", and "Mapping Values", however we do not see "Table Structure" tab.
Based on this missing tab, need some clarification on the setup for the configuration (ECCSLTDR7) you are adding STXL table to. Is there specific on this initial replication configuration which we need to be aware of? In our case, we are using RFC to ECC source with HANA as target.
I came across another message which says the missing tab only appears for: "Create the target connection as SQL connection for enabling Table Structure option".. this does not sound right..
Also came across another post with same issue, though it remains unanswered:
We are on SP 11 in SLT.
In new way of replication of STXL, you need to add STXL in index like table settings.
Once done, you will need to generate the template and give the deviating table name if any you want to give. Then you will need to map the fields and save the settings with a check mark selecting the template system has generated.
Perofmance OPtions - include STXL and select 5 sender queue
Then start replication/ load (initial load)
There is a new document from SAP on this.
Thanks Aparajit. We found the INDX declustering file and working like a charm, no ABAP required.
I am also working on migrating STXL table to HANA version SP12 using Index de-clustering method, however i am not been very successful in migrating the table. Can you please share the link to the document you used to implement the same.