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: 

XKWERT is not reflecting with Customized Routine for Condition Type

Former Member
0 Kudos
3,751

Dear Experts,

I have created a customized routine 9XX that would calculate the Condition Value, if the value is not 0 for the Exch.rate-acct. field on the Financial Accounting tab on the Sales Order header.

My routine code is as follows:

if komk-kurrf ne '0.00000'.

if sy-subrc = 0.

temp_val = ( komp-mglme * xkomv-kbetr ) / 1000.

xkwert = ( temp_val * komk-kurrf ) / 100000.

xkomv-kwert = xkwert.

modify xkomv.

endif.

endif.

However, the calculated value is not reflected in the Condition Value column during Sales Order creation, change or view. I have included my routine to the condition type in tcode V/O8.

Per my checking, the routine appears in the include list for the main program SAPLV61A.

When I debug, I found that the value in structure xkomv is overridden by value in structure rettkomv, because wertformel = space.

I have gone through the messages below but I am still stuck:

1.

2. How to set condition rate using VOFM pricing formula

I'd appreciate your assistance.

Thank you.

HJMY

11 REPLIES 11

dev_parbutteea
Active Contributor
0 Kudos
462

Hi,

If you have correctly assigned the routine to your condition type in V/08, the field wertformel should be set.

please verify whether in V/08, the routine was assigned to "Condition formula for alternative calculation type" column.

Put a break point in the following include to verify this.As, you can see below, the XKWERT value will automatically be assigned to XKOMV-KWERT. This is the only place where the field is set.

in include 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.

Regards.

0 Kudos
462

Hi Dev Parbutteea,

Thank you for your reply. I have checked & found that my setting is as per your recommendation.

However, the include program is LV61AA55 instead of LV61AA43.

In LV61AA55 program the xkomv value is overridden by value in rettkomv.

How can this be changed?

I'd apprciate advice from all.

Thank you.

HJMY.

0 Kudos
462

It's ok. Problem solved

0 Kudos
462

Hi HJMY,

Could you please tell me how did you solve the problem? I have the same one, I give a value to XKWERT on my routine but then it doesn't take it to the xkomv-kwert.

Thanks from now,

John

0 Kudos
462

Hi HJMY,

Could you please share your resolution with us? I will be grateful!

Regards,

Fabio

Edited by: Fabio Toledo de Lima on Dec 28, 2009 7:19 PM

0 Kudos
462

Hi HJMY,

I'm alsofacing the same problem. I would be grateful if you could share the solution.

Thank you.

0 Kudos
462

Would be really great if you could tell us how you solved this, as we are facing the same problem.

0 Kudos
462

Hi,

Please help i m facing same problem that xkwert is not updating on sales order save

0 Kudos
462

Hi HJMY,

I have same problem. I want to populate KBETR field of XKOMV structure. but every time i modify XKOMV in the routine it is overridded bt RETTKOMV. Please help.

Regards

0 Kudos
462

Hi,

We have the same problem . The values from XKOMV and TKOMV are being overwritten by RETTKOMV.

Please help. Its urgent. Thanks

Srinivas

aneel_munawar
Participant
0 Kudos
462

Dear All,

Issue resolved myself. I have applied the code in the include LV61AA43.

I have  created an enhancement point after this code.

* price per unit if sum line

   IF xkomv-kschl = space.

     PERFORM xkomv_kbetr_from_kwert USING xkomv-kwert.

   ENDIF.



Following is my code

move   '101' to waxkomv-kwert.

"----------

Thanks
Aneel