11-21-2011 5:52 PM
Hi Gurus,
My requirement is to convert unit of measurement into KG in created accounting document while creating billing document for outbound delivery.
Suppose for material X1, 1CS = 10KG then while creating billing document having item material as X1 the bseg and all GL tables should have document with UoM as Kg instead of CS.
I coded user exit EXIT_SAPLV60B_004. Code written is mentioned below:
IF xkomv-koaid = 'B'.
DATA: l_out TYPE f.
CALL FUNCTION 'MATERIAL_UNIT_CONVERSION'
EXPORTING
input = xvbrp-fkimg
KZMEINH = ' '
matnr = xvbrp-matnr
meinh = 'KG'
meins = xvbrp-meins
EXTENDED_CONV = ' '
TYPE_UMR = ' '
NO_OUTPUT = ' '
CHARGE =
CHARG_CUOBJ =
WERKS =
IMPORTING
ADDKO =
MEINS =
output = l_out
UMREN =
UMREZ =
BATCH_CONVERSION_ERROR =
KZWSO =
EXCEPTIONS
conversion_not_found = 1
input_invalid = 2
material_not_found = 3
meinh_not_found = 4
meins_missing = 5
no_meinh = 6
output_invalid = 7
overflow = 8
OTHERS = 9
.
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
xaccit-menge = l_out.
xaccit-meins = 'KG'.
ENDIF.
After implementing this exit BSEG table is getting updated with unit of measurement as Kg (field meins and menge) but the problem is that table FAGLFLEXA (field RUNIT and msl) are not update with quantity in KG.
Please let me know if i need to implement different exit to achieve the functionality.
Help is much appreciated.
Thanks
HImanshu
11-22-2011 9:55 AM
Hi
See Note 945932 - FAGLL03: Enhancing dynamic selections with certain fields
Regards
Eduardo
11-22-2011 12:57 PM
Hi Eduardo,
I dont want to add new fields in FAGLFLEXA table.
I just want to convert UoM from Base unit of measure to KG and get updated in field RUNIT and MSL.
Thanks
Himanshu
11-22-2011 12:59 PM
And I am using ECC 6.0 release, and after d/l notes it says cannot be implemented.