2010 Apr 19 12:34 PM
Hi Experts,
I am using a requirement routine in my Z condition type.
In invoices for new sales orders, the condition is coming directly at the line item level.
In the older open sales orders, at the time of creation of invoices we are manually entering this condition type at the header level. We don't enter any value at the header level. The routine calculates the values properly when we go to the line item condition tabs. But after saving the invoice, in change mode the value is being displayed as 0 against this condition type.
In case we enter the condition type at the item level, the same values are being displayed and the values get saved correctly. But since the number of line items are generally more than 100 at the invoice level, the users can't be expected to enter all condition type for all the line items.
I am writing the code in the form kobed_903. form kobev_903 is not accessed. SAP notes says that kobed is for the header and kobev for items. Can anyone suggest what am i doing wrong.
I am saving values as below.
read table tkomv assigning <f_komv> with key knumv = komk-knumv
kposn = komp-kposn
kschl = 'ZVPR'.
if sy-subrc eq 0.
<f_komv>-kbetr = 'Calculated Value'.
<f_komv>-kwert = 'Calculated Value'.
<f_komv>-kwert_k = 'Calculated Value'.
<f_komv>-waers = 'AED'.
<f_komv>-kwaeh = 'AED'.
endif.
*The form ends with
sy-subrc = 0.
Thanks,
Abdullah
Edited by: Abdullah Ismail on Apr 19, 2010 5:06 PM
Hi Experts,
I am using a requirement routine in my Z condition type.
In invoices for new sales orders, the condition is coming directly at the line item level.
In the older open sales orders, at the time of creation of invoices we are manually entering this condition type at the header level. We don't enter any value at the header level. The routine calculates the values properly when we go to the line item condition tabs. But after saving the invoice, in change mode the value is being displayed as 0 against this condition type.
In case we enter the condition type at the item level, the same values are being displayed and the values get saved correctly. But since the number of line items are generally more than 100 at the invoice level, the users can't be expected to enter all condition type for all the line items.
I am writing the code in the form kobed_903. form kobev_903 is not accessed. SAP notes says that kobed is for the header and kobev for items. Can anyone suggest what am i doing wrong.
I am saving values as below.
read table tkomv assigning <f_komv> with key knumv = komk-knumv
kposn = komp-kposn
kschl = 'ZVPR'.
if sy-subrc eq 0.
<f_komv>-kbetr = 'Calculated Value'.
<f_komv>-kwert = 'Calculated Value'.
<f_komv>-kwert_k = 'Calculated Value'.
<f_komv>-waers = 'AED'.
<f_komv>-kwaeh = 'AED'.
endif.
*The form ends with
sy-subrc = 0.
Thanks,
Abdullah
Edited by: Abdullah Ismail on Apr 19, 2010 5:06 PM
2010 Apr 19 12:39 PM
Are you updating the pricing of all the line items ? In this exit what is the value of "komp-kposn" ?
Are you using the mentioned code in loop, so that it will be applied to all line items?
Regards
Vinod
2010 Apr 19 12:43 PM
the routine is called for all the line items. I do not run a loop here. komp-kposn is the current line item number from the communication structure.
Thanks,
Abdullah.
2010 Apr 19 12:46 PM
Hi Abdullah,
Have you tried updating the structure "XKOMV" instead of "TKOMV". This a suggestion, as currently i don't have the SAP system, so that I can test the same.
Regards
Vinod
Edited by: Vinod Kumar on Apr 19, 2010 5:16 PM
2010 Apr 19 12:58 PM
XKOMV does not serve the purpose. I want to do some calculations and then save it against the condition type for the particular line item.
Thanks,
Abdullah.
2010 Apr 19 1:41 PM
If I enter the condition at the item level, the invoice saves the value. But if I enter the condition at the header level, the value is being displayed at the item level by performing the necessary calculations but it does not save. So I am changing the value of KHERK from D to C in the row of TKOMV for this particular condition type. The values are being stored now but is this advisable?
Thanks,
Abdullah
2010 Apr 19 1:50 PM
Can anyone also suggest why KOBEV routine is not called in VF01?
Thanks,
Abdullah
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |