Performance issues

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 MSE

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

Similar Messages

  • Report Performance Issue - Activity

    Hi gurus,
    I'm developing an Activity report using Transactional database (Online real time object).
    the purpose of the report is to list down all contacts related activities and activities NOT related to Contact by activity owner (user id).
    In order to fullfill that requirment I've created 2 report
    1) All Activities related to Contact -- Report A
    pull in Acitivity ID , Activity Type, Status, Contact ID
    2) All Activities not related to Contact UNION All Activities related to Contact (Base report) -- Report B
    to get the list of activities not related to contact i'm using Advanced filter based on result of another request which is I think is the part that slow down the query.
    <Activity ID not equal to any Activity ID in Report B>
    Anyone encountered performance issue due to the advanced filter in analytic before?
    any input is really appriciated
    Thanks in advanced,
    Fina

    Fina,
    Union is always the last option. If you can get all record in one report, do not use union.
    since all records, which you are targeting, are in the activity subject area, it is not nessecery to combine reports. add a column with the following logic
    if contact id is null (or = 'Unspecified') then owner name else contact name
    Hopefully, this is helping.

  • Report performance Issue in BI Answers

    Hi All,
    We have a performance issues with reports. Report is running more than 10 mins. we took query from the session log and ran it in database, at that time it took not more than 2 mins. We have verified proper indexes on the where clause columns.
    Could any once suggest to improve the performance in BI answers?
    Thanks in advance,

    I hope you dont have many case statements and complex calculations that you do in the Answers.
    Next thing you need to monitor is how many rows of data that you are trying to retrieve from the query. If the volume is huge then it takes time to do the formatting on the Answers as you are going to dump huge volumes of data. Database(like teradata) returns initially like 1-2000 records if you hit show all records then even db is gonna fair amount of time if you are dumping many records
    hope it helps
    thanks
    Prash

  • BW BCS cube(0bcs_vc10 ) Report huge performance issue

    Hi Masters,
    I am working out for a solution for BW report developed in 0bcs_vc10 virtual cube.
    Some of the querys is taking more 15 to 20 minutes to execute the report.
    This is huge performance issue. We are using BW 3.5, and report devloped in bex and published thru portal. Any one faced similar problem please advise how you tackle this issue. Please give the detail analysis approach how you resolved this issue.
    Current service pack we are using is
    SAP_BW 350 0016 SAPKW35016
    FINBASIS 300 0012 SAPK-30012INFINBASIS
    BI_CONT 353 0008 SAPKIBIFP8
    SEM-BW 400 0012 SAPKGS4012
    Best of Luck
    Chris
    BW BCS cube(0bcs_vc10 ) Report huge performance issue

    Ravi,
    I already did that, it is not helping me much for the performance. Reports are taking 15 t0 20 minutes. I wanted any body in this forum have the same issue how
    they resolved it.
    Regards,
    Chris

  • Interested by performance issue ?  Read this !  If you can explain, you're a master Jedi !

    This is the question we will try to answer...
    What si the bottle neck (hardware) of Adobe Premiere Pro CS6
    I used PPBM5 as a benchmark testing template.
    All the data and log as been collected using performance counter
    First of all, describe my computer...
    Operating System
    Microsoft Windows 8 Pro 64-bit
    CPU
    Intel Xeon E5 2687W @ 3.10GHz
    Sandy Bridge-EP/EX 32nm Technology
    RAM
    Corsair Dominator Platinum 64.0 GB DDR3
    Motherboard
    EVGA Corporation Classified SR-X
    Graphics
    PNY Nvidia Quadro 6000
    EVGA Nvidia GTX 680   // Yes, I created bench stats for both card
    Hard Drives
    16.0GB Romex RAMDISK (RAID)
    556GB LSI MegaRAID 9260-8i SATA3 6GB/s 5 disks with Fastpath Chip Installed (RAID 0)
    I have other RAID installed, but not relevant for the present post...
    PSU
    Cosair 1000 Watts
    After many days of tests, I wanna share my results with community and comment them.
    CPU Introduction
    I tested my cpu and pushed it at maximum speed to understand where is the limit, can I reach this limit and I've logged precisely all result in graph (See pictures 1).
    Intro : I tested my E5-XEON 2687W (8 Cores Hyperthread - 16 threads) to know if programs can use the maximum of it.  I used Prime 95 to get the result.  // I know this seem to be ordinary, but you will understand soon...
    The result : Yes, I can get 100% of my CPU with 1 program using 20 threads in parallel.  The CPU gives everything it can !
    Comment : I put 3 IO (cpu, disk, ram) on the graph of my computer during the test...
    (picture 1)
    Disk Introduction
    I tested my disk and pushed it at maximum speed to understand where is the limit and I've logged precisely all result in graph (See pictures 2).
    Intro : I tested my RAID 0 556GB (LSI MegaRAID 9260-8i SATA3 6GB/s 5 disks with Fastpath Chip Installed) to know if I can reach the maximum % disk usage (0% idle Time)
    The result : As you can see in picture 2, yes, I can get the max of my drive at ~ 1.2 Gb/sec read/write steady !
    Comment : I put 3 IO (cpu, disk, ram) on the graph of my computer during the test to see the impact of transfering many Go of data during ~10 sec...
    (picture 2)
    Now, I know my limits !  It's time to enter deeper in the subject !
    PPBM5 (H.264) Result
    I rendered the sequence (H.264) using Adobe Media Encoder.
    The result :
    My CPU is not used at 100%, the turn around 50%
    My Disk is totally idle !
    All the process usage are idle except process of (Adobe Media Encoder)
    The transfert rate seem to be a wave (up and down).  Probably caused by (Encrypt time....  write.... Encrypt time.... write...)  // It's ok, ~5Mb/sec during transfert rate !
    CPU Power management give 100% of clock to CPU during the encoding process (it's ok, the clock is stable during process).
    RAM, more than enough !  39 Go RAM free after the test !  // Excellent
    ~65 thread opened by Adobe Media Encoder (Good, thread is the sign that program try to using many cores !)
    GPU Load on card seem to be a wave also ! (up and down)  ~40% usage of GPU during the process of encoding.
    GPU Ram get 1.2Go of RAM (But with GTX 680, no problem and Quadro 6000 with 6 GB RAM, no problem !)
    Comment/Question : CPU is free (50%), disks are free (99%), GPU is free (60%), RAM is free (62%), my computer is not pushed at limit during the encoding process.  Why ????  Is there some time delay in the encoding process ?
    Other : Quadro 6000 & GTX 680 gives the same result !
    (picture 3)
    PPBM5 (Disk Test) Result (RAID LSI)
    I rendered the sequence (Disk Test) using Adobe Media Encoder on my RAID 0 LSI disk.
    The result :
    My CPU is not used at 100%
    My Disk wave and wave again, but far far from the limit !
    All the process usage are idle except process of (Adobe Media Encoder)
    The transfert rate wave and wave again (up and down).  Probably caused by (Buffering time....  write.... Buffering time.... write...)  // It's ok, ~375Mb/sec peak during transfert rate !  Easy !
    CPU Power management give 100% of clock to CPU during the encoding process (it's ok, the clock is stable during process).
    RAM, more than enough !  40.5 Go RAM free after the test !  // Excellent
    ~48 thread opened by Adobe Media Encoder (Good, thread is the sign that program try to using many cores !)
    GPU Load on card = 0 (This kind of encoding is GPU irrelevant)
    GPU Ram get 400Mb of RAM (No usage for encoding)
    Comment/Question : CPU is free (65%), disks are free (60%), GPU is free (100%), RAM is free (63%), my computer is not pushed at limit during the encoding process.  Why ????  Is there some time delay in the encoding process ?
    (picture 4)
    PPBM5 (Disk Test) Result (Direct in RAMDrive)
    I rendered the same sequence (Disk Test) using Adobe Media Encoder directly in my RamDrive
    Comment/Question : Look at the transfert rate under (picture 5).  It's exactly the same speed than with my RAID 0 LSI controller.  Impossible !  Look in the same picture the transfert rate I can reach with the ramdrive (> 3.0 Gb/sec steady) and I don't go under 30% of disk usage.  CPU is idle (70%), Disk is idle (100%), GPU is idle (100%) and RAM is free (63%).  // This kind of results let me REALLY confused.  It's smell bug and big problem with hardware and IO usage in CS6 !
    (picture 5)
    PPBM5 (MPEG-DVD) Result
    I rendered the sequence (MPEG-DVD) using Adobe Media Encoder.
    The result :
    My CPU is not used at 100%
    My Disk is totally idle !
    All the process usage are idle except process of (Adobe Media Encoder)
    The transfert rate wave and wave again (up and down).  Probably caused by (Encoding time....  write.... Encoding time.... write...)  // It's ok, ~2Mb/sec during transfert rate !  Real Joke !
    CPU Power management give 100% of clock to CPU during the encoding process (it's ok, the clock is stable during process).
    RAM, more than enough !  40 Go RAM free after the test !  // Excellent
    ~80 thread opened by Adobe Media Encoder (Lot of thread, but it's ok in multi-thread apps!)
    GPU Load on card = 100 (This use the maximum of my GPU)
    GPU Ram get 1Gb of RAM
    Comment/Question : CPU is free (70%), disks are free (98%), GPU is loaded (MAX), RAM is free (63%), my computer is pushed at limit during the encoding process for GPU only.  Now, for this kind of encoding, the speed limit is affected by the slower IO (Video Card GPU)
    Other : Quadro 6000 is slower than GTX 680 for this kind of encoding (~20 s slower than GTX).
    (picture 6)
    Encoding single clip FULL HD AVCHD to H.264 Result (Premiere Pro CS6)
    You can look the result in the picture.
    Comment/Question : CPU is free (55%), disks are free (99%), GPU is free (90%), RAM is free (65%), my computer is not pushed at limit during the encoding process.  Why ????   Adobe Premiere seem to have some bug with thread management.  My hardware is idle !  I understand AVCHD can be very difficult to decode, but where is the waste ?  My computer want, but the software not !
    (picture 7)
    Render composition using 3D Raytracer in After Effects CS6
    You can look the result in the picture.
    Comment : GPU seems to be the bottle neck when using After Effects.  CPU is free (99%), Disks are free (98%), Memory is free (60%) and it depend of the setting and type of project.
    Other : Quadro 6000 & GTX 680 gives the same result in time for rendering the composition.
    (picture 8)
    Conclusion
    There is nothing you can do (I thing) with CS6 to get better performance actually.  GTX 680 is the best (Consumer grade card) and the Quadro 6000 is the best (Profressional card).  Both of card give really similar result (I will probably return my GTX 680 since I not really get any better performance).  I not used Tesla card with my Quadro, but actually, both, Premiere Pro & After Effects doesn't use multi GPU.  I tried to used both card together (GTX & Quadro), but After Effects gives priority to the slower card (In this case, the GTX 680)
    Premiere Pro, I'm speechless !  Premiere Pro is not able to get max performance of my computer.  Not just 10% or 20%, but average 60%.  I'm a programmor, multi-threadling apps are difficult to manage and I can understand Adobe's programmor.  But actually, if anybody have comment about this post, tricks or any kind of solution, you can comment this post.  It's seem to be a bug...
    Thank you.

    Patrick,
    I can't explain everything, but let me give you some background as I understand it.
    The first issue is that CS6 has a far less efficient internal buffering or caching system than CS5/5.5. That is why the MPEG encoding in CS6 is roughly 2-3 times slower than the same test with CS5. There is some 'under-the-hood' processing going on that causes this significant performance loss.
    The second issue is that AME does not handle regular memory and inter-process memory very well. I have described this here: Latest News
    As to your test results, there are some other noteworthy things to mention. 3D Ray tracing in AE is not very good in using all CUDA cores. In fact it is lousy, it only uses very few cores and the threading is pretty bad and does not use the video card's capabilities effectively. Whether that is a driver issue with nVidia or an Adobe issue, I don't know, but whichever way you turn it, the end result is disappointing.
    The overhead AME carries in our tests is something we are looking into and the next test will only use direct export and no longer the AME queue, to avoid some of the problems you saw. That entails other problems for us, since we lose the capability to check encoding logs, but a solution is in the works.
    You see very low GPU usage during the H.264 test, since there are only very few accelerated parts in the timeline, in contrast to the MPEG2-DVD test, where there is rescaling going on and that is CUDA accelerated. The disk I/O test suffers from the problems mentioned above and is the reason that my own Disk I/O results are only 33 seconds with the current test, but when I extend the duration of that timeline to 3 hours, the direct export method gives me 22 seconds, although the amount of data to be written, 37,092 MB has increased threefold. An effective write speed of 1,686 MB/s.
    There are a number of performance issues with CS6 that Adobe is aware of, but whether they can be solved and in what time, I haven't the faintest idea.
    Just my $ 0.02

  • Performance Issue for BI system

    Hello,
    We are facing performance issues for BI System. Its a preproductive system and its performance is degrading badly everyday. I was checking system came to know program buffer hit ratio is increaasing everyday due to high Swaps. So asked to change the parameter abap/buffersize which was 300Mb to 500Mb. But still no major improvement is found in the system.
    There is 16GB Ram available and Server is HP-UX and with Netweaver2004s with Oracle 10.2.0.4.0 installed in it.
    The Main problem is while running a report or creating a query is taking way too long time.
    Kindly help me.

    Hello SIva,
    Thanks for your reply but i have checked ST02 and ST03 and also SM50 and its normal
    we are having 9 dialog processes, 3 Background , 2 Update and 1 spool.
    No one is using the system currently but in ST02 i can see the swaps are in red.
    Buffer                 HitRatio   % Alloc. KB  Freesp. KB   % Free Sp.   Dir. Size  FreeDirEnt   % Free Dir    Swaps    DB Accs
    Nametab (NTAB)                                                                                0
       Table definition     99,60     6.798                                                   20.000                                            29.532    153.221
       Field definition     99,82      31.562        784                 2,61           20.000      6.222          31,11          17.246     41.248
       Short NTAB           99,94     3.625      2.446                81,53          5.000        2.801          56,02             0            2.254
       Initial records      73,95        6.625        998                 16,63          5.000        690             13,80             40.069     49.528
                                                                                    0
    boldprogram                97,66     300.000     1.074                 0,38           75.000     67.177        89,57           219.665    725.703bold
    CUA                    99,75         3.000        875                   36,29          1.500      1.401          93,40            55.277      2.497
    Screen                 99,80         4.297      1.365                 33,35          2.000      1.811          90,55              119         3.214
    Calendar              100,00       488            361                  75,52            200         42              21,00               0            158
    OTR                   100,00         4.096      3.313                  100,00        2.000      2.000          100,00              0
                                                                                    0
    Tables                                                                                0
       Generic Key          99,17    29.297      1.450                  5,23           5.000        350             7,00             2.219      3.085.633
       Single record        99,43    10.000      1.907                  19,41           500         344            68,80              39          467.978
                                                                                    0
    Export/import          82,75     4.096         43                      1,30            2.000        662          33,10            137.208
    Exp./ Imp. SHM         89,83     4.096        438                    13,22         2.000      1.482          74,10               0    
    SAP Memory      Curr.Use %    CurUse[KB]    MaxUse[KB]    In Mem[KB]    OnDisk[KB]    SAPCurCach      HitRatio %
    Roll area               2,22                5.832               22.856             131.072     131.072                   IDs           96,61
    Page area              1,08              2.832                24.144               65.536    196.608              Statement     79,00
    Extended memory     22,90       958.464           1.929.216          4.186.112          0                                         0,00
    Heap memory                                    0                  0                    1.473.767          0                                         0,00
    Call Stati             HitRatio %     ABAP/4 Req      ABAP Fails     DBTotCalls         AvTime[ms]      DBRowsAff.
      Select single     88,59               63.073.369        5.817.659      4.322.263             0                         57.255.710
      Select               72,68               284.080.387          0               13.718.442             0                        32.199.124
      Insert                 0,00                  151.955             5.458             166.159               0                           323.725
      Update               0,00                    378.161           97.884           395.814               0                            486.880
      Delete                 0,00                    389.398          332.619          415.562              0                             244.495
    Edited by: Srikanth Sunkara on May 12, 2011 11:50 AM

  • RE: Case 59063: performance issues w/ C TLIB and Forte3M

    Hi James,
    Could you give me a call, I am at my desk.
    I had meetings all day and couldn't respond to your calls earlier.
    -----Original Message-----
    From: James Min [mailto:jminbrio.forte.com]
    Sent: Thursday, March 30, 2000 2:50 PM
    To: Sharma, Sandeep; Pyatetskiy, Alexander
    Cc: sophiaforte.com; kenlforte.com; Tenerelli, Mike
    Subject: Re: Case 59063: performance issues w/ C TLIB and Forte 3M
    Hello,
    I just want to reiterate that we are very committed to working on
    this issue, and that our goal is to find out the root of the problem. But
    first I'd like to narrow down the avenues by process of elimination.
    Open Cursor is something that is commonly used in today's RDBMS. I
    know that you must test your query in ISQL using some kind of execute
    immediate, but Sybase should be able to handle an open cursor. I was
    wondering if your Sybase expert commented on the fact that the server is
    not responding to commonly used command like 'open cursor'. According to
    our developer, we are merely following the API from Sybase, and open cursor
    is not something that particularly slows down a query for several minutes
    (except maybe the very first time). The logs show that Forte is waiting for
    a status from the DB server. Actually, using prepared statements and open
    cursor ends up being more efficient in the long run.
    Some questions:
    1) Have you tried to do a prepared statement with open cursor in your ISQL
    session? If so, did it have the same slowness?
    2) How big is the table you are querying? How many rows are there? How many
    are returned?
    3) When there is a hang in Forte, is there disk-spinning or CPU usage in
    the database server side? On the Forte side? Absolutely no activity at all?
    We actually have a Sybase set-up here, and if you wish, we could test out
    your database and Forte PEX here. Since your queries seems to be running
    off of only one table, this might be the best option, as we could look at
    everything here, in house. To do this:
    a) BCP out the data into a flat file. (character format to make it portable)
    b) we need a script to create the table and indexes.
    c) the Forte PEX file of the app to test this out.
    d) the SQL staement that you issue in ISQL for comparison.
    If the situation warrants, we can give a concrete example of
    possible errors/bugs to a developer. Dial-in is still an option, but to be
    able to look at the TOOL code, database setup, etc. without the limitations
    of dial-up may be faster and more efficient. Please let me know if you can
    provide this, as well as the answers to the above questions, or if you have
    any questions.
    Regards,
    At 08:05 AM 3/30/00 -0500, Sharma, Sandeep wrote:
    James, Ken:
    FYI, see attached response from our Sybase expert, Dani Sasmita. She has
    already tried what you suggested and results are enclosed.
    ++
    Sandeep
    -----Original Message-----
    From: SASMITA, DANIAR
    Sent: Wednesday, March 29, 2000 6:43 PM
    To: Pyatetskiy, Alexander
    Cc: Sharma, Sandeep; Tenerelli, Mike
    Subject: Re: FW: Case 59063: Select using LIKE has performance
    issues
    w/ CTLIB and Forte 3M
    We did that trick already.
    When it is hanging, I can see what is doing.
    It is doing OPEN CURSOR. But not clear the exact statement of the cursor
    it is trying to open.
    When we run the query directly to Sybase, not using Forte, it is clearly
    not opening any cursor.
    And running it directly to Sybase many times, the response is always
    consistently fast.
    It is just when the query runs from Forte to Sybase, it opens a cursor.
    But again, in the Forte code, Alex is not using any cursor.
    In trying to capture the query,we even tried to audit any statementcoming
    to Sybase. Same thing, just open cursor. No cursor declaration anywhere.==============================================
    James Min
    Technical Support Engineer - Forte Tools
    Sun Microsystems, Inc.
    1800 Harrison St., 17th Fl.
    Oakland, CA 94612
    james.minsun.com
    510.869.2056
    ==============================================
    Support Hotline: 510-451-5400
    CUSTOMERS open a NEW CASE with Technical Support:
    http://www.forte.com/support/case_entry.html
    CUSTOMERS view your cases and enter follow-up transactions:
    http://www.forte.com/support/view_calls.html

    Earthlink wrote:
    Contrary to my understanding, the <font face="courier">with_pipeline</font> procedure runs 6 time slower than the legacy <font face="courier">no_pipeline</font> procedure. Am I missing something? Well, we're missing a lot here.
    Like:
    - a database version
    - how did you test
    - what data do you have, how is it distributed, indexed
    and so on.
    If you want to find out what's going on then use a TRACE with wait events.
    All nessecary steps are explained in these threads:
    HOW TO: Post a SQL statement tuning request - template posting
    http://oracle-randolf.blogspot.com/2009/02/basic-sql-statement-performance.html
    Another nice one is RUNSTATS:
    http://asktom.oracle.com/pls/asktom/ASKTOM.download_file?p_file=6551378329289980701

  • Is there a recommended limit on the number of custom sections and the cells per table so that there are no performance issues with the UI?

    Is there a recommended limit on the number of custom sections and the cells per table so that there are no performance issues with the UI?

    Thanks Kelly,
    The answers would be the following:
    1200 cells per custom section (NEW COUNT), and up to 30 custom sections per spec.
    Assuming all will be populated, and this would apply to all final material specs in the system which could be ~25% of all material specs.
    The cells will be numeric, free text, drop downs, and some calculated numeric.
    Are we reaching the limits for UI performance?
    Thanks

  • IOS 8.1+ Performance Issue

    Hello,
    I encountered a serious performance bug in Adobe Air iOS application on devices running iOS 8.1 or later. Approximately in 1-2 minutes fps drops to 7 or lower without interacting with the app. This is very noticeable in the app. The app looks like frozen for about 0.5 seconds. The bug doesn't appear on every session.
    Devices tested: iPad Mini iOS 8.1.1, iPhone 6 iOS 8.2. iPod Touch 4 iOS 6 is working correctly.
    Air SDK versions: 15 and 17 tested.
    I can track the bug using Adobe Scout. There is a noticeable spike on frame time 1.16. Framerate drops to 7.0. The App spends much time on function Runtime overhead. Sometimes the top activity is Running AS3 attached to frame or Waiting For Next Frame instead of Runtime overhead.
    The bug can be reproduced on an empty application having a one bitmap on stage. Open the app and wait for two minutes and the bug should appear. If not, just close and relaunch the app.
    Bugbase link: Bug#3965160 - iOS 8.1+ Performance Issue
    Miska Savela

    Hi
    Id already activated Messages and entered the 6 digit code I was presented with into my iPhone. I can receive txt messages from non iOS users on my iMac and can reply to those messages.
    I just can't send a new message from scratch to a non iOS user :-s
    Thanks
    Baz

  • Returning multiple values from a called tabular form(performance issue)

    I hope someone can help with this.
    I have a form that calls another form to display a multiple column tabular list of values(needs to allow for user sorting so could not use a LOV).
    The user selects one or more records from the list by using check boxes. In order to detect the records selected I loop through the block looking for boxes checked off and return those records to the calling form via a PL/SQL table.
    The form displaying the tabular list loads quickly(about 5000 records in the base table). However when I select one or more values from the table and return back to the calling form, it takes a while(about 3-4 minutes) to return to the called form with the selected values.
    I guess it is going through the block(all 5000 records) looking for boxes checked off and that is what is causing the noticeable pause.
    Is this normal given the data volumes I have or are there any other perhaps better techniques or tricks I could use to improve performance. I am using Forms6i.
    Sorry for being so long-winded and thanks in advance for any help.

    Try writing to your PL/SQL table when the user selects (or remove when deselect) by usuing a when-checkbox-changed trigger. This will eliminate the need for you top loop through a block with 5000 records and should improve your performance.
    I am not aware of any performance issues with PL/SQL tables in forms, but if you still have slow performance try using a shared record-group instead. I have used these in the past for exactly the same thing and had no performance problems.
    Hope this helps,
    Candace Stover
    Forms Product Management

  • Performance issues with class loader on Windows server

    We are observing some performance issues in our application. We are Using weblogic 11g with Java6 on a windows 2003 server
    The thread dumps indicate many threads are waiting in queue for the native file methods:
    "[ACTIVE] ExecuteThread: '106' for queue: 'weblogic.kernel.Default (self-tuning)'" RUNNABLE
         java.io.WinNTFileSystem.getBooleanAttributes(Native Method)
         java.io.File.exists(Unknown Source)
         weblogic.utils.classloaders.ClasspathClassFinder.getFileSource(ClasspathClassFinder.java:398)
         weblogic.utils.classloaders.ClasspathClassFinder.getSourcesInternal(ClasspathClassFinder.java:347)
         weblogic.utils.classloaders.ClasspathClassFinder.getSource(ClasspathClassFinder.java:316)
         weblogic.application.io.ManifestFinder.getSource(ManifestFinder.java:75)
         weblogic.utils.classloaders.MultiClassFinder.getSource(MultiClassFinder.java:67)
         weblogic.application.utils.CompositeWebAppFinder.getSource(CompositeWebAppFinder.java:71)
         weblogic.utils.classloaders.MultiClassFinder.getSource(MultiClassFinder.java:67)
         weblogic.utils.classloaders.MultiClassFinder.getSource(MultiClassFinder.java:67)
         weblogic.utils.classloaders.CodeGenClassFinder.getSource(CodeGenClassFinder.java:33)
         weblogic.utils.classloaders.GenericClassLoader.findResource(GenericClassLoader.java:210)
         weblogic.utils.classloaders.GenericClassLoader.getResourceInternal(GenericClassLoader.java:160)
         weblogic.utils.classloaders.GenericClassLoader.getResource(GenericClassLoader.java:182)
         java.lang.ClassLoader.getResourceAsStream(Unknown Source)
         javax.xml.parsers.SecuritySupport$4.run(Unknown Source)
         java.security.AccessController.doPrivileged(Native Method)
         javax.xml.parsers.SecuritySupport.getResourceAsStream(Unknown Source)
         javax.xml.parsers.FactoryFinder.findJarServiceProvider(Unknown Source)
         javax.xml.parsers.FactoryFinder.find(Unknown Source)
         javax.xml.parsers.DocumentBuilderFactory.newInstance(Unknown Source)
         org.ajax4jsf.context.ResponseWriterContentHandler.<init>(ResponseWriterContentHandler.java:48)
         org.ajax4jsf.context.ViewResources$HeadResponseWriter.<init>(ViewResources.java:259)
         org.ajax4jsf.context.ViewResources.processHeadResources(ViewResources.java:445)
         org.ajax4jsf.application.AjaxViewHandler.renderView(AjaxViewHandler.java:193)
         org.apache.myfaces.lifecycle.RenderResponseExecutor.execute(RenderResponseExecutor.java:41)
         org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:140)
    On googling this seems to be an issue with java file handling on windows servers and I couldn't find a solution yet. Any recommendation or pointer is appreciated

    Hi shubhu,
    I just analyzed your partial Thread Dump data, the problem is that the ajax4jsf framework ResponseWriterContentHandler triggers internally a new instance of the DocumentBuilderFactory; every time; triggering heavy IO contention because of Class loader / JAR file search operations.
    Too many of these IO operations under heavy load will create excessive contention and severe performance degradation; regardless of the OS you are running your JVM on.
    Please review the link below and see if this is related to your problem.. This is a known issue in JBOSS JIRA when using RichFaces / ajaxJSF.
    https://issues.jboss.org/browse/JBPAPP-6166
    Regards,
    P-H
    http://javaeesupportpatterns.blogspot.com/

  • Performance issues with flashed 7800GT (G5)

    Hey,
    I recently flashed a PC 7800GT with the 128K OEM NVidia ROM. It's one of the cards with a physical 128K ROM chip, so no worries there. However, it doesn't deliver the performance I expected. I have a Late 2005 2.0 DC, 10GB DDR2 and use Leopard 10.5.8.
    This is what OS X puts out (german):
    NVIDIA GeForce 7800 GT:
      Chipsatz-Modell:    GeForce 7800GT
      Typ:    Monitor
      Bus:    PCIe
      Steckplatz:    SLOT-1
      PCIe-Lane-Breite:    x16
      VRAM (gesamt):    256 MB
      Hersteller:    NVIDIA (0x10de)
      Geräte-ID:    0x0092
      Versions-ID:    0x00a1
      ROM-Version:    2152.2
    Performance issues are: I can't seem to reach frame rates that are anywhere near the results provided by barefeats. Quake 3 runs with approx 200fps in 1600x1200x32 (I expected 300+ fps), Quake 4 and UT2004 run okay, but not on high settings with high resolutions. So, not equivalent to what you wouldd expect from the system's specs) Same goes for Colin McRae Rallye. Now, I remember reading about performance issues in 10.5.8 with the flashed ROM since it doesn't seem to be a 1:1 copy of the original one. I didn't try it in Tiger since I don't exactly want to go back from Leopard. Am I right that this is probably an issue of the "OEM ROM" (from the macelite)? Does anyone have the real deal in terms of 7800GT ROMs and could provide me with a link?
    Br

    Hi-
    If you send me an email via my website, I can send you a couple of ROMs that might work better.
    http://www.jcsenterprises.com/Japamacs_Page/All_Things_PPC.html
    Problem with the flashed 256 MB GT, though, is that Leopard runs slow.
    Bad driver interaction.....
    The 512 MB GTX is the way to go........

  • Performance Issues with 10.6.7 and External USB Drives

    I've had a few performance issues come up with the latest 10.6.7 that seem to be related to external USB drives. I have a 2TB USB drive tha I have my iMovie content on this drive and after 10.6.7 update, iMovie is almost unusable. Finder even seems slow when browsing files on this drive as well. It seems like any access to the drive is delayed in all applications. Before the update, the performance was acceptable, but now it almost unusable. Most of the files on this drive are large dv files.
    Anyone else experience this?

    Matt,
    If you want help, please start your own thread here:
    http://discussions.apple.com/forum.jspa?forumID=1339&start=0
    And if your previous thread you aren't getting sufficient help for your iPhone, post a new topic here:
    http://discussions.apple.com/forum.jspa?forumID=1139
    You'll get a wider audience, and won't confuse the original poster. Performance issues can be caused by numerous issues as outlined in my FAQ*
    http://www.macmaps.com/Macosxspeed.html
    If every person who had a performance issue posted to this thread, we'd never find a solution for the initial poster. Let's isolate each case one by one. It is NOT necessarily the same issue, even if the symptoms are the same. There are numerous contributing factors at work with computers, and if we don't isolate them, we'll never get to the root cause.

  • Performance issues with LOV bindings in 3-tier BC4J architecture

    We are running BC4J and JClient (Jdeveloper 9.0.3.4/9iAS 9.0.2) in a 3-tier architecture, and have problems with the performance.
    One of our problems are comboboxes with LOV bindings. The view objects that provides data for the LOV bindings contains simple queries from tables with only 4-10 rows, and there are no view links or entity objects to these views.
    To create the LOV binding and to set the model for the combobox takes about 1 second for each combobox.
    We have tried most of tips in http://otn.oracle.com/products/jdev/tips/muench/jclientperf/index.html, but they do not seem to help on our problem.
    The performance is OK (if not great) when the same code is running as 2-tier.
    Does anyone have any good suggestions?

    I can recommend that you look at the following two bugs in Metalink: Bug 2640945 and Bug 3621502
    They are related to the disabling of the TCP socket-level acknowledgement which slows down remote communications for EJB components using ORMI (the protocol used by Oracle OC4J) to communicate between remote EJB client and server.
    A BC4J Application Module deployed as an EJB suffers this same network latency penalty due to the TCP acknowledgement.
    A customer sent me information (that you'll see there as a part of Bug# 3621502) like this on a related issue:
    We found our application runs very slow in 3-Tier mode (JClient, BC4J deployed
    as EJB Session Bean on 9iAS server 9.0.2 enterprise edition). We spent a lot
    of time to tune up our codes but that helped very little. Eventually, we found
    the problem seemed to happen on TCP level. There is a 200ms delay in TCP
    level. After we read some documents about Nagle Algorithm,  we disabled a
    registry key (TcpDelAckTicks) in windows2000  on both client and server. This
    makes our program a lot faster.
    Anyway, we think we should provide our clients a better solution other than
    changing windows registry for them, for example, there may be a way to disable
    that Nagle's algorithm through java.net.Socket.setTcpNoDelay(true), in BC4J,
    or anywhere in our codes. We have not figured out yet.
    Bug 2640945 was fixed in Oracle Application Server 10g (v9.0.4) and it now disables this TCP Acknowledgement on the server side in that release. In the BugDB, I see backport patches available for earlier 9.0.3 and 9.0.2 releases of IAS as well.
    Bug 3621502 is requesting that that same disabling also be performed on the client side by the ORMI code. I have received a test patch from development to try out, but haven't had the chance yet.
    The customer's workaround in the interim was to disable this TCP Acknowledgement at the OS level by modifying a Windows registry setting as noted above.
    See Also http://support.microsoft.com/default.aspx?kbid=328890
    "New registry entry for controlling the TCP Acknowledgment (ACK) behavior in Windows XP and in Windows Server 2003" which documents that the registry entry to change disable this acknowledgement has a different name in Windows XP and Windows 2003.
    Hope this info helps. It would be useful to hear back from you on whether this helps your performance issue.

  • Performance issues with dynamic action (PL/SQL)

    Hi!
    I'm having perfomance issues with a dynamic action that is triggered on a button click.
    I have 5 drop down lists to select columns which the users want to filter, 5 drop down lists to select an operation and 5 boxes to input values.
    After that, there is a filter button that just submits the page based on the selected filters.
    This part works fine, the data is filtered almost instantaneously.
    After this, I have 3 column selectors and 3 boxes where users put values they wish to update the filtered rows to,
    There is an update button that calls the dynamic action (procedure that is written below).
    It should be straight out, the only performance issue could be the decode section, because I need to cover cases when user wants to set a value to null (@) and when he doesn't want update 3 columns, but less (he leaves '').
    Hence P99_X_UC1 || ' = decode('  || P99_X_UV1 ||','''','|| P99_X_UC1  ||',''@'',null,'|| P99_X_UV1  ||')
    However when I finally click the update button, my browser freezes and nothing happens on the table.
    Can anyone help me solve this and improve the speed of the update?
    Regards,
    Ivan
    P.S. The code for the procedure is below:
    create or replace
    PROCEDURE DWP.PROC_UPD
    (P99_X_UC1 in VARCHAR2,
    P99_X_UV1 in VARCHAR2,
    P99_X_UC2 in VARCHAR2,
    P99_X_UV2 in VARCHAR2,
    P99_X_UC3 in VARCHAR2,
    P99_X_UV3 in VARCHAR2,
    P99_X_COL in VARCHAR2,
    P99_X_O in VARCHAR2,
    P99_X_V in VARCHAR2,
    P99_X_COL2 in VARCHAR2,
    P99_X_O2 in VARCHAR2,
    P99_X_V2 in VARCHAR2,
    P99_X_COL3 in VARCHAR2,
    P99_X_O3 in VARCHAR2,
    P99_X_V3 in VARCHAR2,
    P99_X_COL4 in VARCHAR2,
    P99_X_O4 in VARCHAR2,
    P99_X_V4 in VARCHAR2,
    P99_X_COL5 in VARCHAR2,
    P99_X_O5 in VARCHAR2,
    P99_X_V5 in VARCHAR2,
    P99_X_CD in VARCHAR2,
    P99_X_VD in VARCHAR2
    ) IS
    l_sql_stmt varchar2(32600);
    p_table_name varchar2(30) := 'DWP.IZV_SLOG_DET'; 
    BEGIN
    l_sql_stmt := 'update ' || p_table_name || ' set '
    || P99_X_UC1 || ' = decode('  || P99_X_UV1 ||','''','|| P99_X_UC1  ||',''@'',null,'|| P99_X_UV1  ||'),'
    || P99_X_UC2 || ' = decode('  || P99_X_UV2 ||','''','|| P99_X_UC2  ||',''@'',null,'|| P99_X_UV2  ||'),'
    || P99_X_UC3 || ' = decode('  || P99_X_UV3 ||','''','|| P99_X_UC3  ||',''@'',null,'|| P99_X_UV3  ||') where '||
    P99_X_COL  ||' '|| P99_X_O  ||' ' || P99_X_V  || ' and ' ||
    P99_X_COL2 ||' '|| P99_X_O2 ||' ' || P99_X_V2 || ' and ' ||
    P99_X_COL3 ||' '|| P99_X_O3 ||' ' || P99_X_V3 || ' and ' ||
    P99_X_COL4 ||' '|| P99_X_O4 ||' ' || P99_X_V4 || ' and ' ||
    P99_X_COL5 ||' '|| P99_X_O5 ||' ' || P99_X_V5 || ' and ' ||
    P99_X_CD   ||       ' = '         || P99_X_VD ;
    --dbms_output.put_line(l_sql_stmt); 
    EXECUTE IMMEDIATE l_sql_stmt;
    END;

    Hi Ivan,
    I do not think that the decode is performance relevant. Maybe the update hangs because some other transaction has uncommitted changes to one of the affected rows or the where clause is not selective enough and needs to update a huge amount of records.
    Besides that - and I might be wrong, because I only know some part of your app - the code here looks like you have a huge sql injection vulnerability here. Maybe you should consider re-writing your logic in static sql. If that is not possible, you should make sure that the user input only contains allowed values, e.g. by white-listing P99_X_On (i.e. make sure they only contain known values like '=', '<', ...), and by using dbms_assert.enquote_name/enquote_literal on the other P99_X_nnn parameters.
    Regards,
    Christian

  • Performance Issues with Acrobat Reader 11.0.0.2 when secure mode is enabled

    Hello All,
    We are experiencing sporadic issues with Acrobat 11.0.0.2 across our domain, users are reporting performance issues when opening PDF documents whether locally or from a network share.
    We have found that turning off Secure Mode helps towards reducing this delay and in the cases it doesn't we are repairing the installation and/or reinstalling the application.
    Due to the security implications we need to leave this turned on, I am wondering if anyone has encountered this issue and what steps were taken towards resolving it?
    I also wonder whether the white list function in the new release 11.0.0.3 would be a solution to this issue?
    Kind Regards,
    Ryan McCarty

    No probelm, so....
    We had no problems with Adobe Reader 9 and 10, we encountered the issues when upgrading to 11.0.0.2.
    Initially we found that turning off the Protected Mode, helped but did not resolve the issue.
    We tried;
    1. Turn off protected mode - issue still present
    2. Clearing the recent file registry using the below registry path and deleting the keys underneath it.
    HKEY_CURRENT_USER\Software\Adobe\Acrobat Reader\11.0\AVGeneral\cRecentFiles (this does not turn recent files off permanently). - works but needs clearing regularly
    3. Turning off welcome screen by creating -  HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Adobe\Acrobat Reader\11.0\FeatureLockDown\cWelcomeScreen - works to improve app open speed.
    4. uninstall/reinstall of 11.0.0.2 - works most likley due to the recent files being cleared.
    5. upgrade to 11.0.0.3 - issue still present
    Following reboots the issue is still present.
    When Adobe Reader is the only application open this issue is still present.
    As mentioned I have no systems available which I could test this issue using 11.0.0.1 as we have fixed them, albeit temporarily using the reinstall method.
    I am concious that this issue is going to reoccur once that cache (recent files) builds back up because the fix above (#2) is clearing the recent files cache NOT disabling it.

Maybe you are looking for

  • File Dialog not appearing in web form after Note:74140.1

    Hello, I have implemented the source given in Note:74140.1 to replace the get_file_name function that displays the file dialog box. However I still am not able to see the dialog that the JavaBean should display. I am relativly new at linking JavaBean

  • Site layout and color looks different in each browser

    I created a site.  When I preview the site in firefox it is just the way   I created it in dreamweaver cs5, but when I preview it in IE the   background color is not the pinkish color I used, it is black and the   subheading is crunched up to the lef

  • How to use JButton as a JTable column header?

    I'd like to use JButtons as my JTable's column headers. I built a JButton subclass which implemented TableCellRenderer and passed it to one of my table column's setHeaderRender method. The resulting header is a component that looks like a JButton but

  • Batchload pictures in Keynote '09

    PowerPoint allows the user to batch load a whole bunch of pictures into a presentation as individual slides. If I want to do this with Keynote'09 how do I go about doing it?

  • My iPhoto won't quit or open!

    I need to restart my computer, but the application running is interfering with the restart process. I've tried to open the program and also force quit, neither will work. I tried reading some posts about the same issue, but the only solutions include