Exemples de DynamoDB utilisant le SDK pour SAP ABAP - AWS Exemples de code SDK

D'autres exemples de AWS SDK sont disponibles dans le référentiel AWS Doc SDK Examples GitHub .

Les traductions sont fournies par des outils de traduction automatique. En cas de conflit entre le contenu d'une traduction et celui de la version originale en anglais, la version anglaise prévaudra.

Exemples de DynamoDB utilisant le SDK pour SAP ABAP

Les exemples de code suivants vous montrent comment effectuer des actions et implémenter des scénarios courants à l'aide du AWS SDK pour SAP ABAP avec DynamoDB.

Les actions sont des extraits de code de programmes plus larges et doivent être exécutées dans leur contexte. Alors que les actions vous indiquent comment appeler des fonctions de service individuelles, vous pouvez les voir en contexte dans leurs scénarios associés et dans des exemples interservices.

Les Scénarios sont des exemples de code qui vous montrent comment accomplir une tâche spécifique en appelant plusieurs fonctions au sein d’un même service.

Chaque exemple inclut un lien vers GitHub, où vous pouvez trouver des instructions sur la façon de configurer et d'exécuter le code en contexte.

Actions

L'exemple de code suivant montre comment utiliserCreateTable.

Kit SDK pour SAP ABAP
Note

Il y en a plus à ce sujet GitHub. Trouvez l'exemple complet et découvrez comment le configurer et l'exécuter dans le référentiel d'exemples de code AWS.

TRY. DATA(lt_keyschema) = VALUE /aws1/cl_dynkeyschemaelement=>tt_keyschema( ( NEW /aws1/cl_dynkeyschemaelement( iv_attributename = 'year' iv_keytype = 'HASH' ) ) ( NEW /aws1/cl_dynkeyschemaelement( iv_attributename = 'title' iv_keytype = 'RANGE' ) ) ). DATA(lt_attributedefinitions) = VALUE /aws1/cl_dynattributedefn=>tt_attributedefinitions( ( NEW /aws1/cl_dynattributedefn( iv_attributename = 'year' iv_attributetype = 'N' ) ) ( NEW /aws1/cl_dynattributedefn( iv_attributename = 'title' iv_attributetype = 'S' ) ) ). " Adjust read/write capacities as desired. DATA(lo_dynprovthroughput) = NEW /aws1/cl_dynprovthroughput( iv_readcapacityunits = 5 iv_writecapacityunits = 5 ). oo_result = lo_dyn->createtable( it_keyschema = lt_keyschema iv_tablename = iv_table_name it_attributedefinitions = lt_attributedefinitions io_provisionedthroughput = lo_dynprovthroughput ). " Table creation can take some time. Wait till table exists before returning. lo_dyn->get_waiter( )->tableexists( iv_max_wait_time = 200 iv_tablename = iv_table_name ). MESSAGE 'DynamoDB Table' && iv_table_name && 'created.' TYPE 'I'. " This exception can happen if the table already exists. CATCH /aws1/cx_dynresourceinuseex INTO DATA(lo_resourceinuseex). DATA(lv_error) = |"{ lo_resourceinuseex->av_err_code }" - { lo_resourceinuseex->av_err_msg }|. MESSAGE lv_error TYPE 'E'. ENDTRY.
  • Pour plus de détails sur l'API, consultez CreateTablela section de référence du AWS SDK pour l'API SAP ABAP.

L'exemple de code suivant montre comment utiliserDeleteItem.

Kit SDK pour SAP ABAP
Note

Il y en a plus à ce sujet GitHub. Trouvez l'exemple complet et découvrez comment le configurer et l'exécuter dans le référentiel d'exemples de code AWS.

TRY. DATA(lo_resp) = lo_dyn->deleteitem( iv_tablename = iv_table_name it_key = it_key_input ). MESSAGE 'Deleted one item.' TYPE 'I'. CATCH /aws1/cx_dyncondalcheckfaile00. MESSAGE 'A condition specified in the operation could not be evaluated.' TYPE 'E'. CATCH /aws1/cx_dynresourcenotfoundex. MESSAGE 'The table or index does not exist' TYPE 'E'. CATCH /aws1/cx_dyntransactconflictex. MESSAGE 'Another transaction is using the item' TYPE 'E'. ENDTRY.
  • Pour plus de détails sur l'API, consultez DeleteItemla section de référence du AWS SDK pour l'API SAP ABAP.

