Operation wise fuel consumption details.

Dears,
How can we get the operation wise raw material consumption details. For example in an order I am having 5 operations. Each operation requires some fuel consumption. Fuel is my BOM component. I need to issue the quantity of fuel for each operation. Again in the report also... I need the details of fuel consumption operation wise. How can we divide the total quantity of fuel to different routing operations. one way is I can maintain different line items in BOM. Is there any other way of doing it? How can get it in report?
Regards,
Surya.

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.

Similar Messages

  • How to confirm operation wise confirmation.

    Hi,
       please tell me how to confirm operation wise confirmation in details.
           Thanks
            parag

    Hi Parag,
    Confirmation against a production order can be done in 2 ways :
    1. Confirmation against each operation of an Order can be done  in Tcode : CO11 /CO11N
    2. Order Confirmation can be done in Tcode : CO15.
    My understanding about your problem is you want to confirm operation wise and the procedure for the same is goto Tcode : CO11N and enter the production order number and Operation number say 0010 and enter the Yield/ Scrap qty and save it. If there are any components assigned to operation 0010 as back flush in routing / order, then system will consume those bom items with movement type 261. You can check the components which are assigned to this operation with backflush in teh goods movement Tab screen in Tcode : CO11N itself.
    Next Enter the Prod order number and the next operation number say 0020 and enter the same yield qty as operation 0010  or different qty and save it. If any back flush items are assigned to this operation then on saving system does goods issue (with movt type 261) for those items.
    After saving you can check the goods movement in the prodution order Tcode : CO03. Goto document goods movement s and chk the same. For showing this the order type dependent parameters should be configured for the same.

  • Resource consumption details not shown for each row source operation

    Hi Friends,
    I have generated a tracefile for a query as shown below.
    set autotrace traceonly arraysize 100
    ALTER SESSION SET optimizer_mode = ALL_ROWS ;
    alter session set tracefile_identifier = 'trcwithtime_221010_03';
    alter session set events '10046 trace name context forever, level 12';
    spool on
    spool C:\Sree\trcwtime.log
    -- put your statement here
    SELECT e.*,d.dname
    FROM scott.emp e
        ,scott.dept d
    WHERE e.deptno = d.deptno;
    spool off;
    exitBelow is the trace file
    SELECT e.*,d.dname
    FROM scott.emp e
        ,scott.dept d
    WHERE e.deptno = d.deptno
    call     count       cpu    elapsed       disk      query    current        rows
    Parse        1      0.00       0.00          0          0          0           0
    Execute      1      0.00       0.00          0          0          0           0
    Fetch        2      0.00       0.00          4          7          0          14
    total        4      0.00       0.00          4          7          0          14
    Misses in library cache during parse: 0
    Optimizer goal: ALL_ROWS
    Parsing user id: 173 
    Rows     Row Source Operation
         14  HASH JOIN 
          4   TABLE ACCESS FULL DEPT
         14   TABLE ACCESS FULL EMP
    Elapsed times include waiting on following events:
      Event waited on                             Times   Max. Wait  Total Waited
      ----------------------------------------   Waited  ----------  ------------
      SQL*Net message to client                       2        0.00          0.00
      db file sequential read                         4        0.00          0.00
      SQL*Net message from client                     2        0.41          0.77
    ********************************************************************************For each rowsource operation, resource consumption details (cr,pr,pw,time) are not shown in the TKPROF output.
    How can i get these details as well?
    DBVersion: 9.2.0.8
    Regards,
    Sreekanth Munagala

    Sreekanth Munagala wrote:
    For each rowsource operation, resource consumption details (cr,pr,pw,time) are not shown in the TKPROF output.
    How can i get these details as well?
    DBVersion: 9.2.0.8You can get those details by setting values for following parameters (at session level, preferably) before generating the 10046 trace.
    ALTER SESSION SET statistics_level = ALL ;
    ALTER SESSION SET timed_statistics = TRUE ;

  • 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.

  • How to get Operation wise Time for a list of Production Orders

    Dear Sir,
    We have a list of Production Orders numbers and need to know the operation wise time duration for these production orers (off course the desired time is same as mentioned in the routing for the relevant component)
    Kindly guide us as how can we get these timing details .
    Rgds
    Sonia agarwal

    Sonia,
    I hope your are refering to setup time, process time, teardown time in the production order.
    use report COOIS for it.
    In the 'List choose operation.
    Give input for the production orders in the slection scren. Execute.
    In the report select the columns as per your requirement.
    Hope this helps you.
    SmanS

  • Is there any report to see the consumption details?

    Hi,
    Is there any report to see the consumption details? with material number or without material number?
    Regards,
    Sattuj

    There are a no of ways from where you can get your desrired data....
    Table mver---used for material consumption.
    T code mcre---again used in consumption reports,
    Table MVER gives you detail of Material Consumption
    Also, MSEG (MENGE) and S026 (ENMNG) ... Pls restrict the selection condition for material with movement type 261 in table MSEG
    Tables
    DBERCHV Consumption History
    DVER Material Consumption for MRP Area
    You can get all the consumption details in MB51 report by selecting relevnt movement types. And MB5S also.
    For Repetetive :-
    Check this T Code MCRP,which gives you the exact material consumption datewise or order wise.
    *Report MCRE is widely used for the material cosnumption than checking in COOIS.*
    Also these reports can help you.
    MCPF Material analysis: Dates
    MCPO Material analysis: Quantities
    MCPW Material analysis: Lead time

  • Operation wise costing report.

    HI friend,
    i want to know if we want a report which requires operation wise cost analysis over a period of time for production orders.
    let me know the tables which will be useful for this requirement.
    Daniel.

    HI,
    you can get all confirmation related details from table AFRU. Operation details -AFVC.
    Regards,
    Krishna Mohan

  • Orderwise, operation wise service entry sheet(Including services ) report

    Dear Expert,
    Can we get Orderwise, operation wise service entry sheet(Including services ) report. with details like order type,service product, address, customer number(if any) etc.
    Regards,
    Vishal Thacker

    i dont think any std report is available with all these data. you may have to configure yourself
    you can consider the following tables  ESLL ESSR ( for S E )
    AUFK, AUFM for order , VIQMEL for notification
    MESG, MKPF for goods movement

  • Operation wise Report of production order

    Dear Experts,
    I am having total 4 operations in production order .I want operation wise report ( For example ,I am having production order of 10 quantity , I want a report through which I can check how much quantity is lying in operation 10 ,20 30 & 40 )
    waiting for inputs.
    Warm Regards,
    Satya

    hi,
    Work Center
    CRHD Workcenter Header Data
    CRCA Workcenter Capacity Allocation
    CRCO Workcenter Cost Center Assignment
    CRHH Hierarchy Header
    CRHS Hierarchy Structure
    CRTX Workcenter Text
    KAKO Capacity Header
    KAZY Intervals of Capacity
    Routing
    PLPO Routing Operation Details
    PLKO Routing Header Details
    MAPL Routing Link to Material
    PLAB Relationships - Standard Network
    PLAS Task List - Selection of Operations
    PLMZ Component Allocation
    PLPH CAPP Sub-operations
    PLFH PRT Allocation
    PLWP Maintenance Package Allocation
    PLMK Inspection Characteristics
    Bill of Material
    STPO BOM Item Details
    STPU BOM Sub Items (designators)
    STKO BOM Header Details
    MAST BOM Group to Material
    STZU BOM History Records
    STAS BOM Item Selection
    STPF BOM Explosion Structure
    Thanking you

  • Operation wise cost through production order

    Hi Experts,
    Is There any standard report to get Operation wise cost through production order.if it is there please provide the details.
    Thanks & Regards,
    Prabhakar

    HI,
    I don't know a standard report but table CKIS contains the costing details line item wise with the corresponding operation number (CKIS-VORNR).
    So a query/quick view using KEKO + CKIS should be sufficient.
    Best regards, Christian

  • Which table can give Operation wise Machine/Labour Std Value Time

    Dear Sir,
    We need to know the Table name which can be used to get  Operation wise Machine/Labour Std Value Time for a given Production Order .
    Using CO03 . we can get Std Values displayed for the Machine/Labour Time by double click on the operation .  Using Help , it shows that displayed is based upon the structure AFVGD .
    Kindly help us to know that using which table , structure AFVGD is fetching this required data filed value .
    Rgds
    Sonia Agarwal

    Dear Soni,
    Plz refer my reply from this thread
    [table that contains planned labour hours of operation;
    Regards
    Madhu

  • Segregate the scrap as an operation wise during operation confirmation

    Hello PP Gurus,
               One  FERT item's BOM contains 4 HALB items in which 3 are mentioned as an negative qty, ( it may be reusable scrap using in production again), and having 5 operation sequence. The problem is while confirming first operation itself the whole scarp value is generated for those 3 HALB items which are mentioned as an negative value. I want to segregate the scarp value for each and every operation or at least any of operation by qty wise or percentage wise. Is it possible to maintain it in system? and also is it possible to control by order type wise?
    Is there any setting to do meet this requirement?
    No manual material issue , during confirmation material are issued/generated by using back flush.
    Thanks

    Hello Mr.Devendra,
                Thanks for your reply. I want to do an settings for component allocation by operation wise while during the production operation confirmation. Is there any option or SAP User exit and enhancements?
    For example, a FERT 'A' having as an sub assembly 'B','C','D' and having 5 operations(10,20,30,40,50)in Routing. In these 'B' mentioned as an positive qty and the remaining 'C','D' are mentioned as an negative qty. while doing confirmation components are allocated for first operation(10) itself. i want to allocate the component for operation wise. In my case, while confirming operation 20 only part of 'B','C','D' will be allocated and the same for segregate to operation 30,40. How can we handle this situation is there any option?
    Thanks

  • Fuel Consumption Report Modification - 2

    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_FUEL2 LINE-SIZE  232 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_date        type imrg-idate,       "  Max Date
           max_km          type imrg-recdv,       "  Min km
           t_max_min_km    type i,                "  Total min_km-max_km
           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
           T_fuel_con        type p decimals 2,     "  Total_hrs / t_max_min_hr
           T_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 KM',              126 sy-vline COLOR 2,
        127 'MIN HR',                139 sy-vline,
        140 'MAX HR',                152 sy-vline,
        153 'TOTAL HR' ,             167 sy-vline COLOR 2,
        168 'MIN LIT',               180 sy-vline,
        181 'MAX LIT',               193 sy-vline,
        194 'FUEL CON',              206 sy-vline  COLOR 2,
        207 'KM L',                  219 sy-vline,
        220 'LIT PER HR',            232 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 color 3 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,
    153 wa_final-t_max_min_hr EXPONENT 0 DECIMALS 2 color 3 LEFT-JUSTIFIED   , 167 sy-vline COLOR 2,
    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 color 3 LEFT-JUSTIFIED   , 206 sy-vline COLOR 2,
    194 wa_final-T_fuel_con EXPONENT 0 DECIMALS 2 LEFT-JUSTIFIED        , 206 sy-vline,
    207 wa_final-t_km_l EXPONENT 0 DECIMALS 2 LEFT-JUSTIFIED            , 219 sy-vline,
    220 wa_final-lit_per_hr EXPONENT 0 DECIMALS 2 LEFT-JUSTIFIED      , 232 sy-vline.
    *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.
    *207 wa_final-T_fuel_con EXPONENT 0 DECIMALS 2 LEFT-JUSTIFIED        , 219 sy-vline,
    *220 wa_final-t_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.
        "endat.
    *at end of 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,
    *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,
    *140 wa_final-max_hr EXPONENT 0 DECIMALS 2 LEFT-JUSTIFIED          , 152 sy-vline.
    **181 wa_final-max_lit EXPONENT 0 DECIMALS 2 LEFT-JUSTIFIED         , 193 sy-vline.
    *114 wa_final-t_max_min_km EXPONENT 0 DECIMALS 2   LEFT-JUSTIFIED    , 126 sy-vline COLOR 2,
    *140 wa_final-max_hr EXPONENT 0 DECIMALS 2 LEFT-JUSTIFIED          , 152 sy-vline.
    *153 wa_final-t_max_min_hr EXPONENT 0 DECIMALS 2  LEFT-JUSTIFIED   , 167 sy-vline COLOR 2,
    *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,
    *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 .
       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,
    *153 wa_final-t_max_min_hr EXPONENT 0 DECIMALS 2  LEFT-JUSTIFIED   , 167 sy-vline COLOR 2,
    *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,
    *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.
    endloop.
    FORM prepare_final_rec  USING    p_mode TYPE char1.
    KM
    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.
    HOUR
    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.
    LIT
    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-max_date = wa_final-max_date + wa_data-idate .
            wa_final-min_date  = wa_final-min_date + wa_data-idate .
            wa_final-max_km  = wa_final-max_km + wa_data-recdv.
            wa_final-min_km  = wa_final-min_km + wa_data-recdv.
            wa_final-max_hR  = wa_final-max_hr + wa_data-recdv.
            wa_final-min_hR  = wa_final-min_hr + wa_data-recdv.
            wa_final-max_lit = wa_final-max_lit + wa_data-recdv.
             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-t_fuel_con = wa_final-t_max_min_lit.
              wa_final-t_km_l = wa_final-t_max_min_km / wa_final-t_max_min_lit.
              wa_final-lit_per_hr  = wa_final-t_max_min_lit / wa_final-t_max_min_hr .    "  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 Ankit,
    If your quantity depends on your material movement type, then you can create a condition in Calculated Keyfig / Formula.
    That means as per your situation if the material movement type is 101 then quantity is incoming(+) and if the material movement type is 120 then outgoing(-).This can be done if the material movement type is fixed.
    Correct the logic if it is not right.
    Rgs,
    I.R.K

  • Operation wise confirmation in Production order

    Hello,
    I want to make a new order type where operation wise confirmation is possible in Production order scenario Presently the std order type PP01 is used , where the user is doing the confirmation at order header level but now user want to go for operation wise confirmation by using CO11.
    I know we can put the confirmation parameters in OPK4 , but not aware exactly where we need to define about the operation wise confirmation.
    Waiting for the reply
    Regards,
    Ravindra

    Dear Ravindra,
    The general control key settings are
    PP01 - Inhouse manufactured or for the operations which are processed internally
    within the shop floor or company.
    PP02 - Externally processed operations.
    PP03 - Auto - GR,where in no need to carry out MB31.
    For each control key,you can also set whether confirmation is a mandatory or
    confirmation is possibel but not required.Check in OPJ8.You can get a better
    understanding.
    Regards
    Mangal

  • Rejection qty stock at operation wise

    Dear All
    I have a problem for getting the Rejected quantity stock at each operation wise.
    Material 'A' has 10 operations in the routing.
    At each operation some qty may get rejected.
    How to account the stock of rejected quantity at each operation level?
    If i enter in the Rework / Scrap field in the confirmation screen, i can't getting the stock anywhere because there is no seperate material code for that operation.
    I tried by creating a Seperate material code for the Rejection qty and assign it to the BOM. But it is not viable that creating seperate material code at each operation level.
    Please explain me what is the standard procedure to follow.
    Thanks & Regards
    Bala

    yes
    stock will not be upadate unless until u maintain the material as negative qty in the bom if u know rejection qty is knwon before planed order creation.
    i think in your case  rejection qty is known at the time of confirmation, for this u declare rejection qty as scrap in scrap filed at the time of each operation,after that clcik on goods movemnt button,there u can add manually material  name and storage location and movement type is 531 ,on which material u want to post the stock.
    Edited by: sukendar neelam on Jan 22, 2009 8:22 AM

Maybe you are looking for

  • Java WebDynpro - Sneak Preview

    Guyz, I installed java stack (sneak preview) couple of months back and when now i'm switching it on, my J2EE Server is automatically switching off after certain time..... upon checking logs in 'Developer Trace', it says its shutting down while licens

  • External Keynote display too dark

    Hello I have several presentations made with Keynote on my main computer, an iMac 19". Once converted to movies I was able to use them successfully on a Toshiba portable and on an MSI Wind. Last week I purchased a white Macbook with a 2.13 Core Duo p

  • How to Import photos / videos from. IPhone

    How to import photos and video from iPhone ?

  • How to uninstall drivers Mavericks

    Okay so, I bought a Huion H610 Pro graphics tablet. I followed the instructions of installing drivers first, THEN plugging it in, but the pressure sensitivity does not work in any graphics program (Adobe CC, Manga, Sketch Express, etc). I would go to

  • Zen Touch Questi

    I just bought the Zen Touch, I love it. I cant figure out thow to use the software it came with called Creative Media Source so I can been using Windows Medis Player 0 instead. How do I name files? How do I transfer songs from the Creative Media Sour