AT end of... some issues in using them

Hi ALL,
I am having a req where i have to calculate the no of empty bin for each 3 and 4 row combination.... and each combination will be moved to flat file.
so i tried to use AT end of ( field) ....
as below:
   loop at it_lagp into wa_lagp.
      move wa_lagp-lgnum to wa_final-lgnum.
       timestamp
      move wa_lagp-lgber to wa_final-lgber.
      move wa_lagp-lptyp to wa_final-lptyp.
      if wa_lagp-lgber is not INITIAL and wa_lagp-lptyp is INITIAL.
        at end of lgber.
          cnt = cnt + 1.
          move cnt to wa_final-count.
          append wa_final to it_final.
          clear : cnt.
        endat.
      ELSEIF wa_lagp-lgber is INITIAL and wa_lagp-lptyp is not INITIAL.
        at end of lptyp.
          cnt = cnt + 1.
          move cnt to wa_final-count.
          append wa_final to it_final.
          clear : cnt.
        endat.
      else.
        at end of lgber.
          at end of lptyp.
            cnt = cnt + 1.
            move cnt to wa_final-count.
            append wa_final to it_final.
            clear : cnt.
          endat.
        endat.
      endif.
    endloop.
The prblm is at the bolded ones... as we see 3rd row is having 0001 which ll not end so the statement is not working for me.. i want taht it should consider both 3rd(lgber) and 4th (lptyp) row... and count..
1     5051
2     5051     0001
3     5051     0001
4     5051     0001
5     5051     0001
6     5051     0001     E060
7     5051     0001     E075
8     5051     0001     E075
9     5051     0001     E090
10     5051     0001     E090
11     5051     0001     E090
12     5051     0001     E090
13     5051     0001     E090
14     5051     0001     E090

Hi,
     Write AT END on the last field ...
Ex: ITAB is an internal table with the given data ...
itab-a = '5051'.
append itab.
clear  itab.
itab-a = '5051'.
itab-b = '0001'.
append itab.
append itab.
append itab.
append itab.
clear  itab.
itab-a = '5051'.
itab-b = '0001'.
itab-c = 'E060'.
append itab.
clear  itab.
itab-a = '5051'.
itab-b = '0001'.
itab-c = 'E075'.
append itab.
append itab.
clear  itab.
itab-a = '5051'.
itab-b = '0001'.
itab-c = 'E090'.
append itab.
append itab.
append itab.
append itab.
append itab.
append itab.
clear  itab.
*loop thru itab as ....
loop at itab.
  v_count = v_count + 1.
  at end of c.
    read table itab index sy-tabix.
    itab-d = v_count.
    modify itab index sy-tabix.  <-- pass the values to another internal table
    clear v_count.
  endat.
endloop.
loop at itab.
    write :/1 itab-a,
            10 itab-b,
            20 itab-c,
            30 itab-d.
endloop.
output from the above:
5051                                 1
5051     0001
5051     0001
5051     0001
5051     0001                        4
5051     0001      E060              1
5051     0001      E075
5051     0001      E075              2
5051     0001      E090
5051     0001      E090
5051     0001      E090
5051     0001      E090
5051     0001      E090
5051     0001      E090              6
Regards,
Srini.