L'exemple de code suivant montre comment utiliserDeleteTable.

Kit SDK pour SAP ABAP
Note

Il y en a plus à ce sujet GitHub. Trouvez l'exemple complet et découvrez comment le configurer et l'exécuter dans le référentiel d'exemples de code AWS.

TRY. lo_dyn->deletetable( iv_tablename = iv_table_name ). " Wait till the table is actually deleted. lo_dyn->get_waiter( )->tablenotexists( iv_max_wait_time = 200 iv_tablename = iv_table_name ). MESSAGE 'Table ' && iv_table_name && ' deleted.' TYPE 'I'. CATCH /aws1/cx_dynresourcenotfoundex. MESSAGE 'The table ' && iv_table_name && ' does not exist' TYPE 'E'. CATCH /aws1/cx_dynresourceinuseex. MESSAGE 'The table cannot be deleted since it is in use' TYPE 'E'. ENDTRY.
  • Pour plus de détails sur l'API, consultez DeleteTablela section de référence du AWS SDK pour l'API SAP ABAP.

L'exemple de code suivant montre comment utiliserDescribeTable.

Kit SDK pour SAP ABAP
Note

Il y en a plus à ce sujet GitHub. Trouvez l'exemple complet et découvrez comment le configurer et l'exécuter dans le référentiel d'exemples de code AWS.

TRY. oo_result = lo_dyn->describetable( iv_tablename = iv_table_name ). DATA(lv_tablename) = oo_result->get_table( )->ask_tablename( ). DATA(lv_tablearn) = oo_result->get_table( )->ask_tablearn( ). DATA(lv_tablestatus) = oo_result->get_table( )->ask_tablestatus( ). DATA(lv_itemcount) = oo_result->get_table( )->ask_itemcount( ). MESSAGE 'The table name is ' && lv_tablename && '. The table ARN is ' && lv_tablearn && '. The tablestatus is ' && lv_tablestatus && '. Item count is ' && lv_itemcount TYPE 'I'. CATCH /aws1/cx_dynresourcenotfoundex. MESSAGE 'The table ' && lv_tablename && ' does not exist' TYPE 'E'. ENDTRY.
  • Pour plus de détails sur l'API, consultez DescribeTablela section de référence du AWS SDK pour l'API SAP ABAP.

L'exemple de code suivant montre comment utiliserGetItem.

Kit SDK pour SAP ABAP
Note

Il y en a plus à ce sujet GitHub. Trouvez l'exemple complet et découvrez comment le configurer et l'exécuter dans le référentiel d'exemples de code AWS.

TRY. oo_item = lo_dyn->getitem( iv_tablename = iv_table_name it_key = it_key ). DATA(lt_attr) = oo_item->get_item( ). DATA(lo_title) = lt_attr[ key = 'title' ]-value. DATA(lo_year) = lt_attr[ key = 'year' ]-value. DATA(lo_rating) = lt_attr[ key = 'rating' ]-value. MESSAGE 'Movie name is: ' && lo_title->get_s( ) && 'Movie year is: ' && lo_year->get_n( ) && 'Moving rating is: ' && lo_rating->get_n( ) TYPE 'I'. CATCH /aws1/cx_dynresourcenotfoundex. MESSAGE 'The table or index does not exist' TYPE 'E'. ENDTRY.
  • Pour plus de détails sur l'API, consultez GetItemla section de référence du AWS SDK pour l'API SAP ABAP.

L'exemple de code suivant montre comment utiliserListTables.

Kit SDK pour SAP ABAP
Note

Il y en a plus à ce sujet GitHub. Trouvez l'exemple complet et découvrez comment le configurer et l'exécuter dans le référentiel d'exemples de code AWS.

TRY. oo_result = lo_dyn->listtables( ). " You can loop over the oo_result to get table properties like this. LOOP AT oo_result->get_tablenames( ) INTO DATA(lo_table_name). DATA(lv_tablename) = lo_table_name->get_value( ). ENDLOOP. DATA(lv_tablecount) = lines( oo_result->get_tablenames( ) ). MESSAGE 'Found ' && lv_tablecount && ' tables' TYPE 'I'. CATCH /aws1/cx_rt_service_generic INTO DATA(lo_exception). DATA(lv_error) = |"{ lo_exception->av_err_code }" - { lo_exception->av_err_msg }|. MESSAGE lv_error TYPE 'E'. ENDTRY.
  • Pour plus de détails sur l'API, consultez ListTablesla section de référence du AWS SDK pour l'API SAP ABAP.

