A ver si te he entendido, pero una opción seria la siguiente:
Supongamos ti_tabla tiene el campo tipo (1=Cabecera;2=detalle)
clear registros_detalle.
Loop at ti_tabla.
at new tipo.
clear registros_detalle.
clear ti_tabla_aux.
refresh ti_tabla_aux.
endat.
registros_detalle = registros_detalle + 1.
move ti_tabla to ti_tabla_aux.
append ti_tabla_aux.
at end tipo.
if registros_detalle not > 6.
loop at ti_tabla_aux.
<y aqui haces tu batch_input>
endloop.
endif.
endloop.
suerte.
|