Application Development and Automation 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: 
Read only

Please help

Former Member
0 Likes
468

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

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
445

Have you tried INSERT .... INTO TABLE ......

instead of INSERT.... INTO......

3 REPLIES 3
Read only

Former Member
0 Likes
445

Hi ,

Declare wpn_pc_zoba as.

data:wpn_pc_zoba type tpn_pc_zoba.

Rewards if helpful.

Regrds

Shambhu

Read only

Former Member
0 Likes
445

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.

Read only

Former Member
0 Likes
446

Have you tried INSERT .... INTO TABLE ......

instead of INSERT.... INTO......