Hi Peter.
I also don't understand the reason of your requirement. If you want to get the costing date (from / to)
try the following code, check my screenshots:
CK11N
This is the Debug in a Zfunction of a Template:
As you see,field <FS_TABLA>[1]-KADAT is the From date and in <FS_TABLA>[1]-BIDAT is the end date. (Read the 1st record) of the table.
This is the code (i created now when see your requirement), i never try in a productive system but guess it works (test carefully)
FIELD-SYMBOLS: <fs_tabla> TYPE table.
v_tabla = '(SAPMC64H)T_KVMK[]'.
* Asignacion de tabla a un field-symbol
ASSIGN (v_tabla) TO <fs_tabla>.
CHECK sy-subrc EQ 0.
* <FS_TABLA>[1]-KADAT >> from
* <FS_TABLA>[1]-BIDAT >>> to
PS> I do the example with a copy of standard template function NumberOfWorkCenters / abap function K_ABC_INFO_ROUTING.
Arturo.