cancel
Showing results for 
Search instead for 
Did you mean: 

Charge calculation - FTL - charging configuration by total number of packages.

Former Member
0 Kudos

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.

former_member627657
Discoverer
0 Kudos

Good Morning! You can change the calculation mode through the business partner, for example: open the business partner (shipping agent) and with the carrier expansion click on (purchases) and then on (shipping data purchasing organization) in the general data change the ID of the calculation profile to (road calculation profile per step) ) ie, at each step of your transport which are the quantities of lines generated in the freight calculation, the system will distribute the values entered in the tariff table, if after this change the error persists, keep the previous changes and go to the diagram. calculation and set the item that calculates to RESOURCE. Hope this helps. thank you.

Accepted Solutions (0)

Answers (3)

Answers (3)

0 Kudos

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.
former_member627657
Discoverer
0 Kudos

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.

Former Member
0 Kudos

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.

Former Member
0 Kudos

Hi Tarang,
thanks for helping...

but it does not seem to work.

rate table resolution and grouping:

the rate table is based on 1 scale QUANTITY_VAL

for this example 5 packages should result in 400

the system aggregate correctly to 5 --> 400

but then multiply by the item count 3

this result in 400 * 3 = 1200

tarunkumar
Active Participant
0 Kudos

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.

Former Member
0 Kudos

Grouping by ITEM_CATEGORY should also work, it worked for me. I have done that for weight, and it worked for both group by - item_category and chrg_weight

Former Member
0 Kudos

Grouping by ITEM_CATEGORY the result were multiplied

Grouping by QUANTITY_VAL the were no groping.

sadly this does not seem to work, any ideas why?

could you confirm QUANTITY_VAL details? (including related calculation base tab)

I want to make sure we did not change anything in it initially.

tarunkumar
Active Participant
0 Kudos

try using 'PACKAGE_TYPE' for grouping the quantities in your grouping rule. I'm assuming that you want to add the quantities of same packages types together but not want to sum up all the packages quantity irrespective of their types.

Former Member
0 Kudos

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

Former Member
0 Kudos

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.

Former Member
0 Kudos

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?

Former Member
0 Kudos

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.

Former Member
0 Kudos

Hi,

no container, since in LTL we send pallets.

no service as well.

I tried with several different resolutions...

so far, my work around is to put all of the different packages inside another package and maintain its quantity manually.