Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014aUaQeLnwbb1zTpN7kHeat
43 lines
1.2 KiB
ABAP
43 lines
1.2 KiB
ABAP
INTERFACE {{p}}if_canteen_plan PUBLIC.
|
|
TYPES ty_ingredient TYPE c LENGTH 10.
|
|
TYPES ty_quantity TYPE p LENGTH 13 DECIMALS 3.
|
|
|
|
TYPES:
|
|
BEGIN OF ty_order,
|
|
ingredient TYPE ty_ingredient,
|
|
quantity TYPE ty_quantity,
|
|
END OF ty_order.
|
|
TYPES tt_order TYPE STANDARD TABLE OF ty_order WITH EMPTY KEY.
|
|
|
|
TYPES:
|
|
BEGIN OF ty_master,
|
|
ingredient TYPE ty_ingredient,
|
|
pack_size TYPE ty_quantity,
|
|
END OF ty_master.
|
|
TYPES tt_master TYPE STANDARD TABLE OF ty_master WITH EMPTY KEY.
|
|
|
|
TYPES:
|
|
BEGIN OF ty_pack,
|
|
ingredient TYPE ty_ingredient,
|
|
packs TYPE i,
|
|
END OF ty_pack.
|
|
TYPES tt_pack TYPE STANDARD TABLE OF ty_pack WITH EMPTY KEY.
|
|
|
|
TYPES tt_ingredient TYPE STANDARD TABLE OF ty_ingredient WITH EMPTY KEY.
|
|
|
|
METHODS merge_orders
|
|
IMPORTING it_orders_a TYPE tt_order
|
|
it_orders_b TYPE tt_order
|
|
RETURNING VALUE(rt_demand) TYPE tt_order.
|
|
|
|
METHODS pack_requirement
|
|
IMPORTING it_demand TYPE tt_order
|
|
it_catalogue TYPE tt_master
|
|
RETURNING VALUE(rt_packs) TYPE tt_pack.
|
|
|
|
METHODS missing_ingredients
|
|
IMPORTING it_demand TYPE tt_order
|
|
it_catalogue TYPE tt_master
|
|
RETURNING VALUE(rt_missing) TYPE tt_ingredient.
|
|
ENDINTERFACE.
|