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: 

"delete from shared memory" - counting cluster tables

former_member312710
Discoverer
0 Kudos

Hi everyone,

i'm pretty new to ABAP development.

I need to count how many lines get deleted by the following code. Therefore I need to turn the delete-statement somehow into an select-statement and then get the sy-dbcnt.

l_key = i_worklid.

DELETE FROM SHARED MEMORY bank_pp_srv_pck(01) ID l_key.

DELETE FROM SHARED MEMORY bank_pp_srv_pck(02) ID l_key.

I really do not have any experience with cluster tables.

Any ideas on how to write an select statement for this cluster table?

My first thought was a simple:

SELECT COUNT( * ) FROM bank_pp_srv_pck WHERE l_key = i_worklid.

Thanks in advance,

Daniel

1 ACCEPTED SOLUTION

arindam_m
Active Contributor
0 Kudos

Hi,

I think the l_key is the ID of the MEMORY location where the shared memory exists. Its not a field value. The only way might be to do an IMPORT and then check the lines in the Imported data content using DESCRIBE statement.

Cheers,

Arindam

3 REPLIES 3

arindam_m
Active Contributor
0 Kudos

Hi,

I think the l_key is the ID of the MEMORY location where the shared memory exists. Its not a field value. The only way might be to do an IMPORT and then check the lines in the Imported data content using DESCRIBE statement.

Cheers,

Arindam

0 Kudos

Hi,

thanks for the advice!

It now looks like this:

IMPORT bank_pp_srv_pck to l_tab_count_bank_pp_srv_pck FROM MEMORY ID l_key.

DESCRIBE TABLE l_tab_count_bank_pp_srv_pck LINES lv_mem_count.

I'm just wondering if it will make a difference that i don't explicitly say in which cluster, since the original delete statement had like (01) or (02) ... is there a way to modify the import / describe statement in order to fit?

arindam_m
Active Contributor
0 Kudos

Hi,

Weren't you referring to two row areas by the individual DELETE statements. I think I row area((01) or (02))  would have one record only.. is there a need to DESCRIBE think not when you refer to a row area.

Cheers,

Arindam