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: 

Values are modfied in standard -- VOFM Custom Routines

Former Member
0 Kudos

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.

1 ACCEPTED SOLUTION

naimesh_patel
Active Contributor
0 Kudos

It appears that you have implemented the Condition Base Value routine (FORM FRM_KOND_BASIS_***). In condition base value routine, you don't need to update XKOMV. You just need to set the value in XKWERT. This field would be copied back to your condition value in XKOMV-KWERT for appropriate condition type where this CBV routine is assigned.

Regards,
Naimesh Patel

12 REPLIES 12

Former Member
0 Kudos

sounds like the pricing procedure still points to the standard, and not to your new routine, or is calling both at different points?  Look to see how the VOFM entries are called by the pricing procedure.

0 Kudos

Hi,

My routine also triggered. But after my code, Standard again changed the values.

Thanks,

J. Rajbarath

juergenbaur
Contributor
0 Kudos

have you run Report RV80HGEN?

br

Jürgen

Former Member
0 Kudos

Hi,

  Even I executed the report RV80HGEN.

  But values are still changed in standard code.

Thanks.

J. Rajbarath

naimesh_patel
Active Contributor
0 Kudos

It appears that you have implemented the Condition Base Value routine (FORM FRM_KOND_BASIS_***). In condition base value routine, you don't need to update XKOMV. You just need to set the value in XKWERT. This field would be copied back to your condition value in XKOMV-KWERT for appropriate condition type where this CBV routine is assigned.

Regards,
Naimesh Patel

0 Kudos

Thank you patel. My problem sovled.

Thanks

J. Rajbarath

Former Member
0 Kudos

Hi Patel,

Thanks for your information.

But I am not getting,

I trued with XKWERT.

But values are not updated in screen VA01.

Please clarify me breifly.

Thanks
J. Rajbarath

0 Kudos

Seems that your are creating a 'Condition base value', try to create the formula as 'Condition Value' and pass the value to XKWERT field. It should works.

Regards,
Felipe

0 Kudos

Thank you Felipe. My problem solved.

Thanks,

J. Rajbarath

0 Kudos

Hi Felipe,

If I want to implement code in 'Condition base value', means, Where I have to update instead of XKWERT.

Kindly advice me.

Thanks,

J. Rajbarath

0 Kudos

Hi,

I have checked here and also in condition base value the values are passed to XKWERT.

Regards,
Felipe

0 Kudos

Thank you Felipe.

But now, we used condition value only not condition base value.

Now, Its working fine to me.

Thanks,

J. Rajbarath