on 10-25-2010 8:26 PM
Hi,
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'
EXPORTING
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
IMPORTING
e_menge = gv_pieces
EXCEPTIONS
error_in_application = 1
error = 2
OTHERS = 3 .
IF sy-subrc = 0.
gv_pieces_uom = 'EA'.
ENDIF.
Get Serial Number
*data: it_ser type table of RISERLS,
wa_ser type RISERLS.
refresh: it_ser[].
clear: l_serial.
CALL FUNCTION 'SERIAL_LS_PRINT'
EXPORTING
vbeln = IS_DLV_DELNOTE-HD_GEN-DELIV_NUMB
POSNR = GS_IT_GEN-ITM_NUMBER
tables
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'
EXPORTING
input = wa_ser-sernr
IMPORTING
OUTPUT = l_serial.
endif.
condense l_serial.
Edited by: Israel Edmiston on Oct 27, 2010 12:00 AM
Hi
You can use this Function Module GET_SERNOS_OF_DOCUMENT can be used to retrieve serial numbers corresponding to any of the following documents.
1. Delivery
2. Sales order
3. Material document
Input parameters which needs to be passed changes based on the type of document.
Following are required fields to be passed as input parameters to get respective document serial numbers
1. Delivery
KEYDATA-TASER = 'SER01'
KEYDATA-LIEF_NR - delivery number
KEYDATA-POSNR - delivery item number(optional)
After getting the output you can get it print on the invoice
By linking LIKP-VBELN to vbrp-vgbel (delivery number)
regards
Prashanth
Edited by: Prashanth@SD on Oct 27, 2010 3:00 PM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
108 | |
12 | |
11 | |
6 | |
5 | |
4 | |
3 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.