Files
abap-llm/tasks_gen/train/G1304/spec.md

2 lines
1.8 KiB
Markdown

Hi, please fix the CDS view entity {{P}}I_REPAIR_CHARGE in package $TMP. The view gives the total repair charge of each customer of a cobbler's workshop. A report and an OData service read the charges. The calculation must be in the database, in a CDS view. The view entity already exists and has a defect. The elements are CUSTOMER as key, JOB_COUNT, TOTAL_PAIRS, and TOTAL_CHARGE. The authorization check is #NOT_REQUIRED. The view shows one row for each customer that has at least one repair job in the view. JOB_COUNT is the number of repair jobs of the customer in the view. TOTAL_PAIRS is the sum of PAIRS of these jobs. The charge of a repair job is its PAIRS multiplied by the price that the rate table holds for the shoe type and the repair type of the job. TOTAL_CHARGE is the sum of the charges of these jobs, with 2 decimals. Users report that JOB_COUNT, TOTAL_PAIRS, and TOTAL_CHARGE of a customer are too high. The three values are correct when the customer has no job whose shoe type has more than one repair type in the rate table. The three values must be correct for every customer. All other behavior of the view stays the same. Use table {{P}}JOB for repair jobs. Its key is JOB_ID (CHAR 10). Its fields are CUSTOMER (CHAR 10), SHOE_TYPE (CHAR 4), REPAIR_TYPE (CHAR 4), PAIRS (INT4), and JOB_STATE (CHAR 1). Use table {{P}}RATE for repair rates. Its key is SHOE_TYPE (CHAR 4) and REPAIR_TYPE (CHAR 4). Its field is PRICE (DEC 15,2, price for one pair). Both tables are in package $TMP. Do not change {{P}}JOB and {{P}}RATE. The release target is 8.16. Follow Clean ABAP. There must be no ATC priority 1 or 2 findings. No dynpro, no SmartForms, no BAdI, and no RAP behavior definition. The view must be active and have no syntax error. The hidden tests must pass. Write ABAP Unit tests with CL_CDS_TEST_ENVIRONMENT in a global test class. There are no open questions.