09-09-2008 5:57 AM
Dear all,
I have attached the routine for rounding off value for condition value for T.Code va02. Routine is working fine but the problem is after the execution of routine it goes in some standard program LV61AA55 where again the rounded value gets changed . Maximum points will be allocated ..
Thanks anr Regards
09-09-2008 6:22 AM
Hi
Please provide the code you are using in the routine.
Regards
Vijai
09-09-2008 6:29 AM
FORM FRM_KONDI_WERT_925.
*{ INSERT D01K911062 2
data : wa_xkomv like xkomv,
v_kwert like xkomv-kwert,
W_INDEX TYPE SY-TABIX.
read table xkomv into wa_xkomv with key kschl = 'JIN6'.
W_INDEX = SY-TABIX.
v_kwert = 1 * wa_xkomv-kwert / 100.
V_KWERT = WA_XKOMV-KWERT.
read table xkomv with key kschl = 'JHSC'.
CALL FUNCTION 'J_1I6_ROUND_TO_NEAREST_AMT'
EXPORTING
I_AMOUNT = v_kwert
I_AMOUNT1 =
I_AMOUNT2 =
I_AMOUNT3 =
I_AMOUNT4 =
I_AMOUNT5 =
I_EXADDTAX1_AMOUNT =
I_EXADDTAX2_AMOUNT =
I_EXADDTAX3_AMOUNT =
IMPORTING
E_AMOUNT = v_kwert
E_AMOUNT1 =
E_AMOUNT2 =
E_AMOUNT3 =
E_AMOUNT4 =
E_AMOUNT5 =
E_EXADDTAX1_AMOUNT =
E_EXADDTAX2_AMOUNT =
E_EXADDTAX3_AMOUNT =
.
xkomv-kwert = v_kwert.
xkwert = v_kwert.
modify xkomv INDEX W_INDEX transporting kwert.
*} INSERT
ENDFORM.
09-09-2008 7:02 AM
Hi
as per your code you are reading the data from xkomv which I think is not needed.
as per my understanding you wish to round of the condition value in case of KSCHL = JIN6.
Please try the below code.
FORM FRM_KONDI_WERT_925.
*{ INSERT D01K911062 2
data : v_kwert like xkwert,
W_INDEX TYPE SY-TABIX.
if komv-kschl = 'JIN6'.
read table xkomv into wa_xkomv with key kschl = 'JIN6'.
V_KWERT = xKWERT.
CALL FUNCTION 'J_1I6_ROUND_TO_NEAREST_AMT'
EXPORTING
I_AMOUNT = v_kwert
u2022 I_AMOUNT1 =
u2022 I_AMOUNT2 =
u2022 I_AMOUNT3 =
u2022 I_AMOUNT4 =
u2022 I_AMOUNT5 =
u2022 I_EXADDTAX1_AMOUNT =
u2022 I_EXADDTAX2_AMOUNT =
u2022 I_EXADDTAX3_AMOUNT =
IMPORTING
E_AMOUNT = v_kwert
u2022 E_AMOUNT1 =
u2022 E_AMOUNT2 =
u2022 E_AMOUNT3 =
u2022 E_AMOUNT4 =
u2022 E_AMOUNT5 =
u2022 E_EXADDTAX1_AMOUNT =
u2022 E_EXADDTAX2_AMOUNT =
u2022 E_EXADDTAX3_AMOUNT =
.
xkwert = v_kwert.
Endif.
*} INSERT
ENDFORM.
09-09-2008 7:25 AM
i dont have any problem in routine but after the routine gets executed it goes in some standard routine and in that the rounded value gets changed.
09-09-2008 8:22 AM
Hi
Standard routined are not automatically attached to pricing procedure.
Please check the pricing procedure and confirm if another standard routine is not attached to you condition type in pricing procedure.
regards
vijai
09-09-2008 7:07 AM
Hi ,
in addition to vijay , u said ,values are getting changed in another routine, so i think u havent atteched this new routine no to ur condition types in the pricing procedures? , so u need to assign this routine no to ur condition.
regards
Prabhu