Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014aUaQeLnwbb1zTpN7kHeat
46 lines
1.4 KiB
ABAP
46 lines
1.4 KiB
ABAP
INTERFACE {{p}}if_stock_age PUBLIC.
|
|
TYPES:
|
|
ty_material TYPE c LENGTH 10,
|
|
ty_batch_id TYPE c LENGTH 10,
|
|
ty_bucket TYPE c LENGTH 2,
|
|
ty_quantity TYPE p LENGTH 13 DECIMALS 3,
|
|
BEGIN OF ty_batch,
|
|
material TYPE ty_material,
|
|
batch TYPE ty_batch_id,
|
|
quantity TYPE ty_quantity,
|
|
gr_date TYPE dats,
|
|
END OF ty_batch,
|
|
tt_batch TYPE STANDARD TABLE OF ty_batch WITH EMPTY KEY,
|
|
BEGIN OF ty_age_row,
|
|
material TYPE ty_material,
|
|
bucket TYPE ty_bucket,
|
|
quantity TYPE ty_quantity,
|
|
batch_count TYPE i,
|
|
END OF ty_age_row,
|
|
tt_age_row TYPE STANDARD TABLE OF ty_age_row WITH EMPTY KEY,
|
|
BEGIN OF ty_total,
|
|
material TYPE ty_material,
|
|
quantity TYPE ty_quantity,
|
|
batch_count TYPE i,
|
|
END OF ty_total,
|
|
tt_total TYPE STANDARD TABLE OF ty_total WITH EMPTY KEY.
|
|
|
|
CONSTANTS:
|
|
BEGIN OF c_bucket,
|
|
d0_30 TYPE ty_bucket VALUE '01',
|
|
d31_60 TYPE ty_bucket VALUE '02',
|
|
d61_90 TYPE ty_bucket VALUE '03',
|
|
d91_plus TYPE ty_bucket VALUE '04',
|
|
END OF c_bucket.
|
|
|
|
METHODS analyze
|
|
IMPORTING it_batch TYPE tt_batch
|
|
iv_key_date TYPE dats
|
|
RETURNING VALUE(rt_age) TYPE tt_age_row.
|
|
|
|
METHODS total_by_material
|
|
IMPORTING it_batch TYPE tt_batch
|
|
iv_key_date TYPE dats
|
|
RETURNING VALUE(rt_total) TYPE tt_total.
|
|
ENDINTERFACE.
|