Similar Messages

  • Some issues when using my N8 as modem over BT.

    Hi folks!
    I'm using my N8 to get internet access when I'm traveling for my macbook pro (late 2011 model). Few issues have apeared. First, getting the connection working might take 2 to 4 attempts. Second, when downloading large files over http the connection some how hangs, N8 shows no data trasfers from the 3G network and the connection is un-usable. I need to close it and start all over again.
    My N8 is fully updated Anna. And the OSX is fully updated Lion.
    Happy holidays!
    -Temeteus82

    I do have a strong signal. I was able the day before yesterday to be on the internet for more than 5 hours without it disconnecting. Then I tried yesterday to connect to the internet and it started to disconnect again, after a few minutes. I tried again yesterday, via another usb port and I was able to stay connected for longer without being disconnected. I suspect it might be a usb port issue. Let me give it a try a few more time before I jump to conclusion.

  • Hi There I am Facing Some issues in Using OTM with Open Script Please get all information from following detail.

    Hi There,
    I have created a new Open Script in following way
    File-> New-> Functional-> Oracle EBS Forms
    I have written some code and tried to link the script with OTM. That time OTM is showing script in Directory while linking. It is properly Linked and working correctly.
    Then I have created new script again but Now I have enabled Datatable plugin of script from (Script->Properties->Module->Datatable).
    This time when the Script is "NOT Visible"  in OTM direcotry when I try to link.
    I have wasted my 4 to 5 days to find solution on this .
    Please show me some way. Thanks in advance.

    a8a3425e-7553-42bc-a91a-1e93775a8853 wrote:
    Hi There,
    I have created a new Open Script in following way
    File-> New-> Functional-> Oracle EBS Forms
    I have written some code and tried to link the script with OTM. That time OTM is showing script in Directory while linking. It is properly Linked and working correctly.
    Then I have created new script again but Now I have enabled Datatable plugin of script from (Script->Properties->Module->Datatable).
    This time when the Script is "NOT Visible"  in OTM direcotry when I try to link.
    I have wasted my 4 to 5 days to find solution on this .
    Please show me some way. Thanks in advance.
    Better asked in the EBS forum: E-Business Suite

  • I have Itunes on my PC using Vista. I had some issues. If I end up removing and reinstalling ITunes will I lose my music? Its like 6000 songs.

    I have Itunes on my PC using Vista. I had some issues. If I end up removing and reinstalling ITunes will I lose my music? Its like 6000 songs.

    See Troubleshooting issues with iTunes for Windows updates.
    Your library should be fine, but you ought to backup routinely anyway.
    tt2

  • Has Firefox been optimzied for the new Mac OSX Lion? I've been having issues using the browser since upgrading to Lion. Issues include using some websites as well as google e-mail...icons do not appear etc.

    when checking mail in google I am not able to 'star' an e-mail or mark it etc. I don't get the option to do that, as I did before upgrading to Mac Osx Lion

    Try setting up another admin user account to see if the same problem continues. If Back-to-My Mac is selected in System Preferences, the Guest account will not work. The intent is to see if it is specific to one account or a system wide problem. This account can be deleted later.
    Isolating an issue by using another user account
    If the problem is still there, try booting into the Safe Mode using your normal account.  Disconnect all peripherals except those needed for the test. Shut down the computer and then power it back up. Immediately after hearing the startup chime, hold down the shift key and continue to hold it until the gray Apple icon and a progress bar appear. The boot up is significantly slower than normal. This will reset some caches, forces a directory check, and disables all startup and login items, among other things. When you reboot normally, the initial reboot may be slower than normal. If the system operates normally, there may be 3rd party applications which are causing a problem. Try deleting/disabling the third party applications after a restart by using the application un-installer. For each disable/delete, you will need to restart if you don't do them all at once.
    Safe Mode
    Safe Mode - About

  • My first gen. iPad exits out of apps and safari at random times when I am trying to use them. So I basically can't do anything on it. Is there some way I can fix this?

    Crashing apps. What do I do to fix it?
    My first gen. iPad exits out of apps and safari at random times when I am trying to use them. So I basically can't do anything on it. Is there some way I can fix this?

    I have the same problem.  Yahoo Sportacular aborts every time I try to open it.  It attempts to load and then the device goes right back to the home screen.  The problem started April 26 after I switched leagues from NHL to NBA. Closing all apps and Restarting doesn't solve solve the problem.
    All other apps on the iPad work fine.  IPad2, OS6.
    Any other suggestions?  I suppose I could delete the app from the iPad and try re-installing it

  • How can I recover an old/disused iCloud account. I was having some issues with my apple id so I restored my iPad, I am now stuck on the activation screen as I no longer use the iCloud account i used to set up the iPad and can't remember the address or pas

    How can I recover an old/disused iCloud account. I was having some issues with my apple id so I restored my iPad, I am now stuck on the activation screen as I no longer use the iCloud account i used to set up the iPad and can't remember the address or pas

    I have the same problem - it is maddening. I rely on this iPad for work so this is not just an annoyance! The above solutions of changing the appleid on the device or on the website do not work.
    The old email address no longer exists - I haven't used it in a year probably and I no longer have the account.  I logged into the appleid website and there is no trace of the old email address so there is nothing that can be deleted or changed there.  On the iPad there is no trace of the old email address so nothing can be deleted there either. I have updated the iPad software and the same problem comes right back.  Every 2 seconds I am asked to log in using the old non-existent email.  The device is currently useless.
    The only recent change to anything was the addition of an Apple TV device, which was set up using the correct login and password.
    Does anyone have any ideas? The iPad has been backed up to the iCloud so presumably it now won't recognize the current iCloud account? So restoring may notbe an option?

  • I get this pop up when trying to make a photo book in the iPhoto store. Some or all of the photos you selected were downloaded from your published albums. You can only view these photos. To use them in an album or a slideshow or project, you must import t

    I get this pop up when trying to create a photo book through the iPhoto store.  
    "Some or all of the photos you selected were downloaded from your published albums. You can only view these photos. To use them in an album or a slideshow or project, you must import them to your photo library."
    The photos I have selected have already been imported so how and why do I do it all over again?
    What do they mean by published albums?  I categorize them into photo albums for organizational purposes after I import them from my camera or phone. So why can't I put them into a book now?
    I have over 400 photos selected for a photo book for my child's graduation gift so how can I tell which photos I have to do this to?
    Please help. Any insight wouyld be appreciated.
    Confused and frustrated...

    Give this a try:  apply the two fixes below in order as needed: 
    Fix #1
    Launch iPhoto with the Command+Option keys held down and rebuild the library.
    Since only one option can be run at a time start with Option #3, followed by #4 and then #1 as needed.
    OT

  • Is anybody else still not able to use the App Store? I can't download nor update any apps. I have an IPhone 5 device not currently updated to iOS 7 as my partner also has an iPhone 5 running iOS 7 and it seems to have some issues at the moment.

    Is anybody else still not able to use the App Store? I can't download nor update any apps. I have an IPhone 5 device not currently updated to iOS 7 as my partner also has an iPhone 5 running iOS 7 and it seems to have some issues at the moment.

    Hi Tech5Apple,
    Thanks for visiting Apple Support Communities.
    If you continue to see unexpected behavior when accessing the iTunes Store, the troubleshooting steps in this article can help:
    Can't connect to the iTunes Store
    http://support.apple.com/kb/ts1368
    All the best,
    Jeremy

  • HEY, i have some issue i am using macbook air i5...the problem is that without doing anything 1.5gb of ram out of 2gb always in use ..please help me how to make it normal.

    HEY, i have some issue i am using macbook air i5...the problem is that without doing anything 1.5gb of ram out of 2gb always in use ..please help me how to make it normal....
    and my battery back up is max 3 to 3.5 hours in normal use with web ....is this normal or need some betterment!!!!

    ADEEL UR REHMAN wrote:
    ...the problem is that without doing anything 1.5gb of ram out of 2gb always in use
    No computer can do a thing without using memory. 1.5 GB is very little. It's normal.
    3 or so hours from a full charge may also be normal, for what you are doing. As batteries age, they don't last as long on a full charge as they did when they were new. All batteries eventually wear out, and are easily replaceable.

  • Some or all of the photos you selected were downloaded from your published albums. You can only view these photos. To use them in an album or a slideshow or project, you must import them to your photo library.

    I was trying to Import photos from my Facebook photo to my MacBookAir and now all i got is lots of back round photo. Please Help me out to delete them.Some or all of the photos you selected were downloaded from your published albums. You can only view these photos. To use them in an album or a slideshow or project, you must import them to your photo library.

    What that's telling you is that some of the photos you want to use are not in your Library but online in a gallery you have linked to. You need to download them first.
    Regards
    TD

  • Some of my apps on my ipad open but become very small and i cant use them

    Some of my apps on my ipad open but become very small and i cant use them
    Has someone encounter thsi problem?
    Any solution?

    These apps are probably meant for the iPhone/iPod touch. Some apps are universal, and other have dedicated iPad versions.
    http://support.apple.com/kb/HT4082
    Here is a support article addressing this.

  • I have cookies enabled but some websites are still telling me I can't use them because I don't have cookies?

    I have cookies enabled but some websites are still telling me I can't use them because I don't have cookies?

    From the Safari menu bar, select
    Safari ▹ Preferences... ▹ Privacy ▹ Remove All Website Data
    and confirm. Test. If the sites still don't work, they're incompatible with Safari. Use another browser, such as Firefox, to access them.

  • I have purchased (veranda magazines) for my IPHONE which I would like to use on my macbook air. Do I have to repurchase these app or is there some way to get them in my macbook air with no charge?

    i have purchased (veranda magazines) for my IPHONE which I would like to use on my macbook air. Do I have to repurchase these app or is there some way to get them in my macbook air with no charge?

    Veranda Magazine is a free app available for iOS devices in the iOS App Store.  You then purchase a Veranda Magazine subscription from within the app.  In other words, the app itself is free, but the contents are not.
    There is no way to duplicate or import this to a Mac.  Your Mac runs a totally different operating system.
    iBooks can now import to Mac since OS X Mavericks came out about a month ago.  But that does not apply to magazines or iOS Newsstand publications.

  • Hi, a 4 minute video that was shot using my IPAD occupies about 900 MB of space. Is that normal or is there some issue ?

    Hi, a 4 minute video that was shot using my IPAD occupies about 900 MB of space. Is that normal or is there some issue ?
    Regards,
    Ashok

    High def video is about a gig a minute so that sounds about right. Video is a massive storage hog.

Maybe you are looking for