Consumer category-wise consumption report

Hi all,
Please guide me in getting consumer category-wise consumption report.
There are 10 categories of consumers. I want to generate consumption report for these consumers.
Thanks and Regds.,
Vijay

Hi,
Not sure i followed your question completely..
lets say that customers are classified as 'Residential' - RES
and 'Commercial' - COM.
For these  customers.. there will be Contract Accounts and contracts and installations associated to it.
In the installation check the field 'Billing Class' , so based on the type whether 'RES' or 'COM' you need to hit the table ERDK to fetch the invoices for the corresponding Contract Account and
check again the tables DBERCHZ1  to extract the consumption by passing the same invoice number(in sap the 'Print document' number -field ERDK-OPBEL).
Based on the category selected by the user on the selection-screen either RES or COM. you can display in output report
Hope it helps.
Regards
Vinay

Similar Messages

  • Item Wise Consumption Report

    Hello Friends,
    i want to get the consumption report item wise.
    IN GL Line item display i am not getting the same and through MB51 by using Movement Type 201 and 261 is not fruitfull.
    Actly while preparing of Balance Sheet i need to give the Consumption Detail Item Wise.
    Could any one please help me out on this issue.
    Thanks
    Nitin Jindal

    Hi Nitin,
    You can develop SAP query T code SQ01 by joining Material and GL Account table to get consumption report output.
    Regards,
    Santosh

  • Batch Wise Consumption Report

    Dear All,
    Is there any standard report to see & get the batchwise consumption.
    Please help me out.
    Regards,
    Rocky.

    Hi,
    It is quite possible that MB56 is displaying less batches than actual figure.
    In just one step your problem will get resolve.
    1) The pre-requisite to use MB56 is MB57.
    Run MB57. Specify from-to date. Wait till few minutes.
    After completion check MB56, you will have the result.
    At regular interval you need to comiple the file. You can put background schedule also.
    T.codes BMBC & MB56 both are using same compiled file.
    Whereas MCBR is used to get the data of batches more than one or 20. Ihope this will help you.

  • Columnar Production Consumption Report

    Dear Experts,
    I require a query report, which will give the columnar Item group wise consumption report (qty and Value) against the respective production order.
    Please help.
    The Above query is required for consumption of quantities only through production order
    Regards,
    Rahul Goja.

    Hi,
    Check this thread first. Let me know your comments:
    http://scn.sap.com/thread/3258871
    Thanks & Regards,
    Nagarajan

  • Oracle Assets Category-wise Report from FA and GL tables

    Hi,
    I am developing a customized report (Schedule of Fixed Assets) in the Oracle Assets Module, Which includes Category Wise Opening Balance, additions, adjustments, transfer IN, Transfer OUT and Retirements of Cost and Depreciations. I am using FA tables (FA_CATEGORY_BOOKS, FA_CATEGORIES_B) for category_id, category_name (segment1 of category combination) and book_type_code (Book Name). And I am also using GL tables (GL_BALANCES, GL_JE_HEADERS, GL_JE_LINES) for the amount of begin_balance_dr,begin_balance_cr,accounted_dr and accounted_cr.
    The report gets the category_id,category_name from FA_CATEGORIES_B and book_type_code, asset_account_ccid, reserve_account_ccid and book_type_code from FA_CATEGORY_BOOKS for a single book. The sum of accounted_dr or sum of accounted_cr is calculated for a single category_id whose asset_account_ccid is matched with code_combination_id of GL_JE_LINES.
    There are 15 books each have many projects (FA_CATEGORIE_B.segment6). This report is working as desired for 14 books but in one book there is same asset_account_ccid and reserve_account_ccid for more than one category_id(s). That’s why the same amount is displayed against the multiple category_ids .
    As functionally it is possible in Oracle Assets to have same asset_account_ccid or reserve_account_ccid for more than one category_ids, I want to know that is there any other attribute(except asset_account_ccid,reserve_account_ccid and code_combination_id) which can be used to get the separate data for each category_id from GL tables.
    Regards,
    Fahim
    [email protected]

    hi vijay,
    thanks for your quick reply,
    i'm preparing a reports,fields from bsis and bseg database tables,
    and,my select statement giving error,saying that cluster table can't be joined,
    my problem is,how to write the select statement without inner join those tables,is there any alternative,
    i heard there is 'select for all entries',but i don't know proper usage of that addition,
    regards,
    kc

  • Material consumption report for sales made artcle wise - help urgent

    Hi Folks,
    My client need a report which consist of
    The raw material consumption report
    1. Article wise (material group)
    2. QTY
    3. Value
    4. or all sales made for foreign customers
    5. Business area
    Please help me
    Thanks
    Narasim

    Hi,
    Check COOIS report.
    It will show the consumption order wise just filter Movement type 261.
    Regards,
    Shayam

  • Day wise raw material consumption report query

    Hi,
    I was wondering if there was a way to extract the day wise consumption of all the raw materials that we use at the factory. The standard report in SAP B1 only gives me the total raw material consumption within a period of time and I need to drill down a couple of levels to see the individual raw material transferred.
    I basically wanted to use this data to establish the weekly consumption of my raw materials as the goods issue team enters this on a daily basis.
    Thanks in advance.

    Sorry for not having included it earlier. The website did not let me attach an excel sheet.so I've attached a csv file for you to take a look at but basically these are the only fields I need:
    Date
    Item No.
    Item Name
    Issue Qty [Out Qty]
    01-01-2014
    CSPLPIC001
    Raw Material 1
    740
    01-01-2014
    CSPLPIC002
    Raw Material 2
    950
    01-01-2014
    CSPLPIC003
    Raw Material 3
    793
    01-01-2014
    CSPLPIC005
    Raw Material 4
    980
    01-01-2014
    CSPLPIS001
    Raw Material 5
    487
    01-01-2014
    CSPLPIS002
    Raw Material 6
    927
    07-01-2014
    CSPLPMC001
    Raw Material 7
    907
    08-01-2014
    CSPLPMC002
    Raw Material 8
    669
    09-01-2014
    CSPLPMC005
    Raw Material 9
    41
    10-01-2014
    CSPLPIC001
    Raw Material 1
    599
    10-01-2014
    CSPLPIC002
    Raw Material 2
    473
    10-01-2014
    CSPLPIC003
    Raw Material 3
    619
    10-01-2014
    CSPLPIC005
    Raw Material 4
    477
    10-01-2014
    CSPLPIS003
    Raw Material 5
    408
    Please do let me know if there is any other information that you need.

  • Vendor wise/Invoice wise consumption for each WBS element

    Any standard report from SAP, which provide details of Vendor Purchase order / Contract, details of SES with WBS no. and details of Vendor invoice in columnar form.
    SAP system can not generate standard reports giving vendor wise/Invoice wise consumption for each WBS element of particular asset.
    Please help me to get this report.
    Thanks in Advance.

    Hi
    Your starting point should be CJI3 report or any PS report... Here you get the FI Doc no
    If this FI Doc No is generated from MM, check the Header segment of the document.. It would have MM Doc NO + Fisc Yr populated in the ref key... This gives you the link between FI & MM
    From here on, you can take it forward... You can look up this doc no in MSEG Table and find the PO no... Then go to EKBE table for other PO details....
    br, Ajay M

  • 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

  • How to total sales per merchandise category wise

    Dear all,
    We are into Retail sector, and using SAP IS-Retail for our business process, we want to see sales reports based Merchandise Category level.
    is there any standard report which shows list of sales order per merchandise category wise.
    if not can we develop a Zreport using Query or ALV report.
    then which Tables need to be used.
    Please help me to solve this issue, Your help will be highly appreciated.
    Thank you,
    Raghu ram.

    Hi,
    if you want more flexible, you could try this modified Istvan's query:
    SELECT top 10 T1.ItemCode, T2.ItemName, T3.ItmsGrpNam,   SUM(T1.Quantity) as "Total Qty Sold",
      SUM(T1.TotalSumSy) as "Total Amount" ,
      (select sum (r.Quantity) from ODLN h
         inner join DLN1 r on h.DocEntry=r.DocEntry  
         where h.DocDate>='[%4]' and h.DocDate<='[%5]'
             and r.ItemCode=T1.ItemCode) '2007 Sold',
      (select sum (r.TotalSumSy) from ODLN h
         inner join DLN1 r on h.DocEntry=r.DocEntry  
         where h.DocDate>='[%6]' and h.DocDate<='[%7]'
             and r.ItemCode=T1.ItemCode) '2007 Amount'
    FROM ODLN T0 INNER JOIN DLN1 T1 ON T0.DocEntry = T1.DocEntry INNER JOIN OITM T2 ON T1.ItemCode = T2.ItemCode INNER JOIN OITB T3 ON T2.ItmsGrpCod = T3.ItmsGrpCod
    WHERE T0.DocDate >='[%0]' AND T0.DocDate <='[%1]' AND T3.ItmsGrpNam between '[%2]'  and '[%3]'
    GROUP BY T1.ItemCode, T2.ItemName, T3.ItmsGrpNam
    ORDER by SUM(T1.Quantity) DESC
    Rgds,

  • Shift wise production report

    hi Exprts,
    Process:
    I shift starts at 6.00 am and ends at 14.00 hrs
    II shift starts at 14.00 hrs and ends at 22.00 hrs
    III shift starts at 22.00 hrs and ends at 6.00 am (next day)
    3.We confirm the qty in the t.code CO11N
    The requirement is : How to take the Shift wise production report? , and also a report which shows consumption of components against production order in a shift.
    Regards
    Ramesh

    Dear Ramesh,
    check this link to first post the confirmation shiftwise ,both in CO11N and CO15.
    http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/c0fa9a04-376a-2c10-c396-86d32ac80614?quicklink=index&overridelayout=true
    Further to this you can get the shift wise production report using COOIS.
    Regards
    S Mangalraj

  • Material yearly consumption report

    Hi,
    I have gone through many topics on getting the yearly consumption report of material but still could not get it.
    We have just implemented SAP in our company and all transactions are being done from 1st Jan 2011. In Material Master we have added the consumption (under Forecast tab) month wise for the last four years.
    Is there a way to see a report based on that, as I would like to accumulate the data year wise and see the last four years consumption.

    Hi ,
    I would give you suggestion based on your question "Is there a way to see a report based on that, as I would like to accumulate the data year wise and see the last four years consumption."
    1st , are you using any PP related Production order ?
    This is very simple issue with movement type 261 if you are using PP.
    Since you would like to see accumulate the date year wise for last four years consumption , my suggest is based on the plan date from the last 4 years with 261 movement type for the raw material / semi finished in those order.
    Standard report
    COOIS Report - with movement type 261 based on order also possible to view.
    or
    MCRP- exact material consumption datewise or order wise.
    MC45 ,MCRE alternative report.
    For customize solution with abap,
    Please check with Table MVER -  Material Consumption , MSEG (MENGE) and S026 (ENMNG)
    Pls restrict the selection condition for material with movement type 261 in table MSEG.
    If you using MRP area, perhaps you need check in table DVER - Material Consumption for MRP Area.
    Hope is clear and can help you.
    TQ

  • Consumption report Date to date ,Group & itemwise

    Dear Sap Expets,
    Can you please advise me that i want to make consumption report Date to date ,Group & itemwise ,in summary report (Total Qty and Value consumed).How is the possible it?
    Thanks
    mohit

    Hi,
    Use MB5B report for the same, it will give you qty & values for overall receipts and issues for certain period or else refer report MC.2
    Hope this will resolve your issue.
    Thanks & Regards,
    Sandesh Sawant

  • Fuel Consumption Report Modification - 21

    Hi Experts
    I am working on fuel consumption modification. can anyone help me how to get max and min value for this program
    I am getting one row correct with equipment no is enter but when I enter the range of equipment no it is taking long time and the result is repeating for each row
    please correct my report
    Thnaks in advanced
    Piroz
    REPORT Z_ESLP_FUEL2 LINE-SIZE  250 LINE-COUNT 75
             NO STANDARD PAGE HEADING.
    TABLES : equi,
             equz,
             imptt,
             imrg,
             eqkt,
             iloa.
    TYPES: BEGIN OF ty_equi," occurs 0,
           equnr type equi-equnr,
           END OF ty_equi.
    TYPES: BEGIN of ty_eqkt," occurs 0,
           equnr type eqkt-equnr,
           eqktx type eqkt-eqktx,
           END OF ty_eqkt.
    TYPES: BEGIN of ty_iloa ,"occurs 0,
           iloan type iloa-iloan,
           eqfnr type iloa-eqfnr,
           END OF ty_iloa.
    TYPES: BEGIN of ty_imptt," occurs 0,
           mpobj type imptt-mpobj,
           END of ty_imptt.
    TYPES: BEGIN of ty_imrg ,"occurs 0,
           idate type imrg-idate,
           recdv type imrg-recdv,
           recdu type imrg-recdu,
           END of ty_imrg.
    TYPES: BEGIN OF ty_data  ,
           equnr      type equnr,         " Euipment no
           eqktx      type eqkt-eqktx,    " Equipment Text
           eqfnr       type iloa-eqfnr,     " Equipment Sort field
           idate      type imrg-idate,    " Measuring Date
           recdu      type imrg-recdu,    " Unit of measuring ='KM','L','H'
           recdv      type imrg-recdv,    " Counter reading data
           END OF ty_data.
    TYPES: BEGIN OF ty_final,
           equnr           type equnr,            "  Equipment no
           eqktx           type eqkt-eqktx,       "  Equipment Text
           eqfnr           type iloa-eqfnr,       "  Equipment Sort field
           min_date        type imrg-idate,       "  Min Date
           min_km          type imrg-recdv,       "  Max Km
           max_km          type imrg-recdv,       "  Min km
           t_max_min_km    type i,                "  Total min_km-max_km
           max_date        type imrg-idate,       "  Max Date
           min_hr          type imrg-recdv,       "  Max hr
           max_hr          type imrg-recdv,       "  Min hr
           t_max_min_hr    type i,                "  Total min_hr-max_hr
           min_lit         type imrg-recdv,       "  Max lit
           max_lit         type imrg-recdv,       "  Min lit
           t_max_min_lit    type i,                "  Total min_lit-max_lit
           fuel_con        type p decimals 2,     "  Total_hrs / t_max_min_hr
           km_l            type p decimals 2,     "  km / L
           lit_per_hr      type i           ,     "  fuel comsumed / t_max_min_hr
           END OF ty_final.
    DATA: i_equi TYPE TABLE OF ty_equi,   "internal table
          wa_equi TYPE ty_equi, " work area
          i_eqkt TYPE TABLE OF ty_eqkt,   "internal table
          wa_eqkt TYPE ty_eqkt, " work area
          i_iloa TYPE TABLE of ty_iloa,   "internal table
          wa_iloa TYPE ty_iloa, " work area
          i_imptt TYPE TABLE of ty_imptt, "internal table
          wa_imptt TYPE ty_imptt,
          i_imrg  TYPE TABLE of ty_imrg,  "internal table
          wa_imrg TYPE ty_imrg,
          i_data TYPE TABLE OF ty_data,   "internal table
          wa_data TYPE ty_data, " work area
          i_final TYPE TABLE OF ty_final, " internal table
          wa_final TYPE ty_final. " work area
    DATA :  max_date type date ,
             min_date type date,
             max_km TYPE p DECIMALS 2,
             min_km TYPE p DECIMALS 2,
             max_hr TYPE p DECIMALS 2,
             min_hr TYPE p DECIMALS 2,
             max_lit TYPE p DECIMALS 2,
             min_lit TYPE p DECIMALS 2,
             t_max_min_km  TYPE p DECIMALS 2,
             t_max_min_hr TYPE p DECIMALS 2,
             t_max_min_lit TYPE p DECIMALS 2.
    SELECTION-SCREEN BEGIN OF BLOCK blk WITH FRAME.
    SELECTION-SCREEN BEGIN OF BLOCK blk1 WITH FRAME TITLE text-001.
    SELECT-OPTIONS: p_equnr FOR equi-equnr, "no-extension no intervals,
                    p_idate FOR imrg-idate.  "NO-EXTENSION NO INTERVALS OBLIGATORY,
                   " p_recdu FOR imrg-recdu." NO-EXTENSION NO INTERVALS ."default 'M3'" OBLIGATORY.
    SELECTION-SCREEN END OF BLOCK blk1.
    SELECTION-SCREEN BEGIN OF BLOCK blk2 WITH FRAME TITLE text-002.
    SELECTION-SCREEN END OF BLOCK blk2.
    SELECTION-SCREEN END OF BLOCK blk.
    TOP-OF-PAGE.
      FORMAT INTENSIFIED ON.
      WRITE:/1(40) ' INVESTMENT LIMITED  '.
      WRITE:/50(40) ' FUEL CONSUMPTION REPORT ' CENTERED   ,
              2 'Page', sy-pagno.
      FORMAT INTENSIFIED OFF.
      WRITE:/50(40) '----
    ' CENTERED .
      FORMAT INTENSIFIED ON.
      WRITE:/2 sy-datum COLOR 3, sy-uzeit .
      "WRITE:/1 S903-SPMON ."p_yearf.
      ULINE.
      "CENTERED.
      write: /2 'Date From     :'.
      write: /2 'Equipment No  :'.
      write: /2 'Unit          :'.
      SKIP.
      ULINE.
      WRITE:/1 sy-vline,
        2   'EQUIP NO',              10 sy-vline,
        11  'NAME',                  40 sy-vline,
        41  'SORT',                  60 sy-vline,
        61  'MIN DATE',              74 sy-vline,
        75  'MIN KM',                87 sy-vline,
        88  'MAX DATE',                100 sy-vline,
        101  'MAX KM' ,              113 sy-vline,
        114 'TOTAL MAX-MIN',                126 sy-vline,
        127  'MIN HR',               139 sy-vline,
        140 'MAX HR',                152 sy-vline,
        153 'TOTAL MAX-MIN' ,               167 sy-vline,
        168 'MIN LIT',               180 sy-vline,
        181 'MAX LIT',               193 sy-vline,
        194 'TOTAL LIT',             206 sy-vline,
        207 'FUEL CON',              219 sy-vline,
        220 'KM L',                  232 sy-vline,
        233 'LIT PER KM',            246 sy-vline.
      FORMAT COLOR 3 ON.
      ULINE.
    END-OF-PAGE.
    START-OF-SELECTION.
    select a~equnr d~eqktx f~eqfnr e~idate e~recdu e~recdv
    into corresponding fields of table i_data
    from equi AS a
    inner join equz as b
    on a~equnr = b~equnr
    inner join iloa as f
    on b~iloan = f~iloan
    inner join imptt as c
    on a~objnr = c~mpobj
    inner join eqkt as d
    on a~equnr = d~equnr
    inner join imrg as e
    on e~point = c~point
    where a~equnr in p_equnr
    and
    e~idate in p_idate and
    e~recdu in ('KM','L','H').
    "e~recdu in p_recdu.
    equi
    *select equnr from equi into table i_equi
    *for all entries in I_DATA
    **where objnr = i_equnr-mpobj.
    *where equnr = i_data-equnr.
    *endselect.
    eqkt
    *select equnr eqktx into table I_eqkt
    *from eqkt
    *FOR ALL ENTRIES IN I_DATA
    *where equnr = i_data-Equnr.
    *endselect.
    iloa
    *select eqfnr into table I_iloa
    *from equz
    *FOR ALL ENTRIES IN I_DATA
    *on equziloan = iloailoan
    *where iloan = i_data-iloan .
    *endselect.
    imrg
    *select idate recdv recdu into table I_imrg
    *from imrg
    *FOR ALL ENTRIES IN I_DATA
    *where imrg~objnr = i_date-mpobj.
    *endselect.
    loop  at i_data into wa_data.
    CLEAR: wa_final.
      READ TABLE i_final into wa_final
               with key equnr = wa_data-equnr.
        if sy-subrc EQ 0.
         PERFORM prepare_get_equi.
         PERFORM prepare_get_eqkt.
         PERFORM prepare_get_iloa.
         PERFORM prepare_get_imptt.
         PERFORM prepare_get_imrg.
          PERFORM prepare_final_rec USING'M'. " Modify Existing Record
          ElSE.
          PERFORM prepare_final_rec USING'A'. " Append New Record.
        ENDIF.
        ENDLOOP.
        LOOP AT i_final into wa_final.
          SORT i_final by equnr  descending.
        at new equnr.
        read table i_final into wa_final index sy-tabix.
    WRITE:/1 sy-vline,
    2  wa_final-equnr                                                 , 10 sy-vline,
    11 wa_final-eqktx                                                 , 40 sy-vline,
    41 wa_final-eqfnr                                                 , 60 sy-vline,
    61 wa_final-min_date                                              , 74 sy-vline,
    75 wa_final-min_km EXPONENT 0 DECIMALS 2   LEFT-JUSTIFIED           , 87 sy-vline,
    88 wa_final-max_date EXPONENT 0 DECIMALS 2   LEFT-JUSTIFIED         , 100 sy-vline,
    101 wa_final-max_km EXPONENT 0 DECIMALS 2   LEFT-JUSTIFIED          , 113 sy-vline,
    114 wa_final-t_max_min_km EXPONENT 0 DECIMALS 2 LEFT-JUSTIFIED    , 126 sy-vline COLOR 2,
    127 wa_final-min_hr EXPONENT 0 DECIMALS 2   LEFT-JUSTIFIED          , 139 sy-vline,
    140 wa_final-max_hr EXPONENT 0 DECIMALS 2 LEFT-JUSTIFIED          , 152 sy-vline,
    168 wa_final-min_lit EXPONENT 0 DECIMALS 2  LEFT-JUSTIFIED         , 180 sy-vline,
    181 wa_final-max_lit EXPONENT 0 DECIMALS 2 LEFT-JUSTIFIED         , 193 sy-vline,
    194 wa_final-t_max_min_lit EXPONENT 0 DECIMALS 2 LEFT-JUSTIFIED   , 206 sy-vline COLOR 2.
    *168 wa_final-min_lit EXPONENT 0 DECIMALS 2  LEFT-JUSTIFIED         , 180 sy-vline,
    *194 wa_final-t_max_min_lit EXPONENT 0 DECIMALS 2 LEFT-JUSTIFIED   , 206 sy-vline COLOR 2,
    *207 wa_final-fuel_con EXPONENT 0 DECIMALS 2 LEFT-JUSTIFIED        , 219 sy-vline,
    *220 wa_final-km_l EXPONENT 0 DECIMALS 2 LEFT-JUSTIFIED            , 232 sy-vline,
    *233 wa_final-lit_per_hr EXPONENT 0 DECIMALS 2 LEFT-JUSTIFIED      , 246 sy-vline.
    uline.
    uline .
    endloop.
    FORM prepare_final_rec  USING    p_mode TYPE char1.
    select MAX( eidate ) Min( eidate ) MAX( erecdv ) MIN( erecdv )
    into  corresponding fields of (wa_final-max_date,wa_final-min_date, wa_final-max_km , wa_final-min_km)
    from equi AS a
    inner join equz as b
    on aequnr = bequnr
    inner join iloa as f
    on biloan = filoan
    inner join imptt as c
    on aobjnr = cmpobj
    inner join eqkt as d
    on aequnr = dequnr
    inner join imrg as e
    on epoint = cpoint
    where a~equnr in p_equnr
    and
    e~idate in p_idate and
    e~recdu =  'KM' .
    "group by aequnr deqktx feqfnr eidate erecdu erecdv.
    "endselect.
    select MAX( eidate ) Min( eidate ) MAX( erecdv ) MIN( erecdv )
    into corresponding fields of (wa_final-max_date, wa_final-min_date, wa_final-max_hr, wa_final-min_hr)
    from equi AS a
    inner join equz as b
    on aequnr = bequnr
    inner join iloa as f
    on biloan = filoan
    inner join imptt as c
    on aobjnr = cmpobj
    inner join eqkt as d
    on aequnr = dequnr
    inner join imrg as e
    on epoint = cpoint
    where a~equnr in p_equnr
    and
    e~idate in p_idate and
    e~recdu =  'H'.
    "group by aequnr deqktx feqfnr eidate erecdu erecdv.
    "endselect.
    select MAX( eidate ) Min( eidate ) MAX( erecdv ) MIN( erecdv ) SUM( e~recdv )
    into (wa_final-max_date,wa_final-min_date, wa_final-max_lit, wa_final-min_lit ,  wa_final-t_max_min_lit )
    from equi AS a
    inner join equz as b
    on aequnr = bequnr
    inner join iloa as f
    on biloan = filoan
    inner join imptt as c
    on aobjnr = cmpobj
    inner join eqkt as d
    on aequnr = dequnr
    inner join imrg as e
    on epoint = cpoint
    where a~equnr in p_equnr
    and
    e~idate in p_idate and
    e~recdu =  'L' .
    "group by aequnr deqktx feqfnr eidate erecdu erecdv.
    "endselect.
             wa_final-t_max_min_km   = ( wa_final-max_km - wa_final-min_km ).
             wa_final-t_max_min_hr  =  ( wa_final-max_hr - wa_final-min_hr ).
             "wa_final-t_max_min_lit   = ( wa_final-max_lit - wa_final-min_lit ).
            wa_final-fuel_con =
            fuel_con        type p decimals 2,     "  Total_hrs / t_max_min_hr
            km_l            type p decimals 2,     "  km / L
            lit_per_hr      type i           ,     "  fuel comsumed / t_max_min_hr
      IF p_mode = 'A'.
        wa_final-equnr = wa_data-equnr.
        wa_final-eqktx = wa_data-eqktx.
        wa_final-eqfnr = wa_data-eqfnr.
        APPEND wa_final TO i_final.
      ELSE.
        MODIFY i_final FROM wa_final
          TRANSPORTING
              max_date
              min_date
              max_km
              min_km
              max_hr
              min_hr
              max_lit
              min_lit
              t_max_min_km
              t_max_min_hr
              where equnr = wa_data-equnr.
      ENDIF.
    "endselect.
    ENDFORM.                    " PREPARE_FINAL_REC

    Hi,
      I don't think so that there is such report which will give you operation wise consumption but you can make that fuel consumption as a activity type in ur standard value key and make some std value to put it in the routing, then if you go for operation wise confirmation then in that screen you will be able to put the consumption details in it.
    you can take a report of that also in COOIS.
    order wise consumption you can get from order report itself
    reward poits if you find it useful.

  • Material Consumption Report all expert requested to check my code

    Hi all guru
    Plz
    I am creating Material Consumption Report
    so  all expert are requested to check my code
    bcz its giving me wrong value change if nessary
    *& Report  Z_MATERIAL_CONSUPTION
    *&IEDK901096
    REPORT  Z_MATERIAL_CONSUPTION
    LINE-COUNT 65(2)
      LINE-SIZE 345
    MESSAGE-ID zate_msg
      NO STANDARD PAGE HEADING.
    *T A B L E S
    TABLES:MARC,
           mara,
           makt,
           mard,
           mbew,
           mseg,
           mkpf.
    T Y P E S
    Types for MARC
    TYPES: begin of ty_marc,
            matnr LIKE marc-matnr,
            werks LIKE marc-werks,
           end of ty_marc.
    ********Types for T001W*****
    TYPES:BEGIN OF ty_t001w,
            werks LIKE t001w-werks,
            name1 LIKE t001w-name1,
          END OF ty_t001w.
    ********Types for MARA*****
    TYPES:BEGIN OF TY_MARA,
           matnr LIKE mara-matnr,
           mtart LIKE mara-mtart,
           matkl LIKE mara-mtart,
          END OF ty_mara.
    ********Types for MAKT*****
    TYPES:BEGIN OF ty_makt,
           matnr LIKE makt-matnr,
           spras LIKE makt-spras,
           maktx LIKE makt-maktx,
           END OF ty_makt.
    ********Types for MKPF*****
    TYPES:BEGIN OF ty_mkpf,
           mblnr LIKE mkpf-mblnr,
           budat LIKE mkpf-budat,
      END OF ty_mkpf.
    ********Types for MSEG*****
      TYPES:BEGIN OF ty_mseg,
            mblnr LIKE mseg-mblnr,
            mjahr LIKE mseg-mjahr,
            matnr LIKE mseg-matnr,
            werks LIKE mseg-werks,
            menge LIKE mseg-menge,
            END OF ty_mseg.
    Types for main **************
    TYPES: begin of ty_main,
            matkl LIKE mara-mtart,
            mtart LIKE mara-mtart,
            matnr LIKE mara-matnr,
            werks LIKE marc-werks,
            name1 LIKE t001w-name1,
            maktx LIKE makt-maktx,
            budat LIKE mkpf-budat,
            mblnr LIKE mseg-mblnr,
            mjahr LIKE mseg-mjahr,
            menge LIKE mseg-menge,
            menge1 LIKE mseg-menge,
            bwart LIKE mseg-bwart,
            ret_qty LIKE mseg-menge,
            ret_*** LIKE mseg-menge,
            unit_qty LIKE mseg-menge,
            unit_*** LIKE mseg-menge,
            wip_qty LIKE mseg-menge,
            wip_*** LIKE mseg-menge,
            sub_qty LIKE mseg-menge,
            sub_*** LIKE mseg-menge,
            oth_qty LIKE mseg-menge,
            oth_*** LIKE mseg-menge,
            end of ty_main.
    Types for main2 **************
    TYPES: begin of ty_main2,
            mblnr LIKE mseg-mblnr,
            werks LIKE marc-werks,
            mjahr LIKE mseg-mjahr,
            menge LIKE mseg-menge,
            bwart LIKE mseg-bwart,
            matnr LIKE mara-matnr,
            mtart LIKE mara-mtart,
            matkl LIKE mara-mtart,
            end of ty_main2.
    *I N T E R N A L    T A B L E S
    DATA:it_mara   TYPE ty_mara  OCCURS 0 WITH HEADER LINE,
         it_marc   TYPE ty_marc  OCCURS 0 WITH HEADER LINE,
         it_t001w  TYPE ty_t001w OCCURS 0 WITH HEADER LINE,
         it_makt   TYPE ty_makt  OCCURS 0 WITH HEADER LINE,
         it_main   TYPE ty_main  OCCURS 0 WITH HEADER LINE,
         it_main2   TYPE ty_main2  OCCURS 0 WITH HEADER LINE,
         it_mkpf   TYPE ty_mkpf  OCCURS 0 WITH HEADER LINE,
        it_mseg   TYPE ty_mseg  OCCURS 0 WITH HEADER LINE,
         it_mseg   TYPE ty_main  OCCURS 0 WITH HEADER LINE,
         it_dept   TYPE ty_main2 OCCURS 0 WITH HEADER LINE,
         it_unit   TYPE ty_main2 OCCURS 0 WITH HEADER LINE,
         it_WIP    TYPE ty_main2 OCCURS 0 WITH HEADER LINE,
         it_subcon TYPE ty_main2 OCCURS 0 WITH HEADER LINE,
         it_others TYPE ty_main2 OCCURS 0 WITH HEADER LINE.
    **********I N T E R N A L   T A B L E S for Cumulative Calculation**********
    DATA:it_mseg1   TYPE ty_main  OCCURS 0 WITH HEADER LINE,
         it_dept1   TYPE ty_main2 OCCURS 0 WITH HEADER LINE,
         it_unit1   TYPE ty_main2 OCCURS 0 WITH HEADER LINE,
         it_WIP1    TYPE ty_main2 OCCURS 0 WITH HEADER LINE,
         it_subcon1 TYPE ty_main2 OCCURS 0 WITH HEADER LINE,
         it_others1  TYPE ty_main2 OCCURS 0 WITH HEADER LINE.
    W O R K   A R E A
    DATA:wa_mara  TYPE ty_mara,
         wa_marc  TYPE ty_marc,
         wa_t001w TYPE ty_t001w,
         wa_makt  TYPE ty_makt,
         wa_main  TYPE ty_main,
         wa_main2  TYPE ty_main2,
         wa_mkpf  TYPE ty_mkpf,
         wa_mseg  TYPE ty_mseg,
         wa_mseg1 TYPE ty_mseg,
         wa_dept  TYPE ty_main2,
         wa_ret_qty TYPE ty_main2,
         wa_ret_*** TYPE ty_main2.
    V A R I A B L E S  D E C L A R A T I O N
    DATA: MYDATE TYPE SY-DATUM,
          per_qty TYPE p,
          ***_qty TYPE p ,
          final_total TYPE p DECIMALS 2.
    S E L E C T I O N  S C R E E N
    SELECTION-SCREEN:BEGIN OF BLOCK B1 WITH FRAME TITLE text-001.
      PARAMETERS:Plant LIKE marc-werks DEFAULT '1023'.
      select-options:Mat_Grp     FOR mara-matkl,
                     Mat_Type    FOR mara-mtart,
                     MATERIAL    FOR MARC-MATNR,
                     Period      FOR mydate.
    PARAMETERS:Year  LIKE mseg-mjahr DEFAULT '2007'.
      SELECTION-SCREEN:END OF BLOCK B1.
    I N I T I A L I Z A T I O N
    INITIALIZATION.
    MATERIAL-LOW = '100'.
    MATERIAL-HIGH = '200'.
    APPEND MATERIAL.
    *MAT_TYPE-LOW = 'ABF'.
    *MAT_TYPE-HIGH = 'FERT'.
    *APPEND MAT_TYPE.
    *MAT_GRP-LOW = '100'.
    *MAT_GRP-HIGH = '200'.
    *APPEND MAT_GRP.
    *PERIOD-LOW = '20071001'.
    *PERIOD-HIGH = '20071031'.
    *APPEND PERIOD.
    S T A R T  O F  S E L E C T I O N
    start-of-selection.
    PERFORM it_mara_data.
    PERFORM it_marc_data.
    PERFORM it_t001w_data.
    PERFORM it_makt_data.
    PERFORM it_mseg_data.
    PERFORM it_mseg1_data. "CUMULATIVE  CALCULATION
    PERFORM it_mkpf_data.
    PERFORM it_dept_data.
    PERFORM it_dept1_data. "CUMULATIVE  CALCULATION
    PERFORM it_unit_data.
    PERFORM it_unit_data1. "CUMULATIVE  CALCULATION
    PERFORM it_wip_data.
    PERFORM it_wip_data1.  "CUMULATIVE  CALCULATION
    PERFORM it_sub_contract.
    PERFORM it_sub_contract1. "CUMULATIVE  CALCULATION
    PERFORM it_main_data.
    T O P   O F   P A G E
    TOP-OF-PAGE.
    WRITE: /1 'INOX AIR PRODUCTS LTD',plant,it_t001w-name1,
           /1 'TOTAL CONSUMPTION FOR THE PERIODE:',Period-low,'To',period-high.
    skip 2.
    FORMAT COLOR 1.
    ULINE.
    WRITE: /1'|','CODE ' ,
            15 'MATERIAL' ,
            30 'DESCRIPTION',
            90'CONSUMPTION' ,
            135'RETURN FROM DEPT.' ,
            170'INTER UNIT' ,
            210'W.I.P' ,
            240'SUB-CONTRACTOR' ,
            275'OTHERS' ,
            310'TOTAL',345'|' ,
           /1'|',15 'TYPE',
            85'FOR PERIOD' ,
            100 ' CUMULATIVE' ,
            130'FOR PERIOD' ,
            145 'CUMULATIVE' ,
            165'FOR PERIOD' ,
            180 'CUMULATIVE' ,
            200'FOR PERIOD' ,
            215'CUMULATIVE' ,
            235'FOR PERIOD' ,
            250'CUMULATIVE' ,
            265'FOR PERIOD' ,
            280 'CUMULATIVE' ,
            300'FOR PERIOD' ,
            315' CUMULATIVE' ,
            345'|' .
    ULINE.
    E N D   O F  S E L E C T I O N
    end-OF-SELECTION.
    PERFORM display_data.
    FORM it_mara_data.
        SELECT matnr
               mtart
               matkl
          FROM mara INTO CORRESPONDING FIELDS OF TABLE it_mara
          WHERE matnr IN material       AND
                mtart IN mat_type  AND
                matkl IN mat_grp.
    ENDFORM.                    " it_mara_data
    FORM it_marc_data .
    select matnr
           werks
      from marc
      into CORRESPONDING FIELDS OF TABLE  it_marc
            FOR ALL ENTRIES IN it_mara
      WHERE MATNR eq it_mara-matnr AND
            werks eq plant.
    ENDFORM.                    " it_marc_data
    FORM it_makt_data .
      SELECT
            matnr
            maktx
            FROM makt INTO
            CORRESPONDING FIELDS OF TABLE it_makt
            FOR ALL ENTRIES IN it_mara
            WHERE matnr eq it_mara-matnr.
    ENDFORM.                    " it_makt_data
    FORM it_main_data .
    *BREAK-POINT.
      loop at it_mara.
        wa_main-matnr = it_mara-matnr.
        wa_main-mtart = it_mara-mtart.
        wa_main-matkl = it_mara-matkl.
        READ TABLE it_marc WITH KEY  matnr = it_mara-matnr.
        wa_main-werks = it_marc-werks.
        READ TABLE it_t001w WITH KEY   werks = it_marc-werks.
        wa_main-name1 = it_t001w-name1.
        READ TABLE it_makt WITH  KEY matnr = it_mara-matnr.
        wa_main-maktx = it_makt-maktx.
        READ TABLE it_mseg1 INDEX sy-tabix.
          wa_main-mjahr = it_mseg1-mjahr.
          wa_main-menge1 =  it_mseg1-menge.
        READ TABLE it_mseg WITH  KEY matnr = it_mara-matnr.
       READ TABLE it_mseg INDEX sy-tabix.
        wa_main-mblnr = it_mseg-mblnr.
        wa_main-menge = it_mseg-menge.
        READ TABLE it_dept WITH  KEY mblnr = it_mseg-mblnr.
        wa_main-ret_qty = it_dept-menge.
       READ TABLE it_dept1 WITH KEY werks = it_marc-werks.
        READ TABLE it_dept1 INDEX sy-tabix.
        wa_main-ret_*** = it_dept1-menge.
        READ TABLE it_mkpf WITH  KEY mblnr = it_mseg-mblnr.
        wa_main-budat = it_mkpf-budat.
       READ TABLE it_unit1 WITH KEY werks = it_marc-werks.
        READ TABLE it_unit1 INDEX sy-tabix. "BINARY SEARCH.
        wa_main-unit_*** = it_unit1-menge.
        READ TABLE it_unit WITH KEY mblnr = it_mseg-mblnr.
        wa_main-unit_qty = it_unit-menge.
        READ TABLE it_wip WITH  KEY mblnr = it_mseg-mblnr.
        wa_main-wip_qty = it_wip-menge.
       READ TABLE it_wip1 WITH  KEY werks = it_marc-werks.
        READ TABLE it_wip1 INDEX sy-tabix.
        wa_main-wip_qty = it_wip1-menge.
        READ TABLE it_subcon WITH KEY mblnr = it_mseg-mblnr.
        wa_main-sub_qty = it_subcon-menge.
       READ TABLE it_subcon1 WITH KEY werks = it_marc-werks.
        READ TABLE it_subcon1 INDEX sy-tabix.
        wa_main-sub_*** = it_subcon1-menge.
        READ TABLE it_others WITH  KEY mblnr = it_mseg-mblnr.
        wa_main-oth_qty = it_others-menge.
       READ TABLE it_others1 WITH  KEY werks = it_marc-werks.
        READ TABLE it_others1 INDEX sy-tabix.
        wa_main-oth_*** = it_others1-menge.
        APPEND wa_main to it_main.
        CLEAR : wa_main,
                it_mseg1,
                it_main.
        ENDLOOP.
       LOOP at it_mseg1.
         READ TABLE it_mseg INDEX sy-index.
         MOVE-CORRESPONDING it_mseg1 to it_main.
         append LINES OF it_mseg1 TO it_main.
          IF sy-subrc <> 0.
            exit.
            ENDIF.
         ENDLOOP.
    ENDFORM.                    " it_main_data
    FORM display_data .
      SORT it_main by matkl mtart maktx.
      LOOP AT it_main ."WHERE menge eq it_mseg1-menge.
      at NEW matkl.
        FORMAT COLOR 2 INTENSIFIED ON.
        WRITE:/5 it_main-matkl." COLOR 2.
            ENDAT.
          at NEW mtart.
            FORMAT COLOR 3 INTENSIFIED ON.
             WRITE:/15  it_main-mtart." COLOR 3.
             ENDAT.
           at NEW maktx.
             FORMAT COLOR 4 INTENSIFIED OFF.
             WRITE:/ it_main-maktx UNDER 'DESCRIPTION'.
          ENDAT.
          FORMAT COLOR 2 INTENSIFIED ON.
         WRITE:/75 it_main-menge, "it_main-maktx UNDER 'DESCRIPTION',
                95 it_main-menge1,
               125 it_main-ret_qty,
               140 it_main-ret_***,
               160 it_main-unit_qty,
               175 it_main-unit_***,
               195 it_main-wip_qty,
                     210 it_main-wip_***,
                     225 it_main-sub_qty,
                     240 it_main-sub_***,
                     255 it_main-oth_qty,
                     270 it_main-oth_***.
         FORMAT COLOR 2 INTENSIFIED OFF.
         at END OF mtart.
           sum.
           uline.
           WRITE:/30 'MAT. TYPE WISE SUB TOTAL' COLOR COL_GROUP,
                  60 IT_MAIN-MTART COLOR 2,
                  75 '*',it_main-menge,'*' COLOR 4,
                  95 it_main-menge1,
                  125 it_main-ret_qty,
                  140 it_main-ret_***,
                  160 it_main-unit_qty,
                  175 it_main-unit_***,
                  195 it_main-wip_qty,
                     210 it_main-wip_***,
                     225 it_main-sub_qty,
                     240 it_main-sub_***,
                     260 it_main-oth_qty,
                     270 it_main-oth_***.
           uline.
           ENDAT.
           at END OF matkl.
           sum.
           uline.
           WRITE:/30 'GROUPWISE SUB TOTAL ' COLOR 5,
                  60 IT_MAIN-MATKL COLOR 2,
                  75 '*',it_main-menge,'*' COLOR 4,
                  95 it_main-menge1,
                  125 it_main-ret_qty,
                  140 it_main-ret_***,
                  160 it_main-unit_qty,
                  175 it_main-unit_***,
                  195 it_main-wip_qty,
                     210 it_main-wip_***,
                     225 it_main-sub_qty,
                     240 it_main-sub_***,
                     260 it_main-oth_qty,
                     270 it_main-oth_***.
           uline.
           ENDAT.
           at LAST.
             sum.
              uline.
              WRITE:/30 'GROSS TOTAL' COLOR 6,
                     60 IT_MAIN-MATKL COLOR 2,
                     75 '*',it_main-menge,'*' COLOR 4,
                     95 it_main-menge1,
                     125 it_main-ret_qty,
                     140 it_main-ret_***,
                     160 it_main-unit_qty,
                     175 it_main-unit_***,
                     195 it_main-wip_qty,
                     210 it_main-wip_***,
                     225 it_main-sub_qty,
                     240 it_main-sub_***,
                     260 it_main-oth_qty,
                     270 it_main-oth_***.
                uline.
            ENDAT.
             per_qty = it_main-menge.
             ***_qty = it_main-menge1.
             final_total = per_qty + ***_qty.
            at last.
             WRITE:/95 sy-uline(30).
               write:/65 'Final Cumulative Qty >>>>>>>>>',final_total color 6.
               WRITE:/95 sy-uline(30).
             ENDAT.
           FORMAT INTENSIFIED off.
        ENDLOOP.
    ENDFORM.                    " display_data
                        " it_mkpf_data
    FORM it_mseg_data .
      SELECT
        mblnr
        matnr
        ZEILE
        werks
        menge
        bwart
        FROM mseg INTO CORRESPONDING FIELDS OF TABLE it_mseg
        FOR ALL ENTRIES IN it_mara
        WHERE  matnr eq it_mara-matnr AND
               werks eq plant AND
               bwart eq 261." AND bwart eq 262.
    CLEAR it_mseg.
    ENDFORM.                    " it_mseg_data
    FORM it_mkpf_data .
      SELECT
        mblnr
        budat
        FROM mkpf INTO CORRESPONDING FIELDS OF TABLE it_mkpf
        FOR ALL ENTRIES IN it_mseg
        WHERE mblnr eq it_mseg-mblnr."  AND
             budat BETWEEN  Period-low AND period-high.
    ENDFORM.
    FORM it_t001w_data .
        SELECT werks name1 FROM t001w INTO CORRESPONDING FIELDS OF TABLE it_t001w
          FOR ALL ENTRIES IN it_marc
          WHERE werks eq it_marc-werks.
    ENDFORM.                    " it_t001w_data
    FORM it_mseg1_data .
        SELECT
                mblnr
                mjahr
                ZEILE
                matnr
                werks
                menge
                bwart
        FROM mseg INTO CORRESPONDING FIELDS OF TABLE it_mseg1
        FOR ALL ENTRIES IN it_mara
        WHERE  matnr eq it_mara-matnr   AND
               werks eq plant          AND
               mjahr eq Year            AND
              bwart eq 261." AND bwart eq 262.
    CLEAR it_mseg1.
    ENDFORM.                    " it_mseg1_data
    FORM it_dept_data .
      SELECT
                mblnr
                mjahr
                ZEILE
                werks
                menge
                bwart
         FROM mseg INTO CORRESPONDING FIELDS OF TABLE it_dept
         FOR ALL ENTRIES IN it_mseg
         WHERE mblnr eq it_mseg-mblnr AND
               werks eq it_mseg-WERKS AND
               bwart ge 291 AND bwart le 292.
    ENDFORM.
                        " it_dept_data
    FORM it_dept1_data .
         SELECT
                mblnr
                mjahr
                ZEILE
                werks
                menge
                bwart
         FROM mseg INTO CORRESPONDING FIELDS OF TABLE it_dept1
         FOR ALL ENTRIES IN it_mara
         WHERE matnr eq it_mara-matnr AND
               werks eq plant         AND
               mjahr eq YEAR          AND
               bwart ge 291 and bwart le 292.
        ENDFORM.                    " it_dept1_data
    FORM it_unit_data .
      SELECT
                mblnr
                mjahr
                ZEILE
                werks
                menge
                bwart
         FROM mseg INTO CORRESPONDING FIELDS OF TABLE it_unit
         FOR ALL ENTRIES IN it_mseg
         WHERE mblnr eq it_mseg-mblnr AND
               werks eq it_mseg-WERKS AND
               bwart ge 301 AND bwart le 302.
    ENDFORM.                    " it_unit_data
    FORM it_unit_data1 .
        SELECT
                mblnr
                mjahr
                ZEILE
                werks
                menge
                bwart
         FROM mseg INTO CORRESPONDING FIELDS OF TABLE it_unit1
         FOR ALL ENTRIES IN it_mara
         WHERE matnr eq it_mara-matnr AND
               werks eq plant         AND
               mjahr eq YEAR          AND
               bwart ge 301 AND bwart le 302.
        ENDFORM.                    " it_unit_data1
    FORM it_wip_data .
      SELECT
                mblnr
                mjahr
                ZEILE
                werks
                menge
                bwart
         FROM mseg INTO CORRESPONDING FIELDS OF TABLE it_wip
         FOR ALL ENTRIES IN it_mseg
         WHERE mblnr eq it_mseg-mblnr AND
               werks eq it_mseg-WERKS AND
               bwart ge 301 AND bwart le 302.
    ENDFORM.                    " it_wip_data
    FORM it_wip_data1 .
         SELECT
                mblnr
                mjahr
                ZEILE
                werks
                menge
                bwart
         FROM mseg INTO CORRESPONDING FIELDS OF TABLE it_wip1
         FOR ALL ENTRIES IN it_mara
         WHERE matnr eq it_mara-matnr AND
               werks eq plant         AND
               mjahr eq YEAR          AND
               bwart ge 301 AND bwart le 302.
    ENDFORM.                    " it_wip_data1
    FORM it_sub_contract .
        SELECT
                mblnr
                mjahr
                ZEILE
                werks
                menge
                bwart
         FROM mseg INTO CORRESPONDING FIELDS OF TABLE it_subcon
         FOR ALL ENTRIES IN it_mseg
         WHERE mblnr eq it_mseg-mblnr AND
               werks eq it_mseg-WERKS AND
               bwart eq 541." AND bwart eq 542.
    ENDFORM.                    " it_sub_contract
    FORM it_sub_contract1 .
          SELECT
                mblnr
                mjahr
                ZEILE
                werks
                menge
                bwart
         FROM mseg INTO CORRESPONDING FIELDS OF TABLE it_subcon1
         FOR ALL ENTRIES IN it_mara
         WHERE matnr eq it_mara-matnr AND
               werks eq plant         AND
               mjahr eq YEAR          AND
               bwart eq 541." AND bwart eq 542.
    ENDFORM.                    " it_sub_contract1

    Hi,
    When ever you are using a read statement check sy-subrc is initial or not then only you move the data
    and clear the work area after use.
    The mistake you have done is not clearing the work areas after use and sy-subrc check after read.
    If you fail to do so the data will be clubbed and wrong data will be shown.
    Regards,
    Siva
    Pls reward points if usefull .

Maybe you are looking for

  • Resetting a password is there a way?

    A friend of mine lost all his original disks for his Macbook. My question is: Is there a way to rest his login password in single user mode without causing more harm or anyway other way of reseting the password without the disks. He is not worried ab

  • Purchase History Report a Problem feature

    I was looking at my purchases and clicked the Report a Problem button, but the only thing that happened was that the button disappeared.  Odd.  Were they just joking? . . . "Ha-ha-ha, did you believe that? Just messin' with you. Bye-bye little button

  • Rebate screen Shots

    Hi SAP Gurus, Plz has anybody for me rebate screen shots also? my mail iD : [email protected]

  • Problems connecting from Forms 6i to Personal Oracle

    I have loaded Oracle 8i Personal Edition in the following directory c:\Oracle\Oar81 and Forms 6i in c:\Orawin95 on my local PC. I'm running windows 98 OS. I have been able to use SQL*Plus to query the customer and sales_order demo databases sucessful

  • Smart Script Player Applet (Player Only) Problem ...

    Hi all! We are trying to make our SmartScript opens automatically when a user navigates to a particular view. We followed the following steps: * Using Siebel tools: 1) Create a new view. 2) Add "Smart Script Player Applet (Player Only)" to it. 3) Add