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: 

Error VL216 when using SD_DELIVERY_UPDATE_PICKING via IDOC

former_member206632
Participant
0 Kudos

Hello,

I'm trying to use SD_DELIVERY_UPDATE_PICKING to set the picking quantity of a set of delivery items to ZERO. The code is as simple as this:

CLEAR:

ls_vbkok_wa,

lt_vbpok_tab[].

ls_vbkok_wa-vbeln_vl  = lv_delivery.

ls_vbkok_wa-vbtyp_vl  = 'J'.

ls_vbkok_wa-vbeln     = lv_delivery.

LOOP AT lt_lips.

  CLEAR:

   ls_vbpok_tab.

   ls_vbpok_tab-vbeln_vl = lv_delivery.

   ls_vbpok_tab-posnr_vl = lt_lips-posnr.

   ls_vbpok_tab-vbeln    = lv_delivery.

   ls_vbpok_tab-posnn    = lt_lips-posnr.

   ls_vbpok_tab-pikmg    = 0.


   APPEND ls_vbpok_tab TO lt_vbpok_tab.

ENDLOOP.

CALL FUNCTION 'SD_DELIVERY_UPDATE_PICKING'

  EXPORTING

    vbkok_wa  = ls_vbkok_wa

*  SYNCHRON  = 'X'

*  NO_MESSAGES_UPDATE           = 'X'

    NICHT_SPERREN                = 'X'

*  AUFRUFER_T                   = ' '

    IF_ERROR_MESSAGES_SEND       = 'X'

  TABLES

    vbpok_tab = lt_vbpok_tab

    PROT                         = lt_prot.



Here's my problem:


  • Using SE37 the FM works fine;
  • Using this chunk of code in another FM that is called by an IDOC, I get error VL216 - Item 10 does not exist;


Can someone help me? Why do I get a different behaviour when the FM is called via IDOC?


Regards,


João

2 REPLIES 2

Lakshmipathi
Active Contributor
0 Kudos

Moved from SAP ERP SD Sales to ABAP Development.

former_member206632
Participant
0 Kudos

Hello,

Question marked as answered since the problem is due to the use of some FM's after the PGI cancellation using WS_REVERSE_GOODS_ISSUE.

Now following these threads:

Regards,

João