Application Development and Automation 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: 
Read only

Error message when using WS_DELIEVRY_UPDATE

0 Likes
3,837

I have a custom program to automate the Goods issue. The FM iam used in the custom program is WS_DELIEVRY_UPDATE.

The program is scheduled as a background job. For certain deliveries its is showing the error message.

For eg Delivery 70755489 the error message is

"Customer 116114 has not been created for sales area 310A 19 10'

When user perform goods issue by manual (VL06G) for the same delivery, there is not error about sample order delivery.

The sample order is created for 3100/11/10 sales area.

The customer defined for 3100/11/10 sales area.

What would be the cause of error? <removed by moderator>

please help .

Edited by: Thomas Zloch on Nov 18, 2010 11:58 AM - please do not offer ...

3 REPLIES 3
Read only

Former Member
0 Likes
1,683

If you're inserting this data into the FM or BAPI call, look for errors in obtaining or inserting the data. The error message looks like there's been some misalignment of data to me.

Read only

0 Likes
1,683
  • Automatic confirmation of TOs related to Delivery:

vbkok_wa-vbeln_vl = valdat_final_wa-vbeln.

vbkok_wa-wabuc = gc_x.

CALL FUNCTION 'WS_DELIVERY_UPDATE'

EXPORTING

vbkok_wa = vbkok_wa

delivery = valdat_final_wa-vbeln

TABLES

prot = i_prott.

IF sy-subrc EQ 0 AND i_prott[] IS INITIAL.

COMMIT WORK.

ELSE.

  • Roll Back the work.

ROLLBACK WORK.

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

WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4

INTO msg_tmp.

ENDIF.

No other data is passed to the FM.. What would be eeror.. The error comes from the FM .

Can anyone help on this?

Read only

Former Member
0 Likes
1,683

Hi,

Have you found any solution?

I have a similar problem and the "ROLLBACK WORK" instruction doesn;t work.

The function WS_DELIVERY_UPDATE is returning no errors but the prot table contains errors.

The rollback doesn't perform the real rollback. Some information like the "Actual GI date" is not reset to the original value. It kept the new value.

ls_vbkok-vbeln_vl        = iv_vbeln.
ls_vbkok-wadat            = iv_datum.
ls_vbkok-WADAT_IST = sy-datum.
ls_vbkok-KZWAD         = 'X'.
ls_vbkok-wabuc           = 'X'.            " Post good issue

CALL FUNCTION 'WS_DELIVERY_UPDATE'
    EXPORTING
      vbkok_wa                = ls_vbkok
      commit                     = 'X'
      delivery                    = iv_vbeln
    IMPORTING
      ef_error_any_0              = lv_any
      ef_error_in_item_deletion_0 = lv_itmdel
      ef_error_in_pod_update_0    = lv_pod
      ef_error_in_interface_0     = lv_interf
      ef_error_in_goods_issue_0   = lv_goods
      ef_error_in_final_check_0   = lv_final
      ef_error_partner_update     = lv_partnr
      ef_error_sernr_update       = lv_serial
    TABLES
      prot                        = lt_prot
    EXCEPTIONS
      error_message               = 1.

  IF sy-subrc NE 0 OR lt_prot IS NOT INITIAL.
    READ TABLE lt_prot INTO ls_prot WITH KEY msgty = 'E'.
    IF sy-subrc = 0.
      ROLLBACK WORK.
    ENDIF.

    MOVE sy-msgty TO ls_return-type.
    MOVE sy-msgid TO ls_return-id.
    MOVE sy-msgno TO ls_return-number.
    CALL FUNCTION 'BAPI_MESSAGE_GETDETAIL'
      EXPORTING
        id         = ls_return-id
        number     = ls_return-number
        language   = sy-langu
        textformat = 'SCR'
        message_v1 = sy-msgv1
        message_v2 = sy-msgv2
        message_v3 = sy-msgv3
        message_v4 = sy-msgv4
      IMPORTING
        message    = ls_return-message.

    APPEND ls_return TO et_return.

  ENDIF.

When I am looking to the delivery, the "Actual GI date" is assigned to the current date. Using "ROLLBACK WORK" instruction, I was expecting the have all the delivery data return to the same state before calling the function "WS_DELIVERY_UPDATE".

How can we make the "ROLLBACK WORK" instruction work?

Regards

dstj