Sitemap

Amicuk Programming Answers

How about use partial key to loop at a hashed table?

2015-10-11   Views:0

Advertisement

Such as I want to loop a Internal table of BSID according to BKPF. data itab_bsid type hashed table of BSID with unique key bukrs belnr gjahr buzid. Loop at itab_bsid where bukrs = wa_bkpf-bukrs                           and    belnr  = wa_bkpf-belnr

Such as I want to loop a Internal table of BSID according to BKPF.
data itab_bsid type hashed table of BSID with unique key bukrs belnr gjahr buzid.
Loop at itab_bsid where bukrs = wa_bkpf-bukrs
                          and    belnr  = wa_bkpf-belnr
                          and    gjahr  = wa_bkpf-gjahr.
endloop.
I know if you use all key to access this hashed table ,it is certainly quick, and my question is when i use partial key of this internal hashed table to loop it, how about its performance.
Another question is in this case(BSID have many many record) , Sorted table and Hashed table , Which is better in performance.

The replay answer
Advertisement
You can't cast b/w data reference which l_tax is and object reference which l_o_tax_code is.
osref is a generic object type and you store a reference to some object in it, right? So the question is: what kind of object you store there? Please note - this must be an object reference , not data reference .
i.e
"here goes some class
class zcl_spfli definition.
endclass.
class zcl_spfli implementation.
endclass.
"here is an OBJECT REFERENCE for it, (so I refer to a class) i.e persistent object to table SPFLI
data oref_spfli type ref to zcl_spfli.
"but here I have a DATA REFERENCE (so I refer to some data object) i.e DDIC structure SPFLI
data dref_spfli type ref to spfli.
So my OSREF can hold only oref_spfli but it not intended for dref_spfli . That's why you get this syntax error. Once you have stored reference to zcl_spfli in osref then you will be able to dereference it and access this object's attributes.
data: osref type osref.
create object osref_spfli.
osref = osref_spfli.
"now osref holds reference to object, you can deference it
oref_spfli ?= osref.
osref_spfli->some_attribute = ....
OSREFTAB is just a table whose line is of type OSREF (so can hold multiple object references - one in each line).
Regards
Marcin

Go to See the other 11 answers

How about use partial key to loop at a hashed table?

Category:DefaultRelease time:2015-10-11Views:130

Such as I want to loop a Internal table of BSID according to BKPF. data itab_bsid type hashed table of BSID with unique key bukrs belnr gjahr buzid. Loop at itab_bsid where bukrs = wa_bkpf-bukrs                           and    belnr  = wa_bkpf-belnr[More]

Questions in partial key matches of Btree

Category:DefaultRelease time:-0001-11-30Views:130

Hi, For Btree access method, partial key matches and range searches can be done through cursor with DB_SET_RANGE flag specified. It will return "the smallest record in the database greater than or equal to the supplied key". Seems it only suppor[More]

Windows 7 not genuine, Have partial key code

Category:DefaultRelease time:-0001-11-30Views:130

I keep geting this message that WIndows & is not genuine.  I know it is, however I recently had my hard drive replaced. I have a partial key code and my Computer name is HP Pavilliaon P6000 Series, Model #P6823B The Partial key code is: 73CQT-WFM7J-3[More]

Partial Key Selects

Category:DefaultRelease time:-0001-11-30Views:130

Hi everyone I am aware that when writing a select statement it is preferable to have all the PK fields in the where clause and failing that to have as many of the leftmost key fields as possible.  However, I have a situation where I am only intereste[More]

Performace Which is better ?  : Bapi inside a loop OR Select from Tables

Category:DefaultRelease time:2015-10-11Views:130

Hi Gurus, I have a report which displays purchase info records. If I am selecting from tables i need to use EINA, EINE, EORD and some other tables. There is a BAPI which gets all purchase info records specific to a vendor , material , purchasing orga[More]

Modify key in Hashed table

Category:DefaultRelease time:2015-10-11Views:130

