AWS Security ChangesHomeSearch

AWS code-library high security documentation change

Service: code-library · 2026-01-25 · Security-related high

File: code-library/latest/ug/comprehend_example_comprehend_DetectPiiEntities_section.md

Summary

Added SAP ABAP code example for DetectPiiEntities operation

Security assessment

The DetectPiiEntities operation identifies sensitive personal information (PII), directly addressing data privacy and security. The example includes security-conscious error handling for text limits and unsupported languages.

Diff

diff --git a/code-library/latest/ug/comprehend_example_comprehend_DetectPiiEntities_section.md b/code-library/latest/ug/comprehend_example_comprehend_DetectPiiEntities_section.md
index 679203800..552fb48d4 100644
--- a//code-library/latest/ug/comprehend_example_comprehend_DetectPiiEntities_section.md
+++ b//code-library/latest/ug/comprehend_example_comprehend_DetectPiiEntities_section.md
@@ -216,0 +217,34 @@ There's more on GitHub. Find the complete example and learn how to set up and ru
+SAP ABAP
+    
+
+**SDK for SAP ABAP**
+    
+
+###### Note
+
+There's more on GitHub. Find the complete example and learn how to set up and run in the [AWS Code Examples Repository](https://github.com/awsdocs/aws-doc-sdk-examples/tree/main/sap-abap/services/cpd#code-examples). 
+    
+    
+        TRY.
+            oo_result = lo_cpd->detectpiientities(
+              iv_text = iv_text
+              iv_languagecode = iv_language_code
+            ).
+            MESSAGE 'PII entities detected.' TYPE 'I'.
+          CATCH /aws1/cx_cpdtextsizelmtexcdex.
+            MESSAGE 'Text size exceeds limit.' TYPE 'E'.
+          CATCH /aws1/cx_cpdunsuppedlanguageex.
+            MESSAGE 'Unsupported language.' TYPE 'E'.
+          CATCH /aws1/cx_cpdinternalserverex.
+            MESSAGE 'Internal server error occurred.' TYPE 'E'.
+          CATCH /aws1/cx_cpdinvalidrequestex.
+            MESSAGE 'Invalid request.' TYPE 'E'.
+        ENDTRY.
+    
+    
+
+  * For API details, see [DetectPiiEntities](https://docs.aws.amazon.com/sdk-for-sap-abap/v1/api/latest/index.html) in _AWS SDK for SAP ABAP API reference_. 
+
+
+
+