01-07-2008 4:57 AM
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
01-07-2008 5:03 AM
Yes, The Code is similar to both STUNR and KSCHL.
Exactly What help do u want ??
01-07-2008 5:37 AM
Hi ,
C let me explain u clearly .I'm picking some value where STUNR is 103 and i'm calculating some value n i'm putting that value where KSCHL is ZR01 ok . n next where stunr is 105 ...calculating something and putting that where kschl is ZR02.ok .now that final value is overlapping here ..
01-07-2008 5:49 AM
I think u shud write them in 2 routines.
i.e different routines for 103 and 105.
awrd points if useful
Bhupal