Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

handle errors/exceptions in WS_DELIVERY_UPDATE_2

vsubbakrishna
Participant
0 Kudos

hi all,

I am tryng to do batch split using 'WS_DELIVERY_UPDATE_2'. it did split in few cases.

but my problem is when executing in foreground it there is error in input data the function module just throws a 'E' error and program stops.

how to handle errors/exceptions. it just stops there and i am not able to continue with the program further.

.

CALL FUNCTION 'WS_DELIVERY_UPDATE_2'

EXPORTING

vbkok_wa = it_vbkok_wa

synchron = 'X'

  • NO_MESSAGES_UPDATE_1 = ' '

commit = v_commit

delivery = v_delvry

  • UPDATE_PICKING = ' '

  • NICHT_SPERREN_1 = ' '

  • IF_CONFIRM_CENTRAL = ' '

  • IF_WMPP = ' '

  • IF_GET_DELIVERY_BUFFERED = ' '

  • IF_NO_GENERIC_SYSTEM_SERVICE = ' '

if_database_update_1 = '1'

  • IF_NO_INIT_1 = ' '

  • IF_NO_READ_1 = ' '

if_error_messages_send = 'X'

  • IF_NO_BUFFER_REFRESH = ' '

  • IT_PARTNER_UPDATE =

  • IT_SERNR_UPDATE =

  • IF_NO_REMOTE_CHG_1 = ' '

  • IF_NO_MES_UPD_PACK = ' '

  • IF_LATE_DELIVERY_UPD = ' '

IMPORTING

EF_ERROR_ANY = EF_ERROR_ANY

EF_ERROR_IN_ITEM_DELETION = EF_ERROR_IN_ITEM_DELETION

EF_ERROR_IN_POD_UPDATE = EF_ERROR_IN_POD_UPDATE

EF_ERROR_IN_INTERFACE = EF_ERROR_IN_INTERFACE

EF_ERROR_IN_GOODS_ISSUE = EF_ERROR_IN_GOODS_ISSUE

EF_ERROR_IN_FINAL_CHECK = EF_ERROR_IN_FINAL_CHECK

EF_ERROR_PARTNER_UPDATE = EF_ERROR_PARTNER_UPDATE

EF_ERROR_SERNR_UPDATE = EF_ERROR_SERNR_UPDATE

TABLES

vbpok_tab = it_vbpok_tab[]

  • PROT =

  • VERKO_TAB =

  • VERPO_TAB =

  • VBSUPCON_TAB_1 =

  • IT_VERPO_SERNR =

  • IT_PACKING =

  • IT_PACKING_SERNR =

  • IT_REPACK =

it_handling_units_1 = it_rehang[]

  • IT_OBJECTS =

ET_CREATED_HUS = it_CREATED_HUS[]

  • TVPOD_TAB =

.

if sy-subrc = '0'.

write:/ 'ok'.

else.

write:/ 'failed'.

endif.

4 REPLIES 4

Jelena
Active Contributor

Change your code to:

if_error_messages_send = space

If you send 'X' the messages are displayed, otherwise they don't. Look at the message_send_check_do routine in the FM.

Former Member

add to code:

EXCEPTIONS

error_message = 4

IF sy-subrc eq 4.

MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno

WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4 INTO g_c_mensaje.

ENDIF.

0 Kudos

It's working.

vsubbakrishna
Participant
0 Kudos

Answered!1