Count number for a list, which is broken into smaller list

Could someone please tell me how to how count status correctly?
I have list with a large size and it is broken into a group of smaller lists. I want to show the status when each list is going through the function getNextToSend(). For example, the size of the large list is 105, and it is broken into size 20 for each group. The getNextToSend() method is called 6 times. The first 5 times with 20 list each and the last group size is 5. The simple version of the code is blew. How can I get int generate3 in System.out.println("generate3 is: " + generate3); printed as 1,2.....105. What I got now is it counts from 1 - 20, then it count 1-20. again.
Thanks,
Katie
public class Counter{
  private Vector list;
  public HttpSession session;
  private int count = 0;
  public Counter(Vector list, HttpServletRequest request) {
    this.list = list;
    this.session = request.getSession();
private synchronized Profile getNextlToSend(){
     if( this.list.size()==0){
          return null;
   this.count++;
   int generate = Add(this.count++);
   session.setAttribute("number" , Integer.toString(generate));
   return (Profile)this.list.remove(0);
private int Add(int generate2)
{ int generate3 =+ generate2 ;
   System.out.println("generate3 is: " + generate3);
   return generate3;

Here is what happens when use static or non-static:
Using static: if only one user uses the program (use
java & jsp), it works fine. But when multi users use
the program, the counter get mess, one user sees
other user's count number.
Using non-static: the counter repeates itself. 1,
2....20, then again 1,2..20.That's why you pass the starting index to the counter in the constructor. If I want it to count starting at 60 then I pass that value (60) to the constructor and we assign it to the internal count. You would then modify the code that uses the Counter to pass this value somehow.
    public Counter(Vector list, HttpServletRequest request, int count) {
        this.list = list;
        this.session = request.getSession();
        this.count = count;
    }When you're breaking up the larger list you'd have to pass the current index to the Counter you create for each sublist. So for elements 0-19 you'd pass it either 0 or use the other constructor. For elements 20-39 you'd pass it a value of 20 to indicate it should start counting at 20.

Similar Messages

  • I have just recently bought a MacBook Air. I am looking for an email which I put into a folder on my Mac Pro. The smart folders have come across to the Air, but not the 'On my Mac' folders. Are they lost?

    I have just recently bought a MacBook Air. I am looking for an email which I put into a folder on my Mac Pro. The smart folders have come across to the Air, but not the 'On my Mac' folders. Are they lost?

    Are you sure that the "On My Mac" folders weren't empty? If all your mail accounts are IMAP, they may have been.

  • External number for Task list group

    Dear experts,
    I want to give external number(actually name) to all the groups for equipment task lists.In SPRO , number ranges for task lists, I have created one external along with internal number range. But as soon as I want to create the equipment task list, the " group" picked its value from internal range.
    Is there any setting to do , so that I can get external number for the group for equip. task list.
    Regards,
    Rajesh

    Hello Rajesh,
    It is not possible to have external numbering for equipment or functional location task lists. Only possible for general task lists.
    -Paul

  • Change starting number for Numbered List.

    I am breaking up a list into 4 columns and I want them numbered.  When you use the Numbered List it automatically starts at 1.  I want it to start with the number I left off with in the text box next to it.  How do you change the starting number for a Numbered List?

    Ok, this is how you do it (just figured it out myself!)
    If you click in the text box and do command A to select all, it will select all of the text BUT not the numbers. If you want to change the size of the numbers, you have to click on the number in the text box (the entire line will highlight) and use command-+ and command-minus to increase/decrease the size (or choose from the character palette. This WILL change the size of everything in the text box, but then you can go back to a simple command-a to change the text to the size you want.

  • Installing Acrobat XI Pro - previous version XI Standard was removed during installation, now system is asking to enter serial number for previous version, which came installed on the computer, we have not disk.  Please advise as to next step as we now no

    eadfe

    if you upgraded from xi standard to xi pro, enter the serial number for xi standard when prompted for the qualifying product serial number.

  • How can I retrieve a lost serial number for Elements 11 which was not registered?

    I forgot to register my Elements 11 which I installed on Windows XP but now need to reinstal on Windows 7 but do not have the serial number. Is there a way to retrieve this number?

    If it was a download check your e-mail. If not you can try starting a Chat with Adobe at http://helpx.adobe.com/x-productkb/policy-pricing/activation-deactivation-products.html#ac tivate-problem.
    Cheers,
    Neale
    Insanity is hereditary, you get it from your children
    If this post or another user's post resolves the original issue, please mark the posts as correct and/or helpful accordingly. This helps other users with similar trouble get answers to their questions quicker. Thanks.

  • Playlists: Counting Plays For One List Only?

    I have a playlist made up of all the songs in my music library that my girlfriend likes too so I can play them when we're in the car together.
    I know there are smart playlist functions that allow me to take a song out of the rotation if it has been played with in the last ____ months/days/weeks. My question is: is there a smart playlist function that allows me to take a song out of the rotation only if it has been played via THIS SPECIFIC GIRLFRIEND PLAYLIST? For example, if I play one of the songs in the Girlfriend playlist via another playlist it is also in, it would not take it out of rotation in the Girlfriend playlist. But if I played that same some via the Girlfriend playlist it would take it out of rotation in the Girlfriend playlist.
    Does this make any sense? Anyone have any ideas?
    THANKS!

    Tsac77 wrote:
    For example, if I play one of the songs in the Girlfriend playlist via another playlist it is also in, it would not take it out of rotation in the Girlfriend playlist. But if I played that same some via the Girlfriend playlist it would take it out of rotation in the Girlfriend playlist.
    Sorry. A smart playlist rule can key on Last Played Date or on Play Count. There is no way to key on what playlist it was played from.

  • Need to reinstall InDesign CS4 upgrade on new laptop after laptop where loaded crashed.  No longer have serial number for prg from which upgrading.

    I have a copy of InDesign CS4 which is an upgrade from PageMaker.  The computer on which it was installed totally crashed & nothing on it is available to me anymore.  I have the load disk for CS4, but no longer have any of the PageMaker information (serial #, version) it needs.  How do I get it installed onto the new computer? 

    So, how do I do this if Adobe wants to tie everything to an email acct?  Both of my registered products, old & current (except reader, of course) are tied to the email addr that no longer exists.  How do I find those?

  • Need serial number for lightroom 3 which I have purchased

    I can`t find my cd-cover with the serial number. Can you help me?

    If you registered your oproduct when you first installed it then you might be able to find the serial number recorded in your Adobe account online.  Beyond that, you need to contact Adobe Support either by chat or via phone when you have serial number and activation issues.
    Here is a link to a page with options to help make contact:
    http://www.adobe.com/support/download-install/supportinfo/

  • Captured clips automatically broken into smaller ones

    When I import a clip and save it, and then go to finder to watch was was saved, it is broken up into many smaller clips. Why does this happen? Before it starts to record, I give it a specific title and location, record what I need, and then hit "done". It saves the clip. But when I open it, it is chopped into multiple clips. = (

    How can I know which of those errors it is, if any?
    Usually it is just "hit or miss" trial and error testing. I have one drive that has never worked for captures as it will not maintain a constant speed. And, although I have had the drive analyzed and reported to the manufacturer that the drive was defective, the manufacturer refused to honor their warranty and so I have never purchased and drive from them but used the drive to temporary copy of content which it can handle. Another drive as a "weak" sector that will pass most write tests but usually won't capture a movie about 12 minutes into the disk when newly formatted but will capture correctly from that point onward. For instance, if you are capturing to an external drive and have a spare drive hand, try switching to the alternate drive as see if you have the same problem. If the problem occurs to one drive but not another, then it is likely the drive. If you re-use old tapes for recoding, try a new one instead and see if it has the same problem. (I normally keep the tape as the archive and so don't normally re-use them.) Basically, you just try to eliminate possibilities as your can.
    I am using a brand new minDV tape, new imovie and imac, good camera.
    I would try to eliminate the application as being the cause of the problem first. Try importing into iMovie '06 or using Vidi (free) instead. If one or more other applications work, then simply use them to "capture" your content and then import the captured files into iMovie '08.
    I went to preferences and cahnged where it says "clicking in events browser selects 4.os.
    This option merely allows a user selected, fixed duration of content to be selected from an event clip when mouse-clicked. It has nothing to do with imports.
    A short 2-3 minute clip shoes up as 7-8 smaller clips in my iMovie folder, and 10 different squares in the iMovie timeline. What's going on?
    As was already stated, iMovie '08 is seeing the camcorder content as separate or interrupted files as it is being imported and and stores them as extra files. You can always treat them as separate files and move them into your project separately or you can sequence them as a single file using either QT Pro ($30) or MPEG Streamclip (free) or you can find the source of the problem (if you can) and eliminate it.

  • Java Programming: Any Ideas for breaking a huge class file into smaller ?

    Hello Java pros,
    I have some very huge class files, some with dozens of methods; each method containing an average of a screen-page full of code.
    Obviously, such huge class files are difficult to maintain inspite of using an IDE, especially when changes have to be made to a bunch of a category of methods scattered all over the class.
    I am wondering if there are ways/best-practices out there to make the core class file smaller/smarter - fr eg.
    <a> by retaining the real core definitions within the core class and moving the detailed implementation outside the core class
    <b> by breaking down the file into more manageable pieces - something to the effect of using 'include' files that some languages support
    etc.
    Thanks for your help in advance.
    Sree Nidhi

    If you have huge class files with dozens of methods, maybe the design of your application is not so sound. You could use all kinds of OO design techniques to design your application so that it is easier to maintain.
    Start by learning about design patterns. The most famous book about design patterns is this one: http://www.amazon.com/exec/obidos/ASIN/0201633612/qid=1029971487/sr=2-1/ref=sr_2_1/102-4299125-5141710
    Here is also a nice book about anti-patterns: http://www.antipatterns.com/
    Jesper

  • Alv interactive report  for secondary list

    Hi All,
    This is my code for ALV interactive report. Its working Properly for me when i select material number iam able to display the secondary list properly . if i sorted the basic list other than material number for ex . created date . iam uable to display correct secondary list . Can any one help me in this issue?
    REPORT  ZWRLOMDMM_PMG_PHWEB_PLD   NO STANDARD PAGE HEADING
            LINE-SIZE 120
            LINE-COUNT 65
            MESSAGE-ID 00.
    TABLES                                                              *
    TABLES: MARA ,      "General Material Data
            ZWPBPH.     " Published Product Hierarchy
    TYPE-POOLS                                                          *
    TYPE-POOLS:SLIS .
    DATA:FIELDCATALOG_BASIC TYPE SLIS_T_FIELDCAT_ALV WITH HEADER LINE,
         FIELDCATALOG_SECONDARY TYPE SLIS_T_FIELDCAT_ALV WITH HEADER LINE,
         GD_TAB_GROUP TYPE SLIS_T_SP_GROUP_ALV,
         GD_LAYOUT TYPE SLIS_LAYOUT_ALV,
         GD_REPID LIKE SY-REPID.
    INTERNAL TABLES                                                     *
    *Internal Tables to Get Data.
    *Internal Table For MARA Table.
    DATA:BEGIN OF T_MARA OCCURS 0 ,
            MATNR LIKE MARA-MATNR,
            MTART LIKE MARA-MTART,
            ERSDA LIKE MARA-ERSDA,
            ERNAM LIKE MARA-ERNAM,
            AENAM LIKE MARA-AENAM,
            SPART LIKE MARA-SPART,
         END OF T_MARA.
    *Internal Table For ZWPBPH Table.
    DATA:BEGIN OF T_ZWPBPH OCCURS 0 ,
           PBPINO LIKE ZWPBPH-PBPINO,
           PBPAPINO LIKE ZWPBPH-PBPAPINO,
         END OF T_ZWPBPH.
    *Internal Table For Basic List Field Catalog.
    DATA:BEGIN OF T_ALV OCCURS 0 ,
           MATNR LIKE MARA-MATNR,
           MTART LIKE MARA-MTART,
           ERSDA LIKE MARA-ERSDA,
           ERNAM LIKE MARA-ERNAM,
           SPART LIKE MARA-SPART,
           SPART1(3),
         END OF T_ALV.
    *Internal Table For Secondary List Field Catalog.
    DATA: BEGIN OF T_ALVS OCCURS 0 ,
            MATNR LIKE MARA-MATNR,
            AENAM LIKE MARA-AENAM,
            LAEDA LIKE MARA-LAEDA,
          END OF T_ALVS.
    *Internal Table For Model
    DATA:T_MODEL LIKE T_ZWPBPH OCCURS 0 WITH HEADER LINE.
    *Internal Table For Product
    DATA:T_PRODUCT LIKE T_ZWPBPH OCCURS 0 WITH HEADER LINE.
    *Internal Table For Family
    DATA:T_FAMILY LIKE T_ZWPBPH OCCURS 0 WITH HEADER LINE.
    *Internal Table For Line
    DATA:T_LINE LIKE T_ZWPBPH OCCURS 0 WITH HEADER LINE.
    *Internal Table For Type
    DATA:T_TYPE LIKE T_ZWPBPH OCCURS 0 WITH HEADER LINE.
    SELECTION SCREEN                                                    *
    SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.
    PARAMETERS: P_MATN RADIOBUTTON GROUP R1  USER-COMMAND run default 'X'.
    SELECT-OPTIONS: P_MATNR FOR MARA-MATNR MODIF ID SC1 .
    PARAMETERS: P_DAT RADIOBUTTON GROUP R1  .
    SELECT-OPTIONS: : P_DATE FOR MARA-LAEDA  MODIF ID SC2.
    PARAMETERS: P_DIV RADIOBUTTON GROUP R1  .
    SELECT-OPTIONS: : P_DIVIS for mara-spart  MODIF ID SC3.
    SELECTION-SCREEN END OF BLOCK b1.
    INITIALIZATION                                                      *
    INITIALIZATION.
      REFRESH: T_MARA,
               T_ZWPBPH,
               T_ALV,
               T_ALVS,
               T_MODEL,
               T_PRODUCT,
               T_FAMILY,
               T_LINE,
               T_TYPE.
      CLEAR:   T_MARA,
               T_ZWPBPH,
               T_ALV,
               T_ALVS,
               T_MODEL,
               T_PRODUCT,
               T_FAMILY,
               T_LINE,
               T_TYPE.
      GD_REPID = SY-REPID.
    *AT SELECTION-SCREEN OUTPUT.
    AT SELECTION-SCREEN OUTPUT.
      LOOP AT SCREEN.
        IF P_MATN = 'X'.
          FREE : P_DIVIS,P_DATE.
          IF SCREEN-GROUP1 = 'SC2' or SCREEN-GROUP1 = 'SC3'.
            SCREEN-INPUT  = 0.
            MODIFY SCREEN.
            CONTINUE.
          ENDIF .
        ENDIF.
        IF P_DAT = 'X'.
          FREE : P_MATNR,P_DIVIS.
          IF SCREEN-GROUP1 = 'SC1' or  SCREEN-GROUP1 = 'SC3'.
            SCREEN-INPUT  = 0.
            MODIFY SCREEN.
            CONTINUE.
          ENDIF .
        ENDIF.
        IF P_DIV = 'X'.
          FREE : P_DATE,P_MATNR.
          IF SCREEN-GROUP1 = 'SC1' or SCREEN-GROUP1 = 'SC2'.
            SCREEN-INPUT = 0.
            MODIFY SCREEN.
            CONTINUE.
          ENDIF .
        ENDIF.
      ENDLOOP.
    START-OF-SELECTION                                                  *
    START-OF-SELECTION.
      PERFORM GET_FIELDCATALOG_BASIC.
      PERFORM GET_FIELDCATALOG_SECONDARY.
      PERFORM POPULATE_DATA.
    END-OF-SELECTION                                                    *
    END-OF-SELECTION.
    *&      FORM GET_FIELDCATALOG_BASIC.
    Get Fieldcatalog For Basic List
    FORM GET_FIELDCATALOG_BASIC.
      FIELDCATALOG_BASIC-FIELDNAME = 'MATNR'.
      FIELDCATALOG_BASIC-SELTEXT_M = 'Material Number'.
      FIELDCATALOG_BASIC-COL_POS   = 0.
      FIELDCATALOG_BASIC-OUTPUTLEN = 20.
      FIELDCATALOG_BASIC-HOTSPOT   = 'X'.
      FIELDCATALOG_BASIC-EMPHASIZE = 'X'.
      FIELDCATALOG_BASIC-KEY       = 'X'.
      APPEND FIELDCATALOG_BASIC TO FIELDCATALOG_BASIC.
      CLEAR FIELDCATALOG_BASIC.
      FIELDCATALOG_BASIC-FIELDNAME = 'MTART'.
      FIELDCATALOG_BASIC-SELTEXT_M = 'Material Type'.
      FIELDCATALOG_BASIC-COL_POS   = 0.
      FIELDCATALOG_BASIC-OUTPUTLEN = 20.
      FIELDCATALOG_BASIC-EMPHASIZE = 'X'.
      FIELDCATALOG_BASIC-KEY       = 'X'.
      APPEND FIELDCATALOG_BASIC TO FIELDCATALOG_BASIC.
      CLEAR FIELDCATALOG_BASIC.
      FIELDCATALOG_BASIC-FIELDNAME = 'ERSDA'.
      FIELDCATALOG_BASIC-SELTEXT_M = 'Created Date'.
      FIELDCATALOG_BASIC-COL_POS   = 0.
      FIELDCATALOG_BASIC-OUTPUTLEN = 12.
      FIELDCATALOG_BASIC-EMPHASIZE = 'X'.
      FIELDCATALOG_BASIC-KEY       = 'X'.
      APPEND FIELDCATALOG_BASIC TO FIELDCATALOG_BASIC.
      CLEAR FIELDCATALOG_BASIC.
      FIELDCATALOG_BASIC-FIELDNAME = 'ERNAM'.
      FIELDCATALOG_BASIC-SELTEXT_M = 'Created By'.
      FIELDCATALOG_BASIC-COL_POS   = 0.
      FIELDCATALOG_BASIC-OUTPUTLEN = 15.
      FIELDCATALOG_BASIC-EMPHASIZE = 'X'.
      FIELDCATALOG_BASIC-KEY       = 'X'.
      APPEND FIELDCATALOG_BASIC TO FIELDCATALOG_BASIC.
      CLEAR FIELDCATALOG_BASIC.
      FIELDCATALOG_BASIC-FIELDNAME = 'SPART'.
      FIELDCATALOG_BASIC-SELTEXT_M = 'Division PMG'.
      FIELDCATALOG_BASIC-COL_POS   = 0.
      FIELDCATALOG_BASIC-OUTPUTLEN = 14.
      FIELDCATALOG_BASIC-EMPHASIZE = 'X'.
      FIELDCATALOG_BASIC-KEY       = 'X'.
      APPEND FIELDCATALOG_BASIC TO FIELDCATALOG_BASIC.
      CLEAR FIELDCATALOG_BASIC.
      FIELDCATALOG_BASIC-FIELDNAME = 'SPART1'.
      FIELDCATALOG_BASIC-SELTEXT_M = 'Division PhWEB'.
      FIELDCATALOG_BASIC-COL_POS   = 0.
      FIELDCATALOG_BASIC-OUTPUTLEN = 14.
      FIELDCATALOG_BASIC-EMPHASIZE = 'X'.
      FIELDCATALOG_BASIC-KEY       = 'X'.
      APPEND FIELDCATALOG_BASIC TO FIELDCATALOG_BASIC.
      CLEAR FIELDCATALOG_BASIC.
    ENDFORM.                    "GET_FIELDCATALOG_BASIC
    *&      FORM GET_FIELDCATALOG_SECONDARY
    Get Fieldcatalog For Secondary List
    FORM GET_FIELDCATALOG_SECONDARY.
      FIELDCATALOG_SECONDARY-FIELDNAME = 'MATNR'.
      FIELDCATALOG_SECONDARY-SELTEXT_M = 'Material Number'.
      FIELDCATALOG_SECONDARY-COL_POS   = 0.
      FIELDCATALOG_SECONDARY-OUTPUTLEN = 20.
      FIELDCATALOG_SECONDARY-EMPHASIZE = 'X'.
      FIELDCATALOG_SECONDARY-KEY       = 'X'.
      APPEND FIELDCATALOG_SECONDARY TO FIELDCATALOG_SECONDARY.
      CLEAR FIELDCATALOG_SECONDARY.
      FIELDCATALOG_SECONDARY-FIELDNAME = 'AENAM'.
      FIELDCATALOG_SECONDARY-SELTEXT_M = 'Changed By'.
      FIELDCATALOG_SECONDARY-COL_POS   = 0.
      FIELDCATALOG_SECONDARY-OUTPUTLEN = 20.
      FIELDCATALOG_SECONDARY-EMPHASIZE = 'X'.
      FIELDCATALOG_SECONDARY-KEY       = 'X'.
      APPEND FIELDCATALOG_SECONDARY TO FIELDCATALOG_SECONDARY.
      CLEAR FIELDCATALOG_SECONDARY.
      FIELDCATALOG_SECONDARY-FIELDNAME = 'LAEDA'.
      FIELDCATALOG_SECONDARY-SELTEXT_M = 'Changed ON'.
      FIELDCATALOG_SECONDARY-COL_POS   = 0.
      FIELDCATALOG_SECONDARY-OUTPUTLEN = 20.
      FIELDCATALOG_SECONDARY-EMPHASIZE = 'X'.
      FIELDCATALOG_SECONDARY-KEY       = 'X'.
      APPEND FIELDCATALOG_SECONDARY TO FIELDCATALOG_SECONDARY.
      CLEAR FIELDCATALOG_SECONDARY.
    ENDFORM.                    "GET_FIELDCATALOG_SECONDARY
    *&      FORM POPULATE_DATA
    FORM POPULATE_DATA.
    *Get Data From MARA And ZWPBPH Tables
      IF P_MATN = 'X'.
    SELECT MATNR MTART ERSDA ERNAM AENAM SPART FROM MARA INTO TABLE T_MARA
    where MATNR IN P_MATNR .
        IF SY-SUBRC <> 0.
          MESSAGE E001(0) WITH 'Invalid Material Number'.
        ENDIF.
      ELSEIF P_DAT = 'X'.
    SELECT MATNR MTART ERSDA ERNAM AENAM SPART FROM MARA INTO TABLE T_MARA
    where LAEDA IN P_DATE .
        IF SY-SUBRC <> 0.
          MESSAGE E001(0) WITH 'Invalid Date Range'.
        ENDIF.
      ELSEIF P_DIV = 'X'.
    SELECT MATNR MTART ERSDA ERNAM AENAM SPART FROM MARA INTO TABLE T_MARA
    where SPART IN P_DIVIS .
        IF SY-SUBRC <> 0.
          MESSAGE E001(0) WITH 'Invalid Division'.
        ENDIF.
      ELSEIF P_MATN = ' ' AND P_DAT = ' ' AND  P_DIV = ' '.
    SELECT MATNR MTART ERSDA ERNAM AENAM SPART FROM MARA INTO TABLE T_MARA.
      ENDIF.
      DELETE ADJACENT DUPLICATES FROM T_MARA COMPARING MATNR.
      SORT T_MARA BY MATNR.
      IF T_MARA[] IS NOT INITIAL .
    SELECT PBPINO PBPAPINO FROM ZWPBPH INTO TABLE T_ZWPBPH FOR ALL ENTRIES
    IN T_MARA WHERE PBPINO = T_MARA-MATNR.
      ENDIF.
      IF SY-SUBRC = 0.
        LOOP AT  T_ZWPBPH.
          SELECT SINGLE PBPINO PBPAPINO FROM ZWPBPH INTO  T_MODEL   WHERE
          PBPINO = T_ZWPBPH-PBPAPINO.
          IF SY-SUBRC = 0.
          SELECT SINGLE PBPINO PBPAPINO FROM ZWPBPH  INTO T_PRODUCT   WHERE
          PBPINO
          = T_MODEL-PBPAPINO.
          ENDIF.
          IF SY-SUBRC = 0.
           SELECT SINGLE PBPINO PBPAPINO FROM ZWPBPH  INTO T_FAMILY   WHERE
           PBPINO = T_PRODUCT-PBPAPINO.
          ENDIF.
          IF SY-SUBRC = 0.
            SELECT SINGLE PBPINO PBPAPINO FROM ZWPBPH  INTO T_LINE   WHERE
            PBPINO = T_FAMILY-PBPAPINO.
          ENDIF.
          IF SY-SUBRC = 0.
       SELECT SINGLE PBPINO PBPAPINO FROM ZWPBPH INTO T_TYPE   WHERE PBPINO
        = T_LINE-PBPAPINO.
          ENDIF.
          IF SY-SUBRC = 0.
         SELECT SINGLE MTART ERSDA ERNAM SPART FROM MARA INTO CORRESPONDING
          FIELDS OF T_ALV WHERE MATNR = T_ZWPBPH-PBPINO AND SPART <>
        T_TYPE-PBPAPINO+1(2).
          ENDIF.
          IF SY-SUBRC = 0.
            MOVE T_ZWPBPH-PBPINO TO T_ALV-MATNR.
            MOVE T_TYPE-PBPAPINO+1(2) TO T_ALV-SPART1.
            APPEND T_ALV.
            SELECT SINGLE MATNR AENAM LAEDA FROM MARA INTO CORRESPONDING
            FIELDS OF T_ALVS WHERE MATNR = T_ZWPBPH-PBPINO.
            APPEND T_ALVS.
            CLEAR T_ALVS.
          ENDIF.
        ENDLOOP.
      ENDIF.
      SORT T_ALV BY MATNR.
      SORT T_ALVS BY MATNR.
      call function 'REUSE_ALV_GRID_DISPLAY'
        EXPORTING
          i_callback_program      = GD_REPID
          i_callback_user_command = 'DISPLAY_DETAIL'
          it_fieldcat             = FIELDCATALOG_BASIC[]
          i_save                  = 'X'
        TABLES
          t_outtab                = T_ALV
        EXCEPTIONS
          program_error           = 1
          others                  = 2.
    ENDFORM.                    "POPULATE_DATA
    *&      Form  DISPLAY_DETAIL
          text
         -->UCOMM      text
         -->SELFIELD   text
    FORM DISPLAY_DETAIL USING UCOMM LIKE SY-UCOMM
    SELFIELD TYPE SLIS_SELFIELD.
    Select Material Number For Secondary List
      DATA: T_ALV_TEMP LIKE T_ALVS OCCURS 0 WITH HEADER LINE.
      IF UCOMM = '&IC1'.
        READ TABLE T_ALVS INDEX SELFIELD-TABINDEX.
        IF SY-SUBRC = 0.
          MOVE T_ALVS TO T_ALV_TEMP.
          APPEND T_ALV_TEMP.
        ENDIF.
        CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
          EXPORTING
            i_callback_program = GD_REPID
            it_fieldcat        = FIELDCATALOG_SECONDARY[]
          TABLES
            t_outtab           = T_ALV_TEMP.
      ENDIF.
    ENDFORM.                    "DISPLAY_DETAIL

    Hi,
    Try this in the routine display details
    READ TABLE T_ALV INDEX SELFIELD-TABINDEX.
    READ TABLE T_ALVS with key matnr = T_ALV-MATNR
    thanks

  • Purchase order number for the Delivery

    How do we get the Purchase order number from a delivery.
    Hello all
    Say i have an Purchase order [EKKO] and from that i have created a delivery.[LIKS]
    In my output for the delivery, i need the preceeding document number for the delivery which is the PO number.
    How do i get the same. what table should i look in. I checked the VBFA table, but i am not able to get the same there...
    is there any table with which we can get this info.
    thanks and Regards,
    Gauravjit.

    No, it will be at the line item level because you can potentially combine several PO (or sales order) line items into one delivery.

  • How to assign Line Number for Lines when click on Add More Lines

    Hello All,
    Kindly help me to assign line number for the lines which are added through Add More Lines button on an Advance table. If user clicks on the button Add More Lines then there are 5 lines get inserted at a time but I am not able to handle the line number for them.
    Similarly, if user delete any of the line then I need to re-order them.
    Kindly help and share if there is any sample code.
    Thanks,
    Sandy

    Hi,
    Check if this link helps you :
    Re: How to display serial numbers in the results table region
    --Sushant                                                                                                                                                                                                                                                           

  • Same group same album broken into two albums

    I have the apple ipad. And I put an album say styx cornerstone on my ipad when I click for albums styx cornerstone is broken into two or more albums. How doI put all these broken up songs into one that when I click on styx cornerstone ALL the songs from that album show?

    124sport wrote:
    This answer doesn't seem to work for the latestiTunes 11.1.12. Or does it?
    Yes the advice is still good, even if the graphics could do with an update.
    No need to convert file formats, which will involve a loss of quality, just work through the various topics in the article Grouping Tracks Into Albums until the problem is resolved. Adding and then removing a trailling X usually sorts out tricky ones but if you get really stuck I can go into details with a specific album if you supply the screenshots of what is going wrong.
    tt2

Maybe you are looking for