Tables for Sales Register

Hi,
I want to create Sales register for all the taxes like BED, VAT etc... What are the tables from which the data need to picked?
Kalli

Hi Kalli,
I have this which uses OINV (invoice as a base for sale register).
DECLARE @FromDate DateTime
DECLARE @ToDate DateTime
/* SELECT T0.DocDate FROM OINV T0 where T0.DocDate >=[%0] */
SET @FromDate = [%0]
/* SELECT T0.DocDate FROM OINV T0 where T0.DocDate <=[%0] */
SET @ToDate = [%1]
SELECT DISTINCT T0.Docentry, T0.[DocNum], T1.[Dscription],T1.[ItemCode],  CONVERT(VARCHAR(10), T0.[DOCDATE], 3) AS DOCDATE, T1.[Quantity], T1.[Price], T1.[TaxCode],( T1.LineTotal ) as 'Basic' , T1.[VatSum]as 'Total Tax',
( T1.LineTotal +T1.[VatSum]) as 'INCLUDING TAX',  T0.[CardCode] as 'Customer Code',T0.[CardName] as 'Customer Name' ,
(Select distinct isnull(Sum(INV4.taxsum),0) from INV4 where INV4.statype=-90 and INV4.docentry=T0.Docentry and INV4.linenum = T1.Linenum )BED,
(Select distinct isnull(Sum(INV4.taxsum),0) from INV4 where INV4.statype=-60 and INV4.docentry=T0.Docentry and INV4.linenum = T1.Linenum)Cess,
(Select distinct isnull(Sum(INV4.taxsum),0) from INV4 where INV4.statype=8 and INV4.docentry=T0.Docentry and INV4.linenum = T1.Linenum)HCess,
(Select distinct isnull(Sum(INV4.taxsum),0) from INV4 where INV4.statype=10 and INV4.docentry=T0.Docentry and INV4.linenum = T1.Linenum )SAD,
(Select distinct isnull(Sum(INV4.taxsum),0) from INV4 where INV4.statype=4 and INV4.docentry=T0.Docentry and INV4.linenum = T1.linenum)CST,
(Select distinct isnull(Sum(INV4.taxsum),0) from INV4 where INV4.statype=1 and INV4.docentry=T0.Docentry and INV4.linenum = T1.linenum)VAT,
(Select distinct isnull(Sum(INV4.taxsum),0) from INV4 where INV4.statype=8 and INV4.docentry=T0.Docentry and INV4.linenum = T1.linenum)SURCHARGE,
Discsum, T0.[Comments] FROM OINV T0 INNER JOIN INV1 T1 ON T0.DocEntry = T1.DocEntry --INNER JOIN OITM T2 ON T1.ItemCode = T2.ItemCode inner join INV4 T3 on T1.Docentry =T3.docentry and T1.LineNum=T3.LineNum inner join CRD7 T4 on T0.cardcode = T4.Cardcode
Thanks,
Joseph

