Adding numbers in report

hi guru,
i developed a report.
IF S_BGPRO = 'X'.
    SELECT  AUFNR   GMNGA  FROM
    AFRU INTO CORRESPONDING FIELDS OF TABLE IT_AFRU12 WHERE WERKS = 'PD01'
                                                    AND BUDAT  IN S_BUDAT.
    IF NOT IT_AFRU12[]  IS  INITIAL.
      SELECT AUFNR KTEXT PLNBEZ INTO  CORRESPONDING FIELDS OF
       TABLE IT_CAUFV1 FROM CAUFV
       FOR ALL ENTRIES IN IT_AFRU12
        WHERE AUFNR  = IT_AFRU12-AUFNR.
      IF SY-SUBRC <> 0.
        MESSAGE E000(ZPP) WITH 'VALUE NOT EXISTING '.
      ENDIF.
    ENDIF.
  ENDIF.
  LOOP AT IT_AFRU12 INTO WA_AFRU12.
    LOOP AT IT_CAUFV1 INTO WA_CAUFV1 WHERE AUFNR = WA_AFRU12-AUFNR.
      WA_AFRU12-KTEXT = WA_CAUFV1-KTEXT.
      WA_AFRU12-PLNBEZ = WA_CAUFV1-PLNBEZ.
      MODIFY IT_AFRU12 FROM WA_AFRU12.
    ENDLOOP.
  ENDLOOP.
IN THE ABOVE COADING :
  GMNGA value is in numbers . i want to add all the no.s and
displayed to last in my alv report.how to do this..
please help me.
thanks

Hi,
Use COLLECT statement.
loop at itab1.
gs_itab2-fld1 = itab1-fld1.
gs_itab2-fld2 = itab1-fld2.
gs_itab2-fld3 = itab1-fld3.
collect gs_itab2 into gt_itab2.
endloop.
Regards,
Narendra.
Reward points if helpful!!

