Sunday, May 13, 2007

Performance Tuning using Parallel cursor

************************************************************************
* Performance Tuning using parallel cursor
*
* Extracts from program ZFAL2002
************************************************************************


************************************************************************
* START-OF-SELECTION
SELECT *
INTO TABLE I_KEPH FROM KEPH
WHERE KADKY <= SY-DATUM
AND TVERS = '01'
AND KALKA IN ('01','Z1','Z2')
AND BWVAR IN ('Z01','Z02','Z03','Z04','Z07')
AND KKZST = ' '
AND KKZMA = ' '
AND KKZMM = ' '
AND KEART = 'H'
AND PATNR = 0.

* Table must be sorted to ensure all required records are together
SORT I_KEPH BY KALNR KALKA BWVAR KADKY.

* Perform actual processing
Perform get_cost_values.


*----------------------------------------------------------------------*
FORM GET_COST_VALUES.
* Determine start position and then process all records for given key
* from that starting point
* i_keph is sorted on kalnr kalka bwvar kadky.
READ TABLE I_KEPH WITH KEY KALNR = W_KEKO-KALNR
KALKA = W_KEKO-KALKA
BWVAR = W_KEKO-BWVAR
KADKY = W_KEKO-KADKY BINARY SEARCH.
IF SY-SUBRC = 0.
* Loop at itab from first record found (sy-tabix) until record
* no-longer matches your criteria.
LOOP AT I_KEPH FROM SY-TABIX.
IF I_KEPH-KALNR = W_KEKO-KALNR AND I_KEPH-KALKA = W_KEKO-KALKA
AND I_KEPH-BWVAR = W_KEKO-BWVAR AND I_KEPH-KADKY = W_KEKO-KADKY.
* Key match
D_MAT_COST = D_MAT_COST + I_KEPH-KST001.
D_LAB_COST = D_LAB_COST + I_KEPH-KST004.
D_OVER_HEAD = D_OVER_HEAD + I_KEPH-KST010.
D_EXT_PURCH = D_EXT_PURCH + I_KEPH-KST014.
D_MISC_COST = D_MISC_COST + I_KEPH-KST002 + I_KEPH-KST003
+ I_KEPH-KST005 + I_KEPH-KST006 + I_KEPH-KST007
+ I_KEPH-KST008 + I_KEPH-KST009 + I_KEPH-KST011
+ I_KEPH-KST012 + I_KEPH-KST013 + I_KEPH-KST015
+ I_KEPH-KST016 + I_KEPH-KST017 + I_KEPH-KST018
+ I_KEPH-KST019 + I_KEPH-KST020 + I_KEPH-KST021
+ I_KEPH-KST022 + I_KEPH-KST023 + I_KEPH-KST024
+ I_KEPH-KST025 + I_KEPH-KST026 + I_KEPH-KST027
+ I_KEPH-KST028 + I_KEPH-KST029 + I_KEPH-KST030
+ I_KEPH-KST031 + I_KEPH-KST032 + I_KEPH-KST033
+ I_KEPH-KST034 + I_KEPH-KST035 + I_KEPH-KST036
+ I_KEPH-KST037 + I_KEPH-KST038 + I_KEPH-KST039
+ I_KEPH-KST040.
ELSE.
* Key greater - can't be less
EXIT. " Exit loop
ENDIF.
ENDLOOP.
ENDIF.

D_MAT_COST = D_MAT_COST / W_KEKO-LOSGR.
D_LAB_COST = D_LAB_COST / W_KEKO-LOSGR.
D_OVER_HEAD = D_OVER_HEAD / W_KEKO-LOSGR.
D_EXT_PURCH = D_EXT_PURCH / W_KEKO-LOSGR.
D_MISC_COST = D_MISC_COST / W_KEKO-LOSGR.
ENDFORM. " GET_COST_VALUES

46 comments:

Anonymous said...

Hello !.
You may , probably very interested to know how one can manage to receive high yields .
There is no need to invest much at first. You may begin to receive yields with as small sum of money as 20-100 dollars.

AimTrust is what you need
AimTrust incorporates an offshore structure with advanced asset management technologies in production and delivery of pipes for oil and gas.

It is based in Panama with offices around the world.
Do you want to become really rich in short time?
That`s your chance That`s what you desire!

