What does AT END OF do in a loop

Hi all, can you please tell me what is the meaning of AT END of in this loop.  I know it is calculating summation  of a values in the structure XTAB4, but I am not able to understand why is CHARG specified.
Can anyone please help me.
LOOP AT XTAB4.
          TEMP_MATNR = XTAB4-MATNR.
          TEMP_WERKS = XTAB4-WERKS.
          TEMP_LGORT = XTAB4-LGORT.
          TEMP_CHARG = XTAB4-CHARG.
          AT END OF CHARG.
            SUM.
            SCHD_STOCK = XTAB4-VBMNJ.
            READ TABLE MCHB_INVT_BAL
                  WITH KEY MATNR =  XTAB4-MATNR
                           WERKS =  XTAB4-WERKS
                           LGORT =  XTAB4-LGORT
                           CHARG =  XTAB4-CHARG.
            IF SY-SUBRC = 0.
              MCHB_INVT_BAL-SDLVY = SCHD_STOCK.
              MODIFY MCHB_INVT_BAL INDEX SY-TABIX.
              CLEAR MCHB_INVT_BAL.
            ENDIF.
          ENDAT.
        ENDLOOP.
the structure of
DATA :  BEGIN OF XTAB4 OCCURS 0,
         MATNR LIKE VBBE-MATNR,
         WERKS LIKE VBBE-WERKS,
         LGORT LIKE VBBE-LGORT,
         CHARG LIKE VBBE-CHARG,
         VBMNA LIKE VBBE-OMENG, 
         VBMNB LIKE VBBE-OMENG, 
         VBMNC LIKE VBBE-OMENG,  
         VBMNE LIKE VBBE-OMENG, 
         VBMNG LIKE VBBE-OMENG, 
         VBMNI LIKE VBBE-OMENG, 
         VBMNJ LIKE VBBE-OMENG, 
         VRKME LIKE VBEP-VRKME, 
         WMENG LIKE VBEP-WMENG, 
       END OF XTAB4.
thanks,
Sabrina.

Hi Sabrina,
Taking your example consider the following:
You will have to respect the values before CHARG to SUM:
MATNR (1) WERKS (1000) LGORT(p1) CHARG(x) VBMNA(01)
MATNR (1) WERKS (1000) LGORT(p1) CHARG(x) VBMNA(02)
MATNR (1) WERKS (1000) LGORT(p1) CHARG(x) VBMNA(03)
MATNR (1) WERKS (1000) LGORT(p1) CHARG(y) VBMNA(04)
MATNR (1) WERKS (1000) LGORT(p1) CHARG(y) VBMNA(05)
SUM at this point by the field CHARG will be:
MATNR (1) WERKS (1000) LGORT(p1) CHARG(x) = 06
MATNR (1) WERKS (1000) LGORT(p1) CHARG(y) = 09
But now consider this:
MATNR (1) WERKS (1000) LGORT(p1) CHARG(x) VBMNA(01)
MATNR (1) WERKS (1000) LGORT(p1) CHARG(x) VBMNA(02)
MATNR (1) WERKS (1000)
LGORT(p2) CHARG(x) VBMNA(03)
MATNR (1) WERKS (1000) LGORT(p2) CHARG(y) VBMNA(04)
MATNR (1) WERKS (1000) LGORT(p2) CHARG(y) VBMNA(05)
SUM at this point by the field CHARG will be:
MATNR (1) WERKS (1000) LGORT(p1) CHARG(x) = 03
MATNR (1) WERKS (1000) LGORT(p2) CHARG(x) = 03
MATNR (1) WERKS (1000) LGORT(p2) CHARG(y) = 09
And finaly ... changing also Material:
MATNR (1) WERKS (1000) LGORT(p1) CHARG(x) VBMNA(01)
MATNR (1) WERKS (1000) LGORT(p1) CHARG(x) VBMNA(02)
MATNR (1) WERKS (1000) LGORT(p2) CHARG(x) VBMNA(03)
MATNR (1) WERKS (1000) LGORT(p2) CHARG(y) VBMNA(04)
MATNR (2) WERKS (1000) LGORT(p2) CHARG(y) VBMNA(05) 
SUM at this point by the field CHARG will be:
MATNR (1) WERKS (1000) LGORT(p1) CHARG(x) = 03
MATNR (1) WERKS (1000) LGORT(p2) CHARG(x) = 03
MATNR (1) WERKS (1000) LGORT(p2) CHARG(y) = 04
MATNR (2) WERKS (1000) LGORT(p2) CHARG(y) = 05
The way you do the SORT of your table by the fields until field CHARG will change your final output.
Hope this helps you
Mário

