Planning Performance issue
Hi,
We are using 11.1.1.3 on single server environment. We have 16 GB Ram and not more than 3-4 concurrent users.
Our system is working very slow when we save data. There are some heavy rules attached to the forms which take ages to execute.
What i noticed is that after some time the cache in the essbase has reached to the maximum so i restart the essbase service and clear the cache.
Once i clear the cache the system performance is better but only till the time the maximum cache limit is reached.
We cannot use the practise of starting and stopping the services every now and then.
Is there any best practices defined for optimizing the system performance and cache setting. I am not also sure about if any changes required to be made into .cfg also. also any documentation for the same would be helpful.
Please help as this is urgent.
Essbase Tuning Guide For Planning Applications [ID 797362.1]
Modified 05-OCT-2010 Type HOWTO Status PUBLISHED
In this Document
Goal
Solution
1. Block size:
2. Virtual memory:
3. Caches:
4. Disk space:
Applies to:
Hyperion Planning - Version: 4.1.0.0.00 to 11.1.2.0.00 - Release: 4.1 to 11.1
Information in this document applies to any platform.
Goal
Tuning Essbase for use with Planning in order to improve performance and avoid errors arising from a lack of resources when running Business Rules and Calculation Scripts.
Solution
The following are basic guidelines for Essbase tuning that are intended to cover the use of Essbase with Planning applications. There is a great deal more that can be customized and tuned in Essbase that is not covered here. See the official Essbase documentation for more details.
To improve performance go through each of the suggested optimizations below and then test to see where the most progress is made. Always remember to back up your Essbase data before making any changes.
1. Block size:
The recommended block size is between 8Kb and 100Kb. The only way to alter block size is to change sparse dimensions to dense or vice versa. Changing a dense dimension to sparse will reduce block size and increase the overall number of blocks. See the Planning documentation for more information on setting dimensions to be dense or sparse.
2. Virtual memory:
Recommended virtual memory setting (for Windows systems): 2 to 3 times the RAM available. 1.5 times the RAM on older systems.
3. Caches:
Index Cache:
Minimum: 1 Mb
Default: 10 Mb
Recommended: combined size of all ESS*.IND files if possible; otherwise as large as possible given the available RAM.
The .IND files are found on the Essbase server under \app\<appname>\<dbname>. The size of the .IND files are also visible from the "Storage" tab of the database properties in the EAS console.
Data File Cache:
Minimum: 8 Mb
Default: 32 Mb
Recommended: combined size of all ESS*.PAG files if possible; otherwise as large as possible given the available RAM, up to a maximum of 2Gb.
The .PAG files are found on the Essbase server under \app\<appname>\<dbname>. The size of the .PAG files are also visible from the "Storage" tab of the database properties in the EAS console.
Important!
The Data File Cache is not used if the database is buffered rather than direct I/O (Check the “Storage” tab). Since all Planning databases are buffered, and most customers use buffered for native Essbase applications too, this cache setting is usually not relevant. The Data Cache is the setting that matters in most cases (see below).
Data Cache:
Minimum: 3 Mb
Default: 3 Mb
Recommended: 0.125 x combined size of all ESS*.PAG files, if possible, otherwise as large as possible given the available RAM.
Note: a useful indication of the health of the caches can be gained by looking at the “Hit ratio” for the cache on the Statistics tab in EAS. 1.0 is the best possible ratio, lower means lower performance.
4. Disk space:
The recommended disk space is a minimum of double the combined total of all .IND and .PAG files. You need double the space because you have to have room for a restructure, which will require twice the usual storage space whilst it is ongoing.
Similar Messages
-
Performance issues with Planning data load & Agg in 11.1.2.3.500
We recently upgraded from 11.1.1.3 to 11.1.2.3. Post upgrade we face performance issues with one of our Planning job (eg: Job E). It takes 3x the time to complete in our new environment (11.1.2.3) when compared to the old one (11.1.1.3). This job loads then actual data and does the aggregation. The pattern which we noticed is , if we run a restructure on the application and execute this job immediately it gets completed as the same time as 11.1.1.3. However, in current production (11.1.1.3) the job runs in the following sequence Job A->Job B-> Job C->Job D->Job E and it completes on time, but if we do the same test in 11.1.2.3 in the above sequence it take 3x the time . We dont have a window to restructure the application to before running Job E every time in Prod. Specs of the new Env is much higher than the old one.
We have Essbase clustering (MS active/passive) in the new environment and the files are stored in the SAN drive. Could this be because of this? has any one faced performance issues in the clustered environment?Do you have exactly same Essbase config settings and calculations performing AGG ? . Remember something very small like UPDATECALC ON/OFF can make a BIG difference in timing..
-
Performance Issue on "Planning Manager" program
Hi,
In order management --- the "Planning Manager" request is taking lot of time to run when we create 100,000 lines of sales orders at a time( I mean,this causes the planning manager to run slower). Can you please help me out how can i increase the planning manager request to run fast(performance)?.
Thanks In Advance,
BaluDuplicate post:
Performance issue on AFPO
Performance issue on AFPO -
SAP DS 1.3: Performance issues with crosstab planning (IE only)
Hi everyone,
because im currently developing a custom component for DS 1.3, I got in touch with the planning feature of design studio. Planning currently only works in a crosstab.
Here I recognized a significant performance issue with the internet explorer:
If you simply type in a new value into a cell in a crosstab, it takes ~10s to confirm it (not constant! Sometimes it takes 2s, sometimes 15s). During this 10s, it seems like the IE crashed - no response at all. Sometimes there is also a warning message on bottom ('... script is slowing down the application ...').
Tested the same scenario with Chrome and FF - takes less than 1s to confirm.
Whats going on here ...? Anyone experienced the same issues?
My testing environment:
Windows 8.1
IE 11 (also tested emulated Ie 10 and IE 9 - same problem)
DS 1.3.0.3.201405141058
Local mode
Application only contained a simple crosstab, data source based on BW 7.3 query
Of course I deactivated all custom components while testing...
Kind regards
WladimirHi Tammy,
Thanks for your reply. Of course, my IE is updated to latest version (11.0.9600.17207).
Hopefully SP1 will fix this bug...
Kind regards
Wladimir -
Performance issues with version enable partitioned tables?
Hi all,
Are there any known performance issues with version enable partitioned tables?
Ive been doing some performance testes with a large version enable partitioned table and it seems that OCB optimiser is choosing very expensive plans during merge operations.
Tanks in advance,
Vitor
Example:
Object Name Rows Bytes Cost Object Node In/Out PStart PStop
UPDATE STATEMENT Optimizer Mode=CHOOSE 1 249
UPDATE SIG.SIG_QUA_IMG_LT
NESTED LOOPS SEMI 1 266 249
PARTITION RANGE ALL 1 9
TABLE ACCESS FULL SIG.SIG_QUA_IMG_LT 1 259 2 1 9
VIEW SYS.VW_NSO_1 1 7 247
NESTED LOOPS 1 739 247
NESTED LOOPS 1 677 247
NESTED LOOPS 1 412 246
NESTED LOOPS 1 114 244
INDEX RANGE SCAN WMSYS.MODIFIED_TABLES_PK 1 62 2
INDEX RANGE SCAN SIG.QIM_PK 1 52 243
TABLE ACCESS BY GLOBAL INDEX ROWID SIG.SIG_QUA_IMG_LT 1 298 2 ROWID ROW L
INDEX RANGE SCAN SIG.SIG_QUA_IMG_PKI$ 1 1
INDEX RANGE SCAN WMSYS.WM$NEXTVER_TABLE_NV_INDX 1 265 1
INDEX UNIQUE SCAN WMSYS.MODIFIED_TABLES_PK 1 62
/* Formatted on 2004/04/19 18:57 (Formatter Plus v4.8.0) */
UPDATE /*+ USE_NL(Z1) ROWID(Z1) */sig.sig_qua_img_lt z1
SET z1.nextver =
SYS.ltutil.subsversion
(z1.nextver,
SYS.ltutil.getcontainedverinrange (z1.nextver,
'SIG.SIG_QUA_IMG',
'NpCyPCX3dkOAHSuBMjGioQ==',
4574,
4575
4574
WHERE z1.ROWID IN (
(SELECT /*+ ORDERED USE_NL(T1) USE_NL(T2) USE_NL(J2) USE_NL(J3)
INDEX(T1 QIM_PK) INDEX(T2 SIG_QUA_IMG_PKI$)
INDEX(J2 WM$NEXTVER_TABLE_NV_INDX) INDEX(J3 MODIFIED_TABLES_PK) */
t2.ROWID
FROM (SELECT /*+ INDEX(WM$MODIFIED_TABLES MODIFIED_TABLES_PK) */
UNIQUE VERSION
FROM wmsys.wm$modified_tables
WHERE table_name = 'SIG.SIG_QUA_IMG'
AND workspace = 'NpCyPCX3dkOAHSuBMjGioQ=='
AND VERSION > 4574
AND VERSION <= 4575) j1,
sig.sig_qua_img_lt t1,
sig.sig_qua_img_lt t2,
wmsys.wm$nextver_table j2,
(SELECT /*+ INDEX(WM$MODIFIED_TABLES MODIFIED_TABLES_PK) */
UNIQUE VERSION
FROM wmsys.wm$modified_tables
WHERE table_name = 'SIG.SIG_QUA_IMG'
AND workspace = 'NpCyPCX3dkOAHSuBMjGioQ=='
AND VERSION > 4574
AND VERSION <= 4575) j3
WHERE t1.VERSION = j1.VERSION
AND t1.ima_id = t2.ima_id
AND t1.qim_inf_esq_x_tile = t2.qim_inf_esq_x_tile
AND t1.qim_inf_esq_y_tile = t2.qim_inf_esq_y_tile
AND t2.nextver != '-1'
AND t2.nextver = j2.next_vers
AND j2.VERSION = j3.VERSION))Hello Vitor,
There are currently no known issues with version enabled tables that are partitioned. The merge operation may need to access all of the partitions of a table depending on the data that needs to be moved/copied from the child to the parent. This is the reason for the 'Partition Range All' step in the plan that you provided. The majority of the remaining steps are due to the hints that have been added, since this plan has provided the best performance for us in the past for this particular statement. If this is not the case for you, and you feel that another plan would yield better performance, then please let me know and I will take a look at it.
One suggestion would be to make sure that the table was been recently analyzed so that the optimizer has the most current data about the table.
Performance issues are very hard to fix without a reproducible test case, so it may be advisable to file a TAR if you continue to have significant performance issues with the mergeWorkspace operation.
Thank You,
Ben -
Performance issues with SAP BPC 7.0/7.5 (SP06, 07, 08) NW
Hi Experts
There are some performance issues with SAP BPC 7.5/7.0 NW, users are saying they are not getting data or there are some issues while getting data from R/3 system or ECC 6.0. Then what things do I need to consider to check, such as what DataSources or Cubes I need to check? So, how to solve this issue?
What things I need to consider for SAP NW BI 7.0 u2013 SAP BPC 7.5 NW (SP06, 07, 08) Implementation?
Your help is greatly appreciated.
Regards,
QadeerHi,
New SP was released in February, and now most of the new bugs should been caught ,This has a Central Note. For SP06 it's Note 1527325 - Planning and Consolidation 7.5 SP06 NetWeaver Central Note to fix any issues. Most of the improvements in SP06 were related to performance, especially when logging on from the BPC clients.There you should be able to find a big list of fixes/improvements and Notes that describe those. Some of the Notes even have test description how to reproduce that issue in the old version.
hope this will help you
Regards
Rv -
Hi,
Has anyone had any issues with performance when updating the planning buffer using the Exit FM? What are the things to prepare for about performance issues in production system? Please recommend.
Thanks
RTHi Rob
In the case of performances problems you should check the statistics in BPS_STAT0 for possible long database selection on data
About this topic you can try to implement the SAP note 729362
Ciao
Andr -
Hi,
The program(developed by someother person) which was given to me is having performance issue. Its giving RUNTIME ERROR 'TIME LIMIT EXCEEDED'. Can u please suggest me in what way i can improve the performance of the program.
please help me in resolving this.
Helpful answers will be rewarded.
TABLES : MARA, "General Material Data
MARC, "Plant Data for Material
VBAP, "Sales Document: Item Data
MARD, "Storage Location Data for Material
MAST, "Material to BOM Link
MKPF, "Header: Material Document
MSEG, "Document Segment: Material
PKHD, "Control Cycle
PKPS, "Control Cycle Item / Kanban
PVBE, "Supply area
ZTGRP, "Wabco Technology Group table
ZZC10. "Kanban status table
I N T E R N A L T A B L E D E C L A R A T I O N *
INTERNAL TABLE FOR TECH.GROUP AND PLANT
DATA: BEGIN OF IT_MARC_ZTGRP OCCURS 0,
MATNR LIKE MARC-MATNR,
WERKS LIKE MARC-WERKS,
ZZPTG LIKE ZTGRP-ZZPTG,
ZZPTD LIKE ZTGRP-ZZPTD,
END OF IT_MARC_ZTGRP.
INTERNAL TABLE FOR RETURN VALUES
DATA IT_RETURN LIKE TABLE OF BAPIRET2 WITH HEADER LINE.
INTERNAL TABLE FOR SUBASSEMBLY AND FINISHED GOOD
DATA: BEGIN OF IT_MATERIAL OCCURS 0,
IDNRK LIKE STPO-IDNRK,
MATNR LIKE MAST-MATNR,
END OF IT_MATERIAL.
INTERNAL TABLE FOR OUTPUT YESTERDAY
DATA: BEGIN OF IT_KBED_KAKO OCCURS 0,
KBEAREST LIKE KBED-KBEAREST,
KRUEREST LIKE KBED-KRUEREST,
KEINH LIKE KBED-KEINH,
END OF IT_KBED_KAKO.
INTERNAL TABLE FOR MATERIAL AND PLANT
DATA: BEGIN OF IT_PLANT OCCURS 0,
MATNR LIKE MARC-MATNR,
WERKS LIKE MARC-WERKS,
END OF IT_PLANT.
DATA: BEGIN OF IT_COBK OCCURS 0,
RUECK LIKE COBK-REFBN,
END OF IT_COBK.
DATA: BEGIN OF IT_COEPL OCCURS 0,
KOKRS LIKE COEPL-KOKRS,
BELNR LIKE COEPL-BELNR,
END OF IT_COEPL.
DATA: BEGIN OF IT_CAPACITIES OCCURS 0,
LSBBTR LIKE COEPL-LSBBTR,
MEINB LIKE COEPL-MEINB,
END OF IT_CAPACITIES.
DATA: BEGIN OF IT_MKPF_MSEG OCCURS 0,
MBLNR LIKE MKPF-MBLNR,
MJAHR LIKE MKPF-MJAHR,
BUDAT LIKE MKPF-BUDAT,
BWART LIKE MSEG-BWART,
MATNR LIKE MSEG-MATNR,
MENGE LIKE MSEG-MENGE,
MEINS LIKE MSEG-MEINS,
DMBTR LIKE MSEG-DMBTR,
WERKS LIKE MSEG-WERKS,
END OF IT_MKPF_MSEG.
INTERNAL TABLE FOR MATERIAL-TO-BOM LINK
DATA: IT_MAST LIKE MAST OCCURS 0 WITH HEADER LINE.
INTERNAL TABLE FOR MATERIAL
DATA: BEGIN OF IT_MAT OCCURS 0,
MATNR LIKE MARA-MATNR,
END OF IT_MAT.
INTERNAL TABLE FOR STORAGE LOCATION DATA FOR SUBASSEMBLY
DATA: BEGIN OF IT_MARD OCCURS 0,
LABST LIKE MARD-LABST,
END OF IT_MARD.
INTERNAL TABLE FOR PLANT FOR MATERIALS
DATA IT_MARC LIKE MARC OCCURS 0 WITH HEADER LINE.
INTERNAL TABLE FOR BOM ITEM DATA
DATA: IT_STPO LIKE STPO OCCURS 0 WITH HEADER LINE.
INTERNAL TABLE FOR KANBAN STATUS DATA
DATA IT_ZZC10 LIKE ZZC10 OCCURS 0 WITH HEADER LINE.
TEMPORARY INTERNAL TABLE FOR KANBAN STATUS DATA
DATA IT_ZZC10_TEMP LIKE ZZC10 OCCURS 0 WITH HEADER LINE.
INTERNAL TABLE FOR CONTROL CYCLE
DATA IT_PKHD LIKE PKHD OCCURS 0 WITH HEADER LINE.
INTERNAL TABLE FOR CONTROL CYCLE ITEM
DATA IT_PKPS LIKE PKPS OCCURS 0 WITH HEADER LINE.
INTERNAL TABLE FOR MATERIAL DOCUMENT HEADER
DATA IT_MKPF LIKE MKPF OCCURS 0 WITH HEADER LINE.
INTERNAL TABLE FOR MATERIAL DOCUMENT ITEM
DATA IT_MSEG LIKE MSEG OCCURS 0 WITH HEADER LINE.
TEMPORARY INTERNAL TABLE FOR ACTUAL QUANTITY
DATA : BEGIN OF IT_TEMP OCCURS 0,
TECH LIKE ZTGRP-ZZPTD,
MATNR LIKE ZZC10-MATNR,
FINISHED LIKE MAST-MATNR,
PKNUM LIKE PKHD-PKNUM,
WERKS LIKE ZZC10-WERKS,
GSMNG LIKE PLAF-GSMNG,
MEINS LIKE PLAF-MEINS,
BEHAZ LIKE PKHD-BEHAZ,
BEHMG LIKE PKHD-BEHMG,
PKBMG LIKE ZZC10-PKBMG,
LATEHOURS LIKE PKHD-KWBZM,
FILLRATE TYPE P DECIMALS 2,
REPL_LEAD_TIME TYPE P DECIMALS 3,
QTY_1 LIKE PLAF-GSMNG,
QTY_2 LIKE PLAF-GSMNG,
QTY_3 LIKE PLAF-GSMNG,
QTY_4 LIKE PLAF-GSMNG,
QTY_5 LIKE PLAF-GSMNG,
QTY_6 LIKE PLAF-GSMNG,
GSMNG_OUTY LIKE PLAF-GSMNG,
MEINS_OUTY LIKE PLAF-MEINS,
KAPBD_OUTY LIKE COEPL-LSTBTR,
KEINH_OUTY LIKE COEPL-MEINH,
GSMNG_OUTM LIKE MSEG-MENGE,
MEINS_OUTM LIKE MSEG-MEINS,
KAPBD_OUTM LIKE COEPL-LSTBTR,
KEINH_OUTM LIKE COEPL-MEINH,
GSMNG_BORD LIKE PLAF-GSMNG,
MEINS_BORD LIKE MSEG-MEINS,
KAPBD_BORD LIKE KBED-KBEAREST,
KEINH_BORD LIKE COEPL-MEINH,
GSMNG_TDAY LIKE PLAF-GSMNG,
KAPBD_TDAY LIKE KBED-KBEAREST,
GSMNG_DAY1 LIKE PLAF-GSMNG,
KAPBD_DAY1 LIKE KBED-KBEAREST,
GSMNG_DAY2 LIKE PLAF-GSMNG,
KAPBD_DAY2 LIKE KBED-KBEAREST,
GSMNG_DAY3 LIKE PLAF-GSMNG,
KAPBD_DAY3 LIKE KBED-KBEAREST,
GSMNG_DAY4 LIKE PLAF-GSMNG,
KAPBD_DAY4 LIKE KBED-KBEAREST,
GSMNG_DAY5 LIKE PLAF-GSMNG,
KAPBD_DAY5 LIKE KBED-KBEAREST,
STOCK_PO01 LIKE MARD-LABST,
F_GSMNG_BORD LIKE PLAF-GSMNG,
F_MEINS_BORD LIKE MSEG-MEINS,
F_KAPBD_BORD LIKE KBED-KBEAREST,
F_KEINH_BORD LIKE COEPL-MEINH,
F_GSMNG_TDAY LIKE PLAF-GSMNG,
F_MEINS_TDAY LIKE MSEG-MEINS,
F_KAPBD_TDAY LIKE KBED-KBEAREST,
F_KEINH_TDAY LIKE COEPL-MEINH,
F_GSMNG_DAY1 LIKE PLAF-GSMNG,
F_MEINS_DAY1 LIKE MSEG-MEINS,
F_KAPBD_DAY1 LIKE KBED-KBEAREST,
F_KEINH_DAY1 LIKE COEPL-MEINH,
F_GSMNG_DAY2 LIKE PLAF-GSMNG,
F_MEINS_DAY2 LIKE MSEG-MEINS,
F_KAPBD_DAY2 LIKE KBED-KBEAREST,
F_KEINH_DAY2 LIKE COEPL-MEINH,
F_GSMNG_DAY3 LIKE PLAF-GSMNG,
F_MEINS_DAY3 LIKE MSEG-MEINS,
F_KAPBD_DAY3 LIKE KBED-KBEAREST,
F_KEINH_DAY3 LIKE COEPL-MEINH,
F_GSMNG_DAY4 LIKE PLAF-GSMNG,
F_MEINS_DAY4 LIKE MSEG-MEINS,
F_KAPBD_DAY4 LIKE KBED-KBEAREST,
F_KEINH_DAY4 LIKE COEPL-MEINH,
F_GSMNG_DAY5 LIKE PLAF-GSMNG,
F_MEINS_DAY5 LIKE MSEG-MEINS,
F_KAPBD_DAY5 LIKE KBED-KBEAREST,
F_KEINH_DAY5 LIKE COEPL-MEINH,
F_GSMNG_OUTM LIKE MSEG-MENGE,
F_MEINS_OUTM LIKE MSEG-MEINS,
F_KAPBD_OUTM LIKE COEPL-LSTBTR,
F_KEINH_OUTM LIKE COEPL-MEINH,
F_GSMNG_OUTN LIKE MSEG-MENGE,
F_MEINS_OUTN LIKE MSEG-MEINS,
F_KAPBD_OUTN LIKE KBED-KBEAREST,
F_KEINH_OUTN LIKE COEPL-MEINH,
END OF IT_TEMP.
INTERNAL TABLE FOR PLANNED DATA
DATA IT_PLAF LIKE PLAF OCCURS 0 WITH HEADER LINE.
INTERNAL TABLE FOR FACTORY CALENDER AND CURRENCY
DATA: BEGIN OF IT_T001W OCCURS 0,
WERKS LIKE T001W-WERKS,
BWKEY LIKE T001W-BWKEY,
FABKL LIKE T001W-FABKL,
END OF IT_T001W.
V A R I A B L E S *
DATA: AUX_BORD LIKE SY-DATUM,
AUX_YDAY LIKE SY-DATUM,
AUX_TDAY LIKE SY-DATUM,
AUX_DAY1 LIKE SY-DATUM,
AUX_DAY2 LIKE SY-DATUM,
AUX_DAY3 LIKE SY-DATUM,
AUX_DAY4 LIKE SY-DATUM,
AUX_DAY5 LIKE SY-DATUM,
AUX_CURRENT LIKE SY-DATUM,
AUX_PREVIOUS LIKE SY-DATUM,
AUX_TECH LIKE ZTGRP-ZZPTD,
AUX_BUDAT LIKE MKPF-BUDAT,
AUX_LOW LIKE MKPF-BUDAT,
AUX_HIGH LIKE MKPF-BUDAT,
AUX_MNG LIKE MSEG-MENGE,
AUX_MENGE LIKE MSEG-MENGE,
AUX_QUANT LIKE PLAF-GSMNG,
AUX_SUM_UNIT LIKE UMADD-MSEHI,
AUX_TIMESTAMP1 LIKE CCUPEAKA-TIMESTAMP,
AUX_TIMESTAMP2 LIKE CCUPEAKA-TIMESTAMP,
AUX_BUKRS LIKE T001K-BUKRS,
AUX_BWKEY LIKE T001W-BWKEY,
AUX_GSMNG LIKE PLAF-GSMNG,
AUX_PKBMG LIKE ZZC10-PKBMG,
AUX_FILL LIKE ZZC10-PKBMG,
AUX_TOTAL LIKE ZZC10-PKBMG,
AUX_FABKL LIKE SCAL-FCALID,
AUX_WAERS LIKE MSEG-WAERS,
AUX_ZZC10_HR TYPE P DECIMALS 3,
AUX_PLAF_HR TYPE P DECIMALS 3,
AUX_KAPBD_OUTY TYPE P DECIMALS 3,
AUX_KAPBD_OUTM TYPE P DECIMALS 3,
AUX_KAPBD_BORD TYPE P DECIMALS 3,
AUX_F_KAPBD_BORD TYPE P DECIMALS 3,
AUX_F_KAPBD_TDAY TYPE P DECIMALS 3,
AUX_F_KAPBD_DAY1 TYPE P DECIMALS 3,
AUX_F_KAPBD_DAY2 TYPE P DECIMALS 3,
AUX_F_KAPBD_DAY3 TYPE P DECIMALS 3,
AUX_F_KAPBD_DAY4 TYPE P DECIMALS 3,
AUX_F_KAPBD_DAY5 TYPE P DECIMALS 3,
AUX_F_KAPBD_OUTM TYPE P DECIMALS 3,
AUX_F_KAPBD_OUTN TYPE P DECIMALS 3,
AUX_PKHD_TIME TYPE P DECIMALS 3,
AUX_LATEHOURS TYPE P DECIMALS 3,
AUX_DIFF TYPE I,
AUX_FLAG TYPE C,
AUX_SET TYPE C,
AUX_DATUMABSOLUT(5) TYPE P,
AUX_FDAY LIKE SY-DATUM,
AUX_DAYS LIKE PKHD-KWBZD,
AUX_HOURS LIKE IT_ZZC10-TIME_EMPTY,
AUX_TIME LIKE PKHD-KWBZM,
AUX_PKHD_DAYS LIKE PKHD-KWBZD,
AUX_PKHD_HOURS LIKE PKHD-KWBZM,
AUX_TMP_DAYS LIKE PKHD-KWBZM VALUE 24,
AUX_TMP_HRS LIKE PKHD-KWBZM,
AUX_FILL_DAYS LIKE PKHD-KWBZD,
AUX_FILL_HOURS LIKE AUX_HOURS,
AUX_FILL_TIME LIKE PKHD-KWBZM,
AUX_TOTAL_QTY LIKE PKHD-BEHMG,
AUX_RATID LIKE PLAF-RATID,
AUX_MATNR LIKE PLAF-MATNR,
AUX_HEADER LIKE MARA-MATNR,
AUX_ZZPTG LIKE MARC-ZZPTG,
AUX_PEDTR LIKE PLAF-PEDTR,
AUX_KRUEREST LIKE KBED-KRUEREST,
AUX_KBEAREST LIKE KBED-KBEAREST,
AUX_KRUEREST_T LIKE KBED-KRUEREST,
AUX_KBEAREST_T LIKE KBED-KBEAREST,
AUX_KEINH LIKE KBED-KEINH,
AUX_KAPBD LIKE KBED-KBEAREST,
AUX_ARBPL LIKE MKAL-MDV01,
AUX_ARBID LIKE CRHD-OBJID,
AUX_QUALF LIKE CRHD-QUALF,
AUX_SAT1800 LIKE SY-UZEIT VALUE '180000'.
S E L E C T I O N S C R E E N *
INPUT SELECTION
SELECTION-SCREEN : BEGIN OF BLOCK BL0 WITH FRAME TITLE TEXT-000.
SELECT-OPTIONS : SO_PRVBE FOR PVBE-PRVBE,
SO_MATNR FOR MARA-MATNR,
SO_ZZPTG FOR MARC-ZZPTG OBLIGATORY,
SO_WERKS FOR MARC-WERKS OBLIGATORY,
SO_BUDAT FOR MKPF-BUDAT OBLIGATORY.
SELECTION-SCREEN : END OF BLOCK BL0.
I N I T I A L I Z A T I O N *
INITIALIZATION.
MOVE SY-DATUM TO AUX_CURRENT.
AUX_PREVIOUS = AUX_CURRENT - 1.
MOVE SY-DATUM TO SO_BUDAT-LOW.
MOVE '01' TO SO_BUDAT-LOW+6(2).
APPEND SO_BUDAT.
AUX_PREVIOUS = AUX_CURRENT - 1.
A T S E L E C T I O N - S C R E E N *
AT SELECTION-SCREEN.
CHECK ON SELECTION SCREEN
PERFORM CHECK_ON_SELECTION.
S T A R T O F S E L E C T I O N *
START-OF-SELECTION.
CHECK IF BOM EXISTS FOR THE COMPONENTS
PERFORM CHECK_BOM_EXISTENCE.
GET FINISHED PRODUCT NUMBER FOR THE SUBASSEMBLIES
IF NOT IT_MARC_ZTGRP[] IS INITIAL.
LOOP AT IT_MARC_ZTGRP.
PERFORM GET_HEADER_MATERIAL USING IT_MARC_ZTGRP-MATNR.
IF NOT IT_MAT[] IS INITIAL.
PERFORM GET_FINISHED_GOOD TABLES IT_MAT.
ENDIF.
CLEAR IT_MARC_ZTGRP.
ENDLOOP.
ELSE.
MESSAGE S010 WITH 'No data present for given selection'.
ENDIF.
CHECK IF SALES DATA EXIST FOR THE FINISHED GOOD
PERFORM CHECK_SALESDATA_EXISTENCE.
GET CONTROL CYCLE AND KANBAN DATA
PERFORM GET_KANBAN_DATA.
GET VALUATION AREA DATA
PERFORM GET_VALUATION_AREA.
GET MATERIAL DOCUMENT DATA
PERFORM GET_MATERIAL_DOC_DATA.
GET KANBAN DETAILS
PERFORM GET_KANBAN_DETAILS.
E N D O F S E L E C T I O N *
END-OF-SELECTION.
IF NOT IT_TEMP[] IS INITIAL.
DISPLAY OUTPUT
PERFORM DISPLAY_OUTPUT.
ENDIF.
*& Form CHECK_ON_SELECTION
text
--> p1 text
<-- p2 text
FORM CHECK_ON_SELECTION .
CHECK IF ENTERED PLANT IS VALID
IF NOT SO_WERKS-LOW IS INITIAL AND SO_WERKS-HIGH IS INITIAL.
SELECT SINGLE * FROM MARC WHERE WERKS EQ SO_WERKS-LOW.
IF SY-SUBRC NE 0.
SET CURSOR FIELD 'SO_WERKS-LOW'.
MESSAGE E010 WITH 'Please enter a valid Plant'.
ENDIF.
ENDIF.
CHECK IF SUPPLY AREA AND PLANT IS VALID
IF NOT SO_PRVBE-LOW IS INITIAL AND SO_PRVBE-HIGH IS INITIAL.
IF NOT SO_WERKS IS INITIAL AND SO_WERKS-HIGH IS INITIAL.
SELECT SINGLE * FROM PVBE WHERE WERKS EQ SO_WERKS-LOW
AND PRVBE EQ SO_PRVBE-LOW.
IF SY-SUBRC NE 0.
SET CURSOR FIELD 'SO_PRVBE-LOW'.
MESSAGE E010 WITH 'Supply Area' SO_PRVBE-LOW 'donot belong to'
SO_WERKS-LOW.
ENDIF.
ENDIF.
ENDIF.
CHECK IF ENTERED MATERIAL NUMBER IS VALID
IF NOT SO_MATNR-LOW IS INITIAL AND SO_MATNR-HIGH IS INITIAL.
SELECT SINGLE * FROM MARA WHERE MATNR EQ SO_MATNR-LOW.
IF SY-SUBRC NE 0.
SET CURSOR FIELD 'SO_MATNR-LOW'.
MESSAGE E010 WITH 'Please enter a valid Material Number'.
ELSE.
IF NOT SO_WERKS-LOW IS INITIAL AND SO_WERKS-HIGH IS INITIAL.
SELECT SINGLE * FROM MARC WHERE MATNR EQ SO_MATNR-LOW
AND WERKS EQ SO_WERKS-LOW.
IF SY-SUBRC NE 0.
SET CURSOR FIELD 'SO_MATNR-LOW'.
MESSAGE E010 WITH 'Material' SO_MATNR-LOW
'doesnot belong to plant' SO_WERKS-LOW.
ENDIF.
ENDIF.
ENDIF.
ENDIF.
CHECK IF TECHNOLOGY GROUP AND PLANT IS VALID
IF NOT SO_ZZPTG-LOW IS INITIAL AND SO_ZZPTG-HIGH IS INITIAL.
IF NOT SO_WERKS-LOW IS INITIAL AND SO_WERKS-HIGH IS INITIAL.
SELECT SINGLE * FROM MARC WHERE WERKS EQ SO_WERKS-LOW
AND ZZPTG EQ SO_ZZPTG-LOW.
IF SY-SUBRC NE 0.
SET CURSOR FIELD 'SO_ZZPTG-LOW'.
MESSAGE E010 WITH 'Tech.Group' SO_ZZPTG-LOW 'doesnot belong to plant'
SO_WERKS-LOW.
ENDIF.
ENDIF.
ENDIF.
ENDFORM. " CHECK_ON_SELECTION
*& Form CHECK_BOM_EXISTENCE
text
--> p1 text
<-- p2 text
FORM CHECK_BOM_EXISTENCE .
JOIN MARC AND ZTGRP TABLES TO GET THE COMPONENTS BASED ON THE INPUT
CRITERIA
REFRESH IT_MARC_ZTGRP.
SELECT MARCMATNR MARCWERKS ZTGRPZZPTG ZTGRPZZPTD
INTO TABLE IT_MARC_ZTGRP
FROM MARC INNER JOIN ZTGRP
ON MARCWERKS EQ ZTGRPWERKS AND
MARCZZPTG EQ ZTGRPZZPTG
WHERE MARC~WERKS IN SO_WERKS
AND MARC~ZZPTG IN SO_ZZPTG
AND MARC~MATNR IN SO_MATNR
AND MARC~LVORM NE 'X'
AND ( MARC~BESKZ EQ 'E' OR
MARC~BESKZ EQ 'X' ).
IF NOT IT_MARC_ZTGRP[] IS INITIAL.
CHECK THE EXISTENCE OF BOM FOR THE SELECTED COMPONENTS.
IF NOT PRESENT, DELETE THE ENTRY FROM INTERNAL TABLE
LOOP AT IT_MARC_ZTGRP.
REFRESH IT_RETURN.
CALL FUNCTION 'BAPI_MAT_BOM_EXISTENCE_CHECK'
EXPORTING
MATERIAL = IT_MARC_ZTGRP-MATNR
PLANT = IT_MARC_ZTGRP-WERKS
BOMUSAGE = '1'
TABLES
RETURN = IT_RETURN.
IF NOT IT_RETURN[] IS INITIAL.
DELETE IT_MARC_ZTGRP WHERE MATNR EQ IT_MARC_ZTGRP-MATNR
AND WERKS EQ IT_MARC_ZTGRP-WERKS
AND ZZPTG EQ IT_MARC_ZTGRP-ZZPTG.
ENDIF.
CLEAR IT_MARC_ZTGRP.
ENDLOOP.
ELSE.
MESSAGE S010 WITH 'No data present for given selection'.
ENDIF.
ENDFORM. " CHECK_BOM_EXISTENCE
*& Form GET_HEADER_MATERIAL
text
-->P_IT_MARC_ZTGRP_MATNR text
FORM GET_HEADER_MATERIAL USING P_MATNR.
REFRESH IT_STPO.
GET BOM ITEM DATA FOR THE COMPONENT
SELECT * FROM STPO INTO TABLE IT_STPO WHERE IDNRK EQ P_MATNR
AND DATUV LE SO_BUDAT-LOW
AND LKENZ NE 'X'.
IF NOT IT_STPO[] IS INITIAL.
IF BOM ITEM DATA IS PRESENT FOR THE COMPONENT
REFRESH IT_MAST.
GET MATERIAL TO BOM LINK
SELECT * FROM MAST INTO TABLE IT_MAST FOR ALL ENTRIES IN IT_STPO
WHERE STLNR EQ IT_STPO-STLNR.
IF NOT IT_MAST[] IS INITIAL.
SORT IT_MAST BY MATNR.
DELETE ADJACENT DUPLICATES FROM IT_MAST COMPARING MATNR.
LOOP AT IT_MAST.
CLEAR AUX_SET.
REFRESH IT_PLANT.
GET ALL THE PLANTS FOR THE COMPONENT
SELECT MATNR WERKS FROM MARC INTO TABLE IT_PLANT
WHERE MATNR EQ IT_MAST-MATNR.
LOOP AT IT_PLANT.
REFRESH IT_RETURN.
CHECK FOR BOM EXISTENCE FOR MATERIAL IN ALL PLANTS
CALL FUNCTION 'BAPI_MAT_BOM_EXISTENCE_CHECK'
EXPORTING
MATERIAL = IT_MAST-MATNR
PLANT = IT_PLANT-WERKS
BOMUSAGE = '1'
TABLES
RETURN = IT_RETURN.
IF IT_RETURN[] IS INITIAL.
MOVE 'X' TO AUX_SET.
ENDIF.
CLEAR IT_PLANT.
ENDLOOP.
IF BOM EXISTS FOR THE COMPONENT IN ANY PLANT, MOVE THE COMPONENT
TO INTERNAL TABLE IT_MAT
IF AUX_SET EQ 'X'.
MOVE IT_MAST-MATNR TO IT_MAT-MATNR.
APPEND IT_MAT.
CLEAR IT_MAT.
ELSE.
IF BOM DOESNOT EXISTS FOR THE COMPONENT IN ALL PLANTS,
SELECT THE COMPONENT AS THE FINISHED PRODUCT
CLEAR MARA.
SELECT SINGLE * FROM MARA WHERE MATNR EQ IT_MAST-MATNR.
IF SY-SUBRC EQ 0 AND MARA-LVORM NE 'X'.
MOVE: IT_MARC_ZTGRP-MATNR TO IT_MATERIAL-IDNRK,
IT_MAST-MATNR TO IT_MATERIAL-MATNR.
APPEND IT_MATERIAL.
CLEAR IT_MATERIAL.
ENDIF.
ENDIF.
CLEAR IT_MAST.
ENDLOOP.
ENDIF.
ELSE.
IF BOM ITEM DATA DOESNOT PRESENT FOR THE COMPONENT,
CONSIDER THE COMPONENT AS FINISHED PRODUCT
CLEAR MARA.
SELECT SINGLE * FROM MARA WHERE MATNR EQ P_MATNR.
IF SY-SUBRC EQ 0 AND MARA-LVORM NE 'X'.
MOVE: IT_MARC_ZTGRP-MATNR TO IT_MATERIAL-IDNRK,
P_MATNR TO IT_MATERIAL-MATNR.
APPEND IT_MATERIAL.
CLEAR IT_MATERIAL.
ENDIF.
ENDIF.
ENDFORM. " GET_HEADER_MATERIAL
*& Form GET_FINISHED_GOOD
text
-->P_IT_MAT text
FORM GET_FINISHED_GOOD TABLES P_IT_MAT LIKE IT_MAT[].
LOOP AT P_IT_MAT.
PERFORM GET_HEADER_MATERIAL USING P_IT_MAT-MATNR.
DELETE P_IT_MAT INDEX 1.
CLEAR P_IT_MAT.
ENDLOOP.
ENDFORM. " GET_FINISHED_GOOD
*& Form CHECK_SALESDATA_EXISTENCE
text
--> p1 text
<-- p2 text
FORM CHECK_SALESDATA_EXISTENCE .
IF NOT IT_MATERIAL[] IS INITIAL.
LOOP AT IT_MATERIAL.
CLEAR VBAP.
SELECT SINGLE * FROM VBAP WHERE MATNR EQ IT_MATERIAL-MATNR.
IF SY-SUBRC NE 0.
DELETE IT_MATERIAL WHERE IDNRK EQ IT_MATERIAL-IDNRK
AND MATNR EQ IT_MATERIAL-MATNR.
ENDIF.
CLEAR IT_MATERIAL.
ENDLOOP.
ENDIF.
ENDFORM. " CHECK_SALESDATA_EXISTENCE
*& Form GET_KANBAN_DATA
text
--> p1 text
<-- p2 text
FORM GET_KANBAN_DATA.
SORT IT_MATERIAL BY IDNRK MATNR.
DELETE ADJACENT DUPLICATES FROM IT_MATERIAL COMPARING ALL FIELDS.
IF NOT IT_MATERIAL[] IS INITIAL.
GET CONTROL CYCLE HEADER DATA
SELECT * FROM PKHD INTO TABLE IT_PKHD
FOR ALL ENTRIES IN IT_MATERIAL
WHERE WERKS IN SO_WERKS
AND MATNR EQ IT_MATERIAL-IDNRK
AND PRVBE IN SO_PRVBE.
IF NOT IT_PKHD[] IS INITIAL.
GET CONTROL CYCLE ITEM DATA
SELECT * FROM PKPS INTO TABLE IT_PKPS
FOR ALL ENTRIES IN IT_PKHD
WHERE PKNUM EQ IT_PKHD-PKNUM.
IF NOT IT_PKPS[] IS INITIAL.
GET KANBAN STATUS DATA
SELECT * FROM ZZC10 INTO TABLE IT_ZZC10_TEMP
FOR ALL ENTRIES IN IT_PKPS
WHERE PKKEY EQ IT_PKPS-PKKEY
AND PKNUM EQ IT_PKPS-PKNUM
AND ZDATE BETWEEN SO_BUDAT-LOW AND SY-DATUM
AND STATUS EQ '5'.
ENDIF.
ENDIF.
ENDIF.
ENDFORM. " GET_KANBAN_DATA
*& Form GET_VALUATION_AREA
text
--> p1 text
<-- p2 text
FORM GET_VALUATION_AREA.
IF NOT IT_MARC_ZTGRP[] IS INITIAL.
SELECT WERKS BWKEY FABKL FROM T001W INTO TABLE IT_T001W
FOR ALL ENTRIES IN IT_MARC_ZTGRP
WHERE WERKS EQ IT_MARC_ZTGRP-WERKS.
ENDIF.
ENDFORM. " GET_VALUATION_AREA
*& Form GET_MATERIAL_DOC_DATA
text
--> p1 text
<-- p2 text
FORM GET_MATERIAL_DOC_DATA.
GET MATERIAL DOCUMENT HEADER DATA
SELECT * FROM MKPF INTO TABLE IT_MKPF
WHERE BUDAT IN SO_BUDAT.
IF NOT IT_MKPF[] IS INITIAL.
GET MATERIAL DOCUMENT ITEM DATA
SELECT * FROM MSEG INTO TABLE IT_MSEG
FOR ALL ENTRIES IN IT_MKPF
WHERE MBLNR EQ IT_MKPF-MBLNR
AND WERKS IN SO_WERKS
AND MJAHR EQ SY-DATUM+0(4)
AND ( BWART EQ '131' OR BWART EQ '132' ).
IF NOT IT_MATERIAL[] IS INITIAL.
LOOP AT IT_MSEG.
READ TABLE IT_MATERIAL WITH KEY IDNRK = IT_MSEG-MATNR.
IF SY-SUBRC NE 0.
DELETE IT_MSEG WHERE MATNR EQ IT_MSEG-MATNR.
ENDIF.
CLEAR: IT_MATERIAL, IT_MSEG.
ENDLOOP.
ENDIF.
ENDIF.
ENDFORM. " GET_MATERIAL_DOC_DATA
*& Form GET_KANBAN_DETAILS
text
--> p1 text
<-- p2 text
FORM GET_KANBAN_DETAILS .
SORT IT_PKHD BY PKNUM.
IF NOT IT_ZZC10_TEMP[] IS INITIAL.
LOOP AT IT_ZZC10_TEMP.
CLEAR: AUX_FILL, AUX_PKBMG.
MOVE IT_ZZC10_TEMP] TO IT_ZZC10[.
DELETE IT_ZZC10 WHERE MATNR NE IT_ZZC10_TEMP-MATNR
AND WERKS NE IT_ZZC10_TEMP-WERKS.
LOOP AT IT_ZZC10.
CLEAR: AUX_TIMESTAMP1, AUX_TIMESTAMP2, AUX_ZZC10_HR, AUX_DIFF.
EMPTY DATE GREATER THAN FULL DATE
IF IT_ZZC10-DATE_EMPTY GT IT_ZZC10-DATE_FULL.
CONCATENATE IT_ZZC10-DATE_EMPTY IT_ZZC10-TIME_EMPTY
INTO AUX_TIMESTAMP1.
CONCATENATE IT_ZZC10-DATE_FULL IT_ZZC10-TIME_FULL
INTO AUX_TIMESTAMP2.
CALL FUNCTION 'CCU_TIMESTAMP_DIFFERENCE'
EXPORTING
TIMESTAMP1 = AUX_TIMESTAMP1
TIMESTAMP2 = AUX_TIMESTAMP2
IMPORTING
DIFFERENCE = AUX_DIFF.
AUX_ZZC10_HR = AUX_DIFF / 3600.
FULL DATE GREATER THAN EMPTY DATE
ELSEIF IT_ZZC10-DATE_FULL GT IT_ZZC10-DATE_EMPTY.
CONCATENATE IT_ZZC10-DATE_EMPTY IT_ZZC10-TIME_EMPTY
INTO AUX_TIMESTAMP2.
CONCATENATE IT_ZZC10-DATE_FULL IT_ZZC10-TIME_FULL
INTO AUX_TIMESTAMP1.
CALL FUNCTION 'CCU_TIMESTAMP_DIFFERENCE'
EXPORTING
TIMESTAMP1 = AUX_TIMESTAMP1
TIMESTAMP2 = AUX_TIMESTAMP2
IMPORTING
DIFFERENCE = AUX_DIFF.
AUX_ZZC10_HR = AUX_DIFF / 3600.
FULL DATE EQUAL TO EMPTY DATE
ELSEIF IT_ZZC10-DATE_FULL EQ IT_ZZC10-DATE_EMPTY.
EMPTY TIME GREATER THAN FULL TIME
IF IT_ZZC10-TIME_EMPTY GT IT_ZZC10-TIME_FULL.
CONCATENATE IT_ZZC10-DATE_EMPTY IT_ZZC10-TIME_EMPTY
INTO AUX_TIMESTAMP1.
CONCATENATE IT_ZZC10-DATE_FULL IT_ZZC10-TIME_FULL
INTO AUX_TIMESTAMP2.
CALL FUNCTION 'CCU_TIMESTAMP_DIFFERENCE'
EXPORTING
TIMESTAMP1 = AUX_TIMESTAMP1
TIMESTAMP2 = AUX_TIMESTAMP2
IMPORTING
DIFFERENCE = AUX_DIFF.
AUX_ZZC10_HR = AUX_DIFF / 3600.
FULL TIME GREATER THAN EMPTY TIME
ELSEIF IT_ZZC10-TIME_FULL GT IT_ZZC10-TIME_EMPTY.
CONCATENATE IT_ZZC10-DATE_EMPTY IT_ZZC10-TIME_EMPTY
INTO AUX_TIMESTAMP2.
CONCATENATE IT_ZZC10-DATE_FULL IT_ZZC10-TIME_FULL
INTO AUX_TIMESTAMP1.
CALL FUNCTION 'CCU_TIMESTAMP_DIFFERENCE'
EXPORTING
TIMESTAMP1 = AUX_TIMESTAMP1
TIMESTAMP2 = AUX_TIMESTAMP2
IMPORTING
DIFFERENCE = AUX_DIFF.
AUX_ZZC10_HR = AUX_DIFF / 3600.
FULL TIME EQUAL TO EMPTY TIME
ELSEIF IT_ZZC10-TIME_FULL EQ IT_ZZC10-TIME_EMPTY.
AUX_ZZC10_HR = 0.
ENDIF.
ENDIF.
READ TABLE IT_PKHD WITH KEY PKNUM = IT_ZZC10-PKNUM
BINARY SEARCH.
IF SY-SUBRC EQ 0.
CLEAR: AUX_TIMESTAMP1, AUX_TIMESTAMP2,
AUX_PKHD_DAYS, AUX_PKHD_HOURS, AUX_TMP_DAYS,
AUX_PKHD_TIME.
AUX_PKHD_DAYS = IT_PKHD-KWBZD.
AUX_PKHD_HOURS = IT_PKHD-KWBZM.
IF AUX_PKHD_DAYS NE 0.
AUX_TMP_DAYS = AUX_PKHD_DAYS * 24.
AUX_PKHD_TIME = AUX_TMP_DAYS + AUX_PKHD_HOURS.
ELSE.
AUX_PKHD_TIME = AUX_PKHD_HOURS.
ENDIF.
COMPARE STATUS CHANGE TIME WITH REPLENISHMENT LEAD TIME
IF AUX_ZZC10_HR GT AUX_PKHD_TIME.
CLEAR: AUX_LATEHOURS.
LATE HOURS
AUX_LATEHOURS = AUX_ZZC10_HR - AUX_PKHD_TIME.
LATE QUANTITY FOR +1 DAY
IF AUX_LATEHOURS LE 24.
IT_TEMP-QTY_1 = IT_TEMP-QTY_1 + IT_ZZC10-PKBMG.
LATE QUANTITY FOR +2 DAYS
ELSEIF AUX_LATEHOURS GT 24
AND AUX_LATEHOURS LE 48.
IT_TEMP-QTY_2 = IT_TEMP-QTY_2 + IT_ZZC10-PKBMG.
LATE QUANTITY FOR +3 DAYS
ELSEIF AUX_LATEHOURS GT 48
AND AUX_LATEHOURS LE 72.
IT_TEMP-QTY_3 = IT_TEMP-QTY_3 + IT_ZZC10-PKBMG.
LATE QUANTITY FOR +4 DAYS
ELSEIF AUX_LATEHOURS GT 72
AND AUX_LATEHOURS LE 96.
IT_TEMP-QTY_4 = IT_TEMP-QTY_4 + IT_ZZC10-PKBMG.
LATE QUANTITY FOR +5 DAYS
ELSEIF AUX_LATEHOURS GT 96
AND AUX_LATEHOURS LE 120.
IT_TEMP-QTY_5 = IT_TEMP-QTY_5 + IT_ZZC10-PKBMG.
LATE QUANTITY FOR MORE THAN 5 DAYS
ELSEIF AUX_LATEHOURS GT 120.
IT_TEMP-QTY_6 = IT_TEMP-QTY_6 + IT_ZZC10-PKBMG.
ENDIF.
TOTAL KANBAN LATE QUANTITIES
AUX_PKBMG = AUX_PKBMG + IT_ZZC10-PKBMG.
ELSE.
AUX_FILL = AUX_FILL + IT_ZZC10-PKBMG.
CONTINUE.
ENDIF.
ENDIF.
ENDLOOP.
SUBASSEMBLY PART NUMBER
IT_TEMP-MATNR = IT_ZZC10-MATNR.
FINISHED GOOD
READ TABLE IT_MATERIAL WITH KEY IDNRK = IT_ZZC10-MATNR.
IT_TEMP-FINISHED = IT_MATERIAL-MATNR.
TECHNOLOGY GROUP
READ TABLE IT_MARC_ZTGRP WITH KEY WERKS = IT_ZZC10-WERKS
MATNR = IT_ZZC10-MATNR.
IF SY-SUBRC EQ 0.
MOVE IT_MARC_ZTGRP-ZZPTD TO IT_TEMP-TECH.
ENDIF.
NUMBER OF KANBAN CONTAINERS
IT_TEMP-BEHAZ = IT_PKHD-BEHAZ.
KANBAN QUANTITY
IT_TEMP-BEHMG = IT_PKHD-BEHMG.
LATE HOURS
AUX_LATEHOURS = AUX_ZZC10_HR - AUX_PKHD_TIME.
IT_TEMP-LATEHOURS = AUX_LATEHOURS.
REPLENISHMENT LEAD TIME
IT_TEMP-REPL_LEAD_TIME = AUX_PKHD_TIME.
KANBAN LATE QUANTITIES
IT_TEMP-GSMNG = AUX_PKBMG.
FILL RATE
AUX_TOTAL = AUX_PKBMG + AUX_FILL.
IT_TEMP-FILLRATE = ( AUX_FILL / AUX_TOTAL ) * 100.
GET STOCK IN PO01
REFRESH IT_MARD.
SELECT LABST FROM MARD INTO TABLE IT_MARD
WHERE MATNR EQ IT_ZZC10-MATNR
AND WERKS EQ IT_ZZC10-WERKS.
IF SY-SUBRC EQ 0.
LOOP AT IT_MARD.
SUM.
ENDLOOP.
MOVE IT_MARD-LABST TO IT_TEMP-STOCK_PO01.
CLEAR IT_MARD.
ENDIF.
GET YESTERDAY'S OUTPUT QUANTITY
PERFORM GET_YESTERDAY_QTY.
CUMULATIVE OUTPUT FOR ACTUAL MONTH
PERFORM GET_CUMULATIVE_OUTPUT.
GET BACKORDER SUBASSEMBLY DATA
PERFORM GET_BACKORDER_QTY.
GET BACKORDER FINISHED GOODS, TODAY, +1, +2, +3, +4, +5
AND AVERAGE OUPTUT NEEDED DATA
PERFORM GET_FINISHEDGOODS_DATA.
GET DATA FOR ACTUAL MONTH DELIVERED
PERFORM GET_ACTUAL_MONTH_DATA.
APPEND IT_TEMP.
CLEAR IT_TEMP.
DELETE IT_ZZC10_TEMP WHERE MATNR EQ IT_ZZC10_TEMP-MATNR
AND WERKS EQ IT_ZZC10_TEMP-WERKS.
CLEAR: IT_ZZC10, IT_ZZC10_TEMP, IT_PKHD.
ENDLOOP.
ENDIF.
ENDFORM. " GET_KANBAN_DETAILS
*& Form GET_YESTERDAY_QTY
text
--> p1 text
<-- p2 text
FORM GET_YESTERDAY_QTY .
CLEAR: AUX_BUKRS, AUX_WAERS.
READ TABLE IT_T001W WITH KEY WERKS = IT_PKHD-WERKS.
IF SY-SUBRC EQ 0.
CLEAR AUX_FABKL.
MOVE IT_T001W-FABKL TO AUX_FABKL.
SELECT SINGLE BUKRS INTO AUX_BUKRS FROM T001K
WHERE BWKEY = IT_T001W-BWKEY.
IF SY-SUBRC EQ 0.
SELECT SINGLE WAERS INTO AUX_WAERS FROM T001
WHERE BUKRS = AUX_BUKRS.
ENDIF.
IF 'WD;WF;WN;WP;WU' CS AUX_FABKL.
AUX_FABKL(1) = 'P'.
ENDIF.
MOVE SY-DATUM TO AUX_DATUMABSOLUT.
PERFORM WEEKDAY USING AUX_DATUMABSOLUT.
MOVE 'W' TO AUX_FLAG.
PERFORM CHECK_WORKING_DAY CHANGING AUX_FLAG.
IF AUX_DATUMABSOLUT = 0.
AUX_YDAY = SY-DATUM.
ELSEIF AUX_DATUMABSOLUT = 1.
AUX_YDAY = SY-DATUM - 1.
ELSEIF AUX_FLAG = 'F'.
AUX_YDAY = SY-DATUM.
ENDIF.
IF AUX_DATUMABSOLUT = 0 OR
AUX_DATUMABSOLUT = 1 OR
AUX_FLAG = 'F'.
PERFORM DATE_WITH_OFFSET USING 0 CHANGING AUX_TDAY.
PERFORM DATE_WITH_OFFSET USING 1 CHANGING AUX_DAY1.
PERFORM DATE_WITH_OFFSET USING 2 CHANGING AUX_DAY2.
PERFORM DATE_WITH_OFFSET USING 3 CHANGING AUX_DAY3.
PERFORM DATE_WITH_OFFSET USING 4 CHANGING AUX_DAY4.
PERFORM DATE_WITH_OFFSET USING 5 CHANGING AUX_DAY5.
ELSE.
PERFORM DATE_WITH_OFFSET USING 0 CHANGING AUX_YDAY.
PERFORM DATE_WITH_OFFSET USING 1 CHANGING AUX_TDAY.
PERFORM DATE_WITH_OFFSET USING 2 CHANGING AUX_DAY1.
PERFORM DATE_WITH_OFFSET USING 3 CHANGING AUX_DAY2.
PERFORM DATE_WITH_OFFSET USING 4 CHANGING AUX_DAY3.
PERFORM DATE_WITH_OFFSET USING 5 CHANGING AUX_DAY4.
PERFORM DATE_WITH_OFFSET USING 6 CHANGING AUX_DAY5.
ENDIF.
AUX_BORD = '19000101'.
GET PLANNED ORDER DATA FOR YESTERDAY
REFRESH IT_PLAF.
CLEAR: AUX_KAPBD, AUX_KBEAREST, AUX_KRUEREST, AUX_GSMNG.
SELECT * FROM PLAF INTO TABLE IT_PLAF
WHERE MATNR EQ IT_PKHD-MATNR
AND PLWRK EQ IT_PKHD-WERKS
AND ( PAART EQ 'KD' OR PAART EQ 'PE' )
AND RATID GT 0
AND PEDTR EQ AUX_YDAY.
IF NOT IT_PLAF[] IS INITIAL.
LOOP AT IT_PLAF.
REFRESH IT_KBED_KAKO.
SELECT KBED~KBEAREST KBED~KRUEREST KBED~KEINH
FROM KBED INNER JOIN KAKO
ON KBED~KAPID EQ KAKO~KAPID
INTO TABLE IT_KBED_KAKO
WHERE KBED~BEDID = IT_PLAF-RATID
AND KAKO~KAPAR = '001'.
IF NOT IT_KBED_KAKO[] IS INITIAL.
LOOP AT IT_KBED_KAKO.
IF IT_KBED_KAKO-KEINH NE 'STD'.
CALL FUNCTION 'UNIT_CONVERSION_SIMPLE'
EXPORTING
INPUT = IT_KBED_KAKO-KBEAREST
UNIT_IN = IT_KBED_KAKO-KEINH
UNIT_OUT = 'STD'
IMPORTING
OUTPUT = IT_KBED_KAKO-KBEAREST.
CALL FUNCTION 'UNIT_CONVERSION_SIMPLE'
EXPORTING
INPUT = IT_KBED_KAKO-KRUEREST
UNIT_IN = IT_KBED_KAKO-KEINH
UNIT_OUT = 'STD'
IMPORTING
OUTPUT = IT_KBED_KAKO-KRUEREST.
ENDIF.
ADD IT_KBED_KAKO-KBEAREST TO AUX_KBEAREST.
ADD IT_KBED_KAKO-KRUEREST TO AUX_KRUEREST.
CLEAR IT_KBED_KAKO.
ENDLOOP.
AUX_KAPBD = AUX_KBEAREST + AUX_KRUEREST.
ENDIF.
CLEAR IT_PLAF.
ENDLOOP.
ENDIF.
READ TABLE IT_KBED_KAKO INDEX 1.
MOVE: AUX_KAPBD TO IT_TEMP-KAPBD_OUTY,
IT_KBED_KAKO-KEINH TO IT_TEMP-KEINH_OUTY.
GET OUTPUT QUANTITY FOR YESTERDAY
REFRESH: IT_MKPF, IT_MSEG.
CLEAR: AUX_MENGE.
SELECT * FROM MKPF INTO TABLE IT_MKPF
WHERE BUDAT EQ AUX_PREVIOUS.
IF NOT IT_MKPF[] IS INITIAL.
GET MATERIAL DOCUMENT ITEM DATA
SELECT * FROM MSEG INTO TABLE IT_MSEG
FOR ALL ENTRIES IN IT_MKPF
WHERE MBLNR EQ IT_MKPF-MBLNR
AND MATNR IN SO_MATNR
AND WERKS IN SO_WERKS
AND MJAHR EQ SY-DATUM+0(4)
AND ( BWART EQ '131' OR BWART EQ '132' ).
IF NOT IT_MSEG[] IS INITIAL.
LOOP AT IT_MSEG.
AUX_MENGE = AUX_MENGE + IT_MSEG-MENGE.
CLEAR IT_MSEG.
ENDLOOP.
ENDIF.
ENDIF.
READ TABLE IT_MSEG INDEX 1.
MOVE: AUX_MENGE TO IT_TEMP-GSMNG_OUTY,
IT_MSEG-MEINS TO IT_TEMP-MEINS_OUTY.
CLEAR IT_T001W.
ENDIF.
ENDFORM. " GET_YESTERDAY_QTY
*& Form GET_BACKORDER_QTY
text
--> p1 text
<-- p2 text
FORM GET_BACKORDER_QTY .
GET PLANNED ORDER DATA FOR BACKORDER
REFRESH IT_PLAF.
CLEAR: AUX_KAPBD, AUX_KBEAREST, AUX_KRUEREST, AUX_GSMNG, AUX_QUANT.
SELECT * FROM PLAF INTO TABLE IT_PLAF
WHERE MATNR EQ IT_ZZC10-MATNR
AND PLWRK EQ IT_ZZC10-WERKS
AND ( PAART EQ 'KD' OR PAART EQ 'PE' )
AND RATID GT 0
AND PEDTR GE SO_BUDAT-LOW
AND PEDTR LE SY-DATUM.
IF NOT IT_PLAF[] IS INITIAL.
LOOP AT IT_PLAF.
CLEAR: AUX_TIMESTAMP1, AUX_TIMESTAMP2, AUX_PLAF_HR, AUX_DIFF.
EMPTY DATE GREATER THAN FULL DATE
CONCATENATE SY-DATUM SY-UZEIT
INTO AUX_TIMESTAMP1.
CONCATENATE IT_PLAF-PEDTR IT_PLAF-PEDTI
INTO AUX_TIMESTAMP2.
CALL FUNCTION 'CCU_TIMESTAMP_DIFFERENCE'
EXPORTING
TIMESTAMP1 = AUX_TIMESTAMP1
TIMESTAMP2 = AUX_TIMESTAMP2
IMPORTING
DIFFERENCE = AUX_DIFF.
AUX_PLAF_HR = AUX_DIFF / 3600.
IF AUX_PLAF_HR > AUX_PKHD_TIME.
AUX_GSMNG = AUX_GSMNG + IT_PLAF-GSMNG.
REFRESH IT_KBED_KAKO.
SELECT KBEDKBEAREST KBEDKRUEREST KBED~KEINH
FROM KBED INNER JOIN KAKO
ON KBEDKAPID EQ KAKOKAPID
INTO TABLE IT_KBED_KAKO
WHERE KBED~BEDID = IT_PLAF-RATID
AND KAKO~KAPAR = '001'.
IF NOT IT_KBED_KAKO[] IS INITIAL.
LOOP AT IT_KBED_KAKO.
IF IT_KBED_KAKO-KEINH NE 'STD'.
CALL FUNCTION 'UNIT_CONVERSION_SIMPLE'
EXPORTING
INPUT = IT_KBED_KAKO-KBEAREST
UNIT_IN = IT_KBED_KAKO-KEINH
UNIT_OUT = 'STD'
IMPORTING
OUTPUT = IT_KBED_KAKO-KBEAREST.
CALL FUNCTION 'UNIT_CONVERSION_SIMPLE'
EXPORTING
INPUT = IT_KBED_KAKO-KRUEREST
UNIT_IN = IT_KBED_KAKO-KEINH
UNIT_OUT = 'STD'
IMPORTING
OUTPUT = IT_KBED_KAKO-KRUEREST.
ENDIF.
AUX_KBEAREST = AUX_KBEAREST + IT_KBED_KAKO-KBEAREST.
AUX_KRUEREST = AUX_KRUEREST + IT_KBED_KAKO-KRUEREST.
CLEAR IT_KBED_KAKO.
ENDLOOP.
AUX_KAPBD = AUX_KBEAREST + AUX_KRUEREST.
ENDIF.
ENDIF.
ENDLOOP.
READ TABLE IT_PLAF INDEX 1.
MOVE: AUX_GSMNG TO IT_TEMP-GSMNG_BORD,
IT_PLAF-MEINS TO IT_TEMP-MEINS_BORD.
READ TABLE IT_KBED_KAKO INDEX 1.
MOVE: AUX_KAPBD TO IT_TEMP-KAPBD_BORD,
IT_KBED_KAKO-KEINH TO IT_TEMP-KEINH_BORD.
ENDIF.
ENDFORM. " GET_BACKORDER_QTY
*& Form WEEKDAY
text
-->P_AUX_DATUMABSOLUT text
FORM WEEKDAY USING P_DATUMABSOLUT.
P_DATUMABSOLUT = P_DATUMABSOLUT MOD 7.
ENDFORM. " WEEKDAY
*& Form CHECK_WORKING_DAY
text
<--P_AUX_FLAG text
FORM CHECK_WORKING_DAY CHANGING P_FLAG.
CALL FUNCTION 'DATE_CONVERT_TO_FACTORYDATE'
EXPORTING
DATE = SY-DATUM
FACTORY_CALENDAR_ID = AUX_FABKL
IMPORTING
DATE = AUX_FDAY
EXCEPTIONS
CALENDAR_BUFFER_NOT_LOADABLE = 1
CORRECT_OPTION_INVALID = 2
DATE_AFTER_RANGE = 3
DATE_BEFORE_RANGE = 4
DATE_INVALID = 5
FACTORY_CALENDAR_NOT_FOUND = 6
OTHERS = 7.
IF AUX_FDAY NE SY-DATUM.
AUX_FLAG = 'F'.
ENDIF.
ENDFORM. " CHECK_WORKING_DAY
*& Form DATE_WITH_OFFSET
text
-->P_0 text
<--P_AUX_TDAY text
FORM DATE_WITH_OFFSET USING AUX_OFFSET
CHANGING P_TDAY.
DATA:
AUX_CALENDARDATE LIKE SCAL-DATE,
AUX_FACTORYDATE LIKE SCAL-FACDATE.
CALL FUNCTION 'DATE_CONVERT_TO_FACTORYDATE'
EXPORTING
DATE = SY-DATUM
FACTORY_CALENDAR_ID = AUX_FABKL
IMPORTING
FACTORYDATE = AUX_FACTORYDATE
EXCEPTIONS
CALENDAR_BUFFER_NOT_LOADABLE = 1
CORRECT_OPTION_INVALID = 2
DATE_AFTER_RANGE = 3
DATE_BEFORE_RANGE = 4
DATE_INVALID = 5
FACTORY_CALENDAR_NOT_FOUND = 6
OTHERS = 7.
AUX_FACTORYDATE = AUX_FACTORYDATE + AUX_OFFSET.
CALL FUNCTION 'FACTORYDATE_CONVERT_TO_DATE'
EXPORTING
FACTORYDATE = AUX_FACTORYDATE
FACTORY_CALENDAR_ID = AUX_FABKL
IMPORTING
DATE = AUX_CALENDARDATE
EXCEPTIONS
CALENDAR_BUFFER_NOT_LOADABLE = 1
FACTORYDATE_AFTER_RANGE = 2
FACTORYDATE_BEFORE_RANGE = 3
FACTORYDATE_INVALID = 4
FACTORY_CALENDAR_ID_MISSING = 5
FACTORY_CALENDAR_NOT_FOUND = 6
OTHERS = 7.
P_TDAY = AUX_CALENDARDATE.
ENDFORM. " DATE_WITH_OFFSET
*& Form GET_CUMULATIVE_OUTPUT
text
--> p1 text
<-- p2 text
FORM GET_CUMULATIVE_OUTPUT .
CLEAR: AUX_LOW, AUX_HIGH.
MOVE: SY-DATUM TO AUX_LOW,
SY-DATUM TO AUX_HIGH.
MOVE: '01' TO AUX_LOW+6(2),
'31' TO AUX_HIGH+6(2).
REFRESH IT_MKPF_MSEG.
CLEAR AUX_MNG.
SELECT MKPFMBLNR MKPFMJAHR MKPF~BUDAT
MSEGBWART MSEGMATNR MSEGMENGE MSEGMEINS MSEGDMBTR MSEGWERKS
INTO TABLE IT_MKPF_MSEG
FROM MKPF JOIN MSEG
ON MKPFMBLNR EQ MSEGMBLNR
WHERE MKPF~BUDAT BETWEEN AUX_LOW AND AUX_HIGH
AND MKPF~MJAHR EQ AUX_CURRENT+0(4)
AND MKPF~VGART EQ 'WS'
AND MSEG~ZEILE EQ 1
AND MSEG~WERKS EQ SO_WERKS
AND MSEG~MATNR EQ IT_PKHD-MATNR
AND MSEG~BWART IN ('131', '132').
IF NOT IT_MKPF_MSEG[] IS INITIAL.
LOOP AT IT_MKPF_MSEG.
AUX_MNG = AUX_MNG + IT_MKPF_MSEG-MENGE.
CLEAR IT_MKPF_MSEG.
ENDLOOP.
ENDIF.
MOVE AUX_MNG TO IT_TEMP-GSMNG_OUTM.
READ TABLE IT_MKPF_MSEG INDEX 1.
MOVE IT_MKPF_MSEG-MEINS TO IT_TEMP-MEINS_OUTM.
REFRESH IT_COBK.
SELECT DISTINCT BLPP~RUECK FROM BLPK INNER JOIN BLPP
ON BLPKPRTNR EQ BLPPPRTNR
INTO TABLE IT_COBK
WHERE BLPK~WERKS EQ SO_WERKS
AND BLPK~MATNR EQ SO_MATNR
AND BLPK~DATUM BETWEEN AUX_LOW
AND AUX_HIGH
AND BLPP~PRTPS EQ '0002'.
IF NOT IT_COBK[] IS INITIAL.
REFRESH IT_COEPL.
SELECT KOKRS BELNR FROM COBK
INTO CORRESPONDING FIELDS OF TABLE IT_COEPL
FOR ALL ENTRIES IN IT_COBK
WHERE REFBT EQ 'R'
AND REFBN EQ IT_COBK-RUECK
AND BLDAT BETWEEN AUX_LOW AND AUX_HIGH.
CLEAR IT_CAPACITIES.
REFRESH IT_CAPACITIES.
LOOP AT IT_COEPL.
SELECT LSBBTR MEINB FROM COEPL
APPENDING CORRESPONDING FIELDS OF TABLE IT_CAPACITIES
WHERE KOKRS EQ IT_COEPL-KOKRS
AND BELNR EQ IT_COEPL-BELNR
AND OBJNR LIKE '%DLABOR'.
CALL FUNCTION 'UNIT_SUM'
IMPORTING
QUANTITY_SUM = IT_TEMP-KAPBD_OUTM
UNIT_SUM = AUX_SUM_UNIT
TABLES
QUANTITIES_UNITS = IT_CAPACITIES.
CALL FUNCTION 'UNIT_CONVERSION_SIMPLE'
EXPORTING
INPUT = IT_TEMP-KAPBD_OUTM
UNIT_IN = AUX_SUM_UNIT
UNIT_OUT = 'STD'
IMPORTING
OUTPUT = IT_TEMP-KAPBD_OUTM.
ENDLOOP.
READ TABLE IT_CAPACITIES INDEX 1.
MOVE IT_CAPACITIES-MEINB TO IT_TEMP-KEINH_OUTM.
ENDIF.
ENDFORM. " GET_CUMULATIVE_OUTPUT
*& Form GET_FINISHEDGOODS_DATA
text
--> p1 text
<-- p2 text
FORM GET_FINISHEDGOODS_DATA .
GET PLANNED ORDER DATA
REFRESH IT_PLAF.
CLEAR: AUX_KAPBD, AUX_KBEAREST, AUX_KRUEREST, AUX_GSMNG.
SELECT * FROM PLAF INTO TABLE IT_PLAF
WHERE MATNR EQ IT_TEMP-FINISHED
AND ( PAART EQ 'KD' OR PAART EQ 'PE' )
AND RATID GT 0
AND PEDTR GE AUX_BORD
AND PEDTR LE AUX_DAY5.
IF NOT IT_PLAF[] IS INITIAL.
LOOP AT IT_PLAF.
CLEAR: AUX_KAPBD, AUX_GSMNG.
REFRESH IT_KBED_KAKO.
SELECT KBEDKBEAREST KBEDKRUEREST KBED~KEINH
FROM KBED INNER JOIN KAKO
ON KBEDKAPID EQ KAKOKAPID
INTO TABLE IT_KBED_KAKO
WHERE KBED~BEDID = IT_PLAF-RATID
AND KAKO~KAPAR = '001'.
IF NOT IT_KBED_KAKO[] IS INITIAL.
CLEAR AUX_KAPBD.
LOOP AT IT_KBED_KAKO.
IF IT_KBED_KAKO-KEINH NE 'STD'.
CALL FUNCTION 'UNIT_CONVERSION_SIMPLE'
EXPORTING
INPUT = IT_KBED_KAKO-KBEAREST
UNIT_IN = IT_KBED_KAKO-KEINH
UNIT_OUT = 'STD'
IMPORTING
OUTPUT = IT_KBED_KAKO-KBEAREST.
CALL FUNCTION 'UNIT_CONVERSION_SIMPLE'
EXPORTING
INPUT = IT_KBED_KAKO-KRUEREST
UNIT_IN = IT_KBED_KAKO-KEINH
UNIT_OUT = 'STD'
IMPORTING
OUTPUT = IT_KBED_KAKO-KRUEREST.
ENDIF.
ADD IT_KBED_KAKO-KBEAREST TO AUX_KBEAREST.
ADD IT_KBED_KAKO-KRUEREST TO AUX_KRUEREST.
CLEAR IT_KBED_KAKO.
ENDLOOP.
AUX_KAPBD = AUX_KBEAREST + AUX_KRUEREST.
ENDIF.
READ TABLE IT_KBED_KAKO INDEX 1.
CASE IT_PLAF-PEDTR.
WHEN AUX_DAY5.
AUX_GSMNG = IT_PLAF-GSMNG.
IT_TEMP-F_GSMNG_DAY5 = IT_TEMP-F_GSMNG_DAY5 + AUX_GSMNG.
IT_TEMP-F_MEINS_DAY5 = IT_PLAF-MEINS.
IT_TEMP-F_KAPBD_DAY5 = IT_TEMP-F_KAPBD_DAY5 + AUX_KAPBD.
IT_TEMP-F_KEINH_DAY5 = IT_KBED_KAKO-KEINH.
WHEN AUX_DAY4.
AUX_GSMNG = IT_PLAF-GSMNG.
IT_TEMP-F_GSMNG_DAY4 = IT_TEMP-F_GSMNG_DAY4 + AUX_GSMNG.
IT_TEMP-F_MEINS_DAY4 = IT_PLAF-MEINS.
IT_TEMP-F_KAPBD_DAY4 = IT_TEMP-F_KAPBD_DAY4 + AUX_KAPBD.
IT_TEMP-F_KEINH_DAY4 = IT_KBED_KAKO-KEINH.
WHEN AUX_DAY3.
AUX_GSMNG = IT_PLAF-GSMNG.
IT_TEMP-F_GSMNG_DAY3 = IT_TEMP-F_GSMNG_DAY3 + AUX_GSMNG.
IT_TEMP-F_MEINS_DAY3 = IT_PLAF-MEINS.
IT_TEMP-F_KAPBD_DAY3 = IT_TEMP-F_KAPBD_DAY3 + AUX_KAPBD.
IT_TEMP-F_KEINH_DAY3 = IT_KBED_KAKO-KEINH.
WHEN AUX_DAY2.
AUX_GSMNG = IT_PLAF-GSMNG.
IT_TEMP-F_GSMNG_DAY2 = IT_TEMP-F_GSMNG_DAY2 + AUX_GSMNG.
IT_TEMP-F_MEINS_DAY2 = IT_PLAF-MEINS.
IT_TEMP-F_KAPBD_DAY2 = IT_TEMP-F_KAPBD_DAY2 + AUX_KAPBD.
IT_TEMP-F_KEINH_DAY2 = IT_KBED_KAKO-KEINH.
WHEN AUX_DAY1.
AUX_GSMNG = IT_PLAF-GSMNG.
IT_TEMP-F_GSMNG_DAY1 = IT_TEMP-F_GSMNG_DAY1 + AUX_GSMNG.
IT_TEMP-F_MEINS_DAY1 = IT_PLAF-MEINS.
IT_TEMP-F_KAPBD_DAY1 = IT_TEMP-F_KAPBD_DAY1 + AUX_KAPBD.
IT_TEMP-F_KEINH_DAY1 = IT_KBED_KAKO-KEINH.
WHEN AUX_TDAY.
AUX_GSMNG = IT_PLAF-GSMNG.
IT_TEMP-F_GSMNG_TDAY = IT_TEMP-F_GSMNG_TDAY + AUX_GSMNG.
IT_TEMP-F_MEINS_TDAY = IT_PLAF-MEINS.
IT_TEMP-F_KAPBD_TDAY = IT_TEMP-F_KAPBD_TDAY + AUX_KAPBD.
IT_TEMP-F_KEINH_TDAY = IT_KBED_KAKO-KEINH.
WHEN OTHERS.
AUX_GSMNG = IT_PLAF-GSMNG.
IT_TEMP-F_GSMNG_BORD = IT_TEMP-F_GSMNG_BORD + AUX_GSMNG.
IT_TEMP-F_MEINS_BORD = IT_PLAF-MEINS.
IT_TEMP-F_KAPBD_BORD = IT_TEMP-F_KAPBD_BORD + AUX_KAPBD.
IT_TEMP-F_KEINH_BORD = IT_KBED_KAKO-KEINH.
ENDCASE.
IT_TEMP-F_GSMNG_OUTN = IT_TEMP-F_GSMNG_OUTN + AUX_GSMNG.
IT_TEMP-F_KAPBD_OUTN = IT_TEMP-F_KAPBD_OUTN + AUX_KAPBD.
ENDLOOP.
READ TABLE IT_PLAF INDEX 1.
MOVE IT_PLAF-MEINS TO IT_TEMP-F_MEINS_OUTN.
READ TABLE IT_KBED_KAKO INDEX 1.
MOVE IT_KBED_KAKO-KEINH TO IT_TEMP-F_KEINH_OUTN.
ENDIF.
ENDFORM. " GET_FINISHEDGOODS_DATA
*& Form GET_ACTUAL_MONTH_DATA
text
--> p1 text
<-- p2 text
FORM GET_ACTUAL_MONTH_DATA .
CLEAR: AUX_LOW, AUX_HIGH.
MOVE: '01' TO SO_BUDAT-LOW+6(2),
SO_BUDAT-LOW TO AUX_LOW,
'31' TO SO_BUDAT-LOW+6(2),
SO_BUDAT-LOW TO AUX_HIGH.
REFRESH IT_MKPF_MSEG.
CLEAR AUX_MNG.
SELECT MKPFMBLNR MKPFMJAHR MKPF~BUDAT
MSEGBWART MSEHi Ramya,
Your program contains a lot of BIG standard tables, these tables
usually contain huge amount of data,
plus you have used SELECT * in many places, try to avoid that and replace with only those field names that are reqd.
even the joins are on huge tables, performance could improve on those if you can put some more conditions or keys to the joins to make it more specific.
even after that if it gives the Runtime Error then you have 2 options:
1. Ask your Basis to increase Time limit for program executing in foreground.
2. Execute your program in Background Mode.
Regards,
Samson Rodrigues. -
Performance issues when creating a Report / Query in Discoverer
Hi forum,
Hope you are can help, it involves a performance issues when creating a Report / Query.
I have a Discoverer Report that currently takes less than 5 seconds to run. After I add a condition to bring back Batch Status that = Posted we cancelled the query after reaching 20 minutes as this is way too long. If I remove the condition the query time goes back to less than 5 seconds.
Please see attached the SQL Inspector Plan:
Before Condition
SELECT STATEMENT
SORT GROUP BY
VIEW SYS
SORT GROUP BY
NESTED LOOPS OUTER
NESTED LOOPS OUTER
NESTED LOOPS
NESTED LOOPS
NESTED LOOPS
NESTED LOOPS OUTER
NESTED LOOPS OUTER
NESTED LOOPS
NESTED LOOPS OUTER
NESTED LOOPS OUTER
NESTED LOOPS
NESTED LOOPS
NESTED LOOPS
NESTED LOOPS
NESTED LOOPS
NESTED LOOPS
NESTED LOOPS
NESTED LOOPS
NESTED LOOPS
NESTED LOOPS
NESTED LOOPS
TABLE ACCESS BY INDEX ROWID GL.GL_CODE_COMBINATIONS
AND-EQUAL
INDEX RANGE SCAN GL.GL_CODE_COMBINATIONS_N2
INDEX RANGE SCAN GL.GL_CODE_COMBINATIONS_N1
TABLE ACCESS BY INDEX ROWID APPLSYS.FND_FLEX_VALUES
INDEX RANGE SCAN APPLSYS.FND_FLEX_VALUES_N1
TABLE ACCESS BY INDEX ROWID APPLSYS.FND_FLEX_VALUE_SETS
INDEX UNIQUE SCAN APPLSYS.FND_FLEX_VALUE_SETS_U1
TABLE ACCESS BY INDEX ROWID APPLSYS.FND_FLEX_VALUES_TL
INDEX UNIQUE SCAN APPLSYS.FND_FLEX_VALUES_TL_U1
INDEX RANGE SCAN APPLSYS.FND_FLEX_VALUE_NORM_HIER_U1
TABLE ACCESS BY INDEX ROWID GL.GL_JE_LINES
INDEX RANGE SCAN GL.GL_JE_LINES_N1
INDEX UNIQUE SCAN GL.GL_JE_HEADERS_U1
INDEX UNIQUE SCAN GL.GL_SETS_OF_BOOKS_U2
TABLE ACCESS BY INDEX ROWID GL.GL_JE_HEADERS
INDEX UNIQUE SCAN GL.GL_JE_HEADERS_U1
INDEX UNIQUE SCAN GL.GL_DAILY_CONVERSION_TYPES_U1
TABLE ACCESS BY INDEX ROWID GL.GL_JE_SOURCES_TL
INDEX UNIQUE SCAN GL.GL_JE_SOURCES_TL_U1
INDEX UNIQUE SCAN GL.GL_JE_CATEGORIES_TL_U1
INDEX UNIQUE SCAN GL.GL_JE_HEADERS_U1
INDEX UNIQUE SCAN GL.GL_JE_HEADERS_U1
INDEX UNIQUE SCAN GL.GL_JE_BATCHES_U1
INDEX UNIQUE SCAN GL.GL_BUDGET_VERSIONS_U1
INDEX UNIQUE SCAN GL.GL_ENCUMBRANCE_TYPES_U1
INDEX UNIQUE SCAN GL.GL_SETS_OF_BOOKS_U2
TABLE ACCESS BY INDEX ROWID GL.GL_JE_BATCHES
INDEX UNIQUE SCAN GL.GL_JE_BATCHES_U1
INDEX UNIQUE SCAN GL.GL_SETS_OF_BOOKS_U2
INDEX UNIQUE SCAN GL.GL_JE_BATCHES_U1
TABLE ACCESS BY INDEX ROWID GL.GL_PERIODS
INDEX RANGE SCAN GL.GL_PERIODS_U1
After Condition
SELECT STATEMENT
SORT GROUP BY
VIEW SYS
SORT GROUP BY
NESTED LOOPS
NESTED LOOPS OUTER
NESTED LOOPS OUTER
NESTED LOOPS
NESTED LOOPS
NESTED LOOPS
NESTED LOOPS
NESTED LOOPS OUTER
NESTED LOOPS
NESTED LOOPS
NESTED LOOPS
NESTED LOOPS
NESTED LOOPS
NESTED LOOPS
NESTED LOOPS OUTER
NESTED LOOPS
NESTED LOOPS OUTER
NESTED LOOPS
NESTED LOOPS
NESTED LOOPS OUTER
NESTED LOOPS
TABLE ACCESS FULL GL.GL_JE_BATCHES
INDEX UNIQUE SCAN GL.GL_SETS_OF_BOOKS_U2
INDEX UNIQUE SCAN GL.GL_JE_BATCHES_U1
TABLE ACCESS BY INDEX ROWID GL.GL_JE_HEADERS
INDEX RANGE SCAN GL.GL_JE_HEADERS_N1
INDEX UNIQUE SCAN GL.GL_SETS_OF_BOOKS_U2
INDEX UNIQUE SCAN GL.GL_ENCUMBRANCE_TYPES_U1
INDEX UNIQUE SCAN GL.GL_DAILY_CONVERSION_TYPES_U1
INDEX UNIQUE SCAN GL.GL_BUDGET_VERSIONS_U1
TABLE ACCESS BY INDEX ROWID GL.GL_JE_SOURCES_TL
INDEX UNIQUE SCAN GL.GL_JE_SOURCES_TL_U1
INDEX UNIQUE SCAN GL.GL_JE_CATEGORIES_TL_U1
INDEX UNIQUE SCAN GL.GL_JE_BATCHES_U1
TABLE ACCESS BY INDEX ROWID GL.GL_JE_LINES
INDEX RANGE SCAN GL.GL_JE_LINES_U1
INDEX UNIQUE SCAN GL.GL_SETS_OF_BOOKS_U2
TABLE ACCESS BY INDEX ROWID GL.GL_CODE_COMBINATIONS
INDEX UNIQUE SCAN GL.GL_CODE_COMBINATIONS_U1
TABLE ACCESS BY INDEX ROWID GL.GL_PERIODS
INDEX RANGE SCAN GL.GL_PERIODS_U1
TABLE ACCESS BY INDEX ROWID APPLSYS.FND_FLEX_VALUES
INDEX RANGE SCAN APPLSYS.FND_FLEX_VALUES_N1
INDEX RANGE SCAN APPLSYS.FND_FLEX_VALUE_NORM_HIER_U1
TABLE ACCESS BY INDEX ROWID APPLSYS.FND_FLEX_VALUES_TL
INDEX UNIQUE SCAN APPLSYS.FND_FLEX_VALUES_TL_U1
TABLE ACCESS BY INDEX ROWID APPLSYS.FND_FLEX_VALUE_SETS
INDEX UNIQUE SCAN APPLSYS.FND_FLEX_VALUE_SETS_U1
INDEX UNIQUE SCAN GL.GL_JE_HEADERS_U1
INDEX UNIQUE SCAN GL.GL_JE_HEADERS_U1
INDEX UNIQUE SCAN GL.GL_JE_HEADERS_U1
Is there anything i can do in Discoverer Desktop / Administration to avoid this problem.
Many thanks,
LanceHi Rod,
I've tried the condition (Batch Status||'' = 'Posted') as you suggested, but the qeury time is still over 20 mins. To test i changed it to (Batch Status||'' = 'Unposted') and the query was returned within seconds again.
Ive been doing some more digging and have found the database view that is linked to the Journal Batches folder. See below.
I think the problem is with the column using DECODE. When querying the column in TOAD the value of P is returned. But in discoverer the condition is done on the value Posted. Im not too sure how DECODE works, but think this could be the causing some sort of issue with Full Table Scans. How do we get around this?
Lance
DECODE( JOURNAL_BATCH1.STATUS,
'+', 'Unable to validate or create CTA',
'+*', 'Was unable to validate or create CTA',
'-','Invalid or inactive rounding differences account in journal entry',
'-*', 'Modified invalid or inactive rounding differences account in journal entry',
'<', 'Showing sequence assignment failure',
'<*', 'Was showing sequence assignment failure',
'>', 'Showing cutoff rule violation',
'>*', 'Was showing cutoff rule violation',
'A', 'Journal batch failed funds reservation',
'A*', 'Journal batch previously failed funds reservation',
'AU', 'Showing batch with unopened period',
'B', 'Showing batch control total violation',
'B*', 'Was showing batch control total violation',
'BF', 'Showing batch with frozen or inactive budget',
'BU', 'Showing batch with unopened budget year',
'C', 'Showing unopened reporting period',
'C*', 'Was showing unopened reporting period',
'D', 'Selected for posting to an unopened period',
'D*', 'Was selected for posting to an unopened period',
'E', 'Showing no journal entries for this batch',
'E*', 'Was showing no journal entries for this batch',
'EU', 'Showing batch with unopened encumbrance year',
'F', 'Showing unopened reporting encumbrance year',
'F*', 'Was showing unopened reporting encumbrance year',
'G', 'Showing journal entry with invalid or inactive suspense account',
'G*', 'Was showing journal entry with invalid or inactive suspense account',
'H', 'Showing encumbrance journal entry with invalid or inactive reserve account',
'H*', 'Was showing encumbrance journal entry with invalid or inactive reserve account',
'I', 'In the process of being posted',
'J', 'Showing journal control total violation',
'J*', 'Was showing journal control total violation',
'K', 'Showing unbalanced intercompany journal entry',
'K*', 'Was showing unbalanced intercompany journal entry',
'L', 'Showing unbalanced journal entry by account category',
'L*', 'Was showing unbalanced journal entry by account category',
'M', 'Showing multiple problems preventing posting of batch',
'M*', 'Was showing multiple problems preventing posting of batch',
'N', 'Journal produced error during intercompany balance processing',
'N*', 'Journal produced error during intercompany balance processing',
'O', 'Unable to convert amounts into reporting currency',
'O*', 'Was unable to convert amounts into reporting currency',
'P', 'Posted',
'Q', 'Showing untaxed journal entry',
'Q*', 'Was showing untaxed journal entry',
'R', 'Showing unbalanced encumbrance entry without reserve account',
'R*', 'Was showing unbalanced encumbrance entry without reserve account',
'S', 'Already selected for posting',
'T', 'Showing invalid period and conversion information for this batch',
'T*', 'Was showing invalid period and conversion information for this batch',
'U', 'Unposted',
'V', 'Journal batch is unapproved',
'V*', 'Journal batch was unapproved',
'W', 'Showing an encumbrance journal entry with no encumbrance type',
'W*', 'Was showing an encumbrance journal entry with no encumbrance type',
'X', 'Showing an unbalanced journal entry but suspense not allowed',
'X*', 'Was showing an unbalanced journal entry but suspense not allowed',
'Z', 'Showing invalid journal entry lines or no journal entry lines',
'Z*', 'Was showing invalid journal entry lines or no journal entry lines', NULL ), -
Using Reference Cursor Performance Issue in Report
Hi,
Are reference cursor supposed to be faster than a normal query? The reason why I am asking is because I am using a reference cusor query in the data model and it has a performance issue on the report, it's taking quite a while to run than If I just run the same reference cursor query in sql*plus. The difference is significantly big. Any input is very much appreciated!
Thanks,
MarilynFrom the metalink bug 4372868 on 9.0.4.x. It was fixed on 10.1.2.0.2 and does not have a backport for any 9.0.4 version.
Also the 9.0.4 version is already desupported. Please see the note:
Note 307042.1
Topic: Desupport Notices - Oracle Products
Title: Oracle Reports 10g 9.0.4 & 9.0.4.x
Action plan:
If you are still on 9.0.4 and later version of oracle reports and have no plan yet to migrate to 10.1.2.0.2 version use the same query you are using in your reference cursor and use it as a plain SQL query in your reports data model. -
Hello
i am making a change to an existing custom report.I have to pull all the orders except CANCELLED Orders for a parameters passed by user.
I made a change as FLOW_STATUS_CODE<>'CANCELLED' in rdf.The not equal is causing performance issues...and it is taking lot of time to complete.
can any one sujjest what will be the best to use in place of not equal.
ThanksIs there an index on column FLOW_STATUS_CODE?
Run your query in sqlplus through explain plan, and check the execution plan if a query has performance issues.
set pages 999
set lines 400
set trimspool on
spool explain.lst
explain plan for
<your statement>;
select * from table(dbms_xplan.display);
spool offFor optimization questions you'd better go to the SQL forum. -
Performance issue with pl/sql code
Hi Oracle Gurus,
I am in need of your recommendations for a performance issue that I am facing in production envrionment. There is a pl/sql procedure which executes with different elapsed time at different executions. Elapsed Times are 30minutes , 40 minutes, 65 minutes , 3 minutes ,3 seconds.
Expected elapsed time is maximum of 3 minutes. ( But some times it took 3 seconds too...! )
Output on all different executions are same that is deletion and insertion of 12K records into a table.
Here is the auto trace details of two different scenarios.
Slow execution - 33.65 minutes
Stat Name Statement Per Execution % Snap
Elapsed Time (ms) 1,712,343 1,712,342.6 41.4
CPU Time (ms) 1,679,689 1,679,688.6 44.7
Executions 1 N/A N/A
Buffer Gets ########## 167,257,973.0 86.9
Disk Reads 1,284 1,284.0 0.4
Parse Calls 1 1.0 0.0
User I/O Wait Time (ms) 4,264 N/A N/A
Cluster Wait Time (ms) 3,468 N/A N/A
Application Wait Time (ms) 0 N/A N/A
Concurrency Wait Time (ms) 6 N/A N/A
Invalidations 0 N/A N/A
Version Count 4 N/A N/A
Sharable Mem(KB) 85 N/A N/A
-------------------------------------------------------------Fast Exection : 5 seconds
Stat Name Statement Per Execution % Snap
Elapsed Time (ms) 41,550 41,550.3 0.7
CPU Time (ms) 40,776 40,776.3 1.0
Executions 1 N/A N/A
Buffer Gets 2,995,677 2,995,677.0 4.2
Disk Reads 22 22.0 0.0
Parse Calls 1 1.0 0.0
User I/O Wait Time (ms) 162 N/A N/A
Cluster Wait Time (ms) 621 N/A N/A
Application Wait Time (ms) 0 N/A N/A
Concurrency Wait Time (ms) 55 N/A N/A
Invalidations 0 N/A N/A
Version Count 4 N/A N/A
Sharable Mem(KB) 85 N/A N/A
-------------------------------------------------------------For security reasons, I cannot share the actual code. Its a report generating code that deletes and load the data into table using insert into select statement.
Delete from table ;
cursor X to get the master data ( 98 records )
For each X loop
insert into tableA select * from tables where a= X.a and b= X.b and c=X.c ..... ;
-- 12 K records inserted on average
insert into tableB select * from tables where a= X.a and b= X.b and c=X.c ..... ;
-- 12 K records inserted on average
end loop ;1. The select query is complex with bind variables ( explain plan varies for each values )
2. I have checked the tablespace of the tables involved, it is 82% used. DBA confirmed that it is not the reason.
3. Disk reads are high during long execution.
4. At long running times, I can see a db sequential read wait event on a index object. This index is on the table where data is inserted.
All I need to find is why this code is taking 3 seconds and 60 minutes on the same day and on the consecutive executions ?
Is there any other approach to find the root cause of this behaviour and to fix it ? Kindly adivse.
Thanks in advance your help.
Regards,
Hari
Edited by: BluShadow on 26-Sep-2012 08:24
edited to add {noformat}{noformat} tags. You've been a member long enough to know to do this yourself... so please do so in future. ({message:id=9360002})Hariharan ST wrote:
Hi Oracle Gurus,
I am in need of your recommendations for a performance issue that I am facing in production envrionment. There is a pl/sql procedure which executes with different elapsed time at different executions. Please reedit your post and add some code tags around the trace information. This would improve readability greatly and will help us to help you
example
{<b></b>code}
select * from dual;{<b></b>code}
Based upon your description I can imagine two things.
a) The execution plan for the select query does change frequently.
A typical reason can be not up to date statistics.
b) Some locking / wait conflict. For example upon a UK index.
Are there any other operations going on while it is slow? If anybody inserts a value, then your session will wait, if the same (PK/UK) value also is to be inserted.
Those wait events can be recognized using standard tools like oracle sql developer or enterprise manager while the query is slow.
Also go through the links that are in the FAQ. They tell you how to get better information for makeing a tuning request.
SQL and PL/SQL FAQ
Edited by: Sven W. on Sep 25, 2012 6:41 PM -
Performance issue showing read by other session Event
Hi All,
we are having a severe performance issue in my database when we are running batch jobs.
This was a new database(11.2.0.2) and we are testing the performance by running some batch jobs. These batch jobs included some inserts and updates.
I am seeing read by other session in top 5 timed events and cache buffers chains in Latch Miss Sources section.
Please help me to solve this out.
Inst Num Startup Time Release RAC
1 27-Feb-12 09:03 11.2.0.2.0 NO
Platform CPUs Cores Sockets Memory(GB)
Linux x86 64-bit 8 8 8 48.00
Snap Id Snap Time Sessions Curs/Sess
Begin Snap: 5605 29-Feb-12 03:00:27 63 4.5
End Snap: 5614 29-Feb-12 12:00:47 63 4.3
Elapsed: 540.32 (mins)
DB Time: 1,774.23 (mins)
Cache Sizes Begin End
~~~~~~~~~~~ ---------- ----------
Buffer Cache: 1,952M 1,952M Std Block Size: 16K
Shared Pool Size: 1,024M 1,024M Log Buffer: 18,868K
Load Profile Per Second Per Transaction Per Exec Per Call
~~~~~~~~~~~~ --------------- --------------- ---------- ----------
DB Time(s): 3.3 0.8 0.02 0.05
DB CPU(s): 1.1 0.3 0.01 0.02
Redo size: 55,763.8 13,849.3
Logical reads: 23,906.6 5,937.4
Block changes: 325.7 80.9
Physical reads: 665.6 165.3
Physical writes: 40.4 10.0
User calls: 60.7 15.1
Parses: 10.6 2.6
Hard parses: 1.1 0.3
W/A MB processed: 0.6 0.2
Logons: 0.1 0.0
Executes: 151.2 37.6
Rollbacks: 0.0 0.0
Transactions: 4.0
Instance Efficiency Percentages (Target 100%)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Buffer Nowait %: 99.94 Redo NoWait %: 100.00
Buffer Hit %: 97.90 In-memory Sort %: 100.00
Library Hit %: 98.06 Soft Parse %: 90.16
Execute to Parse %: 92.96 Latch Hit %: 100.00
Parse CPU to Parse Elapsd %: 76.71 % Non-Parse CPU: 98.57
Shared Pool Statistics Begin End
Memory Usage %: 89.38 87.96
% SQL with executions>1: 97.14 95.15
% Memory for SQL w/exec>1: 96.05 92.46
Top 5 Timed Foreground Events
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Avg
wait % DB
Event Waits Time(s) (ms) time Wait Class
db file sequential read 14,092,706 65,613 5 61.6 User I/O
DB CPU 34,819 32.7
read by other session 308,534 1,260 4 1.2 User I/O
direct path read 97,454 987 10 .9 User I/O
db file scattered read 71,870 910 13 .9 User I/O
Host CPU (CPUs: 8 Cores: 8 Sockets: 8)
~~~~~~~~ Load Average
Begin End %User %System %WIO %Idle
0.43 0.36 13.7 0.6 9.7 85.7
Instance CPU
~~~~~~~~~~~~
% of total CPU for Instance: 13.5
% of busy CPU for Instance: 94.2
%DB time waiting for CPU - Resource Mgr: 0.0
Memory Statistics
~~~~~~~~~~~~~~~~~ Begin End
Host Mem (MB): 49,152.0 49,152.0
SGA use (MB): 3,072.0 3,072.0
PGA use (MB): 506.5 629.1
% Host Mem used for SGA+PGA: 7.28 7.53
Time Model Statistics
-> Total time in database user-calls (DB Time): 106453.8s
-> Statistics including the word "background" measure background process
time, and so do not contribute to the DB time statistic
-> Ordered by % or DB time desc, Statistic name
Statistic Name Time (s) % of DB Time
sql execute elapsed time 105,531.1 99.1
DB CPU 34,818.8 32.7
parse time elapsed 714.7 .7
hard parse elapsed time 684.8 .6
PL/SQL execution elapsed time 161.9 .2
PL/SQL compilation elapsed time 44.2 .0
connection management call elapsed time 16.9 .0
hard parse (sharing criteria) elapsed time 10.2 .0
hard parse (bind mismatch) elapsed time 9.4 .0
sequence load elapsed time 2.9 .0
repeated bind elapsed time 0.5 .0
failed parse elapsed time 0.0 .0
DB time 106,453.8
background elapsed time 1,753.9
background cpu time 61.7
Operating System Statistics
-> *TIME statistic values are diffed.
All others display actual values. End Value is displayed if different
-> ordered by statistic type (CPU Use, Virtual Memory, Hardware Config), Name
Statistic Value End Value
BUSY_TIME 3,704,415
IDLE_TIME 22,203,740
IOWAIT_TIME 2,517,864
NICE_TIME 3
SYS_TIME 145,696
USER_TIME 3,557,758
LOAD 0 0
RSRC_MGR_CPU_WAIT_TIME 0
VM_IN_BYTES 358,813,045,760
VM_OUT_BYTES 29,514,830,848
PHYSICAL_MEMORY_BYTES 51,539,607,552
NUM_CPUS 8
NUM_CPU_CORES 8
NUM_CPU_SOCKETS 8
GLOBAL_RECEIVE_SIZE_MAX 4,194,304
GLOBAL_SEND_SIZE_MAX 1,048,586
TCP_RECEIVE_SIZE_DEFAULT 87,380
TCP_RECEIVE_SIZE_MAX 4,194,304
TCP_RECEIVE_SIZE_MIN 4,096
TCP_SEND_SIZE_DEFAULT 16,384
TCP_SEND_SIZE_MAX 4,194,304
TCP_SEND_SIZE_MIN 4,096
Operating System Statistics -
Snap Time Load %busy %user %sys %idle %iowait
29-Feb 03:00:27 0.4 N/A N/A N/A N/A N/A
29-Feb 04:00:35 1.4 11.9 11.2 0.6 88.1 14.3
29-Feb 05:00:41 1.7 13.8 13.2 0.6 86.2 15.8
29-Feb 06:00:48 1.5 14.0 13.5 0.6 86.0 12.3
29-Feb 07:01:00 1.8 16.3 15.8 0.5 83.7 10.4
29-Feb 08:00:12 2.6 23.2 22.5 0.6 76.8 12.6
29-Feb 09:00:26 1.3 16.6 16.0 0.5 83.4 5.7
29-Feb 10:00:33 1.2 13.8 13.3 0.5 86.2 2.0
29-Feb 11:00:43 1.3 14.5 14.0 0.5 85.5 3.8
29-Feb 12:00:47 0.4 4.9 4.2 0.7 95.1 10.6
Foreground Wait Class
-> s - second, ms - millisecond - 1000th of a second
-> ordered by wait time desc, waits desc
-> %Timeouts: value of 0 indicates value was < .5%. Value of null is truly 0
-> Captured Time accounts for 97.9% of Total DB time 106,453.79 (s)
-> Total FG Wait Time: 69,415.64 (s) DB CPU time: 34,818.79 (s)
Avg
%Time Total Wait wait
Wait Class Waits -outs Time (s) (ms) %DB time
User I/O 14,693,843 0 69,222 5 65.0
DB CPU 34,819 32.7
Commit 40,629 0 119 3 0.1
System I/O 26,504 0 57 2 0.1
Network 1,945,010 0 11 0 0.0
Other 125,200 99 4 0 0.0
Application 2,673 0 2 1 0.0
Concurrency 3,059 0 1 0 0.0
Configuration 31 19 0 15 0.0
Foreground Wait Events
-> s - second, ms - millisecond - 1000th of a second
-> Only events with Total Wait Time (s) >= .001 are shown
-> ordered by wait time desc, waits desc (idle events last)
-> %Timeouts: value of 0 indicates value was < .5%. Value of null is truly 0
Avg
%Time Total Wait wait Waits % DB
Event Waits -outs Time (s) (ms) /txn time
db file sequential read 14,092,706 0 65,613 5 108.0 61.6
read by other session 308,534 0 1,260 4 2.4 1.2
direct path read 97,454 0 987 10 0.7 .9
db file scattered read 71,870 0 910 13 0.6 .9
db file parallel read 35,001 0 372 11 0.3 .3
log file sync 40,629 0 119 3 0.3 .1
control file sequential re 26,504 0 57 2 0.2 .1
direct path read temp 14,499 0 49 3 0.1 .0
direct path write temp 9,186 0 28 3 0.1 .0
SQL*Net message to client 1,923,973 0 5 0 14.7 .0
SQL*Net message from dblin 1,056 0 5 5 0.0 .0
Disk file operations I/O 8,848 0 2 0 0.1 .0
ASM file metadata operatio 36 0 2 54 0.0 .0
SQL*Net break/reset to cli 2,636 0 1 1 0.0 .0
ADR block file read 472 0 1 1 0.0 .0
os thread startup 8 0 1 74 0.0 .0
SQL*Net more data to clien 17,656 0 1 0 0.1 .0
asynch descriptor resize 123,852 100 0 0 0.9 .0
local write wait 110 0 0 4 0.0 .0
utl_file I/O 55,635 0 0 0 0.4 .0
log file switch (private s 8 0 0 52 0.0 .0
cursor: pin S wait on X 2 0 0 142 0.0 .0
enq: KO - fast object chec 13 0 0 20 0.0 .0
PX Deq: Slave Session Stat 248 0 0 1 0.0 .0
enq: RO - fast object reus 18 0 0 11 0.0 .0
latch: cache buffers chain 2,511 0 0 0 0.0 .0
latch: shared pool 195 0 0 1 0.0 .0
CSS initialization 12 0 0 8 0.0 .0
PX qref latch 54 100 0 2 0.0 .0
SQL*Net more data from cli 995 0 0 0 0.0 .0
SQL*Net more data from dbl 300 0 0 0 0.0 .0
kksfbc child completion 1 100 0 56 0.0 .0
library cache: mutex X 244 0 0 0 0.0 .0
PX Deq: Signal ACK RSG 124 0 0 0 0.0 .0
undo segment extension 6 100 0 7 0.0 .0
PX Deq: Signal ACK EXT 124 0 0 0 0.0 .0
library cache load lock 3 0 0 9 0.0 .0
ADR block file write 45 0 0 1 0.0 .0
CSS operation: action 12 0 0 2 0.0 .0
reliable message 28 0 0 1 0.0 .0
CSS operation: query 72 0 0 0 0.0 .0
latch: row cache objects 14 0 0 1 0.0 .0
enq: SQ - contention 17 0 0 0 0.0 .0
latch free 32 0 0 0 0.0 .0
buffer busy waits 52 0 0 0 0.0 .0
enq: PS - contention 16 0 0 0 0.0 .0
enq: TX - row lock content 6 0 0 1 0.0 .0
SQL*Net message to dblink 1,018 0 0 0 0.0 .0
cursor: pin S 23 0 0 0 0.0 .0
latch: cache buffers lru c 8 0 0 0 0.0 .0
SQL*Net message from clien 1,923,970 0 944,508 491 14.7
jobq slave wait 66,732 100 33,334 500 0.5
Streams AQ: waiting for me 6,481 100 32,412 5001 0.0
wait for unread message on 32,858 98 32,411 986 0.3
PX Deq: Execution Msg 1,448 0 190 131 0.0
PX Deq: Execute Reply 1,196 0 74 62 0.0
HS message to agent 228 0 4 19 0.0
single-task message 42 0 4 97 0.0
PX Deq Credit: send blkd 904 0 2 3 0.0
PX Deq Credit: need buffer 205 0 1 3 0.0
Foreground Wait Events
-> s - second, ms - millisecond - 1000th of a second
-> Only events with Total Wait Time (s) >= .001 are shown
-> ordered by wait time desc, waits desc (idle events last)
-> %Timeouts: value of 0 indicates value was < .5%. Value of null is truly 0
Avg
%Time Total Wait wait Waits % DB
Event Waits -outs Time (s) (ms) /txn time
PX Deq: Table Q Normal 4,291 0 1 0 0.0
PX Deq: Join ACK 124 0 0 1 0.0
PX Deq: Parse Reply 124 0 0 0 0.0
KSV master wait 256 0 0 0 0.0
Latch Miss Sources
-> only latches with sleeps are shown
-> ordered by name, sleeps desc
NoWait Waiter
Latch Name Where Misses Sleeps Sleeps
ASM map operation freeli kffmTranslate2 0 2 0
DML lock allocation ktadmc 0 2 0
FOB s.o list latch ksfd_allfob 0 2 2
In memory undo latch ktiFlushMe 0 5 0
In memory undo latch ktichg: child 0 3 0
PC and Classifier lists No latch 0 6 0
Real-time plan statistic keswxAddNewPlanEntry 0 20 20
SQL memory manager worka qesmmIRegisterWorkArea:1 0 1 1
active service list kswslogon: session logout 0 23 12
active service list kswssetsvc: PX session swi 0 6 1
active service list kswsite: service iterator 0 1 0
archive process latch kcrrgpll 0 3 3
cache buffers chains kcbgtcr_2 0 1,746 573
cache buffers chains kcbgtcr: fast path (cr pin 0 1,024 2,126
cache buffers chains kcbgcur_2 0 60 8
cache buffers chains kcbchg1: kslbegin: bufs no 0 16 3
cache buffers chains kcbgtcr: fast path 0 14 20
cache buffers chains kcbzibmlt: multi-block rea 0 10 0
cache buffers chains kcbrls_2 0 9 53
cache buffers chains kcbgtcr: kslbegin shared 0 8 1
cache buffers chains kcbrls_1 0 7 84
cache buffers chains kcbgtcr: kslbegin excl 0 6 14
cache buffers chains kcbnew: new latch again 0 6 0
cache buffers chains kcbzgb: scan from tail. no 0 6 0
cache buffers chains kcbzwb 0 5 8
cache buffers chains kcbgcur: fast path (shr) 0 3 0
cache buffers chains kcbget: pin buffer 0 3 0
cache buffers chains kcbzhngcbk2_1 0 1 0
cache buffers lru chain kcbzgws 0 19 0
cache buffers lru chain kcbo_link_q 0 3 0
call allocation ksuxds 0 14 10
call allocation ksudlp: top call 0 2 3
enqueue hash chains ksqgtl3 0 2 1
enqueue hash chains ksqrcl 0 1 2
enqueues ksqgel: create enqueue 0 1 0
object queue header oper kcbo_unlink_q 0 5 2
object queue header oper kcbo_sw_buf 0 2 0
object queue header oper kcbo_link_q 0 1 2
object queue header oper kcbo_switch_cq 0 1 2
object queue header oper kcbo_switch_mq_bg 0 1 4
parallel query alloc buf kxfpbalo 0 1 1
process allocation ksucrp:1 0 2 0
process queue reference kxfpqrsnd 0 1 0
qmn task queue latch kwqmnmvtsks: delay to read 0 1 0
redo allocation kcrfw_redo_gen: redo alloc 0 17 0
row cache objects kqreqd: reget 0 6 0
row cache objects kqrpre: find obj 0 6 13
row cache objects kqrso 0 2 0
row cache objects kqreqd 0 1 2
row cache objects kqrpre: init complete 0 1 1
shared pool kghalo 0 199 106
shared pool kghupr1 0 39 109
shared pool kghfre 0 18 19
shared pool kghalp 0 7 29
space background task la ktsj_grab_task 0 21 27
Mutex Sleep Summary
-> ordered by number of sleeps desc
Wait
Mutex Type Location Sleeps Time (ms)
Library Cache kglhdgn2 106 338 12
Library Cache kgllkc1 57 259 10
Library Cache kgllkdl1 85 123 21
Cursor Pin kkslce [KKSCHLPIN2] 70 286
Library Cache kglget2 2 31 1
Library Cache kglhdgn1 62 31 2
Library Cache kglpin1 4 26 1
Library Cache kglpnal1 90 18 0
Library Cache kglpndl1 95 15 2
Library Cache kgllldl2 112 6 0
Library Cache kglini1 32 1 0
-------------------------------------------------------------Thanks in advance.Hi,
Thanks for reply.
I provided one hour report.
Inst Num Startup Time Release RAC
1 27-Feb-12 09:03 11.2.0.2.0 NO
Platform CPUs Cores Sockets Memory(GB)
Linux x86 64-bit 8 8 8 48.00
Snap Id Snap Time Sessions Curs/Sess
Begin Snap: 5606 29-Feb-12 04:00:35 63 3.7
End Snap: 5607 29-Feb-12 05:00:41 63 3.6
Elapsed: 60.11 (mins)
DB Time: 382.67 (mins)
Cache Sizes Begin End
~~~~~~~~~~~ ---------- ----------
Buffer Cache: 1,952M 1,952M Std Block Size: 16K
Shared Pool Size: 1,024M 1,024M Log Buffer: 18,868K
Load Profile Per Second Per Transaction Per Exec Per Call
~~~~~~~~~~~~ --------------- --------------- ---------- ----------
DB Time(s): 6.4 0.8 0.03 0.03
DB CPU(s): 1.0 0.1 0.00 0.00
Redo size: 84,539.3 10,425.6
Logical reads: 23,345.6 2,879.1
Block changes: 386.5 47.7
Physical reads: 1,605.0 197.9
Physical writes: 7.1 0.9
User calls: 233.9 28.9
Parses: 4.0 0.5
Hard parses: 0.1 0.0
W/A MB processed: 0.1 0.0
Logons: 0.1 0.0
Executes: 210.9 26.0
Rollbacks: 0.0 0.0
Transactions: 8.1
Instance Efficiency Percentages (Target 100%)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Buffer Nowait %: 99.62 Redo NoWait %: 100.00
Buffer Hit %: 95.57 In-memory Sort %: 100.00
Library Hit %: 99.90 Soft Parse %: 98.68
Execute to Parse %: 98.10 Latch Hit %: 99.99
Parse CPU to Parse Elapsd %: 32.08 % Non-Parse CPU: 99.90
Shared Pool Statistics Begin End
Memory Usage %: 89.25 89.45
% SQL with executions>1: 96.79 97.52
% Memory for SQL w/exec>1: 95.67 96.56
Top 5 Timed Foreground Events
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Avg
wait % DB
Event Waits Time(s) (ms) time Wait Class
db file sequential read 3,054,464 17,002 6 74.0 User I/O
DB CPU 3,748 16.3
read by other session 199,603 796 4 3.5 User I/O
direct path read 46,301 439 9 1.9 User I/O
db file scattered read 21,113 269 13 1.2 User I/O
Host CPU (CPUs: 8 Cores: 8 Sockets: 8)
~~~~~~~~ Load Average
Begin End %User %System %WIO %Idle
1.45 1.67 13.2 0.6 15.8 86.2
Instance CPU
~~~~~~~~~~~~
% of total CPU for Instance: 13.0
% of busy CPU for Instance: 94.7
%DB time waiting for CPU - Resource Mgr: 0.0
Memory Statistics
~~~~~~~~~~~~~~~~~ Begin End
Host Mem (MB): 49,152.0 49,152.0
SGA use (MB): 3,072.0 3,072.0
PGA use (MB): 513.5 467.7
% Host Mem used for SGA+PGA: 7.29 7.20
Time Model Statistics
-> Total time in database user-calls (DB Time): 22960.5s
-> Statistics including the word "background" measure background process
time, and so do not contribute to the DB time statistic
-> Ordered by % or DB time desc, Statistic name
Statistic Name Time (s) % of DB Time
sql execute elapsed time 22,835.9 99.5
DB CPU 3,748.4 16.3
parse time elapsed 15.4 .1
hard parse elapsed time 14.3 .1
PL/SQL execution elapsed time 7.5 .0
PL/SQL compilation elapsed time 6.0 .0
connection management call elapsed time 1.6 .0
sequence load elapsed time 0.4 .0
hard parse (sharing criteria) elapsed time 0.0 .0
repeated bind elapsed time 0.0 .0
failed parse elapsed time 0.0 .0
DB time 22,960.5
background elapsed time 238.1
background cpu time 4.9
Operating System Statistics
-> *TIME statistic values are diffed.
All others display actual values. End Value is displayed if different
-> ordered by statistic type (CPU Use, Virtual Memory, Hardware Config), Name
Statistic Value End Value
BUSY_TIME 396,506
IDLE_TIME 2,483,725
IOWAIT_TIME 455,495
NICE_TIME 0
SYS_TIME 16,163
USER_TIME 380,052
LOAD 1 2
RSRC_MGR_CPU_WAIT_TIME 0
VM_IN_BYTES 95,646,943,232
VM_OUT_BYTES 1,686,059,008
PHYSICAL_MEMORY_BYTES 51,539,607,552
NUM_CPUS 8
NUM_CPU_CORES 8
NUM_CPU_SOCKETS 8
GLOBAL_RECEIVE_SIZE_MAX 4,194,304
GLOBAL_SEND_SIZE_MAX 1,048,586
TCP_RECEIVE_SIZE_DEFAULT 87,380
TCP_RECEIVE_SIZE_MAX 4,194,304
TCP_RECEIVE_SIZE_MIN 4,096
TCP_SEND_SIZE_DEFAULT 16,384
TCP_SEND_SIZE_MAX 4,194,304
TCP_SEND_SIZE_MIN 4,096
Operating System Statistics -
Snap Time Load %busy %user %sys %idle %iowait
29-Feb 04:00:35 1.4 N/A N/A N/A N/A N/A
29-Feb 05:00:41 1.7 13.8 13.2 0.6 86.2 15.8
Foreground Wait Class
-> s - second, ms - millisecond - 1000th of a second
-> ordered by wait time desc, waits desc
-> %Timeouts: value of 0 indicates value was < .5%. Value of null is truly 0
-> Captured Time accounts for 97.6% of Total DB time 22,960.46 (s)
-> Total FG Wait Time: 18,651.75 (s) DB CPU time: 3,748.35 (s)
Avg
%Time Total Wait wait
Wait Class Waits -outs Time (s) (ms) %DB time
User I/O 3,327,253 0 18,576 6 80.9
DB CPU 3,748 16.3
Commit 23,882 0 69 3 0.3
System I/O 1,035 0 3 3 0.0
Network 842,393 0 2 0 0.0
Other 10,120 99 0 0 0.0
Configuration 3 0 0 58 0.0
Application 264 0 0 1 0.0
Concurrency 1,482 0 0 0 0.0
Foreground Wait Events
-> s - second, ms - millisecond - 1000th of a second
-> Only events with Total Wait Time (s) >= .001 are shown
-> ordered by wait time desc, waits desc (idle events last)
-> %Timeouts: value of 0 indicates value was < .5%. Value of null is truly 0
Avg
%Time Total Wait wait Waits % DB
Event Waits -outs Time (s) (ms) /txn time
db file sequential read 3,054,464 0 17,002 6 104.5 74.0
read by other session 199,603 0 796 4 6.8 3.5
direct path read 46,301 0 439 9 1.6 1.9
db file scattered read 21,113 0 269 13 0.7 1.2
log file sync 23,882 0 69 3 0.8 .3
db file parallel read 4,727 0 68 14 0.2 .3
control file sequential re 1,035 0 3 3 0.0 .0
SQL*Net message to client 840,792 0 2 0 28.8 .0
direct path read temp 95 0 2 18 0.0 .0
local write wait 79 0 0 4 0.0 .0
Disk file operations I/O 870 0 0 0 0.0 .0
ASM file metadata operatio 4 0 0 50 0.0 .0
log file switch (private s 3 0 0 58 0.0 .0
ADR block file read 36 0 0 3 0.0 .0
enq: RO - fast object reus 5 0 0 16 0.0 .0
latch: cache buffers chain 1,465 0 0 0 0.1 .0
SQL*Net break/reset to cli 256 0 0 0 0.0 .0
asynch descriptor resize 10,059 100 0 0 0.3 .0
SQL*Net more data to clien 1,510 0 0 0 0.1 .0
enq: KO - fast object chec 3 0 0 8 0.0 .0
SQL*Net more data from cli 91 0 0 0 0.0 .0
latch: shared pool 14 0 0 0 0.0 .0
ADR block file write 5 0 0 1 0.0 .0
reliable message 8 0 0 0 0.0 .0
direct path write temp 1 0 0 2 0.0 .0
SQL*Net message from clien 840,794 0 68,885 82 28.8
jobq slave wait 7,365 100 3,679 499 0.3
Streams AQ: waiting for me 721 100 3,605 5000 0.0
wait for unread message on 3,648 98 3,603 988 0.1
KSV master wait 20 0 0 0 0.0
Background Wait Events
-> ordered by wait time desc, waits desc (idle events last)
-> Only events with Total Wait Time (s) >= .001 are shown
-> %Timeouts: value of 0 indicates value was < .5%. Value of null is truly 0
Avg
%Time Total Wait wait Waits % bg
Event Waits -outs Time (s) (ms) /txn time
log file parallel write 29,353 0 83 3 1.0 34.8
db file parallel write 5,753 0 17 3 0.2 6.9
db file sequential read 1,638 0 15 9 0.1 6.1
control file sequential re 5,142 0 13 2 0.2 5.4
os thread startup 140 0 8 58 0.0 3.4
control file parallel writ 1,440 0 8 6 0.0 3.4
log file sequential read 304 0 8 26 0.0 3.3
db file scattered read 214 0 2 9 0.0 .8
ASM file metadata operatio 1,199 0 1 1 0.0 .3
direct path write 35 0 0 6 0.0 .1
direct path read 41 0 0 5 0.0 .1
kfk: async disk IO 6 0 0 9 0.0 .0
Disk file operations I/O 1,266 0 0 0 0.0 .0
ADR block file read 16 0 0 2 0.0 .0
read by other session 3 0 0 8 0.0 .0
Log archive I/O 2 0 0 10 0.0 .0
log file sync 3 0 0 5 0.0 .0
asynch descriptor resize 341 100 0 0 0.0 .0
CSS initialization 1 0 0 6 0.0 .0
log file single write 4 0 0 1 0.0 .0
latch: redo allocation 3 0 0 1 0.0 .0
ADR block file write 5 0 0 1 0.0 .0
LGWR wait for redo copy 45 0 0 0 0.0 .0
CSS operation: query 6 0 0 0 0.0 .0
CSS operation: action 1 0 0 1 0.0 .0
SQL*Net message to client 420 0 0 0 0.0 .0
rdbms ipc message 47,816 39 61,046 1277 1.6
DIAG idle wait 7,200 100 7,200 1000 0.2
Space Manager: slave idle 1,146 98 5,674 4951 0.0
class slave wait 284 0 3,983 14026 0.0
dispatcher timer 61 100 3,660 60006 0.0
Streams AQ: qmn coordinato 258 50 3,613 14003 0.0
Streams AQ: qmn slave idle 130 0 3,613 27789 0.0
Streams AQ: waiting for ti 7 71 3,608 515430 0.0
wait for unread message on 3,605 100 3,606 1000 0.1
pmon timer 1,201 100 3,604 3001 0.0
smon timer 15 73 3,603 240207 0.0
ASM background timer 754 0 3,602 4777 0.0
shared server idle wait 120 100 3,601 30006 0.0
SQL*Net message from clien 554 0 4 7 0.0
KSV master wait 101 0 0 2 0.0
Wait Event Histogram
-> Units for Total Waits column: K is 1000, M is 1000000, G is 1000000000
-> % of Waits: value of .0 indicates value was <.05%; value of null is truly 0
-> % of Waits: column heading of <=1s is truly <1024ms, >1s is truly >=1024ms
-> Ordered by Event (idle events last)
% of Waits
Total
Event Waits <1ms <2ms <4ms <8ms <16ms <32ms <=1s >1s
ADR block file read 52 73.1 1.9 9.6 13.5 1.9
ADR block file write 10 100.0
ADR file lock 12 100.0
ARCH wait for archivelog l 3 100.0
ASM file metadata operatio 1203 97.3 .5 .7 .3 .2 .9
CSS initialization 1 100.0
CSS operation: action 1 100.0
CSS operation: query 6 83.3 16.7
Disk file operations I/O 2118 95.4 4.5 .1
LGWR wait for redo copy 45 100.0
Log archive I/O 2 100.0
SQL*Net break/reset to cli 256 99.6 .4
SQL*Net message to client 839.9 100.0 .0
SQL*Net more data from cli 91 100.0
SQL*Net more data to clien 1503 100.0
asynch descriptor resize 10.4K 100.0
buffer busy waits 2 100.0
control file parallel writ 1440 5.7 35.1 24.0 16.3 12.0 5.5 1.5
control file sequential re 6177 69.4 7.5 5.9 8.1 7.1 1.7 .3
db file parallel read 4727 1.7 3.2 3.2 10.1 46.6 33.3 1.8
db file parallel write 5755 42.3 21.3 18.6 11.2 4.6 1.4 .5
db file scattered read 21.5K 8.4 4.3 11.9 18.9 26.3 25.3 4.9
db file sequential read 3053. 28.7 15.1 11.1 17.9 21.5 5.4 .3 .0
direct path read 46.3K 9.9 8.8 18.5 21.7 22.8 15.7 2.7
direct path read temp 95 9.5 9.5 23.2 49.5 8.4
direct path write 35 11.4 31.4 17.1 22.9 11.4 2.9 2.9
direct path write temp 1 100.0
enq: KO - fast object chec 3 66.7 33.3
enq: RO - fast object reus 5 20.0 20.0 20.0 20.0 20.0
kfk: async disk IO 6 50.0 16.7 16.7 16.7
latch free 3 100.0
latch: cache buffers chain 1465 100.0
latch: cache buffers lru c 1 100.0
latch: object queue header 2 100.0
latch: redo allocation 3 33.3 33.3 33.3
latch: row cache objects 2 100.0
latch: shared pool 15 93.3 6.7
local write wait 79 35.4 34.2 21.5 8.9
log file parallel write 29.4K 47.8 21.7 11.9 9.9 6.8 1.6 .3
log file sequential read 304 6.3 3.0 3.6 10.2 23.4 24.3 29.3
log file single write 4 25.0 75.0
log file switch (private s 3 100.0
log file sync 23.9K 40.9 28.0 12.9 9.7 6.7 1.5 .3
os thread startup 140 100.0
read by other session 199.6 37.1 19.9 12.9 13.1 13.8 3.1 .2
reliable message 8 100.0
ASM background timer 755 2.9 .4 .1 .1 .3 .1 .3 95.8
DIAG idle wait 7196 100.0
KSV master wait 121 88.4 2.5 3.3 2.5 .8 .8 1.7
SQL*Net message from clien 840.1 97.1 1.8 .5 .2 .2 .1 .0 .1
Space Manager: slave idle 1147 .1 .5 99.4
Streams AQ: qmn coordinato 258 49.6 .4 50.0
Streams AQ: qmn slave idle 130 .8 99.2
Streams AQ: waiting for me 721 100.0
Streams AQ: waiting for ti 7 28.6 42.9 28.6
class slave wait 283 39.9 2.5 2.5 3.5 4.9 9.2 15.2 22.3
dispatcher timer 60 100.0
jobq slave wait 7360 .0 .0 .0 99.9
pmon timer 1201 100.0
rdbms ipc message 47.8K 2.7 31.6 17.4 1.1 1.1 .9 20.9 24.3
Wait Event Histogram DB/Inst: I2KPROD/I2KPROD Snaps: 5606-5607
-> Units for Total Waits column: K is 1000, M is 1000000, G is 1000000000
-> % of Waits: value of .0 indicates value was <.05%; value of null is truly 0
-> % of Waits: column heading of <=1s is truly <1024ms, >1s is truly >=1024ms
-> Ordered by Event (idle events last)
% of Waits
Total
Event Waits <1ms <2ms <4ms <8ms <16ms <32ms <=1s >1s
shared server idle wait 120 100.0
smon timer 16 6.3 93.8
wait for unread message on 7250 .1 99.9
Latch Miss Sources
-> only latches with sleeps are shown
-> ordered by name, sleeps desc
NoWait Waiter
Latch Name Where Misses Sleeps Sleeps
In memory undo latch ktichg: child 0 1 0
active service list kswslogon: session logout 0 2 0
cache buffers chains kcbgtcr_2 0 1,123 483
cache buffers chains kcbgtcr: fast path (cr pin 0 496 1,131
cache buffers chains kcbrls_2 0 5 6
cache buffers chains kcbgcur_2 0 4 0
cache buffers chains kcbgtcr: fast path 0 3 1
cache buffers chains kcbzwb 0 2 4
cache buffers chains kcbchg1: kslbegin: bufs no 0 1 0
cache buffers chains kcbnew: new latch again 0 1 0
cache buffers chains kcbrls_1 0 1 6
cache buffers chains kcbzgb: scan from tail. no 0 1 0
cache buffers lru chain kcbzgws 0 1 0
object queue header oper kcbo_switch_cq 0 1 0
object queue header oper kcbo_switch_mq_bg 0 1 2
redo allocation kcrfw_redo_gen: redo alloc 0 3 0
row cache objects kqrpre: find obj 0 1 1
row cache objects kqrso 0 1 0
shared pool kghalo 0 13 3
shared pool kghupr1 0 4 15
shared pool kghalp 0 1 0
space background task la ktsj_grab_task 0 2 2
------------------------------------------------------------- -
Performance issue with Adobe forms
Dear SAP Experts,
We have the following issue/requirement from our client. The client is on SAP ECC 6.0 - production environment.
The client is highlighting performance issue while accessing the adobe forms for HR and FI business process ( both static and interactive ).
Examples are
FI – Invoice Approvals
HR – Job Salary Change
The client is asking us to provide best practices surrounding:
1. How to improve the performance of the adobe forms while accessing in SAP.
2. Is there any other technology which we can use in SAP to replace the adobe forms which has better performance factor.
3. Are there solutions such as webdynpro floor plan manager, UI Fiori which can be alternately used?
Regards,
SakthiHello Priya,
Adobe forms are easy to develop and much more comfortable than SAP Scripts and Smartforms. Initially they are a bit difficult but once you have your hands on, they are the most simplest things in ABAP.
Performance in Adobe forms is a mix of both fine tuning the Layout as well as back end coding.
Performance in Adobe forms cannot be done overnight. A lot of care has to be taken during the initial stage of development.
As far as my experience is concerned, please consider the below points while developing SAP Adobe forms.
1) Avoid Scripting (Javascript/Formcalc) as much as possible inside the form. It drastically reduces the performance and makes the form to execute slower. If you still want to use scripting(which cannot be avoided for some requirements), use Formcalc since it is comparatively faster than JavaScript.
2) Try to avoid the coding inside the Form Interface. You can always handle the maximum coding in the Driver program and pass it to the form.
3) Use Form Caching.
For forms that have fixed layout, its a good way to increase the performance of form rendering. In the layout, go to Form Properties. Then Click on Defaults tab and select Allow Form Rendering To Be Cached On Server. Then Click OK.
For forms that have flowable or dynamic layout, render the forms on the client side because it improves performance.
Last but not the least, please go through the below post by Otto Gold which is worth a read at least once.
How to write a messy form -
SAP BW OLAP Universe performance issue
Hi,
Based on BO recommendation, I created a universe on top of a big BEX query which included all characteristics and key figures from a cube. I then created a webi report with 5 characteristics and 1 key figure from this universe. I also create the same report in BEX query designer(same number of objects). I ran both. The Bex query completed under a minute and the webi report took more than 12 minutes to run. I did a bunch of other test with different number of objects combination and saw similar differential in query performance.
I did a trace using 'sm50' and saw the open SQL submitted to BW from BEx was very different from what got submitted from the webi report. Here is what I saw in pseudo code.
Bex:
select dimension1.blah, dimension2.blah, dimension3.blah, dimension..... sum(measure)
from dimension1, dimension2, dimension3, dimension..... factTable
where dimension1.SID = factTable.d1SID
and dimension2.SID = factTable.d2SID
and ......
and (query filters)
OLAP Universe
select dimension1,blah, dimension1.SID
from dimension1, factTable
where dimension1.SID = factTable.d1SID
select dimension2,blah, dimension2.SID
from dimension2, factTable
where dimension2.SID = factTable.d2SID
select dimension3,blah, dimension3.SID
from dimension3, factTable
where dimension3.SID = factTable.d3SID
It seems the OLAP universe was querying the BW cube one dimension at a time and then somehow piece the result sets together to form the final result set. Dimension tables join to the fact table without any filter definitely causes performance issue. Beside, I have no idea why the query requests are submitted to the BW system like that.
I looked in varies forums and found no similar issues posted by others. Has anyone had any performance problem with there OLAP universe? Is this a matter of configurations?
My envrionment:
SAP BW 3.5
BOXI 3.0
ORACLE DB (version ??)Hi,
You cannot compare a BEx query and a universe query by just comparing the trace.
BEx query makes ABAP calls and universe query makes MDX calls;
Moreover there is only one MDX call sent to SAP, what you have noticed is that there is one MDX call to retrieve member for a given characteristic whereas a prompt has been set on.
Last, Web Intelligence consume only flattened data (row sets) wheras BEx consume data sets.
That means that there is a flattening operation between SAP OLAP engine and the data sent to the Web Intelligence document.
A fix have been developed for a customer to improve performance on Web Intelligence queries, this fix will be available for all customers in SP2 planned in June 09.
Here is a a brief summary of what the fix provide:
- Provide data directly from SAP server to Web Intelligence document. Avoid unnecessary conversion steps: row set --> data set --> row set
- Eliminate redundant sort operations
- Other optimization operations
Didier
Edited by: Didier Mazoue on Nov 20, 2008 8:38 AM
Maybe you are looking for
-
Hi Experts, Please tell me driver program in indian payroll.how can we find driver programs for other countries. Thanks
-
I know absolutely nothing about how to use Adobe Software, and I really need to scratch all and start over. Is it possible for me to give a short explanation of what I am seeking to accomplish? Only Adobe services, tech, etc could evaluate what I nee
-
When I try to open the HP Utility - it just sits there and does nothing - I have to force quit. And my printer is not printing from my mac. My wife can print from her PC laptop. We use Netgear.
-
Runtime Error while creating FINANCIAL STATEMENT VERSION
Hi Experts, The major concern of the problem is related with the new creation of FINANCIAL STATEMENT VERSION. (SPRO --> IMG --> Financial Accounting --> General Ledger Accounting --> Business Transactinons --> Closing > Document> Define Financial Sta
-
Aperture: Academic vs. Full Version for Amateur?
Been using trial version and I think this is the software for me. I'm an amateur, but I've been shooting RAW and the workflow and organization in Aperture seem to be just what I want/need. Now the question is whether to go for the academic or the ful