Skip to Content
1
Former Member
Jul 04, 2014 at 08:28 AM

How to change line of a hashed table using a method call?

31 Views

Hello everyone,

writing a custom program, I try to execute the following code:

LOOP AT it_vttk REFERENCE INTO dref_vttk.

...

me->set_shipment_status( EXPORTING im_status = 2 CHANGING ch_shpmnt = dref_vttk->* ).

...

ENDLOOP.

This throws a runtime error calling me that I am not allowed to write to field "???" (tried a little and in fact I am not allowed to write to dref_vttk->*). it_vttk is defined as HASHED TABLE OF vttk WITH UNIQUE KEY tknum. it_vttk is a (private) attribute of the class containing the above coding in a (public) method.

It is clear to me that I am not allowed to change the key field tknum within loop processing, but I don't do this in method set_shipment_status.

So - what is the proper way of changing fields in a line of a hashed table using a method call? I can't specify the fields in the method call because the method decides which fields are changed.