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
When I try to download them from the Waterstones website I get a message saying: ‘Some file types associated with EPUB files are not associated with Reader Library.  Do you want to associate them now?  When I reply yes I get another message; ‘Configu [More]
Does anyone know what to do if you try to open iPhoto and the box comes up and says "You can't open the application iPhoto because it may be damaged or incomplete."  Previous to this I added some pictures and documents that were scanned from my [More]
Hi Experts, i am looking to add some custom fields to Transaktion Va05n. It seems,at least to me, that the underling Program "SD_SALES_ORDERS_VIEW" is not meant to be enhanced. I guess i could do a append to the structure used in the ALV-Output, [More]
Hi Friends,    Is there any function module to create or change or delete the business partners, there is a possiblity to do with CRMXIF_PARTNER_SAVE, but we are having some issue while calling in ISA applications. So please let me know is  there any [More]
Hi, I am new to SQL Server 2012. I have deployed and executed a SSIS package on the Integration Services catalog. Now, to analyze the performance of the executed package I wish to query the SSISDB catalog views to retrieve the cpu & memory usage hist [More]
My cable modem got reset the other day when cable went out. When it came back on everything works except web browsing (and software update and itunes radio) My email is fine sending and recieving. FTP works great. I just cannot browse. Any ideasJoel, [More]
I have done a search on line and on this forum and can't seem to find a solution to this. I have Vista and have gone here http://www.adobe.com/support/downloads/detail.jsp? ftpID=4050 and downloaded the zip folders containing the HSBHSL plug in. I do [More]
I photographed a timed sequence of still images lasting for a few seconds, and would like to know how I can create a short movie from these images. I've already photoshopped the images which are saved as .jpg files. And want to post it as a movie fil [More]
About 3 update ago it did the same thing then all of a sudden a new update and it started working again now with the last update it has stopped working again. Please HelpOk. I disabled hardware acceleration. The only extension is the McAfee Scriptsca [More]
I had to replace my hard drive on my desktop unit. Now my laptop no longer can find my wireless router. I tried re-loading the software, but it tells me I must configure with the default username and password. I can't find what they are or how I do t [More]