AWS Security ChangesHomeSearch

AWS code-library documentation change

Service: code-library · 2026-01-25 · Documentation low

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

Summary

Added SAP ABAP code example for creating Step Functions state machines

Security assessment

Routine addition of SDK examples with standard error handling. No security-specific content or vulnerability fixes are present in the change.

Diff

diff --git a/code-library/latest/ug/sfn_example_sfn_CreateStateMachine_section.md b/code-library/latest/ug/sfn_example_sfn_CreateStateMachine_section.md
index aeb0c7066..81ba91a62 100644
--- a//code-library/latest/ug/sfn_example_sfn_CreateStateMachine_section.md
+++ b//code-library/latest/ug/sfn_example_sfn_CreateStateMachine_section.md
@@ -189,0 +190,36 @@ 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/sfn#code-examples). 
+    
+    
+        TRY.
+            DATA(lo_result) = lo_sfn->createstatemachine(
+              iv_name = iv_name
+              iv_definition = iv_definition
+              iv_rolearn = iv_role_arn
+            ).
+            ov_state_machine_arn = lo_result->get_statemachinearn( ).
+            MESSAGE 'State machine created successfully.' TYPE 'I'.
+          CATCH /aws1/cx_sfnstatemachinealrex.
+            MESSAGE 'State machine already exists.' TYPE 'E'.
+          CATCH /aws1/cx_sfninvaliddefinition.
+            MESSAGE 'Invalid state machine definition.' TYPE 'E'.
+          CATCH /aws1/cx_sfninvalidname.
+            MESSAGE 'Invalid state machine name.' TYPE 'E'.
+          CATCH /aws1/cx_sfninvalidarn.
+            MESSAGE 'Invalid role ARN.' TYPE 'E'.
+        ENDTRY.
+    
+    
+
+  * For API details, see [CreateStateMachine](https://docs.aws.amazon.com/sdk-for-sap-abap/v1/api/latest/index.html) in _AWS SDK for SAP ABAP API reference_. 
+
+
+
+