I'm an trying to get the Serial numbers onto my invoice.
we are on ECC 6.0 and using smartforms use the delivery step.
I have code that pulls and prints the Serial numbers on my packing list, but won't work on the invoice.
I t doesn't seem to like IS_DLV_DELNOTE-HD_GEN-DELIV_NUMB and I'm not entirely sure why or what to replace it with.
I tryed IS_BIL_INVOICE-HD_REF-DELIV_NUMB.
CLEAR: gv_pieces, gv_pieces_uom.
CALL FUNCTION 'MD_CONVERT_MATERIAL_UNIT'
i_matnr = gs_it_gen-material
i_in_me = gs_it_gen-sales_unit
i_out_me = 'EA'
i_menge = gs_it_gen-dlv_qty
e_menge = gv_pieces
error_in_application = 1
error = 2
OTHERS = 3 .
IF sy-subrc = 0.
gv_pieces_uom = 'EA'.
Get Serial Number
*data: it_ser type table of RISERLS,
wa_ser type RISERLS.
CALL FUNCTION 'SERIAL_LS_PRINT'
vbeln = IS_DLV_DELNOTE-HD_GEN-DELIV_NUMB
POSNR = GS_IT_GEN-ITM_NUMBER
iserls = it_ser.
read table it_ser into wa_ser index 1.
if sy-subrc = 0.
*l_serial = wa_ser-sernr.
CALL FUNCTION 'CONVERSION_EXIT_GERNR_OUTPUT'
input = wa_ser-sernr
OUTPUT = l_serial.
Edited by: Israel Edmiston on Oct 27, 2010 12:00 AM