Dear friends of TM,
With SAP S/4HANA 2023 FPS1, we published a first version of our TM based Sales Order Scheduling for scenarios with TM embedded. The feedback of customers and partners was very positive, thanks a lot for that!
But soon questions came up whether we offer TM scheduling also for other business documents to support additional scenarios. Any official statement to that can be found in our roadmap. But with this blog post I want to share my personal experiences when I implemented a prototype to enable TM scheduling for stock transport orders, based on the same scheduling capabilities as for TM based Sales Order Scheduling, in an TM embedded scenario.
So, this is no official guideline or anything like that. Also this is no statement that this functionality will be published soon in standard delivery. It’s just my personal experience, giving some hints how it’s possible to do the implementation without any modification to standard code, just by configuration and development in Z-coding, based on SAP S/4HANA FPS1 resp. FPS2. I also don’t want to give any implementation details, just pointing out on high level how it’s achieved in coding. So, I ask for your understanding that I also can’t discuss your coding or share mine.
But let’s go into details.
Basically, we have a process component Business Process Scheduling (BPS) which takes care of the scheduling of relevant dates for several business documents.
So, when we implemented TM based Sales Order Scheduling, we integrated with BPS, which is used by the sales order to schedule delivery date etc. As the stock transport order is also already integrated with BPS, it was luckily not too much of an effort to implement a similar functionality.
In detail we’re dealing with the following scenario:
For the prototype I used the schema ‘STOCK_TRANSP_DAYS_ADV_ATTRIB’ which is set up in standard as follows:
For the dates being relevant for TM this means:
Of course, it’s also possible to set up a new schema when this does not fit to your scenario.
At first, the stock transport order document needs to be enabled for the scheduling with BPS:
Therefore, you need to add respective entries on plant and storage location level, thereby checking the flag for ‘Shipment Scheduling’.
At next, the ‘BPS Determinations’ must be created and configured in transaction BPS_DETN_CONFIG:
Those ‘BPS Determinations’ are responsible for the determination of the durations of respective activities:
Now, the created ‘BPS Determinations’ need to be added to the mentioned schema in customizing for the TM relevant activities:
And finally, the stock transport document needs to be activated for BPS by assigning the schema to the stock transport order type and shipping point:
That are the necessary steps in configuration, of course assuming that the ‘regular’ configuration for the stock transport order has already been done.
So, let’s take care of the implementation part.
As already mentioned, the implementation can be done without any modification to the standard code, just with local development in Z-namespace.
Therefore, the first step is to create a class which implements an interface from BPS being responsible for handling its 'Determinations':
The parameters of the used interface method ‘DETERMINE’ are as follows:
The basic program flow in method ‘DETERMINE’ needs to be implemented like:
Those steps are explained in the following.
After the initialization with the declaration of parameters, instantiation of attributes etc., the data from the stock transport order needs to be retrieved:
This is done with the help of the ATP buffer, which can be read as shown.
Essential for the scheduling in TM is the logistics integration customizing, which needs to be retrieved for the stock transport order document data:
The Transport Duration Determination Profile controls the TM scheduling where you mention e.g., the planning profile, and the scheduling method as the default route.
As there has been a change from FPS1 to FPS2 in storing the Transport Duration Determination Profile we need to distinguish:
So, this needs to be adapted to your particular release.
The toughest part to be implemented might be the determination of the source and destination locations.
Based on your scenario, the stock transport order document data needs to be analyzed respectively and this could be pretty simple or a bit more complex…frankly spoken. But surely solvable with a little bit of experience in ABAP, knowledge about the data model of the stock transport order and the handling of locations.
When the locations have been determined, we’re ready to do the TM scheduling, as we know:
So, we can call the TM scheduling with the so-called TRS request:
The TRS request needs:
The result of the TM scheduling is provided in the ‘TRS result’ which contains the respective durations.
Those now need to be provided back to the BPS for the respective activity:
Hereby, the activities are:
And BPS then finally provides the dates to the stock transport order where those should be reflected in the delivery schedule of the item.
Let’s show this with the following example, given the schema and configuration as shown before:
In the delivery schedule of the stock transport order item we can see the following:
If the stock transport order is integrated with TM, respective freight units are created, just as you know it. But the integration with TM is not necessary, so this runs also when no freight units are created.
If freight units are created and you do transport planning in TM, the results are not written back to the stock transport order, as we never do that.
So, you see that it’s indeed possible to use the TM scheduling for the stock transport order in an SAP S/4HANA 2023 release, as we already do for the sales order, without modification to the standard code. There are surely some pitfalls in the implementation, but with some experiences in ABAP coding and business background this is surely solvable!
Hope this helps you in your stock transport process to deal with a more accurate planning!
Best regards,
Michael
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
10 | |
10 | |
4 | |
3 | |
2 | |
2 | |
2 | |
1 | |
1 | |
1 |