Tax Reporting USA using BI

Hello Experts,
I am looking for some standard extractor availability for tax reporting in BI. I am not a BI consultant but we are trying to validate feasibility of implementing BI tax report vs ABAP tax report.
Please let me know.
Thanks.

Hello Nikhil,
please read the informations in sap note 197201.
Additional informations:
for Releases 4.64 to 4.72 use following Function Modules:
-  FKK_EVENT_0010_REPDATA_GEN_464
-  FKK_EVENT_0020_REPDATA_GEN_464
-  FKK_EVENT_0030_REPDATA_GENERIC
As of Release 600, use the following modules:
-  FKK_EVENT_0010_REPDATA_GENTX
-  FKK_EVENT_0020_REPDATA_GENTX
-  FKK_EVENT_0030_REPDATA_GENERIC
The customizing in FI-CA you can find here:
Financial Accounting --> Contract Accounts Receivable and Payable --> Basic Functions --> Tax Reports
I hope I could help you.
Christiane

Similar Messages

  • Tax Reporting USA

    Hello Experts,
    I am looking for some standard transactions for tax reporting (jurisdiction code level). So far I found standard report RFKKTX00 which has its own limitations. Is there anything that can be used for US based tax reporting?
    Please let me know. Thanks.
    Kind Regards,
    Nikhil.

    Hello Nikhil,
    please read the informations in sap note 197201.
    Additional informations:
    for Releases 4.64 to 4.72 use following Function Modules:
    -  FKK_EVENT_0010_REPDATA_GEN_464
    -  FKK_EVENT_0020_REPDATA_GEN_464
    -  FKK_EVENT_0030_REPDATA_GENERIC
    As of Release 600, use the following modules:
    -  FKK_EVENT_0010_REPDATA_GENTX
    -  FKK_EVENT_0020_REPDATA_GENTX
    -  FKK_EVENT_0030_REPDATA_GENERIC
    The customizing in FI-CA you can find here:
    Financial Accounting --> Contract Accounts Receivable and Payable --> Basic Functions --> Tax Reports
    I hope I could help you.
    Christiane

  • US Withholding tax report for 1099M missing amount

    HI all,
      When i run the 1099M Listing using S_ALR_87012143 for year 2009 with clearing date of 1/1/09 to 12/31/09 for one vendor,
    it shows the cleared and open items TOTAL correctly.  This includes one document with posting date of 12/31/2008 and the clearing date is 1/6/2009.  The rest of the included documents are with 2009 posting dates and clearing dates.
       However, when i run the US: WIthholding tax report for 1099M for this vendor for 2009, although the clearing date is 1/1/09 to 12/31/09, it did not show the correct total.  It is missing the amount for one document with posting date of 12/31/2008 and clearing date of 1/6/2009.    Is there anyway i could get this missing amount to be included for the year 2009 ?
    The tax report is using:  S_PL0_09000314 ( RFW1099M ).
       Please advise.
    thanks
    Joyce

    no replies

  • Italian withholding tax report

    Hi all,
    Does anyone knows about a standard SAP withholding tax report specifically used to meet Italian requirements?
    kind regards,
    Camilla

    Hi Camilla
    Here is the link from SAP help on Italy legal reporting
    http://help.sap.com/saphelp_47x200/helpdata/en/e5/0dba3a12982346b826785fe4b39985/frameset.htm
    Hope this helps
    Thanks
    Ashok-- Assign points for useful answer

  • US TAX Reporter

    Hello Gurus,
    I have created custom (ZHR_W2) form for W2 using se71 and want to use this form in tax reporter PU19. How do I customize to tax reporter to use ZHR_W2 form?
    Thanks in Advance and promise to give max points for helpful answers/tips.

    Hi,
    I hope ur probleum is slove, can u plz help me out i also need to prepare TAX Report for US. plz provied me with ur personnel e-maild address. my e-mail is [email protected]
    Pradeep

  • USA-WITHHOLDING TAX REPORT FOR 1099-

    Hai All,
    I want to know the printing form name of USA-WITHHOLDING TAX REPORT FOR 1099-MISC.
    Pls help.
    Regards,
    Sneha

    Hi,
    Thanks for your reply.
    I am using transaction S_PL0_09000314 for USA-WITHHOLDING TAX REPORT FOR 1099 which has a selection screen.
    In that selection screen ,output control header i need to provide form name.As the form name is dynamically assigned inside the program and get executed i want to explicitly provide form name in selection screen.
    Pls provide me the latest form name if you are aware of it. Presently i  am providing   f_1099_taxformn   but nothing is getting diplayed.
    Regards,
    Sneha.

  • How to track the history of supplier sites used for tax reporting (1099)

    Hi,
    Oracle financials doesn't allow two supplier sites setup as tax reportable sites (Unless one is inactive). Suppose if the supplier uses site1 for the year 2009 and site 2 for 2010 and now there is site3 setup as tax reportable. All three sites were setup in 2009 and all three sites are active. Supplier chosen different sites for each year as their tax reportable site.
    How do we know which site oracle used to send 1099 for 2009 & 2010? How to track the history of supplier sites used for tax reporting (1099) in previous years?
    Thanks in advance.
    Regards,
    Ram

    Would the begin_date, end_date and status columns on HZ_PARTY_SITES_USES be any good? Our R12 installations is too new to have accumulated much data yet, but I would look in those columns first.

  • Use tax reports do not match

    Use tax reports do not match. One shows the GL account balance using FAGLB03 and the other is the use tax report S_ALR_87012394.  I need to use S_ALR_87012394 to determine the location of the tax and pay it but since it doesnu2019t match with the GL there will be issues.

    Hi,
    Under  these two cases i had found difference between vat reports and vat gl accounts.
    1) When the users are manual input the vat amount on the input invoice , resulting vat amount will be updated on the invoice and gl account BUT not the vat report.To find the these items go to the GL line item report and find the line items with BLANK VAT CODE.usually this will tend to use by the users when there are any rounding differences in the vat calculation. Also to avoid these cases hide the manaul vat amount field blank.
    2) When the users manually inputed the vat amount on the gl accounts, provided GL master are not checked with automatic postings only option.
    Best Regards
    Suresh Addagiri

  • Tax Report for Canada

    Hi everyone!!
    Does anyone knows the tax report that should be used for Canada? We have advised the business to use the standard S_ALR_87012394 (Record of Use and Sales Tax - USA) as it provides de info by customer/vendor, tax code and jurisdiction code.
    However, they have now come back to us saying that they will also need the system to display all the taxable items where a customer/vendor account has not been impacted. We have debugged the program and the system will only consider the customer/vendors' taxable items.
    Has anyone come through this issue before?
    Thank you very much in advance. Best regards

    Check this Configuration Guide
    [External Tax Determination - Canada|http://help.sap.com/bp_blv1600/BL_CA/documentation/ExtTax_ConfigGuide_EN_CA.doc]
    thanks
    G. Lakshmipathi

  • Tax reporting data elemnts

    Hello experts,
    I  am trying to document list of data elements required  for TAX reporting purposes.I understand that there are certain sap reports
    I wanted to capture following process.I was wondering if I can capture the data elements  to build an skeleton so that most of the process can be covered  any advised ?
    Deferred Tax Reporting
    EC Sales Tax List
    Withholding Tax Reporting
    Sales and Use Tax Reporting
    Regards,
    Amy

    Amy-
    Here are couple of reports i can think of for taxes:
    S_ALR_87012360 - Transfer Postings for Deferred Taxes
    S_ALR_87012394 - Record of Use and Sales Taxes (USA)
    In case of withholding taxes, you can use sap line item reports like FBL1N (Vendors), FBL3N (GL Accounts) FBL5N (Customers) and enter withholding tax code in dynamic selection or play around with the layout to get some data.
    I would also look at SAP Menu --> Accounting --> Financial Accounting --> General Ledger --> Reporting --> Tax Reports.
    You will see many reports here too.
    Hope this helps.
    Shail

  • TAx Reporter Temse Files Download Automation

    Hi,
    I have a reuiqrement to download the Temse files generated in Tax Reporter. I have completed the code and it works fine if we run the program in foreground. But when I run the same program in background some Temse files downloaded have junk characters. If I download the same Temse file in foreground it works fine.
    There seems to be some issue with the FM when I run my progam in background.
    I have searched SDN and SAP Notes for any clues but did not get any.
    REPORT  ZPHOP_TEMSE  NO STANDARD PAGE HEADING
                      LINE-SIZE 1023
                      LINE-COUNT 65
                      MESSAGE-ID zz.
    DATA: BEGIN OF tape OCCURS 1,
             DATA(2000),
          END OF tape.
    DATA: force_ascii type c VALUE 'T'.
    DATA:  BEGIN OF int_msgs2 OCCURS 10,
             errnum(2) TYPE c,
             text1(8) TYPE c,
             text2(60) TYPE c,
           END OF int_msgs2.
    DATA: BEGIN OF g_int_temse OCCURS 0,
             dname    LIKE TST01-dname,
             dpart    LIKE TST01-dpart,
             dcretime LIKE TST01-DCRETIME,
             dcreater LIKE TST01-DCREATER,
          END OF g_int_temse.
    DATA: record_length  TYPE i VALUE 275,
           data_length    TYPE i,
           convert_to_ebcdic,
           filesize TYPE i,
           number_of_records TYPE i VALUE 1,
           filetype(3) VALUE 'BIN',
           conv TYPE REF TO cl_abap_conv_out_ce,
           dline TYPE REF TO data,
           dtab TYPE REF TO data,
           p_compid(4),
           p_pswd(8),
           g_str(2000),
           uc_filename TYPE string.
    DATA: l_nm_fixed_record.
    CONSTANTS: c_lpath TYPE pathintern VALUE 'ZOUT'.
    TABLES: TST01, ZPHOPFLS, ZTEMSE_LOG, V_5UXY_A.
    FIELD-SYMBOLS: <dtab> TYPE STANDARD TABLE,
                   <dline> TYPE ANY.
    INCLUDE: dbpnpcom.           " No logical database        Do not modify!
    INCLUDE: zphoptop,           " Top Include                Do not modify!
             zphopfil.           " File inlcude               Do not modify!
    SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE text-T01.
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 1(30) text-001.
    SELECT-OPTIONS  s_temse FOR TST01-dname NO INTERVALS.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN END OF BLOCK B1.
    SELECTION-SCREEN BEGIN OF BLOCK B2 WITH FRAME TITLE text-T02.
    SELECT-OPTIONS  s_cai   FOR TST01-DCREATER NO INTERVALS.
    SELECT-OPTIONS  s_date  FOR sy-datum.
    SELECTION-SCREEN END OF BLOCK B2.
    SELECTION-SCREEN BEGIN OF BLOCK B3 WITH FRAME TITLE text-T03.
    PARAMETERS: p_ifid   LIKE t9aoa-if_id MODIF ID DIS ,
                p_fileid LIKE t9aoa-file_id MODIF ID DIS,
                p_unixf(60)  LOWER CASE MODIF ID DIS,
                p_uxdir  TYPE pathextern LOWER CASE MODIF ID DIS,
                p_dstfil(45) LOWER CASE MODIF ID DIS.
    SELECTION-SCREEN END OF BLOCK B3.
    PARAMETERS: p_skip AS CHECKBOX.
    DATA: ws_unixr LIKE p_unixf,
          ws_trans LIKE p_unixf.
    AT SELECTION-SCREEN OUTPUT.
      LOOP AT SCREEN.
        IF screen-group1 = 'DIS'.
          screen-output = '1'.
          screen-input  = '0'.
          MODIFY SCREEN.
        ENDIF.
      ENDLOOP.
    INITIALIZATION.
      p_ifid = 'PAYFLS'.
      p_compid = 'HR00'.
      p_fileid = '01'.
      p_unixf = 'AFS'.
      p_pswd = 'chevr123'.
      p_skip = 'X'.
    -End of Initialization--
      PERFORM get_physical_path.
      FORMAT COLOR COL_HEADING.
      WRITE: /01 text-t04,
              10 sy-pagno,
              41 text-t05,
             110 text-t06,
             123 sy-datum.
      WRITE: /01 text-t08,
              14 sy-repid,
             110 text-t07,
             125 sy-uzeit.
      FORMAT COLOR OFF.
      SKIP.
      WRITE: /(20) text-T21       CENTERED COLOR COL_HEADING,
              (15) text-T22       CENTERED COLOR COL_HEADING,
              (20) text-T23       CENTERED COLOR COL_HEADING,
              (15) text-T24       CENTERED COLOR COL_HEADING,
              (40) text-T25       CENTERED COLOR COL_HEADING.
    START-OF-SELECTION.
    *Do not allow background processing
    *Check if the Temse file and CAI both are entered
    IF NOT S_TEMSE IS INITIAL AND NOT S_CAI IS INITIAL.
       MESSAGE W999 WITH TEXT-E01.
    ELSEIF S_TEMSE IS INITIAL AND S_CAI IS INITIAL.
       MESSAGE W999 WITH TEXT-E02.
    ENDIF.
    Collect all temse filenames from TST01 into an internal table.
    IF NOT s_temse IS INITIAL.
       SELECT dname dpart dcretime dcreater FROM TST01 INTO TABLE g_int_temse
              WHERE dname in s_temse
              AND   dpart EQ '1'.
    ELSE.
       SELECT * FROM TST01
              WHERE DCREATER in s_cai
              AND   DPART EQ '1'.
         IF TST01-DCRETIME(8) GE s_date-low
             AND TST01-DCRETIME(8) LE s_date-high.
            MOVE-CORRESPONDING TST01 TO g_int_temse.
            APPEND g_int_temse.
         ENDIF.
       ENDSELECT.
    ENDIF.
    SORT g_int_temse BY DNAME DPART DCRETIME.
    LOOP AT g_int_temse.
    Check if the temse file is already processed in ZTEMSE_LOG table.
      SELECT SINGLE * FROM ZTEMSE_LOG
             WHERE DNAME = g_int_temse-dname.
      IF sy-subrc EQ 0.
    error. Temse already processed
         CONTINUE.
      ENDIF.
    Check if the temse file bieng processed is the eligible temse file
      SELECT SINGLE * FROM V_5UXY_A
             WHERE TSOBJ = g_int_temse-dname.
      IF sy-subrc EQ 0.
         SELECT SINGLE * FROM ZPHOPFLS
             WHERE TAXAU = V_5UXY_A-TAXAU
             AND   TXFRM = V_5UXY_A-TXFRM.
         IF sy-subrc EQ 0.
    Generate the filename for the target destination
            CONCATENATE ZPHOPFLS-FILENAME '.' sy-datum '.' sy-uzeit INTO p_dstfil.
         ELSE.
    error. Script not maintained in ZPHOPFLS table
            CONTINUE.
         ENDIF.
      ELSE.
    error. Temse file is not the latest processed file.
         CONTINUE.
      ENDIF.
      CALL FUNCTION 'RP_TS_OPEN'
        EXPORTING
          tsobj = g_int_temse-dname
         versn = g_int_temse-dpart
          empfg = 'RPUTSVUM'.
      COMMIT WORK.
      REFRESH tape.
      CLEAR   tape.
    Einlesen von der TemSe
      CALL FUNCTION 'RSTS_READ'
        EXPORTING
           PARTS1BY1 = 'X'
        TABLES
          datatab = tape.
      CALL FUNCTION 'RSTS_CLOSE'.
    Read the 1st line which is supposed to contains info important for
    the downloading procedure. The syntax of the line is :
      SAPxxxnnnyyyy  - the 1st 3 char 'SAP' indicates this line contains
    download related info. xxx can either be 'ASC' (for ASCII) or 'EBC'
    (for EBCDIC). nnn is the length of each record, e.g. 128 for SSA disk
    format, 275 for SSA tape format etc. yyyy can either be 'CRLF' (each
    record is delimited by CRLF) or blank (no CRLF).
    After processing the 1st line, the line is deleted from the internal
    table. Downloading begins on the 2nd line.
      READ TABLE tape INDEX 1.
      IF tape-data(3) EQ 'SAP'.
        IF tape-data+3(3) EQ 'EBC'.
          convert_to_ebcdic = 'x'.
        ELSEIF tape-data+3(3) EQ 'ASC'
              AND force_ascii EQ 'T'.
          filetype = 'ASC'.
        ENDIF.
        IF tape-data+6(3) NA '*'.
          record_length = tape-data+6(3).
        ELSE.
          record_length = tape-data+13(4).
        ENDIF.
        IF tape-data+9(4) EQ 'CRLF'.
          data_length = record_length + 2.
        ELSE.
          data_length = record_length.
        ENDIF.
        DELETE tape INDEX 1.
      ELSE.
        data_length = record_length.
      ENDIF.
    Transfer the Temse file data to Unix file.
          PERFORM transfer_file.
    Update the Log table with the temse details.
          ZTEMSE_LOG-dname = g_int_temse-dname.
          ZTEMSE_LOG-txcmp = V_5UXY_A-taxau.
          ZTEMSE_LOG-txfrm = V_5UXY_A-txfrm.
          ZTEMSE_LOG-filename = ws_unixr.
          ZTEMSE_LOG-DCREATER = g_int_temse-dcreater.
          INSERT ZTEMSE_LOG.
        WRITE: /(20) ZTEMSE_LOG-dname,
                (15) ZTEMSE_LOG-txcmp,
                (20) ZTEMSE_LOG-txfrm,
                (15) ZTEMSE_LOG-dcreater,
                (40) ZTEMSE_LOG-filename.
    ENDLOOP.
    *&      Form  get_physical_path
          Get Physical directory name for the given logical path name
    FORM get_physical_path .
      CALL FUNCTION 'ZFILE_GET_PATH_NAME'
        EXPORTING
          LOGICAL_PATH               = c_lpath
        IMPORTING
          FILE_NAME_PATH             = p_uxdir
        EXCEPTIONS
          PATH_NOT_FOUND             = 1
          MISSING_PARAMETER          = 2
          OPERATING_SYSTEM_NOT_FOUND = 3
          FILE_SYSTEM_NOT_FOUND      = 4
          OTHERS                     = 5.
      IF SY-SUBRC <> 0.
        MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
                WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    ENDFORM.                    " get_physical_path
    *&      Form  TRANSFER_FILE
    FORM transfer_file.
      p_unixf = 'AFS'.
    Concatenate Date with Unix File name
      CONCATENATE p_unixf '.' p_compid '.' p_ifid  '.' sy-datum '.' sy-uzeit INTO ws_unixr.
    Concatenate Unix Directory with Unix File for Outbound
      CONCATENATE p_uxdir ws_unixr INTO p_unixf.
      PERFORM open_files USING p_unixf.
    LOOP AT tape.
         g_str = tape-data(record_length).
        TRANSFER g_str TO p_unixf LENGTH record_length.
        IF sy-subrc <> 0.
          MESSAGE ID '00' TYPE 'E' NUMBER '398' WITH 'sy-subrc:' sy-subrc
           ' Error Transferring to: ' p_unixf.
        ENDIF.
    ENDLOOP.
      PERFORM close_files USING p_unixf.
    ENDFORM.                    " TRANSFER_FILE
    Can anyone please check and tell me what I need to overcome this problem.

    Hi Bhaskar,
    I also have the same requirement to upload TemSe files in to application server.
    In FDTA tcode after we enter company code and click on enter.
    In the second screen checking and line item and go to edit and click on download button.
    Here we see a popup with default file name, and when we say ok the file will get downloaded into C:\.....
    Here our req is to upload the file automatically pick up via batch job and place it in the in to the application server and from there it should be placed in the Netwrok server (UNIX).
    Pls provide me with suitable code so that i can finish it off.I tried a lot but did not work.
    Thanks.

  • Not yet solve....TAX Report regarding (client)question

    Client asked to me in interview, please give me answer
    This is regarding US PAYROLL
    1  Transaction PU19 Reports for tax reporting/Tax Returns / Files for State Unemployment Reporting on CD or Diskette :-
      We have issues on some reports regarding address, page numbers and totals. Alex worked on it and told that we need to contact SAP         for help as he thinks problem is with SAP Forms itself.  Currently typing manual returns pending changes to forms.
    2 Deposits on 941 form:-
       Can we update the form to include tax deposits made on the 941 line for deposits?
    3 State Tax Returns not configured in SAP:-
       Can we have state tax returns configured in the PDF format also?
    4 Printing of W-2:-
    Need to be able to print W-2s so we can fold/seal so address apprears on outside for mailing.  Duplex or 11/14 form?  Our folder/sealer uses pressure seal self sealing forms.
    5 Documentation of Processes (Benefit and Garnishment):-
    6 Configure benefit changes for 2009:-
    7 Update benefit tables / rates for 2009:-
    8 'Update SUT rates for new year:-
    9 New 401k Limits Entered :-
    Documentation how to do this
    10 W-2 Reporting, Non Taxable Relocation, Personal Use of Company car (Box 12 and 14 items) for W-2 Reporting:-
    11 Deceased Employee Payments:-
    How do we handle so W-2 is correct and any 1099 items handled correctly
    12 'Mag Media File - Federal (annual):-
    'RS record missing from Magnetic Media file.  Can this be included in the Federal Mag Media file?  Kathy has sent some changes that need to be made to Frank.
    13 'State Mag Media Files and State annual returns:-
    Have some states that we must file by diskette file.  Can we also have annual state tax returns configured in the PDF format?
    14 Federal 940 Return:-
    Make sure this form is configured correctly
    15 Pension Plan Indicator box on W-2:-
    Tested and is not showing on the W-2 or in the Mag Media file
    16 Third Party Sick Pay indicator box  on W-2:-
    Tested and is not showing on the W-2 or in the Mag Media file
    17 Retirement Calculation:-
    18 Year end close procedure:-
    What all has to be done before we can close the year and print W-2's.  Do we have to do any zeroing of wages, taxes and deductions before the first check of the new year can happen?
    19 Sort order for W-2 printing:-
    20 941 Correction Form (941C):-
    Need training on how this is handled
    21 'W-2 correction form (W-2C):-
    Need training on how this is handled
    22 'Payments received in January that affect prior year W-2:-
    'How do we handle.  We receive info in January that must be included on the prior year W-2.  Want to be able to include on original W-2 without filing a W-2C. (Third Party Sick Pay, Payments made in Mexico, Germany, etc) Usually don't receive.
    Regards

    Aswin,
    The client session is your primary TopLink interface abstracting over the shared cache and connection pooling. Depending if you are using internal or external connection pooling and the transaction state you are in TopLink may have a JDBC connection allocated to your client session. A client session does equate to a single dedicated JDBC connection for its entire lifecycle.
    Assuming you are using an external connection pool (Application server's data source) your client session will have a connection from this data source when required to perform a read and during the commit of its UnitOfWork.
    Doug

  • Tax Report Returns No Data [Message 131-85]

    Our client has been using SBO for the past few years and run the Standard Tax Report.
    They follow a standard procedure whereby they open the Tax Report enter the period details and click OK, the report returns all Input and Output Tax details.
    This month they have run the report and no matter what dates you enter the report returns No Date [Message 131-85]
    Does anyone have any clues as to what might be causing this?

    I have discovered via a SQL trace that the following script is tun for the tax report
    exec sp_executesql N'
    SELECT      T0.[AbsEntry],
         T0.[Code],
         MIN(T0.[Name]),
         T0.[SrcObjType],
         T0.[DocNum],
         MIN(T0.[Category]),
         MIN(T0.[IsEC]),
         T0.[IsAcq],
         MIN(T0.[VatPercent]),
         MIN(T0.[EqPercent]),
         T0.[DocDate],
         MIN(T0.[TaxDate]),
         MIN(T0.[CANCELED]),
         SUM(T0.[BaseSum]),
         SUM(T0.[VatSum]),
         SUM(T0.[EqSum]),
         SUM(T0.[DeductSum] - T0.[EqSum]),
         MIN(T0.[SrcObjAbs]),
         N''0'',
         0,
         0,
         MIN(T0.[DocDate]),
         0,
         0,
         MIN(T0.[NumAtCard]),
         SUM(T0.[BaseSumSc]),
         SUM(T0.[VatSumSc]),
         SUM(T0.[EqSumSC]),
         SUM(T0.[DedctSumSC] - T0.[EqSumSC]),
         MIN(T0.[TaxType]),
         T0.[CrditDebit],
         MIN(T0.[CardCode]),
         MIN(T0.[CardName]),
         MIN(T0.[SrcLineNum]),
         MIN(T0.[VatDate]),
         MIN(T0.[VatIdUnCmp]),
         MIN(T0.[LicTradNum]),
         MIN(T0.[BPLicTradNum]),
         MIN(T0.[AddID]),
         SUM(T0.[BaseSum])
         FROM  [dbo].[B1_VatView] T0 
         WHERE (T0.[Code] = (@P1)  OR       
         T0.[Code] = (@P2)  OR 
         T0.[Code] = (@P3)  OR 
         T0.[Code] = (@P4)  OR 
         T0.[Code] = (@P5)  OR 
         T0.[Code] = (@P6)  OR 
         T0.[Code] = (@P7)  OR 
         T0.[Code] = (@P8)  OR 
         T0.[Code] = (@P9)  OR 
         T0.[Code] = (@P10)  OR 
         T0.[Code] = (@P11)  OR 
         T0.[Code] = (@P12) ) AND 
         T0.[DocDate] >= (@P13)  AND 
         T0.[DocDate] <= (@P14)  
         GROUP BY T0.[AbsEntry], T0.[Code], T0.[SrcObjType], T0.[DocNum], T0.[IsAcq], T0.[DocDate], T0.[CrditDebit]
         ORDER BY T0.[IsAcq] DESC,T0.[CrditDebit]',N'@P1 nvarchar(30),@P2 nvarchar(30),@P3 nvarchar(30),@P4 nvarchar(30),@P5 nvarchar(30),@P6 nvarchar(30),@P7 nvarchar(30),@P8 nvarchar(30),@P9 nvarchar(30),@P10 nvarchar(30),@P11 nvarchar(30),@P12 nvarchar(30),@P13 datetime2,@P14 datetime2',N'SEXP',N'SFRE',N'SGST',N'SNT',N'PCAF',N'PCAP',N'PFRE',N'PGNR',N'PGST',N'PGSTV',N'PNT',N'PPRI','2010-03-01 00:00:00','2010-03-31 00:00:00'
    If I run this in SQL I get the following error, which mat shed some light on what is happening
    Msg 2715, Level 16, State 3, Line 1
    Column, parameter, or variable #13: Cannot find data type datetime2.
    Parameter or variable '@P13' has an invalid data type.
    Msg 2715, Level 16, State 3, Line 1
    Column, parameter, or variable #14: Cannot find data type datetime2.
    Parameter or variable '@P14' has an invalid data type.

  • Generating a document that will not show on the tax report

    Good Morning,
    I have an interesting situation involving the Tax report and the GL. My client had a AR down payment invoice that was entered in error and they made a credit note to cancel it and re enter the invoice correctly. Now when you look at the BP balance everything is correct however when you look at the tax report their is an extra credit because the Credit Note appears but the AR down payment invoice does not.
    Ultimately my questions are how do I make an entry to correct the tax report and for the future how do I correct a down payment document without hosing the Tax report?
    Thank you for your consideration,
    John-Michael

    Hi John-Michael,
    when you create a DT invoice with the appropriate tax code, this document will appear in the tax report. When using the copy-to functionality in the DT invoice to create the credit memo, it will draw all data including the tax to that document. In the tax report these 2 transactions then cancel each other out.
    To correct the entry in your db I would hence recommend to reverse the credit memo with an appropriate invoice & then use the DT invoice as base document for the correct CM.
    All the best,
    Kerstin

  • How to print the report directly without previewing (report viewer) using c# windows application

    Hi,
    Currently, we are using crystal report to all of our reporting applications, but since I/users have encountered some issues about CR's speed to load only a simple report, maybe it is now time for us to adopt a new reporting environment in which I think SSRS
    can fill this problem.
    To start with, I have here a sample code, that uses the crystal report to print the report directly without previewing:
    csCashInvoiceCal csCashCal; --Crystal report name .rpt
    dsCsReceipt dsCs; --created dataset
    DataTable u;
    DataRow s;
    private System.Drawing.Printing.PrintDocument printDocument1;
    private System.Windows.Forms.PrintDialog printDialog1;
    ParameterValues paramValue;
    ParameterDiscreteValue discreteValue;
    ParameterFieldDefinition fieldDefinition;
    private void btnPrint_Click(object sender, EventArgs e)
    this.Cursor = Cursors.WaitCursor;
    loadReceipt2();
    print2();
    csCashCal.Close();
    this.Cursor = Cursors.Default;
    private void loadReceipt2()
    dsCs = new dsCsReceipt(); --created dataset
    u = dsCs.Tables.Add("DtCsReceipt");
    u.Columns.Add("Qty", Type.GetType("System.String"));
    u.Columns.Add("UOM", Type.GetType("System.String"));
    u.Columns.Add("Description", Type.GetType("System.String"));
    u.Columns.Add("UnitPrice", Type.GetType("System.String"));
    u.Columns.Add("Discount", Type.GetType("System.String"));
    u.Columns.Add("Amount", Type.GetType("System.String"));
    try
    for (int i = 0; i < dgvDesc.Rows.Count - 1; i++)
    s = u.NewRow(); double.TryParse(dgvDesc.Rows[i].Cells[Discount2.Name].Value.ToString(), out discount);
    s["Qty"] = double.Parse(dgvDesc.Rows[i].Cells[Qty.Name].Value.ToString());
    s["UOM"] = dgvDesc.Rows[i].Cells[Uom2.Name].Value.ToString();
    s["Description"] = invcode + dgvDesc.Rows[i].Cells[Description.Name].Value.ToString();
    s["UnitPrice"] = dgvDesc.Rows[i].Cells[UnitPrice.Name].Value.ToString();
    if (discount != 0)
    s["Discount"] = "(" + string.Format("{0:0.##}", discount) + "%)";
    else
    s["Discount"] = "";
    s["Amount"] = dgvDesc.Rows[i].Cells[Amount2.Name].Value.ToString();
    u.Rows.Add(s);
    catch (Exception) { }
    csCashCal = new csCashInvoiceCal();
    csCashCal.SetDataSource(dsCs.Tables[1]);
    //csCashCal.Refresh();
    loadParameter2();
    private void loadParameter2()
    ParameterFieldDefinitions paramFieldDefinitions;
    paramValue = new ParameterValues();
    discreteValue = new ParameterDiscreteValue();
    paramFieldDefinitions = csCashCal.DataDefinition.ParameterFields;
    discreteValue.Value = date;
    fieldDefinition = paramFieldDefinitions["Date"];
    commonParam();
    discreteValue.Value = txtcsno.Text;
    fieldDefinition = paramFieldDefinitions["InvoiceNo"];
    commonParam();
    discreteValue.Value = txtNameTo.Text;
    fieldDefinition = paramFieldDefinitions["CustomerName"];
    commonParam();
    discreteValue.Value = txtAdd.Text;
    fieldDefinition = paramFieldDefinitions["CustomerAddress"];
    commonParam();
    ------other parameters----
    private void commonParam()
    paramValue.Clear();
    paramValue.Add(discreteValue);
    fieldDefinition.ApplyCurrentValues(paramValue);
    private void print2()
    using (printDocument1 = new System.Drawing.Printing.PrintDocument())
    using (this.printDialog1 = new PrintDialog())
    //this.printDialog1.UseEXDialog = true;
    this.printDialog1.Document = this.printDocument1;
    DialogResult dr = this.printDialog1.ShowDialog();
    if (dr == DialogResult.OK)
    int nCopy = this.printDocument1.PrinterSettings.Copies;
    int sPage = this.printDocument1.PrinterSettings.FromPage;
    int ePage = this.printDocument1.PrinterSettings.ToPage;
    string PrinterName = this.printDocument1.PrinterSettings.PrinterName;
    try
    csCashCal.PrintOptions.PrinterName = PrinterName;
    csCashCal.PrintToPrinter(nCopy, false, sPage, ePage);
    printcount++;
    //saveCountPrint();
    catch (Exception err)
    MessageBox.Show(err.ToString());
    This is only a simple sales receipt application that uses dgv and textboxes to push its data to dataset to the crystal report, a simple one but there are instances that it is very slow.
    But I'm having trouble implementing this using SSRS, since I'm only new to this one, wherein I created the report using report wizard, with two button options inside the form for print preview or direct print selection. Actually, it is very easy to implement
    with print preview because it uses reportviewer. My problem is that how can I print the report directly without using a reportviewer?
    So here is my code so far which I don't know what's next:
    private void button2_Click(object sender, EventArgs e)
    this.Cursor = Cursors.WaitCursor;
    loadReceipt3();
    //print3();
    this.Cursor = Cursors.Default;
    ReportParameter[] parameter = new ReportParameter[11];
    private void loadParameter3()
    parameter[0] = new ReportParameter("InvoiceNo", txtcsno.Text);
    parameter[1] = new ReportParameter("Date", date);
    parameter[2] = new ReportParameter("CustomerTin", txtTin.Text);
    parameter[3] = new ReportParameter("CustomerName", txtNameTo.Text);
    parameter[4] = new ReportParameter("CustomerAddress", txtAdd.Text);
    parameter[5] = new ReportParameter("Agent", agent);
    parameter[6] = new ReportParameter("Discount", "Discount: ");
    parameter[7] = new ReportParameter("TotalDiscount", lblDiscount.Text + "%");
    parameter[8] = new ReportParameter("TotalSales", rdtotal);
    parameter[9] = new ReportParameter("Tax", rdtax);
    parameter[10] = new ReportParameter("TotalAmount", rdnet);
    private void loadReceipt3()
    DataSet dsrs = new DataSet();
    DataTable dtrs = new DataTable();
    DataRow drs;
    dtrs.Columns.Add("Qty", Type.GetType("System.String"));
    dtrs.Columns.Add("UOM", Type.GetType("System.String"));
    dtrs.Columns.Add("Description", Type.GetType("System.String"));
    dtrs.Columns.Add("UnitPrice", Type.GetType("System.String"));
    dtrs.Columns.Add("Discount", Type.GetType("System.String"));
    dtrs.Columns.Add("Amount", Type.GetType("System.String"));
    try
    for (int i = 0; i < dgvDesc.Rows.Count - 1; i++)
    drs = dtrs.NewRow();
    drs["Qty"] = double.Parse(dgvDesc.Rows[i].Cells[Qty.Name].Value.ToString());
    drs["UOM"] = dgvDesc.Rows[i].Cells[Uom2.Name].Value.ToString();
    drs["Description"] = invcode + dgvDesc.Rows[i].Cells[Description.Name].Value.ToString();
    drs["UnitPrice"] = dgvDesc.Rows[i].Cells[UnitPrice.Name].Value.ToString();
    if (discount != 0)
    drs["Discount"] = "(" + string.Format("{0:0.##}", discount) + "%)";
    else
    drs["Discount"] = "";
    drs["Amount"] = dgvDesc.Rows[i].Cells[Amount2.Name].Value.ToString();
    dtrs.Rows.Add(s);
    catch (Exception) { }
    int addtlRow = 7;
    if (addtlRow > (count - 1))
    addtlRow = addtlRow - (count - 1);
    for (int i = 0; i < addtlRow; i++)
    dtrs.Rows.Add();
    loadParameter3();
    LocalReport localreport = new LocalReport();
    localreport.SetParameters(parameter);
    localreport.DataSources.Clear();
    localreport.DataSources.Add(new ReportDataSource("dsSalesReceiptSsrs", dtrs));
    localreport.Refresh();
    //what's next....
    So what's next after local..refresh()? Actually, I have googled a lot but I didn't found the exact solution that I'm looking for which confuses me a lot.
    Anyway I'm using VS 2010 with sql server 2012 express.
    You're help will be greatly appreciated.
    Thank you,
    Hardz

    After some further studies with ReportViewer controls and with the use of this tutorial @ : http://msdn.microsoft.com/en-us/library/ms252091.aspx, which helps me a lot on how to print a report without using a report viewer, I found out what is missing
    with my code above and helps solve my question.
    Here's the continuation of the code above:
    private void loadReceipt3()
    loadParameter3();
    LocalReport localreport = new LocalReport();
    localreport.ReportPath = @"..\..\SsrsCashReceipt.rdlc";
    localreport.SetParameters(parameter);
    localreport.DataSources.Clear();
    localreport.DataSources.Add(new ReportDataSource("dsSalesReceiptSsrs", dtrs));
    Export(localreport);
    print4();
    private IList<Stream> m_streams;
    private int m_currentPageIndex;
    private void Export(LocalReport report)
    string deviceInfo =
    @"<DeviceInfo>
    <OutputFormat>EMF</OutputFormat>
    <PageWidth>8.5in</PageWidth>
    <PageHeight>11in</PageHeight>
    <MarginTop>0.25in</MarginTop>
    <MarginLeft>0.25in</MarginLeft>
    <MarginRight>0.25in</MarginRight>
    <MarginBottom>0.25in</MarginBottom>
    </DeviceInfo>";
    Warning[] warnings;
    m_streams = new List<Stream>();
    report.Render("Image", deviceInfo, CreateStream,
    out warnings);
    foreach (Stream stream in m_streams)
    stream.Position = 0;
    private void print4()
    if (m_streams == null || m_streams.Count == 0)
    throw new Exception("Error: no stream to print.");
    PrintDocument printDoc = new PrintDocument();
    PrintDialog printDlg = new PrintDialog();
    printDlg.Document = printDoc;
    DialogResult dr = printDlg.ShowDialog();
    if (dr == DialogResult.OK)
    if (!printDoc.PrinterSettings.IsValid)
    throw new Exception("Error: cannot find the default printer.");
    else
    printDoc.PrintPage += new PrintPageEventHandler(PrintPage);
    m_currentPageIndex = 0;
    printDoc.Print();
    Dispose();
    public void Dispose()
    if (m_streams != null)
    foreach (Stream stream in m_streams)
    stream.Close();
    m_streams = null;
    private Stream CreateStream(string name, string fileNameExtension, Encoding encoding, string mimeType, bool willSeek)
    Stream stream = new FileStream(name + "." + fileNameExtension,
    FileMode.Create);
    m_streams.Add(stream);
    return stream;
    private void PrintPage(object sender, PrintPageEventArgs ev)
    Metafile pageImage = new
    Metafile(m_streams[m_currentPageIndex]);
    // Adjust rectangular area with printer margins.
    Rectangle adjustedRect = new Rectangle(
    ev.PageBounds.Left - (int)ev.PageSettings.HardMarginX,
    ev.PageBounds.Top - (int)ev.PageSettings.HardMarginY,
    ev.PageBounds.Width,
    ev.PageBounds.Height);
    // Draw a white background for the report
    ev.Graphics.FillRectangle(Brushes.White, adjustedRect);
    // Draw the report content
    ev.Graphics.DrawImage(pageImage, adjustedRect);
    // Prepare for the next page. Make sure we haven't hit the end.
    m_currentPageIndex++;
    ev.HasMorePages = (m_currentPageIndex < m_streams.Count);
    Thank you very much for this wonderful tutorial. :)

Maybe you are looking for