Word issues with upgradeing reports built in 10 to crystal 2008

We have a bunch of reports that were built and running with 10. We are trying to upgrade our servers to run with crystal 2008. The reports built in 10 have been working when run with the crystal 2008 runtime. With the exception of a problem when opening a report in word. I have figured out if I change the page set up in word to be landscape the report will now show fine. Also if i edit the actual rpt to be much narrower than the original, it will execute correctly in word. Has anyone else had this problem? Word will run very slow and there will be blank pages in between a multi page document.

Hi Bill,
Not sure what version you are using, get SP1. In the report designer if you got the Page Setup options try checking on Dissociate Formatting Page....
If you are using RAS and SP1 you can do this in code something like this:
System.Drawing.Printing.PrintDocument pDoc = new System.Drawing.Printing.PrintDocument();               
PrintReportOptions rasPROpts = new CrystalDecisions.ReportAppServer.Controllers.PrintReportOptionsClass();
CrystalDecisions.ReportAppServer.ReportDefModel.PrintOptions MYPRTOpts = new PrintOptionsClass();
if (rdoCurrent.Checked)
                pDoc.PrinterSettings.PrinterName = cboCurrentPrinters.Text;
                MYPRTOpts.PrinterName = cboCurrentPrinters.Text;
                MYPRTOpts.PaperSize = (CrPaperSizeEnum)
                         pDoc.PrinterSettings.PaperSizes[cboCurrentPaperSizes.SelectedIndex].Kind;
                MYPRTOpts.PaperSource = (CrPaperSourceEnum)
                         pDoc.PrinterSettings.PaperSources[cboCurrentPaperTrays.SelectedIndex].Kind;
     // added the below line to verify the changes work.
                MYPRTOpts.PaperOrientation = CrPaperOrientationEnum.crPaperOrientationLandscape;
                // new API added to allow changing printing options
                MYPRTOpts.DissociatePageSizeAndPrinterPaperSize = true;
                MYPRTOpts.PageMargins.Left = 1;
                MYPRTOpts.PageMargins.Right = 1;
                MYPRTOpts.PageMargins.Top = 1;
                MYPRTOpts.PageMargins.Bottom = 1;
Thank you
Don

