PO: Rounding of Total Amount

Hi SAP Experts,
We are encountering a problem with regards to the printing of Total Amount PO. In the break down of each item, the amount is correct. But when it comes to the total amount, the value is rounded to the next cent (local currency).
Ex.
Qty    Unit Price    Amount
3     1,249.25 / 1   3,747.75
Total       <b>3,747.76</b>
Can you give us some tips on how to correct this discrepancy?
Hoping for your immediate reponse.
Thanks and regards,
Pat

Please check the data type of amount and total.
I guess you are using PO Form medruck and Print program : SAPFM06P.
If you want to print amount value same as total or vice versa..
you need to copy program to zprogram,check the text element in main window,if you see print program some where they are calling in write-form.
here you need move value to one variable,use that vaibale in your layout.
Thanks
Seshu

Similar Messages

  • 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

  • PO HEADER LEVEL의 TOTAL AMOUNT 계산 LOGIC

    제품 : MFG_PO
    작성날짜 : 2004-10-13
    PO HEADER LEVEL의 TOTAL AMOUNT 계산 LOGIC
    ==========================================
    PURPOSE
    Purchase Order 화면의 Header level에 보여주는 Total Amount 계산 logic을
    알아본다.
    Explanation
    Purchase Order 화면에서 PO를 입력하거나 조회해 본 사람은 PO Header level
    에 보이는 Total amount 값은 어느곳에도 저장되지 않는다는 것을 확인 할
    수 있을 것이다.
    이 header level total amount 계산 logic은 다음과 같다.
    1.Purchase Order 화면에서 price와 quantity가 입력될 때 POXPOPOL.pld에
    있는 maintain_po_total이 불려진다.
    이 maintain_po_total procedure는 line amount를 뿌려주기 위해 line에
    정의된 quantity와 price를 고려한다.
    이 line amount sum 되고, header total에 뿌려준다.
    sum(round((quantity*unit_price),precision))-> Header_total
    2.PO를 query 할 때 header amount를 조회하기 위해 POXCOCOB.pls의
    po_core_s.get_total procedure가 불려진다.
    아래의 query가 PO header level total amount 계산을 하게 된다.
    SELECT sum(round((pll.quantity - nvl(pll.quantity_cancelled,0))*
    nvl(pll.price_override,0),x_precision))
    FROM PO_LINE_LOCATIONS PLL
    WHERE PLL.po_header_id = <<po_header_id>>
    AND PLL.shipment_type in ('STANDARD','PLANNED','BLANKET')
    여기에서 precision은 PO.(PO Currency = Functional Currency)에서 사용
    되는 것으로 fnd_currencies에 정의된 currency이다.
    Example
    Reference Documents
    Note 226697.1

    Thought so.
    And therein lies your problem.
    You should avoid updating Oracle tables directly unless you are 100% sure that no relationships are getting violated.
    Updating po line price should be done via interface. I would suggest that you use the po documents interface to change the po line prices. Then you will see the header totals get updated automatically.
    Hope this answers your question
    Sandeep Gandhi
    Independent Consultant
    513-325-9026

  • Round the TDS amount

    Hi,
    Is it possible to round the TDS amount in AP invoice Screen ?
    I can round the total invoice amount.
    Regards,
    Sanju M S

    Hi Sanju......
    Use the latest version of TDS 5.3. This functionality of rounding TDS is there at the time of transaction.
    Regards,
    Rahul

  • Rounding off -Total Document

    Hi All,
           I just want ask about how to make Rounding off - of the Document total v.i.z A/R Invoice,A/p invoice...........etc.The rounding off should be in the following way.
       If tatal amount is 4500.49 then it should round off to 4500.
       if total amount is 4500.51/50 then it should round off to 449.
                  How it should be done,Reply asap...........
    mona

    Hi Mona,
    The setting of the rounding of the amounts in the documents is carried out in the Administration - Set - Finanacials - Currencies. Inthis window there is a Rounding metthod window which has 5 set up options:
    This column appears only if the selected rounding method is By Currency. Select one of the following options:
    1.No Rounding – Select to avoid any rounding for amounts in this currency.
    2.Round to Five Hundredths – Sample results for this option are as follows: 4.22 becomes 4.20 and 4.24 becomes 4.25.
    3.Round to Ten Hundredths – Sample results for this option are as follows: 4.19 becomes 4.20 and 4.14 becomes 4.10
    4.Round to One – rounds to the nearest integer. For example, 4.23 becomes 4.
    5.Round to Ten – A sample result for this option is as follows: 5.8 becomes 10.
    In think your case Rounding method 4 wiull be applicable.
    Check it out.
    Nagesh

  • Why the doc total amount is not matched with the total item line amount?

    Hi,
    Recently when i try to update something in sales order via my add-on, i got an error said u201CThere is a difference between the document total and its components.  [ORDR.DocTotal][line: 0] Iu201D Then i checked the sales order in SAP B1, I found the document total amount was not matched with the item line total amount. Actually the item line is quite simple, there is only one item line with qty 1. How comes the document total could be different with the amount from item line? I know the document total amount is a read-only field which is calculated automatically by SAP. This is really weird for us, we don't know how this happened.
    Has anyone experienced similar situation like mine and how this happens?
    Thanks,
    Lan

    I am having this same issue and I have additional information.
    I am on ver. 8.8 PL 16.
    Periodically (mulitiple times a week), when a Sales Order is created, the Doc Total amount is -zero- when there are clearly items that have a price associated with them. This causes an error when Adding the document. Sometimes, I can just change the quantity of one of the items, which forces the Doc Total to update.  Most of the time this does not work, though.  I end up having to restart the SAP client and then everything begins to work as it should.
    This behavior is occuring on mulitple machines in our office.
    Earlier in this thread, Rahul mentioned that they currency rounding was turned off and that this could be part of the problem.  In fact, we were having issues with Currency Rounding and did turn it off not long ago.  Rahul, can you explain better what you meant by "give the proper amount so that you can overcome the error..."
    Randy Davis
    Denver, CO
    Edited by: Randy Davis on May 16, 2011 2:01 PM

  • My total amount of DOWNLOADED APPS. do NOT show up on iPhone HOME pages.

    My total amount of DOWNLOADED APPS. do NOT show up on iPhone HOME pages.
    I have the BIG DOG 16 gig iPhone and I am only limitted to 9 pages of APPS.
    For what I PAID for this GREAT Phone, there should be NO LIMIT as to how many APPS. that I can download until and UNLESS my memory is FULL, which it is NOT even half full yet.
    APPLE: Please change this LIMITATION, because there seems to be thousands of APPS. to choose from. Just as you have NO-LIMIT on the number of songs that I can download, I would like it to be the SAME for my APPS.
    Thank you.

    This ***** badly
    http://discussions.apple.com/thread.jspa?threadID=1807300&tstart=0

  • Po list showing the total amount with advances given & open GR quantity

    Hi Gurus,
    My client need to know the list of total p/os showing its gross total amount only (& not with the line items) with the advances rendered to them & its open GR quantity against total qunatity mentioned.
    I hv tried in ME80FN, ME2N, ME2L ME2M..etc and all other reports but the system is showing the same with the line items. Kindly advise.
    Regds
    Prashant Bijutkar

    Prashant,
    All three informations will not be available in one report(gross total amount  not with the line items and the advances rendered to them & its open GR quantity against total qunatity mentioned).
    You have to dovelop this report. please take help from technical consultant.
    One more thing the open GR quantity will always at PO line item level not at header level.
    Regards,
    Manish

  • Purchase Order Total Amount at Header level and Report Execution

    Dear Experts,
    Here by i am facing problem with Purchase Order Total amount.
    I have local Pricing Procedure for price stipulations (like discounts, Freight, packaging). the calculation at item level is correct. tax calculation is done by tax code. The total PO Price is including all items in PO and tax amount. But at header level conditions net value is showing only gross price.
    How to pick up total price including tax amount at header level conditions?
    Please provide me solution on it ?

    Dear Experts,
    Here by i am facing problem with Purchase Order Total amount.
    I have local Pricing Procedure for price stipulations (like discounts, Freight, packaging). the calculation at item level is correct. tax calculation is done by tax code. The total PO Price is including all items in PO and tax amount. But at header level conditions net value is showing only gross price.
    How to pick up total price including tax amount at header level conditions?
    Please provide me solution on it ?
    Edited by: Kiran Mujumdar on Feb 23, 2009 7:08 PM

  • How to print total amount in last page of purchase orde using xml publisher

    Hi
    I customizing purchase order report using xml publisher.
    i have to print total amount at last every purchse order.
    how to compare carry forward amount in xml publisher

    I think the guys overhere :
    BI Publisher
    can help you a lot better

  • Ssrs 2008 r2 display only final total amount

    In an existing ssrs 2008 r2 report, I want the final grand total to appear as the last amount displayed in the SSRS report.
    In the 'main' matrix of the report, I have created an outside group row below the last line of the matrix.
    The expresion for this statement looks the the following:
    ="Grand Total: $"+str(sum(cdec(Fields!TransactionAmount.Value),"datasetname")).
    The total amount is correct, but this total amount line appears after every control break. Basically the amount appears every
    time the control break changes by date, teacher, or student number.
    The extra row I added does contain grouping references to date, teacher, and student number. Thus to solve my problem:
    1. Can you tell me how to remove the grouping references to date, teacher, and student number so that the last row will be the only place the total amount will be displayed?
    2. If the above is not an option, can you tell me how to add an extra row to the 'main' matrix so the report groupings do not appear on the final total line?
    3. If the above 2 choices are not an option, would you tell me how to add the final total line in the final report footer and/or any place you believe the final total amount will appear only one time?

    Hi Wendy,
    According to your description, you want to add a row into your matrix to get the total value of TransactionAmount. This can be final total value which appears only one time in your matrix. Right?
    In this scenario, the reason why the total amount line appears after each break change (data, teacher..) because this total amount line is still within the parent group. I guess you didn't add the outside group row on the top parent group. So we just need
    to right click on the textbox which is top parent group, insert a row outside of group. Then put your expression into the added row. Now the total amount will appear only one time in the matrix. It looks like below:
    Reference:
    Understanding Groups (Report Builder and SSRS)
    If you have any feedback on our support, please click
    here.
    Best Regards,
    Simon Hou 

  • Total Amount value not displaying while executing print progrm for PO form.

    Hi All,
               I created the PO form, for this i written a print program.After executing this print program everything s displaying & populating, but only the Total Amount  not displaying r not populating.
              But, if i run the PO n tcode ME23N the Total Amount is displaying, after assigning the form n NACE.
    So help me to get the Total Amount to be displayed n main window, while executing the print program.
    Like this i declared n smartform,                    Total net value excl. tax           &is_ekko-waers& &is_pekko-netwr&......
    The print program as follows,
    report zpo.
    tables: ekko,pekko,ekpo,ekpa,eket,ekkn,ekek,komk,nast.
    data: fm_name type rs38l_fnam.
    data: is_ekko type standard table of ekko with header line.
    data: is_pekko type pekko occurs 0 with header line.
    data: it_ekpa like standard table of ekpa,
          it_ekpo like standard table of ekpo,
          it_pekpo like standard table of pekpo,
          it_eket like standard table of eket,
          it_tkomv like standard table of komv,
          it_ekkn like standard table of ekkn,
          it_ekek like standard table of ekek,
          it_komk like standard table of komk.
    selection-screen: begin of block b1 with frame title text-001.
      parameters: pr_ebeln like ekpo-ebeln obligatory.
    selection-screen: end of block b1.
    select * from ekpo into table it_ekpo where ebeln = pr_ebeln.
    select * from ekko into is_ekko where ebeln = pr_ebeln.
    endselect.

    code as follows,
    CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
      EXPORTING
        FORMNAME                 = 'ZPURCHASE'
    *   VARIANT                  = ' '
    *   DIRECT_CALL              = ' '
    IMPORTING
        FM_NAME                  = fm_name
    CALL FUNCTION fm_name  "'/1BCDWB/SF00000060'
      EXPORTING
    *   ARCHIVE_INDEX              =
    *   ARCHIVE_INDEX_TAB          =
    *   ARCHIVE_PARAMETERS         =
    *   CONTROL_PARAMETERS         =
    *   MAIL_APPL_OBJ              =
    *   MAIL_RECIPIENT             =
    *   MAIL_SENDER                =
    *   OUTPUT_OPTIONS             =
    *   USER_SETTINGS              = 'X'
        IS_EKKO                    = is_ekko
        IS_PEKKO                   = is_pekko
    *   IS_NAST                    =
    *   IV_FROM_MEM                =
    *   IV_DRUVO                   =
    * IMPORTING
    *   DOCUMENT_OUTPUT_INFO       =
    *   JOB_OUTPUT_INFO            =
    *   JOB_OUTPUT_OPTIONS         =
      TABLES
           it_ekpo                   = it_ekpo
           it_pekpo                  = it_pekpo
           it_ekkn                   = it_ekkn
           it_ekpa                   = it_ekpa
           it_ekek                   = it_ekek
           it_komk                   = it_komk
           it_eket                   = it_eket
           it_tkomv                  = it_tkomv.
    * 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.

  • Discount in pricing for total amount sales order

    Hi developpers,
    You know a standard procedure for calculate, a particular discount for sold to party, with relation to the total amount of sales order.
    Thanks in advance
    Domenico

    Dear Manti,
    -->Create condition table with the field Slod-to-party
    -->Put that field in to access sequence
    -->You define the the discount condition type in the transaction V/06 or you copy standard discount condition type.
    (Based on the % or Value or Fixed)
    -->Assign acces sequence to that condition type.
    -->Put that condition type in your pricing procedure after gross price total.
    -->Calculate that discount condition type from gross value.
    -->Put net value after deduction of the Discount in the pricing procedure.
    -->Maintain the condition record for that discount in the VK11 transactio.
    Now you create sales order discount will come in the sales order.
    I hope it will help you
    Regards,
    Murali.

  • Need help to sum up total amount in at end of.....endat!!! Please help

    Hi,
    There is one program need to calculat the SUB-TOTAL AMOUNT FOR SAME DOCUMENT NUMBER.
    Means: Need to sumup betrg for the same belnr.
    QUESTION:
    How can I write the sorce cord In AT END OF...ENDAT.
    TO SUMUP THE AMOUNT FOR SAME DOCUMENT NUMBER.
    Please help!!
    Thanks.
    Here is the sourc code.
    DATA: BEGIN OF t OCCURS 0,
            bukrs   LIKE knb1-bukrs,
    *<<<<< CR01
            zuonr   Like bsid-zuonr,                        "sort key  "CR01
    *>>>>> CR01
            belnr   LIKE bsid-belnr,
            kunnr   LIKE kna1-kunnr,
            bldat   LIKE bsid-bldat,
            budat   LIKE bsid-budat,
            netdt   LIKE bsega-netdt,
            waers   LIKE bsid-waers,
            wrbtr   LIKE bsid-wrbtr,
            shkzg   LIKE bsid-shkzg,
            xblnr   LIKE bsid-xblnr,                            "WD041005a
            sgtxt   LIKE bsid-sgtxt,
            dmbtr   LIKE bsid-dmbtr,
          END OF t.
    Description of Interface-record RECON
    DATA: BEGIN OF s,
            belnr(10),                     " document number
    *<<<< CR01 STRAT ADD ZUONR
            zuonr(10),                     "sort key  " CR01
    *>>>> CR01 END ADD ZUONR
            filler1(1),
          KUNNR(5),                      " customer no."WD290705a
            kunnr LIKE kna1-kunnr,         " customer no."WD290705a
            filler2(1),
            bldat(10),                     " date
            filler3(1),
            budat(10),
            filler4(1),
            netdt(10),                     " due date for payment
            filler5(1),
            betrg(14),                     " amount
            filler6(1),
            waers(3),                      " currency
            filler7(1),                    " document field - blank
            compcode(4),                   " company-code         "fw070905
            filler8(1),                    " comment - blank
            sgtxt(50),                     " Text             "INS MG020207
            filler9(1),
            kmmnt(30),
            filler10(1),
            vbeln(12) ,
            filler11(1),
            xblnr(16),                     "WD041005a hier Referenznr rein
            filler12(1),
            lifn2(11),
            filler13(1),                   " remark - blank
            dmbtr(14),
            filler14(1),
            twaer(3),
          END OF s.
    DATA: BEGIN OF outtab OCCURS 1000,
                s LIKE s,
          END OF outtab.
    *<<<<< INS MG020207
    TYPES: BEGIN OF ty_outalv,
             belnr(10),                     " document number
    *<<<< CR01 START ADD ZUONR
             zuonr,                         " sort key  " CR01
    *>>>>CR01 END ADD AUONR
             kunnr LIKE kna1-kunnr,         " customer no."WD290705a
             bldat(10),                     " date
             budat(10),                     " posting date
             netdt(10),                     " due date for payment
             betrg(14),                     " amount
             waers(3),                      " currency
             compcode(4),                   " company-code         "fw070905
             sgtxt(30),                     " comment
             kmmnt(30),                     " comment
             vbeln(12),                     " delivery number
             xblnr(16),                     "WD041005a hier Referenznr rein
             lifn2(11),                     " customer number
             dmbtr(14),
             twaer(3),                     " currency company code
           END OF ty_outalv.
    DATA: gt_outalv TYPE STANDARD TABLE OF ty_outalv.
    DATA: gs_outalv TYPE ty_outalv.
    *>>>>> INS MG020207
    DATA: l_date TYPE sy-datum.
    DATA: g_date TYPE sy-datum.
    DATA: g_budat TYPE bsik-budat.
    *<<<< CR01 START   ADD DATA STATEMENT
    DATA: wk_belnr LIKE bsid-zuonr,
          wk_x_belnr LIKE bsid-zuonr,
          ZUONR LIKE BSID-ZUONR,
          WRBTR LIKE BSID-WRBTR,
          WK_ZUONR LIKE BSID-ZUONR,
          WK_WRBTR LIKE BSID-WRBTR.
    *>>>> CR01 END  ADD DATA STATEMENT
    DATA: l_it_bsik TYPE STANDARD TABLE OF bsik.               "INS MG050706
    DATA: l_wa_bsik TYPE bsik.                                 "INS MG050706
    TYPE-POOLS: slis.                                          "INS MG020207
    DATA:                                                      "INS MG020207
    gt_fieldcat TYPE slis_t_fieldcat_alv,                     "INS MG020207
    gs_layout   TYPE slis_layout_alv,                         "INS MG020207
    gs_fieldcat TYPE slis_fieldcat_alv.                       "INS MG020207
    END-OF-SELECTION.
      SORT t.
      LOOP AT t.
        AT NEW bukrs.
          CLEAR anz_dl.
          CLEAR htext-anzahl.
          CLEAR htext-datei.
          htext-text1 = ' records writen in file '.
          CLEAR p_pfad.
          CONCATENATE
              i_pfad
              'CU_CC'
              t-bukrs
              sy-datum+6(2)
              sy-datum+4(2)
              sy-datum(4)
              sy-uzeit
              '.txt'
         INTO p_pfad.
          CLEAR outtab.
          REFRESH outtab.
          REFRESH: gt_outalv.                                  "INS MG020207
        ENDAT.
       IF t-shkzg = 'H'.
         h_betrg  = t-wrbtr * -1.
       ELSE.
        h_betrg  = t-wrbtr.
        h_dmbtr  = t-dmbtr.
       ENDIF.
        s-filler1 = s-filler2 = s-filler3 = s-filler4 = s-filler5 = ';'.
        s-filler6 = s-filler7 = s-filler8 = ';'.
        s-filler9 = s-filler10 = s-filler11 = s-filler12 = s-filler13 = ';'.
        s-filler14 = ';'.
        s-belnr = t-belnr.
        IF t-xblnr NE space.                                    "WD041005a
          s-xblnr      = t-xblnr.                               "WD041005a
        ELSE.                                                   "WD041005a
          s-xblnr      = t-belnr.                               "WD041005a
        ENDIF.                                                  "WD041005a
        WHILE s-xblnr(1) EQ '0'.                            "INS MG130606
          SHIFT s-xblnr LEFT.                               "INS MG130606
        ENDWHILE.                                            "INS MG130606
        WRITE t-kunnr TO s-kunnr NO-ZERO.
        s-lifn2 = s-kunnr.
        shift s-lifn2 RIGHT.
        s-lifn2(1) = 'R'.
      S-KUNNR = T-KUNNR+5(5).
        s-bldat+2(1) = '/'.
        s-bldat+5(1) = '/'.
        s-bldat0(2) = t-bldat4(2).
        s-bldat3(2) = t-bldat6(2).
        s-bldat6(4) = t-bldat0(4).
        s-budat+2(1) = '/'.
        s-budat+5(1) = '/'.
        s-budat0(2) = t-budat4(2).
        s-budat3(2) = t-budat6(2).
        s-budat6(4) = t-budat0(4).
        s-netdt+2(1) = '/'.
        s-netdt+5(1) = '/'.
        s-netdt0(2) = t-netdt4(2).
        s-netdt3(2) = t-netdt6(2).
        s-netdt6(4) = t-netdt0(4).
        s-waers      = t-waers.
        s-dmbtr      = t-dmbtr.
        s-sgtxt      = t-sgtxt.
        CLEAR s-twaer.
        SELECT SINGLE waers INTO s-twaer
                            FROM t001
                            WHERE bukrs = t-bukrs.
        IF h_betrg < 0.
          hs_betrg+0(1) = '-'.
        ELSE.
          hs_betrg+0(1) = ' '.
        ENDIF.
        WRITE h_betrg CURRENCY t-waers TO hs_betrg+1 NO-GROUPING
                                                        NO-SIGN
                                                        LEFT-JUSTIFIED.
        REPLACE ',' WITH '.' INTO hs_betrg.
        WRITE hs_betrg TO s-betrg.
        IF h_dmbtr < 0.
          hs_betrg+0(1) = '-'.
        ELSE.
          hs_betrg+0(1) = ' '.
        ENDIF.
        WRITE h_dmbtr CURRENCY t-waers TO hs_betrg+1 NO-GROUPING
                                                        NO-SIGN
                                                        LEFT-JUSTIFIED.
        REPLACE ',' WITH '.' INTO hs_betrg.
        WRITE hs_betrg TO s-dmbtr.
        s-compcode   = t-bukrs.                                 "fw070905
        IF p_downl = 'X'.
          MOVE s TO outtab-s.
          APPEND outtab.
          ADD 1 TO anz_dl.
        ENDIF.
        gs_outalv-belnr = s-belnr.                             "INS MG020207
    *<<<< CR01 START ADD as_outalv-zuonr
        gs_outalv-zuonr = s-zuonr.                             "CR01
    *>>>> CR01 EDD   ADD as_outalv-zuonr
        gs_outalv-kunnr = s-kunnr.                             "INS MG020207
        gs_outalv-bldat = s-bldat.                             "INS MG020207
        gs_outalv-netdt = s-netdt.                             "INS MG020207
        gs_outalv-betrg = s-betrg.                             "INS MG020207
        gs_outalv-waers = s-waers.                             "INS MG020207
        gs_outalv-compcode = s-compcode.                       "INS MG020207
        gs_outalv-budat = s-budat.                             "INS MG020207
        gs_outalv-sgtxt = s-sgtxt.
        gs_outalv-kmmnt = s-kmmnt.
        gs_outalv-vbeln = s-vbeln.
        gs_outalv-xblnr = s-xblnr.
        gs_outalv-lifn2 = s-lifn2.
        gs_outalv-dmbtr = s-dmbtr.
        gs_outalv-twaer = s-twaer.
        APPEND gs_outalv TO gt_outalv.                         "INS MG020207
        AT END OF bukrs.
          WRITE anz_dl  TO htext-anzahl.
          WRITE p_pfad  TO htext-datei.
          CONDENSE htext.
          IF p_downl = 'X'.
            SKIP 2.
            WRITE: / htext.
            CALL FUNCTION 'GUI_DOWNLOAD'
              EXPORTING
                filename                = p_pfad
                filetype                = 'ASC'
              TABLES
                data_tab                = outtab
              EXCEPTIONS
                file_write_error        = 1
                no_batch                = 2
                gui_refuse_filetransfer = 3
                invalid_type            = 4
                no_authority            = 5
                unknown_error           = 6
                header_not_allowed      = 7
                separator_not_allowed   = 8
                filesize_not_allowed    = 9
                header_too_long         = 10
                dp_error_create         = 11
                dp_error_send           = 12
                dp_error_write          = 13
                unknown_dp_error        = 14
                access_denied           = 15
                dp_out_of_memory        = 16
                disk_full               = 17
                dp_timeout              = 18
                file_not_found          = 19
                dataprovider_exception  = 20
                control_flush_error     = 21
                OTHERS                  = 22.
            IF sy-subrc <> 0.
             write: / 'Error creating File:', P_Pfad, sy-subrc.
              MESSAGE e405 WITH text-002 p_pfad.
            ENDIF.
          ENDIF.
    *<<<<< INS MG020207
          IF p_alvd EQ 'X'.
            PERFORM build_layout_data.
            CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
              EXPORTING
                i_callback_program     = sy-repid
                i_structure_name       = 'GT_OUTALV'
                is_layout              = gs_layout
                it_fieldcat            = gt_fieldcat[]
                i_callback_top_of_page = 'TOP-OF-PAGE'
              TABLES
                t_outtab               = gt_outalv.
          ENDIF.
    *>>>>> INS MG020207
    ENDAT.
      ENDLOOP.

    HI
    Have alook at below program
    *& Report  ZINTERNALTABLE
    REPORT  zinternaltable.
    TYPES:BEGIN OF itab,
          num TYPE i,
          name(10) TYPE c,
          amt type i,
          END OF itab.
    DATA : wa_itab TYPE itab,
           it_itab TYPE STANDARD TABLE OF itab.
    DATA : v_lines TYPE i.
    wa_itab-num = 1.
    wa_itab-name = 'nag'.
    wa_itab-amt = 1000.
    append wa_itab TO it_itab.
    wa_itab-num = 1.
    wa_itab-name = 'nag'.
    wa_itab-amt = 2000.
    append wa_itab TO it_itab.
    wa_itab-num = 1.
    wa_itab-name = 'nag'.
    wa_itab-amt = 1500.
    append wa_itab TO it_itab.
    wa_itab-num = 2.
    wa_itab-name = 'sri'.
    wa_itab-amt = 500.
    append wa_itab tO it_itab.
    wa_itab-num = 2.
    wa_itab-name = 'sri'.
    wa_itab-amt = 600.
    append wa_itab TO it_itab.
    wa_itab-num = 2.
    wa_itab-name = 'sri'.
    wa_itab-amt = 700.
    append wa_itab TO it_itab.
    wa_itab-num = 3.
    wa_itab-name = 'ganesh'.
    wa_itab-amt = 1200.
    append wa_itab TO it_itab.
    wa_itab-num = 3.
    wa_itab-name = 'ganesh'.
    wa_itab-amt = 1300.
    append wa_itab TO it_itab.
    wa_itab-num = 3.
    wa_itab-name = 'ganesh'.
    wa_itab-amt = 1400.
    append wa_itab TO it_itab.
    wa_itab-num = 4.
    wa_itab-name = 'suresh'.
    wa_itab-amt = 900.
    append wa_itab TO it_itab.
    wa_itab-num = 4.
    wa_itab-name = 'suresh'.
    wa_itab-amt = 300.
    append wa_itab TO it_itab.
    sort it_itab.
    LOOP AT it_itab INTO wa_itab.
    at first.
    write :/ 'details of sales order:'.
    uline.
    endat.
    at new num.
    write :/ 'serial num:', wa_itab-num.
    uline.
    endat.
    WRITE :/ wa_itab-num , wa_itab-name , wa_itab-amt.
    at end of num.
    uline.
    sum.
    write :/ 'total amount:',wa_itab-amt.
    uline.
    endat.
    at last.
    sum.
    uline.
    write:/ 'grand total:',wa_itab-amt.
    endat.
    ENDLOOP.
    describe table it_itab lines  v_lines.
    WRITE:/'no of records :', v_lines.
    Regards
    Nagesh.Paruchuri

  • Report to extract the total Amount that we spent for materials

    Hi Guru's,
    I was trying to find a report that gives all the following information by Company Code. Out put should have the following fields:
    1)Vendor Name,
    2) Vendor Number,
    3)Company Code,
    4) Payment Terms Code From Vendor Master,
    5) Payment Terms Description,
    6)Material Number,
    7)Material Description and
    8) Amount Spend for last 12 months
    I would appreciate any inputs on these kind of reports.
    Thanks
    Nath..........

    Sridhar,
    Thanks for your response but I am not getting Material number using report FBL1N and also I in the amount column I was looking for the total amount (total spent during the whole year) by Vendor, Company Code and Material. I am trying to execute this for three different company codes. So, will FBL1N work for us to get these total amounts.
    Thanks
    Nath

