Application Development and Automation 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: 
Read only

help debugging condition type

Former Member
0 Likes
8,034

Hello Everyone,

Please see the attachment.

This is from t-code VF03 . item condition type .

I have to debugg and see the background calculation , how the following values are being calculated .

Amount = 573.82

condition value = 1147.63

10433.44

Thank u

pooja

16 REPLIES 16
Read only

Former Member
0 Likes
5,518

Hi Pooja,

Put a breakpoint in FM SD_COND_ACCESS.

There is subroutine call in Line 241  "sel_kondtab" that is where the condition tables are accessed dynamically.

R

Read only

0 Likes
5,518

thank you for the reply .

would you be able to guide step by step , how to proceed . I saw the Fm and call statment

pooja

Read only

Former Member
0 Likes
5,518

Hi,

Please send me the T.Code for the same...

Thanks,

Vijay SR

Read only

0 Likes
5,518

Not sure , which t-code you are referring

Read only

Juwin
Active Contributor
0 Likes
5,518

I see that you are referring to Condition type - Cost. Is it VPRS condition? Also, I see that there is a formula 900 used to calculate condition base value.

If VPRS, I think thats connected to the Cost of Goods Sold, posted while doing PGI for the outbound delivery.

If not, please check if you have a program named RV63A900 in your system. Please try to put a break-point in that program, open VF03 again, and navigate to Conditions screen. The program should break at that break-point, if the formula is getting called. The calculation for pricing will be in that program and you should be able to read through that program to understand the same.

If both these steps didn't work, on the Conditions screen, there is a button named "Analysis". Once you click on that, you will see a list of condition types from the pricing procedure. Please locate the condition type you are concerned about and open the nodes below that condition type. Each of the steps under the condition type, should give you some information on how the calculation is done.

If you are unable to follow, please reply with details on the steps you did, with screenshots, so that we may further assist you.

Thanks,

Juwin

Read only

Former Member
0 Likes
5,518

My condition type is a customised condition type of VPRS .

The analysis screen shot is as follows:-

The program RV63A900  exists . In VF03 , when i double clicked on my condition type the debugger started . so it stopped at the condition type .

The code for the program is

form frm_kond_basis_900.

if komp-pstyv = 'IRRA'

or komp-pstyv = 'ZEN'.

  xkomv-kstat = 'X'.

endif.

endform.

What is next step .

pooja

Read only

Juwin
Active Contributor
0 Likes
5,518

As the message says, the condition value is being carried forward from the preceeding document. It is not getting calculated in invoice. The formula 900, is just used to mark the pricing condition as statistical. It also is not doing any calculation.

So, you will have to check how the value is being determined in the preceeding document.

I am almost certain that it is related to standard cost of the material, maintained in Accounting tab of the material master.

May I know what's the reason you are trying to debug this?

Thanks,

Juwin

Read only

Former Member
0 Likes
5,518

Yes ,amount 10433.44 SEK is coming from PGI document.

I wanted to know the calculation for

Amount = 573.82EUR

condition value = 1147.63EUR

There is a difference in values compared to SO .

there the values are

amount:- 573.81EUR

condition value :- 1147.62EUR

currency exchange is

1EUR = 9.09130 SEK

What is causing the difference in amount ?

which program I can see the formula how this amount and condition value is calculated in billing?

this is the issue

pooja

Read only

Juwin
Active Contributor
0 Likes
5,518

Are you investigating difference of 0.01 EUR? May be it is caused by some rounding in some calculations.

I haven't gone into the depths of cost calculation. Hence, I will not be able to help you in that area.

Thanks,

Juwin

Read only

Former Member
0 Likes
5,518

Normally we don't do pricing in a delivery document. I think the price is coming from your Sales Order/STO.

It will be better if you debug/analyze there.

Read only

Lakshmipathi
SAP Champion
SAP Champion
0 Likes
5,518

First of all, from functional point of view, you have not explained for what Business requirement, you have considered two condition types with Condition Category "G" which will not work as per standard functionality. 

Also as per note 547570, for VPRS condition

  • If the condition control (KSTEU) is set to 'H', the cost was taken from the goods issue.
  • If it set to 'A', it was redetermined from the valuation segment of the material master,
  • in case of 'D' or 'E' it was copied from the preceding document.

and in your case, system has considered "H", which means, it has taken from Goods Issue.

G. Lakshmipathi

Read only

0 Likes
5,518

Thank you Lakshmipathi .Please see the attachment again.

amount 10433.44 SEK is correct and is coming from PGI .

The error is coming when the amount is converted to EUR

amount 573.82 EUR

condition value 1147.43EUR

There is a difference in values compared to SO .

there the values are

amount:- 573.81EUR

condition value :- 1147.62EUR

currency exchange is

1EUR = 9.09130 SEK

Wanted to know if this conversion is happening in billing or somewhere else and how can i debugg this particular scenario . wanted to see the actual value and what rounding off takes place .

Pooja

Read only

0 Likes
5,518
condition types with Condition Category "G" which will not work

Did you see this comment ?  I believe your pricing procedure have two condition types; one VPRS and another Zee condition type both having the same cndition category in which case, system will not work in the way you were expecting.

G. Lakshmipathi

Read only

0 Likes
5,518

Hello,

we only got one condition type . VPRS is not there . Only the Z condition type I am talking about .

Pooja

Read only

Former Member
0 Likes
5,518

hello everyone ,

any solution for the above query

pooja

Read only

0 Likes
5,518

any solution for above problem. need to debug the vf03 to see the calculation, how the net amount and %percentage calculated.please help on this. urjent