2009 Apr 14 1:53 PM
Please help me with the usage of this FM.
I need information wrt to the parameters and tables to be passed to teh FM for creating a delivery.
2009 Apr 14 2:01 PM
2009 Apr 14 2:01 PM
Do a where-used on the function module.
Then you'll find a number of SAP programs that uses the function. Analyse those programs and you should have a clear idea on how to use the function.
2009 Apr 14 2:38 PM
Hi,
we're using this code in some developments and it's working fine.
lw_komdlgn-matnr = lw_lips-matnr.
lw_komdlgn-werks = lw_lips-werks.
lw_komdlgn-lifnr = lw_likp-lifnr.
lw_komdlgn-vrkme = lw_lips-vrkme.
lw_komdlgn-charg = lw_lips-charg.
lw_komdlgn-lgort = lw_lips-lgort.
lw_komdlgn-vstel = lw_likp-vstel.
lw_komdlgn-vkorg = lw_likp-vkorg.
lw_komdlgn-vtweg = lw_lips-vtweg.
lw_komdlgn-spart = lw_lips-spart.
lw_komdlgn-lfart = lw_likp-lfart.
lw_komdlgn-pstyv = lw_lips-pstyv.
lw_komdlgn-lfimg = lw_lips-lfimg.
lw_komdlgn-vrkme = lw_lips-vrkme.
lw_komdlgn-lfdat = lw_likp-lfdat.
lw_komdlgn-wadat = lw_likp-lfdat.
lw_komdlgn-vgbel = lw_lips-vgbel.
lw_komdlgn-vgpos = lw_lips-vgpos.
lw_komdlgn-vgtyp = lw_lips-vgtyp.
lw_komdlgn-meins = lw_lips-meins.
lw_komdlgn-umvkz = lw_lips-umvkz.
lw_komdlgn-umvkn = lw_lips-umvkn.
lw_komdlgn-verur = lw_likp-verur.
lw_komdlgn-lifex = lw_likp-lifex.
lw_komdlgn-traty = lw_likp-traty.
lw_komdlgn-traid = lw_likp-traid.
lw_komdlgn-kzazu = lw_likp-kzazu.
lw_komdlgn-route = lw_likp-route.
lw_komdlgn-tragr = lw_likp-tragr.
lw_komdlgn-kdmat = lw_lips-kdmat.
APPEND lw_komdlgn TO gt_komdlgn.
DATA: xvbfs LIKE vbfs OCCURS 0 WITH HEADER LINE,
xvbls LIKE vbls OCCURS 0 WITH HEADER LINE.
DATA: lw_vbsk TYPE vbsk.
DATA: l_numki LIKE tvsa-numki,
l_nr_range LIKE inri-nrrangenr.
CLEAR lw_vbsk.
lw_vbsk-mandt = sy-mandt.
lw_vbsk-ernam = sy-uname.
lw_vbsk-erdat = sy-datum.
lw_vbsk-uzeit = sy-uzeit.
lw_vbsk-smart = 'L'.
SELECT SINGLE numki INTO l_numki
FROM tvsa
WHERE smart = lw_vbsk-smart.
IF sy-subrc EQ 0.
l_nr_range = l_numki.
CALL FUNCTION 'NUMBER_GET_NEXT'
EXPORTING
nr_range_nr = l_nr_range
object = 'RV_SAMMG'
IMPORTING
number = lw_vbsk-sammg.
ENDIF.
CALL FUNCTION 'GN_DELIVERY_CREATE'
EXPORTING
vbsk_i = lw_vbsk
vbls_pos_rueck = 'X'
no_commit = 'X'
if_no_deque = 'X'
TABLES
xkomdlgn = gt_komdlgn
xvbfs = xvbfs
xvbls = xvbls
EXCEPTIONS
OTHERS = 1.
2019 Dec 23 12:26 PM
The Program Perfectly works for multiple line items also when added in code . Thanks