cancel
Showing results for 
Search instead for 
Did you mean: 

Change Tlane during CTM

Former Member
0 Kudos

Hello ,

I need to change the Tlane when i am doing CTM.

For example if a prod location has 2 tlanes T1 and T2 . I want to mantain a ztable and based on that table i should be able to

select either T1 or T2 . Can you please let me know which badi or exit should i use.

My requirement is that : User wants that for some sales order he should be able to select rail as mode of transfer . he doesnot care even if the order is delayed. So he wants to calculate CTM based on his choice of Tlane.

Thanks

vikram chavan

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

You can try one of the following without enhancements.

1) Maintain quota for the RAIL MOT and do not check "Ignore quota".

2) If you have product level lane block all MOT other than RAIL for this product in the lane

If you cannot carryout the above due to some constraint, please check out the BADI below.

/SAPAPO/CTM_SOSEXT - CTM: Modify External Procmnt Sources of supply.

Regards,

Ashok

Former Member
0 Kudos

Hi Ashok ,

Thanks for the ans,

Just 1 question . My customer is saying that he wants to select RAIL as mode only for some sales orders and not for all sales orders therefore i cannot make any changes in at product level. SO is badi only the way out ... . if it is so which field i need to change .

Thanks

vik

Former Member
0 Kudos

Hi Vikram,

In this exit, in structure CT_TRANSPORT lanes with all MOTs will be populated (MOT is available in field TTYPE).

In your case if you delete all other lines other than the one with RAIL MOT, stock transfer will be created using RAIL MOT only.

I have tested this and it works fine.

Regards,

Ashok

Former Member
0 Kudos

Hi Ashok ,

Thanks for ur reply . My issue is that i have to choose rail or sea based in sales order number and ..this badi doesnt have sales order number in it .

regards

vikram

Former Member
0 Kudos

Hi Vikram,

If you want to control the orders that participate in CTM, you would have to implement BADI /SAPAPO/CTM_ORDSEL.

In this BADI structure CT_INNODE contains the order details.

In the structure, the field ORDERID contains the order header ID. You can pass this ID through HEADER field of /sapapo/ordadm_I table and pick the ID returned in field GUID. Pass this ID through POSID field of /sapapo/posmapn you will get the order number. You can use the order number to decide if the order should participate in your run or not.

If you donot want it to participate, delete the line corresponding to this order from CT_INNODE structure.

I tested this and it works fine...

Along with this change you would have to implement the other BADI if you want MOT selection dynamically or you could simply block all MOTs other then RAIL only for this CTM run.

Regards,

Ashok

Former Member
0 Kudos

HI Ashok

Thanks for your time .

1) Suppose i have 3 orders A, B , C. I want to run CTM for all 3 . In my case i want that for order B

only rail should be used and for A and C normal CTm should run . I could not find any link betw /SAPAPO/CTM_SOSEXT

and order badi . I agree with you that i delet MOT of other transport only rail will be selected. But i want to delete other mean of tp

only for order B

Pls help

thx

Former Member
0 Kudos

Hi,

What I suggested was 2 CTM runs, first run for sales orders which should go through rail MOT and 2nd run for all orders.

If you want it in a single run, you would have to modify the orders created by CTM for the particular orders.

There is another BADI /SAPAPO/CTM_ORDERS where you can modify orders created by CTM. Pls explore this one for pegging details. I will also check this out and let you know.

I need a clarification, do you want to just change the MOT for the source selected or you want the MOT to influence the source determination?. For the former, this BADI could help (if it contains pegging info) , if it is the latter you would have to go for multiple runs as suggested previously.

Regards,

Ashok

Former Member
0 Kudos

Hi,

Have checked it.

There is a structure CT_PEGGING in the BADI mentioned above.

The field To input node contains Order header ID, you can pass it through ordadm_i table and posmapn table as exaplained above to get the order number and then change the MOT and scheduling details in structure CT_PO_HEAD & CT_PO_SCHED.

Regards,

Ashok

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi

Dear Vikram

In this context i think there are two lanes between two locations through means of transport one is rail and other is truck.

after creation of sales order only change the tlane mention in the sales order

sunil