AWS code-library documentation change
Summary
Added SAP ABAP code example for Rekognition DetectText API
Security assessment
Routine addition of SDK code sample without security content. Contains standard API usage without security-specific handling or documentation.
Diff
diff --git a/code-library/latest/ug/rekognition_example_rekognition_DetectText_section.md b/code-library/latest/ug/rekognition_example_rekognition_DetectText_section.md index 63379b930..774366064 100644 --- a//code-library/latest/ug/rekognition_example_rekognition_DetectText_section.md +++ b//code-library/latest/ug/rekognition_example_rekognition_DetectText_section.md @@ -472,0 +473,42 @@ 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/rek#code-examples). + + + TRY. + " Create S3 object reference for the image + DATA(lo_s3object) = NEW /aws1/cl_reks3object( + iv_bucket = iv_s3_bucket + iv_name = iv_s3_key ). + + " Create image object + DATA(lo_image) = NEW /aws1/cl_rekimage( + io_s3object = lo_s3object ). + + " Detect text in the image + oo_result = lo_rek->detecttext( + io_image = lo_image ). + + DATA(lt_text_detections) = oo_result->get_textdetections( ). + DATA(lv_text_count) = lines( lt_text_detections ). + DATA(lv_msg11) = |{ lv_text_count } text detection(s) found.|. + MESSAGE lv_msg11 TYPE 'I'. + CATCH /aws1/cx_rekinvalids3objectex. + MESSAGE 'Invalid S3 object.' TYPE 'E'. + CATCH /aws1/cx_rekinvalidparameterex. + MESSAGE 'Invalid parameter value.' TYPE 'E'. + ENDTRY. + + + + * For API details, see [DetectText](https://docs.aws.amazon.com/sdk-for-sap-abap/v1/api/latest/index.html) in _AWS SDK for SAP ABAP API reference_. + + + +