Skip to Content
0
Former Member
Jan 07, 2008 at 04:57 AM

Routine Value

22 Views

Hello friends,

I created a routine , i'm getting a problem of overlapping routine value for 2 conditions .

read table xkomv with key stunr = '103'.

IF SY-SUBRC EQ 0.

v_qty = xkomv-kawrt / 10.

if factor ne 0 .

conv_fac = ( xkomv-kbetr * factor ) / 10000000.

  • conv_fac = ( xkomv-kwert * 10000000 ) / factor .

endif.

endif.

read table xkomv with key kschl = 'ZR01'.

IF SY-SUBRC EQ 0.

  • xkomv-kbetr = ( conv_fac / v_qty ) * 100.

xkomv-kbetr = conv_fac.

  • xkomv-kpein = v_qty / 100 .

  • xkomv-kwert = conv_fac .

endif.

xkwert = ( conv_fac * v_qty ) / 100 .

clear conv_fac.

modify xkomv.

read table xkomv with key stunr = '105'.

if sy-subrc eq 0.

v_qty = xkomv-kawrt / 10.

if factor ne 0.

conv_fac = ( xkomv-kbetr * factor ) / 10000000.

endif.

endif.

read table xkomv with key kschl = 'ZR02'.

IF SY-SUBRC EQ 0.

xkomv-kbetr = conv_fac.

endif.

xkwert = ( conv_fac * v_qty ) / 100 .

This is the code where my value is overlapping here ..

please help me out for this.

Thanks& Regards

Lavanya