Skip to Content

Creating delivery Using GN_DELIVERY_CREATE

Hi Expert,

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

* Document Item
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.


vbsk_i = lw_vbsk
no_commit = 'X'
vbls_pos_rueck = 'X'
if_no_deque = 'X'
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.


Arindam Samanta.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

3 Answers

  • Posted on May 16, 2013 at 04:30 PM

    Hi Expert,

    I passed the quantity to komdlgn-lfimg. After delivery creation, when I checked in table LIPS, all item quantity (lifmg) field in the table LIPS becomes 0.

    Why the quantity has been changed inside the function module.

    Any solution would be gratefully accepted.


    Arindam Samanta.

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on May 16, 2013 at 11:31 PM

    Hi Arindam,

    Have you tried populating table XXLIPS?



    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Oct 30, 2019 at 08:08 PM

    Sorry for the delay, but I had the problem this year. In my case I decided to change the control of the subroutine in the view "V_TVCPLAP", table "TVCPL". Someone changed the "TVCPL-GRUAP" VBAP control to 900. The correct one is 202.

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.