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: 

Suppressing errors in WS_DELIVERY_UPDATE_2

abo
Active Contributor
0 Kudos
1,182

I have adapted this example and it seems to work correctly when there is no error (duh!).

Problem is, when WS_DELIVERY_UPDATE_2 goes belly up the error message is displayed in the bar and that's a big no-no for my use case in a handheld scanner. I even tried this suggestion from jelena.perfiljeva2 although this system is probably way more recent than the comment.

Maybe I am doing something else wrong, but neither space nor abap_false have any effect here: HUGENERAL 075 is still being displayed in the bar.

The invocation of the function is as follows:

    CALL FUNCTION 'WS_DELIVERY_UPDATE_2'
EXPORTING
vbkok_wa = ls_vbkok_wa
delivery = pi_vbeln
update_picking = abap_true
no_messages_update_1 = abap_true
synchron = abap_true
commit = ' '
nicht_sperren_1 = 'Y'
if_database_update_1 = '1'
if_error_messages_send = space
TABLES
prot = lt_prot
verko_tab = lt_verko
verpo_tab = lt_verpo.
1 ACCEPTED SOLUTION

DominikTylczyn
Active Contributor
976

Hello c5e08e0478aa4727abc4482f5be390b2

Have you tried to call WS_DELIVERY_UPDATE_2 with

        EXCEPTIONS
          error_message           = 1
          OTHERS                  = 2.

That is how the function is often called in SAP standard code. This way you should be able to catch all error messages and exceptions.

Best regards

Dominik Tylczynski

2 REPLIES 2

DominikTylczyn
Active Contributor
977

Hello c5e08e0478aa4727abc4482f5be390b2

Have you tried to call WS_DELIVERY_UPDATE_2 with

        EXCEPTIONS
          error_message           = 1
          OTHERS                  = 2.

That is how the function is often called in SAP standard code. This way you should be able to catch all error messages and exceptions.

Best regards

Dominik Tylczynski

abo
Active Contributor
976

It worked, thanks 🙂