Similar Messages

  • Adding a Crystal Report (report or layout) in a specific menu location

    Hi,
    i want to import a CR Report through SDK.
    I found an example in the sdk help center. You can find it searching 'Adding a Crystal Report (report or layout)'.
    It works but going in the Report and layout manager i find it under 'Lost Reports'.
    i cannot find a way to specify the MENU LOCATION just like the Import Wizard allows.
    Can anyone help me?
    Thanks
    Paolo

    hi how you solve this??

  • Printing page numbers in report

    hi,
    I want to print the page numbers in report in a format
    of PAGE 1 OF 10
       PAGE 2 OF 10....
    can anybody help me in this
    thanks in advance.
    neha.

    Hi Neha,
      Similar question was posted earlier by someone..
    It will help you.
           line-size 80
           line-count 65(1)
           no standard page heading.
    data: imara type table of mara with header line.
    selection-screen begin of block b1 with frame title text-001 .
    parameters: p_check type c.
    selection-screen end of block b1.
    start-of-selection.
      perform get_data.
      perform write_report.
    end-of-page.
      perform end_of_page.
    FORM GET_DATA
    form get_data.
      select * into corresponding fields of table imara
            from mara up to 315 rows.
    endform.
    FORM WRITE_REPORT
    form write_report.
      data: xpage(4) type c.
      data: lines_left type i.
      loop at imara.
        write:/ imara-matnr.
        at last.
          if sy-linno < 64.
            lines_left = ( sy-linct - sy-linno ) - 1.
              skip lines_left.
              sy-pagno = sy-pagno - 1.
          elseif sy-linno = 64.
          skip 1.
           sy-pagno = sy-pagno - 1.
          endif.
        endat.
      endloop.
      write sy-pagno to xpage left-justified.
      do sy-pagno times.
        read line 65 of page sy-index.
        replace '****' with xpage into sy-lisel.
        modify current line.
      enddo.
    endform.
    Form  end_of_page
    form end_of_page.
      write:/32 'Test Program',
            at 62 'Page:', at 67 sy-pagno, 'of', '****'.
    endform.
    Regards,
    Sailaja.

  • CreateTempFile(String prefix, String sufix) is adding numbers to the prefix

    Hi folks,
    When I call createTempFile("filename", ".dat") it is adding numbers to the prefix. In my temporal directory I get a file called "filename34486.dat" instead a file called "filename.dat"! Do you know why ?
    Thanks in advance.

    bifiado wrote:
    Hi folks,
    When I call createTempFile("filename", ".dat") it is adding numbers to the prefix. In my temporal directory I get a file called "filename34486.dat" instead a file called "filename.dat"! Do you know why ?
    Thanks in advance.If you wanted a file named explicitly "filename.dat", then don't use createTempFile - that's for creating, well, temporary files with a (hopefully) unique name so as to not collide with other processes who might also be trying to create temporary files of the same name pattern.

  • Bizarre error adding Numbers in Flex 4

    I'm having a bizarre error adding numbers in Flex 4.  In all cases, I'm getting the correct result, but sometimes I'm getting extra precision with a 5 at the end.
    For example,
    If I try to add 5 and 1.56, I get 6.5600000000000005
    a lot of numbers add correctly, it's just certain combinations that have the problem.
    Here is a small app that demonstrates the issue:
    <?xml version="1.0" encoding="utf-8"?>
    <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
                      xmlns:s="library://ns.adobe.com/flex/spark"
                      xmlns:mx="library://ns.adobe.com/flex/mx" minWidth="955" minHeight="600">
         <s:layout>
              <s:VerticalLayout/>
         </s:layout>
         <fx:Script>
              <![CDATA[
                   protected function button1_clickHandler(event:MouseEvent):void
                        var num1:Number = Number(number1.text);
                        var num2:Number = Number(number2.text);
                        var result:Number = num1 + num2;
    //                    result = 1.56 + 5;
    //                    result = Number(1.56) + Number(5);
                        resultLabel.text = String(result);
              ]]>
         </fx:Script>
         <s:TextInput id="number1"/>
         <s:TextInput id="number2"/>
         <s:Button label="Add Values" click="button1_clickHandler(event)"/>
         <s:Label id="resultLabel"/>
    </s:Application>
    Any assistance would be appreciated!
    Thanks!
    Jon Keener
    [email protected]

    This question comes up all the time. It's a Fact Of life of modern microprocessors and computer languages, which implement floating-point arithmetic using binary fractions (1/2, 1/4, 1/8, etc.), not decimal fractions (1/10, 1/100, 1/1000, etc.), according to the IEEE-754 spec. Many decimal fractions, such as 1.56, cannot be exactly represented as a finite binary fraction. (Or the exact representation in binary might be finite but require more fractional digits that the spec allows.) Although your source program says "1.56", it gets compiled and executed as the IEEE-754 binary-fraction that is closest to 1.56, but it isn't exactly equal to 1.56, and then this slight error gets propogated through calculations, and the conversion back to decimal is again inexact.
    Generally, people just use methods like toPrecision() to round things off a bit and hide this problem. Or they go write or find a (much slower) ActionScript library that does true decimal floating-point arithmetic by storing decimal fractions rather than binary fractions.
    Gordon Smith
    Adobe Flex SDK Team

  • Sum as NaN when adding numbers

    Hi All,
    I am getting the total as NaN when I am summing up the totals.
    e.g : I have 4 number 1) 4567,9
    2) 300
    3) 100
    4) 100
    when I am performing sum(4567,9+300+100+100) I am getting the output as NaN.
    The reason is XML doesn't treat "," seperated value(4567,9) as number.
    Now my problem is How to remove the formatting for a number.
    I am not formatting the numbers neither in rtf file nor in RDF report.
    Numbers are getting formatted based the responsibility from which I am running.
    For example when I am running the report for Sweden I am getting formatted value as 4567,9 which is creating the problem.
    Here is the sample XML file
    <G_DISTR>
    <CUST_NBR>A002933</CUST_NBR>
    <CUST_NAME>LINGMERTHS RESEBYRÿ AB</CUST_NAME>
    <PER01>0</PER01>
    <PER02>0</PER02>
    <PER03>0</PER03>
    <PER04>0</PER04>
    <PER05>0</PER05>
    <PER06>0</PER06>
    <PER07>0</PER07>
    <PER08>0</PER08>
    <PER09>0</PER09>
    <PER010>0</PER010>
    <PER011>-90194,5</PER011>
    <PER012>0</PER012>
    <TOTAL>-90194,5</TOTAL>
    </G_DISTR>
    Any Help would be greatly appreciated.
    Thank and Regards,
    Naveen.

    From Metalink document,
    Symptoms
    BI Publisher (formerly known XML Publisher) is showing page total as NaN (Not-a-Number) even though there is no NULL value in the elements used for calculating the total.
    Cause
    Numeric data in XML file is in format "nnn,nn".
    To do arithmetic operations, XPath requires data in canonical format, that is, "nnn.nn". The result of adding 2 or more strings ("nnn,nn") can't be a number and thus it is marked as NaN (Not-a-number).
    One of the possible reasons why the data was not in canonical format is that the number was written formatted as string and not as a number. This is what should be checked.
    Solution
    Change the report generating the XML sample data to generate the numeric data in canonical format
    "nnn.nn".
    For example, for an XML element PRICE_ELEMENT, it should be changed from:
    <PRICE_ELEMENT>20,52</PRICE_ELEMENT>
    to:
    <PRICE_ELEMENT>20.52</PRICE_ELEMENT>

  • Adding field in Report Painter

    Hello Gurus,
    I am working in the Report Painter PR20-001.
    My requirement is to add a new column in the output of the report but even when i am able to add a new field and save it on the reports execution i am unable to view the added field in the output.
    Kindly tell me the entire procedure to add a new field in the output of the respective report painter output.
    Regards,
    Swati.

    Hi,
    Go to Global Parameters Definitaion in report painter, variable will be used only along with the field, just in global paramerters enter your desired field and click in next column, system will show you a pop up select your variable for that field...
    now its just done run the report and test it!
    If you still not make it refer to standard report of such kind, you will surely get it....
    Regards,
    Sayujya

  • Can't see new added columns in Report 6i

    Hi everyone,
    I have added new columns to my report, but when I print the report, those new columns are not printed in the paper.
    Can anyone please help me to solve this issue?

    How can I do that, so I can add more space on the right?
    Ok, now I'm on my Layout: Main Section and I have 2 options:
    1) Section:
    Width: 10
    Height: 11
    Horizontal Panels per page: 1
    Vertical Panels per Page: 1
    Orientation: Landscape
    2) Character Mode
    Report Width: 80
    Report Height: 66

  • How to create dynamic numbering in report?

    Hi all,
    Can we generate a dynamic numbering of records that appear on
    report depending how many record queried? For example if the
    query return 5 records than we will add the number from 1 to 5
    at the beginning of the record. If 8 records returned then it
    will be 1 to 8.
    like
    1. <record1>
    2. <record2>
    3. ....
    I think this feature is (should) existed in report. Any help is
    greatly appreciated.

    Hi,
    you can have the Summary column in that group . Give the function
    as count and source as the Primary key of that table.
    Draw the layout . It will work..
    Hope this Helps :-)))

  • How to display page numbers in report

    hi all,
    i would like to know how to display page numbers in this format " 1 of 5" in the report.
    Any help would be much appreciated.
    thanks
    seema

    Hi,
    Check this too...
    Page No. in ALV output
    If you query is solved, kindly close the thread.
    Regards,
    Anjali
    Message was edited by: Anjali Devi Vishwanathan

  • How to get Total of Manually added row in Report

    Hi everyone,
    I have a Input Schedule where user can add a row to the existing oneu2019s.  The account member ID which is added to the existing entry manually should be able to display total of the account memberu2019s Rate X Quantity in the report.  I have put Y in the Insert Member of EvDRE expansion on Account dimension and datasource dimension. User chooses the account and manual from datasource. The problem that I face in the report is u2013 datasourcetotal which is the hierarchy in datasource dimension is doing total (datasourcetotal) after every Upload and Manual entry. The reason why I chose datasource to do this task is that there is comment addition in every account row and comment for the manual entry need not be overwritten for the same account, so manual entry will segregate the comment in report display for the same account.
    In my datasource dimension it is like this u2013
    ID  | Hierarchy
    Manual | Datasourcetotal
    Upload | Datasourcetotal
    Datasourcetotal
    Before Range and After Range with SUM and SUB functions I believe cannot work in my situation as user can add rows anywhere in the EvDRE layout.
    Is there anyway that I can restrict Upload to display total in the report, whereas only total from Manual is displayed.
    Also if there is any other way to display dynamic row total in the reports aside from what I have tried above that will be wonderful , my mental faculties are not giving me any creative help, also I have looked around on SDN for anyone else facing the issue u2013 none found.
    Any pointers will be highly appreciated.
    Regards,
    Ben Ramos

    Hi,
    Evsub() function along with After Key range should help you adding the data from manually inserted data and displaying in your report.
    Please check my info on steps for how to implement evsub funtion in a report.
    BPC REPORTING
    In addition to what i have mentioned there for your case include Y for insert member in the member expansion range for Accout Dimension.
    Hope this helps,
    Regards,
    G.Vijaya Kumar

  • Error in adding KE30-PA report created to new user.

    Please help me with my problem. I have created a report for KE30-profitability analysis report which I will add to a new user name in sap. I have created the role which is zabc then I added the profitability analysis report which I created. A YXxxxxxxxx report was created.
    Since I have added the report in the role I check in the username assigned if this can be access. When I run the report it says that the report does not exist. What could be the problem here? Did I miss something in adding the report in the role?
    Please help.

    You may create a new transaction code via SE93 and assign the COPA report to that t-code. In order to identify the program, you may go to KE30 and execute the report you want to run. At the next screen, go via menu, System>Status. Under the SAP data, Repository data, you can locate the program that runs the COPA report. It may look like GP4740U7CQJQKA2Y9LWOTG0MK9Z.
    This is the report you need to assign in SE93 and select program and selection screen option.
    Once created, you can attach this t-code to a specifically created role and assign to the user. You may need developer's and basis assistance to get this done.

  • Adding Hyperlinks in Report shuould take action in PDF Output

    Hi All,
    I had a requirement with reports
    Explanation of the requirement.
    I had a report aaa.rdf which gives a (one)employee monthly details.
    which need to be output in PDF.
    now the requuirement is
    I had added labels "next-month" and "previous-month" labels at either side of report title.
    I need the code to kept in these labels such that when this report is executed and taken into PDF file, when user
    user clicks on the "next-month" or "previous-month" in that PDF file, the action to take is it should re-ran the same report(aaa.rdf) and should display the output in PDF in the same window but now the output should show the
    coressponding next-month or previous-month results respectively of that employee.
    please let me know if this make sense.
    please guide for the above requirement.
    this is very very urgent your help will be appreciated.
    Thanks in advance
    RRM

    Hi,
    it is not too late ....
    It's possible to add such Hyperlinks to the pdf-Output of a report.
    With use of the built-in rw.set_hyperlink('hyperlink') in a format trigge you can realize that. "hyperlink" is for example then something like:
    '/reports/rwservlet?destype=cache&desformat=pdf&report=drilldetail.jsp&userid=scott/tiger@josi&p_deptno='||:deptno
    In your case it's a call to the same report you run before and you had to set your month-parameter in the call depending your current month (next or previous).
    With srw.set_hyperlink_attrs('string') it's possible to add additional attributes like for example
         srw.set_hyperlink_attrs('target=_new')
    which opens a new browser window.
    This works for HTML & PDF.
    Regards
    Rainer

  • S_ALR_87012357 (RFUMSV00): Adding field  to report

    Hi
    How can i add field Name1 on the output list Layout on the report. At the moment only Name2,Name3 and Name4 are on the layout selection.
    How can i configure it to add the Vendor description(Name1)?
    Transaction code : S_ALR_87012357 - Advance Return for Tax on Sales/Purchases

    hi Giovanni Baumann  .,
             will u please tell me how u added NAME1 field to on the output list Layout on the report . please guide me on this.
    Regards.,
    S.Sivakumar

  • Issues once subreport is added to main report.

    Another question from a new Crystal Reports Developer. I have been battling this one for multiple days. I have built two seperate reports through Crystal Reports that pull their data through an ODBC connection from Remedy ITSM. One report is pulling data through the table AST_AssetPeople. It is pulling the following fields: Asset_ID and Full_Name. The other report is pulling data from the AST_ComputerSystem table showing the following: Name, Category, Type, Item, Model_Number, Serial_Number. I am using the AssetPeople report as the main and the ComputerSystem report as the subreport. When I pull the ComputerSystems report into the AssetPeople report as a subreport, my CR lags very badly. I let CR attempt to pull the data for about 2 hours before I left work the other day and ended up having to leave it overnight. When I came back to work the following day it had finally completed and I was able to view all pages of data. This is with the subreport being added to the details section of my main report. I had sent it to someone else at work that has Crystal Reports on their PC and they were able to run it just fine and it only took a few minutes to get all pages of the data back and viewable. That lead me to think that it was my PC, but when I went over to the other persons PC and logged in with my profile, I had the same problem that I had on my PC. This leads me to believe that it is an issue with the settings. The other person is out for the next week so I cannot verify that my settings match his, so I was wondering if anyone on here might have an idea what may be causing the issues that I am having. Both reports run just fine on their own, as do all my other reports that are simple reports from one table. It is just when I try to pull in a subreport that I have this issue. Any help would be greatly appreciated.

    I have gone in and checked the box next to Perform Grouping on Server. The check box next to Use Index or Servers for Speed was already checked. The Links for the subreport are set up as follows.
    For subreport: Supported vs. Unsupported (This one comes from the ComputerSystem table)
    Container Report fields to link to: AST_AssetPeople.Asset_ID
    AS_AssetPeople.Asset_ID field link-
    Subreport parameter field to use: ?Pm-AST_AssetPeople.Asset_ID_
    Select data in subreport based on field: AST_ComputerSystem.Asset_ID_
    Asset ID is the only field that I found that the two tables have in common. I believe that I have the links set up correctly, but I could be wrong.
    Either way, I am still having the same problems.

