IF sy-subrc <> 0.
DATA(lx_return) = zcx_return2=>create_by_system_message( ).
RAISE EXCEPTION lx_return.
ENDIF.
IF sy-subrc <> 0.
"<English message text>
MESSAGE e001
"WITH iv_<variable>
INTO DATA(lv_dummy) ##NEEDED.
DATA(lx_return) = zcx_return2=>create_by_system_message( ).
RAISE EXCEPTION lx_return.
ENDIF.
DATA ls_return TYPE bapireturn.
"...BAPI call
DATA(lx_return) =
zcx_return2=>create_by_bapireturn_struc(
is_return = ls_return ).
IF lx_return IS NOT INITIAL.
RAISE EXCEPTION lx_return.
ENDIF.
DATA lt_return TYPE zcx_return2=>gtt_bapireturn_t.
"...BAPI call
DATA(lx_return) =
zcx_return2=>create_by_bapireturn_table(
it_return = lt_return ).
IF lx_return IS NOT INITIAL.
RAISE EXCEPTION lx_return.
ENDIF.
DATA ls_return TYPE bapiret1.
"...BAPI call
DATA(lx_return) =
zcx_return2=>create_by_bapiret1_struc(
is_return = ls_return ).
IF lx_return IS NOT INITIAL.
RAISE EXCEPTION lx_return.
ENDIF.
DATA:
lt_return TYPE bapiret1_tab.
"...BAPI call
DATA(lx_return) =
zcx_return2=>create_by_bapiret1_table(
it_return = lt_return ).
IF lx_return IS NOT INITIAL.
RAISE EXCEPTION lx_return.
ENDIF.
DATA ls_return TYPE bapiret2.
"...BAPI call
DATA(lx_return) =
zcx_return2=>create_by_bapiret2_struc(
is_return = ls_return ).
IF lx_return IS NOT INITIAL.
RAISE EXCEPTION lx_return.
ENDIF.
DATA:
lt_return TYPE STANDARD TABLE OF bapiret2.
"...BAPI call
DATA(lx_return) =
zcx_return2=>create_by_bapiret2_table(
it_return = lt_return ).
IF lx_return IS NOT INITIAL.
RAISE EXCEPTION lx_return.
ENDIF.
DATA lt_bdc_messages TYPE zcx_return2=>gtt_bdc_messages.
* CALL TRANSACTION '???'
* USING lt_bdcdata
* MODE '?'
* UPDATE '?'
* MESSAGES INTO lt_bdc_messages.
DATA(lx_return) =
zcx_return2=>create_by_bdc_table(
it_bdc_messages = lt_bdc_messages ).
IF lx_return IS NOT INITIAL.
RAISE EXCEPTION lx_return.
ENDIF.
TRY.
"...method call
CATCH cx_root INTO DATA(lx_root). "TODO: change exception class
"<Short error name>: &1&2&3&4
MESSAGE e001 "Todo: change error number
INTO DATA(lv_dummy).
"Method will split message text into &1 &2 &3 &4
DATA(lr_return) =
zcx_return2=>create_by_exception_object( lx_root ). "Change variable name
RAISE EXCEPTION lr_return.
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 |
---|---|
3 | |
3 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 |