Skip to Content
0
May 16, 2013 at 12:55 PM

Creating delivery Using GN_DELIVERY_CREATE

1539 Views

Hi Expert,

I am trying to create delivery number 'GN_DELIVERY_CREATE'. Below is my code:


* Document Item
CLEAR:l_count.
LOOP AT im_poitem INTO lw_poitem.

ADD 1 TO l_count.

* lw_komdlgn-vstel = v_curop_plnt.
lw_komdlgn-vstel = lw_poitem-plant.
lw_komdlgn-vkorg = w_sales-vkorg.
lw_komdlgn-vtweg = w_sales-vtweg.
lw_komdlgn-spart = w_sales-spart.
lw_komdlgn-lfart = 'LB'.
lw_komdlgn-kunwe = w_sales-kunnr.
lw_komdlgn-matnr = lw_poitem-material.
lw_komdlgn-werks = lw_poitem-plant.
lw_komdlgn-wadat = sy-datum.
lw_komdlgn-lfdat = sy-datum.
lw_komdlgn-lfimg = lw_poitem-quantity.
lw_komdlgn-vrkme = lw_poitem-po_unit.
lw_komdlgn-vgpos = l_count.
lw_komdlgn-lgort = lw_poitem-stge_loc.
lw_komdlgn-charg = lw_poitem-batch.
lw_komdlgn-lifnr = im_head-vendor.
lw_komdlgn-lifex = im_ebeln.
lw_komdlgn-lifexpos = lw_poitem-po_item.
* lw_komdlgn-empst

APPEND lw_komdlgn TO lt_komdlgn.

CLEAR:lw_poitem,lw_komdlgn.
ENDLOOP.


CALL FUNCTION 'GN_DELIVERY_CREATE'
EXPORTING
vbsk_i = lw_vbsk
no_commit = 'X'
vbls_pos_rueck = 'X'
if_no_deque = 'X'
TABLES
xkomdlgn = lt_komdlgn
xvbfs = lt_vbfs
xvbls = lt_vbls.

Using above code, I got the delivery number. But when I checked in Table LIPS, the field LFIMG contains 0(zero) for every line items. But I passed the actual quantity. How can I get the actual quantity in LIPS table?

Any possible solution would be gratefully accepted.

Thanks

Arindam Samanta.