L'exemple de code suivant montre comment utiliserPutItem.

Kit SDK pour SAP ABAP
Note

Il y en a plus à ce sujet GitHub. Trouvez l'exemple complet et découvrez comment le configurer et l'exécuter dans le référentiel d'exemples de code AWS.

TRY. DATA(lo_resp) = lo_dyn->putitem( iv_tablename = iv_table_name it_item = it_item ). MESSAGE '1 row inserted into DynamoDB Table' && iv_table_name TYPE 'I'. CATCH /aws1/cx_dyncondalcheckfaile00. MESSAGE 'A condition specified in the operation could not be evaluated.' TYPE 'E'. CATCH /aws1/cx_dynresourcenotfoundex. MESSAGE 'The table or index does not exist' TYPE 'E'. CATCH /aws1/cx_dyntransactconflictex. MESSAGE 'Another transaction is using the item' TYPE 'E'. ENDTRY.
  • Pour plus de détails sur l'API, consultez PutItemla section de référence du AWS SDK pour l'API SAP ABAP.

L'exemple de code suivant montre comment utiliserQuery.

Kit SDK pour SAP ABAP
Note

Il y en a plus à ce sujet GitHub. Trouvez l'exemple complet et découvrez comment le configurer et l'exécuter dans le référentiel d'exemples de code AWS.

TRY. " Query movies for a given year . DATA(lt_attributelist) = VALUE /aws1/cl_dynattributevalue=>tt_attributevaluelist( ( NEW /aws1/cl_dynattributevalue( iv_n = |{ iv_year }| ) ) ). DATA(lt_key_conditions) = VALUE /aws1/cl_dyncondition=>tt_keyconditions( ( VALUE /aws1/cl_dyncondition=>ts_keyconditions_maprow( key = 'year' value = NEW /aws1/cl_dyncondition( it_attributevaluelist = lt_attributelist iv_comparisonoperator = |EQ| ) ) ) ). oo_result = lo_dyn->query( iv_tablename = iv_table_name it_keyconditions = lt_key_conditions ). DATA(lt_items) = oo_result->get_items( ). "You can loop over the results to get item attributes. LOOP AT lt_items INTO DATA(lt_item). DATA(lo_title) = lt_item[ key = 'title' ]-value. DATA(lo_year) = lt_item[ key = 'year' ]-value. ENDLOOP. DATA(lv_count) = oo_result->get_count( ). MESSAGE 'Item count is: ' && lv_count TYPE 'I'. CATCH /aws1/cx_dynresourcenotfoundex. MESSAGE 'The table or index does not exist' TYPE 'E'. ENDTRY.
  • Pour plus d'informations sur l'API, consultez Query dans le guide de référence d'API du kit SDK AWS pour SAP ABAP.

L'exemple de code suivant montre comment utiliserScan.

Kit SDK pour SAP ABAP
Note

Il y en a plus à ce sujet GitHub. Trouvez l'exemple complet et découvrez comment le configurer et l'exécuter dans le référentiel d'exemples de code AWS.

TRY. " Scan movies for rating greater than or equal to the rating specified DATA(lt_attributelist) = VALUE /aws1/cl_dynattributevalue=>tt_attributevaluelist( ( NEW /aws1/cl_dynattributevalue( iv_n = |{ iv_rating }| ) ) ). DATA(lt_filter_conditions) = VALUE /aws1/cl_dyncondition=>tt_filterconditionmap( ( VALUE /aws1/cl_dyncondition=>ts_filterconditionmap_maprow( key = 'rating' value = NEW /aws1/cl_dyncondition( it_attributevaluelist = lt_attributelist iv_comparisonoperator = |GE| ) ) ) ). oo_scan_result = lo_dyn->scan( iv_tablename = iv_table_name it_scanfilter = lt_filter_conditions ). DATA(lt_items) = oo_scan_result->get_items( ). LOOP AT lt_items INTO DATA(lo_item). " You can loop over to get individual attributes. DATA(lo_title) = lo_item[ key = 'title' ]-value. DATA(lo_year) = lo_item[ key = 'year' ]-value. ENDLOOP. DATA(lv_count) = oo_scan_result->get_count( ). MESSAGE 'Found ' && lv_count && ' items' TYPE 'I'. CATCH /aws1/cx_dynresourcenotfoundex. MESSAGE 'The table or index does not exist' TYPE 'E'. ENDTRY.
  • Pour plus d'informations sur l'API, consultez Scan dans le guide de référence d'API du kit SDK AWS pour SAP ABAP.

