TDS Receivable

Hi all,
we are getting a lot of TDS Certificates from Customers. Now we are putting in TDS receivable account and putting customer code in Assignment field. Since it is an editable field and subject to wrong entry our users find it difficult to manage.
Is there any standard transaction for this
Sunoj

Hello,
you have to post the transaction 
J1INCUST
BR TARIK

Similar Messages

  • Customer wise TDS Receivable Report

    hi,
    Our Client requirement is to get customer wise TDS Receivable Report. As of now they are passing manual entry whenever they get the TDS certificate from the customer.
    Is it possible to configure in SAP to pass automatic entry for TDS receivable report.

    Dear Vijay
    I think there is no configuration for TDS receivable, but we can capture the tax amount in expenses account while sales invoice posting (same as cash discount procedure) and see the report in Tax expenses account.
    Regards
    Sridhara Rao D
    Edited by: Sridhara Rao.D on Oct 1, 2011 3:49 PM

  • TDS Receivable - Customers

    Hi,
    TDS/WHT configuration for customers is similar to vendors. But my questions are
    1) Is the WHT types/codes need to attach to customer master or to the condition types in SD.
    2) I am configuring both WHT types for advance payments and for invoice. In case of vendors while raising the invoice we can remove the advance payment WHT codes while doing MIRO. In case of Customer how it works.. there is no provision in SD billing to remove the WHT types for payment at the time of billing.
    3) There is no field in SD billing for business place/section code which is necessary (for F-39-clearing advance) for  reversing the TDS receivable on customers advance payment received. How this field is updated in accounting document relating to invoice while billing.
    4) I am thinking the TDS on customers is also similar as vendors. The system will deduct TDS on advance payment received if the WHT types for payment is attached to Customer master and also will deduct TDS at the time of billing. The reversal of TDS on advance payment will happen on F-39 transaction. Please tell me the actual proceedure for accounting TDS receivable.
    Thanks and Regards
    Koteswara Rao

    Hello,
    you have to post the transaction 
    J1INCUST
    BR TARIK

  • Process for tds receivable posting

    hi all
    what is the process for tds receivable configuration in sap and how do we post tds receivable in sap.
    please let me know the process of customer tds receivable configuration in sap and posting through fb70
    Kind regards
    sap fico
    arman

    HI
    SPRO>FA>****>WT>EWT>calculation
    Define w/tax type for Inv posting
    and define w/tax code.
    SPRO>FA>****>WT>EWT>posting>define accounts for w/tax to be paid over
    here you give the w/tax type and code and gl account.
    after that please assing the w/tax type to code to customer master.
    Regards
    Madhu M

  • Service tax  Receivable and payable adjustment automatically

    Dear GURU,
    Service Tax Receivable & Payable – The Client wants to have a Service Tax Control Account that would be automatically populated for the particular bill / Invoice on the day of Vendor Payment and Customer Receipt.
    a. Example –
    While Billing Entry - 31.01.2008 (SD)
    Customer A/c 20000
    To Service Tax Payable 500
    To Rental Income A/c 19500
    (Or)
    Service Income
    (Provision Entry only)
    31.01.2008(MM)
    Security Charges 4750
    Service Tax Receivable 250
    To Vendor A/c 4950
    To TDs Payable A/c 50
    (Provision Entry Only)
    On Incoming Payments from Customers (05.03.2008) (FI)
    Bank A/c 19500
    TDs Receivable 500
    To Customer A/c 20000
    (Required Automatically (or) Control) – 05.03.2008
    Service Tax Payable 500
    To Service Tax Control A/c 500
    On Outgoing Payments to Vendors (10.02.2008) (FI)
    Vendor A/C 4950
    To Bank A/c 4950
    (Required Automatically (or) Control) – 10.02.2008
    Service Tax control A/C 250
    To Service Tax Receivable 250
    Please Note: The entries in Red Font are required to be passed automatically
    pls suggest

    Hye
    You can not generate this entry auomatically.  Other option available is Create Tax code for Ex S1 assign  account service tax controll account and create another Tax code Say T1 assign GL Service tax cenvatable ( With Target TAx Code as S1).  You have to maintain the Service tax controll item with open item management.
    On a periodical basis you execute f.38 transfer the Data from S1 to T1 and adjust the eligiblie amount on a periodical basis.

  • Is it possible to Configure TDS  for Customer

    Dear Experts
                 pls consider this as an example
    1.customer invoice  f-22
          customer a/c dr 18000
          Tds a/c          dr 2000
                 to
                    sales a/c               20000
    2.At the time of incoming payment f-28
              there it showing only 18000. so we can clear 18000 here
    3 j1incust enter withholding tax certificate from customer
            through this way we can clear remaining TDS amount 2000
    my question is : our customer paying 20000 without deducting TDS . In this scenario what kind of configuration is required
    Thanks in Advance
       Ajeesh.s
    Edited by: Ajeeshsudevan on Oct 4, 2011 12:48 PM
    Edited by: Ajeeshsudevan on Oct 4, 2011 12:48 PM

    Dear Vijay
    I think there is no configuration for TDS receivable, but we can capture the tax amount in expenses account while sales invoice posting (same as cash discount procedure) and see the report in Tax expenses account.
    Regards
    Sridhara Rao D
    Edited by: Sridhara Rao.D on Oct 1, 2011 3:49 PM

  • Customer - TDS Payable

    Dear SAP GURU,
    My requirement like this, some contracter payment made by my customer,eg
    Adv exp a/c DR 20,000
    TO Customer                        18,000
    TO TDS payable                     2,000
    It means i want to deduct tds and remit to govt.
    I used the same tax code which we using for vendor,and the same assigned to customer master data.
    While running t.code f-02 or FB75 system is not calculating the TDS.
    How to resolve this issue/
    Please put some lights on this issue.
    Thanks & Regards
    Appan

    Hi,
    Please don't update the tax types created for vendor in the asset master,because at the time of posting  adv payment received from customer  TDS  will hit the wrong GL Account i.e. instead of TDS Receivable Account it will hit TDS Payable Account .The same thing will happen while posting outgoing invoice. The  tax type updated in the posted document  will subsequently hit TDS Payable Account at the time of posting incoming payment.Please check  vide OBWW how the tax type and tax code combinations are assigned to the GL Account.Please create new tax type and tax codes for payment posting and update the same in customer master.
    Please note that validity of tax type for vendors are defined in spro menu path whereas the validity of the same for customers are defined in the customer master.But don't forget to tick the check box  "Sub to W/tax "under Customer Data while Assigning Withholding Tax Types to Company Codes in Spro menu path.
    With best wishes
    Monoj

  • SAP Report (Standard/ Custom) Requirement

    Dear All,
    I am a SD - Consultant.
    In my Project, I have been asked to provide certain Reports:
    Report 1: No. of statement sent Sales Org-wise
    Report 2: No. of Balance Confirmation sent Sales Org-wise
    Report 3: S. Tax Register Customer-wise Accrued for the Month & YTD.
    Report 4: S. Tax Register Customer-wise Payable for the Month
    Report 5: TDS receivable Customer-wise for the Month & YTD.
    Report 6: Rollover Booking for each Customer.
    My doubt is,
    1. All these information are kept in Module: Financials, and the Reports, if Standard available, must be within FI-Module.
    2. If any Customization is required, the format of the Report will be provided by Finance-Personnel and not from Sales/ Delivery team.
    Please, help/ guide me on the same and provide your valuable feedback.
    Best Regards,
    Amit
    Note: If, there are any Standard Reports available for any of the above Reports, Please lemme know.

    Hi Amit,
    You as a functional consultant can do this by 3 ways
    1 Through SQL Query - When you simply want to join two tables or want to fetch data from a table & present it in to reporting format.
    Its a tool designed for functional consultants who does not know thae ABAP.Transaction code is SQ01
    2 Through Report writer / Painter - You can design report & fetch data as per your requirement & format.For this you have to configure Liabrary (GR 21) & then have to define characterstics & key figure.& have to design the format & assign it to report group.
    Its a tool designed for functional consultants who does not know thae ABAP.Transaction code is GRR1
    3 Through Drill down reporting - For this you have to configure the form layout as per reporting structure & then you have to configure report by attaching this form to report.
    Transaction code is FSI6 & FSI0 - GL
    FDI0 & FDI6 -AR & FKI6 & FKI0 - AP
    If these solutions does not cater to your requirement then final resort is to do ABAP programe.
    Regards,
    Abhijit
    Edited by: Abhijit Joshi on Nov 19, 2008 10:41 AM

  • Service Tax

    Hi ,
    Pls Guru's help
    Service Tax Receivable & Payable – The Client wants to have a Service Tax Control Account that would be automatically populated for the particular bill / Invoice on the day of Vendor Payment and Customer Receipt.
    a.     Example –
    While Billing Entry - 31.01.2008 (SD)
    Customer A/c      20000
         To Service Tax Payable      500
         To Rental Income A/c      19500
    (Or)
    Service Income      
    (Provision Entry only)
    31.01.2008(MM)
    Security Charges           4750
    Service Tax Receivable      250
    To Vendor A/c           4950
         To TDs Payable A/c      50
    (Provision Entry Only)
    On Incoming Payments from Customers (05.03.2008) (FI)
    Bank A/c           19500
    TDs Receivable      500
         To Customer A/c 20000
    (Required Automatically (or) Control) – 05.03.2008
    Service Tax Payable      500     
         To Service Tax Control A/c      500
    On Outgoing Payments to Vendors (10.02.2008) (FI)
    Vendor A/C          4950
         To Bank A/c      4950
    (Required Automatically (or) Control) – 10.02.2008
    Service Tax control A/C      50
         To Service Tax Receivable     50
    Please Note: The entries in Red Font are required to be passed automatically
    pls suggest

    Hi Prakash Sai,
    There is no red font marked in your thread.  You can post the autoposting in service tax accounts using the tax code for different types and assign the required GL account for tax code postings.
    BSR

  • Withholding tax for bank interests

    Hi, Experts,
    I'm facing the problem that the bank doesn't pay the total interests, they will deduct the withholding tax amount.
    I've review the documents for SAP extended withholding tax function, found that it is only available for vendors and customers...
    Does anyone know how to realize it in the SAP?
    Or just have to manually record  it through manual entry?
    This happens for banks in Spain.
    Many thanks.
    Best regards,
    Kelvin

    Hi,
    You have to create a customer a/c with bank name and maintain TDS codes in the master data. Pass below entry
    Customer- A/c Dr
    TDS Receivable A/c Dr
    Int.recd A/c
    After that, the will credit the int.in our books.
    Bank A/c Dr
    Customer A/c Cr
    Regards,
    Mukthar

  • In JE Debit and credit same account

    Dear Experts,
    In JE(Incoming Payment) Debit and credit come same account. How to solve this issue
    #---- G/L Acct/BP Code -
    G/L Acct/BP Name                      -
                Debit       -
                  Credit
    1--110879                 -  Advance Payments (Adj  A/C)        -       INR 15,680.00--     
    2----CAA00001            -
    Aadit Auto Company Private Limited    -
          INR 15,680.00
    3---- 110861                  -
    TDS Receivable                                -
           INR 320.00----     
    4----  CAA00001          -
       Aadit Auto Company Private Limited  -
          INR 320.00
    5 -
    213220                -
       Advance Received From Clients         -
        INR 16,000.00----     
    6 -
      213220             -
         Advance Received From Clients          -
         INR 16,000.00
    Thanks and Regards,
    Chandru

    Hi Chandru ,,
    In Which transaction it is happening ?
    And Have you checked all the Accounts Determination accordingly ?
    Thanks
    Ashish

  • Optimiser difference : a max() sometimes doing a backward scan and sometimes forward scan

    I interested why we get 2 different query plans on Sybase 15.5 and 15.7 for similar queries
    declare @MID int
    select @MID = 25717
    select MID , max(Date) from CB where MID = @MID group by MID
    select @MID, max(Date) from CB where MID = @MID
    The index is on (MID, Date).
    The first does forward scan and the second does a backward scan.
    With our data, the first query does 8000 page reads (with a SAN read costing 4ms = 32s)
    and the second query does 4 page reads (with a SAN read costing 4ms = 16ms)
    1)
    |   |   |GROUP SORTED Operator (VA = 1)
    |   |   |  Evaluate Grouped MAXIMUM AGGREGATE.
    |   |   |
    |   |   |   |SCAN Operator (VA = 0)
    |   |   |   |  FROM TABLE
    |   |   |   |  CB
    |   |   |   |  Index : IDX1
    |   |   |   |  Forward Scan.
    |   |   |   |  Positioning by key.
    |   |   |   |  Index contains all needed columns. Base table will not be read.
    |   |   |   |  Keys are:
    |   |   |   |    MID ASC
    |   |   |   |  Using I/O Size 16 Kbytes for index leaf pages.
    |   |   |   |  With LRU Buffer Replacement Strategy for index leaf pages.
    2)
    |   |  Evaluate Ungrouped MAXIMUM AGGREGATE.
    |   |  Scanning only up to the first qualifying row.
    |   |
    |   |   |SCAN Operator (VA = 0)
    |   |   |  FROM TABLE
    |   |   |  CB
    |   |   |  Index : IDX1
    |   |   |  Backward scan.
    |   |   |  Positioning by key.
    |   |   |  Index contains all needed columns. Base table will not be read.
    |   |   |  Keys are:
    |   |   |    MID ASC
    |   |   |  Using I/O Size 2 Kbytes for index leaf pages.
    |   |   |  With LRU Buffer Replacement Strategy for index leaf pages.
    Why does the optimiser generate different plans ?

    Okay - so the one reason I like to see plancost vs. just showplan...you can see in the one without the group by clause that it does a ScalarAgg vs. a GroupSorted ala:
    (without group by clause)
    ==================== Lava Operator Tree ====================
                            Emit                               
                            (VA = 2)                           
                            r:1 er:1                           
                            cpu: 0                             
                ScalarAgg                                      
                  Max                                          
                (VA = 1)                                       
                r:1 er:1                                       
                cpu: 0                                         
    IndexScan                                                  
    IDX1                                                       
    (VA = 0)                                                   
    r:1 er:1                                                   
    l:3 el:3                                                   
    p:3 ep:3                                                   
    ============================================================
    (with group by clause)
    ==================== Lava Operator Tree ====================
                                        Emit                    
                                        (VA = 3)                
                                        r:1 er:8                
                                        cpu: 300                
                            Restrict                            
                            (0)(0)(0)(4)(0)                     
                            (VA = 2)                            
                            r:1 er:8                            
                GroupSorted                                     
                Grouping                                        
                (VA = 1)                                        
                r:1 er:8                                        
    IndexScan                                                   
    IDX1                                                        
    (VA = 0)                                                    
    r:353666 er:158986                                          
    l:863 el:386                                                
    p:176 ep:78                                                 
    ============================================================
    Now the key to the problem is in the GroupSorted function.
    But, let's step back a bit.   Query optimization is just one of the many (and nearly final) steps prior to query execution.  Prior to query optimization we have the TDS Receive buffers, the SQL parsing, the SQL normalization and pre-processing.   In the pre-processing, we normally try to construct what is called the LOP (Logical Operator) tree.   Note that no-where in that sequence is any execution - I mention this because once before you commented on someone else's posting about a purported optimization problem with
    select * from table where column=<value> or 1=2
    ....the notion of evaluating 1=2 wouldn't happen until the execution phase - so optimization will not consider it - in this case it looks it at as an expression to be evaluated and skips it.   If you want to see what I mean do a showplan and statistics io on
    select * from sysobjects where 1=2
    and you will see that due to lack of sargs we do a tablescan from the optimizer due to lack of sargs...but it is during query execution that we short circuit and hence the 0 LIO's.    I point that out because there are different phases involved and in this case it is the pre-processor that selects the overall LOP tree to start with....but then the optimizer has to consider which LOPs to use underneath that such as GroupSorted (using an index) vs. GroupSorting (sort operation), etc.
    Soooo....in the GROUP BY example, it starts with:
    The Lop tree:
    ( project
            ( group
                    ( scan CB
    vs. your other example (without the Group By):
    The Lop tree:
    ( project
            ( scalar
                    ( scan CB
    ....so you can see the difference right off the bat in what the optimizer received from the pre-processor.   Like I pointed out earlier, the problem *started* the second you put the group by clause in - before the optimizer even got to look at.
    You then get 2 optimization blocks....the innermost for the (scan CB) and then the outer for (group (inner block)) ala:
    OptBlock1
            The Lop tree:
            ( scan CB
            Generic Tables: ( Gtt1( CB ) Gti2( IDX1 ) )
            Generic Columns: (  Gc0(CB ,Rid) Gc1(CB ,MID) Gc2(CB ,ValuationDate))  Virtual Generic Columns: ( )
            Predicates: ( { CB.MID Gtg0.Gc4 }  = 0 tc:{1} )
            Transitive Closures: ( Tc0 = {  Gc0(CB ,Rid)} Tc1 = {  Gc1(CB ,MID) Gc4(Gtg0 ,_gcelement_4)} Tc2 = {  Gc2(CB ,ValuationDate)} )
    OptBlock0
            The Lop tree:
            ( pseudoscan
            Generic Tables: ( Gtg0 )
            Generic Columns: (  Gc3(Gtg0 ,_gcelement_3) Gc4(Gtg0 ,_gcelement_4) Gc5(Gtg0 ,_virtualagg) Gc6(Gtg0 ,_virtualagg))  Virtual Generic Columns: ( )
            Predicates: ( { CB.MID Gtg0.Gc4 }  = 0 tc:{1} )
            Transitive Closures: ( Tc3 = {  Gc3(Gtg0 ,_gcelement_3) Gc5(Gtg0 ,_virtualagg) Gc6(Gtg0 ,_virtualagg)} Tc1 = {  Gc1(CB ,MID) Gc4(Gtg0 ,_gcelement_4)} )
    The question is, why did we estimate 8 rows returned from the group by????   And would that change the behavior???
    That comes from this section:
            ( PopGroupSorted
                    proj: {{ CB.MID Gtg0.Gc4 } ,{ Gtg0.Gc3 Gtg0._virtualagg Gtg0._virtualagg } }
                    pred: [Tc{} Pe{{ CB.MID Gtg0.Gc4 }  = 0}]
                    subs: {CB.MID ,Gtg0._virtualagg }
                    cost: 66305.12
                    I/O estimate : [
                            rowcount=7.388771
                            averagewidth=19
                            pages=1
                            prefetchpages=1
                            lio=0 pio=0 cpu=158985.8
                            total lio=385.3457 total pio=77.60534 total cpu=635943
                            tempdb=0
                    Cache Strategy: [
                            prefetch=YES
                            iosize=131072 Bytes
                            bufreplace=LRU
                    order: none
                    ( PopIndScan index: Gti2( IDX1 )
                                    table: Gtt1( CB )
                            proj: {{ CB.MID Gtg0.Gc4 } ,{ CB.ValuationDate } }
                            pred: [Tc{} Pe{{ CB.MID Gtg0.Gc4 }  = 0}]
                            subs: {CB.MID ,CB.ValuationDate }
                            cost: 50406.55
                            I/O estimate : [
                                    rowcount=158985.8
                                    averagewidth=14
                                    pages=383.3457
                                    prefetchpages=383.3457
                                    lio=385.3457 pio=77.60534 cpu=476957.2
                                    scanlio=385.3457 scanpio=77.60534 scancpu=476957.2
                                    tempdb=0
                            Cache Strategy: [
                                    prefetch=YES
                                    iosize=131072 Bytes
                                    bufreplace=LRU
                            order: none )
    Now to understand what is happening, let's take the bad example:
    select MID , max(Date) from CB where MID = @MID group by MID
    Now, let's make it a bit more generic:
    select type, count(*), max(crdate)
    from sysobjects
    where type='P'
    group by type
    If run in master on my machine, I get:
    type                                            
    P             20             Oct  2 2014 12:23PM
    ...as a result, with an initial LOP of:
    The Lop tree:
    ( project
    ( group
      ( scan sysobjects
    Which should be no surprise....with no index on type...or due to the quantity of rows in sysobjects, we simply go for a tablescan.   But we have our (group ) LOP.....and if we look at the plancost:
    ==================== Lava Operator Tree ====================
                                        Emit                   
                                        (VA = 3)               
                                        r:1 er:2               
                                        cpu: 0                 
                            Restrict                           
                            (0)(0)(0)(4)(0)                    
                            (VA = 2)                           
                            r:1 er:2                           
                GroupSorted                                    
                Grouping                                       
                (VA = 1)                                       
                r:1 er:2                                       
    TableScan                                                  
    sysobjects                                                 
    (VA = 0)                                                   
    r:20 er:19                                                 
    l:8 el:8                                                   
    p:0 ep:2                                                   
    ============================================================
    We see sort of the same problem....we are estimating 2 rows to be returned from the group by. 
    Stepping back a bit, remember, if we don't have any stats on a column, we assume 0.1 for =, 0.25 for bounded range (between) and 0.3 for unbounded range.   In my case, with no stats on type in sysobjects in master, we can see this clearly in the index selectivity area of:
    The table (Datarows) has 188 rows, 6 pages,
    Data Page Cluster Ratio 0.9999900
        type = 'P'
       Estimated selectivity for type,
            selectivity = 0.1,
        Search argument selectivity is 0.1.
        using table prefetch (size 32K I/O)
        Large IO selected: The number of leaf pages qualified is > MIN_PREFETCH pages
        in data cache 'default data cache' (cacheid 0) with LRU replacement
    In the index selectivity due to using the magic values.   In the group by costing, we see:
    ( PopGroupSorted
      proj: {{ sysobjects.type Gtg0.Gc5 } ,{ Gtg0.Gc3 Gtg0._virtualagg Gtg0._virtualagg } ,{ Gtg0.Gc4 Gtg0._virtualagg Gtg0._virtualagg } }
      pred: [Tc{} Pe{{ sysobjects.type Gtg0.Gc5 }  = 'P'}]
      subs: {sysobjects.type ,Gtg0._virtualagg ,Gtg0._virtualagg }
      cost: 65.44175
      I/O estimate : [
       rowcount=1.88
       averagewidth=21
       pages=1
       prefetchpages=1
       lio=0 pio=0 cpu=18.8
       total lio=8 total pio=1.00007 total cpu=244.4
      Cache Strategy: [
       prefetch=YES
       iosize=4096 Bytes
       bufreplace=LRU
      order: none
      ( PopTabScan table: Gtt1( sysobjects )
       proj: {{ sysobjects.type Gtg0.Gc5 } ,{ sysobjects.crdate } }
       pred: [Tc{} Pe{{ sysobjects.type Gtg0.Gc5 }  = 'P'}]
       subs: {sysobjects.type ,sysobjects.crdate }
       cost: 63.56175
       I/O estimate : [
       rowcount=18.8
        averagewidth=12
        pages=8
        prefetchpages=8
        lio=8 pio=1.00007 cpu=225.6
        scanlio=8 scanpio=1.00007 scancpu=225.6
       Cache Strategy: [
        prefetch=YES
        iosize=32768 Bytes
        bufreplace=LRU
       order: none )
    Now....to go from the row count to the estimated rows for a group by, we don't use the column selectivity - we use column density stats.  The real reason behind the 0.1 is that we are saying is that there likely is only 10 distinct values.   For example, if I update statistics sysobjects (type) in my system, the output changes to:
    ==================== Lava Operator Tree ====================
                                        Emit                   
                                        (VA = 3)               
                                        r:1 er:1               
                                        cpu: 0                 
                            Restrict                           
                            (0)(0)(0)(4)(0)                    
                            (VA = 2)                           
                            r:1 er:1                           
                GroupSorted                                    
                Grouping                                       
                (VA = 1)                                       
                r:1 er:1                                       
    TableScan                                                  
    sysobjects                                                 
    (VA = 0)                                                   
    r:20 er:21                                                 
    l:8 el:8                                                   
    p:0 ep:2                                                   
    ============================================================
    Which is based on:
    ( PopGroupSorted
      proj: {{ sysobjects.type Gtg0.Gc5 } ,{ Gtg0.Gc3 Gtg0._virtualagg Gtg0._virtualagg } ,{ Gtg0.Gc4 Gtg0._virtualagg Gtg0._virtualagg } }
      pred: [Tc{} Pe{{ sysobjects.type Gtg0.Gc5 }  = 'P'}]
      subs: {sysobjects.type ,Gtg0._virtualagg ,Gtg0._virtualagg }
      cost: 65.80175
      I/O estimate : [
       rowcount=1
       averagewidth=21
       pages=1
       prefetchpages=1
       lio=0 pio=0 cpu=20
       total lio=8 total pio=1.00007 total cpu=248
      Cache Strategy: [
       prefetch=YES
       iosize=4096 Bytes
       bufreplace=LRU
      order: none
      ( PopTabScan table: Gtt1( sysobjects )
       proj: {{ sysobjects.type Gtg0.Gc5 } ,{ sysobjects.crdate } }
       pred: [Tc{} Pe{{ sysobjects.type Gtg0.Gc5 }  = 'P'}]
       subs: {sysobjects.type ,sysobjects.crdate }
       cost: 63.80175
       I/O estimate : [
        rowcount=20
        averagewidth=12
        pages=8
        prefetchpages=8
        lio=8 pio=1.00007 cpu=228
        scanlio=8 scanpio=1.00007 scancpu=228
    Note that my overall rowcount went up a bit....but the group by went to 1 row....if we look at the column stats via optdiag:
    Statistics for column:                                                          "type"
    Last update of column statistics:                                               Feb 15 2015  9:18:32:850PM
         Range cell density:                                                        0.0053191489361702
        Total density:                                                             0.4216274332277049
         Range selectivity:                                                         default used (0.33)
         In between selectivity:                                                    default used (0.25)
         Unique range values:                                                       0.0053191489361702
         Unique total values:                                                       0.2000000000000000
         Average column width:                                                      default used (2.00)
         Rows scanned:                                                              188.0000000000000000
         Statistics version:                                                        4
    Histogram for column:                                                           "type"
    Column datatype:                                                                char(2)
    Requested step count:                                                           20
    Actual step count:                                                              9
    Sampling Percent:                                                               0
    Tuning Factor:                                                                  20
    Out of range Histogram Adjustment is DEFAULT.                                  
    Low Domain Hashing.                                                            
         Step     Weight                    Value
            1     0.00000000       <=       "EJ"
            2     0.00531915        <       "P "
            3     0.10638298        =       "P "
            4     0.00000000        <       "S "
            5     0.30319148        =       "S "
            6     0.00000000        <       "U "
            7     0.56382978        =       "U "
            8     0.00000000        <       "V "
            9     0.02127660        =       "V "
    ....so the 20 rows are due to the slightly higher 0.10638 vs. 0.1...
    Now....if we know the value for the where clause and have stats on the column, I notice we always estimate 1 row to be returned from the group by.   However, if we don't have stats - or if we don't know the value - we estimate more than one row.   For example if I declare @var for type ala:
    declare @type char(2)
    select @type='P'
    select type, max(crdate)
    from sysobjects
    where type=@type
    group by type
    go
    I then get:
    ( PopGroupSorted
      proj: {{ sysobjects.type Gtg0.Gc4 } ,{ Gtg0.Gc3 Gtg0._virtualagg Gtg0._virtualagg } }
      pred: [Tc{} Pe{{ sysobjects.type Gtg0.Gc4 }  = '}]
      subs: {sysobjects.type ,Gtg0._virtualagg }
      cost: 83.58154
      I/O estimate : [
      rowcount=4.17777
       averagewidth=17
       pages=1
       prefetchpages=1
       lio=0 pio=0 cpu=79.26596
       total lio=8 total pio=1.00007 total cpu=425.7979
    ...if we have stats on type vs. the 1.88 when we don't.   Which points out that the uniqueness stats and selectivity are likely considered in the final cost of the group by.   In your case, the estimate of:
                    I/O estimate : [
                            rowcount=7.388771
                            averagewidth=19
                            pages=1
                            prefetchpages=1
                            lio=0 pio=0 cpu=158985.8
                            total lio=385.3457 total pio=77.60534 total cpu=635943
                            tempdb=0
    ...is likely due to the column uniqueness and selectivity stats based on the @MID variable
    Note that despite we now know the GROUP BY is only going to return a single row, we still don't change the plan.....we still hit the index in ascending fashion.   The reason why is that we don't assume (or should I say we don't make a special case) that the only aggregate is a max().   It could be count(), avg(), min() or a combination of which - any of could require reading every index row other than strictly min().   Could we do so??  Possibly.....however, arguable, the select max() without the group by is the more correct SQL to use....   We do (on the other hand) have special processing for scalaragg with max() as it does the backwards scan if max() is the only aggregate....if you do select min(), max() - then it does a forward scan even with scalaragg.   If you have just min(), we do a forward scan and short circuit after first row (as if select top 1)....

  • What is the correct A/C all mapped in Withholding Tax -setup Window ?

    Sir,
    I want to know the A/C of all Withholding Tax which are mapped in the Withholding Tax - setup Window.
    Can u tell me the all correct A/C which r mapped in Withholding Tax window.
    I know that A/P and A/R TDS A/C and all further in the table setup are shown but i don't know the correct A/C
    mapped to do any Purchase and Sales Process ,which A/c is hit on that Marketing Document.
    Plz tell me .....................!
    Edited by: jyotasna on May 26, 2011 7:00 AM

    hai,
    You must create some ledgers as per requirements for mapping your TDS,
    TDS - Payable Professional Charges
    TDS - Payable Contractors
    TDS - Payable  rent   etc, for AP TDS,AP Surcharge,AP Cess
    TDS - Receivable for AR TDS,AR Surcharge,AR Cess
    for each ledgers there are 4 varieties Invoice company,Invoice Others,Payment Company,Payment Others
    Regards
    Janeesh

  • IQ 16, jConnect 16 and numeric datatype

    Hi,
    I have a situation where I create a table like this:
    CREATE TABLE DBA.A_TEST (
    PK INTEGER DEFAULT AUTOINCREMENT NOT NULL,
    TEST_9_2 NUMERIC(9,2),
    PRIMARY KEY (PK)
    INSERT INTO A_TEST (TEST_9_2) VALUES (2.01)
    When I select the value 2.01 into a BigDecimal (java) value and then use that value to update it on the IQ server (jConnect version is:
    jConnect Driver version: jConnect (TM) for JDBC(TM)/16.0 PL03 (Build 27073)/P/EBF23152/JDK 1.6.0/jdbcmain/OPT/Wed Jul 16 00:36:57 PDT 2014
    the value 2 is sent.  This occurs when DynamicPrepare = true (default value for jConnect 7.X and 16.0).
    I find that the Update command, when sent in DYNAMIC tds receives this from IQ:
    PARAMFMT
    returns TDS_INT4, usertype = 58
    jConnect then calls sp_sql_type_name with the 56 for data type and 58 for user type. This seems to cause the update statement to send "2" instead of "2.01".  Is this a known issue?
    It does seem if I set DYNAMIC_PREPARE = false, then the update works fine (since it explicitly depends on the binding for the parameter.)
    File bigdeciTest157.txt is the java jdbc source
    testbd_iq16_dp_true_esd05.txt is the TDS on a run - using 7.07 ESD#5 (16.0 PL03 jConnect had same behavior).
    I'm thinking the dynamic prepare might not be fully supported on IQ?  I notice the dynamic prepare is allocated but on executions only TDS_LANGUAGE is sent and executed. Is this normal as well?
    Cheers,
    -Paul

    Hi Paul,
    Likely Jconnect CR#762132 (allableStatement with BigDecimal , SQL Types.DECIMAL scale zero should error.)
    fixed in Conn 15.7 SP130 and Conn16 PL04.
    Regards,
    Tayeb.

  • On my iphone4 i need to be able to use both TDS and Yahoo e-mail.  TDS works only sporadically.  For instance, today I was able to both send and receive, then an hour later could not send.  got the message that the server was not recognized.

    On my iphone4 I need to be able to receive and send both TDS and Yahoo e-mail accounts (I also need to access from my Macbook Pro and my HP desktop).  I have NO problem with Yahoo, but with TDS, the e-mail seemed to work on my phone.... and then it didn't.)  In adding the TDS account, I chose "other" ( TDS is somehow accessed on the back end through gmail).  For the incoming server I used the Incoming Sever Name of pop.gmail.com and the Outgoing Mail Server as smtp.gmail.com.  I have using SSL "on" and the server port is 995.  Is this setup correct for TDS?

    FYI: POP will by default, delete messages from the server after downloading them (This applies to most pop clients, computer or mobile). POP is old tech and is not recommended if IMAP or Exchange are available. The default when setting up a g-mail type account is IMAP. Full synchronization with the server. You may also be able to set it up as an Exchange account, allowing for push e-mail and sync of calendars and contacts as well. See the Gmail help pages for instructions.

Maybe you are looking for