Maybe you are looking for

  • The bluetooth in my iphone is not working how can i solve it

    can you please help me to solve the problem of bluetooth in my iphone. thanks

  • Sun One Studio 5 - Oracle Pool trouble

    I've created a connection pool and loaded the oracle 8i drivers. All the drivers are correctly present in the classpath but I still get a server-side error when I execute in the IDE: java.lang.ClassNotFoundException: oracle.jdbc.pool.OracleDataSource

  • Deploying custom page to MDS respository: The root directory does not exist

    Hi, with XMLImport, I have java oracle.jrad.tools.xml.importer.XMLImporter /u01/jdevhomes/sjallerat/jdevhome/myprojects/technip/oracle/apps/xxepc/deploying/webui -jdk13 -mmddir "/u01/jdevhomes/sjallerat/jdevhome/myhtml/OA_HTML/jrad" -username apps -p

  • Asking the TRM for Tasks with external Resources

    Hi everbody, I have a question regarding to TRM. I have set up a TRM with manual Resources. Now I want to add external automatic Resources. If I know it right, I have to program it by myself, but  I don't know exactly how. To add an external Resource

  • How to use @prompt for stored procedure in universe

    Hi, I am using Bo XI R3.1 and universe was built on stored procedures and database is sql server 2005. I would like to show the list of values for prompts in report which they are based on parameters given for stored procedures in universe. Instead o