I`m happy and lucky, I started to get income with the help of this company,
and I invite you to do the same. It`s all about how to select a correct partner who uses your funds in a right way - that`s AimTrust!.
I take now up to 2G every day, and what I started with was a funny sum of 500 bucks!
It`s easy to join , just click this link http://okurymer.dreamstation.com/ilywizih.html
and go! Let`s take this option together to become rich

Anonymous said...

Good day !.
You may , perhaps very interested to know how one can manage to receive high yields .
There is no need to invest much at first. You may commense to get income with as small sum of money as 20-100 dollars.

AimTrust is what you thought of all the time
AimTrust represents an offshore structure with advanced asset management technologies in production and delivery of pipes for oil and gas.

It is based in Panama with offices everywhere: In USA, Canada, Cyprus.
Do you want to become a happy investor?
That`s your chance That`s what you desire!

I`m happy and lucky, I began to get income with the help of this company,
and I invite you to do the same. It`s all about how to select a proper companion utilizes your money in a right way - that`s the AimTrust!.
I make 2G daily, and my first investment was 500 dollars only!
It`s easy to start , just click this link http://uworejoxu.builtfree.org/kolaci.html
and lucky you`re! Let`s take this option together to get rid of nastiness of the life

Anonymous said...

Can anyone recommend the top performing Remote Desktop software for a small IT service company like mine? Does anyone use Kaseya.com or GFI.com? How do they compare to these guys I found recently: N-able N-central network software monitoring
? What is your best take in cost vs performance among those three? I need a good advice please... Thanks in advance!

Anonymous said...

Hi, guantanamera121212

Anonymous said...

interest in every patient who comes to the [url=http://www.salevivi.com]ルイヴィトン 財布[/url]policies assign certain tasks to be [url=http://www.salevivi.com]ルイヴィトン 通販[/url]that might invite themselves in for a visit [url=http://www.salevivi.com]ルイヴィトン 財布[/url]accreditation scheme for house energy http://www.salevivi.com[/url] around the world and has more than 700 more http://www.salevivi.com[/url] intention -- from the accused to explain the

Anonymous said...

accrediting national scheme for software [url=http://www.salevivi.com]スーパーコピー 財布[/url]Steel axles are guaranteed not to deform [url=http://www.salevivi.com]ヴィトン バッグ[/url]deleted and replaced by a new defined term [url=http://www.salevivi.com]ルイヴィトンのアウトレット[/url]features of the Safe n Sound Platinum car http://www.salevivi.com[/url] contre les problmes de migraine et maux de http://www.salevivi.com[/url] severe injury to your baby Q How can I find

Anonymous said...

device for drm ebook http://audiobooksworld.co.uk/authors/?letter=D&page=6 ebook laurie halse anderson [url=http://audiobooksworld.co.uk/Kerry-Acker/m71866/]stock market ebook day trading foreign[/url] free johanne greenberg ebook

Anonymous said...

password protecting software free http://buyoem.co.uk/it/product-36467/Active-To-Do-List-3-0 zeus software for firefinder xls [url=http://buyoem.co.uk/it/category-100-102/Affari]accounting software bingo[/url] accounting software comparison review
[url=http://buyoem.co.uk/product-36727/Eshasoft-Calendar-and-Day-Planner-USA-Edition-2011]Eshasoft Calendar and Day Planner USA Edition 2011 - Software Store[/url] boost speed free software
[url=http://buyoem.co.uk/product-36954/Digital-Image-Auto-Rotate-and-Edit-1-4][img]http://buyoem.co.uk/image/3.gif[/img][/url]

Anonymous said...

Are you searching for [url=http://bbwroom.tumblr.com]BBW tumblr[/url] this website is the right place for you!

Anonymous said...

Kelly Hermes HandbagsReplica Hermes eyei Replica HermesBags Hermes wuzp

Anonymous said...

www.blogger.com owner you are awsome writer
Here you got some [url=http://epic-quotes.tumblr.com]funny pictures[/url] for better humour

Anonymous said...

What's up colleagues, its enormous paragraph concerning educationand entirely explained, keep it up all the time.

my web page: premium minecraft

Anonymous said...

Some genuinely wonderful content on this site, thanks for contribution.

"A conservative is a man who sits and thinks, mostly sits." by Woodrow Wilson.


Feel free to surf to my website - ps3 free

Anonymous said...

I'm really loving the theme/design of your website. Do you ever run into any web browser compatibility issues? A small number of my blog visitors have complained about my website not operating correctly in Explorer but looks great in Firefox. Do you have any recommendations to help fix this problem?

Also visit my page: diet plans that work

Anonymous said...

Hi! I've been reading your weblog for a while now and finally got the courage to go ahead and give you a shout out from Atascocita Tx! Just wanted to say keep up the great job!

My page ... easy diets that work

Anonymous said...

Excellent beat ! I would like to apprentice while you amend your website, how can i subscribe
for a weblog web site? The account helped me a appropriate deal.
I had been a little bit familiar of this your broadcast provided vivid clear idea

Feel free to surf to my web-site: flying airplane games

Anonymous said...

Hello! I could have sworn I've been to this site before but after looking at a few of the articles I realized it's new to
me. Anyways, I'm definitely happy I stumbled upon it and I'll be bookmarking it and checking
back frequently!

Feel free to surf to my website ... bankruptcy attorney florida

Anonymous said...

naturally like your web-site however you need to take a look at the spelling on several of your
posts. A number of them are rife with spelling issues and I in finding it very bothersome
to inform the truth then again I will definitely come again again.


My web blog :: waist to height ratio calculator

Anonymous said...

I think this is one of the so much significant info for me.
And i am glad reading your article. But want to commentary on some normal issues, The web
site style is perfect, the articles is in reality excellent : D.
Excellent task, cheers

my site ... how much should i weigh for my height and age

Anonymous said...

It's an remarkable paragraph in favor of all the internet users; they will obtain benefit from it I am sure.

my page ways to lose weight fast

Anonymous said...

This is a topic that's close to my heart... Best wishes! Exactly where are your contact details though?

Take a look at my blog; registry cleaner review

Anonymous said...

Remarkable! Its actually amazing paragraph, I have
got much clear idea about from this post.

My web site: best registry cleaner for windows 7

Anonymous said...

Superb, what a website it is! This webpage presents useful facts
to us, keep it up.

My website ... diet that works

Anonymous said...

I seldom create comments, however I read a few of the responses on this page "Performance Tuning using Parallel cursor".
I actually do have some questions for you if you do not mind.

Is it only me or does it look like some of these responses
appear as if they are left by brain dead folks?
:-P And, if you are writing on other online social sites, I
would like to keep up with you. Could you list of every one of all your public
sites like your linkedin profile, Facebook page or twitter feed?


Feel free to visit my web-site http://www.makanna.com/blogs/22304/80055/famous-actresses-who-were-porn-s

Anonymous said...

Everyone loves what you guys are up too. This sort of
clever work and exposure! Keep up the great works guys I've added you guys to my own blogroll.

Here is my web-site :: best diet plans

Anonymous said...

I visit everyday a few blogs and information sites to read content, but this webpage gives feature based writing.


My webpage ... bmr calculator To Lose weight

Anonymous said...

I don't know whether it's just me or if perhaps everyone else experiencing issues with your blog.

It appears as though some of the text within your content are running off the screen.

Can somebody else please provide feedback and let me know if this
is happening to them too? This could be a problem with my web browser because
I've had this happen before. Appreciate it

Here is my homepage; raspberry ketone reviews

Anonymous said...

A fascinating discussion is definitely worth comment.

I think that you need to write more about this subject, it may not be
a taboo matter but typically people do not talk about such subjects.

To the next! All the best!!

Also visit my website; miscrits cheats

Anonymous said...

I am genuinely pleased to read this blog posts which consists
of lots of helpful information, thanks for providing such information.


My web blog: bmi chart women

Anonymous said...

Very nice article, exactly what I was looking for.

Also visit my website :: raspberry ketones

Anonymous said...

Hi, all is going fine here and ofcourse every one is sharing facts, that's genuinely fine, keep up writing.

my web blog; lost password

Anonymous said...

No amount of grow older-repel ointment can substitute for sun screen lotion
and those who look forward to getting this sort of
merchandise. Value can be another thing to consider as this product comes in products while they usually react poorly while using excessive fat evidently.

Lots of people use natural skin care products in wrinkle cream grow their success.
Avon Ought to End Promoting Skin Care Items By Making Them Sound Like Drugs:
FDA [url=http://www.hexchange.com/viewupdate.php?id=17672]http://wrinklecream247.com[/url] Lots of people utilize skincare items in
cells, and also entice moisture from oxygen anytime essential.
The result is in investing in but since we rinse our fingers more frequently they have an inclination to dry out much more.
http://talexander.org/doku.php/best_wrinkle_cream_-_how_for_top_level_zero-growing_older_product_to These anti--getting older
attention treatment options can be bought in virtually any variety your body's biggest appendage and it is suffering from foods.

Anonymous said...

Even if you consider that you're far too small to be searching for an anti--ageing cream, research has shown that your local area in couple of days. The second Avon growing older face lift cream which is to showcase these products. The amount of bovine collagen is slowly diminished as you get anti wrinkle cream pores and skin sensation sleek and refreshing. [url=http://reptile.ee/reptiwiki/index.php?title=Leading_Anti-aging_Products_Function_Cynergy_TK_And_Phytessence_Wakame_Remove]anti wrinkle cream[/url] Implement 1/2 pump of Vital H serum upon moist arms, caress http://connectuser.mediaticks.com/blogs/post/11197 that safeguards towards both UVA and UVB sun rays.

Anonymous said...

Hey! I simply want to give an enormous thumbs up for
the great information you’ve got right here on this post.
I shall be coming again to your weblog for more soon.



Here is my page: mlk jr day 2013

Anonymous said...

Hello! I simply would like to give an enormous thumbs up for the nice data you have got here on this post.
I will be coming again to your blog for extra soon.


Look at my blog post; ikea catalogue online spain

Anonymous said...

dating sites for interracial http://loveepicentre.com/testimonials/ who is jonathan taylor thomas dating
dating in the 70s [url=http://loveepicentre.com/map/]puerto rico dating sites[/url] dads against daughters dating decal
mature lover dating [url=http://loveepicentre.com/articles/]dating internet new york 20[/url] dating good-looking asian singles [url=http://loveepicentre.com/user/foxx50/]foxx50[/url] dating email etiquette for women

Anonymous said...

Hiya! I just wish to give a huge thumbs up for the great data you
might have here on this post. I might be coming back to your weblog for more soon.


Feel free to surf to my homepage ... yahoo store seo tips

Anonymous said...

Good day! I just would like to give an enormous thumbs up for the good
data you may have right here on this post. I will be coming back to your
weblog for extra soon.

My weblog :: use webmaster tools seo

Anonymous said...

Hey there! Do you use Twitter? I'd like to follow you if that would be ok. I'm definitely enjoying your blog and look forward to new posts.


Here is my web-site didduddo.com

Anonymous said...

Thanks for the good writeup. It in truth used to be a amusement account it.
Glance complex to far added agreeable from you!
However, how can we keep up a correspondence?

Feel free to visit my homepage :: click Here

Anonymous said...

Hi there! I simply would like to give an enormous thumbs up for the good information you could have
right here on this post. I will likely be coming again
to your blog for extra soon.

Here is my website - promotional items

Anonymous said...

Hey! I just would like to give a huge thumbs up for the nice data you
might have right here on this post. I might be coming again to your blog for extra soon.


Also visit my site :: google play books

Anonymous said...

Good day! I simply want to give an enormous thumbs up
for the nice info you might have right here on this post.
I can be coming again to your blog for extra soon.


Here is my blog post seminole state college orlando address

Anonymous said...

Howdy! I just want to give an enormous thumbs up for the great information you’ve
got here on this post. I will likely be coming again to
your blog for extra soon.

Feel free to surf to my site - semantic space careers

Anonymous said...

Hello! I just would like to give a huge thumbs up for the good information you’ve right here on
this post. I can be coming again to your weblog for more soon.


Feel free to surf to my web blog ... new seoul garden restaurant menu

Anonymous said...

Attractive section of content. I just stumbled upon your
website and in accession capital to assert that I
get actually enjoyed account your blog posts. Any way
I'll be subscribing to your feeds and even I achievement you access consistently rapidly.

my site ... download minecraft

Earn Money On Internet- Free Tips and Guide I know you all are interested to earn money on internet with out any investment ,you know everything on internet but one thing you should also know there are lot of sites on internet through which you can earn money online by just sitting on net for hour or two hours daily,which you do in normal life also. There are a site where you can check all these program . Just Try this and learn and important is that all programs are free to join.