Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

getting the error that Table KNVP is already been declared

Former Member
0 Kudos

Hi Guys I am getting the error that Table KNVP is already been declared. please correct what is the problem since it work other companies with same code

Tables: KNVP.

data: l_tabix like sy-tabix,

l_s_BIW_KNA1_S like BIW_KNA1_S.

case i_datasource.

WHEN '0CUSTOMER_ATTR'.

loop at i_t_data into l_s_BIW_KNA1_S.

l_tabix = sy-tabix.

select single * from KNVP where KUNNR = l_s_BIW_KNA1_S-KUNNR.

if sy-subrc = 0.

l_s_BIW_KNA1_S-ZZPARFN = KNVP-PARVW.

modify i_t_data from l_s_BIW_KNA1_S index l_tabix.

endif.

endloop.

endcase.

thanks

soniya

2 REPLIES 2

Former Member
0 Kudos

Hi

delete this line:

*Tables: KNVP. <----


Max

Former Member
0 Kudos

HI,

1. Do not use Tables statement.

2. Always use INTO clause in the select. Declare work area of type KNVP and use it in the select statement.

Regards,

Vara