We have added search box. Key in SAP issue keyword to search
TopBottom

Announcement: wanna exchange links? contact me at sapchatroom@gmail.com.

RE:[sap-dev] Multiple Key Hashed Table, Full Key of Next Table Vs. Select With Constants

Posted by Admin at
Share this post:
Ma.gnolia DiggIt! Del.icio.us Yahoo Furl Technorati Reddit

Reply from joeelf on Sep 22 at 12:16 AM
The good news is that the longest runtime on this program was 5500 seconds last week, and with some minor adjustments (using a sorted table rather than standard for some of the big data and adjusting the READ in a loop to use the key better) it is down to 1100 seconds today (with the same criteria).

One of the other enhancements was a newer ALV grid, which is still rather pointless for any runs over 5-10 minutes in my opinion. The users need to be able to sort and filter and drilldown on the data online, requiring an even faster runtime.

I am guessing with hash tables this 1100 seconds may indeed be possible to run in 300 seconds (with dropping BKPF and MBEW, and doing a more selective read to EKKO & EKPO and KEKO + KEPH).

Best regards.
Joe

---------------Original Message---------------
From: joeelf
Sent: Thursday, September 17, 2015 3:09 AM
Subject: Multiple Key Hashed Table, Full Key of Next Table Vs. Select With Constants

I have a program that does a select from BSIS to return the key information to then read BSEG.

Should it be coded like this to have the fewest varying fields in the BSEG select:

TYPES: BEGIN OF I_BSIS
BELNR TYPE I,
BUZEI TYPE I,
END OF I_BSIS.

DATA: HT_BSIS TYPE HASHED TABLE OF I_BSIS WITH UNIQUE KEY BELNR BUZEI.

SELECT BELNR BUZEI
INTO HT_BSIS
FROM BSIS
WHERE
BUKRS = p_BUKRS and
GJAHR = p_GJAHR and
MONAT = p_MONAT and
BUDAT in s_BUDAT and
HKONT in s_HKONT and
WERKS in s_WERKS and
BLART in s_BLART

LOOP AT HT_BSIS
SELECT BELNR BUZEI GJAHR MATNR WERKS, etc.
FROM BSEG
WHERE
BUKRS = p_BUKRS and
GJAHR = p_GJAHR and
BELNR = HT_BSIS-BELNR and
BUZEI = HT_BSIS-BUZEI

Or should the BUKRS and GJAHR be in the HT_BSIS declaration and select for BSIS, and listed as HT_BSIS-BUKRS and HT_BSIS-GJAHR in the WHERE on BSEG?

Thanks,
Joe

 
Reply to this email to post your response.
 
__.____._
Manage Settings | Unsubscribe | Create FAQ | Send Feedback
  
Copyright © 2015 Ziff Davis, LLC. and message author.
Ziff Davis, LLC. 28 E 28th Street New York, NY 10016
joeelf  
 
Mark as helpful
View this online
Ask a new question
 
In the Spotlight
Have a technical question? Need to find IT solutions? Ask your peers in the Toolbox for IT community.

_.____.__

0 comments:

Post a Comment

T r a n s l a t e to your language