Similar Messages

  • Error while filling setup table for Sales

    Dear Team,
    We are getting following error while filling setup table for Sales (application component 11) and for Billing (application component 13),
    application component 11
    Error determining rate: foreign curr.  local curr. INR date 08.10.2007 (doc. 673624) (JOB - RMCVNEUA)
    Message No M2810
    application component 13
    Billing document 480050000: error determining stats. currency rate (no updating)
    More faulty documents found than the tolerated 0000000000 (JOB - RMCVNEUF)
    I have seen lot of threads based on this but all r showing diffrenent currency to INR but for the above mentioned documents currency is in INR only so why it is showing the error I am not able to determine.
    If anybody faced this problem kindly reply to this.
    Best Regards,
    SG

    Hi There,
    Might be your using a wrong document number.
    I mean if your using the 11 you should use only Sales document number and for 13 you should only use billing document number.
    If you use vice versa that error will throw.
    Regards,
    MQ

  • Taking long time filling the setup tables for sales and shipment

    Hi ,
    I am trying to fill the setup tables for sales and shipment and it is taking lot of time .
    It took 16 hours just to bring 6 months of  sales history  data in the test environment .
    Cn anybody help on this issue why it is taking that much of time ...
    I am trying to  load the sales data from R/3 into APO-BW from 2005 to 2007 .......
    It is taking 16 hours to fill the data for only 6 months .

    Hi,
    1. delete data and refill the setuptables again by spliting to several small pieces.
    2. compare the data. wht is the last Document numner in RSA3(Maximum one). Start from Maximum one. may be bit complex approch.
    you need to check with PSA and base tables.
    keep one thing in your mind you need to check againest MSEG and BSEG only. noy BKPF and MKPF.
    correct if i'm wrong.
    either refill or create a user exit to avoid duplicae records(you should have very good understanding of data, it will lead to inconsitent data for delta records).
    User exit not a good solution. it's one possibility.
    ****Assign Points If Helpful****
    Regards,
    Ravikanth

  • Table for Sales datas assinged to Equip/Floc

    Hi
          I need a table for Sales datas like sales org,distribution channel,divition,sales office,sales group assigned to equipment master,
    Points assured
    Thanks
    Seenu

    hi seenu
    yes you are wright the sales organisation, DC,Divison is strored under the ILOA table only , since in equipment its being picked from the view table,you can interrelate with FL and equipment
    regards
    thyagarajan

  • Crm tables for sales group and sales office

    Hello CRM Experts,
    Can any one plz. help me to find Tables for Sales Group and Sales office.
    It will be really helpful if the above fields have relation to the Business Partner.
    Thanks in Advance,
    Regards,
    Bharat.

    Hi Radek,
    I feel the table which you have given is the right table but in my scenario we have created sales office and sales group(in org structure) independently in CRM, so now we need to find these values from the table independently as well as with relation to BP the table which you have provided can be used for second scenario but if we want to fetch the values of all sales office and sales group which table i have to use.
    One more problem for second scenario is in BP we cant able to see the sales ofice & group values which we defined in CRM, if we can save BP with sales office and group values then only we can use the table which you have given
    Highly appreciable for your replies.
    Thanks,
    Bharat.

  • Sales Order no and IDOC No Link table for Sales Out bound IDOC ORDRSP

    Hi Friends
    How to find Sales Order no and IDOC No Link table for Sales Out bound IDOC ORDRSP.
    Thanks in Advance.
    SR

    Hi
    If the idoc is managed by message, the link are stored in GOS (Obeject Service)
    U can try to use the function module NREL_GET_NEIGHBOURHOOD
    If you put
    IS_OBJECT-OBJKEY = <sales document>
    IS_OBJECT-OBJTYPE = <business object> (I think BUS2032)
    the function returns the idoc
    or if you put
    IS_OBJECT-OBJKEY = <idoc number>
    IS_OBJECT-OBJTYPE = <business object> (I think IDOC)
    the function returns the sales order
    You can investigate that function module in order to find out the tables
    Max

  • Table for Sales order Cost Est?

    Cost estimate data for sales orders used to be kept in KEKO and KEPH -
    Now that we've upgrade to 5.0 - there are only product cost estimates.
    Anybody know the tables for sales orders?
    thanks

    Dear Althea,
    please check with this tables.
    VBAG                           Sales Document: Release Data by Schedule Line in Sch.Agrmt.
    VBAK                           Sales Document: Header Data                               
    VBAP                           Sales Document: Item Data                                 
    VBBE                           Sales Requirements: Individual Records                    
    VBBS                           Sales Requirement Totals Record                           
    VBDATA                         Update data      
    Regards
    Mangal.

  • URGENT : REPORT for sales register

    Hi Guys,
    Anybody is having the report on sales register? logic follows like this:-
    The logic which needs to be developed is, as per input criteria given by user, which will be sales organization, plant & date range.Program needs to pick all the billing document which will satisfy the above criteria.
    Except for document cateroty N i.e. invoice cancellation (VBRK -VBTYP not equal to N) and which are marked for cancellation (VBRK-FKSTO not equal to
    X)
    From the VBRK table pick up the document condition number (VBRk-KNUMV) and then go to KONV table you will find all condition with value over their. Pick up the values as per condition type and print it. (Condition types are already mentioned in format attached).
    Their are 3 different format they have asked for, the format types will depend on the plant i.e. if plant start with 21 then it is RMC plant and accordingly appropriate format needs to be picked. Please check config for plant descrption.
    By looking at format, i feel that some changes needs to be done into it like their is no material number or descprtion mentioned in format but qty & base rate fields their. Now whether register needs to printed for every line item in invoice or ony one line item for every invoice i.e.
    consoliadted  per invoice number. If it is consolidated then what about base rate which can be different for each line item. In this case what rate needs to be print.
    Always print the invoice values line item by line item, giving each line item quantity, base price, and other pricing conditions but should have facility to sum up     fields like Quantity, Base price, all pricing conditions each customer wise. 
    I have to get this report in ALV format.
    I will reward points for useful answers.
    My mail id is [email protected]
    Waiting for reply...
    Thanks,
    Sundeep.

    Hi
          If you are using sales and operation planning in make to stock scenario its simple . As You input target sale plan and target production plan for whole one year (MC84) . So this data can be pulled out from the tables .
    For Action Need to be taken and revision you may need to have new table .
    Neal

  • Need to know the table for sales org and sales area of role Sold-to  in CRM

    Dear Sir,
    Our server is CRM 5.0, I would like to download the data from CRM , however, I would like to know the table name which keep the sales org and sales area of role Sold-to  in T-code : BP . However, we can't find the actualty table.
    Please kindly advise.
    Thank you
    Lek

    Hi Vimol,
    You can get Org details in various tables like Sales Org, Division, Distribution Channel in following tables with help of PARTNER_GUID.
    Sales :
    CRMM_BUT_LNK0010
    CRMM_BUT_LNK0011
    Shipping:
    CRMM_BUT_LNK0020
    CRMM_BUT_LNK0021
    Billing :
    CRMM_BUT_LNK0030
    CRMM_BUT_LNK0031
    Organization :
    CRMM_BUT_LNK0140
    CRMM_BUT_LNK0141
    I think, for you Organization related table CRMM_BUT_LNK0141 would be useful.
    From this table you will get Sales Org, Division, Distribution Channel.
    And in order to get Sales Office of BP, you will get it from table CRMM_BUT_SET0140 where you can put set_guid fetched from CRMM_BUT_LNK0141
    Hope this helps....Please reward points if useful.
    Regards,
    Shailesh Jadhav

  • Tables for sales & purchase order data relating to delivery

    hi all,
    i am writing a report to download all the delivery data after the delivery is created.i have to download the sales order data & purchase order data relating to this delivery also.
    i am using likp & lips table for delivery.which tables i
    should use to get the sales order data & PO data for the same delivery (likp-vbeln). i.e i need the sales & purchase order related tables which has link with delivery tables like likp & lips etc.
    plz advice me. it is very urgent.
    any idea is highly appreaciated.
    Regards
    pabitra

    in Addition to NM ,
    in case of STO there is no Sales Order , Process will be like this
    PO-->Delivery->PGI--->Billing  then u have to
    link
    *getting the History data of the PO
            select ebeln
                   ebelp
                   belnr
                   menge
                   from ekbe
                   into corresponding fields of table  w_ekbe
                   where ebeln eq w_lips-vgbel
                     and ebelp eq w_lips-vgpos
                     and bewtp eq 'L'.
    Regards
    Prabhu

  • Tables for Purchase Register

    Hi Gurus,
    I want prepare a purchase register . please tell me the tables for that. please help me out.
    regards,
    Lakshmi

    hi,
    find tables in MM-PUR (Purchasing) :
    EBAN  - Purchase Requisition 
    EBKN  - Purchase Requisition Account Assignment 
    EBUB   - Index for Stock Transport Requisitions for Materi
    EINA    - Purchasing Info Record: General Data 
    EINE     - Purchasing Info Record: Purchasing Organization D
    EIPA     - Order Price History: Info Record 
    EKAB   - Release Documentation 
    EKAN   - Vendor Address: Purchasing Document 
    EKBE    - History per Purchasing Document 
    EKBEH - Removed PO History Records 
    EKBZ    - History per Purchasing Document: Delivery Costs 
    EKBZH  - History per Purchasing Document: Delivery Costs 
    EKEH    - Scheduling Agreement Release Documentation 
    EKEK    - Header Data for Scheduling Agreement Releases 
    EKES     - Vendor Confirmations 
    EKET     - Scheduling Agreement Schedule Lines 
    EKETH   - Scheduling Agreement Schedules: History Tables 
    EKKI      - Purchasing Condition Index 
    EKKN    - Account Assignment in Purchasing Document 
    EKKO    - Purchasing Document Header 
    EKPA     - Partner Roles in Purchasing 
    EKPB     - "Material Provided" Item in Purchasing Document 
    EKPO    - Purchasing Document Item 
    EKPV    - Shipping-Specific Data on Stock Tfr. for Purch. D 
    EKRS    - ERS Procedure: Goods (Merchandise) Movements to b 
    EKUB    - Index for Stock Transport Orders for Material 
    EORD    - Purchasing Source List 
    EQUK    - Quota File: Header 
    EQUP     - Quota File: Item 
    T024      - Purchasing Groups 
    T024E    - Purchasing Organizations 
    T024W   - Valid Purchasing Organizations for Plant 
    T024Z    - Purchasing Organizations 
    T027A    - Shipping Instructions, Purchasing 
    T027B    - Texts: Shipping Instructions 
    T027C    - Codes for Compliance with Shipping Instructions 
    T027D    - Compliance with Shipping Instructions: Texts 
    T069       - Certificate Categories 
    T069Q    - Control Data for Source Determination and Checkin 
    T069T     - Certificate Categories: Text Description 
    T160       - SAP Transaction Control, Purchasing 
    reward points if hlpful.

  • Tables for Sales Order,Delivery Doc, Billing Doc

    Hello All,
    Can anyone list the tables that are relevant for Sales Order,Delivery, Billing-Header,Item,Schedule line level as applicable.
    Regards,
    Raj

    Hi Raja Sekhar,
    Customers
             KNA1   General Data
                      KNB1   Customer Master – Co. Code Data (payment method, reconciliation acct)
                      KNB4   Customer Payment History
                      KNB5   Customer Master – Dunning info
                      KNBK   Customer Master Bank Data
                      KNKA   Customer Master Credit Mgmt.
                      KNKK   Customer Master Credit Control Area Data (credit limits)
                      KNVV   Sales Area Data (terms, order probability)
                      KNVI   Customer Master Tax Indicator
                      KNVP   Partner Function key
                      KNVD   Output type
                      KNVS   Customer Master Ship Data
                      KLPA   Customer/Vendor Link
    Sales Documents  
    VBAKUK VBAK + VBUK
                      VBUK   Header Status and Administrative Data
                      VBAK   Sales Document - Header Data
                      VBKD   Sales Document - Business Data
                      VBUP   Item Status
                      VBAP   Sales Document - Item Data
                      VBPA   Partners
                      VBFA   Document Flow
                      VBEP   Sales Document Schedule Line
                      VBBE   Sales Requirements: Individual Records
    SD Delivery Documets
    LIPS   Delivery Document item data, includes referencing PO
                      LIKP   Delivery Document Header data
    Billing Document 
    VBRK   Billing Document Header
                      VBRP   Billing Document Item
    SD Shipping Unit 
    VEKP   Shipping Unit Item (Content)
                      VEPO   Shipping Unit Header
    REWARD POINTS IF HELPFUL
    Regards
    Sai

  • Table for Sales Order BOM

    Hello Friends,
    I would like to know the database table which stores Sales Order BOM details.
    Actually I want to print the BOM Header Text in my output smartform. For this, I am using the below data.
    Language : EN
    Text Id     : KZU
    Text Object : BOM
    Text name : Combination of SY-MANDT 'K' and BOM in transaction CS62.
    I dont know from where should i pick up this BOM Number.
    Thanks,
    Salil

    Hi
    check the tables <b>STPO and STKO</b>
    you may find the BOM number for sales order
    also use the Table <b>KDST</b> to link the Sales order to BOM
    and also use the table <b>MAST</b> to find the link to MATERIAL BOM by taking the sales order material
    Regards
    Anji
    Message was edited by:
            Anji Reddy Vangala
    Message was edited by:
            Anji Reddy Vangala

  • Conditions KONV table for Sales order Line item.

    Hi Friends,
    What are the key fields bw vbap and konv table.
    requirmnt is : need to fetch conditions ( from KONV table ) for the sale order line items.
    thanks in advance.
    Jai.

    Hi,
    1. Fetch field <b>KNUMV</b> from table <b>VBAK</b> for that particular Sales Order No i.e <b>VBELN</b>.
    2. Goto <b>KONV</b> & based on <b>KNUMV</b>, <b>KPOSN</b> and <b>KSCHL</b> (condition type), fetch the required condition details along with its net price (KONV-KBETR)  and net value (KONV-KWERT).
    KONV-KPOSN = '00000' -> Header Condition
    KONV-KPOSN = '00001' -> VBAP-POSNR = 10
    Reward points if the answer is helpful.
    Regards,
    Mukul

  • Table for Sales Order Header Text

    Hi,
    I want Table Name for Sales Data -> Header Text.
    Path--
    When we open the Sales order, Click on Display Document Header Details --> Here select the Text tab. Here, see the written text in Form Header (1st option).
    I want that table Name which contain the Header Text. Because If header text is more than 1 line, where it stores??
    Plz. help

    Hi,
    Text data are stored in tables STXH (Header) and STXL(Item).
    But you can't find the exact text in these tables as the text are stored in binary form.
    You need to use function module READ_TEXT to read any document texts.
    Check the link [Use FM READ_TEXT to Read the Various Text|http://www.sap-img.com/abap/use-fm--read-text-to-read-the-various-text.htm] which explains how to use this module to read the text.
    Regards,

Maybe you are looking for

  • HDMI connection to Samsung TV - sound works, video doesn't.

    I'm using an HDMI cable and the Moshi adaptor to connect my Macbook Pro (2010) to my Samsung TV. The audio works great but I am not getting video. This seems to be the opposite of what others are experiencing. How can I get the video to work, too? Al

  • Macbook Air suffering loud fan, extremely slow

    Hi, I'm using a MBA Mid 2013 (warranty ended by June 31), and below is my story (verry sorry if it's long and waste your time). By the third week of June, my MBA got a problem with the sound. Since it's still in warranty duration, so i took it to an

  • How do you attach something to an email??

    How do you attach a file to an outcgoing email with the ipad???

  • Itunes reads apple tv as iphone

    trying to update bet itunes reads apple tv as iphone

  • Unable to open PDF from IE web pages

    Windows 7, IE 11, Adobe Reader XI I have no problem opening same when using Chrome so there must be some setting that I've failed to find in IE. I've reinstalled AR several times and adjusted as many IE settings as I've found suggestions for in the f