TRY.
"Execute methods
"...
"Commit
"zca_db_transaction->commit( ).
CATCH zcx_return2 INTO DATA(lx_return).
"zca_db_transaction->roll_back( ).
"Handle exception lx_return
RAISE EXCEPTION lx_return.
ENDTRY.
TRY.
"...instiantiate object and call methods
"Commit work (if needed)
"zca_db_transaction->commit( ).
CATCH zcx_return2 INTO DATA(lx_return).
"Roll back (if needed)
"zca_db_transaction->rollback( ).
"Handle exception
DATA(ls_return) = lx_return->get_bapiret2_struc( ).
DATA(ls_message) = VALUE scx_t100key(
msgid = ls_return-id
msgno = ls_return-number
attr1 = ls_return-message_v1
attr2 = ls_return-message_v2
attr3 = ls_return-message_v3
attr4 = ls_return-message_v4 ).
RAISE EXCEPTION TYPE /iwbep/cx_mgw_busi_exception
EXPORTING
textid = ls_message.
ENDTRY.
TRY.
"...
"Commit work (if needed)
"zca_db_transaction->commit( ).
CATCH zcx_return2 INTO DATA(lx_return).
"Roll back (if needed)
"zca_db_transaction->rollback( ).
"Fill proxy exception message
DATA(lt_bapiret2) = lx_return->get_bapiret2_table( ).
cl_proxy_fault=>raise(
EXPORTING
exception_class_name = 'ZWMSCX_EXCHANGE_FAULT3' "Change
bapireturn_tab = lt_bapiret2 ).
ENDTRY.
TRY.
"...instiantiate object and call methods
"Commit work (if needed)
"zca_db_transaction->commit( ).
CATCH zcx_return2 INTO DATA(lx_return).
"Roll back (if needed)
"zca_db_transaction->rollback( ).
DATA(ls_return) = lx_return->get_bapiret2_struc( ).
MESSAGE
ID ls_return-id
TYPE ls_return-type
NUMBER ls_return-number
RAISING error
WITH ls_return-message_v1
ls_return-message_v2
ls_return-message_v3
ls_return-message_v4.
ENDTRY.
TRY.
"...
"Commit work (if needed)
"zca_db_transaction->commit( ).
CATCH zcx_return2 INTO DATA(lx_return).
"Roll back (if needed)
"zca_db_transaction->rollback( ).
"Fill return table
et_return = lx_return->get_bapiret2_table( ).
ENDTRY.
TRY.
"...
CATCH zcx_return2 INTO DATA(lx_return).
DATA(ls_return) = lx_return->get_bapiret2_struc( ).
MESSAGE
ID ls_return-id
TYPE ls_return-type
NUMBER ls_return-number
WITH ls_return-message_v1
ls_return-message_v2
ls_return-message_v3
ls_return-message_v4.
ENDTRY.
TRY.
"...
CATCH zcx_return INTO DATA(lx_return).
DATA(lx_return2) = zcx_return2=>create_by_bapiret2_table( lx_return->get_bapiret2_table( ) ).
RAISE EXCEPTION lx_return2.
ENDTRY.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
5 | |
5 | |
4 | |
3 | |
3 | |
2 | |
2 | |
2 | |
1 | |
1 |