Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Hash Table - BSIS - A test code

Hi All,

I want to improve one program involving table BSIS. I thought HASH table could be good option considering the large volume of BSIS. Below is my code, any suggestion etc. Since first time I am using HASH table.

Thank you,

*********************************

REPORT ZHASHTABLE .

tables : bsis.

data irec type i.

select-options : postdate for bsis-budat,

cocode for bsis-bukrs,

hkont for bsis-hkont.

data i_bsis like bsis occurs 0 with header line.

data : tab_bsis like line of i_bsis.

data : it_bsis type hashed table of bsis with unique key BUKRS

HKONT

AUGDT

AUGBL

ZUONR

GJAHR

BELNR

BUZEI.

start-of-selection.

select * from bsis

into table it_bsis

where bukrs in cocode and hkont in hkont.

delete it_bsis where not ( budat in postdate ).

describe table it_bsis lines irec.

loop at it_bsis into tab_bsis.

move-corresponding tab_bsis to i_bsis.

append i_bsis.

clear i_bsis.

clear tab_bsis.

endloop.

loop at i_bsis.

write / i_bsis.

endloop.

Tags:
Former Member
Not what you were looking for? View more on this topic or Ask a question