on 10-17-2006 9:37 AM
User exit is sales order processing where all the line item data in accessible before saving the sales order, before USEREXIT_PRICING_PREPARE_TKOMP..
Objective is to fill the Z field in the TKOMP structure(in the line item level) with a value which can be determined from seeing all the line items.ie.. All the line item data should be visible in processing a single line item.
for example , if i have 5 materials with
material Pricing Group Zcount
M1 PG1 3
M2 PG2 2
M3 PG1 3
M4 PG1 3
M5 PG2 2
in the above example , i've five line items (materials ) where M1,M3,M4 belong to one pricing group PG1 and M2 and M5 belong to another pricing group. Now As 3 materials belong to one PG1 , the respecive line items should be filled the count value 3 (3 materials belogn to PG1 ) .
and based on the TKOMP values (material,sales org,zcount) , my pricing conditions are maintained.
here , when i've entered 5 line items and press "enter", i want to populate the M1 line item with 3 in the form USEREXIT_PRICING_PREPARE_TKOMP, i could not able to caliculate the zcount as 3 as i'm able to access only one line item in TKOMP and one line item in XVBAP. so i cannot get the visibility of all the line items.
so we need the right exit for this requirement before
USEREXIT_PRICING_PREPARE_TKOMP where all the line item visibility is there.
in the USEREXIT_PRICING_PREPARE_TKOMP you have access to xvbap.
1. you can create your own Table
ixvbap[] = xvbap[].
and you can calculate your numbers of rows in a loop.
other possibility : the group-conditions ( Gruppenkonditionen ) on your pricing-group. There is a Structure for the group-prices avalible in the userexit - but i don't know the name at home by heart.
Hans
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Do you also actually want to calculate pricing based on that Z field ? ( because you only speak about 'before save' you want the fields to be filled ) IF not you should use other exit : USEREXIT_SAVE_DOCUMENT_PREPARE )
If yes, be aware that if you enter 5 items and thne press enter, you will go through this exit multiple times and xvbap will be gradually filled ( put break-point in function module 'PRICING' )
regards
Dirk
User | Count |
---|---|
100 | |
8 | |
8 | |
5 | |
4 | |
3 | |
3 | |
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.