Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014aUaQeLnwbb1zTpN7kHeat
47 lines
1.5 KiB
ABAP
47 lines
1.5 KiB
ABAP
INTERFACE {{p}}if_stock_cover PUBLIC.
|
|
TYPES ty_material TYPE c LENGTH 18.
|
|
TYPES ty_plant TYPE c LENGTH 4.
|
|
TYPES ty_quantity TYPE p LENGTH 13 DECIMALS 3.
|
|
TYPES ty_status TYPE c LENGTH 10.
|
|
|
|
TYPES: BEGIN OF ty_stock_item,
|
|
material TYPE ty_material,
|
|
plant TYPE ty_plant,
|
|
quantity TYPE ty_quantity,
|
|
END OF ty_stock_item.
|
|
TYPES tt_stock_item TYPE STANDARD TABLE OF ty_stock_item WITH EMPTY KEY.
|
|
|
|
TYPES: BEGIN OF ty_requirement,
|
|
material TYPE ty_material,
|
|
plant TYPE ty_plant,
|
|
required TYPE ty_quantity,
|
|
END OF ty_requirement.
|
|
TYPES tt_requirement TYPE STANDARD TABLE OF ty_requirement WITH EMPTY KEY.
|
|
|
|
TYPES: BEGIN OF ty_result,
|
|
material TYPE ty_material,
|
|
plant TYPE ty_plant,
|
|
required TYPE ty_quantity,
|
|
available TYPE ty_quantity,
|
|
shortage TYPE ty_quantity,
|
|
status TYPE ty_status,
|
|
END OF ty_result.
|
|
TYPES tt_result TYPE STANDARD TABLE OF ty_result WITH EMPTY KEY.
|
|
|
|
CONSTANTS:
|
|
BEGIN OF c_status,
|
|
ok TYPE ty_status VALUE 'OK',
|
|
short TYPE ty_status VALUE 'SHORT',
|
|
invalid TYPE ty_status VALUE 'INVALID',
|
|
END OF c_status.
|
|
|
|
METHODS check
|
|
IMPORTING it_stock TYPE tt_stock_item
|
|
it_requirement TYPE tt_requirement
|
|
RETURNING VALUE(rt_result) TYPE tt_result.
|
|
|
|
METHODS shortages
|
|
IMPORTING it_result TYPE tt_result
|
|
RETURNING VALUE(rt_shortage) TYPE tt_result.
|
|
ENDINTERFACE.
|