Follow-on Order details
Follow-on orders were rolled out as part of the Enterprise Asset Management Part 7 (LOG_EAM_CI_7).
You can create maintenance orders as follow-on orders for an order or order operation. When you create a follow-on order, you create a relationship to the reference order or operation and you can display this relationship in the document flow. You can create follow-on orders directly (transaction iw31), when changing or displaying an order (transactions iw32 and iw33), or when creating a confirmation (transaction iw41). The relationship of these orders can be seen using the Document flow.
For more information, see the Enterprise Asset Management Part 7 release information and Creating Follow-On Orders for detailed information regarding the processes involved.
Follow-on Order - Tables
The two main tables for checking the relationship between an order and a follow-on order are SRRELROLES (Object Relationship Service: Roles) and SMZB_BINREL (Object Relationship Service: Generic Binary Links). Using these tables we can confirm the whether an order is a follow-on order.
Depending on how the Follow-on order is created, we need to use two different methods for checking the order details:
- New Orders created as a Follow-On Order.
- Follow-On Order created in an Order or Confirmation.
(Full information about how to create each method can be found on the Creating Follow-On Orders help portal)
New Orders created as a Follow-On Order
These orders are created directly in transaction Create Order (iw31) with no link to an Operation. They are the most straight forward in terms of checking the relationship within the tables SRRELROLES and SMZB_BINREL.
In this example. I have created the Initial Order (4022398) and then created a Follow-On Order (4022399) directly in iw31.
Top Order | 4022398 |
---|---|
Follow-on Order | 4022399 |
- We go to transaction se16 to view the contents of the table SRRELROLES.
- We enter in the full Order numbers in the "Object Key" (OBJKEY) field.
(This number can be found in Table AKFO (AFKO-AUFNR)
- This will bring back the Role Type and ID relating to the selected order.
- The Main order will have a role type of VORGAENGER (Predecessor) and the Follow-on Order will have a role type of NACHFOLGER (Successor).
- The RoleID you are looking for will have the first few digits and the last couple of digits matching and normally will have the same Time Stamp (UTCTIME) value.
- This will bring back the Role Type and ID relating to the selected order.
- Using these RoleID, we now go go to transaction se16 to view the contents of the table SMZB_BINREL.
- We enter in the following details:
- VORGAENGER RoleID in as Role_A
- NACHFOLGER RoleID in as Role_B
- We then Click Execute
- This will bring back the Relationship ID (REALATIONID) and the Rel. Type (BRELTYP) of the combination showing that ROLE_B is from a Follow-on Order.
- We enter in the following details:
New Orders created as a Follow-On Order
These orders are created from an existing order using iw32/iw33 or through a confirmation using iw41. They are a little more complicated in terms of checking the relationship within the tables SRRELROLES and SMZB_BINREL.
In this example. I have created the Initial Order (4022398) and then created a Follow-On Order (4022452) from operation 20 of the Initial Order.
Top Order | 4022398 | Operation (20) |
---|---|---|
Follow-on Order | 4022452 |
- We need to first find out the "Routing number of operations in the order" in table AFKO (AFKO-AUFPL)
NOTE: The default views of these table results may differ from the images provided.
You can customize the fields being displayed by going to Settings → Format List → Choose Fields
- We then use this number to find the "General counter for order" which is related to the "Operation/Activity Number" ( AFVC-APLZL ←AFVC-VORNR)
We us the combination of the AUFPL + APLZL as the "Object Key" (OBJKEY) for the Operation Activity when trying to locate its RoleID
AFKO-AUFPL AFVC-APLZL OBJKEY 1000023337 00000002 100002333700000002 We can now generate the RoleID for the Operation Activity and the new Follow-On Order
- We go to transaction se16 to view the contents of the table SRRELROLES.
- We enter in the "Object Key" (OBJKEY) for the Operation Activity and Follow-on Order (AFKO-AUFNR).
- This will bring back the Role Type and ID relating to the Operation Activity and Follow-on Order.
- As the Operation Activity is the Origin, it will have a role type of VORGAENGER (Predecessor) and the Follow-on Order will have a role type of NACHFOLGER (Successor).
The Object types display what type each object is.
BUS2007 Order Header AFVC_PM Order Operation - Again The RoleID you are looking for will have the first few digits and the last couple of digits matching and normally will have the same Time Stamp (UTCTIME) value.
- This will bring back the Role Type and ID relating to the Operation Activity and Follow-on Order.
Using these RoleID, we now go go to transaction se16 to view the contents of the table SMZB_BINREL.
- We enter in the following details:
- VORGAENGER RoleID in as Role_A
- NACHFOLGER RoleID in as Role_B
- We then Click Execute
- This will bring back the Relationship ID (REALATIONID) and the Rel. Type (BRELTYP) of the combination showing that ROLE_B is from a Follow-on Order.
- We enter in the following details:
The following Function Modules can be used:
Check, if a relation exist, via function module REL_ROLES_OF_OBJECT_GET | ||
1. Check, if triggering order exists | ||
CALL FUNCTION 'REL_ROLES_OF_OBJECT_GET' | ||
EXPORTING | ||
object = ls_object (= Order Number (aufnr)= 00000XXXXXXX) | ||
roletype = 'NACHFOLGER' | ||
relationtype = 'FWUP' | ||
TABLES | ||
roles = lt_roles. | ||
2. Check, if follow-on order exists | ||
2.1 Relation to Order header | ||
CALL FUNCTION 'REL_ROLES_OF_OBJECT_GET' | ||
EXPORTING | ||
object = ls_object (= Order Number (aufnr)= 00000XXXXXXX) | ||
roletype = 'VORGAENGER' | ||
relationtype = 'FWUP' | ||
TABLES | ||
roles = lt_roles. | ||
2.2 Relation to Order operation | ||
CALL FUNCTION 'REL_ROLES_OF_OBJECT_GET' | ||
EXPORTING | ||
object = ls_object (Routing number of operations in the order (aufpl) + General counter for order (aplzl)) | ||
roletype = 'VORGAENGER' | ||
relationtype = 'FWUP' | ||
TABLES | ||
roles = lt_roles. |
You can refer to the following diagram which the developers provided as a visualization of this relationship:
Visualization of the relations in tables SRRELROLES and SMZB_BINREL