12-31-2012 6:00 AM
Hi,
Can anybody know that which field from KOMV is used for differentiating the condition types which are applied on header level and on item level.
Regards,
Shahezad
01-01-2013 9:26 AM
Hi Shahezad ,
I Guess you requirement resembles with the below thread .
Please check it out :
01-01-2013 9:42 AM
Hi,
Thanks, but
The business requirement is that suppose if i delete the one condition say "JCEP" which is for discount from one material so i need that the sum which is calculated at header level has to be affected means that the sum has to be decrease by that JCEP Condition Value.
01-01-2013 10:06 AM
Hello Shahezad ,
Are you designing a pricing procedure ?
If yes then its Functional issue and should discussed with the concerned.
If its for reporting or any other developments then automatically changes are made to Document's pricing aspects whenever a change is made with the pricing procedure.
01-01-2013 10:21 AM
Hello Sijin
I am not designing pricing procedure i have did coding in
Program name : SAPMV45A
Include name : MV45AFZZ
Implicit Enhancement : USEREXIT_PRICING_PREPARE_TKOMP.
that my code get executed the thing is that i am deleting one condition from one material or at item level say "JASS" so i want its condition value which is calculated at header level needs to be deleted say condition value on 'JASS' at item level is 200,00 if i delete it so this value would have to be deleted or decreased from header level of 'JASS' condition.
01-01-2013 11:05 AM
Hi Shahezad ,
If a condition type (say JASS ) is maintained as deletable then whenever its value will be deleted from Line item level then automatically its changes will reflect at header level , as far as I know.
01-01-2013 11:23 AM
Hi Sijin,
Thanks but would you know where is this maintained as deletable so that i can check it out
Regards ,
Shahezad
01-01-2013 11:39 AM
Hello Shahezad ,
Tcode : V/06.
Give ur condition type : Say JASS.
And see the Properties as shown in below example screen shot.
01-02-2013 7:48 AM
Hi Sijin,
yes i did this ,actually the thing is i am setting or putting condition at header level ,that condition is going to be copied at all item level ,so if suppose say i have applied condition "JASS"
at header level and set its value or amount 200 and added new material or item so header value is coming or in item and again calculation goes on so the sum of item values is coming at header level
so the value of condition 'JASS' becomes 400 and suppose if i delete that condtion from item forcefully because manually we can not do it so i am deleting it by code but its value is not decrementing from header level.
Regards,
Shahezad
01-02-2013 8:54 AM
Hello Shahezad ,
As per your statement
if i delete that condtion from item forcefully because manually we can not do it so i am deleting it by code but its value is not decrementing
How you are deleting forcefully ?
Are you altering table data ?
If yes , then its not recommended and it will definitely lead to such discrepancies.
01-02-2013 11:37 AM
hi Sijin,
In Sales Document
We have Header Condition and Item Condition
In Configuration V/06 we have header and Item checked.
When Header Condition is applied it applies to all the item condition to all material,
but there are few materials where header condition should not be applied to item condition.
We have achived this by using USER_EXIT 'USEREXIT_PRICING_PREPARE_TKOMP'
Where we are deleting item condition which is in xkomv internal table, this is reflecting in Screen as well.
But condition value is not getting changed in header condition
Example
At Header Level
JASS : 200
JASS Needed at Item1 but not in Item 2
At Item Level
Item 1
JASS: 100
Item 2
JASS: 100
After execution of our user exit
Item1
JASS: 100
Item2
JASS is Deleted
So in Header Condition JASS should be : 100 instead of 200 which is not happening.
Please Suggest.
01-03-2013 5:05 AM
Hi Shahezad ,
Instead of altering xkomv using UserExit MV45AFZZ depending on your particular condition (i.e for Particular Materials) probably there can be a solution using SPRO.
i.e by doing related changes in Pricing Technique.
Condition records , Condition schema , Condition exclusion bla bla
So better try with a Functional Solution or post a thread in SAP SD forum or consult with your Function Consultant.
And after that only try with MV45AFZZ.
01-08-2013 10:58 AM
Hi all,
If we put condition on Header Its applies on all item,with the help of MV45AFZZ and some tables we exclude this condition in some service materials,its deleted only item level but calculating on header,we want to system should delete in item level and calculate as per items level ,i think not possible to change the pricing procedure for some service materials because this condition is using on all material and its standers condition
Please Suggest.
Regards,
Uzair
SD CONSULTANT
01-16-2013 6:58 AM
Hi Sijin,
and i had posted this on SD Forum i again got that problem now i tried for to solve this with routine but didnt got anything
actually the problem is
I have a requirement to distribute the header pricing condition to specific line item or we can say particular set of material this line item has different item category.
Example : Order has 4 line items it has line 10 and 20 and 30 and 40 , than Order header condition 2 percent should be disctributed to line 30 and 40 only.
and in at item 10 and 20 i want this 2 percent condition to be deleted.
Regards,
Shahezad
01-16-2013 7:07 AM
01-16-2013 7:47 AM
Hi,
Here i am pasting that code but it wont work properly
i have created this routine in vofm --> formula--> condition value --> 600
DATA : wa_tkomv like line of tkomv,
wa_xkomv LIKE LINE OF xkomv.
IF komp-matnr = 'YA01'.
Clear : wa_tkomv,wa_xkomv.
LOOP AT xkomv INTO wa_xkomv.
IF ( wa_xkomv-kschl = 'JASS'
OR wa_xkomv-kschl = 'JCEQ'
OR wa_xkomv-kschl = 'JCEP'
).
IF ( wa_xkomv-kherk = 'D' AND WA_XKOMV-KPOSN = KOMP-KPOSN ).
READ TABLE tkomv INTO wa_tkomv WITH KEY kherk = 'D' kposn = komp-kposn kschl = wa_xkomv-kschl.
DELETE TABLE xkomv FROM wa_xkomv.
delete table tkomv from wa_tkomv.
ENDIF.
ENDIF.
ENDLOOP.
ENDIF.
IF komp-matnr = 'M1'.
Clear : wa_tkomv,wa_xkomv.
LOOP AT xkomv INTO wa_xkomv.
IF ( wa_xkomv-kschl = 'JASS'
OR wa_xkomv-kschl = 'JCEQ'
OR wa_xkomv-kschl = 'JCEP'
OR wa_xkomv-kschl = 'JEAT'
).
IF ( wa_xkomv-kherk = 'D' AND WA_XKOMV-KPOSN = KOMP-KPOSN ).
READ TABLE tkomv INTO wa_tkomv WITH KEY kherk = 'D' kposn = komp-kposn kschl = wa_xkomv-kschl.
DELETE TABLE xkomv FROM wa_xkomv.
delete table tkomv from wa_tkomv.
ENDIF.
ENDIF.
ENDLOOP.
ENDIF.
IF komp-matnr = '000000000000000051'.
Clear : wa_tkomv,wa_xkomv.
LOOP AT xkomv INTO wa_xkomv.
IF ( wa_xkomv-kschl = 'JASS'
OR wa_xkomv-kschl = 'JCEQ'
OR wa_xkomv-kschl = 'JCEP'
OR wa_xkomv-kschl = 'JEAT'
OR wa_xkomv-kschl = 'JEAQ'
).
IF ( wa_xkomv-kherk = 'D' AND WA_XKOMV-KPOSN = KOMP-KPOSN ).
READ TABLE tkomv INTO wa_tkomv WITH KEY kherk = 'D' kposn = komp-kposn kschl = wa_xkomv-kschl.
DELETE TABLE xkomv FROM wa_xkomv.
delete table tkomv from wa_tkomv.
ENDIF.
ENDIF.
ENDLOOP.
ENDIF.
01-16-2013 8:34 AM
Is it triggering at VF01 ?
or
Are you finding error in the logic you have written ?
01-16-2013 9:03 AM
It is triggering in VA02 where i want but it would deleting conditions from item but values of that conditions are coming as some at header level as i am deleting these condtion i dont want there values to be aaded at header level.