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

Where to to find FO stops order / sequence in database data?

petr_zitnik
Explorer
4,417

Hello Experts,

for printing documents and report I try to find out, where the the stops order / sequence stored in a dtb tables.

I thought it is defined table /SCMTMS/D_TORSTP, field STOP_ID. Usually ID row matches to stops as sequenced in FO. But when several changes have been made in FO, the sequence is suddenly different, Would you know, how the stops could be sequenced on a print form based on a tadabase table / field?

Planned manualy in embedded basic TM.

Thank you

Petr

Accepted Solutions (1)

Accepted Solutions (1)

GRABLERE
Product and Topic Expert
Product and Topic Expert
0 Likes

Hi Petr,

as you probably realized the stop ID is not an indicator for the sequence. Reason is that we always try to keep the stop ID rather a stable indicator for a stop, e.g. to be identified in external message and not being constantly changed when for example new stops are added.

As correctly stated by Panch Dev Parihar, if you are lookig for an easy helper to find the stop sequence in your own coding "/SCMTMS/CL_TOR_HELPER_STAGE" gives you the correct helpers.

Here some more additional logic how on a data model level the stop-sequence is build(let's assume a defined and linear stop sequence):

To find the sequence of stops you not only need the BO Node STOP but also the Child Entity STOP_SUCCESSOR. The STOP_SUCCESSOR besides keeping the stage information like distance is more than everything connection a stop with its next stop. The PARENT_KEY of the STOP_SUCCESSOR is pointing to the STOP the STOP_SUCCESSOR is starting from, the field SUCC_STOP_KEY is pointing to(as the name indicates) the successor STOP instance. Via this relation the system can build up the correct order of stops.

One additional point, as it might confuse you when you look at the DB/BOBT first: Intermediate stops always consists of an inbound(STOP_CAT=I) and outbound(STOP_CAT=O) to model the arrival and the departure of this locations. Also this relation of an inbound to and outbound stop is kept via a stop_successor instance also it is not a logistcal stage. These "special" stop_successors are identified by field STOP_SUCC_CAT=I(Intra-Location Succ., Link Bet. Inb. and Outb. Stop at Loc.)

Regards,

Emanuel

petr_zitnik
Explorer
0 Likes

Thank you for the answer. I think with this information we can fight over the topic with my abaper colleague and hopefuly we will prevail! 🙂

Petr

hongsy93
Explorer
0 Likes

Hi Emanuel.

I figured out that we can`t know accurate stop sequence by STOP_ID and I keep using "/SCMTMS/CL_TOR_HELPER_STAGE". However, there is one thing I wonder. It is that we can`t know accurate stop sequence by using only DB table which is like /scmtms/d_torstp?

One of methods that it is possible to know accurate stop sequence by using only DB table is that use DB table together which is /scmtms/d_torstp and /scmtms/d_torsts. In my opinion, for example, we have to get first stop by using STOP_SEQ_POS and get next stop by associating /scmtms/d_torsts with the key of first stop. I think that we can know accurate stop sequence by repeating this method. Am I right?

Regards,

Seokyeon

Answers (2)

Answers (2)

karanrikke
Explorer
0 Likes

Hello,

If you quickly want to know the stop details, you can find in table/SCMTMS/D_TORSTP and field STOP_SEQ_POS where F = Source Stop, I=Intermediate Stop, L=Destination Stop.

BOBT and other helpers offcourse will give you more comprehensive information.

VishalModi
Discoverer
0 Likes

Hello Petr Žitník,

It's the sequence number field. You may backtrack logic as decribed in note 2819721 (In TC, FU or TOR Stage numbers appear out of sequence).

-Regards
Vishal Modi