Files

2 lines
1.0 KiB
Markdown

Create the CDS view entity {{P}}I_BOOK_REVENUE in package $TMP. The view shows the sales of each book for the period given by input parameters P_FROM (DATS) and P_TO (DATS). P_FROM is the first day of the period. P_TO is the last day of the period. Both limits belong to the period. The view has one row for each book that has at least one sale whose sale date is in the period. A book without a sale in the period has no row. The elements are BOOK_ID as key, TITLE, CATEGORY, SOLD_QUANTITY, and REVENUE. SOLD_QUANTITY is the sum of QUANTITY of all sales of the book in the period. REVENUE is the sum of QUANTITY multiplied by PRICE of the book over all sales of the book in the period. REVENUE has 2 decimals. TITLE and CATEGORY are the title and category of the book. No authorization check is required. Create the global ABAP Unit test class {{P}}T20_TEST for the view. The view must be active and have no syntax error. The hidden tests must pass. {{P}}T20_TEST must use CL_CDS_TEST_ENVIRONMENT and pass. Release target is 7.58. Do not change {{P}}BOOK and {{P}}SALE.