Adding an extra field in customer statement report

Dear all,
We are on SAP B1 2007 PL42. How can we add an extra field eg a UDF on a customer statement in PLD? The system's customer statement have all fields as "free Text".
Kind Regards,
Asif

Hi,
I have created a free text field in PLD- named Field_101. I have also created a database field from the OINV table and referenced to the UDF "U_FileNo" named Field_102.  On field_101 I have linked to Field_102 but on previewing the report the field is empty/blank.
Thanks
Asif

Similar Messages

  • Column Headings in the report and adding an extra field to the report

    Hi All.
    I had an issue like i need to put column headings for a report and I want to add an extra field to the report.
    The problem here is that the report was actually cloned from a Query.At the time of cloning,they forgot to add the column headings.
    Now we need to add the column headings for the same.How can we proceed for this and where we need to add our code?
    How to add an extra field  to the existing report?
    Any pointers will be very much helpful.
    Regards,
    SSR.

    Hi,
    you can get this done in 2 ways:
    1 - Change the query to add another column and the re-generate the report
    2 - If changing query is not possible, you can change the report it self for adding extra field. If you look at the code, it will be more like normal ABAP code. you can easily modify it (If you are ABAPer) for your additional requirements.
    thnx,
    ags.
    Edited by: Agasti Kale on Jun 12, 2008 6:26 PM

  • Creation of extra field in customer master.

    Hi All,
    I have a requirement where i need to create one extra field.
    We intend to capture taluka for each distributor. This will give us micro level detail. We can start analyzing sale at taluka level.Therefore we believe this additional field will be important.
    Kindly provide your valuable solutions to achieve this.Thanks in advance.
    Thanks,
    Pavan.

    Hi Pavan,
    Rather adding an Extra Field(if your requirement "Taluka" is only for information or statical purpose) you can go with charecterstics and classification.
    In my Client Business, the requirement was to add the " Sales Group's" mobile number and Email id in customer master, so that they can a have report where they easily findout the phone number and mail id for the each sales group. so i have acheived this through Charecterstics.
    Screenshot for your Reference:
    This would be also an option.
    Regards
    Kamal

  • AR Customer statements report Page numbers Reset based on customer number

    Hello,
    In the AR Customer statements report, If I ran the report for multiple customers, page number has to be reset for each customer...
    Group Started like below,
    <?for-each-group:G_STATEMENT;STATEMENT_DATE?><?for-each-group:current-group();SEND_TO_ADDRESS_ID?>

    Hi Kittu,
    I got the answer using @section command.
    Below are the complete syntax in my case.
    Form field         --Xml Tag
    If Data Found --<?choose@section:?><?when:count(G_SETUP)!=0?>
    Group G_SETUP  --<?for-each@section:G_SETUP?>
    Group G_STATEMENT --<?for-each-group@section:G_STATEMENT;STATEMENT_DATE?><?for-each-group@section:current-group();SEND_TO_ADDRESS_ID?>
    Its working for me.
    Let me know if you required more information.
    Regards,
    Dasarath

  • Calculate the day from posting day in Customer Statement Report PLD

    Hi All,
    I do try to copy the PLD of Customer Statement Report to make modify. I try to calculate the how many day from the posting date until today. What is the formula and operation for this calculation?
    Also I found out that the posting on PLD is free text. How to get a real value from PLD? Any idea on this?

    Greetings,
    You can use a formula field to calculate the date diffrence between the posting date and the system / server date. But because the date value shows up with the DB specified type, you can 'chop up' the date into something more manageable, something along the lines of:
    Field_XXX - (CONVERT(CHAR(8),GETDATE(),10))
    where Field_XXX is your posting date field
    * in my hurry to post i realised this was for the Query Manager, let me dig through my implementation folder for the right formula*
    I dont quite understand your last line though:
    "Also I found out that the posting on PLD is free text. How to get a real value from PLD? Any idea on this?"
    Edited by: Davinder Singh on Mar 27, 2008 3:46 PM

  • Customer statement report 2007 A PL37

    Good day
    I need to do a layout on PLD on the customer statement report for a client, but they do not want a full record of debits and credits to show on this statement. They only want the open and unreconciled transactions to show. How do I achieve this in the PLD?
    Regards

    Izak,
    Please see this link with respect to reporting questions ...
    All about Printing & Reporting using ALD, PLD, XLR and Crystal Reports
    Eddy

  • Customer Statement Report without BP Ref No.

    Hi,
    we are using SAP B1 2005 B PL35 with MSSQL 2005.
    If you :
    - run the Sales AR/Sales Reports/Customer Receivables Ageing
    - choose to run the report by Journal Postings
    - run the standard SBO report Customer Statement Report (one page per
    customer/Collection report
    The Cust ref No. (BP ref No) is not displayed.
    It seems that the BP Ref No is displayed only if the "Sales Documents" tab is selected according to the note 885071.
    Does anyone has a workaround to display this information in the report ?
    The reason is, all our customers need this information in order to match their orders with the invoices.
    Thank you
    Best regards
    Cyril

    Hi Cyril,
    Try to export the report to MS-Word and then
    take print preview/print using my previous reply.
    It showing Customer Reference Number.
    I tested it.
    Hope above answer solves problem.
    Jeyakanthan

  • Customer Statement Report

    Hi All,
    When running customer statement report in AR its not displaying any data.Instead of that showing blank output. As per the report parameters it must be shown output datas.
    If anyone give a solution to view output data in Customer Statement report then it will be more useful.
    Version & Files Used:
    Apps R12.1.1
    Report Type = XML
    RTF Name = ARICUSTMT_DTL_en_US.rtf
    Data Template Name = ARSTMTRPT.xml

    Hi pradeep,
    Below are the same code which i am getting for customer statement report.
    First LIST_G_STATEMENT is for GBP currency statement details
    and second LIST_G_STATEMENT is for USD currency statement details.
    How do we achive this to display each currecy statement in separate page.
    please help on this..i have nt come accross this kind of issue.
    1.) <LIST_G_STATEMENT>
    <G_STATEMENT>
              <CUSTOMER_ID>1057</CUSTOMER_ID>
    <SITE_USE_ID>1067</SITE_USE_ID>
              <STATEMENT_TYPE>BILL_TO</STATEMENT_TYPE>
              <TOTAL_AMOUNT_DUE>300</TOTAL_AMOUNT_DUE>
    <CURRENCY_CODE>GBP</CURRENCY_CODE>
    <LIST_G_AMOUNT_DUE>
    <G_AMOUNT_DUE>
              <SORT_TRX_DATE>25-SEP-07</SORT_TRX_DATE>
    <SORT_INVOICE_NUMBER>2030</SORT_INVOICE_NUMBER>
    <TRX_SEQUENCE>2024</TRX_SEQUENCE>
    <LIST_G_LINE_CLUSTER>
         <G_LINE_CLUSTER>
         <INVOICE_NUMBER>2030</INVOICE_NUMBER>
    <TRX_DATE>25-SEP-07</TRX_DATE>
    <TRANSACTION>Invoice</TRANSACTION>
    <DUE_DATE>30-NOV-07</DUE_DATE>
    <AMOUNT_DUE>300</AMOUNT_DUE>
    <TRX_AMOUNT>300</TRX_AMOUNT>
    </G_LINE_CLUSTER>
    </LIST_G_LINE_CLUSTER>
    </G_AMOUNT_DUE>
    </LIST_G_AMOUNT_DUE>
    </G_STATEMENT>
    2.) <LIST_G_STATEMENT>
    <G_STATEMENT>
              <CUSTOMER_ID>1057</CUSTOMER_ID>
    <SITE_USE_ID>1067</SITE_USE_ID>
              <STATEMENT_TYPE>BILL_TO</STATEMENT_TYPE>
              <TOTAL_AMOUNT_DUE>300</TOTAL_AMOUNT_DUE>
    <CURRENCY_CODE>GBP</CURRENCY_CODE>
    <LIST_G_AMOUNT_DUE>
    <G_AMOUNT_DUE>
              <SORT_TRX_DATE>25-SEP-07</SORT_TRX_DATE>
    <SORT_INVOICE_NUMBER>2030</SORT_INVOICE_NUMBER>
    <TRX_SEQUENCE>2024</TRX_SEQUENCE>
    <LIST_G_LINE_CLUSTER>
         <G_LINE_CLUSTER>
         <INVOICE_NUMBER>2030</INVOICE_NUMBER>
    <TRX_DATE>25-SEP-07</TRX_DATE>
    <TRANSACTION>Invoice</TRANSACTION>
    <DUE_DATE>30-NOV-07</DUE_DATE>
    <AMOUNT_DUE>300</AMOUNT_DUE>
    <TRX_AMOUNT>300</TRX_AMOUNT>
    </G_LINE_CLUSTER>
    </LIST_G_LINE_CLUSTER>
    </G_AMOUNT_DUE>
    </LIST_G_AMOUNT_DUE>
    </G_STATEMENT>
    with regards
    Ram

  • Customer Statement Report- Issue

    Hi guys,
    I am working on customer statement report in xmlp.
    client requirement is to view the data as "SEPERATE SHEET SHALL BE PRINTED FOR EACH INVOICING CURRENCY.
    I have G_Statement for header and G_statement_lines for main body lines.
    For different currency like USD, GBP, I am able to get separate tags for G_statement and G_statement_lines based on the currency.
    How do we acheive this in RTF template to display the datas based on each invoice currency?..
    For e.g If USD currency, I need to display the datas in separate sheet.
    If GBP currency, I need to display the datas in separate sheet.
    welcoming your advice.
    with regards
    Ram

    Hi pradeep,
    Below are the same code which i am getting for customer statement report.
    First LIST_G_STATEMENT is for GBP currency statement details
    and second LIST_G_STATEMENT is for USD currency statement details.
    How do we achive this to display each currecy statement in separate page.
    please help on this..i have nt come accross this kind of issue.
    1.) <LIST_G_STATEMENT>
    <G_STATEMENT>
              <CUSTOMER_ID>1057</CUSTOMER_ID>
    <SITE_USE_ID>1067</SITE_USE_ID>
              <STATEMENT_TYPE>BILL_TO</STATEMENT_TYPE>
              <TOTAL_AMOUNT_DUE>300</TOTAL_AMOUNT_DUE>
    <CURRENCY_CODE>GBP</CURRENCY_CODE>
    <LIST_G_AMOUNT_DUE>
    <G_AMOUNT_DUE>
              <SORT_TRX_DATE>25-SEP-07</SORT_TRX_DATE>
    <SORT_INVOICE_NUMBER>2030</SORT_INVOICE_NUMBER>
    <TRX_SEQUENCE>2024</TRX_SEQUENCE>
    <LIST_G_LINE_CLUSTER>
         <G_LINE_CLUSTER>
         <INVOICE_NUMBER>2030</INVOICE_NUMBER>
    <TRX_DATE>25-SEP-07</TRX_DATE>
    <TRANSACTION>Invoice</TRANSACTION>
    <DUE_DATE>30-NOV-07</DUE_DATE>
    <AMOUNT_DUE>300</AMOUNT_DUE>
    <TRX_AMOUNT>300</TRX_AMOUNT>
    </G_LINE_CLUSTER>
    </LIST_G_LINE_CLUSTER>
    </G_AMOUNT_DUE>
    </LIST_G_AMOUNT_DUE>
    </G_STATEMENT>
    2.) <LIST_G_STATEMENT>
    <G_STATEMENT>
              <CUSTOMER_ID>1057</CUSTOMER_ID>
    <SITE_USE_ID>1067</SITE_USE_ID>
              <STATEMENT_TYPE>BILL_TO</STATEMENT_TYPE>
              <TOTAL_AMOUNT_DUE>300</TOTAL_AMOUNT_DUE>
    <CURRENCY_CODE>GBP</CURRENCY_CODE>
    <LIST_G_AMOUNT_DUE>
    <G_AMOUNT_DUE>
              <SORT_TRX_DATE>25-SEP-07</SORT_TRX_DATE>
    <SORT_INVOICE_NUMBER>2030</SORT_INVOICE_NUMBER>
    <TRX_SEQUENCE>2024</TRX_SEQUENCE>
    <LIST_G_LINE_CLUSTER>
         <G_LINE_CLUSTER>
         <INVOICE_NUMBER>2030</INVOICE_NUMBER>
    <TRX_DATE>25-SEP-07</TRX_DATE>
    <TRANSACTION>Invoice</TRANSACTION>
    <DUE_DATE>30-NOV-07</DUE_DATE>
    <AMOUNT_DUE>300</AMOUNT_DUE>
    <TRX_AMOUNT>300</TRX_AMOUNT>
    </G_LINE_CLUSTER>
    </LIST_G_LINE_CLUSTER>
    </G_AMOUNT_DUE>
    </LIST_G_AMOUNT_DUE>
    </G_STATEMENT>
    with regards
    Ram

  • How to add more fields to Customer sales report

    I want to add some fields to customer sales report generating through S_ALR_87012186 like,Invoice number,Invoice date,Tax registration number,tax amount,before tax amount..etc.
    Please let us know the best possible method to add these details.

    It is not suggested to alter a standard SAP report. Still if the requirement persists, then copy the standard program into a zprogram and add required fields.

  • Receivables Customer Statement report

    Hi Friends,
    I am an Oracle finance functional consultant. I got into an issue in regards to Receivables Customer Statement report in Oracle Receivables, when i run this report for one customer, i can see the ON ACCOUNT receipt amount as one of the lines in the report. But, for another customer, when i run this report, i can see the ON ACCOUNT receipt amount included in the total amount, but not one of the lines. Can someone please help me knowing the reason behind?
    Thanks in advance..
    Regards,
    Venkat

    Hi;
    I suggest close your issue here as answered than move your issue Oracle Discussion Forums » E-Business Suite » Financials which you can get more quick response
    Regard
    Helios

  • Location of Customer Statement Report

    Hi all,
    I am wanting to customize the Customer Statement Report - when printed it appears to be a Crystal Report, but in the list of reports in the Report and Layout Manager there appears to be no reference to it under Customer Receivables Ageing or the A/R Invoice report sections (and they are all PLD reports).  Could someone please point me in the right direction?
    Thanks in advance,
    Nick
    B1  8.8

    hi nreese,
    when you customize  the Customer Statement Report. you can refer Customer Receivables Aging standard report.
    - you can select AR invoice (status Open) : Doctotal - PaidtoDate
    - AR credit (status open)
    - Incoming payment
    - Outgoing payment
    _ Journal Entry
    then compare with Customer Receivables Aging.
    thanks
    H2

  • Customer Statement Report converted from PLD to CR - extra datasource issue

    Hi All,
    We've come across an issue where we have used the Crystal Converter to convert a PLD layout of the Customer Statement (Collection) Report to a CR layout (done via CR 2008 using the 8.8 standard integration).
    The layout converted fine and we've got most standard fields working and showing the correct values etc. However we had a requirement to also bring in the Original Document Amount into the layout (which is not a standard PLD field unfortunately!) and we had to do it via an extra datasource based on a pretty straightforward view we created in that company database - which contained columns CardCode, DocName (which was the transaction type + number e.g. IN 12345) and of course, DocTotal.
    We then added the datasource (via ADO connection) and linked the DocName to the Reference field that is already present in the standard layout and contains the same data as our cutom DocTotal - and remarkably, this actually produced the correct results - i.e. we managed to get the Original Document Amount to appear in the lines of the statement together with the open invoice balance, reference, posting date, due date etc - however this seems to affect the other areas of the layout - and we lose the header and footer information completely; whilst retaining only the lines level information.
    We've tried a few things such as linking the CardCode to a header field as well but it doesn't seem to bring the rest of the layout back. So in a nutshell, as soon as we bring that extra field in from the added datasource, we get the correct original document amount appearing in the lines but that's all we see in a print preview - the line level data of the statement. The header and footer information disappears.
    And here is the big question - any thoughts on this and has anybody experienced a similar problem in an integrated CR? We think it may possibly be due to the extra datasource - perhaps the 8.8 - CR integration doesn't know how to handle the additional datasource AND it's own standard datasource (which is referencing the PLD fields) properly yet?
    Thoughts please because I'm sure this will turn into a common issue sometime soon.
    Edited by: Mohsen Qureshi on Jul 2, 2010 11:04 AM

    Hi Mohsen,
    Perhaps you are able to help me.
    I have successfully converted the SAP system 'Customer Collection Report (One Page per Customer)' PLD into Crystal using the Crystal converter. I now run my customer ageing report in SAP, however, when i print preview the Crystal layout, the "detail" section of the report repeatedly displays the "text" label of each field. I'm assuming this is because the system PLD for the collection report, does not use database fields for the detail/repetetive area - instead it uses text fields to pull through fields such as document no etc etc.
    I would have throught that a crystal conversion from an untouched system layout would have worked, but it hasn't.
    My question - Did you have to perform any additional work to the crystal report after the conversion?
    Any suggestions or tips on how to get the system  would be greatly appreciated.
    Thanks in advance,
    George Kantzavelos

  • Adding a new Field to an existing report

    Hi all,
    Can anybody tell me, how to add an extra field in existing
    report, without changing the basic calulation, which i made
    in the same report.
    Regards
    Hema

    okay... that is not a standard program.
    sombody developed it.following is my existing code, here in last column i want to add BOM(mast-stlnr) and Component(stpo-idnrk). remaining things are okay.
    REPORT ZPOTREND NO STANDARD PAGE HEADING
                      LINE-SIZE 195
                      LINE-COUNT 60(3)
                      MESSAGE-ID Z1.
    TABLES: EKBE,
            MARA,
            TCURR.
    SELECT-OPTIONS: S_GJAHR FOR EKBE-GJAHR,
                    S_BUDAT FOR EKBE-BUDAT DEFAULT SY-DATUM NO-EXTENSION,
                    S_MATNR FOR EKBE-MATNR,
                    S_WERKS FOR EKBE-WERKS DEFAULT 'CE',
                    S_MTART FOR MARA-MTART.
    PARAMETERS: X_APP_L TYPE P DECIMALS 2 NO-DISPLAY,
                X_APP_H TYPE P DECIMALS 2 NO-DISPLAY,
                X_DTL   AS CHECKBOX.
    DATA: BEGIN OF I_EKBE OCCURS 0,
          BUDAT LIKE EKBE-BUDAT,
          MENGE LIKE EKBE-MENGE,
          DMBTR LIKE EKBE-DMBTR,
          SHKZG LIKE EKBE-SHKZG,
          EBELN LIKE EKBE-EBELN,
          MATNR LIKE EKBE-MATNR,
          WERKS LIKE EKBE-WERKS,
          MTART LIKE MARA-MTART,
          MEINS LIKE MARA-MEINS,
    END OF I_EKBE.
    DATA: P_EBELN LIKE EKBE-EBELN,
          P_MATNR LIKE EKBE-MATNR,
          P_WERKS LIKE EKBE-WERKS,
          P_MTART LIKE MARA-MTART,
          P_MEINS LIKE MARA-MEINS.
    DATA: BEGIN OF YMTH OCCURS 10,
          YYMM(6),
          MTH(3),
          COL TYPE I,
          MENGE LIKE EKBE-MENGE,
          DMBTR LIKE EKBE-DMBTR,
    END OF YMTH.
    DATA: S_YMTH LIKE YMTH OCCURS 10 WITH HEADER LINE.
    DATA: W_YMTH LIKE YMTH OCCURS 10 WITH HEADER LINE.
    DATA: G_YMTH LIKE YMTH OCCURS 10 WITH HEADER LINE.
    DATA: S_FLAG.                                               "MTART FLAG
    DATA: BEGIN OF CDATE,
          YYMM(6),
          DD(2) VALUE '01',
    END OF CDATE.
    DATA: SDATE LIKE SY-DATUM.
    DATA: CMTH(6),
          PMTH(6),
          LMTH1(6),
          LMTH2(6),
          MTH(2).
    DATA: W_MENGE LIKE EKBE-MENGE,
          W_DMBTR LIKE EKBE-DMBTR,
          W_MENGE1 LIKE EKBE-MENGE,
          W_DMBTR1 LIKE EKBE-DMBTR,
          W_TOTAL TYPE P DECIMALS 2,
          W_COL TYPE I,
          WTEXT(18),
          APP TYPE P DECIMALS 4,
          APP1 TYPE P DECIMALS 4,
          APP2 TYPE P DECIMALS 4.
    PERFORM GET_YMTH.
    SELECT P~BUDAT P~MENGE P~DMBTR P~SHKZG P~EBELN P~MATNR P~WERKS
           Q~MTART Q~MEINS
           INTO TABLE I_EKBE
             FROM EKBE AS P INNER JOIN MARA AS Q
           ON P~MATNR = Q~MATNR
           WHERE P~GJAHR IN S_GJAHR
             AND P~BUDAT IN S_BUDAT
             AND P~MATNR IN S_MATNR
             AND P~WERKS IN S_WERKS
             AND P~BEWTP = 'E'
             AND Q~MTART IN S_MTART.
    FORMAT INTENSIFIED OFF.
    IF X_DTL <> 'X'.
       LOOP AT I_EKBE.
          I_EKBE-EBELN = SPACE.
          MODIFY I_EKBE.
       ENDLOOP.
    ENDIF.
    SORT I_EKBE BY WERKS MTART MATNR EBELN BUDAT.
    LOOP AT I_EKBE.
      CMTH = I_EKBE-BUDAT(6).
      IF P_WERKS IS INITIAL.
        P_WERKS = I_EKBE-WERKS.
        P_MTART = I_EKBE-MTART.
        P_MATNR = I_EKBE-MATNR.
        P_EBELN = I_EKBE-EBELN.
        P_MEINS = I_EKBE-MEINS.
        PMTH = CMTH.
      ENDIF.
      IF P_WERKS NE I_EKBE-WERKS.
        PERFORM CHG_MTH.
        PERFORM CHG_MATNR.
        PERFORM CHG_MTART.
        PERFORM CHG_WERKS.
      ENDIF.
      IF P_MTART NE I_EKBE-MTART.
        PERFORM CHG_MTH.
        PERFORM CHG_MATNR.
        PERFORM CHG_MTART.
      ENDIF.
      IF P_MATNR NE I_EKBE-MATNR.
        PERFORM CHG_MTH.
        PERFORM CHG_MATNR.
      ENDIF.
      IF P_EBELN NE I_EKBE-EBELN.
        PERFORM CHG_MTH.
        PERFORM CHG_MATNR.
      ENDIF.
      IF PMTH NE CMTH.
        PERFORM CHG_MTH.
      ENDIF.
      IF I_EKBE-SHKZG = 'H'.
        I_EKBE-MENGE = I_EKBE-MENGE * -1.
        I_EKBE-DMBTR = I_EKBE-DMBTR * -1.
      ENDIF.
      IF I_EKBE-DMBTR NE 0.
        W_MENGE = W_MENGE + I_EKBE-MENGE.
        W_DMBTR = W_DMBTR + I_EKBE-DMBTR.
      ENDIF.
    ENDLOOP.
    PERFORM CHG_MTH.
    PERFORM CHG_MATNR.
    PERFORM CHG_MTART.
    PERFORM CHG_WERKS.
    TOP-OF-PAGE.
      WRITE:/ SY-DATUM,SY-UZEIT,
              77 'A M T E K   E N G I N E E R I N G   L T D',
              180 'Page', (4) SY-PAGNO.
      WRITE: / SY-REPID,
              77 '     Purchase Price Trending Report      ',
              180 SY-UNAME.
      write: /78 'From Date', S_BUDAT-LOW, 'To Date', S_BUDAT-HIGH.
      SKIP.
      WRITE: / 'SBU :', I_EKBE-WERKS,
               '     Material Type :', I_EKBE-MTART.
      SKIP.
      READ TABLE YMTH WITH KEY YYMM = '999901'.
      IF SY-SUBRC EQ 0.
        WRITE AT YMTH-COL ' APP Change'.
      ENDIF.
      WRITE: /01 'Part No',
              19 'PO No',
              31 'Curr'.
      LOOP AT YMTH.
        YMTH-COL = YMTH-COL + 3.
        IF YMTH-YYMM NE '999901'.
          WRITE AT YMTH-COL YMTH-YYMM(4).
          WRITE YMTH-MTH.
        ELSE.
          WRITE AT YMTH-COL '       %'.
        ENDIF.
      ENDLOOP.
      ULINE.
    *&      Form  get_ymth
          text
    -->  p1        text
    <--  p2        text
    FORM GET_YMTH.
      CMTH = S_BUDAT-HIGH(6).
      PMTH = S_BUDAT-LOW(6).
      IF S_BUDAT-HIGH IS INITIAL.
        CMTH = PMTH.
      ELSEIF S_BUDAT-LOW IS INITIAL.
        PMTH = CMTH.
      ENDIF.
      LMTH1 = CMTH.
      CDATE-YYMM = CMTH.
      SDATE = CDATE.
      SDATE = SDATE - 1.
      LMTH2 = SDATE(6).
      WHILE PMTH <= CMTH.
        MTH = CMTH+4(2).
        CDATE-YYMM = CMTH.
        YMTH-YYMM = CMTH.
        PERFORM GET_MTH.
        APPEND YMTH.
        SDATE = CDATE.
        SDATE = SDATE - 1.
        CMTH = sdate(6).
      ENDWHILE.
      YMTH-YYMM = '999901'.
      YMTH-MTH = ' % '.
      APPEND YMTH.
      SORT YMTH BY YYMM.
      W_COL = 21.
      LOOP AT YMTH.
        W_COL = W_COL + 15.
        YMTH-COL = W_COL.
        MODIFY YMTH.
      ENDLOOP.
      APPEND LINES OF YMTH TO S_YMTH.
      APPEND LINES OF YMTH TO W_YMTH.
      APPEND LINES OF YMTH TO G_YMTH.
      REFRESH YMTH.
      APPEND LINES OF S_YMTH TO YMTH.
    ENDFORM.                                                    " get_ymth
    *&      Form  get_mth
          text
    -->  p1        text
    <--  p2        text
    FORM GET_MTH.
      CASE MTH.
        WHEN '01'.
          YMTH-MTH = 'Jan'.
        WHEN '02'.
          YMTH-MTH = 'Feb'.
        WHEN '03'.
          YMTH-MTH = 'Mar'.
        WHEN '04'.
          YMTH-MTH = 'Apr'.
        WHEN '05'.
          YMTH-MTH = 'May'.
        WHEN '06'.
          YMTH-MTH = 'Jun'.
        WHEN '07'.
          YMTH-MTH = 'Jul'.
        WHEN '08'.
          YMTH-MTH = 'Aug'.
        WHEN '09'.
          YMTH-MTH = 'Sep'.
        WHEN '10'.
          YMTH-MTH = 'Oct'.
        WHEN '11'.
          YMTH-MTH = 'Nov'.
        WHEN '12'.
          YMTH-MTH = 'Dec'.
      ENDCASE.
    ENDFORM.                                                    " get_mth
    *&      Form  chg_matnr
          text
    -->  p1        text
    <--  p2        text
    FORM CHG_MATNR.
      CLEAR W_TOTAL.
      LOOP AT YMTH.
        W_TOTAL = W_TOTAL + YMTH-DMBTR.
      ENDLOOP.
      IF W_TOTAL = 0.
        EXIT.
      ENDIF.
      CLEAR: W_DMBTR, W_MENGE, W_DMBTR1, W_MENGE1, APP, APP1, APP2.
      READ TABLE YMTH WITH KEY YYMM = LMTH2.
      IF SY-SUBRC EQ 0 AND
         YMTH-MENGE NE 0.
        W_DMBTR = YMTH-DMBTR.
        W_MENGE = YMTH-MENGE.
        READ TABLE YMTH WITH KEY YYMM = LMTH1.
        IF SY-SUBRC EQ 0.
          APP = W_DMBTR / W_MENGE.
          APP1 = YMTH-DMBTR / YMTH-MENGE.
          APP2 = ( APP1 - APP ) / APP * 100.
        ENDIF.
      ENDIF.
      IF X_APP_L IS INITIAL AND
         X_APP_H IS INITIAL.
      ELSE.
        IF APP2 < X_APP_L OR
           APP2 > X_APP_H.
          EXIT.
          CLEAR: W_DMBTR, W_MENGE, APP.
          P_MATNR = I_EKBE-MATNR.
          P_EBELN = I_EKBE-EBELN.
          PERFORM CLR_YMTH.
        ENDIF.
      ENDIF.
      SKIP.
    WRITE:/ P_MATNR, ' Amount  ',
             'USD'.
    LOOP AT YMTH.
       WRITE AT YMTH-COL(12) YMTH-DMBTR NO-ZERO.
    ENDLOOP.
    WRITE:/(18) ' ', ' Quantity',
            P_MEINS.
    LOOP AT YMTH.
       WRITE AT YMTH-COL(12) YMTH-MENGE NO-ZERO.
    ENDLOOP.
      WRITE:/ P_MATNR(18), P_EBELN, 'USD' UNDER 'Curr'.
      LOOP AT YMTH.
        IF YMTH-YYMM NE '999901'.
          CLEAR APP.
          IF Ymth-menge ne 0.
            APP = YMTH-DMBTR / YMTH-MENGE.
          ENDIF.
          WRITE AT YMTH-COL(12) APP.
          READ TABLE S_YMTH WITH KEY YYMM = YMTH-YYMM.
          IF SY-SUBRC EQ 0.
            S_YMTH-MENGE = S_YMTH-MENGE + YMTH-MENGE.
            S_YMTH-DMBTR = S_YMTH-DMBTR + YMTH-DMBTR.
            MODIFY S_YMTH INDEX SY-TABIX.
          ENDIF.
          READ TABLE W_YMTH WITH KEY YYMM = YMTH-YYMM.
          IF SY-SUBRC EQ 0.
            W_YMTH-MENGE = W_YMTH-MENGE + YMTH-MENGE.
            W_YMTH-DMBTR = W_YMTH-DMBTR + YMTH-DMBTR.
            MODIFY W_YMTH INDEX SY-TABIX.
          ENDIF.
        ELSE.
          WRITE AT YMTH-COL(12) APP2.
        ENDIF.
      ENDLOOP.
      CLEAR: W_DMBTR, W_MENGE, APP.
      P_MATNR = I_EKBE-MATNR.
      P_EBELN = I_EKBE-EBELN.
      PERFORM CLR_YMTH.
    ENDFORM.                                                    " chg_matnr
    *&      Form  chg_mtart
          text
    -->  p1        text
    <--  p2        text
    FORM CHG_MTART.
      SKIP.
      ULINE.
      CONCATENATE P_MTART 'Total' INTO WTEXT SEPARATED BY SPACE.
      PERFORM PRN_TOT TABLES S_YMTH.
      P_MTART = I_EKBE-MTART.
      LOOP AT S_YMTH.
        CLEAR: S_YMTH-DMBTR, S_YMTH-MENGE.
        MODIFY S_YMTH.
      ENDLOOP.
    ENDFORM.                                                    " chg_mtart
    *&      Form  chg_werks
          text
    -->  p1        text
    <--  p2        text
    FORM CHG_WERKS.
      CONCATENATE P_WERKS 'Total' INTO WTEXT SEPARATED BY SPACE.
      PERFORM PRN_TOT TABLES W_YMTH.
      CLEAR: W_DMBTR, W_MENGE, APP.
      P_WERKS = I_EKBE-WERKS.
      LOOP AT W_YMTH.
        CLEAR: W_YMTH-DMBTR, W_YMTH-MENGE.
        MODIFY W_YMTH.
      ENDLOOP.
      NEW-PAGE.
    ENDFORM.                                                    " chg_werks
    *&      Form  chg_mth
          text
    -->  p1        text
    <--  p2        text
    FORM CHG_MTH.
      READ TABLE YMTH WITH KEY YYMM = PMTH.
      IF SY-SUBRC EQ 0.
        YMTH-MENGE = W_MENGE.
        YMTH-DMBTR = W_DMBTR.
        MODIFY YMTH INDEX SY-TABIX.
      ENDIF.
      CLEAR: W_MENGE, W_DMBTR.
      PMTH = CMTH.
    ENDFORM.                                                    " chg_mth
    *&      Form  clr_ymth
          text
    -->  p1        text
    <--  p2        text
    FORM CLR_YMTH.
      LOOP AT YMTH.
        CLEAR: YMTH-DMBTR, YMTH-MENGE.
        MODIFY YMTH.
      ENDLOOP.
    ENDFORM.                                                    " clr_ymth
    *&      Form  prn_tot
          text
    -->  p1        text
    <--  p2        text
    FORM PRN_TOT TABLES I_YMTH STRUCTURE YMTH.
      CLEAR: W_DMBTR, W_MENGE, W_DMBTR1, W_MENGE1, APP, APP1, APP2.
      READ TABLE I_YMTH WITH KEY YYMM = LMTH2.
      IF SY-SUBRC EQ 0 AND
         I_YMTH-MENGE NE 0.
        W_DMBTR = I_YMTH-DMBTR.
        W_MENGE = I_YMTH-MENGE.
        READ TABLE I_YMTH WITH KEY YYMM = LMTH1.
        IF SY-SUBRC EQ 0.
          APP  = W_DMBTR / W_MENGE.
          APP1 = I_YMTH-DMBTR / I_YMTH-MENGE.
          APP2 = ( APP1 - APP ) / APP * 100.
        ENDIF.
      ENDIF.
    WRITE:/ WTEXT, ' Amount  ',
             'USD'.
      LOOP AT I_YMTH.
        SELECT SINGLE * FROM TCURR
          WHERE FCURR = 'SGD'
          AND   TCURR = 'USD'.
          I_YMTH-DMBTR = I_YMTH-DMBTR * TCURR-UKURS.
       WRITE AT I_YMTH-COL(12) I_YMTH-DMBTR NO-ZERO.
      ENDLOOP.
    WRITE:/(18) ' ', ' Quantity'.
    LOOP AT I_YMTH.
       WRITE AT I_YMTH-COL(12) I_YMTH-MENGE NO-ZERO.
    ENDLOOP.
      WRITE:/(18) ' ', ' APP     ', 'USD'.
      LOOP AT I_YMTH.
        IF I_YMTH-YYMM NE '999901'.
          CLEAR APP.
          IF I_YMTH-MENGE NE 0.
            APP = I_YMTH-DMBTR / I_YMTH-MENGE.
          ENDIF.
          WRITE AT I_YMTH-COL(12) APP.
        ELSE.
          WRITE AT I_YMTH-COL(12) APP2.
        ENDIF.
      ENDLOOP.
      ULINE.
      CLEAR: W_DMBTR, W_MENGE, APP.
    ENDFORM.                    " prn_tot

  • Customer statement report (one page per customer) PLD

    Hi All,
    One of my client  want to print the 5 to 6 customer aging report at a time on the pre-printed paper i had done all the work, But they want the page no for each and every customer should start from 1 and  they want the current and 0-30,30-60, 60+ to be printed on the last page of the each and every customer statement.
    Regards,
    Srinivasarao

    Hi Srinivasarao,
    I am afraid to meet this need you need create your own report through reporting tool such as Crystal Report.
    Thanks,
    Gordon

Maybe you are looking for