on 02-26-2015 4:58 PM
Hallo experts,
I'm struggling with a simple rate table with the following logic:
An LSP For LCL shipment is charging by the total number of pallets loaded.
example, loading
1 pallet --> price is 100
2 pallet --> price is 180
3 pallet --> price is 230
In TM we have a structure for package,
what is the way to set a rate table that sums the number of packages?
assume the result for the 3 packages in the above picture should result in charging 230.
(1 + 2 = 3 --> 230)
thanks for those able to help.
hi,
you need to create a new calculation base. Behind this calc base you put a help class.
This helper class reads the pallet quantity from the header. then, you create a rate table with calc base pallet and make a calculation rule with a price per pallet.
This will cover your requirement. sample helper class:
METHOD /SCMTMS/IF_TCC_CALC_BASE~GET_CALC_BASE_VALUES.
DATA:
lo_context TYPE REF TO /scmtms/cl_tcc_tsps_context.
FIELD-SYMBOLS:
<ls_calc_base_key> TYPE /scmtms/if_tcc_bus_data_acc=>ty_calc_base_key,
<ls_calc_base_value> TYPE /scmtms/if_tcc_bus_data_acc=>ty_calc_base_value,
<ls_comm_root> TYPE /scmtms/s_tcc_comm_root,
<ls_request_data> TYPE /scmtms/if_tcc_engine=>ty_request_data.
READ TABLE it_requests ASSIGNING FIELD-SYMBOL(<fs_requests>) INDEX 1 .
CHECK <fs_requests> IS ASSIGNED.
LOOP AT it_calc_base_keys ASSIGNING FIELD-SYMBOL(<fs_calc_base_key>).
IF <fs_calc_base_key>-calc_base_name = 'ZADD_METRAGE'. "refer ti the calc base name
READ TABLE ct_calc_base_values ASSIGNING FIELD-SYMBOL(<fs_calc_base_value>)
WITH TABLE KEY calc_base_key = <fs_calc_base_key>.
IF <fs_calc_base_value> IS ASSIGNED.
<fs_calc_base_value>-qty_value_num = GET_QTY( <fs_requests>-root_key ).
ENDIF.
ENDIF.
ENDLOOP.
ENDMETHOD.
method GET_QTY.
DATA lt_root_key TYPE /bobf/t_frw_key.
CLEAR rv_pallet_qty.
REFRESH lt_root_key.
APPEND VALUE #( key = iv_key ) TO lt_root_key.
/scmtms/cl_tor_helper_read=>get_tor_data(
EXPORTING
it_root_key = lt_root_key
* iv_before_image =
IMPORTING
et_root = DATA(lt_root) ).
READ TABLE lt_root ASSIGNING FIELD-SYMBOL(<fs_root>) INDEX 1.
CHECK <fs_root> IS ASSIGNED.
IF <fs_root>-ZLOADSPACE IS NOT INITIAL. "replace with field for alternative qty
rv_pallet_qty = <fs_root>-ZLOADSPACE.
ENDIF.
endmethod.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Bom dia!
Você pode alterar o modo de calculo através do parceiro de negócio , por exemplo :
abra o parceiro de negócio (agente de frete) e com a expansão para transportadora clique em (compras) e em seguida em (transporte dados organização de compras) nos dados gerais mude o ID do perfi de calculo para (perfil de calculo rodoviario por etapa) ou seja, a cada etapa do seu transporte que são as quantidades de linhas geradas no calculo de frete , o sistema irá distribuir os valores inseridos na tabela de tarifa, se após esta alteração persistir o erro, mantenhas as alterações anteriores e vá no esquema de calculo e defina o item que efetua o calculo como RESOURCE.
espero ter ajudado.
obrigado.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You can define the Grouping Rules for Resolution Base in Master Data (Maintain Charge Calculation
Rules (/SCMTMS/TCM_RULES)) and then in the calculation sheet item for your charge set the Calculation Resolution Base to Package and assign that grouping rule. For grouping rule you can use 'Group Data Source By' ITEM_CATEGORY.
During charge calculation the system will then combine the values from all packages and fetch the rate accordingly.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You have to change your group by field to 'QUANTITY_VAL' instead of 'ITEM_CATEGORY'. Then, system will add up the quantity of packages to do a collective rate lookup and final amount for all charge lines (individually according to the logistical data on that charge line) belonging to same grouping rule will be calculated.
Hi,
Again the result is multiplied:
3 package all of 1 PC, total is 3X1 = 3
Should result in 3--> 270
but the system calculates 3 X 270 = 810
could you detail which version do you use?
in any case, not using different package type,
actually it is an LTL - when the charge is based on the number of pallets, so there might for example:
2 pallets - product A
1 pallets - product B ; Total is 3 pallets --> 270
which is the same for 3 pallets - product X ; total is 3 pallets --> 270
Do you expect the charges to be kept as 270 instead of multiplying by total number of packages? Then please check your rate table where I guess the scale is defined with 'Relative' calculation type and have the calculation rule per pallet (or per quantity UoM).
Please define the absolute calculation type if you do not want the quantity to be multiplied by the determined rate.
Hi,
Calculation Type was set to Absolute.
I'm expecting 270, as the charge is per the total number of packages.
example:
if total packages is 1 price is 100
if total packages is 2 price is 190
if total packages is 3 price is 270
in this case, having a FO with combined
1 package with 1 pieces
1 package with 1 pieces
1 package with 1 pieces; should result in 3 --> 270.
at the moment the system calculated incorrectly:
3 --> 270
3 --> 270
3 --> 270; total 810
all could be seen in the pictures.
could you confirm what result and system version you are facing?
could you set 3 different line item - packages.
and see if he price is calculated once per all the 3 combined packages?
The three charge lines are appearing because the Calculation Resolution Base is Package. So you expect only one charge line which would have a price based on aggregated quantity from all packages. Sorry for having understood so late.
Are the packages inserted inside a main cargo item such as container? If so then you can try with calculation resolution base 'MAIN_ITEM'.
Is the charge type assigned to a service and than you can try with calculation resolution base 'SERVICE'
May be you can try with some different resolution bases in your case which would give you just one data source so that only one charge line is resolved.
User | Count |
---|---|
7 | |
4 | |
3 | |
2 | |
2 | |
1 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.