cancel
Showing results for 
Search instead for 
Did you mean: 

Losing values in XKOMV structure

Former Member
0 Kudos

Dear All,

Please help it's very urgent.

I have created a routine in VOFM under formulas-Condition Value. After populating value XKOMV-KBETR the value is replaced by the standard structure RETTKOMV.

Because of this my calculated value for KBETR is replacing with RETTKOMV-KBETR value.

This is happening after comming out of the routine.

Please do needful it's very urgent.

Thanks

Hreddy

Accepted Solutions (0)

Answers (10)

Answers (10)

Former Member
0 Kudos

I got the same problem and i resolved it by changing the value

XKWERT

for a condition let us think 'pjo1' if u want to change the amount field

change the value xkwert in the subroutine.Don't change the structure xkomv.

just change that field to some value that will reflect in the structure xkomv(may be it will reflect after save)

FORM FRM_KONDI_WERT_601

xkwert = '20.00'.

END FORM.

this will make changes in xkomv

Former Member
0 Kudos

Hi Hussain,

I am also facing the same problem stated below . If you have any solution to this issue , please let me know.

Thanks

Former Member
0 Kudos

Hi,

Check if the calculation type in your condition type in V/06...If it is B (Fixed amount) or T (Multi dimensional)..Then the flag is not getting set..If it is B try to change it to A or C..

Also check if the flag for group condition type is not set in your condition type in V/06...

Thanks,

Naren

Former Member
0 Kudos

Hi,

I think the formula is not configured in the pricing procedure..That is the reason why it is getting replaced..

Check this code in the include LV61AA43..The flag wertformel will be set if the routine is configured..

IF xkomv-kofrm NE 0.

<b>wertformel = 'X'.</b>

xkwert = xkomv-kwert.

frm_kondi_wert-nr = xkomv-kofrm.

PERFORM (frm_kondi_wert) IN PROGRAM saplv61a IF FOUND.

xkomv-kwert = xkwert.

ENDIF.

If the flag is set the if condition that you mentioned will fail and it will not overwrite..

if xkomv-kofrm ne 0 and <b>wertformel eq space</b> 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.

endif.

Check in my previous reply for the formula in the pricing procedure..

Thanks,

Naren

Message was edited by: Narendran Muthukumaran

Former Member
0 Kudos

hi,

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.

our control is not going into this IF condtion. that is flag is not set.

can you please suggest how to proceed further.

Thanks,

HREDDY

can

Former Member
0 Kudos

Hi Hussain

I too face the same problem as u had. Have tried all the steps stated in this query thread, but the issue still persist.

Hope u would have got this issue resolved by now. It would be great if u can give the trouble shooting steps that u had taken over then

Thanks

Mukundhan

alejandro_bindi
Active Contributor
0 Kudos

Exact same problem in here, with Purchase orders.

After modifiying the XKOMV structure, it gets overwritten with the rettkomv "backup" copy, since the form is executed from here (SAPLV61A -> LV61AA55 -> form xkomv_bewerten, line 1237:


* execute condition value formula not changing xkomv
* will normally be processed in xkomv_kwert_ermitteln
    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.
    endif.

How to know which structures or tables are available for reading/modifications, for a given type of Pricing routine?

Please help

Many thanks

EDIT: It appears we solved this. It was enough to define two separate routines, One for amount conditions and one for percentage ones. When the condition is a percentage condition, the form gets called from other place, without replacing XKONV, thus XKOMV-KBETR can be modified. Hope this helps.

Former Member
0 Kudos

Hi,

Actually it is Pricing condition type not output type..Sorry for the typo..

Anyways..

Goto to the transaction V/08...Then give the select the pricing procedure..And double click on "control" on the left hand side tree..

You will see a list of condition types in the third column..For your corresponding condition type row..Check in the column "AltCty" if your VOFM routine is given or not..

Thanks,

Naren

Former Member
0 Kudos

HI,

our routine is there in AltCty Column.

Thanks,

HREDDY

Former Member
0 Kudos

Hi,

Check the following..

1. Check if the VOFM routine - Condition value formula is configured in the pricing procedure for the correct pricing condition type..

2. Sample code..

FORM RV64Axxx.

  • Always default the condition rate to 10.

XKOMV-KBETR = '10.000'.

ENDFORM.

Hope this helps..

Thanks,

Naren

Message was edited by: Narendran Muthukumaran

Former Member
0 Kudos

Hi Naren,

Could you please explain how to view the output type for the pricing procedure.

Thanks

HREDDY

Former Member
0 Kudos

Hi,

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.

endif.

After comming out of the routine control is on xkomv = rettkomv . statement.After this statement kbetr value is showing zero

WE Have appllied your suggestion

xkomv-kbetr = '10'.

eventhough we are facing the same problem.

Thanks,

HREDDY

Former Member
0 Kudos

Hi,

How are you updating the value in XKOMV-KBETR.Are you updating the internal table XKOMV or the structure XKOMV-KBETR.

Thanks,

Naren

Former Member
0 Kudos

Hi Naren,

In debugging mode it showing XKOMV as internal table.

Plese suggest us how to continue.

Thanks,

HREDDY

Former Member
0 Kudos

Hi,

First of all ..how do you update the structure..

XKOMV-KBETR = '1.00'. This should be okay..

IS the VOFM routine correctly configured to the pricing condition type..

Thanks,

Naren

Former Member
0 Kudos

Hi Naren,

We have configured it correctly, eventhough the value is replaced by RETTKOMV-KBETR value.

I think that value should also reflect in RETTKOMV-KBETR .

Please suggest in this.

Thanks

HREDDY

Former Member
0 Kudos

Hi Hussain,

Welcome to SDN.

Is it possible to hold the value of XKOMV-KBETR temporarily in any other variable and use it later.

Reward points if this helps.

Manish

Former Member
0 Kudos

Hi,

Try this..This might work..

In the condition type configuration..V/06 remove the access sequence for the condition type...Then execute your transaction..

THanks,

Naren

Message was edited by: Narendran Muthukumaran

Former Member
0 Kudos

Hi Naren,

Thanks for your immediate reply.

Could you please give me some detail steps.

Thanks,

HREDDY

Former Member
0 Kudos

Hi Naren,

We got it .

Thanks for the reply

Thanks

HREDDY