Skip to Content
0
Former Member
Mar 31, 2009 at 07:54 AM

User Exit not working: Unit not considered in Excise Register Entries

38 Views

Dear Experts ,

I have a material Base UoM is KG

i procured 100 KG

the Unit of issue for the same is G(grams)

now the consumption of 100 G was booked

Excise registers shows the following entries :

qty rcvd : 100 ( there is no unit )

qty issued :100

balance : 0

whilst the balance shud be 99 KG

i have been suggested to use the user exit J_1I7_USEREXIT_J1I5_VALIDATE

for which the coding needs to be done .

The same was done as under :

FUNCTION J_1I7_USEREXIT_J1I5_VALIDATE.

*"----


""Local Interface:

*" IMPORTING

*" VALUE(RCPTISSRSN) TYPE J_1IPART1-RCPTISSRSN OPTIONAL

*" TABLES

*" T_MSEG STRUCTURE MSEG OPTIONAL

*"----


  • TABLES

  • T_MSEG STRUCTURE MSEG OPTIONAL

*"----


tables:j_1ipart1.

data:it_mseg like t_mseg occurs 0 with header line.

if sy-tcode = 'J1I5'.

move-corresponding t_mseg to j_1ipart1.

j_1ipart1-menge = t_mseg-menge.

j_1ipart1-meins = t_mseg-meins.

modify j_1ipart1 ."where mblnr = t_mseg-mblnr and zeile = t_mseg-zeile.

endif.

ENDFUNCTION.

The logic is to put an entry for J_1IPART1-MENGE & J_1IPART1-MEINS from

MSEG-MEINS & MSEG-MEINS instead of the default used in the system ( MSEG-ERFMG & MSEG-ERFME)

But the above doesnt work.

Pls do help.

Regards

Anis