Calculate the page totals

Hi To All,
    In scripts i need to calculate the page totals.that means for a customer i have lot of invoices for example my line items has been displayed in three pages, then in 1st and 2nd page i need to calculate the page total.and then for 3rd page i need to calculate the total.(but i don't that for a customer how many invoices are there).very urgent........
U can check the standard form : f140_acc_stat_01
correspondence type is:sap06
For the above form i made modifications as well here i need to get the valuse for due now, due later and past due.can any one provide me the logic or field mappings.
<REMOVED BY MODERATOR>
Thanx and regards,
loki
Edited by: Alvaro Tejada Galindo on Feb 19, 2008 11:37 AM

hmmm ok, i dont aks why you need that
ok in your SAP-SCRIPT form there is a text element called "ITEM_LINE".
this is beeing called once for every ITEM you print.
in this text element make a external perform.
like:
/E ITEM_LINE
/:  DEFINE &ITEM_COUNT& = ' '
/:  perform calculate_item_count in program YOUR_PROGRAM
/:  changing &ITEM_COUNT&
/:  endperform
your external perform shoulöd then look like:
form calculate_item_count tables in_tab  STRUCTURE itcsy
                                                 out_tab STRUCTURE itcsy.
  statics:  lv_count       type i.
  lv_count = lv_count +1.
  read table out_tab
  with key name = 'ITEM_COUNT'.
  if sy-subrc = 0.
    out_tab-value = lv_count.
    modify out_tab index sy-tabix.
  endif.
endform.
well the variable ITEM_COUNT you defined in your form is now accesible throughout the whole form, and can be printed, like other variables.
i hope i got you right this time
Edited by: Florian Kemmer on Feb 19, 2008 4:59 PM

Similar Messages

  • How to calculate the Page total in Excel format

    Hai all,
    How can we calculate the page total in Excel format, directly in RTF without using the summary column in the RDF.
    Regards

    <?add-page-total:TotalFieldName;’element’?>
    where
    TotalFieldName is the name you assign to your total (to reference later) and
    ’element’ is the XML element field to be totaled.
    You can add this syntax to as many fields as you want to total.
    Then when you want to display the total field, enter the following syntax:
    <?show-page-total:TotalFieldName;’Oracle-number-format’?>
    Pls refer XML Publisher user guide for more info on this.
    Kiran

  • Can I create order forms that calculate the exact total with taxes?

    Can I create order forms that calculate the exact total with taxes?
    The customer needs to know exactly how much everything will cost before submitting. I can handle the actual payment portion manually.

    thanks for the info;
    I'll inform the admin dude that they need an upgraded acrobat to do forms.

  • How To use the page total value for conditional formatting

    Hi
    I am very new to xml publisher report.. I have calculated the report total like this--
    <?add-page-total:pt;'ENT_AMT'?> now i display it in a table colomn by using the syntax
    <?show-page-total:pt;'#,##0.00'?>
    Now what i want to do is if the value of the page total is greater than 1000 the color of that coloumn in the table will change. But by any means i cannot access the value and do the condition checking..
    Plz help..
    Thanks and Regards
    Joydeep Mitra

    Hi Mitra,
    You can use this if you want to change the color of a cell:
    <?if:total>1000?><xsl:attribute xdofo:ctx="block" name="background-color">red
    </xsl:attribute><?end if?>
    Regards,
    Marius

  • Document Settings - Calculate the row total using the unit price

    Hi All,
    I'm using SAP2007A PL37, the option "Calculate the row total using the unit price" in Document Settings is no longer available.  Is there any updates on this issue?
    Thank you,

    Hi Marlon,
    In 2007A, by default, new database would be created without this
    checkbox activated.
    However, there is a way to bring this checkbox back to the configuration
    screen, even if it is a DB newly created in 2007A. In order to do so it
    is necessary to do as follows:
    1) Open B1 2007A
    2) Go to Help -> Support Desk -> Activation Request
    3) Copy the ASCII string that appears in the top textbox ("Customer
    Request Code").
    4) Open a Support ticket stating that you want the "Calculate Row Total
    by Unit Price" checkbox activated for the specified system (Copy the
    string in the step 2) into a text file and attach it to the message).
    5) VERY IMPORTANT: State in the message also the Business Impact leading to this request. In your case you should just say that your AddOn needs this option changed in order to work correctly.
    6) You will receive a reply from B1 Support with a number to be entered
    in the "SAP Support Code" textbox in Help -> Support Desk -> Activation
    Request
    7) Click on OK and the checkbox will be displayed thereafter.
    Hope this can be helpful.
    Best Regards
    Helen Sun

  • The page total amount is not correct on discoverer plus 10.1.1.48.18

    on my discoverer report, there is sunnary field based on a column.
    for example, I have a salesrep expense discoverer report.
    the salesrep name is the page item, each page has one salesrep, under the page item there are many line which show the expense detail amount, there is a column called expense, under the expense column there is a total amount summary field to sum the expense for this salesrep.
    Sometimes, the total amount is not the sum of the expense column, sometimes the total amount show negative zero as: -0.00. What I thought this maybe a number round issue.
    Does anybody has similar issue? how to fix this ?
    Thanks

    I actually used toad to run the query and exported to EXCEL then sum it in excel, I got the correct total amount.
    the following is the SQL query, we use the total feature to sum the commission:
    select
    pt.payee_salesrep_id,
    sr.name||','||sr.attribute9 salesrep_name,
    sr.attribute15 employee_number,
    pt.payrun_id,
    pr.name payrun_name,
    decode(pt.incentive_type_code,'COMMISSION',2,'PMTPLN',4,'PMTPLN_REC',1,'MANUAL_PAY_ADJ',2) Sort,
    decode(pt.incentive_type_code, 'PMTPLN','To be Applied in Future','PMTPLN_REC','Previous Payments Affecting Commissions',q.description) Variable,
    sum(decode(pt.incentive_type_code,
    'COMMISSION',decode(q.attribute3,'ARR 12-36',apps.sg_oic_reports.get_multiple(q.name,to_number(ch.attribute16)),1) sign(pt.payment_amount) abs(pt.input_achieved) ,
    pt.payment_amount)
    ) Revenue,
    sum(pt.payment_amount) commission
    from apps.cn_payment_transactions pt,
    apps.cn_commission_headers ch,
    apps.jtf_rs_salesreps sr,
    apps.cn_quotas q,
    apps.cn_payruns pr
    WHERE pt.quota_id = q.quota_id
    and ch.commission_header_id(+) = pt.commission_header_id
    and pt.payee_salesrep_id = sr.salesrep_id
    and pt.payrun_id = pr.payrun_id
    and hold_flag <> 'Y'
    and pr.accounting_period_id>2005012
    and pt.payment_amount<>0
    group by
    pt.payee_salesrep_id,
    sr.name||','||sr.attribute9,
    sr.attribute15,
    pt.payrun_id,
    pr.name,
    pt.incentive_type_code,
    decode(pt.incentive_type_code,'COMMISSION',2,'PMTPLN',4,'PMTPLN_REC',1,'MANUAL_PAY_ADJ',2) ,
    decode(pt.incentive_type_code, 'PMTPLN','To be Applied in Future','PMTPLN_REC','Previous Payments Affecting Commissions',q.description)
    having sum(pt.payment_amount) <>0

  • Unable to calculate the Sub totals

    Hi,
    Currently we are in BI7. I had created a query based on aging buckets. it has all the calculations in the columns section. I have to calculate the sub totoals based on a particular info object Customer. For that I made the Result rows of the reamining info objects in the query to Always supress and for the info object Customer (based on which I have to show subtotals) I made it as Always Display.
    When I execute the query, I get 0 in the subtotals. Can any one let me know how do I get the sub totals correctly instead of 0's.
    Thanks in Advance

    Hi Kartikey,
    Thanks for the  response. I am not calculating the subtotals at the in the query definition and the sub totals are based on the info object 0customer's setting in the query designer to suppress the result rows. In RSRT also I am unable to get the sub totals.
    If I remove the calculations (aging buckets) and display direct key figure in the columns, I am able to get the sub totals.
    Is there any specific reason why the sub totals can not be calculated if the columns are calculated key figures/new formula.
    Can any one let me know how to fix the sub totals.
    Thanks

  • How to calculate the Grand total

    Hi all,
    I have a table that has three column as Instrument_Name, Instrument_Currency , Value.
    I am using the "table view" to show the data on dashboard.The table shows instrument name , its currency and a value(in that currency).
    Could it be possible that while displaying the grand total of "Value", i should convert the value in a single base currency as USD.
    Thanks

    Hi,
    Well you can and should create a total on the calculation of the Margin%
    But you have to define the calculation correctly, for example if you will use in the calculation the fields without aggregation
    you will get wrong output but if you'll define the calculation as something like:
    CASE WHEN ( SUM(Revenue)+SUM(Cost)) = 0 THEN 0 ELSE SUM(Margin)/( SUM(Revenue)+SUM(Cost)) END
    and then create a total with SUM Aggregation I think you'll get what you asked for

  • How do u calculate the thd ( total harmonic distortion) and the power factor using 5922

    are they basic labview vi that does this? is any one willing to share idea with me ...

    Double post.
    Please refer to this thread:
    http://forums.ni.com/ni/board/message?board.id=170&message.id=203504

  • How to show a Page Total in a Main Report that is calculated in a SubReport

    Hi,
    I have a Main Report and a SubReport with the detail.
    The Report has several pages. I want to show a Page Total in each Page, retrieving data that is in the subreport (Detail).
    I tried to use a shared variable, but the problem is that the formula fields are assigned at the end of the subreport, so I can't pass the value back (to the main report) until the last record of the subreport is printed.
    I also can't show the Page Total at the subreport, because I have a particular format that I need to respect and only can be printed from the Main Report.
    Is any way to do this ? At this moment, with the shared variables I'm getting 0 until the last record is printed.
    Also, I can calculate the Page Total from outside Crystal Reports, do to there some fields that can grow, so I can't figure out how many record are going to be printed.
    Thanks in advance!
    Ariel

    hello, this may depend on how the main report was actually paging...
    1) do you have one group per page for example?
    2) is the sub on a group footer level?
    3) does the subreport use a different data set than the main report?
    some suggested workarounds would be to
    a) use a report header cross-tab (identical to the existing crosstab) that creates an array of values that you can access anywhere on the main report
    b) place an identical cross-tab above the existing one, and suppress all of the subreport sections (not the section where the subreport sits) and then bring the value back to the main report
    cheers,
    jamie

  • Hi guru's in SMART FORMS how i  can get subtotals , and page totals

    hi guru's in SMART FORMS how i  can get subtotals , and page totals plz help me

    Hi
    check this
    Subtotals - Check the link...
    <b>Re: Subtotal with Table Node in smartforms can use the PROGRAM LINES node to calculate the page totals in Table node.
    Table Node has three sections:
    Header: (Triggered once in the beginning of a page)
    Create a Program lines node to reset the value of TOTAL to 0.
    Main Area (For each row of internal table)
    Create a Program lines node to add the Value to TOTAL
    Footer (Triggered once in the End of a page)
    Display the TOTAL
    Note: 1) You can declare the TOTAL variable in the GLOBAL Definitions under GLOBAL DATA.
    2) In the PROGRAM lines always pass the TOTAL in both INPUT and OUTPUT parameters
    Regards
    Anji

  • Page totals not printing on any pages except the last

    How do you get page totals to display one each page and "float" with the output? I created a summary object for the column with reset at page and put it in a frame that is displayed on all pages. There is, of course, a repeating group above it. But the repeating group clobbers the page totals on all except the last page. Shouldn't there be an implicit anchor that prevents this? that's what the Oracle documentation says anyway. This is probably real simple, but I find nothing in any documentation, white papers, or anything.
    Will somebody please, please help me?

    Hi,
    Step 1: Select the parent frame of the summary column.
    Step 2: Open properties of that frame
    Step 3: Set the property "Print Object On" to "All Pages" value.
    (Default value for this property is "Last Page"
    Regards,
    Sailaja

  • Displaying page total on a page with fixed number of lines

    Hi ,
    My requirement is to have a fixed number of rows per page (say 20) and to have a page total beneath the table containing the data.I am using a RTF template.The columns in the table are
    Order
    Amount
    Page Total : 3000
    For including a page-break after 20 lines, i have added the following code.
    For - each ______________
    <?if:position() mod 20 =0?> <xsl:attribute name="break-before">page</xsl:attribute> <?end if?>
    end - for_______________
    This limits the no of rows per page to 20.
    I have tried 2 ways to display the page total but both don't seem to work Can someone please point what i am missing here?
    1) Using add and show-page-total
    I added the code (<?add-page-total:at;'Amount'?> to the Amount data column in the template and then used the <?show-page-total:at?> in the page total data column to display the total. But this doesnt work.It doesnt display any value.
    2) Using Variables:
    I declared a variable (<?xdoxslt:set_variable($_XDOCTX, 'RTotalVar', 0)?>) before the table. Then, i used the (<?xdoxslt:set_variable($_XDOCTX, 'RTotalVar', xdoxslt:get_variable($_XDOCTX,'RTotalVar') +Amount)?>) in the Amount data column to calculate the sum. I then used <?if:position() mod 20 =0?> <?xdoxslt:get_variable($_XDOCTX, 'RTotalVar')?><?end if?> in the data column of the page total. But this doesnt work.  The variable loses its value when it is displayed outside the table. Why is it so? How can i declare a global variable? I am not sure why the variable loses it value when taken out of the table. I would want it hold the value through out the document. Is my understanding correct?
    Kindly help me with this issue.
    Thanks,
    Vidhya

    Hi
    I have the same issue. could anyone provide the link or template. I searched in the forums but couldnt find related to this post.
    please help
    Thanks

  • Page Total in a variable

    Hi
    How to compare Page Total value to another value like Total Amount in the RTF
    I can display the Page total but cannot compare it to other.
    <?:if show-page-total:PAmt = Total_Amount ?>
    <?end if?>
    Thanks

    Hi,
    See http://download.oracle.com/docs/cd/E12096_01/books/PubUser/T421739T481157.htm#4535379
    Regards,
    Colectionaru

  • Page total in adobe forms

    Hi Experts,
    I want to do page total on a particular field in adobe forms . I am getting grand total but cann't get the page total.
    Is their some java script or adobe script is required for it . If yes then provide me the solution for it.  Its very urgent. Point is garanted for the solution.
    Thanks in advance.
    Regards,
    Anomitro

    Hi,
    I want to do the summation of a particular field separetely for every  page as we do in the smartforms Ihave to do it in adobe forms. I donn't want total number of page . I want sub total of  a field on every page.
    Thanks in advance.
    Regards,
    Anomitro
    Edited by: Anomitro Guha on May 28, 2008 8:44 PM
    Edited by: Anomitro Guha on May 29, 2008 11:56 AM

