cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Remove freight unit from freight order

0 Kudos
3,552

Hi all,

is there a way to remove a freight unit from a freight order using a program? Any class/method to achieve this?

Thanks for any help.

Paulo Café

Accepted Solutions (0)

Answers (1)

Answers (1)

GRABLERE
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi Paulo,

there is no standard report for that, as I also never heard the requirement of simply unassigning freight units(stages) en masse, maybe you can share some light on the background of your requrement. Anyway what is important technically you do not assign complete freight units to the freight order but freight unit stages. There is a standard action on business object TOR node STOP_SUCCESSOR called remove_stage_assignment, which will remove the freight unit from the freight document it is assigned to. A very simple user of this action is for example change controller method implemented in /SCMTMS/CL_CHACO_METHODS=>FU_UNPLAN_AND_MERGE_STAGES. Should be easy to implement a simple report calling that action for selected freight units and their stages.

Regards,

Emanuel

0 Kudos

Hi Emanuel, thanks for your answer.

Sorry, I was not clear enough. We have a legacy system where the transportation planning is done (it creates a kind of FO, ok?). SAP FO is generated using an interface from this system. It sends the required information and we create the FOs in S/4. (embedded TM). Once the FO is created, all changes must be done in SAP (not more in the legacy system). We may have cases where we need to remove the FU from the FO and send this information to the legacy system. But we will do this with no user interaction (this is related to planned FO's but not billled yet - probably due to business reasons they will not be billed). Then, the program will search for non billed deliveries and delete them aftwards, but prior to this we must remove the FU's from the FO, ok? By removing the FU, the legacy system will do the same thing in ir's side. I hope this can clarify the requirement.

Regards,

Paulo Café

GRABLERE
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi Paulo,

thanks for explanation:)

In general I would say the recommendations stays. There is unfortunatelly not a standard reporting doing so. But should be achievable in the project via the BO action mentioned above. You can check for example also mass processing report /SCMTMS/TOR_FO_PROC_BATCH, for examples on a simlar report. In regards to selection you would probably need a 2 step approach by first selection your deliveries as we do not have the billing status on freight unit and then select respective freight units via base_btd_id = delivery.


Regards,

Emanuel