Material based sales report

Experts
what is the standard report for
sales report( material based ) for particular period .
Regards

Is LIS activated at your end?
If yes, Use T-Code - MCTC.
Also refer this path for other Standard Reports:
SAP Menu - Logistics - Sales and Distribution - Sales Information System - Standard Analyses
If LIS is not activated, you will go for a Z-Report Development.
Also check standard report - VF05N, if it suits your requirement.
Hope this helps,
Thanks,
Jignesh Mehta

Similar Messages

  • MATERIAL GROUPS SALES REPORT

    Dear ALL
    Is there any sales  report that shows sales by Material Groups.
    Thank your very much in advance for your help.
    Best Regards
    Edited by: Fanalist on Aug 16, 2010 9:20 AM

    Hi,
    I hope there is no such standard report.However you can use SD-SIS to drill data basis product hirearchy for reporting purpose.
    If business requirement is material group wise you can simply get a report developed through ABAPer from VBRK and VBRP table.
    Regards
    Sanjay

  • Material level sale by plant.

    hi to all,
    how can i get the material level sales report by plant?
    thanks
    attiq

    Hi
    try with MC.9
    Regards,
    Krishna.

  • Can i get month, quarterly, half yearly, yearly wise sales report basing on

    hi,
    sap gurus,
    good evening to all,
    how can i get month, quarterly, half yearly, yearly wise sales report basing on division and material.
    is there any std transaction code for that.
    customization is requried for that.
    regards,
    balaji.t
    09990019711

    Standard SAP SD Reports:=
    Statistic Group:
    Purpose u2013 To capture data for Standard Reports, we require to activate Statistic Group as under:
    --> Item category (Configuration)
    --> Sales document type (Configuration)
    --> Customer (Maintain in Master data)
    --> Material (Maintain in Master data)
    When you generate statistics in the logistics information system, the system uses the combination of specified statistics groups to determine the appropriate update sequence. The update sequence in turn determines for exactly which fields the statistics are generated.
    Configuration:
    IMG --> Logistics Information System (LIS) --> Logistics Data Warehouse --> Updating --> Updating Control --> Settings: Sales --> Statistics Groups -->
    1. Maintain Statistics Groups for Customers
    2. Maintain Statistics Groups for Material
    3. Maintain Statistics Groups for Sales Documents
    4. Assign Statistics Groups for Each Sales Document Type
    5. Assign Statistics Groups for each Sales Document Item Type .....
    All Standard Reports which are available are as under:
    SAP Easy Access: Information Systems -> Logistics -> Sales and distribution ->
    1. Customer -> Incoming orders / Returns / Sales / Credit memos / Sales activities / Customer master / Conditions / Credit Master Sheet
    2. Material -> Incoming orders / Returns / Sales / Credit memos / Material master / ...
    3. Sales organization -> Sales organization / Sales office / Sales employee
    4. Shipping point -> Deliveries / Returns
    5. SD documents -> Orders / Deliveries / Billing documents ...
    & so on.
    Regards,
    Rajesh banka

  • ABC analysis for material based on the volume of sales

    Hi,
    Can we have an option of categorising a material according to the sales volume and generate reports.
    Eg;
    Mat1 -Class A >Rs 100000 of sales
    Mat2 -Class B >Rs 50000 of sales
    Mat3 -Class C >Rs 25000 of sales.
    Awaiting your valuable inputs.
    Regarsd,
    Phani Prasad

    vamsi krishna wrote:>
    > Dear Friends,
    > Please mail to me how to configure the availability of material based on the shipping conditions?
    > That is when we give the shipping condition in the sales order (va01) for example by air 1 day, by road 5 days and by water 6 days. The system should automatically give the availability of the material based on the shipping conditions we give in the sales order (va01).
    > With regards
    Hi Vamsi,
    Could not understand your query fully.
    See material availability check is carried out for the requested delivery date or else the system proposes one.
    The time you are talking about By Air 1 day and so on is not taken into consideration while carrying out material check for that is transportation time after goods are released from the Plant.
    owever if you need to configure the transportation time you need to go to
    Logistics Execution->Transportation->Basic Transportation Function->Routes->Define Routes-> Define shipping types
    Here you can define shipping types what you said by AIR by Truck or whatever you need.
    To specify the time you need to go to SPRO
    Logistics Execution->Transportation->Basic Transportation Function->Routes->Define Routes-> Define Routes and Stages
    Here you specify the Transit Duration Transit Lead time and so on which will be taken as a input for determining material lead time by that shipping type.
    Hope it helps.
    Post if u need furthur clarifications.
    Request you to reward points if helpful.
    Thanks & regards
    Abhishek Swarup

  • Sales order based Invoice Report

    Hi Friends
    Is there any standard report where i can see the invoice list based on sales order
    Regards
    Shambhu Sarkar

    Dear Shambhu Sarkar
    You cannot see sale order reference in despatch sales report with the TCodes suggested already.  You have to develop a zee report from Tables VBFA and VBRP. 
    From VBRP, you can take the preceding document (sale order) reference against billing document and from VBRP, you can take datas like material code, quantity despatched, net value, tax etc.,
    thanks
    G. Lakshmipathi

  • Sales Report Material Group-wise

    I want to generate Sales Report Material Group-wise is there any standard report.
    regards,
    Rajesh

    Hi
    Use the T.code: MCBK, this report tells you about Total stock received, total stock issue for sales order against the material group.
    Reward if it helps
    Regards
    Prasanna R

  • Material Group-wise Sales Report

    I want to generate Sales Report Material Group-wise is there any standard report.
    regards,
    Rajesh

    Hi Vinod,
    MB52 is giving stock of Material on Hand, I want sales report.
    regards
    Rajesh

  • Interactive ALV to report to get into Material Master Sales View

    Hi,
    I want to know way to get into Material master Sales view from an Interactive ALV report.
    In the output we have (custom report for Sales) the Sales Order item information. If the user double clicks on the material, it should directly goes to the Material Master Sales org 1 view. I can able to get to MM03 initial screen to display the list of views, but it would be better we can use the Plant, Sales Org and plant info from Sales Item to get into the material master Sales view.
    I checked that this functionality is there in the standard code. If you double click on the material in Purchase order display(ME23N) from the item level, it is directly getting into Material Master Purchasing view. Is there a way to achieve this.
    Your suggestions would be appreciated with points. Thanks!

    Hello,
    Yes, it's possible using the CALL TRANSACTION command with the addition AND SKIP FIRST SCREEN. The only thing that you need is to fill the fields from the first screen (SET PARAMETER command).
    DATA: carrid TYPE spfli-carrid,
          connid TYPE spfli-connid.
    SET PARAMETER ID: 'CAR' FIELD carrid,
                      'CON' FIELD connid.
    CALL TRANSACTION 'FLIGHT_TA' AND SKIP FIRST SCREEN.
    Regards.

  • Material Type Vs Sales report.. Urgent

    my client requires materail type vs sales report for particaular period... is there any standard report for these.. or how can we do with a ABAPer.. wat fields we have give to ABAper.... to get the report....
    Kiran

    Hi Kiran,
    Please find the herewith the SAP SD Standard Reports.
    Reports: Reports consist of data, which is expected to be reveiwed or checked the transaction taken in said period. Reports are useful for analysis of decision taking for future activities.
    Some of the standard reports for SD & its configuration guide is as under:
    Standard SAP SD Reports:=
    Statistic Group:
    Purpose – To capture data for Standard Reports, we require to activate Statistic Group as under:
    --> Item category (Configuration)
    --> Sales document type (Configuration)
    --> Customer (Maintain in Master data)
    --> Material (Maintain in Master data)
    When you generate statistics in the logistics information system, the system uses the combination of specified statistics groups to determine the appropriate update sequence. The update sequence in turn determines for exactly which fields the statistics are generated.
    Configuration:
    IMG --> Logistics Information System (LIS) --> Logistics Data Warehouse --> Updating --> Updating Control --> Settings: Sales --> Statistics Groups -->
    1. Maintain Statistics Groups for Customers
    2. Maintain Statistics Groups for Material
    3. Maintain Statistics Groups for Sales Documents
    4. Assign Statistics Groups for Each Sales Document Type
    5. Assign Statistics Groups for each Sales Document Item Type.....
    All Standard Reports which are available are as under:
    SAP Easy Access: Information Systems -> Logistics -> Sales and distribution ->
    1. Customer -> Incoming orders / Returns / Sales / Credit memos / Sales activities / Customer master / Conditions / Credit Master Sheet
    2. Material -> Incoming orders / Returns / Sales / Credit memos / Material master / ...
    3. Sales organization -> Sales organization / Sales office / Sales employee
    4. Shipping point -> Deliveries / Returns
    5. SD documents -> Orders / Deliveries / Billing documents ...
    & so on.
    Some of the Standard reports in SD are:
    Sales summary - VC/2
    Display Customer Hierarchy - VDH2
    Display Condition record report - V/I6
    Pricing Report - V/LD
    Create Net Price List - V_NL
    List customer material info - VD59
    List of sales order - VA05
    List of Billing documents - VF05
    Inquiries list - VA15
    Quotation List - VA25
    Incomplete Sales orders - V.02
    Backorders - V.15
    Outbound Delivery Monitor - VL06o
    Incomplete delivery - V_UC
    Customer Returns-Analysis - MC+A
    Customer Analysis- Sales - MC+E
    Customer Analysis- Cr. Memo - MC+I
    Deliveries-Due list - VL04
    Billing due list - VF04
    Incomplete Billing documents - MCV9
    Customer Analysis-Basic List - MCTA
    Material Analysis(SIS) - MCTC
    Sales org analysis - MCTE
    Sales org analysis-Invoiced sales - MC+2
    Material Analysis-Incoming orders - MC(E
    General- List of Outbound deliveries - VL06f
    Material Returns-Analysis - MC+M
    Material Analysis- Invoiced Sales - MC+Q
    Variant configuration Analysis - MC(B
    Sales org analysis-Incoming orders - MC(I
    Sales org analysis-Returns - MC+Y
    Sales office Analysis- Invoiced Sales - MC-E
    Sales office Analysis- Returns - MC-A
    Shipping point Analysis - MC(U
    Shipping point Analysis-Returns - MC-O
    Blocked orders - V.14
    Order Within time period - SD01
    Duplicate Sales orders in period - SDD1
    Display Delivery Changes - VL22
    Please Reward If Really Helpful,
    Thanks and Regards,
    Sateesh.Kandula

  • T-code or SAP Table Sales report based on Document Pricing Procedure

    Hi Experts,
    Please suggest me some SAP Standard T-code or Sales Report based on Document Pricing Procedure and Sales Area.
    Or suggest me SAP Table for the above mentioned combination. Thanks in advance.
    With Best Regards,
    Bharat B

    Hi
    There is no standard t code available. You have to go for Zee using the below tables
    first you need to get the VBAK-KALSM(Pricing procedure)or VBRK-KALSM  next you have to pass the VBAK-KALSM to table T683V-KALSM(field) now you will get all the Document Pricing Procedures (KALVG) assigned to these pricing procedures along with sales area.
    So using these tables you can get the required data.
    regards
    Prashanth
    Edited by: Prashanth@SD on Jan 18, 2011 7:58 AM

  • Material type vs sales  report

    my client requires materail type vs sales report for particaular period... is there any standard report for these.. or how can we do with a ABAPer.. wat fields we have give to ABAper.... to get the report....
    Kiran

    Hi,
    You might get more help by posting this on the SD board as well.
    Steve B

  • Material sales report

    Hello,
    I have some troubles writting a sales report. The problem is that, in my case, sales are processed in another application, interfaced with SAP, so sales orders & stuff are automaticaly made, so I only see the sales in reports. I don't really know from what tables to get the data. I saw that I can find sales orders in VBAK and VBAP tables, but these sales orders doesn't produces goods issues, so I don't really care about them. I am interested for materials that were sold out from my warehouse, with 251 moovement type in my case. I also took into consideration the possibility to extract the data from the MSEG table, with 251 moovement type. What do you think about this? And another issue is where to get the profit margin for that sale.
    Thank you!

    Hi George,
    May be you can try writing a join on VBAK,VBAP and VBFA and in VBFA you can restrict the sub docs. cateory as 'R' for goods movement to get the sales data relevant to goods movement.
    Thus this helps?
    Cheers
    VJ

  • Urgent: sales report

    Hi All,
    I want to devlop a sales report,
    please can any one explain me how to write select and go ahead
    the requiremnet is like this
    Based on selection criteria
    Sales organisation (VBRK-VKORG),
    Distribution channel (VBRK-VTWEG),
    Division (VBRK_SPART),
    Billing date(VBRK-ERDAT),
    Customer (VBRK-KUNAG),
    plant (VBRP-WERKS), and
    Material Group1(VBRP-MVGR1).
    Check if VBRK-FKSTO # X, VBRK-RFBSK = C, VBRK-FKART #S1 and S2, take all VBRK-VBELNs (Print in Invoice number ).
    VBRK-ERDAT(Print in Invoice Date).
    Pass VBRK-VBELN to VBRP-VBELN and check for every VBRP-MVGR1 pass VBRP-POSNR to KONV-KPOSN and
    For KONV-KSCHL =’ZPTS” sum all KONV-KWERT and display(PTS value).
    For KONV-KSCHL =”YNRV” sum all KONV-KWERT and display(NRV Value).
    thanks in advacne
    points will be rewarded if it is use full
    jay

    Hi,
    Refer this code.
    REPORT  z_daily_sales
            NO STANDARD PAGE HEADING
            MESSAGE-ID sabapdocu.
                          TABLES                                         *
    TABLES : vbak,                              "Sales Document: Header Data
             tfacs,                             "Factory calendar (display)
             vbrk,                              "Billing: Header Data
             vbrp,                              "Billing: Item Data
             vbpa,                              "Sales Document: Partner
             lips,                              "SD doc: Delivery: Item data
             mkpf,                              "Header: Material Document
             mseg,                              "Document Segment: Material
             konv.                              "Conditions (Trans Data)
                          CONSTANTS                                      *
    CONSTANTS : c_top_of_page(15) TYPE c VALUE 'SUB_TOP_OF_PAGE'.
                          TYPE-POOL                                      *
    TYPE-POOLS : slis. "Global types for generic cunning building blocks
                          VARIABLES                                      *
    DATA : v_repid    TYPE sy-repid,             "Report ID
           v_month(2) TYPE c,                    "Variable for Month
           v_year(4)  TYPE c,                    "Variable for year
           v_days(31) TYPE c,                    "Variable for days
           v_ship(10) TYPE c VALUE 0,            "Variable for total days
           v_jan(31)  TYPE c,                    "Variable for month
           v_count(2) TYPE c VALUE 0,            "Variable for count
           v_wdays(2) TYPE c VALUE 0,            "Variable for working days
           v_ndays(2) TYPE c VALUE 0,            "Variable for non work days
           v_tdays(2) TYPE c VALUE 0,            "Variable for total days
           v_oltot    TYPE i VALUE 0,            "Variable for order total
           v_sotot    TYPE i VALUE 0,            "Variable for special order
           v_corebus  TYPE kzwi2 VALUE 0,        "Variable for core bus
           v_onbulk   TYPE kzwi2 VALUE 0,        "Variable for bulk orders
           v_premier  TYPE kzwi2 VALUE 0,        "Variable for premier prog
           v_shipit   TYPE kzwi2 VALUE 0,        "Variable for ship it prog
           v_onpromo  TYPE kzwi2 VALUE 0,        "Variable for on promo
           v_netrev   TYPE kzwi2 VALUE 0,        "Variable for net rev
           v_storev   TYPE kzwi2 VALUE 0,        "Variable for store rev
           v_connet   TYPE kzwi2 VALUE 0,        "Variable for consignment
           v_sporder  TYPE kzwi2 VALUE 0,        "Variable for special order
           v_stdvd    TYPE kzwi2 VALUE 0,        "Variable for dvd
           v_totrev   TYPE kzwi2 VALUE 0,        "Variable for total rev
           v_totbud   TYPE kzwi2 VALUE 0,        "Variable for total budget
           v_ordsize  TYPE kzwi2 VALUE 0.        "Variable for order size
                          TYPES                                          *
    *--Structure for VBRP Table
    TYPES : BEGIN OF t_vbrp,
            vbeln  TYPE vbeln,                  "Billing document
            fkdat  TYPE fkdat,                  "Billing date
            fktyp  TYPE fktyp,                  "Billing category
            fkart  TYPE fkart,                  "Billing type
            vtweg  TYPE vtweg,                  "Distribution channel
            knumv  TYPE knumv,                  "Number of doc condition
            posnr  TYPE posnr,                  "Billing item
            matnr  TYPE matnr,                  "Material Number
            werks  TYPE werks_d,                "Plant
            vgbel  TYPE xblnr,                  "Referance
            vgbel1 TYPE vgbel,                  "Doc no reference document
            kzwi2  TYPE kzwi2,                  "Subtotal 2
            wavwr  TYPE wavwr,                  "Cost in document currency
            kunnr  TYPE kunnr,                  "Customer
            END OF t_vbrp,
    *--Structure for MKPF Table
            BEGIN OF t_mkpf,
            fkdat TYPE fkdat,                   "Billing date
            mblnr TYPE mblnr,                   "Number of material document
            mjahr TYPE mjahr,                   "Material doc. year
            xblnr TYPE xblnr,                   "Referance
            kunnr  TYPE kunnr,                  "Customer
            END OF t_mkpf,
    *--Structure for MSEG Table
            BEGIN OF t_mseg,
            fkdat TYPE fkdat,                   "Billing date
            mblnr TYPE mblnr,                   "Number of material document
            mjahr TYPE mjahr,                   "Material doc. year
            bwart TYPE bwart,                   "Movement type
            sobkz TYPE sobkz,                   "Special Stock indicator
            dmbtr TYPE dmbtr,                   "Amount in local currency
            kunnr TYPE kunnr,                   "Customer
            matnr TYPE matnr,                   "Material Number
            werks TYPE werks_d,                 "Plant
            END OF t_mseg,
    *--Structure for LIPS Table
            BEGIN OF t_lips,
            vbeln TYPE vbeln_vl,                "Delivery
            fkdat TYPE fkdat,                   "Billing date
            knumv TYPE knumv,                   "Number of doc condition
            matnr TYPE matnr,                   "Material Number
            werks TYPE werks_d,                 "Plant
            bwart TYPE bwart,                   "Movement type
            kzwi2 TYPE kzwi2,                   "Subtotal 2
            lfimg TYPE lfimg,                   "Quantity
            END OF t_lips,
    *--Structure for VBAK Table
            BEGIN OF t_vbak,
            erdat TYPE erdat,                   "Created On
            vbeln TYPE vbeln_va,                "Delivery
            auart TYPE auart,                   "Sales document type
            vtweg TYPE vtweg,                   "Distribution channel
            knumv TYPE knumv,                   "Number of doc condition
            END OF t_vbak,
    *--Structure for KONV Table
            BEGIN OF t_konv,
            knumv TYPE knumv,                   "Number of doc condition
            kschl TYPE kscha,                   "Condition type
            kbetr TYPE kbetr,                   "Rate
            END OF t_konv,
    *--Structure for DUMMY Table
            BEGIN OF t_dummy,
            fkdat TYPE fkdat,                   "Billing date
            matnr TYPE matnr,                   "Material Number
            bwart TYPE bwart,                   "Movement type
            kbetr TYPE kzwi2,                   "Net value of billing item
            END OF t_dummy,
    *--Structure for NDAY table
            BEGIN OF t_nday,
            erdat   TYPE erdat,                 "Created On
            flag(1) TYPE c,                     "Flag
            END OF t_nday,
    *--Structure for TFACS Table
            BEGIN OF t_tfacs,
            ident TYPE wfcid,                   "Factory calendar ID
            jahr  TYPE kjahr,                   "Fiscal Year
            mon01 TYPE mon00,                   "Calendar: Days in a month
            mon02 TYPE mon00,                   "Calendar: Days in a month
            mon03 TYPE mon00,                   "Calendar: Days in a month
            mon04 TYPE mon00,                   "Calendar: Days in a month
            mon05 TYPE mon00,                   "Calendar: Days in a month
            mon06 TYPE mon00,                   "Calendar: Days in a month
            mon07 TYPE mon00,                   "Calendar: Days in a month
            mon08 TYPE mon00,                   "Calendar: Days in a month
            mon09 TYPE mon00,                   "Calendar: Days in a month
            mon10 TYPE mon00,                   "Calendar: Days in a month
            mon11 TYPE mon00,                   "Calendar: Days in a month
            mon12 TYPE mon00,                   "Calendar: Days in a month
            END OF t_tfacs,
    *--Structure for shipping days table.
            BEGIN OF t_ship,
            title(35) TYPE c,                   "Title
            days(10)  TYPE c,                   "Days
            END OF t_ship,
    *--Structure for Final Table
            BEGIN OF t_final,
            erdat   TYPE erdat,                 "Date
            oltot   TYPE i,                     "Online Order total
            sotot   TYPE i,                     "Special Order Total
            corebus TYPE kzwi2,                 "ECS Online Promo Rev
            onbulk  TYPE kzwi2,                 "ECS online Bulk Orders
            premier TYPE kzwi2,                 "MSFT Premier Program
            shipit  TYPE kzwi2,                 "MSFT online shipit program
            onpromo TYPE kzwi2,                 "MSFT online promo rev
            netrev  TYPE kzwi2,                 "MSFT/Xbox Consignment
            storev  TYPE kzwi2,                 "MSFT Retail Store promo rev
            connet  TYPE kzwi2,                 "MSFT Retail Consign net rev
            sporder TYPE kzwi2,                 "Special order revenue
            stdvd   TYPE kzwi2,                 "Traveling Store/DVD
            totrev  TYPE kzwi2,                 "Total ECS Revenue
            totbud  TYPE kzwi2,                 "Total ECS Budget
            ordsize TYPE kzwi2,                 "Avg online order size
            END OF t_final,
    *--Structure for Total Table
            BEGIN OF t_total,
            title(10) TYPE c,                   "Date
            oltot     TYPE i,                   "Online Order total
            sotot     TYPE i,                   "Special Order Total
            corebus   TYPE kzwi2,               "ECS Online Promo Rev
            onbulk    TYPE kzwi2,               "ECS online Bulk Orders
            premier   TYPE kzwi2,               "MSFT Premier Program
            shipit    TYPE kzwi2,               "MSFT online shipit program
            onpromo   TYPE kzwi2,               "MSFT online promo rev
            netrev    TYPE kzwi2,               "MSFT/Xbox Consignment
            storev    TYPE kzwi2,               "MSFT Retail Store promo rev
            connet    TYPE kzwi2,               "MSFT Retail Consign net rev
            sporder   TYPE kzwi2,               "Special order revenue
            stdvd     TYPE kzwi2,               "Traveling Store/DVD
            totrev    TYPE kzwi2,               "Total ECS Revenue
            totbud    TYPE kzwi2,               "Total ECS Budget
            ordsize   TYPE kzwi2,               "Avg online order size
            END OF t_total,
    *--Structure for MKPF Table
            BEGIN OF t_jkmkpf,
            budat TYPE budat,                   "Posting date
            mblnr TYPE mblnr,                   "Number of material document
            mjahr TYPE mjahr,                   "Material doc. year
            END OF t_jkmkpf,
    *--Structure for MSEG Table
            BEGIN OF t_jkmseg,
            fkdat TYPE fkdat,                   "Billing date
            matnr TYPE matnr,                   "Material Number
            mblnr TYPE mblnr,                   "Number of material document
            mjahr TYPE mjahr,                   "Material doc. year
            bwart TYPE bwart,                   "Movement type
            menge TYPE menge_d,                 "Quantity
            kbetr TYPE kbetr_kond,              "Rate
            dmbtr TYPE dmbtr,                   "Amount in local currency
            END OF t_jkmseg,
    *--Structure for A006 Table
            BEGIN OF t_a006,
            fkdat TYPE fkdat,                   "Billing date
            matnr TYPE matnr,                   "Material Number
            kappl TYPE kappl,                   "Application
            kschl TYPE kschl,                   "Condition type
            vkorg TYPE vkorg,                   "Sales organization
            vtweg TYPE vtweg,                   "Distribution channel
            datbi TYPE kodatbi,                 "Validity end date
            datab TYPE kodatab,                 "Validity start date
            knumh TYPE knumh,                   "Condition record number
            END OF t_a006,
    *--Structure for KONP Table
            BEGIN OF t_konp,
            fkdat TYPE fkdat,                   "Billing date
            matnr TYPE matnr,                   "Material Number
            knumh TYPE knumh,                   "Condition record number
            kappl TYPE kappl,                   "Application
            kschl TYPE kschl,                   "Condition type
            kbetr TYPE kbetr_kond,              "Rate
            END OF t_konp.
                          WORK AREAS                                     *
    DATA : wa_vbrp   TYPE t_vbrp,          "Work area for VBRP Table
           wa_mkpf   TYPE t_mkpf,          "Work area for MKPF Table
           wa_mseg   TYPE t_mseg,          "Work area for MSEG Table
           wa_jkmkpf TYPE t_jkmkpf,        "Work area for MKPF Table
           wa_jkmseg TYPE t_jkmseg,        "Work area for MSEG Table
           wa_kjmseg TYPE t_jkmseg,        "Work area for MSEG Table
           wa_lips   TYPE t_lips,          "Work area for LIPS Table
           wa_vbak   TYPE t_vbak,          "Work area for VBAK Table
           wa_konv   TYPE t_konv,          "Work area for KONV Table
           wa_dummy  TYPE t_dummy,         "Work area for DUMMY Table
           wa_tfacs  TYPE t_tfacs,         "Work area for TFACS Table
           wa_final  TYPE t_final,         "Work area for Final Table
           wa_total  TYPE t_total,         "Work area for Total Table
           wa_ship   TYPE t_ship,          "Work area for Ship Table
           wa_a006   TYPE t_a006,
           wa_konp   TYPE t_konp,          "Work area for KONP Table
           wa_nday   TYPE t_nday,
           wa_fieldcat TYPE slis_fieldcat_alv,"Work area for fieldcatalog
           wa_layout1 TYPE slis_layout_alv,
           wa_layout2 TYPE slis_layout_alv,
           wa_layout3 TYPE slis_layout_alv.
                          INTERNAL TABLES                                *
    DATA : it_vbrp   TYPE STANDARD TABLE OF t_vbrp   INITIAL SIZE 0,
           it_mkpf   TYPE STANDARD TABLE OF t_mkpf   INITIAL SIZE 0,
           it_mseg   TYPE STANDARD TABLE OF t_mseg   INITIAL SIZE 0,
           it_jkmkpf TYPE STANDARD TABLE OF t_jkmkpf INITIAL SIZE 0,
           it_jkmseg TYPE STANDARD TABLE OF t_jkmseg INITIAL SIZE 0,
           it_kjmseg TYPE STANDARD TABLE OF t_jkmseg INITIAL SIZE 0,
           it_lips   TYPE STANDARD TABLE OF t_lips   INITIAL SIZE 0,
           it_vbak   TYPE STANDARD TABLE OF t_vbak   INITIAL SIZE 0,
           it_konv   TYPE STANDARD TABLE OF t_konv   INITIAL SIZE 0,
           it_dummy  TYPE STANDARD TABLE OF t_dummy  INITIAL SIZE 0,
           it_tfacs  TYPE STANDARD TABLE OF t_tfacs  INITIAL SIZE 0,
           it_final  TYPE STANDARD TABLE OF t_final  INITIAL SIZE 0,
           it_total  TYPE STANDARD TABLE OF t_total  INITIAL SIZE 0,
           it_ship   TYPE STANDARD TABLE OF t_ship   INITIAL SIZE 0,
           it_nday   TYPE STANDARD TABLE OF t_nday   INITIAL SIZE 0,
           it_a006   TYPE STANDARD TABLE OF t_a006   INITIAL SIZE 0,
           it_konp   TYPE STANDARD TABLE OF t_konp   INITIAL SIZE 0,
           it_fieldcat  TYPE slis_t_fieldcat_alv WITH HEADER LINE,
           it_fieldcat2 TYPE slis_t_fieldcat_alv WITH HEADER LINE,
           it_events TYPE slis_t_event,
           it_event1 TYPE slis_t_event,
           it_event2 TYPE slis_t_event,
           it_header TYPE slis_t_listheader.
                      PARAMETERS &  SELECT-OPTIONS                       *
    SELECTION-SCREEN BEGIN OF BLOCK blk1 WITH FRAME TITLE text-001.
    SELECT-OPTIONS : s_erdat FOR vbak-erdat NO-DISPLAY. "Created On
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 3(10) text-003.
    PARAMETERS : p_month(7) TYPE c OBLIGATORY.  "Month
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 3(40) text-030.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 3(10) text-004.
    PARAMETERS : p_bud(16) TYPE c OBLIGATORY.   "Budget
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN END OF BLOCK blk1.
                      AT SELECTION SCREEN                                *
    AT SELECTION-SCREEN ON p_month.
    *--Create the date range
      PERFORM sub_create_date.
                      START-OF-SELECTION                                 *
    START-OF-SELECTION.
    *--Select data from TFACS Table
      PERFORM sub_read_tfacs.
    *--Select Data from VBAK Table
      PERFORM sub_read_vbak.
    *--Select Data from VBRP Table
      PERFORM sub_read_vbrp.
    *--Select Data from MKPF Table
      PERFORM sub_read_mkpf.
    *--Select Data from MSEG Table
      PERFORM sub_read_mseg.
    *--Select Data from LIPS Table
      PERFORM sub_read_lips.
    *--Select Data from KONV Table
      PERFORM sub_read_konv.
    *--Collect all the data into final inetrnal table
      PERFORM sub_collect_data.
    *--Collect all the data into final inetrnal table
      PERFORM sub_collect_vbrp.
    *--Collect all the data into final inetrnal table
      PERFORM sub_collect_lips.
    *--Collect MSFT retail store promo rev & MSFT retail
    store consignment net rev
      PERFORM sub_jk_column.
    *--Collect consignment cost
      PERFORM sub_collect_consign.
    *--Calculate Plug Numbers
      PERFORM sub_claculate_plug.
    *--Collect data from vbrp
      PERFORM sub_collect_cost.
    *--Calculate the total & avarages
      PERFORM sub_calculate_total.
    *--Collect totals & avarages into final internal table
      PERFORM sub_collect_total.
                      END-OF-SELECTION                                   *
    END-OF-SELECTION.
    *--This perform creates the ALV events
      PERFORM sub_create_events.
    *--This perform prepare field catalog.
      PERFORM sub_field_catalogmerge.
    *--This perform displays an ALV report
      PERFORM sub_alv_display.
    *&      Form  sub_read_vbrp
          text
    FORM sub_read_vbrp .
    *--Local Variables
      DATA : lv_index LIKE sy-tabix.
    *--Select query to pick the Billing document Billing date Billing
    category Billing type Distribution channel Number of doc condition
    Billing item Material Number Plant Referance Subtotal 2 Cost in
    document currency and Partner function from table VBRK VBRP and VBPA
    using inner join
      SELECT a~vbeln                            "Billing document
             a~fkdat                            "Billing date
             a~fktyp                            "Billing category
             a~fkart                            "Billing type
             a~vtweg                            "Distribution channel
             a~knumv                            "Number of doc condition
             b~posnr                            "Billing item
             b~matnr                            "Material Number
             b~werks                            "Plant
             b~vgbel                            "Referance
             b~kzwi2                            "Subtotal 2
             b~wavwr                            "Cost in document currency
             c~kunnr                            "Partner function
             FROM vbrk AS a
             INNER JOIN vbrp AS b
             ON avbeln EQ bvbeln
             INNER JOIN vbpa AS c
             ON  bvbeln EQ cvbeln
             INTO CORRESPONDING FIELDS OF TABLE it_vbrp
             WHERE fkdat IN s_erdat
             AND   parvw EQ 'ZS'.
      IF sy-subrc EQ 0.
    *--Sort table by Referance
        SORT it_vbrp BY vgbel1.
      ENDIF.
      LOOP AT it_vbrp INTO wa_vbrp.
        lv_index = sy-tabix.
        wa_vbrp-vgbel1 = wa_vbrp-vgbel.
        MODIFY it_vbrp FROM wa_vbrp INDEX lv_index TRANSPORTING
                                          vgbel1.
    *--Clear
        CLEAR : wa_vbrp.
      ENDLOOP.
    ENDFORM.                    " sub_read_vbrp
    *&      Form  sub_read_mkpf
          text
    FORM sub_read_mkpf .
    *--Local Variables
      DATA : lv_index LIKE sy-tabix.
      IF NOT it_vbrp[] IS INITIAL.
    *--Select query to pick the Number of material document Material
    document year and Referance from table MKPF
        SELECT DISTINCT
               mblnr                            "Number of material document
               mjahr                            "Material doc. year
               xblnr                            "Referance
               FROM mkpf
               INTO CORRESPONDING FIELDS OF TABLE it_mkpf
               FOR ALL ENTRIES IN it_vbrp
               WHERE xblnr EQ it_vbrp-vgbel.
      ENDIF.
    *--Sort table by No of material document and fiscal year
      SORT it_mkpf BY mblnr mjahr.
      IF sy-subrc EQ 0.
        DELETE ADJACENT DUPLICATES FROM it_mkpf COMPARING mblnr mjahr.
      ENDIF.
    *--Sort table by referance document
      SORT it_vbrp BY vgbel.
      SORT it_mkpf BY xblnr.
      IF NOT it_mkpf[] IS INITIAL.
        LOOP AT it_mkpf INTO wa_mkpf.
          lv_index = sy-tabix.
    *--Clear
          CLEAR : wa_vbrp.
          READ TABLE it_vbrp INTO wa_vbrp WITH KEY vgbel = wa_mkpf-xblnr
                                                   BINARY SEARCH.
          IF sy-subrc EQ 0.
            wa_mkpf-fkdat = wa_vbrp-fkdat.
            wa_mkpf-kunnr = wa_vbrp-kunnr.
          ENDIF.
          MODIFY it_mkpf FROM wa_mkpf INDEX lv_index TRANSPORTING
                                            fkdat kunnr.
    *--Clear
          CLEAR : wa_mkpf.
        ENDLOOP.
      ENDIF.
    ENDFORM.                    " sub_read_mkpf
    *&      Form  sub_read_mseg
          text
    FORM sub_read_mseg .
    *--Local Variables
      DATA : lv_index LIKE sy-tabix.
      IF NOT it_mkpf[] IS INITIAL.
    *--Select query to pick the Number of material document Material
    document year Movement type Special Stock indicator and Amount in
    local currency from table MSEG
        SELECT mblnr                            "Number of material document
               mjahr                            "Material doc. year
               bwart                            "Movement type
               sobkz                            "Special Stock indicator
               dmbtr                            "Amount in local currency
               matnr                            "Material
               werks                            "Plant
               FROM mseg
               INTO CORRESPONDING FIELDS OF TABLE it_mseg
               FOR ALL ENTRIES IN it_mkpf
               WHERE mblnr EQ it_mkpf-mblnr
               AND   mjahr EQ it_mkpf-mjahr.
              AND   bwart EQ '601'.
              AND   sobkz EQ 'K'.
      ENDIF.
    *--Sort table by Number of material document
      SORT it_mkpf BY mblnr.
    *--Sort table by Number of material document
      SORT it_mseg BY mblnr.
      IF NOT it_mseg[] IS INITIAL.
        LOOP AT it_mseg INTO wa_mseg.
          lv_index = sy-tabix.
    *--Clear
          CLEAR : wa_mkpf.
          READ TABLE it_mkpf INTO wa_mkpf WITH KEY mblnr = wa_mseg-mblnr
                                                   BINARY SEARCH.
          IF sy-subrc EQ 0.
            wa_mseg-fkdat = wa_mkpf-fkdat.
            wa_mseg-kunnr = wa_mkpf-kunnr.
          ENDIF.
          MODIFY it_mseg FROM wa_mseg INDEX lv_index TRANSPORTING
                                            fkdat kunnr.
    *--Clear
          CLEAR: wa_mseg.
        ENDLOOP.
      ENDIF.
    ENDFORM.                    " sub_read_mseg
    *&      Form  sub_read_lips
          text
    FORM sub_read_lips .
    *--Local Variables
      DATA : lv_index LIKE sy-tabix.
      IF NOT it_vbrp[] IS INITIAL.
    *--Select query to pick the Delivery Material Number Plant
    Movement type Subtotal 2 and Quantity from table LIPS
        SELECT vbeln                            "Delivery
               matnr                            "Material Number
               werks                            "Plant
               bwart                            "Movement type
               kzwi2                            "Subtotal 2
               lfimg                            "Quantity
               FROM lips
               INTO CORRESPONDING FIELDS OF TABLE it_lips
               FOR ALL ENTRIES IN it_vbrp
               WHERE vbeln EQ it_vbrp-vgbel1.
        IF sy-subrc EQ 0.
    *--Sort table by Delivery
          SORT it_lips BY vbeln.
        ENDIF.
      ENDIF.
    *--Sort table
      SORT it_vbrp BY vgbel1.
      LOOP AT it_lips INTO wa_lips.
        lv_index = sy-tabix.
    *--CLear
        CLEAR : wa_vbrp.
        READ TABLE it_vbrp INTO wa_vbrp WITH KEY vgbel1 = wa_lips-vbeln
                                                 BINARY SEARCH.
        IF sy-subrc EQ 0.
          wa_lips-fkdat = wa_vbrp-fkdat.
          wa_lips-knumv = wa_vbrp-knumv.
        ENDIF.
        MODIFY it_lips FROM wa_lips INDEX lv_index TRANSPORTING
                                    fkdat knumv.
    *--Clear
        CLEAR : wa_lips.
      ENDLOOP.
    ENDFORM.                    " sub_read_lips
    *&      Form  sub_read_konv
          text
    FORM sub_read_konv .
      IF NOT it_vbrp[] IS INITIAL.
    *--Select query to pick the Number of doc condition Condition type
    and Rate from table KONV
        SELECT knumv                            "Number of doc condition
               kschl                            "Condition type
               kbetr                            "Rate
               FROM konv
               INTO TABLE it_konv
               FOR ALL ENTRIES IN it_vbrp
               WHERE knumv EQ it_vbrp-knumv
               AND   kschl EQ 'ZR00'.
      ENDIF.
    ENDFORM.                    " sub_read_konv
    *&      Form  sub_read_vbak
          text
    FORM sub_read_vbak .
    *--Select query to pick the Created On Delivery Sales document type
    Distribution channel and Number of doc condition from table VBAK
      SELECT erdat                              "Created On
             vbeln                              "Delivery
             auart                              "Sales document type
             vtweg                              "Distribution channel
             knumv                              "Number of doc condition
             FROM vbak
             INTO TABLE it_vbak
             WHERE erdat IN s_erdat.
      IF sy-subrc EQ 0.
    *--Sort table by created on
        SORT it_vbak BY erdat.
      ENDIF.
    ENDFORM.                    " sub_read_vbak
    Regards,
    prashant

  • Net sales report

    Hi all,
    I have to create a sales report where i need to pull values based on a customer and materials.
    Example : Customers have ordered diff materials and i have to pull data based on the customer and the materials he  has ordered, the net values of that materials and sales values of that materials. Like wise for all customers.

    I was pulling sold to party- kunag from vbrk and getting all the vbelns from vbrp for that customer.
    and each vbeln had diff materials ordered by that cust in it, and i had to check for a particular matnr and posnr in a vbeln and calculate the total for a material based on cust.
    the figures being shown in vf03 for vbeln and the data i was populating were not matching.As i was confused i asked for a example.

Maybe you are looking for

  • How to bind data for a UDO table..on to MATRIX

    hi i have created a Master Data Table(Video) and also created UDO object... i designed a form with 2 controls as text boxes and a matrix with some coloums......... the functioality of the form is ..when i enter some values in those controls...it shou

  • ORA-06550 error while executing procedure

    HI Friends, I have written a proc for the below process. SP_Control (table) sno     campgn_id     campgn_typ     campgn_no     current_wave 1     ET07001     ONB     ONB01     1 2     ET07001     ONB     CNB01     1 3     ET03053     IAL     IAL1A   

  • Has anyone actually got a Captivate 6 quiz (pref. HTML5) working in Moodle X.X ?

    Thats wbout it really. The way that C6 punlishes to a gazillion folders rather makes the process difficult (and I do not want to create Moodle Quizzes and export via Scorm as there is n point in that - I want to create HTML5 quizzes within the topics

  • Is it possible to make a KPI as a column (Relocate to Column instead of Row) in Performance Point?

    Hi, I have 3 KPI's, I want all the KPI's in Column wise. By default it is row wise but for my requirements is. I want to make all KPI's as a coulm. Can anyone tell me. Its annoying me like anything. Thanks & Regards Pomani Sankaran

  • JSP  compilation error while starting up WLS 7.1

              Hello,           We are using the WLS 7.1 and trying to bring the WebLogic Server up, I am getting           the following error while compiling the JSP file.           RBMApp.jsp has an include statement for McarBase.jsp and I am not quiet