Similar Messages

  • Performance Issue with VL06O report

    Hi,
    We are having performance issue with VL06O report, when run with forwarding agent. It is taking about an hour with forwarding agent. The issue is with VBPA table and we found one OSS note, but it is for old versions. ours is ECC 5.0. Can anybody know the solution? If you guys need more information, please ask me.
    Thanks,
    Surya

    Sreedhar,
    Thanks for you quick response. Indexes were not created for VBPA table. basis people tested by creating indexes and gave a report that it is taking more time with indexes than regular query optimizer. this is happening in the funtion forward_ag_selection.
    select vbeln lifnr from vbpa
         appending corresponding fields of table lt_select
         where     vbeln in ct_vbeln
         and     posnr eq posnr_initial
         and     parvw eq 'SP'
         and     lifnr in it_spdnr.
    I don't see any issue with this query. I give more info later

  • Variable input values issue with Portal reports in WAD

    Hi Gurus,
    We have issue with our reports which are created in WAD and when executed through CRM portal. We are executing the report with some selection criteria by changing default values, and once we get the out put we use SAVEAS option to save the report to favourites. But  the issue arises when we open the reprot again by clicking OPEN tab next to SAVEAS button. It opens our report, but the selection screen vaues are getting changed to default instead of showing the values which we entered before saving the report.
    ex: we have fiscalyear/period: default value is 001.2009 - 010.2009, but i changed the value to 001.2010 - 010.2010 and saved the out put of the report. when i reopen the report useing open option, it is showing 001.2009 - 010.2009 in input screen.
    Please let me know if some one has come accross this issue, or is it standard SAP behaviour. It is working fine when executed through Query designer. This is not related to personlization of variabl.es.
    Regards,
    Yada

    Hi Hari,
    Thanks for your promp response...but is there any settings to get the variable values with out saving as variant, because its working fine when executing through query designer....
    Regards,
    Yada

  • HELP!!!! I have spent hours trying to find out how to embed an image with a link or a Microsoft Word document with a hyperlink built within the document -- not as an attachment! Does ANYONE know the secret? Can it be done, or not! My PC clients do it.

    HELP!!!! I have spent hours trying to find out how to embed an image with a link, or embed a Microsoft Word document with a hyperlink built within the document -- not as an attachment into my email -- but where it shows as the email content when opened! Does ANYONE know the secret? Can it be done, or not? My PC clients do it all the time easily. Then I want to be able to send the embedded image/document (not as an attachment, but visable within the email when opened) to many email contacts at once, BUT the individuals receiveing them DO NOT SEE the other email contacts. Cannot seem to be able to find anything on being able to do these 2 tasks.PLEASE, SOMEONE, HELP!!!

    Don't know if this applies to Lion, but read here:
    http://www.makeuseof.com/tag/create-html-announcement-mail-iweb-mac/

  • Issues with BEx Reports in SAP Enterprise Portal

    Hello Experts,
    I am facing issues with BEx reports integrated in portal. Below are more details:
    Scenario 1:
    Execute a BEx report in the portal, save it in 'My Portfolio' using 'Save As' button. Now open the saved report from 'My Portfolio'. Below is the issue for this scenario:
    When I open the saved report, I get 2 error messages and 1 info message at the top of the report. They are as follows:
    The metadata of 'ITE' 'TEMPLATE_PARAMETERS' are incorrect for parameter 'COMMAND_PROCESSING'
    The metadata of 'ITE' 'FILTER_PANE_ITEM' are incorrect for parameter 'TEXT_WRAPPING'
    Variables for characteristic Fiscal year/period[0FISCPER] cannot be processed
    Scenario 2:
    Execute a BEx report in the portal, save it in 'BEx Portfolio' or 'Favourites' using 'Save As' button. Now open the saved report and click on 'Send' button. As expected, the BEx broadcaster wizard should appear but, it shows '400 BAD HTTP REQUEST'. While if I open the report (not the saved one) and click on 'Send' button, it works.
    Helpful pointers appreciated.
    Thanks
    Vikash

    HI Suman,
    I am not adding the report to favourite using browser favourite. Below is the flow:
    Run the report in portal.
    There is a 'Save As' button at the top of the report. When I click that button, I get a pop-up with 3 tabs  for saving the report.:
    Favourite
    BEx Portfolio
    My Portfolio
    save the report in the favorites or BEx portfolio tab and then open it and press 'Send' button
    BEx Broadcaster Wizard should appear but instead of that, it shows '400 BAD HTTP REQUEST'.
    If I press send for unsaved report, then BEx broadcaster Wizard is shown.
    Thanks,
    Vikash

  • User issue with a report supply planning area today monthly

    this is a support issue....the user has an issue with a report supply planning area today monthly.  The user is getting wrong values in BW, it sums PLOs and POs under production (config).  for eg:  BW says we are producing 46T while in R/3 we have 4T.

    The issue was related to the heap size being too much and as a result the Class block memory was not getting enough memory. I think we can make a use of -XXCompressedRefs:32 parameter in the Java start up to allow the heap size to increase till 32 Gb.

  • Issue with Scheduled Reports

    Having an issue with running reports.  We have created the folder under C:\Program Files\Cisco CRS Historical Reports\reports ..to resolve a bug but now the user gets the attached error message every morning.  Any ideas?
    Thanks,
    Joe

    Hi Joe
    No attachment?
    Aaron

  • Issue with SSRS Report Exporting to Excel and word

    Hi,
    When report is exporting in word and Excel getting format issue, but same report export with pdf there is  no issue.
    Regards,
    Afroz

    You need to be always careful when export format is Word and specially Excel. Sometimes report result looks good in Report Viewer and PDF too, but it may not in MS Word and MS Excel.
    You need to understand Word and Excel limitations and align all the data regions (Tablix, Rectangles, Texboxes) in correct way.
    Also, you may post the actual formatting issue that you get. (With screenshot if possible)
    Please read Limitation section in below:
    Exporting to Microsoft Word
    Exporting to Microsoft Excel
    Refer:
    Ten Common SQL Server Reporting Services Challenges and Solutions
    -Vaibhav Chaudhari

  • BW hierarchies issue with BOBJ Reporting tools

    Hi All,
    Brief about the requirement:
    Our client was using Mainframe and other tools for their reporting. Now as they have planned to go for SAP, purchased SAP BW 7 and SAP BOBJ XI 3.1 for warehouse and reporting purposes.
    Initial Road map planned for implementation was
    o     to use Crystal for operational and formatted reporting
    o     to use WebI for Ad hoc and interactive reporting
    o     to use Xcelsius for Dashboards
    Once we started analysing the requirements, we observed that client requires hierarchies extensively for reporting and they donu2019t want to compromise in that for reporting. At this situation we have explored the options and came to know from the SAP sites that BO got limitations in case of BW hierarchies. But we not able to articulate the what is the exact issue. Is it with only WebI or Crystal also?
    What we have articulated is we cannot report the hierarchies in BO in terms of nodes - > Sub nodes -> sub nodes instead we can do as fixed columns. Please add me if i am missing anything else.
    And also please let us know options. Options that we were thinking are Implement with BO XI 3.1 considering Advanced analysis tool then upgrade to BO XI 4.1.
    Please suggest us, what is the BW & BO hierarchy issue and right tools to use.
    Thanks & Regards,
    Bala

    Our client uses XI 3.2 but is experiencing issues with Hierarchical BEX queries returning blanks - the mdx is fine - just webi that seems to have a problem and I'm also trying to determine in exactly which instances this occurs.
    XI 4.x supposedly resolves mots issues but here again details are not known.
    I.e. hopefully someone can point to an info source that describes in more detail what issues are likely to occur re hierarchies and webi.

  • Error creating custom reports. Permissions issue with custom reports

    I am having permission issues with reports. I am building a new Configuration Manager  2012 infrastructure and I have configured the Site server on Server1 and the DB is on Server2. Server2 also hosts the Reporting Point and SSRS roles/features. If
    I look in Monitoring at the Site Status and Component Status are all green no issues with the setup.
    Running SQL 2008 SP2 (no CUs). I have a service account that I used to install Configuration Manager and SQL. This service account is running the SQL service on Server2 and i am using the same account as the Reporting Services Point Account.
    I log into the SCCM console with a different user account, lets call it Admin1. This account is a member of the Full Administrator role. I can run any built in report.
    When I open the SSRS website and try to create a custom report I connect the DataSource using Windows Authentication. So the Datasource is connecting using the logged in users account. In this case Admin1. I test the connection and it connects fine.
    I test this query. (Select * from v_R_System) I only have about 10 workstations discovered so the report shouldn’t be very big. I get an error “The Select permission was denied on the object ‘v_R_System’, Database ‘CM_XXX’, schema ‘dbo’. (Microsoft sql server,
    Error: 229)”
    I have fixed the SELECT permission error by going into the database (using SQL Management studio) and granting Admin1 Select rights to the Configuration Manager database. I can now run the above query and make custom reports.
    My 2<sup>nd</sup> problem is that other members of the Full Administrator role cannot run these custom reports unless I go into the database and grant them the SELECT permission.
    Question:
    Should I have to manually go into the database to add SELECT permissions(i could use a group)? shouldnt Configuration Manager take care of this for me?
    Maybe the built in reports use the SQL service account rights and the custom ones do not? Am I doing something wrong with the Datasource when I create these custom reports?
    What is the correct process for creating custom reports?

    I think i am getting closer to a solution. After the Custom report is created. i can go back into the report. Delete the DataSource. Then browse for a dataSource. there is a datasource located in http://server2/reportserver/ConfigMgr_XXX/
    That datasource is used by all builtin reports. if you view the properties on the Credentials tab it is set to "do not use credentials" and the option is greyed out / cannot be changed.
    it looks like i still need the SELECT permissions on the database to create the report initially but at least i have solved the problem with viewing these reports.
    Can anyone confirm that what i did is correct?

  • Help with Upgrade report in FI

    Hey All Gurus,
    Im in a thick soup here. I am trying to do something like this -
    if you see the selection screen i have rep and super rep, when a user enters a rep value --- it should use the same value to pull all open items for the super rep as well, since they are essentially the same. please help! this one needs to be done fast. i am pasting the code so that it will be easier ...
    thanks a million!
    *& Report  ZFDOFW04_NEW
    REPORT ZFDOFW04_NEW MESSAGE-ID FR
                         LINE-SIZE 132
                         LINE-COUNT 60.
    *==================================================================
    Program: ZFDOFW03 -      Aged Trial Balance Report
             This produces an Accounts Receivable Past Due Aging Report
             in a more simplified/condensed format than the
             SAP supplied aging report program - RFDOPR10.
             This program is a modified copy of RFDOFW00, - a SAP
             Future-Due Report.
             This was a 'rush' job - program probably should be
             rewritten someday not using logical databases as that
             maybe why this runs so slowly!
    Original:  Feb 1997.
    MAINTENANCE HISTORY:
    NES071797   Copied from ZFDOFW03.  Adding parameter for saeles rep.
    JDEDERER - changed header text so it is differnet from ZFDORW03. 9/23
    *TEXT SYMBOLS :
    001 Open items per
    002 O p e n
    003 D u e  o n
    004    cc   ba     in total
    005  until
    006 Days until
    007 Days over
    008 Days
    009 over
    011 valid until........
    012 Insurance limit.....
    016 F u t u r e
    017 + days
    018 D u e
    020 Last dunn.notice...
    021 Dunning level....
    030   S U M M A R Y  S H E E T
    031  =====================
    050 Name           Page
    051 Burton Snowboard
    SELECTION TEXTS:
    SUMMEN   Output totals only
    TAGE1    Due date I until
    TAGE2    Due date II until
    TAGE3    Due date III until
    TAGE4    Due date IV until
    TABLES: T001, KNA1, KNB1, KNB5, BSID, BSEGA, RFPDO1, KNVP,
             T014,                     "credit control areas              JAM
             KNVK,                     "cust master - contact partner     JAM
             T014T,  "Credit control areas names
             BKPF,   "TONY ISSUE 4743
             TVKO,   "TONY ISSUE 4743
             KNKK.                     "cust master - credit mgmt         JAM
    TYPES: BEGIN OF TOT_TYPE,                                  "DEVK939546
              BUKRS LIKE LFB1-BUKRS,                            "DEVK939546
              GSBER LIKE BSIK-GSBER,                            "DEVK939546
              KKBER LIKE BSID-KKBER,
              RAST1 TYPE P,                                     "DEVK939546
              RAST2 TYPE P,                                     "DEVK939546
              RAST3 TYPE P,                                     "DEVK939546
              RAST4 TYPE P,                                     "DEVK939546
              RAST5 TYPE P,                                     "DEVK939546
              RAST6 TYPE P,                                     "DEVK939546
              RAST7 TYPE P,                                     "DEVK939546
            END OF TOT_TYPE,                                    "DEVK939546
            TOT_TAB TYPE TOT_TYPE OCCURS 0.                     "DEVK939546
    CONSTANTS:
             C_FALSE    TYPE I VALUE 0,                                  "JAM
             C_TRUE     TYPE I VALUE 1.
    DATA: BEGIN OF GTAB OCCURS 1000,
              SUPER(10) TYPE C,                                         "TONYC
              REP(10) TYPE C,                                           "TONYC
              FILKD(10),        "tonyc show buying groups
              LAND1 LIKE KNA1-LAND1,
              GSBER LIKE BSIK-GSBER,
              REGIO LIKE KNA1-REGIO,
              NAME1 LIKE KNA1-NAME1,
              NAME2 LIKE KNA1-NAME2,
              ORT01  LIKE KNA1-ORT01,
              TELF1      LIKE KNVK-TELF1,       "telephone number         JAM
              CONT_NAME1 LIKE KNVK-NAME1,       "contact name             JAM
              NAMEV      LIKE KNVK-NAMEV,       "contact name             JAM
              KUNNR LIKE KNA1-KUNNR,                                   "TONYC
              BUKRS LIKE LFB1-BUKRS,                                   "TONYC
              KKBER LIKE BSID-KKBER,     "tonyc issue #2500
              ZTERM LIKE KNB1-ZTERM,     "tonyc issue #2500
              KLIMK_TXT(22)   TYPE C,           "credit limit             JAM
              WAERS      LIKE T014-WAERS,       "currency                 JAM
              SORT_GSB,                                               "TONYC
              RAST1 TYPE P,
              RAST2 TYPE P,
              RAST3 TYPE P,
              RAST4 TYPE P,
              RAST5 TYPE P,
              RAST6 TYPE P,
              RAST7 TYPE P,
              T_IND,
           END OF GTAB.
    DATA HOLD_NAME(40).
    DATA  HOLD_BUKRS LIKE T001-BUKRS.                                 "tonyc
    DATA  GOOD_SUPER_REP.                                             "tonyc
    DATA: HOLD_REP LIKE KNA1-KUNNR,                                   "tonyc
           SUPER_NAME LIKE KNA1-NAME1,                                 "tonyc
           REP_NAME LIKE KNA1-NAME1.                                   "tonyc
    DATA  NAME_LENGTH(2) TYPE C.                                      "tonyc
    DATA  BACKSLASH(3) VALUE ' / '.                                   "tonyc
    DATA  REPS_INFO(70) TYPE C.                                       "tonyc
    DATA  REPORT_TYPE(12) TYPE C.
    DATA:   C_CREDIT_ABTNR LIKE KNVK-ABTNR.    "dept 003 = credit
    DATA  Z_HOLD_LIMIT(22) TYPE N.  "tonyc issue#2216
    DATA  Z_DESCRIPTION(18).   "tonyc issue#2216
    DATA  WRITE_TOTAL.
    DATA  HOLD_KLIMK LIKE KNKK-KLIMK.
    DATA  HOLD_KLIMK2(22) TYPE C.
    DATA  HOLD-CTLPC LIKE KNKK-CTLPC.
    DATA  HOLD-CTLPC-TEXT LIKE T691T-RTEXT.
    DATA  HOLD_ZTERM LIKE KNVV-ZTERM.
    DATA  TOTAL_RAST7 TYPE P.
    DATA  TOTAL_RAST2 TYPE P.
    DATA  TOTAL_RAST3 TYPE P.
    DATA  TOTAL_RAST4 TYPE P.
    DATA  TOTAL_RAST5 TYPE P.
    DATA  TOTAL_RAST6 TYPE P.
    DATA  TOTAL_RAST1 TYPE P.
    DATA  HOLD_BUKRS2 LIKE T001-BUKRS.
    DATA  HOLD_KKBER LIKE BSID-KKBER.
    DATA  HOLD_KKBER_DESC LIKE T014T-KKBTX.
    DATA  HOLD_KKBER_DESC2 LIKE T014T-KKBTX.
    DATA  HOLD_KUNNR2 LIKE KNA1-KUNNR.
    DATA  L_FIRST_DAY_OF_FISCAL LIKE SY-DATUM. "tonyc issue #3047
    DATA: STAB TYPE TOT_TAB WITH HEADER LINE,                  "DEVK939546
           RTOT TYPE TOT_TAB WITH HEADER LINE,                  "DEVK939546
           STOT TYPE TOT_TAB WITH HEADER LINE,                  "DEVK939546
           OP,
           MAXMANDT LIKE DD_STIDA,
           MAXMANST TYPE P,
        SUMKLIMB TYPE P,
           SUMVLIBB TYPE P,
           VERZUG TYPE P,
           OBAD TYPE P,
           BLOCK_CNT TYPE P,
           INTENS,
           ONEBYTE(1) TYPE C,
           TAGE1A LIKE RFPDO1-ALLGFAEL,
           TAGE2A LIKE RFPDO1-ALLGFAEL,
           TAGE3A LIKE RFPDO1-ALLGFAEL,
            HOLD_KUNNR  LIKE KNA1-KUNNR,                          "tonyc
            HOLD_SUPER  LIKE KNA1-KUNNR,                          "tonyc
            HOLD_REP2  LIKE KNA1-KUNNR,                          "tonyc
            SUPER_REP   LIKE KNA1-KUNNR,                          "tonyc
           TEMP_TELF1      LIKE KNA1-TELF1,                              "JAM
           IT_T014         LIKE T014 OCCURS 0 WITH HEADER LINE,          "JAM
           G_KLIMK_TXT     LIKE GTAB-KLIMK_TXT,                          "JAM
           G_WAERS         LIKE GTAB-WAERS,                              "JAM
           G_CONT_NAME(50) TYPE C.                                       "JA
    DATA  FILL_REP_INFO.
       BC     SUNILP      05/14/2007
    DATA: BEGIN OF ITAB_VBRP OCCURS 0.
             INCLUDE STRUCTURE VBRP.
    DATA:  END OF ITAB_VBRP.
    DATA: T_PERC TYPE F,
           SUM_NETWR LIKE VBRP-NETWR.
    *DATA: GTAB_LINES LIKE GTAB OCCURS 0 WITH HEADER LINE.
    DATA: BEGIN OF GTAB_LINES OCCURS 0.
             INCLUDE STRUCTURE GTAB.
    DATA:  IND(1),
            OBAD TYPE P.
    DATA:  END OF GTAB_LINES.
    DATA: BEGIN OF ITAB_VBRP1 OCCURS 0,
           VBELN LIKE VBRP-VBELN,
           NETWR LIKE VBRP-NETWR,
           ZZMREP LIKE VBRP-ZZMREP,       "Super Rep
           ZZLREP LIKE VBRP-ZZLREP,       "Rep
           PERC TYPE F,
           END OF ITAB_VBRP1.
       EC     SUNILP      05/14/2007
    BEGIN_OF_BLOCK 2.
    PARAMETERS: REGIO  LIKE KNA1-REGIO.
    PARAMETERS: CONSOL AS CHECKBOX.                      "TONYC
    PARAMETERS: P_KKBER AS CHECKBOX,                      "TONYC
                 P_CONV AS CHECKBOX.  "tonyc issue #3047
    PARAMETERS: SUMMEN LIKE RFPDO1-ALLGSUMM,
                 TAGE1 LIKE RFPDO1-ALLGFAEL DEFAULT '30',
                 TAGE2 LIKE RFPDO1-ALLGFAEL DEFAULT '60',
                 TAGE3 LIKE RFPDO1-ALLGFAEL DEFAULT '90',
                 TAGE4 LIKE RFPDO1-ALLGFAEL DEFAULT '120'.
    END_OF_BLOCK 2.
    BEGIN_OF_BLOCK 3.
    SELECT-OPTIONS:   P_SUPREP FOR KNVP-KUNNR,   "Super REP      "DEVK939546
                       P_REP FOR KNVP-KUNNR,   "SALES REP         "DEVK939546
                       P_VKORG FOR TVKO-VKORG,  "TONYC ISSUE 4743
                       P_LOTKZ FOR BKPF-LOTKZ.  "TONYC ISSUE 4743
    END_OF_BLOCK 3.
    INITIALIZATION.                                                     "JAM
       PERFORM LOAD_T014.                                                "JAM
         refresh dd_augdt.
         clear dd_augdt.
         dd_augdt-option = 'EQ'.
         dd_augdt-sign   = 'I'.
         dd_augdt-low    = ' '.
        append dd_augdt.
    AT SELECTION-SCREEN.
       IF CONSOL = 'X'.
         IF NOT P_SUPREP[] IS INITIAL.                          "DEVK939546
           MESSAGE E999 WITH 'Consolidated report not allowed w/ Super Rep'.
         ENDIF.
       ENDIF.
    CHECK IF THE REP INFO IS ADDED OR NOT - VS
       IF NOT P_SUPREP IS INITIAL OR"TONY ISSUE 4743
          NOT P_REP IS INITIAL."TONY ISSUE 4743
         FILL_REP_INFO = 'X'."TONY ISSUE 4743
       ENDIF."TONY ISSUE 4743
    START-OF-SELECTION.
    get_frame_title 2.
    add function module to track usage   JD  10/13/98 *****
       CALL FUNCTION 'Z_RUN_LOG'
         EXCEPTIONS
           OTHERS = 1.
    *IF NOT P_SUPREP IS INITIAL AND NOT P_REP IS INITIAL.
       P_SUPREP = ' '.
    *ENDIF.
    GET KNA1 FIELDS LAND1 REGIO KUNNR NAME1 NAME2 ORT01 TELF1.          "JAM
    new-page.
    skip.
       TEMP_TELF1 = KNA1-TELF1.
       MAXMANDT = '19000101'.
       MAXMANST = 0.
       SUMVLIBB = 0.
       PERFORM GET_CUST_CONTACT.                                         "JAM
    Check sales rep-                           NES071797
    Get any valid record and exit.
    IF NOT p_suprep[] IS INITIAL. "DEVK939546  "TONY ISSUE 4743 start
       good_super_rep = ' '.
       SELECT kunn2 INTO super_rep FROM knvp UP TO 1 ROWS
         WHERE
           kunnr = kna1-kunnr AND
           parvw = 'ZS' AND
           kunn2 IN p_suprep.
         EXIT.
       ENDSELECT.
       IF sy-subrc = 0.
         good_super_rep = 'X'.
         gtab-super = super_rep.
         super_rep = ' '.
       ENDIF.
       CHECK good_super_rep = 'X'.
       SELECT kunn2 INTO gtab-rep FROM knvp UP TO 1 ROWS
       WHERE
         kunnr = kna1-kunnr AND
         parvw = 'ZR' AND
         kunn2 IN p_rep.
         EXIT.
       ENDSELECT.
       CHECK sy-subrc = 0.
    ELSEIF NOT p_rep[] IS INITIAL.  "DEVK939546
       SELECT kunn2 INTO gtab-rep FROM knvp UP TO 1 ROWS
         WHERE
           kunnr = kna1-kunnr AND
           parvw = 'ZR' AND
           kunn2 IN p_rep.
         EXIT.
       ENDSELECT.
       CHECK sy-subrc = 0.
    ENDIF.                      "TONY ISSUE 4743 end
    GET KNB1 FIELDS BUKRS VLIBB ZTERM.  "tonyc #2500
       GTAB-BUKRS = KNB1-BUKRS.
    GTAB-ZTERM = KNB1-ZTERM.
       SUMVLIBB = SUMVLIBB + KNB1-VLIBB.
    GET KNB5.
       IF KNB5-MADAT > MAXMANDT.
         MAXMANDT = KNB5-MADAT.
       ENDIF.
       IF KNB5-MAHNS > MAXMANST.
         MAXMANST = KNB5-MAHNS.
       ENDIF.
    SUMKLIMB = SUMKLIMB + KLIMB.
    GET BSID.
       CHECK BSID-BSTAT = SPACE.
    field was intended for Business Area, changed to use Currency
       GTAB-GSBER = BSID-WAERS.
       IF P_KKBER = 'X'.                 "TONYC ISSUE #2500
         IF BSID-KKBER = ' '.
           GTAB-KKBER = BSID-BUKRS.
         ELSE.
           GTAB-KKBER       = BSID-KKBER.  "TONYC ISSUE #2500
         ENDIF.
       ENDIF.                            "TONYC ISSUE #2500
       SELECT SINGLE * FROM BKPF  "TONY ISSUE 4743
          WHERE BUKRS =  BSID-BUKRS "TONY ISSUE 4743
            AND BELNR = BSID-BELNR "TONY ISSUE 4743
            AND GJAHR = BSID-GJAHR. "TONY ISSUE 4743
      BC      SUNILP      05/14/2007
       IF BKPF-XREF2_HD IS NOT INITIAL.
         CHECK BKPF-XREF2_HD IN P_SUPREP. "TONY ISSUE 4743
       ELSE.
         IF P_REP[] IS INITIAL.
           REFRESH: ITAB_VBRP, ITAB_VBRP1.
           IF NOT BKPF-XBLNR IS INITIAL.
             SELECT * FROM VBRP INTO ITAB_VBRP WHERE VBELN = BKPF-XBLNR.
               APPEND ITAB_VBRP. CLEAR ITAB_VBRP.
             ENDSELECT.
            CHECK ITAB_VBRP[] IS NOT INITIAL.
             CLEAR: SUM_NETWR.
             LOOP AT ITAB_VBRP.
               CHECK ITAB_VBRP-ZZMREP IN P_SUPREP.
               CHECK ITAB_VBRP-ZZLREP IN P_REP.
               MOVE-CORRESPONDING ITAB_VBRP TO ITAB_VBRP1.
               COLLECT: ITAB_VBRP1.
               SUM_NETWR = SUM_NETWR + ITAB_VBRP-NETWR.
               CLEAR ITAB_VBRP.
             ENDLOOP.
            CHECK ITAB_VBRP1[] IS NOT INITIAL.
             LOOP AT ITAB_VBRP1.
               CLEAR: T_PERC.
               T_PERC = ( ITAB_VBRP1-NETWR / SUM_NETWR ).
               ITAB_VBRP1-PERC = T_PERC.
               MODIFY ITAB_VBRP1 INDEX SY-TABIX TRANSPORTING PERC.
             ENDLOOP.
           ENDIF.
         ENDIF.
       ENDIF.
      EC      SUNILP      05/14/2007
       IF FILL_REP_INFO = 'X'.
         GTAB-SUPER = BKPF-XREF2_HD. "TONY ISSUE 4743   "MOVE THE CONTENTS OF XREF2_HD TO GTAB INTERNAL TABLE - VS
       ENDIF.
      BC      SUNILP      05/14/2007
       IF BKPF-XREF1_HD IS NOT INITIAL.
         CHECK BKPF-XREF1_HD IN P_REP. "TONY ISSUE 4743  " ELSE MOVE THE CONTENTS OF - VS
       ELSE.
         REFRESH: ITAB_VBRP, ITAB_VBRP1.
         IF NOT BKPF-XBLNR IS INITIAL.
           SELECT * FROM VBRP INTO ITAB_VBRP WHERE VBELN = BKPF-XBLNR.
             APPEND ITAB_VBRP. CLEAR ITAB_VBRP.
           ENDSELECT.
            CHECK ITAB_VBRP[] IS NOT INITIAL.
           CLEAR: SUM_NETWR.
           LOOP AT ITAB_VBRP.
             CHECK ITAB_VBRP-ZZMREP IN P_SUPREP.
             CHECK ITAB_VBRP-ZZLREP IN P_REP.
             MOVE-CORRESPONDING ITAB_VBRP TO ITAB_VBRP1.
             COLLECT: ITAB_VBRP1.
             SUM_NETWR = SUM_NETWR + ITAB_VBRP-NETWR.
             CLEAR ITAB_VBRP.
           ENDLOOP.
            CHECK ITAB_VBRP1[] IS NOT INITIAL.
           LOOP AT ITAB_VBRP1.
             CLEAR: T_PERC.
             T_PERC = ( ITAB_VBRP1-NETWR / SUM_NETWR ).
             ITAB_VBRP1-PERC = T_PERC.
             MODIFY ITAB_VBRP1 INDEX SY-TABIX TRANSPORTING PERC.
           ENDLOOP.
         ENDIF.
       ENDIF.
      EC      SUNILP      05/14/2007
       IF FILL_REP_INFO = 'X'.
         GTAB-REP = BKPF-XREF1_HD. "TONY ISSUE 4743
       ENDIF.
       CHECK BKPF-LOTKZ    IN P_LOTKZ. "TONY ISSUE 4743
       CHECK BKPF-BRNCH    IN P_VKORG. "TONY ISSUE 4743
       SELECT SINGLE FILKD INTO GTAB-FILKD FROM BSEG
          WHERE BUKRS =  BSID-BUKRS
            AND BELNR = BSID-BELNR
            AND GJAHR = BSID-GJAHR
            AND BUZEI = BSID-BUZEI.
    gtab-gsber = bsid-gsber.
    get rep info for each bsid record
    IF NOT P_SUPREP IS INITIAL.                                  "tonyc
        SELECT KUNNR FROM VBPA INTO HOLD_REP UP TO 1 ROWS         "tonyc
              WHERE VBELN = BSID-VBELN                            "tonyc
              AND PARVW = 'ZR'.                                   "tonyc
        ENDSELECT.                                                "tonyc
        IF NOT P_REP IS INITIAL.                                  "tonyc
          CHECK HOLD_REP = P_REP.                                 "tonyc
        ENDIF.                                                    "tonyc
        GTAB-REP = HOLD_REP.                                      "tonyc
        HOLD_REP = ' '.                                           "tonyc
    ENDIF.                                                       "tonyc
       PERFORM GET_KNKK_INFO.                                            "JAM
       GTAB-KLIMK_TXT = G_KLIMK_TXT.
       GTAB-WAERS     = G_WAERS.
       GTAB-LAND1 = KNA1-LAND1.
       GTAB-REGIO = KNA1-REGIO.
       GTAB-KUNNR = KNA1-KUNNR.
       GTAB-NAME1 = KNA1-NAME1.
       GTAB-NAME2 = KNA1-NAME2.
       GTAB-ORT01 = KNA1-ORT01.
    *if there is no phone number for the contact, pull the phone
    *number from the sold-to
       IF KNVK-TELF1 = ' '.
         GTAB-TELF1      = TEMP_TELF1.
       ELSE.
         GTAB-TELF1      = KNVK-TELF1.                                 "JAM
       ENDIF.
       GTAB-CONT_NAME1 = KNVK-NAME1.
       GTAB-NAMEV      = KNVK-NAMEV.
    verzug = bsega-netdt - dd_stida.
       VERZUG = DD_STIDA - BSEGA-NETDT.     "days past due calculation
       OP = 'X'.
       GTAB-RAST2 = GTAB-RAST3 = GTAB-RAST4 = 0.
       GTAB-RAST5 = GTAB-RAST6 = OBAD = GTAB-RAST7 = 0.
       IF VERZUG LE 0.                      "future due
         GTAB-RAST1 = BSEGA-WRSHB.
       ELSE.
         IF VERZUG LE TAGE1.                "past due 1 to tage1 days
           GTAB-RAST1 = BSEGA-WRSHB.
           GTAB-RAST2 = BSEGA-WRSHB.
           OBAD       = BSEGA-WRSHB.
         ELSE.
           IF VERZUG LE TAGE2.              "past due tage1 to tage2 days
             GTAB-RAST1 = BSEGA-WRSHB.
             GTAB-RAST3 = BSEGA-WRSHB.
             OBAD       = BSEGA-WRSHB.
           ELSE.
             IF VERZUG LE TAGE3.            "past due tage2 to tage3 days
               GTAB-RAST1 = BSEGA-WRSHB.
               GTAB-RAST4 = BSEGA-WRSHB.
               OBAD       = BSEGA-WRSHB.
             ELSE.
               IF VERZUG LE TAGE4.          "past due tage3 to tage4 days
                 GTAB-RAST1 = BSEGA-WRSHB.
                 GTAB-RAST5 = BSEGA-WRSHB.
                 OBAD       = BSEGA-WRSHB.
               ELSE.
                 IF VERZUG GT TAGE4.        "past due > tage4 days
                   GTAB-RAST1 = BSEGA-WRSHB.
                   GTAB-RAST6 = BSEGA-WRSHB.
                   OBAD       = BSEGA-WRSHB.
                 ENDIF.
               ENDIF.
             ENDIF.
           ENDIF.
         ENDIF.
       ENDIF.
       GTAB-RAST7 = GTAB-RAST1 - OBAD.
    stab = gtab.
       MOVE-CORRESPONDING GTAB TO STAB.
      BC     SUNILP       05/15/2007
       IF ITAB_VBRP1[] IS NOT INITIAL.
         GTAB-T_IND = 'X'.
         LOOP AT ITAB_VBRP1.
           MOVE-CORRESPONDING GTAB TO GTAB_LINES.
           GTAB_LINES-SORT_GSB =  '1'.
           GTAB_LINES-SUPER = ITAB_VBRP1-ZZMREP.
           GTAB_LINES-REP = ITAB_VBRP1-ZZLREP.
           GTAB_LINES-RAST1 = GTAB_LINES-RAST1 * ITAB_VBRP1-PERC.
           GTAB_LINES-RAST2 = GTAB_LINES-RAST2 * ITAB_VBRP1-PERC.
           GTAB_LINES-RAST3 = GTAB_LINES-RAST3 * ITAB_VBRP1-PERC.
           GTAB_LINES-RAST4 = GTAB_LINES-RAST4 * ITAB_VBRP1-PERC.
           GTAB_LINES-RAST5 = GTAB_LINES-RAST5 * ITAB_VBRP1-PERC.
           GTAB_LINES-RAST6 = GTAB_LINES-RAST6 * ITAB_VBRP1-PERC.
           GTAB_LINES-RAST7 = GTAB_LINES-RAST7 * ITAB_VBRP1-PERC.
      GTAB_LINES-OBAD  = GTAB_LINES-OBAD  * ITAB_VBRP1-PERC.
           COLLECT: GTAB_LINES.
         ENDLOOP.
       ELSE.
         MOVE-CORRESPONDING GTAB TO GTAB_LINES.
         GTAB_LINES-T_IND =  'X'.
         GTAB_LINES-SORT_GSB =  '1'.
         IF GTAB_LINES-SUPER IN P_SUPREP OR GTAB_LINES-REP IN P_REP.
           COLLECT: GTAB_LINES.
         ENDIF.
       ENDIF.
      EC     SUNILP       05/15/2007
    gtab-sort_gsb = stab-sort_gsb = '0'.
    collect: gtab, stab.
    gtab-gsber = stab-gsber = '****'.
       GTAB-SORT_GSB =  '1'.
       IF REGIO = SPACE OR REGIO = GTAB-REGIO.
         IF GTAB_LINES-SUPER IN P_SUPREP OR GTAB_LINES-REP IN P_REP.
           COLLECT: GTAB, STAB.
         ENDIF.
       ENDIF.
    END-OF-SELECTION.
       TAGE1A = TAGE1 + 1.
       TAGE2A = TAGE2 + 1.
       TAGE3A = TAGE3 + 1.
       IF  SUMMEN = ' '.
       sort gtab by bukrs land1 regio kunnr gsber sort_gsb.
      sort gtab by bukrs land1 regio name1 kunnr gsber sort_gsb.      "JAM
         IF CONSOL = 'X'.
           SORT GTAB BY LAND1 REGIO NAME1 KUNNR BUKRS KKBER GSBER SORT_GSB.
           "TONYC
           REPORT_TYPE = 'consolidated'.
         ELSEIF NOT P_SUPREP[] IS INITIAL.                      "DEVK939546
           SORT GTAB
             BY SUPER REP NAME1 BUKRS KKBER LAND1 REGIO NAME1 GSBER SORT_GSB.
      BC   SUNILP   05/15/2007
           SORT GTAB_LINES
             BY SUPER REP NAME1 BUKRS KKBER LAND1 REGIO NAME1 GSBER SORT_GSB.
      EC   SUNILP   05/15/2007
           REPORT_TYPE = 'super rep'.
           CLEAR STAB.   "tonyc 03/06/2004
           REFRESH STAB. "tonyc 03/06/2004
         ELSEIF NOT P_REP[] IS INITIAL.                         "DEVK939546
           SORT GTAB                                            "DEVK939546
             BY REP NAME1 BUKRS KKBER LAND1 REGIO NAME1 GSBER SORT_GSB.
                                                                "DEVK939546
      BC   SUNILP   05/15/2007
           SORT GTAB_LINES
             BY REP NAME1 BUKRS KKBER LAND1 REGIO NAME1 GSBER SORT_GSB.
      EC   SUNILP   05/15/2007
           REPORT_TYPE = 'rep'.                                 "DEVK939546
           CLEAR STAB.   "tonyc 03/06/2004
           REFRESH STAB. "tonyc 03/06/2004
         ELSE.
           SORT GTAB BY BUKRS KKBER LAND1 REGIO NAME1 KUNNR GSBER SORT_GSB.
      BC   SUNILP   05/15/2007
           SORT GTAB_LINES BY BUKRS KKBER LAND1 REGIO NAME1 KUNNR GSBER SORT_GSB.
      EC   SUNILP   05/15/2007
           REPORT_TYPE = 'regular'.
         ENDIF.
      BC   SUNILP   05/15/2007
         DELETE ADJACENT DUPLICATES FROM GTAB COMPARING BUKRS NAME1.
         LOOP AT GTAB_LINES.
           IF P_REP[] IS INITIAL.
             IF GTAB_LINES-SUPER NOT IN P_SUPREP.
               DELETE GTAB_LINES.
             ENDIF.
           ELSE.
             IF GTAB_LINES-SUPER NOT IN P_SUPREP OR GTAB_LINES-REP NOT IN P_REP.
               DELETE GTAB_LINES.
             ENDIF.
           ENDIF.
         ENDLOOP.
         LOOP AT GTAB.
           READ TABLE GTAB_LINES WITH KEY BUKRS = GTAB-BUKRS
                                          NAME1 = GTAB-NAME1.
           IF SY-SUBRC NE '0'.
             DELETE GTAB.
           ENDIF.
         ENDLOOP.
      EC   SUNILP   05/15/2007
         LOOP AT GTAB.
           MOVE GTAB-BUKRS TO T001-BUKRS. READ TABLE T001.
           RESERVE 5 LINES.
           CASE REPORT_TYPE.
             WHEN 'regular'.
               IF HOLD_BUKRS <> GTAB-BUKRS.
                 IF SY-TABIX > 1.                                   "TONYC
                   NEW-PAGE. SKIP.                                 "TONYC
                 ENDIF.                                             "TONYC
               ENDIF.
               PERFORM WRITE_CUST_INFO.                               "TONYC
               PERFORM WRITE_DETAIL.
             hold_bukrs = gtab-bukrs.                               "tonyc
             WHEN 'consolidated'.
               IF HOLD_KUNNR <> GTAB-KUNNR.                           "TONYC
                 PERFORM WRITE_CUST_INFO.                           "TONYC
               ENDIF.                                                 "TONYC
               HOLD_KUNNR = GTAB-KUNNR.                               "TONYC
               PERFORM WRITE_DETAIL.
             WHEN 'super rep'.
              IF GTAB-T_IND NE 'X'.
       BC     SUNILP     05/22/2007
                READ TABLE GTAB_LINES WITH KEY BUKRS = GTAB-BUKRS
                                               NAME1 = GTAB-NAME1.
       EC     SUNILP     05/22/2007
                IF ( HOLD_SUPER <> GTAB_LINES-SUPER ) OR
                   ( HOLD_REP2 <> GTAB_LINES-REP ).
                  NEW-PAGE.
                  PERFORM GET_AND_WRITE_SUPERINFO.
                ENDIF.
                HOLD_REP2 = GTAB_LINES-REP.
                HOLD_SUPER = GTAB_LINES-SUPER.
                IF HOLD_KUNNR <> GTAB-KUNNR.                           "TONYC
                  WRITE :/.                                           "TONYC
                  ULINE.                                              "TONYC
                  PERFORM WRITE_CUST_INFO.                            "TONYC
                ENDIF.                                                 "TONYC
                HOLD_KUNNR = GTAB-KUNNR.                               "TONYC
                PERFORM WRITE_DETAIL.                                  "TONYC
                AT END OF REP.                                 "DEVK939546
                  SKIP.                                        "DEVK939546
                  RESERVE 7 LINES.                             "DEVK939546
                  FORMAT COLOR COL_TOTAL INTENSIFIED.          "DEVK939546
                  WRITE: / 'Summary for Rep:',                 "DEVK939546
                            GTAB-REP, '/', REP_NAME, 132 ONEBYTE."DEVK939546
                  PERFORM WRITE_TOTS TABLES RTOT.              "DEVK939546
                  REFRESH RTOT.                                "DEVK939546
                ENDAT.                                         "DEVK939546
                AT END OF SUPER.                               "DEVK939546
                  CLEAR STAB.   "tonyc 03/06/2004
                  REFRESH STAB. "tonyc 03/06/2004
                  NEW-PAGE. SKIP.                              "DEVK939546
                  FORMAT COLOR COL_TOTAL INTENSIFIED.          "DEVK939546
                  WRITE: / 'Summary for Super Rep:',           "DEVK939546
                         GTAB-SUPER, '/', SUPER_NAME, 132 ONEBYTE."DEVK939546
                  PERFORM WRITE_TOTS TABLES STOT.              "DEVK939546
                  REFRESH STOT.                                "DEVK939546
                ENDAT.                                         "DEVK939546
              ELSE.
               LOOP AT GTAB_LINES WHERE BUKRS = GTAB-BUKRS
                                    AND NAME1 = GTAB-NAME1.
                 IF ( HOLD_SUPER <> GTAB_LINES-SUPER ) OR
                    ( HOLD_REP2 <> GTAB_LINES-REP ).
                   NEW-PAGE.
                   PERFORM GET_AND_WRITE_SUPERINFO.
                 ENDIF.
                 HOLD_REP2 = GTAB_LINES-REP.
                 HOLD_SUPER = GTAB_LINES-SUPER.
                 IF HOLD_KUNNR <> GTAB_LINES-KUNNR.
                   WRITE :/.
                   ULINE.
                   PERFORM WRITE_CUST_INFO.
                 ENDIF.
                 HOLD_KUNNR = GTAB_LINES-KUNNR.
                 PERFORM WRITE_DETAIL.
                 AT END OF REP.
                   SKIP.
                   RESERVE 7 LINES.
                   FORMAT COLOR COL_TOTAL INTENSIFIED.
                   WRITE: / 'Summary for Rep:',
                             GTAB_LINES-REP, '/', REP_NAME, 132 ONEBYTE.
                   PERFORM WRITE_TOTS TABLES RTOT.
                   REFRESH RTOT.
                 ENDAT.
                 AT END OF SUPER.
                   CLEAR STAB.   "tonyc 03/06/2004
                   REFRESH STAB. "tonyc 03/06/2004
                   NEW-PAGE. SKIP.
                   FORMAT COLOR COL_TOTAL INTENSIFIED.
                   WRITE: / 'Summary for Super Rep:',
                          GTAB_LINES-SUPER, '/', SUPER_NAME, 132 ONEBYTE.
                   PERFORM WRITE_TOTS TABLES STOT.
                   REFRESH STOT.
                 ENDAT.
               ENDLOOP.
              ENDIF.
             WHEN 'rep'.                                        "DEVK939546
               LOOP AT GTAB_LINES WHERE BUKRS = GTAB-BUKRS
                                    AND NAME1 = GTAB-NAME1.
                 IF HOLD_REP2 <> GTAB_LINES-REP.                "DEVK939546
                   NEW-PAGE.                                    "DEVK939546
                   PERFORM GET_AND_WRITE_REPINFO.               "DEVK939546
                 ENDIF.                                         "DEVK939546
                 HOLD_REP2 = GTAB_LINES-REP.                    "DEVK939546
                 IF HOLD_KUNNR <> GTAB_LINES-KUNNR.             "DEVK939546
                   WRITE :/.                                    "DEVK939546
                   ULINE.                                       "DEVK939546
                   PERFORM WRITE_CUST_INFO.                     "DEVK939546
                 ENDIF.                                         "DEVK939546
                 HOLD_KUNNR = GTAB_LINES-KUNNR.                 "DEVK939546
                 PERFORM WRITE_DETAIL.                          "DEVK939546
                 AT END OF REP.                                 "DEVK939546
                   SKIP.                                        "DEVK939546
                   RESERVE 7 LINES.                             "DEVK939546
                   FORMAT COLOR COL_TOTAL INTENSIFIED.          "DEVK939546
                   WRITE: / 'Summary for Rep:',                 "DEVK939546
                             GTAB_LINES-REP, '/', REP_NAME, 132 ONEBYTE."DEVK939546
                   PERFORM WRITE_TOTS TABLES RTOT.              "DEVK939546
                   REFRESH RTOT.                                "DEVK939546
                 ENDAT.                                         "DEVK939546
               ENDLOOP.
           ENDCASE.
         ENDLOOP.
       ENDIF.
       OP = ' '.
       REFRESH GTAB.
       IF NOT REPORT_TYPE = 'super rep'.
         ULINE.
       ENDIF.
       SKIP 1.
       IF  SUMMEN = ' '.  "if 'output totals only' bypass new-page
         NEW-PAGE. SKIP.
       ENDIF.
       WRITE: /25 TEXT-030, 132 ONEBYTE, /25 TEXT-031, 132 ONEBYTE.
       PERFORM WRITE_TOTS TABLES STAB.                          "DEVK939546
    TOP-OF-PAGE.
       INTENS = SPACE.
       FORMAT COLOR COL_HEADING INTENSIFIED ON.
       WRITE: / SY-VLINE, 1 TEXT-001, DD_STIDA, 75 TEXT-051, 132 SY-VLINE.
       ULINE.
       WRITE: / SY-VLINE, 13 SY-VLINE, 30 SY-VLINE,
                    47 SY-VLINE, 58 TEXT-003, 81 SY-VLINE,
              92 TEXT-003, 115 SY-VLINE, 118  TEXT-003, 132 SY-VLINE,
              / SY-VLINE, 02 TEXT-004, 13 SY-VLINE, TEXT-002,
                    30 SY-VLINE, 32 TEXT-018, 47 SY-VLINE,
                  50 '1', 54 TEXT-040, 57 TAGE1, 64 SY-VLINE,   " 65 tage2,
                  67 TAGE1A, 72 TEXT-040, 75 TAGE2,
                81 SY-VLINE, 83 TAGE2A, 89 TEXT-040, 91 TAGE3, 98 SY-VLINE,
               101 TAGE3A, 107 TEXT-040, 110 TAGE4, 115 SY-VLINE,
                                   117 TAGE4, 123  TEXT-017, 132 SY-VLINE.
       ULINE.
       SKIP 1.
       SUMMARY.
       FORMAT COLOR COL_HEADING INTENSIFIED OFF.
          FORM write_tots                                               *
    -->  PTAB                                                          *
    FORM WRITE_TOTS TABLES PTAB TYPE TOT_TAB.                  "DEVK939546
       CLEAR INTENS.                                            "DEVK939546
       FORMAT COLOR COL_HEADING INTENSIFIED OFF.                "DEVK939546
       IF P_CONV = 'X'. "tonyc issue #3047 begin
         WRITE /4 TEXT-101.
         WRITE: /4 TEXT-102,
                50 TEXT-100.
       ENDIF.           "tonyc issue #3047 end
       ULINE.                                                   "DEVK939546
       SORT PTAB BY BUKRS GSBER.                                "DEVK939546
       LOOP AT PTAB.                                            "DEVK939546
         IF SY-TABIX > 1.
           WRITE_TOTAL = 'X'.
         ENDIF.
         MOVE PTAB-BUKRS TO T001-BUKRS. READ TABLE T001.        "DEVK939546
         MOVE PTAB-GSBER TO T001-WAERS.                         "DEVK939546
         IF P_CONV = 'X'. "tonyc issue #3047 begin
           PERFORM CONVERT_VALUES USING STAB-RAST1
                                        STAB-GSBER.
           PERFORM CONVERT_VALUES USING STAB-RAST2
                                        STAB-GSBER.
           PERFORM CONVERT_VALUES USING STAB-RAST3
                                        STAB-GSBER.
           PERFORM CONVERT_VALUES USING STAB-RAST4
                                        STAB-GSBER.
           PERFORM CONVERT_VALUES USING STAB-RAST5
                                        STAB-GSBER.
           PERFORM CONVERT_VALUES USING STAB-RAST6
                                        STAB-GSBER.
           PERFORM CONVERT_VALUES USING STAB-RAST7
                                        STAB-GSBER.
         ENDIF.  "TOnyc issue #3047 end
         MOVE-CORRESPONDING PTAB TO STAB.
         COLLECT STAB.
         IF P_KKBER = 'X'.        "TONYC ISSUE #2500
           CLEAR HOLD_KKBER_DESC2.
           SELECT SINGLE KKBTX INTO HOLD_KKBER_DESC2 FROM T014T
              WHERE KKBER = STAB-KKBER AND
                    SPRAS = 'E'.
           IF SY-SUBRC <> '0'.
             HOLD_KKBER_DESC2 = 'Undetermined'.
           ENDIF.
           FORMAT COLOR OFF.
           WRITE: / SY-VLINE.
           FORMAT COLOR COL_HEADING INTENSIFIED OFF.
           WRITE: 6 STAB-GSBER, HOLD_KKBER_DESC2, SY-VLINE.
           ULINE.
           FORMAT COLOR OFF.
           WRITE: / SY-VLINE.
           FORMAT COLOR COL_HEADING INTENSIFIED OFF.
           IF P_CONV = 'X'. "tonyc issue #3047 begin
             T001-WAERS = 'USD'.
           ENDIF.           "tonyc issue #3047 end
           WRITE: 13 STAB-RAST1 NO-ZERO CURRENCY T001-WAERS, SY-VLINE,
           (14) STAB-RAST7 NO-ZERO CURRENCY T001-WAERS, SY-VLINE,
           (14) STAB-RAST2 NO-ZERO CURRENCY T001-WAERS, SY-VLINE,
           (14) STAB-RAST3 NO-ZERO CURRENCY T001-WAERS, SY-VLINE,
           (14) STAB-RAST4 NO-ZERO CURRENCY T001-WAERS, SY-VLINE,
           (14) STAB-RAST5 NO-ZERO CURRENCY T001-WAERS, SY-VLINE,
           (14) STAB-RAST6 NO-ZERO CURRENCY T001-WAERS, SY-VLINE.
           HOLD_BUKRS2 = STAB-BUKRS.      "TONYC ISSUE #2500
           ULINE.
           FORMAT COLOR OFF.
           TOTAL_RAST1 = STAB-RAST1 + TOTAL_RAST1.
           TOTAL_RAST2 = STAB-RAST2 + TOTAL_RAST2.
           TOTAL_RAST3 = STAB-RAST3 + TOTAL_RAST3.
           TOTAL_RAST4 = STAB-RAST4 + TOTAL_RAST4.
           TOTAL_RAST5 = STAB-RAST5 + TOTAL_RAST5.
           TOTAL_RAST6 = STAB-RAST6 + TOTAL_RAST6.
           TOTAL_RAST7 = STAB-RAST7 + TOTAL_RAST7.
         ELSE.
           FORMAT COLOR COL_NORMAL INTENSIFIED OFF.             "DEVK939546
           IF INTENS = SPACE.                                   "DEVK939546
             FORMAT COLOR COL_NORMAL INTENSIFIED OFF.           "DEVK939546
             INTENS = 'X'.                                      "DEVK939546
           ELSE.                                                "DEVK939546
             FORMAT COLOR COL_NORMAL INTENSIFIED ON.            "DEVK939546
             INTENS = SPACE.                                    "DEVK939546
           ENDIF.                                               "DEVK939546
           WRITE: / SY-VLINE, PTAB-BUKRS, PTAB-GSBER, SY-VLINE, "DEVK939546
            (14) PTAB-RAST1 NO-ZERO CURRENCY T001-WAERS, SY-VLINE,"DEVK939546
            (14) PTAB-RAST7 NO-ZERO CURRENCY T001-WAERS, SY-VLINE,"DEVK939546
            (14) PTAB-RAST2 NO-ZERO CURRENCY T001-WAERS, SY-VLINE,"DEVK939546
            (14) PTAB-RAST3 NO-ZERO CURRENCY T001-WAERS, SY-VLINE,"DEVK939546
            (14) PTAB-RAST4 NO-ZERO CURRENCY T001-WAERS, SY-VLINE,"DEVK939546
            (14) PTAB-RAST5 NO-ZERO CURRENCY T001-WAERS, SY-VLINE,"DEVK939546
            (14) PTAB-RAST6 NO-ZERO CURRENCY T001-WAERS, SY-VLINE."DEVK939546
           TOTAL_RAST1 = STAB-RAST1 + TOTAL_RAST1.
           TOTAL_RAST2 = STAB-RAST2 + TOTAL_RAST2.
           TOTAL_RAST3 = STAB-RAST3 + TOTAL_RAST3.
           TOTAL_RAST4 = STAB-RAST4 + TOTAL_RAST4.
           TOTAL_RAST5 = STAB-RAST5 + TOTAL_RAST5.
           TOTAL_RAST6 = STAB-RAST6 + TOTAL_RAST6.
           TOTAL_RAST7 = STAB-RAST7 + TOTAL_RAST7.
         ENDIF.
       ENDLOOP.                                                 "DEVK939546
       ULINE.                                                   "DEVK939546
       IF P_KKBER = 'X'.        "TONYC ISSUE #2500
         IF P_CONV = 'X'.  "tonyc issue #3047 begin
           FORMAT COLOR OFF.
           FORMAT COLOR COL_HEADING INTENSIFIED OFF.
           WRITE: SY-VLINE,
                6 'TOTAL                                   ', SY-VLINE.
           ULINE.
           FORMAT COLOR OFF.
           WRITE: / SY-VLINE.
           FORMAT COLOR COL_HEADING INTENSIFIED OFF.
           WRITE: 13 TOTAL_RAST1 NO-ZERO CURRENCY T001-WAERS, SY-VLINE,
           (14) TOTAL_RAST7 NO-ZERO CURRENCY T001-WAERS, SY-VLINE,
           (14) TOTAL_RAST2 NO-ZERO CURRENCY T001-WAERS, SY-VLINE,
           (14) TOTAL_RAST3 NO-ZERO CURRENCY T001-WAERS, SY-VLINE,
           (14) TOTAL_RAST4 NO-ZERO CURRENCY T001-WAERS, SY-VLINE,
           (14) TOTAL_RAST5 NO-ZERO CURRENCY T001-WAERS, SY-VLINE,
           (14) TOTAL_RAST6 NO-ZERO CURRENCY T001-WAERS, SY-VLINE.
           ULINE.
         ENDIF. "tonyc issue #3047 end
       ELSE.
         IF P_CONV = 'X'.
           FORMAT COLOR OFF.
           FORMAT COLOR COL_HEADING INTENSIFIED OFF.
           WRITE: SY-VLINE,
                6 'TOTAL                                   ', SY-VLINE.
           ULINE.
           FORMAT COLOR OFF.
           WRITE: / SY-VLINE.
           FORMAT COLOR COL_HEADING INTENSIFIED OFF.
           WRITE: 13 TOTAL_RAST1 NO-ZERO CURRENCY T001-WAERS, SY-VLINE,
           (14) TOTAL_RAST7 NO-ZERO CURRENCY T001-WAERS, SY-VLINE,
           (14) TOTAL_RAST2 NO-ZERO CURRENCY T001-WAERS, SY-VLINE,
           (14) TOTAL_RAST3 NO-ZERO CURRENCY T001-WAERS, SY-VLINE,
           (14) TOTAL_RAST4 NO-ZERO CURRENCY T001-WAERS, SY-VLINE,
           (14) TOTAL_RAST5 NO-ZERO CURRENCY T001-WAERS, SY-VLINE,
           (14) TOTAL_RAST6 NO-ZERO CURRENCY T001-WAERS, SY-VLINE.
           ULINE.
         ENDIF.
       ENDIF.
       SKIP 1.                                                  "DEVK939546
    ENDFORM.                                                   "DEVK939546
    *&      Form  GET_KNKK_INFO
          text
    -->  p1        text
    <--  p2        text
    FORM GET_KNKK_INFO.
       CLEAR: G_WAERS,
              G_KLIMK_TXT,
              KNKK-KLIMK.
    get credit control area (KKBER) for comp code (BUKRS)
       SELECT SINGLE KLIMK
              INTO   KNKK-KLIMK
              FROM   KNKK
              WHERE  KUNNR = KNA1-KUNNR  AND
                     KKBER = T001-KKBER.
       IF SY-SUBRC = 0.
      get currency for cred ctrl area
         CLEAR IT_T014.
         READ TABLE IT_T014 WITH KEY KKBER = T001-KKBER BINARY SEARCH.
         G_WAERS = IT_T014-WAERS.
         WRITE KNKK-KLIMK TO G_KLIMK_TXT CURRENCY G_WAERS.
       ENDIF.
    ENDFORM.                    " GET_KNKK_INFO
    *&      Form  SELECT_KNKK
          text
         -->P_KKBER       Credit Limit Controlling Area

    This is a FI Aging report.

  • Issue with Upgrading to 2nd Generation MotoX

    Dear Verizon Wireless and Motorola Mobility,
    Your 2nd Generation Moto X Upgrade program is fatally flawed and my experience highlights everything that could possibly go wrong when attempting to upgrade an existing plan.
    As Verizon replied to my tweet (my twitter name is @melting_plastic), “Getting a new phone should be an exciting time.” but my experience has been everything but that.
    My current phone is a Motorola Droid Razr Maxx. This was my first entry into the Android operating system and I fell in love. As a former Blackberry user, I was a bit hesitant to switch but upon receiving this phone in May of 2012, I had nothing but a great experience with it. This experience made want to continue with a Motorola phone upon my next available upgrade and I had waited to upgrade my phone until the newest Motorola phones were announced. I put off my upgrade for over 5 months waiting for the announcement of a new phone with my current phone deteriorating. The battery life has dropped to less than 2 hours and it has begun to freeze constantly with all the upgrades to software that it is unable to handle. Due to these issues, I checked every day waiting for an announcement of the new Moto X to be release and was finally happy when it was announced it would be released on September 27th for Verizon.
    On the morning of Friday September 27th, I attempted to order my phone, a 32gb model, through the MotoMaker website and my first issue arose. Even though I was eligible for an upgrade, the MotoMaker website required a credit check for me to upgrade. As I am not the primary account holder, I did not feel comfortable inputting my father's information for a credit check. I also felt it was not necessary as I was paying the $149.99 by my credit card and the account has been with Verizon since the mid 1990's while it was still Bell Atlantic. As I was eligible for an upgrade and not a new account, it seemed a bit much that this credit check was needed. After searching the internet, I found many posts from the original Moto X release about this issue and the solution was to go to a Verizon Wireless store and pre-purchase the phone there and use the provided pin to order the phone at the MotoMaker website.
    During my lunch break on September 27th, I visited the Wireless Zone retailer in Malvern Pennsylvania and waited for over 45 minutes to talk to an associate in an attempt to pre-purchase this phone and receive a pin for the website. This associated had no information about the ability to purchase this pin nor could he order the 32gb model directly for me. He apologized to me about the wait and his inability to fulfill my order but recommended me to go to a retail Verizon Wireless store as they may be able to help me.
    After returning to work, I decided to attempt to discuss my issue using the Verizon Wireless help chat on its website. The operator suggested to call the Verizon support line and that they should be able to help me on this purchase. I proceeded to place the call, once again waiting on hold for 30 minutes, until I finally was able to talk to a representative. This representative was unable to help me but transferred me to another department that may be able to. After a brief hold, I was transferred to an individual who was finally able to help me out. He informed me that the 32gb model was not in the Verizon system but was expected to be added on October 1st. He apologized for the wait but at least he was able to provide me with valid information.
    On Saturday October 4th, I visited the Verizon Retail location in King of Prussia Pennsylvania and once again waited 45 minutes before being seen by a representative. This time I was helped by an associate named Jeremy who knew exactly what I meant by purchasing a pin. After a bit of struggling to properly place the order, the order was placed with the help of a manager, at the price of $199.99 with a $50 mail-in-rebate. This became the 2nd area of disappointment. Not only did I have to wait to purchase this phone but I had to pay an increased rate up front and needed to send in for a mail-in-rebate. I thanked Jeremy for his help and headed back to my residence 15 miles away.
    Once home, I attempted to place the order for my phone. As I live 100+ miles away from the primary account address, I had planned to have the phone shipped to my work as I had done when I purchased my Droid Razr Maxx. The MotoMaker website prevented me from changing the shipping address and I was once against frustrated by this process. I used the MotoMaker online support tool and they informed me that I must contact Verizon and they can adjust the shipping address as each PIN has a pre-defined shipping address attached to it.
    I called Verizon's technical support line at approximately 4:30PM from my home phone. After once again waiting on hold for half an hour, I was finally connected to an associate and she was very friendly and attempted to help me with my shipping issue. She understood my frustration and placed a 3-way call between her, myself and Motorola support. During this call, she and myself became very frustrated with Motorola support staff as they refused to adjust the shipping address and stated that there was nothing that they could do. She apologized to me and suggested that I return to the King of Prussia location and attempt to sort it out there.
    Begrudgingly, I returned to the Verizon location and once again waited to speak to Jeremy. He apologized for my situation and saw the only way to rectify it was to have FedEx adjust the shipment address after it had been shipped. He informed me that any charges that would be incurred to do so would be credited to my account if I returned to the store with the receipt.
    I returned home and attempted to place the order again. This time I was able to adjust my shipping address and placed the order. While doing so, I received an error message and was instructed to call Motorola's support line. I called this line at around 7:45PM and spoke to a gentleman named Christian. He opened up support case 141005-006808 and informed me that because of my attempt to change the shipping address, this was why the error occurred. He instructed me to attempt to replace the order using the original supplied address and e-mail account and that I “must” use the Chrome web browser. This statement of having to use the Chrome browser was a complete fallacy and he refused to accept that any other browser could be used to properly order the phone. I installed the Chrome browser, attempted to order the phone and this time I was informed that my PIN was already used, likely during the original failed attempt. Christian informed me that he must escalate the issue and it would take an additional 24-48 hours. The simple act of creating a new PIN should not take this amount of time.
    On Monday October 6th, I was finally able to get in contact with another associate from Motorola who was instantly able to create a new PIN for me. I once again placed the order and this time it went through with no issue, order number 00789348. The only disappointment was that I now had to wait until “approximately October 27th” to receive my new phone. During my waiting period, I periodically check the MotoMaker website and during that time, noticed that they offered an additional $50 discount on the Verizon Moto X which would have brought my total down to $99.99. So on top of the additional wait and disappointment, I had now paid $100 over the current price through MotoMaker .
    On Tuesday, October 22nd, I finally received the e-mail stating that my phone had shipped and was due to arrive in Forked River, NJ on October 23rd. Using the FedEx website, I attempted to adjust my shipping address to my work, at the cost of $30 and a delay until Friday October 24th. I was unable to perform this action and then attempted to adjust the shipping address to the location I would be at Friday night (my sister's house) for the same delay, but only a cost of $5. Once again I was unable to perform this action and decided to call FedEx directly. After speaking to the associate at FedEx, she informed me that the only way to adjust the address was to have the shipper, Motorola Mobility adjust the address. With my previous issues with Motorola, I knew that this request would be denied. At this point, my only recourse is to have my parents ship me the phone to my work once they receive it on October 23rd. Even then, I'm unsure if FedEx will leave the phone at the location without a signature if no one is there to sign for it, which is why I attempted to ship the phone to my work.
    At this point, I'm extremely dissatisfied with both Verizon and Motorola with how this whole situation has transpired. I feel a though I should have purchased an Apple iPhone 6 even though I am not a fan of the iOS platform or a different Android OS manufacturer. As a Fios account holder, I am also tempted to switch to the competition after 3+ years of being a customer. I feel that both Motorla and Verizon failed to rectify any hardship I had experienced in my attempt to purchase this phone and even now fear that I will not receive my phone in time to mail in mail-in-rebate which needs to be postmarked by November 1st.

        MPerreca, This is quite a lot for you to have to go through! We surely don't want to lose your business as we appreciate your loyalty with us. I understand the challenges that can come in needing the shipping address changed on your phone orders. I'm glad to learn that the phone is now on it's way.
    I'm confident that you'll be fine with submitting the rebate for your phone. If you do run into troubles with the submission, please let us know. You can also pre-submit your rebate information, here: http://bit.ly/1kKwKJK. Let us know if you have further concerns.
    TanishaS1_VZW
    Follow us on Twitter @VZWSupport

  • Performance issue with HRALXSYNC report..

    HI,
    I'm facing performance issue with the HRALXSYNC report. As this is Standard report, Can any body suggest me how to optimize the standard report..
    Thanks in advance.
    Saleem Javed
    Moderator message: Please Read before Posting in the Performance and Tuning Forum, also look for existing SAP notes and/or send a support message to SAP.
    Edited by: Thomas Zloch on Aug 23, 2011 4:17 PM

    Sreedhar,
    Thanks for you quick response. Indexes were not created for VBPA table. basis people tested by creating indexes and gave a report that it is taking more time with indexes than regular query optimizer. this is happening in the funtion forward_ag_selection.
    select vbeln lifnr from vbpa
         appending corresponding fields of table lt_select
         where     vbeln in ct_vbeln
         and     posnr eq posnr_initial
         and     parvw eq 'SP'
         and     lifnr in it_spdnr.
    I don't see any issue with this query. I give more info later

  • Issue with Bex report - key Figures not populating correctly.

    Hi Experts,
    I am facing an issue with a Bex report. There are three key figures of data type DATE having "Dec - Counter or amount field with comma and sign" datatype. After executing the query, in the report, for some sales documents the key figure fields are coming as 'X' and rest others are coming correctly in the date format as mm\dd\yyyy.
    When i check in the cube, these key figures shows values in decimal format and not in date format. The conversion is happening during execution.
    Pleas show me some light on how to identify the cause of getting 'X' for some Sales documents in the report eventhough some are coming correctly.
    Thanks,
    Anamika
    Edited by: Anamika Soni on Mar 12, 2010 10:48 AM

    Hi,
    The infobject has been defined with datatype "DATE" only. It has also been mapped from datasource to infocube correctly as these key figures are populating correctly for some of the sales documents in the report. It is not like that for all the sales documents the key figures are not converting properly.
    Some Sales documents are not converting into the date fields but for some conversion happens properly in the BEx report. This is the issue.
    Please guide accordingly.
    Many thanks,
    Anamika

  • Issue with SLA reports of Exchange 2010 MP in SCOM 2007 R2 !!

    Hi,
    I have issues with Exchange 2010 MP SLA reporting. Whenever report is run it fails on some or the other dataset(Outage**,SLAbyDAte etc.) When I digged in, I found that it is connecting to DW Exchange 2010 Availability tables + Planned maintainance +
    outage table. The tables were not available in the DW, not sure how it got removed. Initially I tried by uninstalling and installing MP(Exchange 2010  & Exchange 2010 reports both) if relevant tables get created automatically but it did
    not help and I was still facing the same issue. Then I tried to create the tables manually and check if it could resolve the issue. There was unique ID associated(different in different computer) with the name of most of the tables. I tool it from Exchange
    report data source which exists in reporting server. But I could see that table remain empty with no records there and SLA report start giving different issues stating table instances do not exist.
    Could anyone help me to restore the SLA report of Exchange 2010 MP ? How should I ensure that data start populating the tables ? I am also helpless here because we do not have correct DW dump to restore back to earlier when it was working fine.
    //BR

    Hi,
    Based on my research, to correctly install the Correlation Engine, consider the following when you install the Exchange 2010 Monitoring Management Pack:
    Determine which server will host the Correlation Engine. While not strictly required, it's strongly recommended that the Correlation Engine be installed on the Root Management Server computer.
    Make sure that you download and install the Exchange 2010 Management Pack that matches the operating system for the selected server. You can install the 32-bit or 64-bit version.
    Make sure that you run the Microsoft Installer (.msi) package on the server where you want the Exchange 2010 Management Pack and the Correlation Engine to be installed.
    After the installation is complete, the Correlation Engine service will have been installed on the server, and the Management Pack files will have been copied to the
    System Center Management Packs folder. By default, the installation directory is C:\Program Files\System Center Management Pack.
    Quote from:
    http://technet.microsoft.com/en-us/library/ee758051(v=exchg.140).aspx
    In addition, here is a similar thread for your reference:
    http://social.technet.microsoft.com/Forums/systemcenter/en-US/e75e84d9-0c9e-4d83-b3da-45a143757f85/exchange-2010-monitoring-with-scom-2012-correlation-service-issue
    Regads,
    Yan Li
    Regards, Yan Li

Maybe you are looking for

  • Creating a webservice from PL/SQL Package in JDev 11g

    Hi All... I have a PL/SQl package and I am using JDEv 11g. I want to create it as a webservice. I want to deploy it in a remote server. Can I deploy it from my client machine. In server Weblogic already started. What are the prerequisites, that we ne

  • Effects of Goods Receipt for PO with A/C assignment to Network?

    Dear All, Does anyone know what is the effect in the system after I posted a Goods Receipt for a Purchase order item with account assignment to a Network (Project Systems). The account assignment is 'N' in the Purchase Order. Best Regards, Junwen

  • WHITE SCREEN OF DEATH REM

    I have a Zen Micro 5 gig. Had the WHITE SCREEN OF DEATH. Upgraded to the latest firmware. Recharged for a loooooong time. This is WHAT WORKED FOR ME: I took out the FULLY CHARGED BATTERY and counted to 0 slowly. I put the battery back in. I held my f

  • Keeps booting into safe mode ..

    I just tried to install the newest version of Lion and it didnt install successfully and now it boots up in safe mode every time. Please help I'm a new mac user and this is not a good first experience for me.. Oh and when I actually boot it into safe

  • Using Google api in Flash

    Hi I want to get input ZIPCODE from user and want to get distance from my Location > user enter zipcode (home town location ) > send data to google maps >return of distance from user's location to my location is that possible ?