Grouping of rows of internal table.

Hi all,
I am having a requirement in which I want to group two rows of an internal table and assign a pointer to the two rows.
This pointer variable will then be passed to ALV.
Help reqd.
regards.

hi,
AT - itab:
push F1 to look at the documentation for grouping
then assign the value to a field-symbol.

Similar Messages

  • How to add a group of rows in internal table

    Hi champs,
       I have some requirement.
    I have one internal table which contain 4 columns .out of which 3 has some numeric value and first has some letters e.g A ,B,C etc.
    Now suppose i have 20 rows in itab in which 10 are A 5 are B and 5 are C .Now as column 3 has numeric values i need to get the total of column 3 for all A ,B and C .
    How to solve this problem.Please guid me.
    thanks in advance
    Jhon

    Hi,
    Check the following code:
    DATA: BEGIN OF LINE,
    COL1 TYPE C,
    COL2 TYPE I,
    COL3 TYPE I,
    END OF LINE.
    DATA ITAB LIKE HASHED TABLE OF LINE
    WITH UNIQUE KEY COL1 COL2.
    LINE-COL1 = 'A'.
    DO 3 TIMES.
    LINE-COL2 = SY-INDEX.
    LINE-COL3 = SY-INDEX ** 2.
    INSERT LINE INTO TABLE ITAB.
    ENDDO.
    LINE-COL1 = 'B'.
    DO 3 TIMES.
    LINE-COL2 = 2 * SY-INDEX.
    LINE-COL3 = ( 2 * SY-INDEX ) ** 2.
    INSERT LINE INTO TABLE ITAB.
    ENDDO.
    SORT ITAB.
    LOOP AT ITAB INTO LINE.
    WRITE: / LINE-COL1, LINE-COL2, LINE-COL3.
    AT END OF COL1.
    SUM.
    ULINE.
    WRITE: / LINE-COL1, LINE-COL2, LINE-COL3.
    SKIP.
    ENDAT.
    AT LAST.
    SUM.
    ULINE.
    WRITE: / LINE-COL1, LINE-COL2, LINE-COL3.
    ENDAT.
    ENDLOOP.
    Regards,
    Bhaskar

  • Determine Number of  rows in Internal Table

    Hi,
      I have defined my internal table as follows:
         TYPES : BEGIN OF ABC_KEY,
                  FIELD1(2)   TYPE C,
                  FIELD2(1)   TYPE C,
                  FIELD3(8)   TYPE N,
                  END OF ABC_KEY.
    DATA: itab1 TYPE TABLE OF ABC_KEY
                      WITH KEY FIELD1,
           wa_lines_1 LIKE LINE OF itab1.
    How can I retrieve the number of rows in Internal Table?
    Thanks.
    Regards,
    bw_newbie

    You can define the number of rows of the internal table using the DESCRIBE itab command .
    As the rest have already stated a sample code snippet .
    For more info type in DESCRIBE in your prgram and click on (F1) by placing the cursor on DESCRIBE .
    You will find more options as to how you can use the DESCRIBE command according to your requirement .
    Thanks ,
    Hari

  • Grouping of two rows of internal table

    Hi all,
    I am having a requirement in which I want to group two rows of an internal table and assign a pointer to the two rows.
    This pointer variable will then be passed to ALV.
    Help reqd.
    regards.

    Hi Gaurav,
    Hope the below code helps:
    TYPES :BEGIN OF TY_ITAB2,
    DATA(400),
    END OF TY_ITAB2.
    DATA: ITAB3 TYPE TY_ITAB2 OCCURS 0 WITH HEADER LINE
    Loop at itab1.
    ITAB3-DATA = ITAB1-LABEL.
    APPEND ITAB3.
    ITAB3-DATA = ITAB1-MATNR.
    APPEND ITAB3.
    endloop.
                        or
    You can create a deep internal table. You can declare one Column as an internal table and store the NOTES in that Internal table for each row.
    http://help.sap.com/saphelp_nw04/helpdata/en/fc/eb366d358411d1829f0000e829fbfe/content.htm
    you can check the example in the link
    Kindly Reward Points If You Find The Reply Helpful.
    Cheers,
    Chaitanya.

  • Problem with checkbox group in row popin of table.

    In table row popin I have kept Check Box Group.I have mapped  the texts property of checkbox group to the attribute which is under the subnode of the table.the subnode properties singleton=false,selectioncardinality=0-n,and cardinality=0-n.
    if there are 'n' number of records in the table.each record will have its own row popin and in the row popin there is check box group.
    the check box group in the row popin  belongs to that perticular row.
    but the checkboxegroup values in row popins of all the  rows are getting changed to the row which is lead selected.
    The same scenario  (table in the row popin is showing the values corresponding to its perticular row and all the table values in popin are not getting changed to the one lead selected in the main table)is working fine with the table in place of  checkbox group in row popin with datasource property of table  binded to the subnode
    I cant trace out the problem with checkbox group in place of table.
    Please help me in this regard.I have to place check box group in place of table in row popin.
    Thanks and Regards
        Kiran Kumar K

    I have done the same thing successfully with normal check box ui element. Try using check box in your tabel cell editor instead of check box group.

  • How to add a row in internal table at first row

    Hi All,
                  I need to add a row in an internal table which already has some contents.I want to add this row in the first row.
    Please advice.
    Thanks in advance.

    You mean - you  want to replace the 1st record in the internal table. or you want to sum the new values to the existed record.
    If you want to replace - then you can use as
    read table itab index 1.
    if sy-subrc = 0.
        itab-f1 = 'new value'.
        modify itab index sy-tabix.
    endif.
    Regards,
    Satya

  • How to convert rows of internal table to columns of another internal table?

    Hi,
    Experts,
    test_data.xls:
    one two three four five
    one two three four
    one two three
    one two
    one
    CALL FUNCTION 'ALSM_EXCEL_TO_INTERNAL_TABLE'
      EXPORTING
        FILENAME                      = 'c:/test_data.xls'
        I_BEGIN_COL                   = '1'
        I_BEGIN_ROW                   = '1'
        I_END_COL                     = '10'
        I_END_ROW                     = '10'
      TABLES
        INTERN                        = it_tab
    EXCEPTIONS
       INCONSISTENT_PARAMETERS       = 1
       UPLOAD_OLE                    = 2
       OTHERS                        = 3
    output:
    0001 0001 one
    0001 0002 two
    0001 0003 three
    0001 0004 four
    0001 0005 five
    0002 0001 one
    0002 0002 two
    0002 0003 three
    0002 0004 four
    0003 0001 one
    0003 0002 two
    0003 0003 three
    0004 0001 one
    0004 0002 two
    0005 0001 one
    but i want this format:
      one two three four five
    one two three four
    one two three
    one two
    one
    i don't want this type of output display i want to display in ABAP report as in file format how can i achieve this post some ideas on it.
    Thank U,
    Shabeer ahmed.

    Hi,
    Use this piece of code :
    parameters:  p_flname type rlgrap-filename.
      data:
             li_filecontent  type standard table of alsmex_tabline ,
             lwa_filecontent type  alsmex_tabline ,
             lv_begin_col    type i value 1,
             lv_begin_row    type i value 1,
             lv_end_col      type i value 17,
             lv_end_row      type i value 65000,
             li_fieldlist    type lvc_t_fcat,
             li_data         type ref to data,
             dy_line         type ref to data.
      field-symbols:<dyntable> type standard table,
                    <fs_data> type ref to data,
                    <fs_1>,
                    <dyn_wa>,
                    <dyn_field>.
    *Transfer excel file contents to internal table
      call function 'ALSM_EXCEL_TO_INTERNAL_TABLE'
        exporting
          filename                = p_flname
          i_begin_col             = lv_begin_col
          i_begin_row             = lv_begin_row
          i_end_col               = lv_end_col
          i_end_row               = lv_end_row
        tables
          intern                  = li_filecontent
        exceptions
          inconsistent_parameters = 1
          upload_ole              = 2
          error_message           = 3
          others                  = 4.
      if sy-subrc = 0.
    *Creating the list of fields in the table
        perform f_create_tab_field tables li_fieldlist using 'BUKRS'      4 .
        perform f_create_tab_field tables li_fieldlist using 'ZPOC_KUNNR' 10 .
        perform f_create_tab_field tables li_fieldlist using 'RANL'       13.
        perform f_create_tab_field tables li_fieldlist using 'ZPEDAT'     10 .
        perform f_create_tab_field tables li_fieldlist using 'KWERT'      15 .
        perform f_create_tab_field tables li_fieldlist using 'BONUS'      2 .
        perform f_create_tab_field tables li_fieldlist using 'WAERS'      5 .
        perform f_create_tab_field tables li_fieldlist using 'ZVAL'       15 .
        perform f_create_tab_field tables li_fieldlist using 'ZQTY'       15 .
        perform f_create_tab_field tables li_fieldlist using 'KMEIN'      3 .
        assign li_data to <fs_data>.
    *CREATING INTERNAL TABLE TO store data
        call method cl_alv_table_create=>create_dynamic_table
          exporting
            it_fieldcatalog           = li_fieldlist
          importing
            ep_table                  = <fs_data>
          exceptions
            generate_subpool_dir_full = 1
            others                    = 2.
        if sy-subrc = 0.
          assign <fs_data>->* to <fs_1>.
          assign <fs_1> to <dyntable>.
    Create dynamic work area and assign to FS
          create data dy_line like line of <dyntable>.   " creating a line type of the table just created above
          assign dy_line->* to <dyn_wa>.                 " creating the work area with reference to the line type
          loop at li_filecontent into lwa_filecontent.
            assign component  lwa_filecontent-col     "accessing corresponding field in the field catalog
                of structure <dyn_wa> to <dyn_field>. "and assigning this field to a field symbol
            if sy-subrc = 0.
              <dyn_field> = lwa_filecontent-value.     " filling value for this field
            endif.
            at end of row.
              append  <dyn_wa> to <dyntable>.
              clear <dyn_wa>.
            endat.
            clear lwa_filecontent.
          endloop.
          i_input_file[] =  <dyntable>.
        endif.
      elseif sy-subrc <> 0.
        message s027 display like c_error with text-001.
        stop.
      endif.
    form f_create_tab_field  tables   p_li_fieldlist structure lvc_s_fcat
                         using    p_fname
                                  p_lenght.
      data:lwa_fieldlist   type lvc_s_fcat.
      lwa_fieldlist-fieldname = p_fname.
      lwa_fieldlist-intlen = p_lenght.
      append lwa_fieldlist to  p_li_fieldlist.
      clear lwa_fieldlist.
    endform.                    " F_CREATE_TAB_FIELD
    Regards,
    Dev.

  • Get Multiple Rows into internal Table using Webdynpro Alv Display ..

    Hi guys ,
    I need to find out the logic for getting all the selected rows into the internal table.
    When i display the ALV Output on webdypro screen .
    USer Selects multiple rows for further processing ..
    Ineed to get all the rows selected by user into an internal table .
    Please let me know how to achive this ...
    Thanks in advance for quick reply
    Regards
    Saurabh Goel

    Hi,
    You need to use the method GET_SELECTED of IF_WD_CONTEXT_NODE to get the rows selected. Also ccheck for the paramters of that method, this retruns the element set.
    This meets your requirement.
    Regards,
    Lekha.

  • Excel attachment contains only 1st row of Internal Table.

    Hello,
    I have designed a Vendor Ledger report and want to send the same as an excel attachment. I have made use of function module SO_NEW_DOCUMENT_ATT_SEND_API1 wherein I pass the parameters.
    The program works perfectly fine as I am receiving email along with the excel attachment. Also, the excel attachment opens without any errors. Also, the alignment of columns and data is perfect.
    But the problem is if my internal table is having 10 rows, I get only the first row of  the internal table in the excel sheet.
    I also put a break point just before calling the function module to send email, I could see that the internal table which contains the attachment is having all 10 rows.
    I really don't know what's going wrong in this.
    Request you to please help.
    Regards,
    Danish.

    Hi,
    Hi this is my code. Also, one thing I found that if i remove the Report Name i.e. "Vendor Ledger" , I get more than 1 row in my excel sheet. I feel there is some problem with the document size attributes.
    * Header for exception report
      CONCATENATE 'CC' 'Vendor' 'Stat' 'Name' 'Doc.No' 'FY' 'DDate' 'PDate'
                  'AssNo.' 'Doc.Tp' 'G/L' 'LAmt' 'LCurr' 'DAmt'
                  'D/C' 'Cl.Doc' 'TaxCd' 'TaxAmt'
                  INTO it_attachment SEPARATED BY
                  cl_abap_char_utilities=>horizontal_tab.
      CONCATENATE cl_abap_char_utilities=>cr_lf it_attachment INTO it_attachment.
      APPEND it_attachment.
    * Split Internal table data using horizontal tab.
      CLEAR it_main.
      LOOP AT it_main.
        CLEAR: lc_amt, dc_amt, tax_amt.
        lc_amt = it_main-lc_amount.
        dc_amt = it_main-amt_doccur.
        tax_amt = it_main-w_tax_base.
        CONCATENATE it_main-comp_code
                    it_main-vendor
                    it_main-status
                    it_main-name1
                    it_main-doc_no
                    it_main-fisc_year
                    it_main-doc_date
                    it_main-pstng_date
                    it_main-alloc_nmbr
                    it_main-doc_type
                    it_main-sp_gl_ind
                    lc_amt
                    it_main-loc_currcy
                    dc_amt
                    it_main-db_cr_ind
                    it_main-clr_doc_no
                    it_main-w_tax_code
                    tax_amt
                INTO it_attachment SEPARATED BY
                cl_abap_char_utilities=>horizontal_tab.
        CONCATENATE cl_abap_char_utilities=>cr_lf it_attachment INTO it_attachment.
        APPEND it_attachment.
      ENDLOOP.
    * Create Mail Body and Attachment.
      psubject = 'Vendor Ledger'.
      lv_message = 'Dear Sir/Madam,'.
      APPEND lv_message TO it_message.
      lv_message = ' '.
      APPEND lv_message TO it_message.
      lv_message = 'Attachment contain Vendor Ledger for Testing.'.
      APPEND lv_message TO it_message.
      lv_message = ' '.
      APPEND lv_message TO it_message.
      lv_message = ' '.
      APPEND lv_message TO it_message.
      lv_message = 'This is a System Generated Mail. Please do not reply.'.
      APPEND lv_message TO it_message.
    **Perform for populating mail characteristic info
      CLEAR gd_doc_data.
    * Populate the subject/generic message attributes
      gd_doc_data-obj_langu = sy-langu.
      READ TABLE it_attachment INDEX w_cnt.
      gd_doc_data-doc_size = 1.
      gd_doc_data-obj_name  = 'Danish'. "'SAPRPT'.
      gd_doc_data-obj_descr = psubject.
      gd_doc_data-sensitivty = 'F'.
    * Describe the body of the message
      CLEAR it_packing_list.
      REFRESH it_packing_list.
      it_packing_list-transf_bin = space.
      it_packing_list-head_start = 1.
      it_packing_list-head_num = 0.
      it_packing_list-body_start = 1.
      DESCRIBE TABLE it_message LINES it_packing_list-body_num.
      it_packing_list-doc_size = it_packing_list-body_num * 255.
      it_packing_list-doc_type = 'RAW'.
      APPEND it_packing_list.
    **Describe the attachment info
      CLEAR it_packing_list.
      it_packing_list-transf_bin = 'X'.
      it_packing_list-head_start = 1.
      it_packing_list-head_num = 1.
      it_packing_list-body_start = 1.
      DESCRIBE TABLE it_attachment LINES  it_packing_list-body_num.
      it_packing_list-doc_type = 'XLS'.
      it_packing_list-obj_name = 'File'.
      it_packing_list-obj_descr = 'File'.
      it_packing_list-doc_size = it_packing_list-body_num * 255.
      APPEND it_packing_list.
      REFRESH it_receivers.
      CLEAR it_receivers.
      it_receivers-receiver = 'Email Address'.
      it_receivers-rec_type = 'U'.
      it_receivers-com_type = 'INT'.
      APPEND it_receivers.
    **Function Module to send mail
      CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
        EXPORTING
          document_data              = gd_doc_data
          put_in_outbox              = 'X'
          commit_work                = 'X'
        TABLES
          packing_list               = it_packing_list
          contents_bin               = it_attachment
          contents_txt               = it_message
          receivers                  = it_receivers
        EXCEPTIONS
          too_many_receivers         = 1
          document_not_sent          = 2
          document_type_not_exist    = 3
          operation_no_authorization = 4
          parameter_error            = 5
          x_error                    = 6
          enqueue_error              = 7
          OTHERS                     = 8.
    Regards,
    Danish.

  • DELETED rows from internal table

    Hi Experts,
    If I delete row/s from an internal table
    using the command DELETE ADJACENT DUPLICATES,
    is there a way to get these deleted rows.
    Thanks in advance.
    Rose

    Hi roselie,
    1. ofcourse not.
    2.hence, before that,
      u can declare another internal table,
      similar to original,
      and use like this.
    3. ITAB1[]   = ORIGINALITAB[].
    regards,
    amit m.

  • How to append  row in internal table for perticular condition

    Hi,
    I have 4 records in my internal table and i want to append row
    after second row when condition will match.
    please guide me.
    thanks in advancs
    regards
    SND

    hi,
    using key word INDEX u can insert a record in aspecified position as
    if internal table is with header line.
    INSERT <internaltable> index SY_INDEX [or index no if u  know where to insert]
    with out header line.
    INSERT <internaltable> FROM <workarea> index SY_INDEX [or index no if u  know where to insert]
    if condition is true.
    insert itab index 2.
    endif.
    if helpful reward some points.
    with regards,
    Suresh.A

  • Urgent problem: grouping by fields of internal table

    Hi friend,
    i have a urgent problem and i hope that you can help me out:
    i have an internal table containing data, and i sorted it by 3 fields.
    now what i want to do is kind of grouping that means that all the lines that are the same should be written into another internal table like this:
    A
    A
    B
    B
    B
    C
    D
    would give me:
    A                       1
    A                       1
    B                       2
    B                       2
    B                       2
    C                       3
    D                       4
    How could i do this ( especially avoiding nested loops ? ) Is there a handy trick to do this efficiently ?
    thank you, i will give points immediately,
    Clemens

    Hello,
    The field position is important for the fields that are using in the control break statements..Also SORT internal table is required.
    http://help.sap.com/saphelp_nw2004s/helpdata/en/fc/eb381a358411d1829f0000e829fbfe/content.htm
    DATA: BEGIN OF ITAB OCCURS 0,
    MATNR TYPE MATNR,
    WERKS TYPE WERKS_D,
    VALUE TYPE NETPR,
    END OF ITAB.
    ITAB-MATNR = 'ABC'.
    ITAB-WERKS = '0100'.
    ITAB-VALUE = '10.00'.
    APPEND ITAB.
    ITAB-MATNR = '1ABC'.
    ITAB-WERKS = '0100'.
    ITAB-VALUE = '10.00'.
    APPEND ITAB.
    SORT ITAB BY MATNR WERKS.
    LOOP AT ITAB.
    AT FIRST.
      WRITE : 'AT FIRST'.
    ENDAT.
    AT NEW MATNR.
      WRITE : 'AT NEW MATERIAL NUMBER'.
    ENDAT.
    AT END OF MATNR.
      SUM.
      WRITE: / ITAB-MATNR, 'MATERIAL TOTAL - ', ITAB-VALUE.
    ENDAT.
    AT END OF WERKS.
      SUM.
      WRITE: / ITAB-WERKS, 'PLANT TOTAL - ', ITAB-VALUE.
    ENDAT.
    AT LAST.
      WRITE : 'AT LAST'.
    ENDAT.
    ENDLOOP.
    Regards,
    Deepu.K

  • Appending empty rows in internal table

    Hi,
      i am using table control, where there is a condition, some row may left empty. end if i press enter button the empty row is filled by the next available record. My need is to pick the records in the table control to the internal table including the empty rows as it is.

    Hi Karthikeyan,
    By default with user pressinng enter, empty rows will get deleted.
    How are you populating your table control? Is it from standard transaction or your internal table?
    If it is from your internal table, you can add anothe flag field for empty row.
    Whenever row is empty in your internal table, mark flag field as 'X', so in the table control you these entries will not get vanished with pressing of enter.
    This is one idea and you can build on this. You can make this flag column as non editable so that no one can change these.
    hope this helps,
    ags.

  • Grouping by column in Internal table

    Dear folks,
    I have an internal table and my aim is to group its contents (just like we have the GROUP BY statement in normal sql).
    How can we group the contents in an internal table?.
    any hint will be appreciated.
    Thanks
    Praveen

    Hi Praveen A N,
        Sort your internalt table by your requirment.
    See this example program for sort.
    DATA: BEGIN OF LINE,
            LAND(3)  TYPE C,
            NAME(10) TYPE C,
            AGE      TYPE I,
            WEIGHT   TYPE P DECIMALS 2,
          END OF LINE.
    DATA ITAB LIKE STANDARD TABLE OF LINE WITH NON-UNIQUE KEY LAND.
    LINE-LAND = 'G'.   LINE-NAME   = 'Hans'.
    LINE-AGE  = 20.    LINE-WEIGHT = '80.00'.
    APPEND LINE TO ITAB.
    LINE-LAND = 'USA'. LINE-NAME   = 'Nancy'.
    LINE-AGE  = 35.    LINE-WEIGHT = '45.00'.
    APPEND LINE TO ITAB.
    LINE-LAND = 'USA'. LINE-NAME   = 'Howard'.
    LINE-AGE  = 40.    LINE-WEIGHT = '95.00'.
    APPEND LINE TO ITAB.
    LINE-LAND = 'GB'.  LINE-NAME   = 'Jenny'.
    LINE-AGE  = 18.    LINE-WEIGHT = '50.00'.
    APPEND LINE TO ITAB.
    LINE-LAND = 'F'.   LINE-NAME   = 'Michele'.
    LINE-AGE  = 30.    LINE-WEIGHT = '60.00'.
    APPEND LINE TO ITAB.
    LINE-LAND = 'G'.   LINE-NAME   = 'Karl'.
    LINE-AGE  = 60.    LINE-WEIGHT = '75.00'.
    APPEND LINE TO ITAB.
    PERFORM LOOP_AT_ITAB.
    SORT ITAB.
    PERFORM LOOP_AT_ITAB.
    SORT ITAB.
    PERFORM LOOP_AT_ITAB.
    SORT ITAB STABLE.
    PERFORM LOOP_AT_ITAB.
    SORT ITAB DESCENDING BY LAND WEIGHT ASCENDING.
    PERFORM LOOP_AT_ITAB.
    FORM LOOP_AT_ITAB.
      LOOP AT ITAB INTO LINE.
        WRITE: / LINE-LAND, LINE-NAME, LINE-AGE, LINE-WEIGHT.
      ENDLOOP.
      SKIP.
    ENDFORM.
    The output is:
    G   Hans               20         80.00
    USA Nancy              35         45.00
    USA Howard             40         95.00
    GB  Jenny              18         50.00
    F   Michele            30         60.00
    G   Karl               60         75.00
    F   Michele            30         60.00
    G   Hans               20         80.00
    G   Karl               60         75.00
    GB  Jenny              18         50.00
    USA Howard             40         95.00
    USA Nancy              35         45.00
    F   Michele            30         60.00
    G   Karl               60         75.00
    G   Hans               20         80.00
    GB  Jenny              18         50.00
    USA Howard             40         95.00
    USA Nancy              35         45.00
    F   Michele            30         60.00
    G   Karl               60         75.00
    G   Hans               20         80.00
    GB  Jenny              18         50.00
    USA Howard             40         95.00
    USA Nancy              35         45.00
    USA Nancy              35         45.00
    USA Howard             40         95.00
    GB  Jenny              18         50.00
    G   Karl               60         75.00
    G   Hans               20         80.00
    F   Michele            30         60.00
    Reward if it is useful,
    Mahi.

  • Grouping records in an internal table

    Dear all,
    Pls follow the code and suggest me to get the specified format.
    Consider that  i have created a view to populate the reqd data and collect those in an internal table and do a calculation for one field and modify the internal table.
    when i pass this internal table to the function reuse_alv_grid , it throws out a report. But if i need to group the records of the internal table based on three fields, can i do that , if so , how should i do that, if not what method shud i adopt to get the grouped listing in ALV.
    kindly give your views.
    Code goes here..........
    select distinct edatu j_3akvgr6 mvgr4 matnr bismt vbeln auart bstkd bstkd_e ihrez_e
    bstdk_e bstdk bezei vrvez brgew ntgew volum werks kwmeng j_3asize posnr
    INTO CORRESPONDING FIELDS OF TABLE  itabdelshd
    from ZVDELISHED
    where J_3AKVGR6 IN CUSTOMER AND AUART IN ORDTYP
    AND BISMT IN STYLE  AND MATNR in FGMtrl AND bstdk_e IN PLNDATE
    AND J_3ASIZE IN GRIDVAL and werks in plant and mvgr4 in ppmon and
    bstkd in cpono and vbeln in Sales.
    LOOP AT itabdelshd INTO wadelshd.
          select sum( wmeng ) as tqty into wasumqty-tqty
          from vbep where edatu = wadelshd-edatu and vbeln = wadelshd-vbeln
          and j_3asize = wadelshd-j_3asize.
          select sum( lfimg ) as dqty into wasumqty-dqty
          from lips where vbelv = wadelshd-vbeln and j_3asize = wadelshd-j_3asize
          wadelshd-PLND_QTY = wasumqty-tqty - wasumqty-dqty.
          wadelshd-PLND_QTY = wadelshd-wmeng - wadelshd-lfimg.
          wadelshd-COLOR = wadelshd-j_3asize(4).
          MODIFY itabdelshd  FROM  wadelshd.
    ENDLOOP.
      PERFORM build_fieldcatalog.
      PERFORM build_layout.
      PERFORM display_alv_report.

    Dear Jorge,
    It is working out, But i need to do the sum for the grouped data, for instance , if the below data is grouped data seen in the alv,
    sales ord      | color    line.Item|  Ord.qty   | Pld.Qty     | Date          "
    | 0001000551  | 002V | 100       | 6,800.000 | 1,200.000 | 25.09.2006"
    | 0001000551  | 002V | 100       | 6,800.000 | 2,500.000 | 25.09.2006"
    | 0001000551  | 002V | 100       | 6,800.000 | 3,100.000 | 25.09.2006"
    | 0001000551  | 003K | 200       | 3,200.000 | 700.000    | 25.09.2006"
    | 0001000551  | 003K | 200       | 3,200.000 | 1,200.000 | 25.09.2006"
    | 0001000551  | 003K | 200       | 3,200.000  | 1,300.000 | 25.09.2006"
    and if want to sum the the planed qty based on the line.Item Grouping, meaning, can i get the report in the below form.
    sales ord      | color    line.Item|  Ord.qty   | Pld.Qty     | Date          "
    | 0001000551  | 002V | 100       | 6,800.000 | 6,800.000 | 25.09.2006"
    | 0001000551  | 003K | 200       | 6,800.000 | 3,200.000 | 25.09.2006"
    what should i do to get this form.