L'exemple de code suivant montre comment utiliserUpdateItem.

Kit SDK pour SAP ABAP
Note

Il y en a plus à ce sujet GitHub. Trouvez l'exemple complet et découvrez comment le configurer et l'exécuter dans le référentiel d'exemples de code AWS.

TRY. oo_output = lo_dyn->updateitem( iv_tablename = iv_table_name it_key = it_item_key it_attributeupdates = it_attribute_updates ). MESSAGE '1 item updated in DynamoDB Table' && iv_table_name TYPE 'I'. CATCH /aws1/cx_dyncondalcheckfaile00. MESSAGE 'A condition specified in the operation could not be evaluated.' TYPE 'E'. CATCH /aws1/cx_dynresourcenotfoundex. MESSAGE 'The table or index does not exist' TYPE 'E'. CATCH /aws1/cx_dyntransactconflictex. MESSAGE 'Another transaction is using the item' TYPE 'E'. ENDTRY.
  • Pour plus de détails sur l'API, consultez UpdateItemla section de référence du AWS SDK pour l'API SAP ABAP.

Scénarios

L’exemple de code suivant illustre comment :

  • Créez une table pouvant contenir des données vidéo.

  • Insérer, récupérez et mettez à jour un seul film dans la table.

  • Écrivez des données vidéo dans la table à partir d'un exemple de fichier JSON.

  • Recherchez les films sortis au cours d'une année donnée.

  • Recherchez les films sortis au cours d'une plage d'années spécifique.

  • Supprimez un film de la table, puis supprimez la table.

Kit SDK pour SAP ABAP
Note

Il y en a plus à ce sujet GitHub. Trouvez l’exemple complet et découvrez comment le configurer et l’exécuter dans le référentiel d’exemples de code AWS.

