Display totals on the first line in ALV grid and ALV LIST

Generally we wll display totals at the end..
bu the requirement is to display it in the first line of the column.
how to display the totals in the first line?
I have used ALV GRID and ALV LIST (choice) using function modules.
Plz help me
.for example : Po qty : Should display total po qty on the first line of the Po line item.

IN LAYOUT
ILAYOUT-totals_before_items = 'X'.
REGARDS
SHIBA DUTTA

Similar Messages

  • ALV-Need to display total in top/first line!!!

    Hi,
      i have 3 numerical fields in my ALV output. I need to display the total in top/first line in output and download the same in excel into local system.if possible send me the sample code to how to do it.
    Regards,
    Nandha.

    TABLES : BSEG , BKPF.
    TABLES: SSCRFIELDS.
    TABLES: ITCPO.
    DATA :FLAG TYPE I, MAINTAIN TYPE I,
          FLAG1 TYPE I,
          FLAG2 TYPE I,
          FLAG3 TYPE I.
    DATA :BEGIN OF ITAB_BKPF OCCURS 0,
          BUKRS LIKE BKPF-BUKRS,
          GJAHR LIKE BKPF-GJAHR,
          BELNR LIKE BKPF-BELNR,
          BLART LIKE BKPF-BLART,
          BUDAT LIKE BKPF-BUDAT,
    END OF ITAB_BKPF.
    DATA :BEGIN OF ITAB_BSEG OCCURS 0,
          BUKRS LIKE BSEG-BUKRS,
          GJAHR LIKE BSEG-GJAHR,
          BELNR LIKE BSEG-BELNR,
          BUZEI LIKE BSEG-BUZEI,
          BSCHL LIKE BSEG-BSCHL,
          HKONT LIKE BSEG-HKONT,
          DMBTR LIKE BSEG-DMBTR,
          MWSKZ LIKE BSEG-MWSKZ,
          ZUONR LIKE BSEG-ZUONR,
          KOSTL LIKE BSEG-KOSTL,
          FISTL LIKE BSEG-FISTL,
          FIPOS LIKE BSEG-FIPOS,
          SGTXT LIKE BSEG-SGTXT,
    END OF ITAB_BSEG.
    DATA BEGIN OF ITAB_BKPF_BSEG OCCURS 0.
      INCLUDE STRUCTURE ZBKPF_BSEG.
    DATA END OF ITAB_BKPF_BSEG.
    *DATA ITAB_BKPF_BSEG LIKE TABLE OF ZITAB_BKPF_BSEG WITH HEADER LINE.
    DATA i_print LIKE TABLE OF ITCPO WITH HEADER LINE.
    TYPE-POOLS : SLIS , kkblo.
    DATA:TEXT2(30) VALUE 'Voucher Print',
         GS_LAYOUT TYPE SLIS_LAYOUT_ALV,
         CT_FIELDCAT TYPE SLIS_T_FIELDCAT_ALV,
         IT_SORT TYPE SLIS_T_SORTINFO_ALV,
         WA_SORT TYPE SLIS_SORTINFO_ALV,
         WA_SUBT LIKE SLIS_EV_SUBTOTAL_TEXT,
         WA_I_EVENT TYPE SLIS_ALV_EVENT,
         TEMP_CAT TYPE SLIS_FIELDCAT_ALV
    DATA : TEXT2538(16) VALUE 'Voucher Printing'.
    SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-001.
    PARAMETERS : P_BUKRS LIKE BKPF-BUKRS OBLIGATORY.
    "Company code
    SELECT-OPTIONS : S_BELNR FOR BKPF-BELNR MODIF ID M01.
    "Accounting Doc No
    PARAMETERS: P_GJAHR LIKE BKPF-GJAHR MODIF ID M02.
    "Fiscal year
    SELECT-OPTIONS:  S_BLART FOR BKPF-BLART MODIF ID M03,
                                              "Document type
                     S_BUDAT FOR BKPF-BUDAT MODIF ID M04.
    "Posting date
    SELECTION-SCREEN END OF BLOCK B1.
    START-OF-SELECTION.
      IF S_BELNR IS NOT INITIAL.
        FLAG = 1.
      ENDIF.
      IF S_BLART IS NOT INITIAL.
        FLAG1 = 1.
      ENDIF.
      IF P_GJAHR IS NOT INITIAL.
        FLAG2 = 1.
      ENDIF.
      IF S_BUDAT IS NOT INITIAL.
        FLAG3 = 1.
      ENDIF.
      SELECT
          BUKRS
          GJAHR
          BELNR
        INTO CORRESPONDING FIELDS OF TABLE ITAB_BKPF
        FROM BKPF
        WHERE BUKRS EQ P_BUKRS
      IF SY-SUBRC NE 0.
        MESSAGE E000(ZPROJ).
      ENDIF.
      IF FLAG NE 0.
        DELETE ITAB_BKPF WHERE
        NOT ( BELNR IN S_BELNR AND GJAHR EQ P_GJAHR )
      ENDIF.
      IF FLAG1 NE 0.
        DELETE ITAB_BKPF WHERE
        NOT ( BLART IN S_BLART AND BUDAT IN S_BUDAT )
      ENDIF.
      IF FLAG2 NE 0.
        DELETE ITAB_BKPF WHERE
        NOT ( GJAHR EQ P_GJAHR )
      ENDIF.
      IF FLAG3 NE 0.
        DELETE ITAB_BKPF WHERE
        NOT ( BUDAT IN S_BUDAT )
      ENDIF.
      SELECT
            BUKRS
            GJAHR
            BELNR
            BUZEI
            BSCHL
            HKONT
            DMBTR
            MWSKZ
            ZUONR
            KOSTL
            FISTL
            FIPOS
            SGTXT
         FROM BSEG
         INTO TABLE ITAB_BSEG
         FOR ALL ENTRIES IN ITAB_BKPF
           WHERE
              BUKRS EQ P_BUKRS AND
              BELNR EQ ITAB_BKPF-BELNR AND
              GJAHR EQ ITAB_BKPF-GJAHR
      LOOP AT ITAB_BKPF.
        LOOP AT ITAB_BSEG WHERE BUKRS EQ ITAB_BKPF-BUKRS AND
                              BELNR EQ ITAB_BKPF-BELNR AND
                              GJAHR EQ ITAB_BKPF-GJAHR.
          MOVE-CORRESPONDING ITAB_BSEG TO ITAB_BKPF_BSEG.
    *    MOVE-CORRESPONDING ITAB_BKPF TO ITAB_BKPF_BSEG.
          APPEND ITAB_BKPF_BSEG.
        ENDLOOP.
      ENDLOOP.
    LOOP AT ITAB_BKPF_BSEG.
      ITAB_BKPF_BSEG-ZMENG = ITAB_BKPF_BSEG-DMBTR.
      MODIFY ITAB_BKPF_BSEG TRANSPORTING zmeng.
    ENDLOOP.
      PERFORM CHANGE_CATALOG.
      PERFORM ALV_DISPLAY.
    FORM CHANGE_CATALOG .
      CLEAR TEMP_CAT.
      TEMP_CAT-FIELDNAME  = 'BUKRS'.
      TEMP_CAT-SELTEXT_L = 'Company Code'.
      TEMP_CAT-TABNAME = 'ITAB_BKPF_BSEG'.
      TEMP_CAT-DDICTXT = 'L'.
      TEMP_CAT-OUTPUTLEN = 30.
      TEMP_CAT-HOTSPOT = 'X'.
      APPEND TEMP_CAT TO CT_FIELDCAT.
      CLEAR TEMP_CAT.
      TEMP_CAT-FIELDNAME  = 'BELNR'.
      TEMP_CAT-SELTEXT_L = 'Document No.'.
      TEMP_CAT-TABNAME = 'ITAB_BKPF_BSEG'.
      TEMP_CAT-DDICTXT = 'L'.
      TEMP_CAT-HOTSPOT = 'X'.
      APPEND TEMP_CAT TO CT_FIELDCAT.
      CLEAR TEMP_CAT.
      TEMP_CAT-FIELDNAME  = 'GJAHR'.
      TEMP_CAT-SELTEXT_L = 'Fiscal Year'.
      TEMP_CAT-TABNAME = 'ITAB_BKPF_BSEG'.
      TEMP_CAT-DDICTXT = 'L'.
      TEMP_CAT-OUTPUTLEN = 15.
      TEMP_CAT-HOTSPOT = 'X'.
      APPEND TEMP_CAT TO CT_FIELDCAT.
      CLEAR TEMP_CAT.
      TEMP_CAT-FIELDNAME  = 'BUZEI'.
      TEMP_CAT-SELTEXT_L = 'Item'.
      TEMP_CAT-TABNAME = 'ITAB_BKPF_BSEG'.
      TEMP_CAT-DDICTXT = 'L'.
      TEMP_CAT-OUTPUTLEN = 5.
      APPEND TEMP_CAT TO CT_FIELDCAT.
      CLEAR TEMP_CAT.
      TEMP_CAT-FIELDNAME  = 'BSCHL'.
      TEMP_CAT-SELTEXT_L = 'Posting Key'.
      TEMP_CAT-TABNAME = 'ITAB_BKPF_BSEG'.
      TEMP_CAT-DDICTXT = 'L'.
      TEMP_CAT-OUTPUTLEN = 15.
      APPEND TEMP_CAT TO CT_FIELDCAT.
      CLEAR TEMP_CAT.
      TEMP_CAT-FIELDNAME  = 'HKONT'.
      TEMP_CAT-SELTEXT_L = 'Account'.
      TEMP_CAT-TABNAME = 'ITAB_BKPF_BSEG'.
      TEMP_CAT-DDICTXT = 'L'.
      TEMP_CAT-OUTPUTLEN = 15.
      APPEND TEMP_CAT TO CT_FIELDCAT.
      CLEAR TEMP_CAT.
      TEMP_CAT-FIELDNAME  = 'DMBTR'.
      TEMP_CAT-SELTEXT_L = 'Amount'.
      TEMP_CAT-TABNAME = 'ITAB_BKPF_BSEG'.
      TEMP_CAT-DDICTXT = 'L'.
      TEMP_CAT-OUTPUTLEN = 15.
      TEMP_CAT-DO_SUM = 'X'.
      APPEND TEMP_CAT TO CT_FIELDCAT.
      CLEAR TEMP_CAT.
      TEMP_CAT-FIELDNAME  = 'MWSKZ'.
      TEMP_CAT-SELTEXT_L = 'Tax'.
      TEMP_CAT-TABNAME = 'ITAB_BKPF_BSEG'.
      TEMP_CAT-DDICTXT = 'L'.
      TEMP_CAT-OUTPUTLEN = 15.
      APPEND TEMP_CAT TO CT_FIELDCAT.
      CLEAR TEMP_CAT.
      TEMP_CAT-FIELDNAME  = 'ZUONR'.
      TEMP_CAT-SELTEXT_L = 'Assignment'.
      TEMP_CAT-TABNAME = 'ITAB_BKPF_BSEG'.
      TEMP_CAT-DDICTXT = 'L'.
      TEMP_CAT-OUTPUTLEN = 15.
      APPEND TEMP_CAT TO CT_FIELDCAT.
      CLEAR TEMP_CAT.
      TEMP_CAT-FIELDNAME  = 'KOSTL'.
      TEMP_CAT-SELTEXT_L = 'Cost Center'.
      TEMP_CAT-TABNAME = 'ITAB_BKPF_BSEG'.
      TEMP_CAT-DDICTXT = 'L'.
      TEMP_CAT-OUTPUTLEN = 15.
      APPEND TEMP_CAT TO CT_FIELDCAT.
      CLEAR TEMP_CAT.
      TEMP_CAT-FIELDNAME  = 'FISTL'.
      TEMP_CAT-SELTEXT_L = 'Fund Center'.
      TEMP_CAT-TABNAME = 'ITAB_BKPF_BSEG'.
      TEMP_CAT-DDICTXT = 'L'.
      TEMP_CAT-OUTPUTLEN = 15.
      APPEND TEMP_CAT TO CT_FIELDCAT.
      CLEAR TEMP_CAT.
      TEMP_CAT-FIELDNAME  = 'FIPOS'.
      TEMP_CAT-SELTEXT_L = 'Commitment Item'.
      TEMP_CAT-TABNAME = 'ITAB_BKPF_BSEG'.
      TEMP_CAT-DDICTXT = 'L'.
      TEMP_CAT-OUTPUTLEN = 15.
      APPEND TEMP_CAT TO CT_FIELDCAT.
      CLEAR TEMP_CAT.
      TEMP_CAT-FIELDNAME  = 'SGTXT'.
      TEMP_CAT-SELTEXT_L = 'Text'.
      TEMP_CAT-TABNAME = 'ITAB_BKPF_BSEG'.
      TEMP_CAT-DDICTXT = 'L'.
      TEMP_CAT-OUTPUTLEN = 15.
      APPEND TEMP_CAT TO CT_FIELDCAT.
      GS_LAYOUT-ZEBRA = 'X'.
    <b>GS_LAYOUT-TOTALS_BEFORE_ITEMS = 'X'.</b>
    data : text like slis_ev_subtotal_text value 'total'.
    gs_layout-subtotals_text = text.
    *gs_layout-totals_only = 'X'.
      CLEAR WA_SORT.
      WA_SORT-FIELDNAME = 'BUKRS'.
      WA_SORT-SPOS      = 1.
      WA_SORT-UP = 'X'.
    *wa_sort-group = '*'.
      APPEND WA_SORT TO IT_SORT.
      CLEAR WA_SORT.
      WA_SORT-FIELDNAME = 'BELNR'.
      WA_SORT-SPOS      = 2.
      WA_SORT-SUBTOT = 'X'.
      WA_SORT-UP = 'X'.
      APPEND WA_SORT TO IT_SORT.
      CLEAR WA_SORT.
      WA_SORT-FIELDNAME = 'GJAHR'.
      WA_SORT-SPOS      = 3.
      WA_SORT-SUBTOT = 'X'.
      WA_SORT-UP = 'X'.
      APPEND WA_SORT TO IT_SORT.
      CLEAR WA_SORT.
      WA_SORT-FIELDNAME = 'DMBTR'.
      WA_SORT-SPOS      = 4.
      APPEND WA_SORT TO IT_SORT.
      gs_layout-subtotals_text = 'total'.
    ENDFORM.
    FORM ALV_DISPLAY.
      CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
       EXPORTING
    *   I_INTERFACE_CHECK              = ' '
    *   I_BYPASSING_BUFFER             =
    *   I_BUFFER_ACTIVE                = ' '
         I_CALLBACK_PROGRAM             = SY-REPID
    *   I_CALLBACK_PF_STATUS_SET       = ' '
        I_CALLBACK_USER_COMMAND        = 'USER_COMMAND'
    *   I_STRUCTURE_NAME               =
         IS_LAYOUT                      = GS_LAYOUT
         IT_FIELDCAT                    = CT_FIELDCAT
    *   IT_EXCLUDING                   =
    *   IT_SPECIAL_GROUPS              =
         IT_SORT                        = IT_SORT[]
    *   IT_FILTER                      =
    *   IS_SEL_HIDE                    =
    *   I_DEFAULT                      = 'X'
         I_SAVE                         = 'A'
    *   IS_VARIANT                     =
    *   IT_EVENTS                      =
    *   IT_EVENT_EXIT                  =
    *   IS_PRINT                       =
    *   IS_REPREP_ID                   =
    *   I_SCREEN_START_COLUMN          = 0
    *   I_SCREEN_START_LINE         0   = 0
    *   I_SCREEN_END_COLUMN            = 0
    *   I_SCREEN_END_LINE              = 0
    *   IR_SALV_LIST_ADAPTER           =
    *   IT_EXCEPT_QINFO                =
    *   I_SUPPRESS_EMPTY_DATA          = ABAP_FALSE
    * IMPORTING
    *   E_EXIT_CAUSED_BY_CALLER        =
    *   ES_EXIT_CAUSED_BY_USER         =
        TABLES
          T_OUTTAB                       = ITAB_BKPF_BSEG
    * EXCEPTIONS
    *   PROGRAM_ERROR                  = 1
    *   OTHERS                         = 2
      IF SY-SUBRC <> 0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    ENDFORM.                    "ALV_DISPLAY
    *i_calLback_user_command = 'USER_COMMAND'.
    FORM USER_COMMAND
      USING UCOMM LIKE SY-UCOMM
      SELFIELD TYPE SLIS_SELFIELD.
      DATA wa LIKE LINE OF ITAB_BKPF_BSEG.
      DATA itab LIKE TABLE OF ITAB_BKPF_BSEG WITH HEADER LINE.
      READ TABLE ITAB_BKPF_BSEG index SELFIELD-TABINDEX INTO wa.
      APPEND ITAB_BKPF_BSEG TO ITAB.
        ENDLOOP.
    CALL FUNCTION '/1BCDWB/SF00000204'
    * EXPORTING
    *   ARCHIVE_INDEX              =
    *   ARCHIVE_INDEX_TAB          =
    *   ARCHIVE_PARAMETERS         =
    *   CONTROL_PARAMETERS         = i_ctrl
    *   MAIL_APPL_OBJ              =
    *   MAIL_RECIPIENT             =
    *   MAIL_SENDER                =
    *   OUTPUT_OPTIONS             = i_print
    *   USER_SETTINGS              = 'X'
    * IMPORTING
    *   DOCUMENT_OUTPUT_INFO       =
    *   JOB_OUTPUT_INFO            =
    *   JOB_OUTPUT_OPTIONS         =
      TABLES
        ITAB_BKPF_BSEG             = ITAB
    * EXCEPTIONS
    *   FORMATTING_ERROR           = 1
    *   INTERNAL_ERROR             = 2
    *   SEND_ERROR                 = 3
    *   USER_CANCELED              = 4
    *   OTHERS                     = 5
    IF SY-SUBRC <> 0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    ENDFORM.                    "user_command

  • Problem with same layout (variant) for two ALV Grid and ALV Tree

    Hello!
    I have two docking containers on the screen. On the left i have cl_gui_alv_tree, on the right cl_salv_table.
    When a user set a default layout for ALV Grid (or ALV Tree), raport starts and sets this layout in both objects (tree and grid).
    How to avoid this?

    Hi,
    Take Two radio buttons.
    First radion button display the two containers in grid format,
    second radio button display the two containers in tree format base on user selection.
    CREATE OBJECT G_DOCING_CONTAINER
        EXPORTING PARENT = G_CUSTOM_CONTAINER."G_CONTAINER.
    DISPLAY THE DATA IN GRID FORMATA
    CREATE OBJECT r_grid
        EXPORTING
          i_parent          = G_DOCING_CONTAINER
    CALL METHOD g_docing_container->set_width
          EXPORTING
            width      = 1300.
    DISPLAY THE GRID DATA IN SECOND CONTAINER
    CREATE OBJECT r_grid1
        EXPORTING
          i_parent          = G_DOCING_CONTAINER
    CALL METHOD g_docing_container->set_width
          EXPORTING
            width      = 1300.
    OTHERWISE WE CAN DISPLAY THE TWO CONTAINERS DATA IN A GRID FORMAT
    CREATE OBJECT g_tree
        EXPORTING
          parent                = g_docing_container"g_custom_container
    IF R1 = 'X'.  "FOR GRID DISPLAY
    CALL METHOD r_grid1->set_table_for_first_display
    CALL METHOD r_grid2->set_table_for_first_display
    ELSE.
    ************TREE DISPLAY
    ENDIF.
    regards,
    muralii

  • ALV Grid and ALV List difference?

    Hello,
    Can you help me differentiate ALV List and ALV grid and the low-level definition or context of each?
    Also, can you give me a transaction code that outputs an ALV list as well as a tcode for ALV grid?
    Thanks,
    Jennah

    Hi Kirtish,
    Thanks but I  havent done any function module stuff as I am not an ABAPer but anyway can you guide me through thios?
    "I hope this might slove your query. For more please refer to documentation on ALV and also implement the ALV LIST and GRID reports. By using class Class CL_GUI_ALV_GRID, Function module REUSE_ALV_LIST_DISPLAY , REUSE_ALV_GRID_DISPLAY and some more functions like that only."
    I will give you some tcode can you please try tcode FBL1n? then execute the report. What is the output is it an ALV list?
    I wish to see an ALV list also an ALV grid to see difference.
    Tjhakns,
    Jennah

  • Help with how to count the number of tokens from the first line

    Hi
    I want to count the number of tokens from the first line of text, from my incoming file and print it out.
    For example i have 12 tokens in the first line, so i want it to print out the number 12
    my code is below
    thanks
    import java.io.*;
    import java.util.*;
    import java.lang.*;
    import java.util.StringTokenizer.*;
    import java.sql.*;
    public class Data {
         public static void main(String[] args) {
                        String token = null;          
                        String currentToken = "";
                        Hashtable hh = new Hashtable();     
              try {
                   Vector v2 = new Vector(100);
                   Vector v = new Vector(100);
                   FileReader file = new FileReader("words.txt");
                   BufferedReader buff = new BufferedReader(file);
                   String line = buff.readLine();
                   StringTokenizer s = null;
                   boolean eof = false;
                   while  (!eof){
                        s = new StringTokenizer(line.trim(),",",true);
                        boolean lastToken = true;
                   while (s.hasMoreTokens()) {
                              token = s.nextToken();
                                  if (lastToken){
                                   if (token.equals(",")) {
                                        v.add("");
                                               lastToken = false;
                                      if (! token.equals(",")) {
                                   v.add(token);
                                  else { if (currentToken.equals(",")) {
                                        v.add("");
                                  currentToken = token;
                        if (token.equals(",")) {
                               v.add("");
                   line = buff.readLine();
                        if (line == null){     
                             eof = true;}
                   buff.close();
              }catch (FileNotFoundException fe) {     
                        System.out.println("Error - - " + fe.toString());
              }catch (NumberFormatException ne) {
                        System.out.println("Error - - " + ne.toString());
              } catch (IOException e) {
                   System.out.println("Error - - " + e.toString());
    }     2.

    I can print out the amount of tokens from each line,
    But i only want the first line to be counted, And i
    also do not want the delimeters to be counted.
    could you please give me some ideas?
    Thanks
    try
       BufferedReader br = new BufferedReader(new FileReader("item.kr"));
       while((str=br.readLine())!= null)
          itemslist.add(str);
    catch(IOException ioe)
       System.out.println("Exception Occurred!!!");
    }This snippet gets one Line from the item.kr file.
    Then i would count (By useing a diffrent String Tokenizer) to count only this line!!!

  • ALV Grid and LIST?

    HI all,
    Diff between ALV GRID and ALV LIST?
    sachin.

    Hi,
    ckeck these differences.
    first one is for list display and second one is for grid display.
    For all practical purposes, they are the same.
    2. Some differences:
    a) from abap coding point of view,
    alv list is done with Function modules,
    alv gris can also be done with FM,
    but can also be done using OO concepts.
    b) Alv grid (using oo concept) requires
    designing the screen layout .
    Hence, in one screen, we can show more
    then one alv grid
    (we cannot show more than
    one alv list on one screen)
    c) ALV grid uses ActiveX controls
    present on the Presentation Server.
    Hence, it consumes More Memory
    on the presentation server.
    d) ALV LIST is Display Only.
    Whereas
    ALV Grid Can Be made EDITABLE for entry purpose.
    e) In alv grid, these options are possible,
    but not in alv list.
    without horizontal lines
    without vertical lines
    without cell merging during sorts
    display total lines above the entries
    ALV LIST Can be coded using only FMs
    ALV GRID Can be coded using FMs and object oriented concepts
    ALV LIST Can be displayed hieraicharlly
    ALV GRID cannot be displayed hierarichally.
    reward points if hlpful.

  • Total of numeric fields in the first line of ALV output

    Hi All,
    i have a problem it is like i have created ALV list display and total is dipalyed of numeric column  for each page. my requirement is total should be diaplyed at the end of page plus toal should be diaplyed on the first line of second page also .
    please suggest me some solution .
    thanks
    praveen

    Hi
    one thing you can do is capture the totals into variables and display then in each top-of-page except first page.
    it will work as SORT and all dont have effect on top-of-page data. If you append that to internal table once we hit SORT data will chnage and it will give errorneous effects.

  • Display the first line

    hi,
    i have a field called comments of length 1000. i need to display only the first line of the comments field in the alv grid.

    Hi Juli,
    Once you get the data into the internal table (itab)....
    Read itab with sy-index 1 into one internal table.
    then pass this to the alv grid fm...

  • Summary field printing on the first line when it supposed to prin last page

    i have created manual report. in the end of the report i have summay columns. wheni run in oracle reports it perfectly shows the grand totle. when i generate to file (PDF) thegrand total print on the first line. can some one tell me wht is it printig on the first line when it supposed to print on the last page. i tried print object on Last Page. it is still same.

    You may have hit this side effect of page protect (all copied from the Help):
    Description The Page Protect property indicates whether to try to keep the entire object and its contents on the same logical page. Setting Page Protect to Yes means that if the contents of the object cannot fit on the current logical page, the object and all of its contents will be moved to the next logical page.
    Note: Using Page Protect may cause objects below the page protected object(s) to appear above the page protected object(s).
    Solution:
    If Page Protect causes an object to be moved to the next logical page when formatting, an object alongside the page protected object may or may not be moved as well. If the object alongside the page protected object is not anchored (implicitly or explicitly) to the page protected object, and that object can fit in the space where the page protected object could not fit, the object will print on that logical page. Otherwise, the object will be moved along with the page protected object to the next logical page.
    (To say it simply: anchor the summary field explicitly).

  • How to set cursor at the first line in a table control?

    Hi,
           I have a customized infotype screen where a table control is being used to input new values.The tab control has 30 lines.Now, the problem is that when the screen is displayed, the cursor always starts at 8th or 4th line.The behaviour is not very consistent.I tried the following statement in the PBO, but no effect.
    SET CURSOR FIELD P9417-ZCOUNTRY LINE 1.  ( P9417-ZCOUNTRY is the name of the tab control field where i want to set the cursor ).This is the last statement in the PBO.
    Can someone please tell me why still I am not able to set the cursor at the first line? I have infact noticed that , in the debugging mode , sometimes the cursor starts at the first line.Please help. Thanks

    I have got a new requirement on this now. If the table control does not have any records , then the cursor position should be on the first row.Otherwise, if it already has some records, then the cursor should be at the first empty row.I wrote the code like below.
    if sy-ucomm = 'INSERT'.
    set cursor 'P9714-ZCOUNTRY'  line 1.
    else if sy-ucomm eq 'CHANGE'.
    describe table itab lines fill.
    fill = fill + 1.
    set cursor 'P9714-ZCOUNTRY'  line fill.
    endif.
    I am facing a strange problem now.The table control has some 10 rows when you see the screen for the first time.If the number of records already present is less than 10, I am able to position the cursor on the first empty row.But if the number is say 15, then the cursor position goes to eighth or fourth line or sometimes the first line.
    Is there any way to display the last few records , ie, if there are 15 records , is there any way to display the last five rows when I see the screen for the first time, rather than showing the first 10 records?How can I position the cursor at the first empty row, when there are more records?
    Thanks in advance..good answers will be rewarded.
    Mahesh

  • THOUGH I DO NOT ACTIVATE THE FIRST LINE "BROWSING AND DOWNLOAD HISTORY", MY DOWNLOADS ARE NEVERTHELESS DELETED. I JUST POSTED THIS QUESTION AND GOT 2 REPLI

    When I do a "CLEAR RECENT HISTORY" and THOUGH I DO NOT ACTIVATE THE FIRST LINE "BROWSING AND DOWNLOAD HISTORY", MY DOWNLOADS ARE NEVERTHELESS DELETED.
    I just posted this question under the "OTHER" category and got 2 replies, neither of which solves this problem!
    IS THERE A SOLUTION? Thanks

    Are you the same poster as Raphaex who posted using Windows 8.1 in this thread and provided a full and detailed set of data accessible using the "More System Details" link: https://support.mozilla.org/questions/1011435 ??
    If not, could you provide a link to the earlier discussion on your situation if there is one? I don't want to repeat what you haven't found helpful, and also, it's critical to know your correct configuration information and not waste everyone's time typing out advice that is totally irrelevant.
    To provide the missing details on your configuration:
    # Use ONE of these methods to open the Firefox Troubleshooting Information page:
    #* Click the "3-bar" menu button [[Image:New Fx Menu]], click on help [[Image:Help-29]] and select ''Troubleshooting Information''.
    #* Type '''about:support''' into the Firefox address bar and press the enter key.
    # In the top left corner of the Troubleshooting Information page that comes up, you should see a button that says "Copy text to clipboard". Click it.
    #Now, come back to this thread, right-click in the reply box and select '''Paste''' from the context menu (or else click inside the reply box and press Command+v) to paste all the information you copied into the forum post.
    Usually, this does not contain personal information, but I suggest you skim down and make sure you do not see your email address in there (XX it out ).

  • Excel upload with header in the first line

    Hi ,
    I have to upload a Excel sheet with data where the first line will be the Header .
    I am using the FM
    CALL FUNCTION 'TEXT_CONVERT_XLS_TO_SAP'
        EXPORTING
          I_LINE_HEADER        = 'X'
          I_TAB_RAW_DATA       = IT_TAB_RAW_DATA
          I_FILENAME           = P_FILE
        TABLES
          I_TAB_CONVERTED_DATA = IT_FS00_C
        EXCEPTIONS
          CONVERSION_FAILED    = 1
          OTHERS               = 2.
    But the data is not getting uploaded in the IT_FS00_c table.
    is there any other way to do it.
    thanks and regards,
    Vikki.

    Use the folllowing coding.....
        CALL FUNCTION 'ALSM_EXCEL_TO_INTERNAL_TABLE'
             EXPORTING
                  filename                = p_file
                  i_begin_col             = 1
                  i_begin_row             = 2
                  i_end_col               = 7
                  i_end_row               = 9999
             TABLES
                  intern                  = t_alsm_tab
             EXCEPTIONS
                  inconsistent_parameters = 1
                  upload_ole              = 2
                  OTHERS                  = 3.
        IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
        ENDIF.
        SORT t_alsm_tab BY row col.
        LOOP AT t_alsm_tab INTO r_alsm_tab.
          AT END OF row.
            l_append = 'X'.
          ENDAT.
          IF r_alsm_tab-col = 1.
            r_input_tab-kokrs = r_alsm_tab-value.
          ELSEIF r_alsm_tab-col = 2.
            r_input_tab-bukrs = r_alsm_tab-value.
          ELSEIF r_alsm_tab-col = 3.
            r_input_tab-rprctr = r_alsm_tab-value.
          ELSEIF r_alsm_tab-col = 4.
            r_input_tab-pline = r_alsm_tab-value.
          ELSEIF r_alsm_tab-col = 5.
            r_input_tab-sdatst = r_alsm_tab-value.
          ELSEIF r_alsm_tab-col = 6.
            r_input_tab-sdated = r_alsm_tab-value.
          ELSEIF r_alsm_tab-col = 7.
            r_input_tab-kostl = r_alsm_tab-value.
          ENDIF.
          IF l_append = 'X'.
            APPEND r_input_tab TO t_input_tab.
            CLEAR : l_append , r_input_tab.
          ENDIF.
        ENDLOOP.
      ENDIF.

  • The first line in a file is supressed

    hi all,
    i have a really weird problem.
    i have a file with a lot of data and i am using a file adapter with file content conversion to parse it.
    the file adapter is a sender one.
    the problem come when i do read the file and then it ignore the first line of the file.
    all the lines from the second one forward is shown in SXMB_MONI but the first line of the file isn't.
    i can't seem to figure out what the problem is, i tryed looking for some kind of attribute in the file adpater but had no luck.
    could you please help me?
    btw,
    the file structure is: header,1,body1,<wildcard>,body2,<wildcard>
    Edited by: Roi Grossfeld on Oct 29, 2008 4:24 PM

    Recordset Structure: H1,1,B1,<wildcard>,B2,<wildcard>
    Key Field Name: RecordType
    H1.fieldFixedLengths 6,2,8,1,1,3,30,5
    H1.fieldNames FileNo,RecordType,TransmissionDate,Car_Truck,BU,MD,FileName,Count
    H1.keyFieldValue H1
    B1.fieldFixedLengths 6,2,10,27,8,8,4,5,3,11,9,9,11,11,9,9,7,9,11
    B1.fieldNames FileNo,RecordType,InvoiceNumber,VesselName,MMSEShipmentDate,PlanArrivalDate,DeliveryPlace,Units,Currency,ModelPriceAmount,OptionPriceAmount,ColourPriceAmount,REPriceAmount,TotalPriceAmount,FreightChargeAmount,InsuranceFeeAmount,MiscellaneousAmount,VATAmount,GrandTotalAmount
    B1.keyFieldValue B1
    B2.fieldFixedLengths 6,2,10,12,12,12,5,6,12,3,3,3,4,17,7,7,12,8,5,3,9,7,7,9,9,7,9,4,20
    B2.fieldNames FileNo,RecordType,InvoiceNumber,MDOrderNumber,MMSEOrderNumber,MMSECaseNumber,ModelYear,BodyType,Model,ExteriorColourCode,InteriorTrimColourCode,OptionCode,RearEquipment,VehicleIdentificationNumber,ChassisModel,CSequenceNumber,EngineModel,ESequenceNumber,KeyNumber,Currency,UnitModelPrice,UnitOptionPrice,UnitColourPrice,UnitRearEquipmentPrice,UnitTotalPrice,UnitVATAmount,UnitTotalVAT,VATRate,VATNumber
    B2.keyFieldValue B2
    ignoreRecordsetName true
    Edited by: Roi Grossfeld on Oct 29, 2008 4:39 PM

  • File Sender adapter not reading the first line

    Hi,
    I have a scenario configured from file to jdbc adapter.
    However, I found a problem in my file sender adapter. My file adpater always not picking up the first line from my text even I have set the 'Document Offset' to 0.
    Any Ideas? Thanks.
    Regards,
    Pua

    Hi Latika Sethi,
    My complete input text file is as below, it contains only 2 testing records:-
    H1|DIZ1                          |A0016507    |10000020|09/2007
    H2|ABC0001
    D|P|0001|Gaji Pokok       |   1,000.09
    D|D|0002|Denda              |   1,000.00
    D|P|0003|Elaun               |   1,000.00
    H1|PUA1                        |A0016508    |10000021|09/2007
    H2|ABC0002
    D|P|0001|Gaji Pokok       |   2,744.09
    D|D|0002|Denda              |   2,000.00
    D|P|0003|Elaun               |   2,000.00
    After the message mapping, I found the pipeline existed in sxmb_moni as below:-
    <?xml version="1.0" encoding="utf-8"?>
    <ns:mt_rmp03B_filejdbc_sender xmlns:ns="urn:rmp03:pdrm:ips:jdbcjdbc">
    <PaySlip>
    ..<Header2>
    .... <IC>ABC0001</IC>
    .. </Header2>
    .. <Details>
    .... <Jenis>P</Jenis>
    .... <No>0001</No>
    .... <Deskripsi>Gaji Pokok</Deskripsi>
    .... <Jumlah>1,000.09</Jumlah>
    .. </Details>
    </PaySlip>
    <PaySlip>
    .. <Header1>
    .... <Nama>PUA1</Nama>
    .... <KWSP>A0016508</KWSP>
    .... <NoGaji>10000021</NoGaji>
    .... <Bulan>09/2007</Bulan>
    .. </Header1>
    .. <Header2>
    .... <IC>ABC0002</IC>
    .. </Header2>
    .. <Details>
    .... <Jenis>P</Jenis>
    .... <No>0001</No>
    .... <Deskripsi>Gaji Pokok</Deskripsi>
    .... <Jumlah>2,744.09</Jumlah>
    .. </Details>
    </Payslip>
    There are 2 payslips as for the top payslip node...Header1 tag is missing. It means that during the file sender step....the first line of my record which is :-
    "H1|DIZ1                          |A0016507    |10000020|09/2007"
    is not read into the xi pipeline. Basically this is the problem i faced.
    Has somebody facing the same problem before? Currently I have no choice but moved the First line of the text into Second line and left the first line of the text become null/ empty line. As such both records can be successfully read by the XI.
    However what I wondered is sometimes clients will do insert the records into the first line and this might made some data loss.
    Thanks...

  • Adding extension "line-size 255" to a standard report on the first line

    Hi Experts,
    i want to modify the statment  from Report ztest1 message-id zm to Report ztest1 message-id zm and line-size 255.
    I am going to add the extension line-size 255 to the report statement in a standard report. There are no enhancement points near the first line. I have access key available, so i can make the changes to core mod.
    The problem is that if i run the report in background, out of the 8 fields, i only see the first 6 columns in the spool. remaining 2 fields are truncated.
    The reason for truncation is bcoz the line-size extension is not given to the report. What procedure do i have to follow to add the extension line-size 255?

    HI,
    You do not need any enhancement for it.
    If you have the access key then just add the additon line-size 255 to the repport statement.
    Regards,
    Ankur Parab

Maybe you are looking for

  • 安装Firefox4后,插件Windows Media Player Plug-in Dynamic Link Library(3.0.2.629)崩溃了,插件已经是最新版,如何解决?

    安装Firefox4后,访问带有在线音乐播放器的页面时,提示"插件Windows Media Player Plug-in Dynamic Link Library已崩溃了",插件版本(3.0.2.629)已经是最新版,如何解决?谢谢!

  • Best way to manage rules?

    I have just maxed out the rules for iCloud (99 rules allowed). On the Mac you can have more complex rules so you can have one rule that says basically if I get an e-mail from (Lands End, L.L. Bean, Amazon, etc) file the e-mail into my "Stores" folder

  • Unix terminal in java

    Hi all, I am working on a project which will allow a person to be working on code and have other users sign in and post comments to there code to help them with problems. One of the features I wanted to have is a terminal windows in which the user co

  • Adobe Creative Suite 3 Web premium?

    Does anybody know roughly the amount of space that the entire Creative Suite 3 takes up? MacBook Pro    

  • Restricting a characteristic

    Hi Guys can you please give me advise on how to restrict a characteristic to a certain value in a query i.e. i want the cells with "CE/#" only to show in the report. The characteristic is not a key figure. thanks