Skip to Content
0
Former Member
Jul 10, 2007 at 01:27 PM

Problem with accesing table field in subroutine

18 Views

Hello All,

I am calling a subroutine multiple times and everytine passing 2 different tables (with different structures) int he subroutine.

PERFORM fill_itabs TABLES t_adnat_bus_in

gt_adnat_bus_in_dummy

USING p_filename..

.

.

.

PERFORM fill_itabs TABLES t_adcust_ban_in

gt_adcust_ban_in_dummy

USING p_filename.

.

.

The following is the subroutine definition.

FORM fill_itabs TABLES p_t_table

p_t_table_dummy

USING p_filename .

.

.

p_t_table_dummy[] = p_t_table[].

SORT p_t_table_dummy BY cust_id.

.

.

ENDFORM.

I am getting a syntax error which states -

<u><b>"The specified type has no structure and therefore no component called "cust_id"."</b></u>

The problem is the structure of the table passed to subroutine is different in the

different times when it is called and so in subroutine defintion I cannot mention an explicit structure for the table.

Could anyone please suggest how to avoid this?

Regards,

Indrajit.