Hi All, I have hashehed internal table like this. data :  it_zawcumsetz like hashed table of zawcumsetz with unique key KTONR_OPUS ZZ_AWC WAERS_OPUS. I am geeting entries in table. LOOP AT it_zawcumsetz into wa_zawcumsetz.      IF  wa_zawcumsetz-zz_a[More]

While loop in a Hash Map

Category:DefaultRelease time:-0001-11-30Views:130

My while loop doesnt seem to work in a hash map, it works fine when I loop an array list. It compiles but it doesnt seem to find any employees, should I use another loop? {code public Employee find(String id) Employee foundEmployee = null; int index[More]

Sy-tabix in relation to LOOP AT and READ TABLE

Category:DefaultRelease time:2015-10-11Views:130

Hi All, As per SAP documentation, 1) While looping through an internal table (LOOP AT), sy-tabix contains the index number of current row(for standard and sorted tables) 2)When successfully reading from an internal table(READ TABLE), sy-tabix is set[More]

Which system variable is reset at the exit of a loop of an internal table

Category:DefaultRelease time:2015-10-11Views:130

which system variable is reset at the exit of a loop of an internal table a)sy-loop b)sy-index c)sy-dbcnt d)sy-tabixYou might want to revist your threads from Friday, and award points and mark as "Answered" or "Solved". Regards, Rich H[More]

HELP! FOR LOOP TO SCROLL THROUGH TABLE AND CREATE DATABASE LINK

Category:DefaultRelease time:2015-10-11Views:130

Hi, Here's the scenario, not much of a PL programmer, just basic SQL so really need some help people! I have 2 tables. 1 contains list of DB's and the other contains rules to follow. I need to create a loop that goes through the table containing the[More]

Transportation lane KEY not getting generated in the table

Category:DefaultRelease time:2015-10-11Views:130

Transportation lane KEY not getting generated in the table Hi folks, The issue is like this : We have a weekly workorders upload program from legacy systems to SAP-APO. The legacy planners send a .CSV file containing material-wise workroders. A custo[More]

Hot
(Vector array) if (array.elementAt(0) + array.elementAt(1) + array.elementAt(2) ==3)     owins(); C:\java\KeyPad.java:159: cannot resolve symbol symbol : method intValue () location: class java.lang.Object if (array.elementAt(0).intValue() + array.el [More]
I recently switched from iPhone to Android. I unregistered my device online, turned off iMessage on my device, did a factory reset, removed my number from my AppleID, called support and had them disassociate my number from my AppleID. I also texted " [More]
Hello gurus, can you let me know in the configuring check boxes what i have missed out, while posting vendor invoice i am not able to get the tax amount and net invoice amount. thanks Pranamhi, check in your config if u have put tick mark under the t [More]
I understand how to create a link from text, or from an image, but I need to create a link within the image map so that clients on their cell phones can call by clicking on my chosen hotspot. Any suggestions?Right, thanks. I've had to adapt it and cr [More]
I am facing the problem of walkman getting paused automatically and start playing again, from past 5 months and everytime the service centre people return it to me with a software update. I am stressed out by taking my phone back after every 10 days [More]
Hi, When I create JPGs from my Raw files, the results don't look natural. Some colors have more saturation, some less. For example, the colors of the KoMi A series look somehow dirty; the reds of the Maxxum 5D seem to be oversaturated (dark reds are [More]
I have a bunch of photo & video editing software as well as some other things such as parallels on installed on my computer. I really don't want to have to reinstall everything all over again. I've tried to search this question, but I'm having one of [More]
Hi all can anybody tell me that how to call GP from webdynpro ABAP. and what are the advantages and disadvantages in this scenario?? if anyone reply then it would be the great help to me Regards Suresh babuHey, You can call a GP from WD ABAP through [More]
Hello, I need to give a talk and I dont have printer... I should use the iphone, but I dont know how to read Word documents in the iphone... Someone can help me?Apple has a paid  app called Pages.  I have never used it but I guess it will open Word d [More]
Hi Experts !! We are using ODI 11g to integrate with Essbase 11.2.1 (i.e. target) and our source system are around 5 (e.g. orcl ebiz, orcl databases) We need to map the source data like 100,101,102 ,103 to the branch 1001 in Essbase . I know ODI has [More]