Maybe you are looking for

  • Many to many relationships (Again)

    Hello, There was a posting on above subject. Re: Many to many relationships between Fact and Dimension They asked to look chapter 3 in the user's guide... <http://download.oracle.com/docs/pdf/B10996_01.pdf>. chapter 3 talks about defining Oracle Data

  • In need of a soundcard - windows xp x64 and 4gb

    Hello everybody! I?got?a?new?5. surround?system?and?an?Audigy?2?ZS?last week... I was wondering why the sound of the rear speakers was coming out of the front ones. Well after some hours i found out that there exists a bug if you have 4gb?of?ram?or?m

  • Transporting a SAP Query from DEV to PRD

    Hi, We created a Query Report using SQ03, SQ02 and SQ01 for Travel Report in DEV and is working fine. Now, we want to move this query to PRD. For this, we tried create a Transport using SQ02>Environment>Transports and finally a transport request was

  • Problem with EL

    Hi friends!!!!!! I have a problem: When I try to put an EL in a JSP page outside of a JSTL tag, The application print (I am use Resin application server): ${sessionScope.myAttribute} and don't evaluate them. Thanks and greetings from Venezuela!!!.

  • WCS failed to retrieve metadata error

    Hi there, we're getting the below mentioned error in our WCS console. Does anyone know what to do? Failed to retrieve metadata :[FaultEvent fault=[RPC Fault faultString="HTTP request error" faultCode="Server.Error.Request" faultDetail="Error: [IOErro