‎2007 Dec 05 7:43 PM
Hi,
I am working on 3.1I version of SAP and using the following code in my program.
types: begin of t_ar_doc,
bukrs like bkpf-bukrs,
belnr like bkpf-belnr,
gjahr like bkpf-gjahr,
monat like bkpf-monat,
waers like bkpf-waers,
end of t_ar_doc.
data: ar_tab type hashed table of t_ar_doc
with unique key bukrs belnr.
But getting a syntax error saying 'The type "HASHED" is unknown'.
Can anyone help me?
Thanks,
Srinivasa
‎2007 Dec 05 7:53 PM
I am not sure if Hashed tables were introduced in 3.1I. I just checked F1 help in our system which is 4.7 and there is no mention of which versions .
I suggest putting your cursor on the "type" word in your data statement and pressing F1. If the F1 help does not mention them, they might not be available.
Best Regards,
Chris H.
‎2007 Dec 05 7:52 PM
‎2007 Dec 05 7:53 PM
I am not sure if Hashed tables were introduced in 3.1I. I just checked F1 help in our system which is 4.7 and there is no mention of which versions .
I suggest putting your cursor on the "type" word in your data statement and pressing F1. If the F1 help does not mention them, they might not be available.
Best Regards,
Chris H.
‎2007 Dec 05 8:02 PM
Yep, I used the F1 help, but nothing tells on this.
I want to know from experts whether this is possible/available in 3.1I or not.
Please help.
Thanks,
Srinivasa
‎2007 Dec 05 8:12 PM
‎2007 Dec 05 8:15 PM
I don't have access to any documention for a 3.1 system, but there is documentation on hashed tables (such as this page: http://help.sap.com/saphelp_40b/helpdata/en/fc/eb3639358411d1829f0000e829fbfe/frameset.htm) for a 4.0b system. I tried the code that you have written, and it works in my ERP 2004s system. I noticed that some of the older documentation has the original table, such as your t_ar_doc, defined in a DATA statement rather than a TYPE statement. The hashed table is then defined as:
DATA: ar_tab LIKE HASHED TABLE OF t_ar_doc
WITH UNIQUE KEY bukrs belnr.
You could try this older style of definition and see if it works.
- April King
‎2007 Dec 05 9:20 PM