I want total in one line

Hi All,
I am creating one ALV grid report its working fine... output is:
Total value    Cost Element
100              644A65
200              644A65
300              644A65
400              600100
                     1000
I want total as per cost element in one line means 644A65 has 3 value so i want output like this........
Total value    Cost Element
600              644A65
400              600100
can you guide me how can i do?
Thanks
zeni

>  Total value    Cost Element
> 100              644A65
> 200              644A65
> 300              644A65
> 400              600100
>                     -
>                      1000
> Total value    Cost Element
> 600              644A65
> 400              600100
I assume that first  Table is it_data, Change the field order , First Cost Element ,next Total value
final data internal table is it_final .
sort it_data by costelement.
loop at it_data.
at end of costelemt.
   sum.
  append it_data to it_final.
endat.
endloop.

Similar Messages

  • I want to delete one line of text and add new text.  Is that possible?

    I have exported the document and can add information but cannot delete a line of information to put correct information in.  Is it possible and, if so, how can you do it?

    Hi madelyn,
    I'm happy to help, but need al little more information from you. What did you convert from/to? Did you start with a PDF and convert to Word, for example? Or convert a file to PDF? Your answer to that question will help me provide you with the information that you need.
    Best,
    Sara

  • Reading one line from a text file into an array

    i want to read one line from a text file into an array, and then the next line into a different array. both arays are type string...i have this:
    public static void readAndProcessData(FileInputStream stream){
         InputStreamReader iStrReader = new InputStreamReader (stream);
         BufferedReader reader = new BufferedReader (iStrReader);
         String line = "";          
         try{
         int i = 0;
              while (line != null){                 
                   names[i] = reader.readLine();
                   score[i] = reader.readLine();
                   line = reader.readLine();
                   i++;                
              }catch (IOException e){
              System.out.println("Error in file access");
    this section calls it:
    try{                         
         FileInputStream stream = new FileInputStream("ISU.txt");
              HighScore.readAndProcessData(stream);
              stream.close();
              names = HighScore.getNames();
              scores = HighScore.getScores();
         }catch(IOException e){
              System.out.println("Error in accessing file." + e.toString());
    it gives me an array index out of bounds error

    oh wait I see it when I looked at the original quote.
    They array you made called names or the other one is prob too small for the amount of names that you have in the file. Hence as I increases it eventually goes out of bounds of the array so you should probably resize the array if that happens.

  • Display more than one line of text for events?

    I couldn't find this in the forum... I just recently updated to Leopard. Now when I put events in iCal, it only displays one line of text in the month calendar view. I'd really like to see the whole description of the event, even if it's two or three lines. I can't find anything in preferences that addresses this, and various searches are not yielding anything. Help?
    -mel

    Hi there.
    Usually in iCal if you want more than one line of text for timed events, resizing the window will help. Under all-day events, iCal will always show you one line of text, but if there is more space it will show you more text. So, also resizing the window for this will help to see the text.
    Take care.

  • Listbox one line at a time

    I want to add one line at a time in listbox/textbox just like InsertTextboxLine funtion in CVI. I can not find similar VI in labview. I think I can do it long way...by saving listbox to an array then append my line at the end of the array and send updated array to listbox..these are lot of steps to add one line to listbox/textbox...
    Any help would be appreciated.
    Thanks.
    CVI 2010
    LabVIEW 2011 SP1
    Vision Builder AI 2011 SP1

    Actually, the way to append an item to a list box is to create an Item Names property node for the list box.  Then you can use Insert Into Array, and write to another property node for Item Names.
    Message Edited by tbob on 10-03-2005 02:31 PM
    - tbob
    Inventor of the WORM Global
    Attachments:
    ListBox.PNG ‏3 KB

  • Leaving one line space before starting the text in smartforms

    Hi,
    I want to leave one line space before starting a text.
    i LEFT one line space on the text node but it's not working.
    eg: i need to print "Header text". Before printing this i need one line space. Created a blank node for space still not working. Can anyone help me on this.
    Thanks,
    Rose.

    Hi Rose,
                Enter a Line Feed in the Smartform Editor.
    in the editor type as ,
      "Header text"
    where / is Line feed and * is a Default Paragraph Format.
    Regards,
    Balakumar.G.

  • Adding One Line Code in all tables in Designer Trigger.

    I have 300+ tables in my Schema (All tables generated through Designer), I want to add one line of code in the begining of "Before Inset Row Trigger" of all tables, So what is the fastest way of doing that,
    Adding One Line Code in all tables in Designer Trigger.
    I don't want to go and modify each and every table

    You'll have to write a script that reads out the current contents of your triggers, add your line to this contents and dynamically "create or replace" the new trigger text.
    Beware, trigger_body column of user/all/dba_triggers is in a column with datatype LONG, so you'll have to use some sort of conversion.
    Good luck.
    regards,
    Rob.

  • Want to copy Delivery address of one line item in shopping cart to all item

    Hi Experts,
                    We are upgrading from SRM 5.0 to SRM 7.0,In SC Creation We want to copy Delivery address of one line item in shopping cart to all line items in Shopping cart by clicking Change All Items button.This is custom button we added this button and we had written code to achieve the functionality but it is not working.This is same like Change All Items button in Account Assigment for copy accont details of one line item to all other line items in SC.
    Web Dynpro Component:/SAPSRM/WDC_UI_DO_SHIPTO
    Web Dynpro View:V_DODC_SHIPTO
    Thanks,
    Aarthi.

    Hi Prasad,
                   Our customer needs that button,they want whenever they are clicking the button delivery address should copy to all line items.
    In my action ONCHANGE_ALL_ITEMS i called this method
    wd_this->mo_dodm_shipto->zchange_all_items( ).
    zchange_all_items( ) is  implemented in class /SAPSRM/CL_CH_WD_DODM_SHIPTO.
    the code i wrote inside zchange_all_items( )
    *Error
      DATA: LX_PDO_ABORT               TYPE REF TO /SAPSRM/CX_PDO_ABORT,  " Class for Fatal error caught by PDO Layer
            LX_PDO_ERROR               TYPE REF TO /SAPSRM/CX_PDO_ERROR.  " Class for PDO General Exception
    Object Instances
      DATA: LO_MSG_CONSUMER            TYPE REF TO /SAPSRM/IF_PDO_MSG_CONSUMER,
            LO_PDO_SHIPTO              TYPE REF TO /SAPSRM/IF_PDO_DO_PARTNER.
    Context-Data
      DATA: lte_cll_shipto              TYPE /sapsrm/if_ch_wd_set_facade=>gt_guid_element,
            loe_cll_shipto              TYPE REF TO /sapsrm/if_ch_wd_set_element.
    Field Symbols
      FIELD-SYMBOLS <lse_cll_shipto>    LIKE LINE OF lte_cll_shipto.
    DATA : lo_pdo_acc TYPE REF TO /sapsrm/if_pdo_do_acct_assgmnt.
      DATA : ls_shipto_cll type /SAPSRM/S_CLL_SHIPTO,
             lt_pdo_partnerdetails      TYPE bbp_pdt_partner,
             ls_pdo_partnerdetails      TYPE bbp_pds_partner,
              LV_GUID          TYPE BBP_GUID,
              lv_item_guid type bbp_guid,
             lv_filled TYPE wdy_boolean.
    *exceptions
      DATA : LX_ABORT                  TYPE REF TO /SAPSRM/CX_PDO_ABORT.
    *Constants
      CONSTANTS : LC_OBJECT_ID         TYPE CRMT_SUBOBJECT_CATEGORY_DB VALUE 'BUS2121001',
                  LC_ADDR_ORIGIN       TYPE /SAPSRM/S_CLL_SHIPTO-ADDR_ORIGIN VALUE 'B'.
      IF LV_FILLED = ABAP_TRUE.
    Downcasting to shipto
        LO_PDO_SHIPTO ?= MO_PDO.
    insert the clipboard into facade and update and submit update
        me->/sapsrm/if_cll_do_mapper~insert_from_clipboard( io_set_facade = mon_cll_set_facade ).
    Add new Accounting entries.
        lte_cll_shipto = mon_cll_set_facade->get_data_elements( ). "get all elements from the context
        LOOP AT  lte_cll_shipto ASSIGNING <lse_cll_shipto>.
          loe_cll_shipto = <lse_cll_shipto>-set_element.
          loe_cll_shipto->get_static_attributes( IMPORTING rv_attributes = ls_shipto_cll ).
    Map ui-structure to pdo-structure
          MOVE-CORRESPONDING ls_shipto_cll TO ls_pdo_partnerdetails.
          IF LS_SHIPTO_CLL-PARTNER_FCT =  mv_part_func.
            LS_PDO_PARTNERDETAILS-PARTNER_FCT = ''.
          ELSE.
            LS_PDO_PARTNERDETAILS-PARTNER_FCT = LS_SHIPTO_CLL-PARTNER_FCT.
          ENDIF.
          IF ls_pdo_partnerdetails-del_ind NE 'X'.
            CALL FUNCTION 'GUID_CREATE'
              IMPORTING
                ev_guid_16 = ls_pdo_partnerdetails-p_guid.
           mv_acc_guid_split = ls_pdo_shipto-guid .
            IF mo_scope = 1.
              ls_pdo_partnerdetails-p_guid = mon_cll_set_facade->get_bo_guid( ).
            ELSE.
              ls_pdo_partnerdetails-p_guid = mo_parent_bo_mapper->items_get_lead_selection( ).
            ENDIF.
            APPEND ls_pdo_partnerdetails TO lt_pdo_partnerdetails.
          ENDIF.
          CLEAR : ls_pdo_partnerdetails, ls_shipto_cll.
        ENDLOOP.
    Add New items to PDO
        IF NOT lt_pdo_partnerdetails[] IS INITIAL.
          TRY.
              LO_PDO_SHIPTO->update_item_partners( EXPORTING it_partner = lt_pdo_partnerdetails
                                                               iv_item_guid       = lv_item_guid
                                                   CHANGING co_message_handler = mo_pdo_message_consumer ).
            CATCH /sapsrm/cx_pdo_abort INTO lx_pdo_abort.
              mo_cll_message_handler->set_abort( io_pdo_abort_exception = lx_pdo_abort ).
            CATCH /sapsrm/cx_pdo_error INTO lx_pdo_error.
              mo_cll_message_handler->add_exception( io_pdo_error_exception = lx_pdo_error ).
          ENDTRY.
    Update PDO with the changed data.
          TRY.
              mo_pdo->submit_update( ).
            CATCH /sapsrm/cx_pdo_abort INTO lx_pdo_abort.
              mo_cll_message_handler->set_abort( io_pdo_abort_exception = lx_pdo_abort ).
            CATCH /sapsrm/cx_pdo_error INTO lx_pdo_error.
              mo_cll_message_handler->add_exception( io_pdo_error_exception = lx_pdo_error ).
          ENDTRY.
    Fire refresh of DO Mappers registered for refresh since the item table has acc related data.
          mo_parent_bo_mapper->fire_event_refresh( iv_perform_updates = abap_false ).
        ENDIF.
      ENDIF.
    Thanks,
    Aarthi.

  • Scripts : want to display the text in one line

    Dear Friends,
    i want to dispaly the below text in one line,but its displaying in next line.
    ITEM   MATERIAL  DESCRIPTION ORDERQTY  UNIT PricePerUnit NETVALUE
    i am using the following code
    IL           <K>Item,,Material,,Description ,,  Order qty.  ,,Unit   ,,    Price per unit   ,, Net value </>
    Thanks & Regards
    Shaik

    Hello Hussain,
    Remove the TAB Spacing ',,'. Instead u give the Space.
    Reduce the length of fonts.
    These are the ways to display the text in a line.
    If useful reward points.
    Regards,
    Vasanth

  • I want to insert the line under each row except last one

    Hi,
    How to test it is the last row in the Rich:datalist component?
    I want to add the line under each row except the last one.

    <x:someUIDataTag binding="#{someBean.someUIDataProperty}" value="#{someBean.someList}">
        <x:someUIColumnTag>
            <x:someUIOutputTag rendered="#{someBean.someUIDataProperty.rowIndex + 1 != someBean.someListSize}" />
        </x:someUIColumnTag>
    </x:someUIDataTag>

  • TS1702 In programm Front Line Commando,  Do you want to bay one Ladge Crate of gold for 20USD  Buy,  Please contact iTunes support to complate this transaction  ERROR - purchase failed

    Programm Front Line Commando
    Do you want to bay one Ladge Crate of gold for 20USD
    Buy
    Please contact iTunes support to complate this transaction
    ERROR - purchase failed

    You need to contact iTunes Customer Support. There is a "Contact Us" link at the bottom right of every forum page.
    Best of luck.

  • Multiple line item in billing but only one line item in accounting document

    Hi Everyone,
    I am having one scenario in which sales order has more than one line item. Only one billing document is create for all line items in Sales Order but billing document contains as many items as sales order has. In accounting document of billing i find only one customer line which has total amount of all line items in billing as debited. My requirement is Accounting document also should have as many line of customer-debit as in billing items i.e sales order. For example :
    (1) Sales order has 2 line items.
    (2) Billing document is only ONE and has 2 line items
    (3) currently accounting document has only ONE line of Customet - Debit ( Total amount of both items)
    My requirement is
    Accounting document should have 2 line item of customer - Debit
    Customer - Debit (amount of first line item)
    Customer - Debit (amount of Second line item)
    Sales - Credit
    How can it be done ?
    Regards,
    Manish

    Hi,
    This is the SAP expected behaviour
    As far as the values correspond to same account key and same GL account as per account determination, then ti will be posted as a single line item in FI document.
    If you want the customer specific items to be posted in two GL accounts , then you have to do the account determination that way.
    For example, you should have a condition table in FICO as follows.
    Sales org/ Account key / Customer
    For this condition table, the entries shoudl be as follows.
    5110/ERS/Customer A  GL ACCOUNT IS 5000100
    5110/ERS/Customer B GL ACCOUNT IS  5000200
    In this case, there will be 2 entries for the invoice instead of just one line entry.

  • More than one line on bar chart

    I am creating a Line chart from a table.  The table includes a code column, date column, and several statistic columns. The dates are end of month dates only. There are about 10 different codes for each month.  The statisic columns are the totals for the month for each code.
    PeriodEndDate  Code  Statistic1 Statistic2 Statistic3 Statistic4
    XX/XX/XXXX     XX      999        999        999        999
    On my line chart I want to show one or more statistics for one year for a given code. (A line for each statistic)
    On a different report I want to show one or more codes for one year for a given statistic.  (A line for each code)
    The report has parameters for the code and the statistic. I have figured out how to create the chart for one code for one year for a given statistic.  Can any one help me out?
    Thanks,
    Fred

    Hello Fred,
    If you work with a multi-value parameter you could pass in a collection of x of 10 of your codes. I assume you have played with this idea?
    Perhaps you are stuck because there are no design-time options in the chart design wizards to base your line chart off the numerous values that could be passed into a single multi-value "code" parameter?
    If it is a limitation of the chart design options available to you then your only recourse may be to use one of the SDKs to massage data into a datatable which could be pushed to a report on the fly.
    Cheers, Dylan
    <p><strong>Dylan Lopez - </strong>604.628.4467 </p><p>Previously: Microsoft .NET Resource in Developer Support @ Business Objects</p><p>Currently: Principal @ Inno Software Inc / Independent Contractor Group</p>

  • Total no. of lines in JTextPane document and Increment them on "ENTER" key

    hello,
    I wanted to know the total number of lines that a document has. I.e for example when I open a .java into my JTextPane, I wanted to know the total no. of lines the file has and I wanted to increment them when I press the enter key.
    2. Even it is a plain document, i.e just typing in the JTextPane and when I press enter key the number of lines should get incrementing.
    I am using this method , but un successful. Can any one help me?
    public int getLines()
              Document doc = text.getDocument();
              Element map = doc.getDefaultRootElement();
              int n = map.getElementCount();
              Element lastLine = map.getElement(n-1);
              if ((lastLine.getEndOffset() - lastLine.getStartOffset()) > 1)
                   return n;
              return n - 1;
    where text = JTextPane
    Any example source will be helpful.
    Thanks

    Your code looks correct. Here is the program I used to test it. You must be calling the getLines() method BEFORE the document is being updated.
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import javax.swing.event.*;
    import javax.swing.text.*;
    public class TestTextArea extends JFrame
         public TestTextArea()
              JPanel panel = new JPanel();
              setContentPane( panel );
              panel.setLayout( new BorderLayout() );
              final JTextPane textArea = new JTextPane();
              JScrollPane scrollPane = new JScrollPane( textArea );
              panel.add( scrollPane );
              JButton button = new JButton("Display Lines");
              panel.add( button, BorderLayout.SOUTH );
              button.addActionListener( new ActionListener()
                   public void actionPerformed(ActionEvent e)
                        Document doc = textArea.getDocument();
                        Element map = doc.getDefaultRootElement();
                        int n = map.getElementCount();
                        Element line = map.getElement(n-1);
                        if (line.getEndOffset() - line.getStartOffset() == 1)
                             n--;
                        System.out.println( n );
                        textArea.requestFocus();
         public static void main(String[] args)
              TestTextArea frame = new TestTextArea();
              frame.setDefaultCloseOperation( EXIT_ON_CLOSE );
              frame.pack();
              frame.setVisible(true);
    }

  • Report output on one Line, without new line (cariage return)

    Hello I use a user defined report with style plsql. The output is with many dbms_output.put_line and is displays in only one line. May I ask you to get the output on more the one line. For eatch dbms_output I wont to have a new line (cariage return). Many thanks for help in advance

    In the body of the report, I used HTML tags to control the appearance.
    For example, to see what database features you have used in your database today, the following code works well:
    begin
    dbms_output.enable(1000000);
    dbms_output.put_line('<PRE>');
    for rc in ( select output from
       table(dbms_feature_usage_report.display_text)
               ) loop
       dbms_output.put_line(rc.output);
    end loop;
    dbms_output.put_line('</PRE>');
    end; This yields the following output
    DB FEATURE USAGE report for
    DB Name         DB Id     Release    Total Samples Last Sample Time 
    ABCPROD        900004321 10.2.0.1.0             78 09-Oct-09 18:29:17
    DB Feature Usage Summary                       DB/Release: ABCPROD/10.2.0.1.0
    -> This section displays the summary of Usage for Database Features.
    -> The Currently Used column is TRUE if usage was detected for
    -> the feature at the last sample time.
                                              Curr-                                
                                              ently Detected    Total Last Usage   
    Feature Name                              Used    Usages  Samples    Time      
    Automatic SQL Execution Memory            TRUE        78       78 10/09/09 18:29
    Automatic Segment Space Management (syste TRUE        78       78 10/09/09 18:29
    etc.However if you comment the lines with the beginning and terminating tags for preformatted text, then you get output confined to one line that starts out like:
    DB FEATURE USAGE report for DB Name DB Id Release Total Samples Last Sample Time ------------ ----------- and you'll have to scroll to the right or figure how you want to break it up -- That's too much work.
    My configuration:
    Windows XP SP3
    SQL Developer 1.5.5 Build MAIN-5969
    Java(TM) Platform     1.6.0_06

Maybe you are looking for