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

Wrong result from GET_HEAD_PRICE_TABLE

TMNielsen
Contributor
0 Likes
712

Hi can anyone explain this:

In Smartforms I use function module GET_HEAD_PRICE_TABLE to read conditions.

When users changes the value of a header condition (in this case freight), the FM continues to return the old value. In below example you can see the KWERT 500,00 for condition ZHD1, but in next screen dump you can see that current value in the sales order is actually 800,00. The user changed the value from 500 to 800, but somehow the FM seems to pick up the old value.

Has anyone seen this error before?

Hi can anyone explain this:

In Smartforms I use function module GET_HEAD_PRICE_TABLE to read conditions.

When users changes the value of a header condition (in this case freight), the FM continues to return the old value. In below example you can see the KWERT 500,00 for condition ZHD1, but in next screen dump you can see that current value in the sales order is actually 800,00. The user changed the value from 500 to 800, but somehow the FM seems to pick up the old value.

Has anyone seen this error before?

3 REPLIES 3
Read only

krishna_k19
Contributor
0 Likes
667

Hi thomas,

     The condition value will store in KBETR field ,you have to take the data by multiplying with 100 and pull the data.

Regards,

Krishna

Read only

0 Likes
667

Thanks for your reply Krishna

..but I don't agree. The KBETR hold a price or percentage and is just one parameter in the value calculation. The calculation needs to be done in a number of variaus ways depending on the condition parameters.

One purpose of the function module should be to take care of all the different ways to calculate the condition value and return the result in KWERT.

A funny detail is the distribution of header conditions to the items as un-changable conditions. In this case there is only one item 10, so the whole condition value is distributed to that item, and as you can see from the screen shot, the condition value KWERT of ZHD1 on item 10 is the correct amount 800.

Best Regards

Thomas

Read only

TMNielsen
Contributor
0 Likes
667

I solved my problem.

I was reading the condition in table KOMV, but the function module also returns the condition in table tkomvd, and in this table the KWERT is correct.

I.M.O. this is an error in GET_HEAD_PRICE_TABLE, but I think I managed to work around it.

Best regards