Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

problem in Routine after rounding off the condition value

Former Member
0 Kudos

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

6 REPLIES 6

Former Member
0 Kudos

Hi

Please provide the code you are using in the routine.

Regards

Vijai

0 Kudos

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.

0 Kudos

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.

0 Kudos

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.

0 Kudos

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

Former Member
0 Kudos

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