The sp_SybTruncateTable Stored Procedure

The sp_SybTruncateTable stored procedure allows you to truncate tables marked for replication from SAP enterprise resource planning (ERP) or any applications by overriding the Microsoft SQL Server limitation for truncation of tables.

The SAP ERP system that uses Replication Agent for Microsoft SQL Server for replication requires the latest patch of the SAP Kernel that contains the sp_SybTruncateTable stored procedure. The SAP ERP applications require the truncate table operations to replicate the tables.

See SAP Note 1972365 – Retry on error 4711: https://css.wdf.sap.corp/sap/support/notes/1972365 for the SAP Kernel download and installation instructions.

When you issue sp_SybTruncateTable, the stored procedure turns off the replication flag for the marked tables temporarily, issues the truncate table command, and then turns on the replication flag.

You must run the sp_SybTruncateTable stored procedure for any applications, which requires truncate table operations against tables replicated by Replication Agent for Microsoft SQL Server. For example:
sys.sp_SybTruncateTable @tabname sysname(280)
where tabname refers to the table name that is truncated.

See SAP Business Suite Database as a Primary Data Server in the SAP Replication Server Heterogeneous Replication Guide.