Skip to Content
2
Former Member
Jul 13, 2007 at 07:46 AM

Assigning structure to table parameter of subroutine inside the subroutine

18 Views

Hello All,

I am calling a subrotuine multiple times and every time passign a table of different

structure to it.

Data: itab1 type table of kna1,

itab2 type table of knvp.

PERFORM sub TABLES itab1.

PERFORM sub TABLES itab2.

FORM sub TABLES p_itab.

SORT p_itab BY kunnr.

ENDFORM.

This is giving me a syntax error that

"The specified type has no structure and no component called 'kuunr'".

Is it possible that inside the subroutine 'sub', I assign some structure to the table

'p_itab' based on some conditions?

Please suggest.

Regards

Indrajit