2015 Sep 02 12:02 PM
Hello Everyone,
I have written the below code :-
FORM FRM_KONDI_WERT_999.
IF XKOMV-KAPPL = 'V' AND XKOMV-KRECH = 'C'.
XKomv-kwert = XKOMV-KBETR * komp-mgame / 1000 .
XKWERT = XKOMV-KBETR * komp-mgame / 1000 .
Field-symbols: <rettkomv> type KOMV_INDEX.
constants: c_rettkomv type char20 value '(SAPLV61A)RETTKOMV'.
assign (c_rettkomv) to <rettkomv>.
LOOP AT XKOMV ASSIGNING <RETTKOMV> .
<RETTKOMV> = XKOMV.
ENDLOOP.
ENDIF.
ENDFORM.
The issue was to change the condition value in billing invoice item .
The value was not getting changed because it was getting reset due to xkomv= rettkomv.
Now when i use field symbols my condition type is getting repeated again and again and all other condition types have disappeared ,
Why is is behaving like this . Any help.
Pooja
2015 Sep 03 10:49 AM
This loop is your problem:
LOOP AT XKOMV ASSIGNING <RETTKOMV> .
<RETTKOMV> = XKOMV.
ENDLOOP.
It is replacing every line in table XKOMV with the (unchanging) values in the structure 'XKOMV'.
So you will end up with every table line being the same.
cheers
Paul
2015 Sep 03 10:58 AM
Thank you so much for replying .
Yes, i could figure out that now .
How can I use field symbols to avoid
rettkomv= xkomv
resetting the value of
xkwert = xkomv-kwert .
Apart from using implicit enhancement .
Thanks
Pooja
2015 Sep 03 11:19 PM
How can I use field symbols to avoid
rettkomv= xkomv
resetting the value of
xkwert = xkomv-kwert .
Sorry Pooja, but I don't understand your question.
The execution of the first statement (rettkomv= xkomv) has no effect on the variables
in the second statement (xkwert = xkomv-kwert)
Please explain?
cheers
Paul
2015 Sep 04 7:40 AM
Hello Paul,
I am writing a routine in VOFM to change the value of xkwert in billing .
But due to statement
rettkomv= xkomv in the sap standard program , no matter what code I write the values are reset .
The solution I found on SCN forum is by using field symbols . That is what I am trying to do . I have explained the issue in the starting .
Thanks
Pooja
2015 Sep 04 8:51 AM
Hi,
Is your routine a RV61 type or a RV63 ?
I mean if it is condition value or a condition base value?
If it is not a condition base value, then you need to change it to condition base value and also do the config at condition type with "Manual entry has priority".
Hope this helps.
2015 Sep 07 8:39 AM
Hello Tee,
Thanks for the reply .
It is a RV64A type and a condition value formula .
pooja
2015 Sep 07 9:25 AM
change it to condition base value and also do the config at condition type with "Manual entry has priority".
2015 Sep 07 10:44 AM