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: 

xkomv=rettkomv

Former Member
0 Kudos

Hello Everyone ,


I am looking for some suggestion. I am trying to change the value of xkomv-kwert in invoice .


Now the issue is after doing the calculations for XKOMV-Kwert , when it returns to the standard code the values are getting reset. It is coded as below:

XKOMV = RETTKOMV. (This code is present in 'LV61AA55' include program which is called in SAPLV61A program)

  Here RETTKOMV contains initial values stored in XKOMV, so even after performing calculations because of the above statement the value of Kwert is getting reset.


Already searched the forum and also posted the query yesterday but did not get any help .


the suggestions were implicit enhancement and changing the value of xkwert.


I wanted to know how I can change the value of xkwert .




Please help ,


Pooja

7 REPLIES 7

Former Member
0 Kudos

Hi Pooja,

You could have continued that post only by reply again, anyway check the Program LV61AA55 line no 302 this is code which calls your routine and change the value KAWRT by using XKWERT. Debug the program from line 297 and check If the same is getting called or not.

Put some screenshots of the debugger for fellow SCN members to analyse it further.

Hope this helps.

0 Kudos

Thanks Rahul.

sorry for asking so many  questions . When you said change the value KAWRT by using XKWERT, do u mean to say i replace my code


xKOMV-kwert = xkomv-kbetr * komp-mgame / 1000.

with this

XKOMV-KWERT = XKOMV-KBETR * XKOMV-KAWRT / 1000 .

xkomv-kwert = xkwert .

Also when i Put a break point in program LV61AA43

* calculation formula

  IF xkomv-kofrm NE 0.

    wertformel = 'X'.

    xkwert = xkomv-kwert.

    frm_kondi_wert-nr = xkomv-kofrm.

    PERFORM (frm_kondi_wert) IN PROGRAM saplv61a IF FOUND.

    xkomv-kwert = xkwert.

  ENDIF.

My VOFM routine was not called . frm_kondi_wert should be equal to my VOFM routine number it is only showing 002 .

Pooja

0 Kudos

No, I meant the line of code should be called for your routine and it will change automatically.

Just debug that piece of code if it is getting called or not.

Hope this helps.

0 Kudos

Also have you asked your functional guy to assign that routine number (900) to the condition type in the pricing procedure.

Please check once.

Hope this helps.

0 Kudos

Hi Rahul,

The routine has been assigned to the pricing procedure in V/08 .

The routine is also getting called .

also placed a breakpoint in LV61AA55 , but while debugging it was not getting called .

Pooja

0 Kudos

Hi,

Check if there is only a single form endform. If it is not changing the value may be you want to take a look at the user exit RV60AFZZ.

And by the way this is Gaurav Dubey not Rahul.

Hope this helps.

0 Kudos

Sorry Gaurav. I was getting mixed up.

I got following from SCN

DATA: fieldname type char8 value 'RETTKOMV'.

**Field symbol declaration.

FIELD-SYMBOLS <i_field>.

  ASSIGN (fieldname) TO <i_field>.

then modify data of rettkomv, use <i_field> = xknomv. instead of rettkomv = xkomv.

This will modify local data in Program SAPLV61A.

Now the issue is I do not know what to write for fieldname and field symbols and i_field

Will u be able to help me on  this .

Pooja