Skip to Content

Until WDJ has an efficient equivalent of hashed itabs, thanks anyway – I’ll stick with WDA.

OK – so I’m building the quickie equivalent of IW26 in ABAP OO and I therefore have to pop an equipment structure list for the customers to choose from. Furthermore, I know that this has to be a multi-category tree that not only displays descendant equipment in EQUI/Z, but also descendant materials in material BOMs. Finally, I know that come February 2007, I’m going to want to convert the ABAP OO to full-fledged WDA. Well that’s cool. Since WDA has the same hashed itab capability as ABAP OO, I can control the tree of the equipment structure list via a hashed itab with a structure like: BEGIN OF t_node_lookup, node_key TYPE tv_nodekey, nnmbr(18) TYPE c, ntype TYPE c, submt TYPE submt, stlnr TYPE stnum, exptype TYPE c, parent TYPE tv_nodekey, END OF t_node_lookup, When I put a node in the equipment structure tree with key value “node_key”, I store a row in a hashed itab “i_node_lookup” with the above structure. In particular: node_key is the actual tree node value nnmbr is an equnr from equi/z or a matnr ntype is E or M, depending on whether nnmbr is an equnr or a matnr submt is either blank or the value of submt in EQUZ and therefore the value of a matnr in MAST with an stlnr stlnr is the value of a BOM in stpo exptype is either E, M, B, or N, depending on whether a given node has just equipment children, just material children, both kinds of children, or no children. And therefore: 1) when the time comes to expand a node, the values of ntype and exptype tell me exactly what I have to do, and the values of submt and stlnr tell me what I need to know to do it; 2) when I have to find the lowest piece of equipment that is an ancestor of a piece of material, then I can do a standard recursive parent chase to find this piece of equipment (substituting parent into node_key until I find the first node that has an ntype of E.) 3) all of this will transfer immediately to WDA in February, because the hashed itab capability will still be there. But what if some “purist” in my customer’s IT Department says: “Oh no – that won’t do! We want ALL of our WebDynpro in Java because, after all, ABAP is just a degenerate branch of COBOL and it’s therefore so passe.” What can I do in WDJ to get the same efficiencies as the hashed itab table gives me in tha above WDA example? And have any comparative performance tests been run on the two alternatives?

Be the first to leave a comment
You must be Logged on to comment or reply to a post.