Maybe you are looking for

  • How I can Fixed Length of Formula Column

    Dear All I have create a formula column in ORACLE REPORT 6i it consist on 15 length but problem is that formula column return output in this form 123354,000,00 But I want my formula Column return output just like this 123354,000,00 Column values fixe

  • Mscs- sapservice failed/offline

    Hi people, Im able to install Enqueue Replication server and as soon of it the sapservice failed sap<sid>00 failed sap<sid>00 service offline but sap<sid>01 service and instace are visible and online.. when i try to bring them online it is not happen

  • Finding the extraction program.

    Hi everybody, We have the standard datasources(2lis_04_p_matnr & 2lis_04_pematnr)for standard orders& repititive orders. But these two data source is getting data from same tables(AFKO,AFPO). Why don't use one data source for this one,why we are usin

  • RAM NOT GIVING PERFORMANCE BOOST?

    I had 1gb of Ram in my Pc, and it was slow. I bought 2x 1gb ram and now have 2gb ram, and it is slower than before, why is this? is the Ram faulty? maybe too much use from used product?

  • I had to restore my iPad software. Now my that it's reloaded it's asking for a password to restore from my last sync date??????

    My iPad said it needed to be wiped & updated.... I did that.... Now it's asking me for a password so it my restore my iPad from it's last syne date.... Can't get any of my passwords I wuse to work??? ALL have failed! What can I do to find this passwo