" Create an Amazon Dynamo DB table. TRY. DATA(lo_session) = /aws1/cl_rt_session_aws=>create( cv_pfl ). DATA(lo_dyn) = /aws1/cl_dyn_factory=>create( lo_session ). DATA(lt_keyschema) = VALUE /aws1/cl_dynkeyschemaelement=>tt_keyschema( ( NEW /aws1/cl_dynkeyschemaelement( iv_attributename = 'year' iv_keytype = 'HASH' ) ) ( NEW /aws1/cl_dynkeyschemaelement( iv_attributename = 'title' iv_keytype = 'RANGE' ) ) ). DATA(lt_attributedefinitions) = VALUE /aws1/cl_dynattributedefn=>tt_attributedefinitions( ( NEW /aws1/cl_dynattributedefn( iv_attributename = 'year' iv_attributetype = 'N' ) ) ( NEW /aws1/cl_dynattributedefn( iv_attributename = 'title' iv_attributetype = 'S' ) ) ). " Adjust read/write capacities as desired. DATA(lo_dynprovthroughput) = NEW /aws1/cl_dynprovthroughput( iv_readcapacityunits = 5 iv_writecapacityunits = 5 ). DATA(oo_result) = lo_dyn->createtable( it_keyschema = lt_keyschema iv_tablename = iv_table_name it_attributedefinitions = lt_attributedefinitions io_provisionedthroughput = lo_dynprovthroughput ). " Table creation can take some time. Wait till table exists before returning. lo_dyn->get_waiter( )->tableexists( iv_max_wait_time = 200 iv_tablename = iv_table_name ). MESSAGE 'DynamoDB Table' && iv_table_name && 'created.' TYPE 'I'. " It throws exception if the table already exists. CATCH /aws1/cx_dynresourceinuseex INTO DATA(lo_resourceinuseex). DATA(lv_error) = |"{ lo_resourceinuseex->av_err_code }" - { lo_resourceinuseex->av_err_msg }|. MESSAGE lv_error TYPE 'E'. ENDTRY. " Describe table TRY. DATA(lo_table) = lo_dyn->describetable( iv_tablename = iv_table_name ). DATA(lv_tablename) = lo_table->get_table( )->ask_tablename( ). MESSAGE 'The table name is ' && lv_tablename TYPE 'I'. CATCH /aws1/cx_dynresourcenotfoundex. MESSAGE 'The table does not exist' TYPE 'E'. ENDTRY. " Put items into the table. TRY. DATA(lo_resp_putitem) = lo_dyn->putitem( iv_tablename = iv_table_name it_item = VALUE /aws1/cl_dynattributevalue=>tt_putiteminputattributemap( ( VALUE /aws1/cl_dynattributevalue=>ts_putiteminputattrmap_maprow( key = 'title' value = NEW /aws1/cl_dynattributevalue( iv_s = 'Jaws' ) ) ) ( VALUE /aws1/cl_dynattributevalue=>ts_putiteminputattrmap_maprow( key = 'year' value = NEW /aws1/cl_dynattributevalue( iv_n = |{ '1975' }| ) ) ) ( VALUE /aws1/cl_dynattributevalue=>ts_putiteminputattrmap_maprow( key = 'rating' value = NEW /aws1/cl_dynattributevalue( iv_n = |{ '7.5' }| ) ) ) ) ). lo_resp_putitem = lo_dyn->putitem( iv_tablename = iv_table_name it_item = VALUE /aws1/cl_dynattributevalue=>tt_putiteminputattributemap( ( VALUE /aws1/cl_dynattributevalue=>ts_putiteminputattrmap_maprow( key = 'title' value = NEW /aws1/cl_dynattributevalue( iv_s = 'Star Wars' ) ) ) ( VALUE /aws1/cl_dynattributevalue=>ts_putiteminputattrmap_maprow( key = 'year' value = NEW /aws1/cl_dynattributevalue( iv_n = |{ '1978' }| ) ) ) ( VALUE /aws1/cl_dynattributevalue=>ts_putiteminputattrmap_maprow( key = 'rating' value = NEW /aws1/cl_dynattributevalue( iv_n = |{ '8.1' }| ) ) ) ) ). lo_resp_putitem = lo_dyn->putitem( iv_tablename = iv_table_name it_item = VALUE /aws1/cl_dynattributevalue=>tt_putiteminputattributemap( ( VALUE /aws1/cl_dynattributevalue=>ts_putiteminputattrmap_maprow( key = 'title' value = NEW /aws1/cl_dynattributevalue( iv_s = 'Speed' ) ) ) ( VALUE /aws1/cl_dynattributevalue=>ts_putiteminputattrmap_maprow( key = 'year' value = NEW /aws1/cl_dynattributevalue( iv_n = |{ '1994' }| ) ) ) ( VALUE /aws1/cl_dynattributevalue=>ts_putiteminputattrmap_maprow( key = 'rating' value = NEW /aws1/cl_dynattributevalue( iv_n = |{ '7.9' }| ) ) ) ) ). " TYPE REF TO ZCL_AWS1_dyn_PUT_ITEM_OUTPUT MESSAGE '3 rows inserted into DynamoDB Table' && iv_table_name TYPE 'I'. CATCH /aws1/cx_dyncondalcheckfaile00. MESSAGE 'A condition specified in the operation could not be evaluated.' TYPE 'E'. CATCH /aws1/cx_dynresourcenotfoundex. MESSAGE 'The table or index does not exist' TYPE 'E'. CATCH /aws1/cx_dyntransactconflictex. MESSAGE 'Another transaction is using the item' TYPE 'E'. ENDTRY. " Get item from table. TRY. DATA(lo_resp_getitem) = lo_dyn->getitem( iv_tablename = iv_table_name it_key = VALUE /aws1/cl_dynattributevalue=>tt_key( ( VALUE /aws1/cl_dynattributevalue=>ts_key_maprow( key = 'title' value = NEW /aws1/cl_dynattributevalue( iv_s = 'Jaws' ) ) ) ( VALUE /aws1/cl_dynattributevalue=>ts_key_maprow( key = 'year' value = NEW /aws1/cl_dynattributevalue( iv_n = '1975' ) ) ) ) ). DATA(lt_attr) = lo_resp_getitem->get_item( ). DATA(lo_title) = lt_attr[ key = 'title' ]-value. DATA(lo_year) = lt_attr[ key = 'year' ]-value. DATA(lo_rating) = lt_attr[ key = 'year' ]-value. MESSAGE 'Movie name is: ' && lo_title->get_s( ) TYPE 'I'. MESSAGE 'Movie year is: ' && lo_year->get_n( ) TYPE 'I'. MESSAGE 'Movie rating is: ' && lo_rating->get_n( ) TYPE 'I'. CATCH /aws1/cx_dynresourcenotfoundex. MESSAGE 'The table or index does not exist' TYPE 'E'. ENDTRY. " Query item from table. TRY. DATA(lt_attributelist) = VALUE /aws1/cl_dynattributevalue=>tt_attributevaluelist( ( NEW /aws1/cl_dynattributevalue( iv_n = '1975' ) ) ). DATA(lt_keyconditions) = VALUE /aws1/cl_dyncondition=>tt_keyconditions( ( VALUE /aws1/cl_dyncondition=>ts_keyconditions_maprow( key = 'year' value = NEW /aws1/cl_dyncondition( it_attributevaluelist = lt_attributelist iv_comparisonoperator = |EQ| ) ) ) ). DATA(lo_query_result) = lo_dyn->query( iv_tablename = iv_table_name it_keyconditions = lt_keyconditions ). DATA(lt_items) = lo_query_result->get_items( ). READ TABLE lo_query_result->get_items( ) INTO DATA(lt_item) INDEX 1. lo_title = lt_item[ key = 'title' ]-value. lo_year = lt_item[ key = 'year' ]-value. lo_rating = lt_item[ key = 'rating' ]-value. MESSAGE 'Movie name is: ' && lo_title->get_s( ) TYPE 'I'. MESSAGE 'Movie year is: ' && lo_year->get_n( ) TYPE 'I'. MESSAGE 'Movie rating is: ' && lo_rating->get_n( ) TYPE 'I'. CATCH /aws1/cx_dynresourcenotfoundex. MESSAGE 'The table or index does not exist' TYPE 'E'. ENDTRY. " Scan items from table. TRY. DATA(lo_scan_result) = lo_dyn->scan( iv_tablename = iv_table_name ). lt_items = lo_scan_result->get_items( ). " Read the first item and display the attributes. READ TABLE lo_query_result->get_items( ) INTO lt_item INDEX 1. lo_title = lt_item[ key = 'title' ]-value. lo_year = lt_item[ key = 'year' ]-value. lo_rating = lt_item[ key = 'rating' ]-value. MESSAGE 'Movie name is: ' && lo_title->get_s( ) TYPE 'I'. MESSAGE 'Movie year is: ' && lo_year->get_n( ) TYPE 'I'. MESSAGE 'Movie rating is: ' && lo_rating->get_n( ) TYPE 'I'. CATCH /aws1/cx_dynresourcenotfoundex. MESSAGE 'The table or index does not exist' TYPE 'E'. ENDTRY. " Update items from table. TRY. DATA(lt_attributeupdates) = VALUE /aws1/cl_dynattrvalueupdate=>tt_attributeupdates( ( VALUE /aws1/cl_dynattrvalueupdate=>ts_attributeupdates_maprow( key = 'rating' value = NEW /aws1/cl_dynattrvalueupdate( io_value = NEW /aws1/cl_dynattributevalue( iv_n = '7.6' ) iv_action = |PUT| ) ) ) ). DATA(lt_key) = VALUE /aws1/cl_dynattributevalue=>tt_key( ( VALUE /aws1/cl_dynattributevalue=>ts_key_maprow( key = 'year' value = NEW /aws1/cl_dynattributevalue( iv_n = '1975' ) ) ) ( VALUE /aws1/cl_dynattributevalue=>ts_key_maprow( key = 'title' value = NEW /aws1/cl_dynattributevalue( iv_s = '1980' ) ) ) ). DATA(lo_resp) = lo_dyn->updateitem( iv_tablename = iv_table_name it_key = lt_key it_attributeupdates = lt_attributeupdates ). MESSAGE '1 item updated in DynamoDB Table' && iv_table_name TYPE 'I'. CATCH /aws1/cx_dyncondalcheckfaile00. MESSAGE 'A condition specified in the operation could not be evaluated.' TYPE 'E'. CATCH /aws1/cx_dynresourcenotfoundex. MESSAGE 'The table or index does not exist' TYPE 'E'. CATCH /aws1/cx_dyntransactconflictex. MESSAGE 'Another transaction is using the item' TYPE 'E'. ENDTRY. " Delete table. TRY. lo_dyn->deletetable( iv_tablename = iv_table_name ). lo_dyn->get_waiter( )->tablenotexists( iv_max_wait_time = 200 iv_tablename = iv_table_name ). MESSAGE 'DynamoDB Table deleted.' TYPE 'I'. CATCH /aws1/cx_dynresourcenotfoundex. MESSAGE 'The table or index does not exist' TYPE 'E'. CATCH /aws1/cx_dynresourceinuseex. MESSAGE 'The table cannot be deleted as it is in use' TYPE 'E'. ENDTRY.