populating a form field with output from a custom plugin function

You can pre-populate a field with gform_field_value_$parameter_name hook, where $parameter_name is the name of the field/parameter. So, for example if you added that to your code:

add_filter('gform_field_value_invoice_numb', 'my_func');
function my_func( $value ) {
    return do_shortcode('[ABC_form_number length="13" char="num" case="false"]');
}

(Note: Allow field to be populated dynamically option needs to be enabled)