07-29-2013 9:47 AM
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
07-29-2013 9:53 AM
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
07-29-2013 9:53 AM
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
07-29-2013 12:50 PM
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?
07-29-2013 1:06 PM
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