*
* Compare Production Confirmation against Planned by Work Centre
*
REPORT ZASSEMBLY_EFFICIENCY LINE-SIZE 255 NO STANDARD PAGE HEADING
LINE-COUNT 065(001).
TABLES: AFKO, "Order header data PP orders
AFPO, "Order item
AFRU, "Order completion confirmations
AUFM, "Goods movements for order
AFVV, "DB structure of the quantities/dates/values in the oper
MARA. "General Material Data
DATA: BEGIN OF INT_EFF OCCURS 100,
MATNR TYPE AFKO-STLBEZ,
MTART TYPE MARA-MTART,
AUFNR TYPE AFKO-AUFNR,
GSTRI TYPE AFKO-GSTRI,
GLTRI TYPE AFKO-GLTRI,
GAMNG(9) TYPE C,
MENGE(9) TYPE C,
PLN01(9) TYPE C,
ISM01(7) TYPE P DECIMALS 2,
DAUAT TYPE AFPO-DAUAT,
END OF INT_EFF.
DATA: FDATE LIKE SY-DATUM,
LDATE LIKE SY-DATUM.
DATA: YGAMNG(7) TYPE P DECIMALS 2,
YMENGE(7) TYPE P DECIMALS 2,
YPLN01(7) TYPE P DECIMALS 2,
XMENGE(7) TYPE P DECIMALS 0,
XSTDRATE(7) TYPE P DECIMALS 2,
XACTRATE(7) TYPE P DECIMALS 2,
XLINEEFF(7) TYPE P DECIMALS 2,
XUTILISA(7) TYPE P DECIMALS 2.
SELECT-OPTIONS XWERKS FOR AFRU-WERKS DEFAULT 'SAP'.
SELECT-OPTIONS XBUDAT FOR AFRU-BUDAT.
SELECT-OPTIONS XAUFNR FOR AFRU-AUFNR.
START-OF-SELECTION.
SELECT * FROM AFRU WHERE BUDAT IN XBUDAT
AND WERKS IN XWERKS
AND AUFNR IN XAUFNR.
CLEAR AFPO.
SELECT SINGLE * FROM AFPO WHERE AUFNR = AFRU-AUFNR.
CLEAR AFKO.
SELECT SINGLE * FROM AFKO WHERE AUFNR = AFRU-AUFNR.
CLEAR MARA.
SELECT SINGLE * FROM MARA WHERE LVORM = ''
AND MATNR = AFKO-STLBEZ.
CLEAR AFVV.
SELECT SINGLE * FROM AFVV WHERE AUFPL = AFRU-AUFPL
AND APLZL = AFRU-APLZL.
IF AFVV-VGE01 = 'MIN'.
AFVV-VGW01 = AFVV-VGW01 / 60.
ENDIF.
PERFORM GET_DATA_AUFM.
PERFORM GET_DATA.
ENDSELECT.
PERFORM LOOP_INT_EFF.
END-OF-SELECTION.
FORM GET_DATA.
* Reverse Confirmation
IF AFRU-STOKZ = 'X'.
MULTIPLY AFRU-LMNGA BY -1.
MULTIPLY AFRU-ISM01 BY -1.
MULTIPLY AFRU-ISM02 BY -1.
MULTIPLY AFRU-ISM03 BY -1.
MULTIPLY AFRU-ISM04 BY -1.
MULTIPLY AFKO-GAMNG BY -1.
MULTIPLY AFVV-BMSCH BY -1.
MULTIPLY AFVV-VGW01 BY -1.
MULTIPLY AFVV-VGW02 BY -1.
MULTIPLY AFVV-VGW03 BY -1.
ENDIF.
* Plan Activities
IF AFVV-BMSCH <> 0.
INT_EFF-PLN01 = ( AFKO-GAMNG / AFVV-BMSCH ) * AFVV-VGW01 * 60.
ENDIF.
* Actual Activities
INT_EFF-ISM01 = AFRU-ISM01.
* Material No.
IF AFKO-PLNBEZ = SPACE.
INT_EFF-MATNR = AFKO-STLBEZ.
ELSE.
INT_EFF-MATNR = AFKO-PLNBEZ.
ENDIF.
INT_EFF-MTART = MARA-MTART.
INT_EFF-AUFNR = AFKO-AUFNR.
INT_EFF-GSTRI = AFKO-GSTRI.
INT_EFF-GLTRI = AFKO-GLTRI.
INT_EFF-GAMNG = AFKO-GAMNG.
INT_EFF-MENGE = XMENGE.
INT_EFF-DAUAT = AFPO-DAUAT.
COLLECT INT_EFF.
CLEAR INT_EFF.
ENDFORM.
FORM GET_DATA_AUFM.
CLEAR XMENGE.
SELECT * FROM AUFM WHERE AUFNR = AFKO-AUFNR
AND BWART IN ('101', '102').
IF AUFM-SHKZG = 'H'.
MULTIPLY AUFM-MENGE BY -1.
ENDIF.
ADD AUFM-MENGE TO XMENGE.
ENDSELECT.
ENDFORM.
FORM LOOP_INT_EFF.
LOOP AT INT_EFF.
CLEAR: XSTDRATE, XACTRATE, XLINEEFF, XUTILISA.
IF INT_EFF-PLN01 <> 0.
XSTDRATE = INT_EFF-MENGE / INT_EFF-PLN01.
ENDIF.
IF INT_EFF-ISM01 <> 0.
XACTRATE = INT_EFF-MENGE / INT_EFF-ISM01.
XUTILISA = INT_EFF-PLN01 - INT_EFF-ISM01.
ENDIF.
IF XSTDRATE <> 0.
XLINEEFF = XACTRATE / XSTDRATE.
ENDIF.
YGAMNG = INT_EFF-GAMNG.
YMENGE = INT_EFF-MENGE.
YPLN01 = INT_EFF-PLN01.
WRITE:/ INT_EFF-MATNR UNDER ' Material',
INT_EFF-MTART UNDER ' Matl',
INT_EFF-AUFNR UNDER 'Production',
INT_EFF-GSTRI UNDER 'Start',
INT_EFF-GLTRI UNDER ' Finish',
YGAMNG UNDER 'Production Ord',
YMENGE UNDER ' Receipt Qty',
YPLN01 UNDER ' Plan Hr',
INT_EFF-ISM01 UNDER ' Actual Hr',
XSTDRATE UNDER ' Std Rate',
XACTRATE UNDER ' Actual Rate',
XLINEEFF UNDER 'Efficiency (%)',
XUTILISA UNDER 'Utilisation Typ',
INT_EFF-DAUAT UNDER 'PP Type'.
ENDLOOP.
ENDFORM.
TOP-OF-PAGE.
FORMAT COLOR COL_TOTAL.
WRITE: / SY-DATUM, SY-UZEIT, SY-REPID,
110 'Assembly Line Efficiency Report - Closed (Period)',
200 SY-UNAME, SY-PAGNO.
SKIP.
WRITE: /1 ' Material',
20 ' Matl',
25 'Production',
36 'Start',
47 ' Finish',
58 'Production Ord',
73 ' Receipt Qty',
88 ' Plan Hr',
103 ' Actual Hr',
118 ' Std Rate',
133 ' Actual Rate',
148 'Efficiency (%)',
163 'Utilisation Typ',
179 'PP Type'.
INITIALIZATION.
LDATE = SY-DATUM.
LDATE+6(2) = '01'.
LDATE = LDATE - 1.
FDATE = LDATE.
FDATE+6(2) = '01'.
MOVE: FDATE TO XBUDAT-LOW,
LDATE TO XBUDAT-HIGH.
APPEND XBUDAT.
*---End of Program
Thursday, July 23, 2009
Subscribe to:
Post Comments (Atom)
Archives
-
▼
2009
(413)
-
▼
July
(138)
- SAP PP - Define the default components reservation...
- PP Goods Receipt (101) for Process Order
- SAP PP Goods receipt and goods issue through a PI ...
- SAP PP Goods Movement Steps for Subcontracting
- SAP PP Goods Movement Stock in Transit - liquidati...
- Restricting Good Receipt Unless Production Order C...
- SAP BOM How to link BOM component to storage locat...
- When is a Material BOM Not Exploded?
- Simple BOM & Group BOM
- Explode SAP PP BOM
- Where used list for SAP PP BOM
- SAP PP - Controlling data for your Bill of Materials
- Allocating PP BOM to Other Plant
- SAP PP BOM Mass Change Bill of Materials
- Multi-level configuration with variants PP BOM
- SAP PP BOM What exactly is a Phantom item or Assem...
- Attachment Of Drawings in PP BOMs
- Variant Configuration for an Order
- SAP BOM components never explode
- Checking Costs and Revenues from the Sales Order
- Production Planning - Extract data from MRP Table
- ABAP Reports Production Order Quantity Change Dail...
- SAP PP ABAP Reports Compare Production Confirmatio...
- ABAP Reports Customized Work Center List PP
- Tcodes used for SAP Plant Maintenance
- SAP TCode for SAP ArchiveLink: Link check
- Transparent Table Relate With PM Module
- Effective SAP PM Implementation SAP
- Deadline Monitoring for Maintenance Plans
- Scheduling function in SAP
- Definition and Formula for PM terms SAP
- SAP Plant Maintenance Assembly
- SAP Track New Plant Machine Installed at Customer ...
- Questions Answers on Functional Locations SAP PM
- SAP Questions Answers on PM Equipment
- SAP PM Measuring Points Questions
- Plant Maintenance Q & A - Rept & Analyses - Mgt of...
- SAP PM Maintenance Planning Questions and Answers
- SAP PM Support Problem Solution
- Maintenance of FT Data in Purchasing Documents
- Control the SAP PM Order Type
- Maintenance Notifications Order Link
- Work Order Cost Control SAP
- Impact on Business if PM Order Not Settled
- SAP In PM how to Return Material Backflushed
- Change Maintenance Strategy in General Task List
- User Status Set Date in Maintenance order
- SAP to best handle Repeat Maintenance Jobs
- Recording Measuring Docs. Against Work Orders
- Stop Complete Confirmation (IW41) before (IW32)
- Difference Between TECO & Business Completion
- SAP Settlement Rule In Maintenance Order
- Integration Between PM, QM and PP
- PM Integration With Other Modules
- Control Maintenance Budget in SAP PM
- Before customizing the Master Data in SAP Plant Ma...
- SAP PM - Material Master Vs. Equipment Master
- SAP PM Equipment FAQ
- Show Equipments Characteristics in a List
- Component Allocation in Task List
- Scenario of Rotating Equipment
- Attach a Drawing To Equipment Master Data
- Plant Maintenance Reservations
- SAP Deletion and control of materials Reservations...
- SAP PM - SM notifications
- PM (Service Management) Geographical Work Centres
- SM Revenue and Non Revenue Combination Orders
- Open and Close Posting FICO Periods
- SAP SD Output/Email Sending a billing document by ...
- SAP Output/Email SAP SD Customizing Picking Output
- SAP SD Output/Email Program for Sales Order by Cus...
- Purchase Order and Sales Order Workflow
- Workflow of Purchase Requisition Release Strategy
- Changing Vendor on Purchase Order
- One Time Vendors SAP MM
- Vendor Evaluation for Purchasing
- Process of Subcontract in SAP MM
- Subcontracting - Key Points
- Procedure for Setting Partner Functions
- What Is Outline and Scheduling Agreement
- What is Vendor Consignment?
- Multiple Currency Quotation or Invoice From Vendor
- User Exits In MM Area
- IMG MM Transaction Codes Organizational Structures
- SAP MM Transaction codes
- SAP TCode for Personal Menu Volker Hofmann
- SAP Transaction Code for: Waive Acceptance Order T...
- SAP Transaction Code for: New Monthly Returns Repo...
- SAP MM Important Tcodes 2
- IMG Change Logs and can ACCT Tables be Deleted
- Common Tables used by SAP MM
- SAP MM All The Tables In SAP MM Purchasing
- SAP MM Tables - click to enlarge
- Interview Questions on SAP MM
- SAP Material Management Interview Questions
- SAP MM Support Problem Solution
- Common SAP MM Questions I
- SAP MM Material Management Frequently Asked Question
- What Is The DataFlow Of MM?
- SAP MM User Exit That Is Applied In MM Area
-
▼
July
(138)
No comments:
Post a Comment