Similar Messages

  • What does "Program ended with exit code: 0" mean in Xcode?

    Hello,
    I am fairly new to programming and I have received the error "Program ended with exit code: 0" in the last few programs I have created. It shows in the output windows after I have ran the program. What does this mean?

    an exit code of 0 indicates no  error. If a program wants to indicate there was something wrong when it exited it will exit with a non-zero value.
    What types of programs are you writing? Normally you see this for command line type programs.

  • What does Call ended and Call ended - call dropped...

    If a call is marked as "Call ended" does this guarantee the other person ended the call, or can it also mean the call disconnected or was dropped?
    Was talking with someone and at one point the "Call ended - call dropped". Few other times it was just marked as "Call ended", they have bad internet. So is it possible the "Call ended" means the call was dropped due to internet or were they for definite hanging up?
    Thanks

    WuTom wrote:
    If a call is marked as "Call ended" does this guarantee the other person ended the call, or can it also mean the call disconnected or was dropped?
    Was talking with someone and at one point the "Call ended - call dropped". Few other times it was just marked as "Call ended", they have bad internet. So is it possible the "Call ended" means the call was dropped due to internet or were they for definite hanging up?
    Thanks
    Hi WuTom,
    From experience, it depends on the platform which you are using. In my case, my boyfriend is using Skype for iPhone and I am using Skype for Mac. Sometimes I find that the "Call ended - Call dropped" is the result of bad internet on my or his part. "Call Ended" on its own could mean one of two things, among others:
    1. A person accidentally touches the red end call button; or
    2. Skype crashes unexpectedly (either because of internet as you said or other issues such as flat battery)
    This is just from my personal experience, but I do hope it clears some stuff up for you. 

  • After the install upgrade my imac wont load anymore i tried to do a safe mode load and wehn i do at the end of it it tells me that i have a "systemShutdown false" what does this mean

    after the install upgrade my imac wont load anymore i tried to do a safe mode load and wehn i do at the end of it it tells me that i have a "systemShutdown false" what does this mean

    If 10.7.0 or later...
    Bootup holding CMD+r, or the Option/alt key to boot from the Restore partitirion & use Disk Utility from there to Repair the Disk, then Repair Permissions.
    If that doesn't help Reinstall the OS.

  • "Orphan Timeline" & "End Action Not Set." What does this mean????

    I am setting up a Blu-Ray DVD in Encore. I have a project on a Premiere Pro CS 5.5 Timeline, which is 2 and a half hours long with 24 Encore chapters in it. I have not yet Encoded it in Media Encoder as of yet.
    I am setting up all my menus and buttons in Encore so all I have to do is link the buttons to them main project when I do encode it and then I can just Check it and Burn it.
    I did check my project just now though and all buttons came up with 2 Errors:
    1) Orphan Timeline
    2) End action not set.
    1) "Orphan Timeline", I assume that means that the button is not linked to any timeline as of yet, correct? (This would be true because there is no main project timeline in there yet.)
    2) "End action not set." What does this mean? Will this go away once I add my whole project into Encore and I link up all of the buttons to the timeline?
    Thanks in advance
    Premiere Pro CS 5.5
    Encore 5.5
    Media Encoder 5

    1) Orphan Timeline
    2) End action not set.
    Both of these suggest that you created a timeline in the Encore project, perhaps with no "asset" in it.
    Yes, ignore both messages for now. But I prefer creating the timeline after, or along with, importing the asset into the Encore project.
    If you believe you have not created a timeline, post a screenshot of your "flowchart."

  • What does this mean (+) at the end of a condition ??

    Hi All,
    What does this notation mean at the end of a condition ?
    The notation is (+). I just came across a query that has this notation and it thew me off.
    example:
    where x.id = y.id (+)
    ....Thanks,

    Its an outer join.
    i.e Give me data from x (table) when there is no corresponding link on x.id to y.id.
    regards,
    Robert.

  • What does it mean when you call someone and your phone suddenly saids "end call"?

    I tried calling a friend but the call didn't go through and instead it said call ended on my phone with 2 beep tones, what does this mean?

    The call simply did not go through.  It happens with cell phones.
    Call again.

  • What does it mean when you receive a text on your iphone 6 form your own number and the message is duplicated on each side (sent/recieved) and has "verizon message" with a long number at the end of the text, duplicated as well?

    what does it mean when you receive a text on your iphone 6 from your own number and the message is duplicated on each side (sent/received) and has "verizon message" with a long number at the end of the text, duplicated as well?

        Great question stacybrownie! Let's get to the bottom of this so that it's not a cause for concern. When a message is sent to/from your own number, it will display as one sent, one received. This makes it display two messages as you are seeing. Let's clarify the second part of your question. Where do you see "Verizon Message" exactly? What is the long number at the end of the text? When did this start and is it with all text messages or only this instance?
    AdaS_VZW
    Follow us on Twitter at @VZWSupport 

  • When synchig my iphone to my itunes, I get an error message at the end with code 1150.  What is this error code and what does it mean?

    When synching my iphone to my itunes, I get an error message at the end with code 1150.  What is this error code and what does it mean?

    try uninstalling and reinstalling itunes on your computer. here is a link for that http://support.apple.com/kb/HT1925

  • HT3529 When I send a message to someone it shows a +1 on their end...what does that mean.  It looks as if it is being sent to more than one person.

    When I send a message to someone it shows a +1 on their end...what does this mean.  It looks like I have sent the message to more than one person.

    That's a country code. Are you sending it to someone outside of the US or who is using a foreign carrier? Their carrier is prefixing the phone number with the country code for your phone number.

  • What does #uuf on the end of a hp part number mean?

    what does #uuf on the end of a hp part number mean?

    Hi criscito,
    That's the country/region code for the product. UUF stands for certain countries/regions in Asia Pacific.
    Please click the thumbs up button to say "Thanks!"
    Clicking "Accept as Solution" on a reply that solves your problem makes it easier for other people to find solutions.
    I am an HP employee.

  • What does the icon of a padlock serounded by a 3/4 circle ending in an arrow mean ?

    Iphone 4 now has an icon next to battery. Is a lock surrounded by a 3/4 circle with an arrow on one end, what does this icon mean ?

    Portrait lock. Double click the home button to bring up the multi-tasking tray, swipe to the right and you will see the same thing there. Click it once to turn it off, it toggles between off /on.

  • HT201471 What does the (MM) on the end of a model mean?

    What does the (MM) on the end of a model mean?

    It's the screen orientation lock. It prevents the screen from switching between portrait and landscape views when you turn the iPod.
    To engage or disengage this feature, double click the home button. This will bring up the multitasking tray. Swipe all the way to the left until you see the iPod controls, then tap the gray icon with the lock on it. This will toggle the feature on and off.

  • What does the eprint email address end in?

    what does the eprint email address end in?

    Hi,
    It should end in @hpeprint.com
    Regards,
    DP-K
    ****Click the White thumb to say thanks****
    ****Please mark Accept As Solution if it solves your problem****
    ****I don't work for HP****
    Microsoft MVP - Windows Experience

  • HR-PA What does u201CCEu201D in name means

    Dear all,
    I am looking at BI Contend for HR-PA (Personnel Administration).   In the name of some of the objects there is u201CCEu201D at the end.  What does this CE means?
    Thanks for your help,
    Reynir

    CE in the HR-PA BI Content stands for Concurrent Employment. This requires grouping reasons to be configured in the ECC source environment. The grouping assignments can be seen in ECC table T77SO.

Maybe you are looking for

  • USB mouse not working in Windows 8

    I have Win8 64-bit OS. A couple of days back the USB mouse stopped working without any reason. The mouse works on other systems and there is nothing wrong with the hardware. I found a couple of posts suggesting uninstalling the drivers or doing a sys

  • Bug on the property "disabledDays" of the component af|inputDate ?

    Hi, I think there is a bug on the property "disabledDays" of the component af|inputDate : <af:inputDate disabledDays="#{MyInputDate.disabledDays}" public class MyInputDate {          public DateListProvider getDisabledDays() {         return new Date

  • Sony, why no manual?

    Sony, why no manual for the XBR65X930C?  I would prefer a printed manual but I would take an on-line one. The brief descriptions that you presently provide about installing the television just don't cut it. There are a multitude of options--a good th

  • Agent Install

    The Monitor documentation says the agent is to be installed on a Windows server (2000 or 2003 Windows server). Does anyone know if it can be installed on a Windows XP workstation and run?

  • Why doesn't iphoto trash empty

    I am trying to empty my photos from the iPhoto 11 trash and they will not empty.  What do I do?