How to count the per group-entries and put them in the new table
Hello Guru,
I want to sort the table cdhdr.
for example :
SELECT objectclas objectid changenr *******
INTO TABLE cdhdr_data
FROM cdhdr
WHERE ( ********) AND
objectclas = i_objectclas
The problem that I need to order the table by objectclas and objectid.
Let say objectclas is always MATERIAL.
Let's assume our key is changenr. May be our key will change to "objectclas objectid".
So, my problem that I need to get the number of the same "objectid" with different "changenr".
And also I need to put the count number of each object id with different changenr in the table cdhdr_data.
For example
objectclas objectid changenr count
MATERIAL 00***001 1 3
MATERIAL 00***001 4 3
MATERIAL 00***001 7 3
MATERIAL 00***005 2 2
MATERIAL 00***005 6 2
MATERIAL 00***003 5 2
MATERIAL 00***003 3 2
So later I'm going to use it.
LOOP AT cdhdr_data FROM sy-tabix TO ( sy-tabix + cdhdr_dat ( sy-tabix ) + count - 1 )
some optimized cdpos processing
IF entry found.
*don't loose time
*change the boundery
sy-tabix = count
ENDIF.
ENDLOOP.
Best Regards,
Kais
Hi Marcin,
Thanks for replying.
I'm having a trouble.
Let say I got an error on insert into ****.
It says me that the object (i_)cdhdr_data is not known.
Why, should I avoid to put objectclas = i_objectclas there.
I need to have MATERIAL OR DOKUMENT.
I can't just put 10000entries like that.
I'm also sceptic about how much this operation will cost.
Because I need to proceed the data with cdpos.
And This's why I'm doing that.
Later with this implementation I'm gone use LOOP AT *** FROM sy-tabix TO ****.
If I use my method, it will cost lower than inserting, changing, ...
I rather ignore the objectid and don't make any processing.
But with your solution I can say its rapidly.
Let assume there's n entries in cdhdr and m entries per n in cdpos.
So my algorithm will select n entries and will follow n*m entries but some of them will be proceeded an other not.
in cdhdr :
for n entries : n * 1 selecting
in cdpos :
always : n*m comparing,
processing between : n1 - nm
With you algorithm we will do :
in cdhdr :
for n entries : n* (1 selection + 1 modifing + 1 appending) <=> each operation cost O(1)
in cdpos :
for comparing between : n1 - nm
processing between : n1 - nm
Let see the middle value :
your case :
in cdhdr we have : n * O(3) ~ n * O(1) ~ O(n)
in cdpos :
O(c(nm)/2) + O(p(nm))2) ~ O((cp)((nm)/2)) ~ O(d(nm)) d= (cp)/2 ~ p/2
we know that O(c*n) ~ O (n) ; c ist a constant
c : comparing cost
p : processing cost
p >> c
my case :
in cdhdr we have : n * O(1) ~ O(n)
in cdpos :
O(c(nm)) + O(p((nm)/2)) ~ ? maybe O(d(nm)) d = c + (p/2) ~ p/2
c : comparing cost
p : processing cost
p >> c
Ok, this in theorie, but in reality I've no idea.
Is there a mathematician there ?
Regards,
Kais
FORM get_cdhdr_data_modified_1
USING
i_from_date TYPE dats
i_from_time TYPE terf
i_to_date TYPE dats
i_to_time TYPE terf
i_objectclas TYPE j_objnr
CHANGING
cdhdr_data TYPE SORTED TABLE.
types: begin of t_cdhdr_data,
objectclas type cdhdr-objectclas,
objectid type cdhdr-objectid,
changenr type cdhdr-changenr,
count type i,
end of t_cdhdr_data.
DATA : i_cdhdr_data type table of t_cdhdr_data with key objectclas objectid changenr with header line.
DATA: st_index LIKE sy-tabix, count TYPE i.
SELECT objectclas objectid changenr
INTO TABLE i_cdhdr_data
FROM cdhdr
WHERE ( ( udate GT i_from_date AND udate LT i_to_date ) OR
( udate EQ i_from_date AND udate NE i_to_date AND utime GE i_from_time ) OR
( udate EQ i_to_date AND ( udate NE i_from_date OR utime GE i_from_time ) AND utime LE i_to_time )
) AND
objectclas = i_objectclas.
INSERT INTO i_cdhdr_data FROM i_cdhdr_data.
ENDSELECT.
LOOP AT i_cdhdr_data.
AT NEW objectid.
"remember start position
st_index = sy-tabix.
endat
at end of objectid.
count = sy-tabix - st_index + 1. "count accual position
cdhrd_data-count = count. "now you have how many entries are in each objectid
MODIFY TABLE i_cdhdr_data FROM i_cdhdr_data.
ENDAT.
ENDLOOP.
Similar Messages
-
My I-touch could NOT be restored. I had purchased songs from the I-tune store and they were on the "old" i-touch. I cannot access the tunes from the "old" device. How can I get "retrieve" the songs I purchased and put them on my NEW I-touch?? Please help!
I could purchase the songs again. But I really don't want to spend more money. Help?You can redownload most iTunes purchases by:
Downloading past purchases from the App Store, iBookstore, and iTunes Store -
How do I get the pictures folders in photoshop 7 out of My window XP computer and put them into my new computer windows 8 photoshop12
I am so sorry for you and your situation. Were you using iCloud photostream?
Otherwise I do not see any chance for your precious photos.
Congrats anyway on the little darling! -
II've had my ipad with retina display for about a 1 now and everything was fine In till I got my iphone 4s and put them on the same account then my ipad stopped letting me log in to my FaceTime and iMessage and it doesn't let me update my apps and dosnt let me log in to iCloud ever since I got my phone and put them on the same account does anyone know how I could fix it and still be able to connected to my iphone??
Did you change your Apple ID?
Unable to make or receive FaceTime calls after April 16, 2014
http://support.apple.com/kb/TS5419
Using FaceTime http://support.apple.com/kb/ht4319
Troubleshooting FaceTime http://support.apple.com/kb/TS3367
The Complete Guide to FaceTime + iMessage: Setup, Use, and Troubleshooting
http://tinyurl.com/a7odey8
Troubleshooting FaceTime and iMessage activation
http://support.apple.com/kb/TS4268
iOS: FaceTime is 'Unable to verify email because it is in use'
http://support.apple.com/kb/TS3510
Using FaceTime and iMessage behind a firewall
http://support.apple.com/kb/HT4245
iOS: About Messages
http://support.apple.com/kb/HT3529
Set up iMessage
http://www.apple.com/ca/ios/messages/
iOS and OS X: Link your phone number and Apple ID for use with FaceTime and iMessage
http://support.apple.com/kb/HT5538
How to Set Up & Use iMessage on iPhone, iPad, & iPod touch with iOS
http://osxdaily.com/2011/10/18/set-up-imessage-on-iphone-ipad-ipod-touch-with-io s-5/
Set Up Alert Sounds
http://www.quepublishing.com/articles/article.aspx?p=1873027&seqNum=3
Extra FaceTime IDs
http://tinyurl.com/k683gr4
Troubleshooting Messages
http://support.apple.com/kb/TS2755
Troubleshooting iMessage Issues: Some Useful Tips You Should Try
http://www.igeeksblog.com/troubleshooting-imessage-issues/
Setting Up Multiple iOS Devices for iMessage and Facetime
http://macmost.com/setting-up-multiple-ios-devices-for-messages-and-facetime.htm l
FaceTime and iMessage not accepting Apple ID password
http://www.ilounge.com/index.php/articles/comments/facetime-and-imessage-not-acc epting-apple-id-password/
Fix Can’t Sign Into FaceTime or iMessage iOS 7
http://ipadtutr.com/fix-login-facetime-imessage-ios-7/
FaceTime, Game Center, Messages: Troubleshooting sign in issues
http://support.apple.com/kb/TS3970
Unable to use FaceTime and iMessage with my apple ID
https://discussions.apple.com/thread/4649373?tstart=90
iOS 7 allows you to block phone numbers or e-mail addresses from contacting you via the Phone, FaceTime, or Messages
http://howto.cnet.com/8301-11310_39-57602643-285/you-can-block-people-from-conta cting-you-on-ios-7/
How to Block Someone on FaceTime
http://www.ehow.com/how_10033185_block-someone-facetime.html
My Facetime Doesn't Ring
https://discussions.apple.com/message/19087457#19087457
How to watch FaceTime calls on the big screen with Apple TV
http://www.imore.com/daily-tip-ios-5-airplay-mirroring-facetime
Send an iMessage as a Text Message Instead with a Quick Tap & Hold
http://osxdaily.com/2012/11/18/send-imessage-as-text-message/
To send messages to non-Apple devices, check out the TextFree app https://itunes.apple.com/us/app/text-free-textfree-sms-real/id399355755?mt=8
How to Text on the iPad
http://ipad.about.com/od/ipad_tricks/a/How-To-Text-On-The-Ipad.htm
How to Send SMS from iPad
http://www.iskysoft.com/apple-ipad/send-sms-from-ipad.html
How to Receive SMS Messages on an iPad
http://yourbusiness.azcentral.com/receive-sms-messages-ipad-16776.html
Apps for Texting http://appadvice.com/appguides/show/apps-for-texting
You can check the status of the FaceTime/iMessage servers at this link.
http://www.apple.com/support/systemstatus/
Cheers, Tom -
My mac book pro crashed and the logic board died. They said that i could get the hard drive out and it should have all my files on it. How do i get them off and put them on my new computer?
Mj
Do you mean a case for the external hard drive? See here. Hope this may be helpful to you.
Regards,
Joseph -
HT1766 how do i save my old photos and put it on the new device?
how do i save my old photos and put it on the new device?
Here is how to get everything:
iOS: Transferring information from your current iPhone, iPad, or iPod touch to a new device
To get photos taken by or saved to the iPod to the computer see:
iOS: Importing personal photos and videos from iOS devices to your computer
If they were synced from a computer you need a third-party program like TouchCopy or PhoneView to get them into the computer.
To move from computer to new iPod
iOS and iPod: Syncing photos using iTunes -
I filmed several takes of the same scene for a movie. I trimmed the best clips from each take and put them into the project screen. However, I can't figure out how to make it flow seamlessly as one scene. Can someone please help me??
1-800-676-2775 apple support tech support 1 800 275 2273
If your computer is on one minute before it freezes, than you have one minute to secure your serial number.
click the apple----->click about this Mac ------> click on version----> until you see the serial number. You may have to do this a couple of times if it freezes before you have all the numbers. A camera might help.
Good Luck -
Got a new ipod nano 7. Have music on both Windows 7 laptop and mac. How do i pull music from both and put them on my ipod. Thanks
Yes.
tomfromlong beech wrote:
"Remember one one level of subfolders is allowed." Does this mean that you can have as many subfolders as you want, but they can only be one level deep under the main folder? -
istalling third party instruments.. i have tried to go to application support and putting them into the sampler but they are still not showing up.. can someone help me
Hi
So these are EXS24 Sampler Instruments?
If yes... the .exs Instrument files need to go in
Library:Application Support:Logic:Sampler Instruments
Or
<User>:Library:Application Support:Logic:Sampler Instruments
CCT -
I have an iPod whose contents I want to transfer to a newer Ipod. At some stage when I thought I was syncing correctly I wasn't so I lost the music files from my library. Is there any way to get them back from the older iPod and put them onto the newer one again?
Have you not got a backup of your content on, for example, external drives ? If not then you could have a look to see if any of the utilities mentioned in this old post still exist and work : https://discussions.apple.com/message/11014893?messageID=11014893#11014893
-
How to rotate pictures from iphone when you put them on the computer
how to rotate pictures from iphone when you put them on the computer
The program you use on your computer to view the picture might have a feature to allow you to rotate the photo
-
Does anyone have any suggestions on if there is any way to get the photos off the one that had water damage and put them on the new iPhone 5?
Unless you had photostream activated there's no way to get those pictues back.
-
Need a little help my computer hard drive crashed and I bought a new computer and would like to retrieve my many songs that I paid for and upload them to my new computer how Retrieve my music t thank you
Either restore it from a backup, or use these instructions to redownload it through the iCloud.
(84741) -
How do i take pictures from my Voyager and put them on the pc????
How do i take pictures from my Voyager and put them on my pc with a USB Cable????
christinafam5 wrote:
How do i take pictures from my Voyager and put them on my pc with a USB Cable????
You'll need a MicroSD Card in the Voyager's Card slot. Copy the photos from the internal memory of your phone to the SD Card. Now you're ready to install the USB Drivers on your PC so you can connect your phone. Download the Drivers from Verizon's web site or go to http://www.lgforum.com/resources and under the Verizon section, download the "LG_USB_Drivers.." file and install the drivers on your PC. Next plug the Voyager into the USB port and from the "Tools" menu on the phone go to USB Connection and choose Mass Storage Mode and the SD cad in your phone will show up on your PC. You can now copy files to and from the Voyager. -
How do I take music from my itunes on my iPhone 4s that i didnt purchase and transfer them to my new itunes without deleting anything. I do not have my old computer and do not want to delete all my music on my phone. I do have some music i did purchase and transfered it but that music i didnt purchase, i dont know how to transfer. HELP!!!!!!
Music is designed to sync in one way only, and that is from iTunes to the phone. There is the expectation that you would backup the computer to save this data. There are 3rd party solutions to try and recover music from the phone to put back into a blank iTunes library.
See this user generated tip for help https://discussions.apple.com/docs/DOC-3141
Maybe you are looking for
-
Deskew a pdf in photoshop?
I'm trying to digitize a book for someone, however, after trying to deskew the pages by using both, Acrobat-> optimize pdf, and also using the crop and straighten tools on photoshop, I am left with the top of the pdf being straight and the bottom sli
-
How many custom-id:s / custom-numbers etc. customer has to register(minimum)in order to purchase All f-secure products on ALL possible platforms?
-
Need a help to create user and assign BP to it
Hi, I have requirement to create Users (like SU01) in CRM and for that users need to create BP with role EMPLOYEE and assign BP to that USER. Can anybody please help on which Function Module I need to use to create user and assign BP to it. Thanks in
-
I was experimenting with using workspace manager (via DBMS_WM) to version a set of tables. Does everything I want, easily and quickly. However, when I update versioned objects in APEX, and then look at the HIST table, the user name is APEXPUBLIC_USER
-
Why can't I see my audio files in iWeb?
When I open iWeb/iPhoto/Keynote etc I can't see Audio files to add them in. I can access photos and movies but not audio files. I can't even access Garageband files! Does anyone have any ideas as to why this is and how I can fix it???