Maybe you are looking for

  • Use command line in Communication channel

    Hello together, i want to use the field command line in the communcation channel.  The Opperating system is OS400 R6.1. After selecting data from the db2 we want to call a program on the Operating system. Her are the settings: sql statement :        

  • Internet Explorer 7.0

    cmdL = 'IEXPLORE.EXE ' + %trim(InstallDirectory) + "\WebHelp\BASE.htm#" + HelpFile OSEXEC CmdLine(cmdL) This command worked with ie 6.0 but does not work with ie 7.0 It appears that the "#" symbol useage is not supported. Is there a different symbol

  • ABAP client proxy from WSDL

    I have 2 problems in creating abap client proxies using wsdl 1.when i try to create client proxy by giving RPC style wsdl(generated by SAP itself for a RFC) the system throws an error and not allowing to create the proxy 2.The client proxy which i ha

  • Sub Contracting - CIN

    Hi All, This is regarding scrap in SC Process with CIN. I have created a Sub Contracting PO. BoM has two components and also scrap material is entered with negative quantity. I have transfer posted and created SC Challan. Next, I have done GR wrt PO

  • I have upgraded to elements 13  and unistalled 11 photos corrected in 11 are not compatible to print with 13

    Help please my photos that I had been viewing printing etc are not compatible when I print in elements 13. I have unistalled elements 11 but still hve the same problem