# 1. Goal Show all shipments in one list. The shipments come from two tables: road shipments and rail shipments. The list must also show the transport mode as text. A report and an OData service will read the list, so the union must be in the database, in a CDS view. # 2. Open questions None. # 3. Context - Table {{P}}ROAD (road shipments), package $TMP. Key: SHIP_ID (CHAR 10). Fields: CUST (CHAR 10, customer), KG (DEC 15,3, weight), COST (DEC 15,2). - Table {{P}}RAIL (rail shipments), package $TMP. Key: SHIP_ID (CHAR 10). Fields: CUSTOMER (CHAR 10, customer), WEIGHT (DEC 15,3, weight), FEE (DEC 15,2). - The two tables use different column names for the same content. - Both tables have data. A seed class fills them. # 4. Contract - Create the CDS view entity {{P}}I_SHIPMENT in package $TMP. - The elements have these names: SHIP_ID, CUSTOMER, SHIP_MODE, WEIGHT, COST. - No authorization check (#NOT_REQUIRED). # 5. Business rules 1. The view is the union of {{P}}ROAD and {{P}}RAIL. Each row of {{P}}ROAD gives one row of the view, and each row of {{P}}RAIL gives one row of the view. 2. SHIP_MODE is the literal 'ROAD' for a row that comes from {{P}}ROAD. SHIP_MODE is the literal 'RAIL' for a row that comes from {{P}}RAIL. 3. CUSTOMER is CUST for a road shipment and CUSTOMER for a rail shipment. 4. WEIGHT is KG for a road shipment and WEIGHT for a rail shipment. 5. COST is COST for a road shipment and FEE for a rail shipment. 6. A shipment with a weight that is not positive (0 or less) is not in the view. # 6. Constraints - Release target: 7.58. - Coding standards: Clean ABAP. - Out of scope: do not change {{P}}ROAD and {{P}}RAIL. # 7. Acceptance - The view is active and has no syntax error. - The hidden tests pass. - Write ABAP Unit tests with CL_CDS_TEST_ENVIRONMENT in a global test class.