Skip to Content
0
Former Member
Apr 16, 2012 at 02:18 PM

Values are modfied in standard -- VOFM Custom Routines

659 Views

Hi Guys,

I am new to here.

I am working in Pricing Routines for SD.

I have created a custom routine in VOFM and got access key too.

I have developed my logic and changed the value in the table XKOMV.

Everything is working fine up to here.

But At the end, standard changed the values in table again.

My Code :

FORM FRM_KOND_BASIS_601.
*{ INSERT ECPK900672 1
data : fs_xkomv like line of xkomv,
wf_no_of_days type p.
read table xkomv into fs_xkomv with key KOFRA = '601'.
IF sy-subrc = 0.

CALL FUNCTION 'HR_IT_PS_NUM_OF_DAYS_OF_MONTH'
EXPORTING
P_FECHA = fs_xkomv-KDATU
IMPORTING
NUMBER_OF_DAYS = wf_no_of_days.
fs_xkomv-KWERT = fs_xkomv-KBETR / wf_no_of_days * fs_xkomv-KAWRT.
fs_xkomv-KWERT = fs_xkomv-KWERT / 100.
modify xkomv[] from fs_xkomv index sy-tabix transporting KWERT.
*} INSERT
ENDFORM.

But after this,

The following standard code, changed my value.

Program : SAPLV61A

Include : LV61AA55

* Update XKOMV
IF xkomv-kinak NE 'Z'.
MODIFY xkomv. ----------> Here its getting modified
ELSE.
DELETE xkomv.
CONTINUE.
ENDIF.

In my case, the value for xkomv-kinak is NULL.

I have checked in various forum regarding the same issue, but I am not getting correct solutions.

Please help me to solve the issue.

Thanks in advance.