on 12-18-2008 10:54 AM
Hi all,
I have three condition types, ZCIF, ZFRE, ZFBP. My aim is to bring ZFBP = ZCIF - ZFRE.
I have written a routine with the help of my SD consultant. My logic is working fine in VA01, VF01, VF02. The problem i'm facing is when the user changes the value in VF01 and save again, it is not updating the pricing with the new value.
But the if the user changes new values in VA01 and VF02 and save, then it is working.
Please help me in this. Usefull answers will be surely rewarded.
The code i used inside the routine is as follows. (Routine is attached in ZFBP in pricing, (V/08))
READ TABLE lit_xkomv INTO lfl_xkomv1
WITH KEY kschl = ZCIF.
IF sy-subrc EQ 0.
READ TABLE lit_xkomv INTO lfl_xkomv2
WITH KEY kschl = 'ZFRE'.
IF sy-subrc EQ 0.
lfl_xkomv-kwert = lfl_xkomv1-kwert - lfl_xkomv2-kwert.
lfl_xkomv-kbetr = lfl_xkomv1-kbetr - lfl_xkomv2-kbetr.
xkomv-kwert = lfl_xkomv-kwert.
xkomv-kbetr = lfl_xkomv-kbetr.
xkwert = lfl_xkomv-kwert.
ELSE.
xkomv-kwert = lfl_xkomv1-kwert.
xkomv-kbetr = lfl_xkomv1-kbetr.
xkwert = lfl_xkomv1-kwert.
ENDIF.
If you have not already used Subtotal WORKD and XWORKE, or Calculation Type 12
You could also just utilize these to get your result, and save the ABAP code completely
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi
I think the problem is with Copy control here.
Goto VTFA (if you are creating billing document from Sales order directly) there select your combination of sales order and billing document. On Left hand side click one "item" and there change "Pricing type" to 'B'.
Hope this will work. Try it and revert.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
91 | |
10 | |
10 | |
6 | |
5 | |
5 | |
5 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.