Skip to Content
0
Oct 15, 2009 at 04:48 PM

WS_DELIVERY_UPDATE_2 VBFA entry created

282 Views

Hi,

I'am using the fm WS_DELIVERY_UPDATE_2 for changing the picking quantity of a item in a outbound delivery. Everything look fine, i can see in VL02N the item changed, but i have a problem.

When i use this function a new entry is created in VBFA table for the item i changed And i don't understand why.

Here is my code

DATA: lw_vbkok TYPE vbkok,
      lt_vbpok TYPE TABLE OF vbpok,
      lw_vbpok TYPE vbpok,
      l_vbeln  TYPE vbeln_vl.

l_vbeln = '0082671893'.
lw_vbkok-vbeln_vl = l_vbeln.
lw_vbkok-vbeln    = l_vbeln.
*vbkok_wa-wabuc = 'X'.

lw_vbpok-vbeln_vl = l_vbeln.
lw_vbpok-posnr_vl = '000010'.
lw_vbpok-vbeln    = l_vbeln.
lw_vbpok-posnn    = '000010'.
lw_vbpok-pikmg    = '3'.
APPEND lw_vbpok TO lt_vbpok.

CALL FUNCTION 'WS_DELIVERY_UPDATE_2'
  EXPORTING
    vbkok_wa       = lw_vbkok
    commit         = 'X'
    delivery       = l_vbeln
    update_picking = 'X'
  TABLES
    vbpok_tab      = lt_vbpok.

and here is my 2 entries (most important values and different values) for the same item (first one, is the entry created with the fm)

VBELV		POSNV	VBELN		POSNN	RFMNG	TAQUI	MATNR
82671893	10	82671893	10	3.000		27-B337
82671893	10	20091013	165438	0.000	X

Anyone can explain me why.

Thank You