2012 Jul 10 12:43 PM
Hi all,
we have implemented DBM Packages for certain predefined tasks. Some of those packages are with fixed price. The issue begins when we
split the order. Then the all items which belongs to the package are recalculated with the prices for other customer. What we want is that the base price
for items in package to stay the same for all splits. Acording to SAP note :
![]() |
this is an standard behaviour for DBM 6.0 but there should not be restriction in 7.0 at least for manually entered prices . The /dbm/pricing_c1 should be customized to transfer manual price to split. So the question: Do you have any clue how the customizing should be set so the packages should transfer their base value to all splits. Which field should I use to achieve such behaviour? An other possibility is to create new Z - field and put in it the value for item calculated during adding package in dbm order . And than transfer that value to next splits.
Thanks in advance Ogi
2012 Jul 12 1:33 PM
So to resume what shoudl be the right answer to the question acording to me.
First you have to create new condition in pricing procedure ( you can not use QPK1, because if you use it in fast entry customizing unexpected behaviour occurs - the prce is tranfered to JOB price directly, or at least it was unexpected behaviour for me) .
Let call this new pricing condition YPK1 . Than you have to create two entires fro each line item type in /DBM/PRICING_C1 one for /dbm/vbap_com and one fro /dbm/split_com the display should be empty in those fields. Then extend /dbm/vbap_com and /dbm/split_com whith follwing
z- fields
ZQPK1 type cuurency , of _K1
ZQPK1_K1 type koein,
ZQPK1_K2 type koein
You have to create new action in event Item_new,
which checks for selected items are curent item part of package if yes thake the price object for
lo_ord_pricing ?= lo_order->object_get(
iv_classname = /dbm/cl_ord_pricing=>cv_object_name
iv_key = /dbm/cl_ord_pricing=>cv_object_key ).
lo_pricing = lo_ord_pricing->instance_get( iv_knumv = lo_order->ms_vbak_com-knumv ).
LOOP AT lo_pricing->gt_komv ASSIGNING <fs_komv>
WHERE kposn = <fs_vabap_com>-posnr
AND kschl = 'QPK1'.
ls_item_detail-zbas_qpk1 = <fs_komv>-kwert. " Callculated discount
ls_item_detail-zbas_qpk1_k1 = lo_order->ms_vbak_com-waerk. " take it from header you have no access to gs_komk (Nobody knows why).
.
Put YPK1 in the same exeption group like QPK1 in pricing procedure.
And that shoudl work more or less.
Regards Ogi
2012 Jul 10 3:58 PM
Hi Ogi,
with DBM700 you can transfer pricing fields from the /dbm/vbap_com to /dbm/split_com.
For packages you first have to map the conditions to /DBM/vbap_com fields as described in note:
Note 1055913
The append fields you also need for /dbm/split_com and entries for both in table /dbm/pricing_c1.
Than switch on the mapping per item category and the prices will be transferred to all the splits.
Be carfull with 0 price packages as implementation of a 0 value in the mapping could be tricky.
Best regards
Robert
2012 Jul 11 9:09 AM
Hello Robert,
I am probably missing something. The note you give to me is how I should create my own fast enty field.
The issues is that the pricing procedure for packages fills conditions
QPK1 DBM Package Price with value during package addition to the DBM Order for split one. There no
fast entry field for this value in /dbm/vbap_com. The value itself stays in Subtotal 5 in
ms_vbap_com-KZWI5. So your proposal is to move this value in new fast entrie field and make all this /dbm/pricing_c1 or something else ?
What i can not uderstand is why the item is not copied even if I am activated
/DBM/IF_EX_PRICING_COM-CAN_COPY_VBAP_PRICE2SPLIT where the cv_result = 'X' by default. But the price is calcualted like the price of second customer not the package price. Do you have any clue how QPK1 condition is filled with value and can i make the same during the creating of new split.
Regards Ogi.
2012 Jul 11 9:42 AM
Hi Ogi,
to copy prices to the splits with DBM700 they have to be first transferred to a field in /dbm/vbap_com which usually in DBM is done via the fast entry mapping.
So you can use the mapping as described in the note to copy the condtion value of QPK1 to let's say /dbm/vbap_com-zpk1.
This value will be than copied to /dbm/split_com-zpk1 and create the assigned condition also in the split.
Best regards
Robert
2012 Jul 11 11:34 AM
Hello Robert,
I created following lines in /DBM/PRICING_C1
FE ie cat |structure name |Field Name | CTyp
|/DBM/SPLIT_COM |ZBAS_QPK1 |QPK1
| /DBM/VBAP_COM |ZBAS_QPK1 |QPK1
P002 |/DBM/SPLIT_COM |ZBAS_QPK1 |QPK1
P002 | /DBM/VBAP_COM |ZBAS_QPK1 |QPK1
During debug I can see that the zfields are filled with the value (for first split only) but when I go to nex split (exept 001)
Value is not trasfered from the field to QPK1 ( there no QPK1 at all in pricing procedure for second split item) .
You mention in your first message
Robert Forster wrote:
Than switch on the mapping per item category and the prices will be transferred to all the splits.
What do you mean by that and chould it be the reason that no values were transefered.
Regards Ogi
2012 Jul 11 12:00 PM
Hi Ogi,
please check the following:
within the item categories the split pricing flag is set to space for P002.
Is the pricing procedure the same for header and split n?
Best regards
Robert
2012 Jul 11 1:23 PM
Hello Robert,
this is what I found if you set in /DBM/PRICING_C1-DISPLAY = 'X' then the ms_vbap_co-zfield is filed but then during copy value is not copied (/DBM/CL_ORD_SPLIT->COPY_VBAP_PRICE2SPLIT). Again if display is initial then the ms_vapb_com-zfield is not ok ( but if you set it manually in debug) than during copy the system expect customozing to be set to space and the value is transfered ? Am I missing something? Back to your question P002 split is set to space and the pricing procedures are the same.
Best Regards Ogi
2012 Jul 11 1:29 PM
Hi Ogi,
thats correct the display = X is only used for automatically determined conditions and to display there values.
In you case you would like the write a value from vbap 2 split therefore it should be not display only.
Best regards
Robert
2012 Jul 11 1:44 PM
Hi Robert, but if you set display ='' than during the package insertion the price is not transferred to z-field and than you have noting to copy. So in this case how should I fill vbap_com-zfield correctly. Should I implement new action in event Item_new and when ever there is a package item I should move calculated QPK1 to new zfield? and than the customizing should stay with display = ''.
Regards Ogi
2012 Jul 12 1:33 PM
So to resume what shoudl be the right answer to the question acording to me.
First you have to create new condition in pricing procedure ( you can not use QPK1, because if you use it in fast entry customizing unexpected behaviour occurs - the prce is tranfered to JOB price directly, or at least it was unexpected behaviour for me) .
Let call this new pricing condition YPK1 . Than you have to create two entires fro each line item type in /DBM/PRICING_C1 one for /dbm/vbap_com and one fro /dbm/split_com the display should be empty in those fields. Then extend /dbm/vbap_com and /dbm/split_com whith follwing
z- fields
ZQPK1 type cuurency , of _K1
ZQPK1_K1 type koein,
ZQPK1_K2 type koein
You have to create new action in event Item_new,
which checks for selected items are curent item part of package if yes thake the price object for
lo_ord_pricing ?= lo_order->object_get(
iv_classname = /dbm/cl_ord_pricing=>cv_object_name
iv_key = /dbm/cl_ord_pricing=>cv_object_key ).
lo_pricing = lo_ord_pricing->instance_get( iv_knumv = lo_order->ms_vbak_com-knumv ).
LOOP AT lo_pricing->gt_komv ASSIGNING <fs_komv>
WHERE kposn = <fs_vabap_com>-posnr
AND kschl = 'QPK1'.
ls_item_detail-zbas_qpk1 = <fs_komv>-kwert. " Callculated discount
ls_item_detail-zbas_qpk1_k1 = lo_order->ms_vbak_com-waerk. " take it from header you have no access to gs_komk (Nobody knows why).
.
Put YPK1 in the same exeption group like QPK1 in pricing procedure.
And that shoudl work more or less.
Regards Ogi