07-01-2014 2:45 PM
Hi,
in my condition routine I want to change xkomv-kbetr.
After my code, there is standard SAP code which overwrite my xkomv value.
IF xkomv-kofrm NE 0 AND wertformel EQ space AND komp-kposn NE 0.
rettkomv = xkomv.
xkwert = xkomv-kwert.
frm_kondi_wert-nr = xkomv-kofrm.
PERFORM (frm_kondi_wert) IN PROGRAM saplv61a IF FOUND.
xkomv = rettkomv. "<--- here the value will be overwritten
ENDIF.
What can I do now? Is there another way I can go?
Regards,
Basti
07-01-2014 2:50 PM
Use Implicit enhancement at the end of subroutine/FM whichever applicable & overwrite back to your desired value.
07-01-2014 2:50 PM
Use Implicit enhancement at the end of subroutine/FM whichever applicable & overwrite back to your desired value.
07-01-2014 3:50 PM
07-02-2014 1:22 PM
Ok thx.
So I have to put my complete code into the enhancement? Or is there a way that I backup the value in the routine, and save it later in the enhancement?
07-02-2014 1:49 PM
You can add your custom code at the start/end of the subroutine, using implicit enhancements.
In start of subroutine you may declare a local variable & copy the value of xkomv-kbetr into it.
At the end of subroutine you may copy the local variable back to xkomv-kbetr.
07-02-2014 1:59 PM
Yes, you could export / import. But does that really make sense. Why would you not move the whole code. That is unless there was access to values in the previous location that you couldn't have later.
Neal
07-02-2014 2:31 PM
Ok, you are right.
So I move the complete code to the enhancement.
Thank you guys!
Regards,
Basti
07-02-2014 2:52 PM
Thanks, but shouldn't you really give the correct answer to Sharath. I wouldn't mind the helpful, if it was. But Sharath gave the correct answer...
Neal
07-02-2014 3:17 PM
Thanks Neal,
I admire you generosity,
never saw somebody giving credit to others whom you don't know.
Regards,
Sharath
07-02-2014 3:36 PM
I'd think of it more as honor. Or dedication to right. Most people think that the right thing changes depending on friendship or nationality or... Right is always right. And wrong is always wrong.
I can't say that I always do right, but I want to.
Neal