Hi Suma,
in addition to Fernando's proposal, can you please check, where exactly the issue occurs? I guess the call of "next_package" fails, right?
In case yes, the question is if the usage of SEPMAPPS_CLSDINV as type definition for the output parameter is correct respectively should be avoided.
SEPMAPPS_CLSDINV is an external dictionary view for another HANA view, which might lead to issues when using "SELECT *". You can't be sure about the ordering of columns in your calc view output parameter and the external view.
As a test, you could try to define a type yourself (let's say only containing one field), an internal table of this structured type and perform a "SELECT <field>" into the internal table.
Cheers,
Jasmin