‎2008 Mar 25 12:58 PM
Hi,
I want to add records to a hashed table.
my code is:
data: ipn_pc_zoba type hashed table of tpn_pc_zoba with unique key vbeln,
wpn_pc_zoba like line of ipn_pc_zoba.
loop at izoba into wzoba.
clear wpn_pc_zoba .
read table ipn_pc_zoba into wpn_pc_zoba with key vbeln = wzoba-LS_KDAUF.
if sy-subrc ne 0.
wpn_pc_zoba-vbeln = wzoba-LS_KDAUF.
append wpn_pc_zoba to ipn_pc_zoba.
endif.
endloop.
The Error is : You cannot use explicit or implicit index operations on tables with types "HASHED TABLE" or "ANY TABLE". "IPN_PC_ZOBA" has the type "HASHED TABLE". It is possible that .
I TRIED WITH INSERT INSTEAD OF APPEND BUT STILL IT IS NOT WORKING.
How to write the code to solve this?
Please reply ASAP.
Regards,
SRI
‎2008 Mar 25 1:31 PM
Have you tried INSERT .... INTO TABLE ......
instead of INSERT.... INTO......
‎2008 Mar 25 1:26 PM
Hi ,
Declare wpn_pc_zoba as.
data:wpn_pc_zoba type tpn_pc_zoba.
Rewards if helpful.
Regrds
Shambhu
‎2008 Mar 25 1:29 PM
Hi
read table ipn_pc_zoba into wpn_pc_zoba with key vbeln = wzoba-LS_KDAUF.
with the help of above statement ur reading the data from ipn_pc_zoba into wpn_pc_zoba where vbeln = wzoba-LS_KDAUF.
this indicates that wpn_pc_zoba is having a data which is equal to wzoba-LS_KDAUF.
u declared ur table ipn_pc_zoba as hashed with unique key
then how can it append the same value which is unique.
plz reward
if it is useful
Thanks,
Lakshman.
‎2008 Mar 25 1:31 PM
Have you tried INSERT .... INTO TABLE ......
instead of INSERT.... INTO......