on 08-01-2014 1:57 PM
Hello there.
I have the following situation and I'd be really glad if someone help me. I'll try to keep it as hypothetical as possible, because I believe that this problem goes with my copying control.
I have created a sales order (A) and posteriorly its' billing (A), both sharing the same pricing (A), everything's working well here. The thing is: I've also created a new sales order (B) based on billing (A), it happens that this new sales order's pricing (B) has the very same conditions of pricing (A), the only difference between them is that some condititions are statisticals in pricing (B), differently of pricing (A). However, when I create this sales order those conditions are not coming up with the statistic check, then I believe my copying control is responsible for that and I wonder how could I change it.
I am not quite sure if this kind of explanation is the best way to call for help here, so if you need further information, please, let me know.
Thank you in advance.
Caio.
Hello there.
My problem was solved by creating two enhancement points as it is shown below:
INCLUDE LV69AFZZ
FORM USEREXIT_CHANGE_PRICING_RULE USING P_RV61A_KSTEU.
ENHANCEMENT 1 ZTEST1. "active version
set PARAMETER ID 'KSTEU' FIELD p_rv61a_ksteu .
ENDENHANCEMENT.
INCLUDE MV45AFZB
FORM USEREXIT_NEW_PRICING_VBKD CHANGING NEW_PRICING.
ENHANCEMENT 2 ZTEST2. "active version
data: t_t683s type TABLE OF t683s WITH HEADER LINe,
wa_vbrk type vbrk,
v_tabix type sy-tabix,
v_ksteu type ksteu.
CONSTANTS: c_a(1) value 'A',
c_z(1) value 'Z'.
IF SY-TCODE eq 'VA01' OR
SY-TCODE EQ 'VA02'.
GET PARAMETER ID 'KSTEU' FIELD V_KSTEU.
select count(*)
from tvcpa
where auarn eq vbak-AUART
and fkarv eq vvbrk-fkart
and pstyv eq VVBRP-PSTYV
and pstyn eq vbap-pstyv
and knprs eq c_z.
if sy-subrc eq 0 or
V_KSTEU eq c_z.
select *
from t683s
into TABLE t_t683s
where KVEWE eq c_a
and kalsm eq vbak-kalsm.
sort t_t683s by kschl.
loop at xkomv.
v_tabix = sy-tabix.
read table t_t683s with key kschl = xkomv-kschl
BINARY SEARCH.
if sy-subrc eq 0 and
xkomv-kstat ne t_t683s-kstat.
xkomv-kstat = t_t683s-kstat.
modify xkomv index v_tabix.
endif.
endloop.
endif.
ENDIF.
ENDENHANCEMENT.
And I also set "Z" in TVCPA-KNPRS:
Regards.
Caio.
Message was edited by: Caio Almeida de Souza
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Is your new sales order B the same order type as the Sales order 'A'?
Usually Debit and credit memo requests are created with reference to a billing document. They tend to have their own pricing procedure by means of the document pricing procedure indicator.
Check if there is some calculation routine assigned to the condition types that marks it statistical? I don’t think there is a setting in copy control which controls the condition types to be made statistical in the referenced document.
Thanks,
Ravin
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Ravin,
They are two different types of documents, but both documents have the same category "C".
The sales order "B" has its own pricing procedure and this procedure has the same conditions of the pricing procedure assigned to sales order "A". The only difference between these procedures is statical check for some conditions.
There is no calculation routine assigned to any of these conditions either.
When I mentioned the copying control I meant the pricing type of the items. Like this:
I could use the pricing type "B", but most part of this pricing procedure was made with manual conditions, then I'd lose their values using this option.
Is there anything I can do about it?
Thanks!
Caio.
Hello Ravin,
Thanks for answering me again, it has been very helpful.
I already have tried with "C", however, the statistical checks still did not come activated.
You may like to know that while creating the new sales order I deleted those manual conditions and created new ones just to see the system's behaviour, as result of this test I could see that the statistical checks were finally been activated, then I belive that when we reprocess conditions manually in cases like that, the system sets the statistical check as the pricing procedure demands, but firstly it accepts this check as it comes from the document of reference.
Unfortunately I can not ask to our users to reprocess all those conditions manually once I already have them in my referenced billing document.
As far as I know, there are customer entries for these pricing types, should I try something via ABAP?
Thank you.
Caio.
Message was edited by: Caio Almeida de Souza Image added.
User | Count |
---|---|
100 | |
11 | |
10 | |
6 | |
6 | |
5 | |
4 | |
4 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.