SAP remote table comparison: This article will help you compare two remote tables. First, it will check if the SAP DDIC strutures of both tables are the same. If it is the case, it will compare the data in these tables.
Table of Contents
It happens in SAP to compare the values of table between Two systems ( DEV/QUAL or QUAL/PROD ) and especially for customizing table.
This comparison makes the troubleshooting easier by removing an potential customizing/Data problem.
This articles will go through how to SAP Remote Table comparison step by step
The standard function DDIF_FIELDINFO_GET retrieves the metadata of a table in input.
This function can be called remotely in order to retrieve the target table we want to campare.
In this sample, this function is called twice:
If there is no compliance in metadata, no need to go further.
The return of BAPI DDIF_FIELDINFO_GET-DFIES_TAB[] contains list of fields with the whole metadata description.
We need the following information
Field Name | Field Type | Description |
---|---|---|
FIELDNAME | FIELDNAME | Field Name |
OFFSET | DOFFSET | Offset of a field |
LENGTH | DDLENG | Length (No. of Characters) |
TYPE | INTTYPE | ABAP data type (C/D/N/…) |
FIELDTEXT | AS4TEXT | Short Description of Repository Objects |
The Option table is a table of Where clause.
This is used to filter data retrieved from remote table.
As an sample, let’s add filter on KUNNR when retrieving data from a remote KNA1 table
CONCATENATE 'KUNNR = ' lv_str INTO SEPARATED BY space.
NB:
don’t forget to add quote to value.
CONCATENATE '''' -kunnr '''' INTO lv_str.
RFC_READ_TABLE is used to read data from a SAP table localy or remote.
As exporting parameter, query_table is the table name.
The main tables parameters are
Table Parameter | Description |
---|---|
OPTIONS | filter the data ( where clause ) |
FIELDS | List of fields to retrieved from the table |
DATA | The data retrieved from the table |
follow the link for the complete ABAP Program to remote compare table.
For more information check the standard program:
UGMD_TABLE_DELTA_TO_TRANSPORT
SAP ISU Tables for Technical master data, for Billing Master Data, Billing and invoicing Tables?…
SAP Fiori 3 UX and Design of SAP Fiori Apps for SAP S/4HANA, SAP TechEd…
Dunning is the business practice of informing a customer of past due payment. Dunning letters…
SAP AP Tcodes & SAP AR Tcodes: House Banks Tcodes, Advance Payments or Down Payments,…
What are the main SAP Payment Terms Tables ? What are the related Tables in…
Work center consists of master data related to routing of products. It contains data related…