XML to Binary Performance Issues

All -
I'm in the process of trying to convince a client to move toward WLI for their workflow needs. One major function of their business is the transformation of binary files to XML. These binary files are typically pipe-delimited with 22 fields per line. I defined a Message Format using Format Builder that maps each field to an element. Using the runtime libraries, it takes 190 seconds to transform a 2MB file from binary to XML, on a P4 1.8GHz with 512MB RAM. The same process takes 56 seconds using Microsoft's BizTalk server.
Does anyone have any insight into the poor performance I am seeing? Any help is greatly appreciated.

Hi ,
Login to Topology Manager ---> Physical architecture tab ----> Expand technologies ---->Expand Sunopsis Engine ----- > Open SUNOPSIS_MEMORY_ENGINE ----> Goto context tab
If you do not have Global context mapped with the Logical schema then map it by going to Logical architecture tab ----> Expand technologies ---->Expand Sunopsis Engine ----- > rigth click and select insert logical schema ----> give a name for that logical schema and associate it with a context and physical schema .
Thanks,
Sutirtha

Similar Messages

  • Performance Issues with large XML (1-1.5MB) files

    Hi,
    I'm using an XML Schema based Object relational storage for my XML documents which are typically 1-1.5 MB in size and having serious performance issues with XPath Query.
    When I do XPath query against an element of SQLType varchar2, I get a good performance. But when I do a similar XPath query against an element of SQLType Collection (Varray of varchar2), I get a very ordinary performance.
    I have also created indexes on extract() and analyzed my XMLType table and indexes, but I have no performance gain. Also, I have tried all sorts of storage options available for Collections ie. Varray's, Nested Tables, IOT's, LOB's, Inline, etc... and all these gave me same bad performance.
    I even tried creating XMLType views based on XPath queries but the performance didn't improve much.
    I guess I'm running out of options and patience as well.;)
    I would appreciate any ideas/suggestions, please help.....
    Thanks;
    Ramakrishna Chinta

    Are you having similar symptoms as I am? http://discussions.apple.com/thread.jspa?threadID=2234792&tstart=0

  • Performance issues with FDK in large XML documents

    In my current project with FrameMaker 8 I'm experiencing severe performance issues with some FDK API calls.
    The documents are about 3-8 MBytes in size. Fortmatted they cover 150-250 pages.
    When importing such an XML document I do some extensive "post-processing" using FDK. This processing happens in Sr_EventHandler() during the SR_EVT_END_READER event. I noticed that some FDK functions calls which modify the document's structure, like F_ApiSetAttribute() or F_ApiNewElementInHierarchy(), take several seconds, for the larger documents even minutes, to complete one single function call. I tried to move some of these calls to earlier events, mostly to SR_EVT_END_ELEM. There the calls work without a delay. Unfortunately I can't rewrite the FDK client to move all the calls that are lagging to earlier events.
    Does anybody have a clue why such delays happen, and possibly can make a suggestion, how to solve this issue? Thank you in advance.
    PS: I already thought of splitting such a document in smaller pieces by using the FrameMaker book function. But I don't think, the structure of the documents will permit such an automatic split, and it definitely isn't an option to change the document structure (the project is about migrating documents from Interleaf to XML with the constraint of keeping the document layout identical).

    FP_ApplyFormatRules sounds really good--I'll give it a try on Monday. Wonder how I could miss it, as I already tried FP_Reformatting and FP_Displaying at no avail?! By the way, what is actually meant with FP_Reformatting (when I used it I assumed it would do exactly what FP_ApplyFormatRules sounds to do), or is that one another of Lynne's well-kept secrets?
    Thank's for all the helpful suggestions, guys. On Friday I already had my first improvements in a test version of my client: I did some (not all necessary) structural changes using XSLT pre-processing, and processing went down from 8 hours(!) to 1 hour--Yeappie! I was also playing with the idea of writing a wrapper to F_ApiNewElementInHierarchy() which actually pastes an appropriate element created in a small flow on the reference pages at the intended insertion location. But now, with FP_ApplyFormatRules on the horizon, I'm quite confident to get even the complicated stuff under control, which cannot be handled by the XSLT pre-processing, as it is based on the actual formatting of the document at run-time and cannot be anticipated in pre-processing.
    --Franz

  • 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 respect scheme registration,select & insert query

    I am facing performance issues with respect to schema registration,Select & insert query towards 10.2.0.3 version.It is taking around 45 minutes to register schema and it is taking around 5 min to insert a single document into xml db where as it was taking less than min to insert a single document into xml db of 9.2.0.6 version.Would like to know the issue and solution to resolve this issue.Please help me out on this as it is very urgent for me

    Since it appears that this is an XML DB specific question, you're probably better off posting in the XML DB. The folks over there have much more experience with the ins and outs of that particular product.
    Justin

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

  • Performance issue with Jdeveloper

    Hi Guys,
    I am experiencing strange performance issue with Jdeveloper 10.1.3.3.0.4157. There are many other threads regarding the performance issue in this forum, but the problem I have is a little bit different.
    I have two computers: one is Athlon 3200+ with Vista and another one is P4 dual core 6400 with XP (service pack 2). Both of them have 2GB memory.
    I am running the same simple project on both computer, but only the one with Vista has the problem. The problem is very similar to the problem mentioned in the thread:
    Re: IDE has become extremely slow?
    But it's much worse. It only happens only on JSF pages. Basically, any operations on the JSF pages are very slow. Loading the page, changing the attributes of a button in source editor, or even clicking the items in the design view take forever to run.
    The first weird thing is that it may use 100% CPU, but it never recover, which means the 100% CPU usage never stops or when it stops, the Jdeveloper stops responding.
    The second weird thing is that the project is not big. Actually, it's very small. The problem started to happen since last week. There are not big changes during the period. The only thing I can say is that we created two more JSF pages.
    The third weird thing is that the same project never happened on the P4+XP box. When I open the project on the P4+XP box, it’s always fast and no CPU spike.
    Any advises are welcome!
    Thanks,
    Steven

    Hi Guys,
    I re-made a simple test project for this problem and now I now always reproduce the problem in JDeveloper on both system (XP & Vista). Everytime I open this jspx file in the source editor and try to scroll up/down the source file, or manually delete an attribute, JDeveloepr will hang and the CPU usage is 0%.
    Here is the content of the test file:
    <?xml version='1.0' encoding='windows-1252'?>
    <jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.0"
    xmlns:h="http://java.sun.com/jsf/html"
    xmlns:f="http://java.sun.com/jsf/core"
    xmlns:af="http://xmlns.oracle.com/adf/faces"
    xmlns:afh="http://xmlns.oracle.com/adf/faces/html">
    <jsp:output omit-xml-declaration="true" doctype-root-element="HTML"
    doctype-system="http://www.w3.org/TR/html4/loose.dtd"
    doctype-public="-//W3C//DTD HTML 4.01 Transitional//EN"/>
    <jsp:directive.page contentType="text/html;charset=windows-1252"/>
    <f:view>
    <afh:html binding="#{backing_streettypedetail.html1}" id="html1">
    <afh:head title="streettypedetail"
    binding="#{backing_streettypedetail.head1}" id="head1">
    <meta http-equiv="Content-Type"
    content="text/html; charset=windows-1252"/>
    </afh:head>
    <afh:body binding="#{backing_streettypedetail.body1}" id="body1">
    <af:messages binding="#{backing_streettypedetail.messages1}"
    id="messages1"/>
    <h:form binding="#{backing_streettypedetail.form1}" id="form1">
    <af:panelForm binding="#{backing_streettypedetail.panelForm1}"
    id="panelForm1">
    <af:inputText value="#{bindings.streetTypeID.inputValue}"
    label="#{bindings.streetTypeID.label}"
    required="#{bindings.streetTypeID.mandatory}"
    columns="#{bindings.streetTypeID.displayWidth}"
    binding="#{backing_streettypedetail.inputText1}"
    id="inputText1">
    <af:validator binding="#{bindings.streetTypeID.validator}"/>
    </af:inputText>
    <af:inputText value="#{bindings.description.inputValue}"
    label="#{bindings.description.label}"
    required="#{bindings.description.mandatory}"
    columns="#{bindings.description.displayWidth}"
    binding="#{backing_streettypedetail.inputText2}"
    id="inputText2">
    <af:validator binding="#{bindings.description.validator}"/>
    </af:inputText>
    <af:inputText value="#{bindings.abbr.inputValue}"
    label="#{bindings.abbr.label}"
    required="#{bindings.abbr.mandatory}"
    columns="#{bindings.abbr.displayWidth}"
    binding="#{backing_streettypedetail.inputText3}"
    id="inputText3">
    <af:validator binding="#{bindings.abbr.validator}"/>
    </af:inputText>
    <f:facet name="footer">
    <h:panelGroup binding="#{backing_streettypedetail.panelGroup1}"
    id="panelGroup1">
    <af:commandButton text="Save"
    binding="#{backing_streettypedetail.saveButton}"
    id="saveButton"
    actionListener="#{bindings.mergeEntity.execute}"
    action="#{userState.retrieveReturnNavigationRule}"
    disabled="#{!bindings.mergeEntity.enabled}"
    partialSubmit="false">
    <af:setActionListener from="#{true}"
    to="#{userState.refresh}"/>
    </af:commandButton>
    <af:commandButton text="Cancel"
    binding="#{backing_streettypedetail.cancelButton}"
    action="#{userState.retrieveReturnNavigationRule}"
    id="cancelButton">
    <af:setActionListener from="#{false}"
    to="#{userState.refresh}"/>
    </af:commandButton>
    </h:panelGroup>
    </f:facet>
    </af:panelForm>
    </h:form>
    </afh:body>
    </afh:html>
    </f:view>
    <!--oracle-jdev-comment:auto-binding-backing-bean-name:backing_streettypedetail-->
    </jsp:root>
    Can anybody take a look at the file and let me know what's wrong with it?
    Thanks in advance.
    Steven

  • Oracle BPM 11.1.1.5 Performance issues

    Hi,
    I have 2 Node Cluster of Oracle SOA 11.1.1.5 installed. Have a separate cluster for SOA/BPM, BAM, OSB, WSM. Here are the OS and Java versions
    Java Vendor: HP
    Java Version: 1.6.0.14
    OS: HP-UX
    OS Version: B.11.31
    Running into an issue where Oracle BPM is performing very slow the task forms takes forever to come up and performing any actions takes too long to proceed som time it keeps timing out. I have over 100 SOA Process running plus some BPM Process but BMP Workspace application is running too slow as have customized tasks forms. But the same works a bit better in other instance which is non-clustered. Any idea what can be done on the server level to get around the performance issues. So far have modified Audit Levels and reduced soa-infra bpm log have the following settings in setDomainEnv.sh for USER_MEM_ARGS=-Xms2000m -Xmx6000m -XX:PermSize=1000m
    But not help. Any idea what else to look into to get around these bpm performance issues. Here is what I have in setSOADomainEnv.sh
    # 8395254: add -da:org.apache.xmlbeans... in EXTRA_JAVA_PROPERTIES
    EXTRA_JAVA_PROPERTIES="${EXTRA_JAVA_PROPERTIES} -da:org.apache.xmlbeans..."
    XENGINE_DIR="${SOA_ORACLE_HOME}/soa/thirdparty/edifecs/XEngine"
    DEFAULT_MEM_ARGS="-Xms512m -Xmx1024m"
    PORT_MEM_ARGS="-Xms768m -Xmx1536m"
    if [ "${JAVA_VENDOR}" != "Oracle" ] ; then
      DEFAULT_MEM_ARGS="${DEFAULT_MEM_ARGS} -XX:PermSize=128m -XX:MaxPermSize=512m"
      PORT_MEM_ARGS="${PORT_MEM_ARGS} -XX:PermSize=256m -XX:MaxPermSize=512m"
    fi
    #========================================================
    # setup LD_LIBRARY_PATH if directory is present...
    #========================================================
    if [ -d ${XENGINE_DIR}/bin ]; then
       LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:${XENGINE_DIR}/bin"
       export LD_LIBRARY_PATH
    fi
    #========================================================
    # setup platform specific environment variables
    #========================================================
    case ${PLATFORM_TYPE} in
      # AIX
      AIX)
        if [ -d ${XENGINE_DIR}/bin ]; then
           LIBPATH="${LIBPATH}:${XENGINE_DIR}/bin"
           export LIBPATH
        fi
        USER_MEM_ARGS=${PORT_MEM_ARGS}
        export USER_MEM_ARGS
        # Fix for 7828060
        POST_CLASSPATH=${POST_CLASSPATH}:${SOA_ORACLE_HOME}/soa/modules/soa-ibm-addon.jar
        # Fix for 7520915 and 8264518 and 8305217
        EXTRA_JAVA_PROPERTIES="${EXTRA_JAVA_PROPERTIES} -Djavax.xml.datatype.DatatypeFactory=org.apache.xerces.jaxp.datatype.DatatypeFactoryImpl -Djava.endorsed.dirs=${SOA_ORACLE_HOME}/bam/modules/org.apache.xalan_2.7.1"
        export EXTRA_JAVA_PROPERTIES
      # HPUX
      HP-UX)
        if [ -d ${XENGINE_DIR}/bin ]; then
           SHLIB_PATH="${SHLIB_PATH}:${XENGINE_DIR}/bin"
           export SHLIB_PATH
        fi
        LD_LIBRARY_PATH="${XENGINE_DIR}/bin:${LD_LIBRARY_PATH}"
        export LD_LIBRARY_PATH
        USER_MEM_ARGS="-d64 ${PORT_MEM_ARGS}"
        export USER_MEM_ARGS
        ;;And here is what I have in setDomainEnv.sh
    XMS_SUN_64BIT="256"
    export XMS_SUN_64BIT
    XMS_SUN_32BIT="256"
    export XMS_SUN_32BIT
    XMX_SUN_64BIT="512"
    export XMX_SUN_64BIT
    XMX_SUN_32BIT="512"
    export XMX_SUN_32BIT
    XMS_JROCKIT_64BIT="256"
    export XMS_JROCKIT_64BIT
    XMS_JROCKIT_32BIT="256"
    export XMS_JROCKIT_32BIT
    XMX_JROCKIT_64BIT="512"
    export XMX_JROCKIT_64BIT
    XMX_JROCKIT_32BIT="512"
    export XMX_JROCKIT_32BIT
    if [ "${JAVA_VENDOR}" = "Sun" ] ; then
         WLS_MEM_ARGS_64BIT="-Xms256m -Xmx512m"
         export WLS_MEM_ARGS_64BIT
         WLS_MEM_ARGS_32BIT="-Xms256m -Xmx512m"
         export WLS_MEM_ARGS_32BIT
    else
         WLS_MEM_ARGS_64BIT="-Xms512m -Xmx512m"
         export WLS_MEM_ARGS_64BIT
         WLS_MEM_ARGS_32BIT="-Xms512m -Xmx512m"
         export WLS_MEM_ARGS_32BIT
    fi
    if [ "${JAVA_VENDOR}" = "Oracle" ] ; then
         CUSTOM_MEM_ARGS_64BIT="-Xms${XMS_JROCKIT_64BIT}m -Xmx${XMX_JROCKIT_64BIT}m"
         export CUSTOM_MEM_ARGS_64BIT
         CUSTOM_MEM_ARGS_32BIT="-Xms${XMS_JROCKIT_32BIT}m -Xmx${XMX_JROCKIT_32BIT}m"
         export CUSTOM_MEM_ARGS_32BIT
    else
         CUSTOM_MEM_ARGS_64BIT="-Xms${XMS_SUN_64BIT}m -Xmx${XMX_SUN_64BIT}m"
         export CUSTOM_MEM_ARGS_64BIT
         CUSTOM_MEM_ARGS_32BIT="-Xms${XMS_SUN_32BIT}m -Xmx${XMX_SUN_32BIT}m"
         export CUSTOM_MEM_ARGS_32BIT
    fi
    MEM_ARGS_64BIT="${CUSTOM_MEM_ARGS_64BIT}"
    export MEM_ARGS_64BIT
    MEM_ARGS_32BIT="${CUSTOM_MEM_ARGS_32BIT}"
    export MEM_ARGS_32BIT
    if [ "${JAVA_USE_64BIT}" = "true" ] ; then
         MEM_ARGS="${MEM_ARGS_64BIT}"
         export MEM_ARGS
    else
         MEM_ARGS="${MEM_ARGS_32BIT}"
         export MEM_ARGS
    fi
    MEM_PERM_SIZE_64BIT="-XX:PermSize=128m"
    export MEM_PERM_SIZE_64BIT
    MEM_PERM_SIZE_32BIT="-XX:PermSize=128m"
    export MEM_PERM_SIZE_32BIT
    if [ "${JAVA_USE_64BIT}" = "true" ] ; then
         MEM_PERM_SIZE="${MEM_PERM_SIZE_64BIT}"
         export MEM_PERM_SIZE
    else
         MEM_PERM_SIZE="${MEM_PERM_SIZE_32BIT}"
         export MEM_PERM_SIZE
    fi
    MEM_MAX_PERM_SIZE_64BIT="-XX:MaxPermSize=512m"
    export MEM_MAX_PERM_SIZE_64BIT
    MEM_MAX_PERM_SIZE_32BIT="-XX:MaxPermSize=512m"
    export MEM_MAX_PERM_SIZE_32BIT
    if [ "${JAVA_USE_64BIT}" = "true" ] ; then
         MEM_MAX_PERM_SIZE="${MEM_MAX_PERM_SIZE_64BIT}"
         export MEM_MAX_PERM_SIZE
    else
         MEM_MAX_PERM_SIZE="${MEM_MAX_PERM_SIZE_32BIT}"
         export MEM_MAX_PERM_SIZE
    fi
    if [ "${JAVA_VENDOR}" = "Sun" ] ; then
         if [ "${PRODUCTION_MODE}" = "" ] ; then
              MEM_DEV_ARGS="-XX:CompileThreshold=8000 ${MEM_PERM_SIZE} "
              export MEM_DEV_ARGS
         fi
    fi
    # Had to have a separate test here BECAUSE of immediate variable expansion on windows
    if [ "${JAVA_VENDOR}" = "Sun" ] ; then
         MEM_ARGS="${MEM_ARGS} ${MEM_DEV_ARGS} ${MEM_MAX_PERM_SIZE}"
         export MEM_ARGS
    fi
    if [ "${JAVA_VENDOR}" = "HP" ] ; then
         MEM_ARGS="${MEM_ARGS} ${MEM_MAX_PERM_SIZE}"
         export MEM_ARGS
    fi
    if [ "${JAVA_VENDOR}" = "Apple" ] ; then
         MEM_ARGS="${MEM_ARGS} ${MEM_MAX_PERM_SIZE}"
         export MEM_ARGS
    fi
    if [ "${debugFlag}" = "true" ] ; then
         JAVA_OPTIONS="${JAVA_OPTIONS} -da:org.apache.xmlbeans... "
         export JAVA_OPTIONS
    fi
    export USER_MEM_ARGS="-Xms4g -Xmx6g -XX:PermSize=2g -XX:+UseParallelGC -XX:+UseParallelOldGC"Here is the output of the top command
    Load averages: 0.08, 0.06, 0.06
    315 processes: 205 sleeping, 110 running
    Cpu states:
    CPU   LOAD   USER   NICE    SYS   IDLE  BLOCK  SWAIT   INTR   SSYS
    0    0.06   4.0%   0.2%   1.0%  94.8%   0.0%   0.0%   0.0%   0.0%
    2    0.07   3.6%   5.0%   0.2%  91.2%   0.0%   0.0%   0.0%   0.0%
    4    0.07   2.0%   0.2%   0.0%  97.8%   0.0%   0.0%   0.0%   0.0%
    6    0.07   2.4%   0.2%   0.8%  96.6%   0.0%   0.0%   0.0%   0.0%
    8    0.09   1.2%   0.2%  10.9%  87.7%   0.0%   0.0%   0.0%   0.0%
    10    0.12   3.0%   0.0%  11.1%  85.9%   0.0%   0.0%   0.0%   0.0%
    12    0.08   3.0%   0.2%   6.6%  90.3%   0.0%   0.0%   0.0%   0.0%
    14    0.09   4.2%   1.2%   0.8%  93.8%   0.0%   0.0%   0.0%   0.0%
    avg   0.08   3.0%   1.0%   3.8%  92.2%   0.0%   0.0%   0.0%   0.0%
    System Page Size: 4Kbytes
    Memory: 38663044K (38379156K) real, 149420048K (148978096K) virtual, 26349848K f
    ree  Page# 1/63
    CPU TTY  PID USERNAME PRI NI   SIZE    RES STATE    TIME %WCPU  %CPU COMMAND
    4   ?  3926 root     152 20   213M 70040K run    694:47 10.05 10.04 cimprovagt
    4   ?  6855 user1  152 20  7704M  1125M run      4:36  9.31  9.29 java
    0   ?  6126 user2  152 20  2790M  1863M run     22:57  4.16  4.15 javaHere is the Memory on the box
    Memory: 98132 MB (95.83 GB)
    Thanks

    After changing JVM settigns for soa cluster it's a bit better but still slow so wondering what other tweaks can be done on the JVM side. Here is what is for the SOA Cluster
    USER_MEM_ARGS="-server -Xms12928m -Xmx12928m -XX:PermSize=3072m -Xmn3232m -XX:+SXTElimination -XX:+UseParallelGC -XX:+UseParNewGC -XX:+ExplicitGCInvokesConcurrent -XX:-TraceClassLoading -XX:-TraceClassUnloading"
    We are running multiple instances on the same boxes and the total RAM on the machine is 95 GB on each box which is being shared across 4 cluster environments. For now other 3 cluster environments have the SOA Cluster JVM setting as
    USER_MEM_ARGS="-server -Xms4096m -Xmx4096m -XX:PermSize=1024m -Xmn1152m -XX:+SXTElimination -XX:+UseParallelGC -XX:+UseParNewGC -XX:+ExplicitGCInvokesConcurrent -XX:-TraceClassLoading -XX:-TraceClassUnloading"
    Any help on what else I can tweak or set in JVM to get a better performance.
    Thanks

  • Performance issues in Reader 7

    Hi,
    We have a serious issue with performance in Reader 7.  Our client is locked down to this version and we have developed our forms targeting this version in Designer but only recently discovered the performance problems.  We seem to have pinpointed the problem to direct rendering in the form.  When running the form in adobe reader 9, with direct rendering forced to off, we see the same symptoms that we saw on the adobe reader 7 client.   The symptoms are that the memory usage of the acroRd32.exe process rises steadily as we interact with the form and does not come back down.  After a time it becomes unusable as it takes about 25 seconds to move between fields.  In version 9, with direct rendering on as default, this issue does not occur.
    We disabled direct rendering in the XML source using:
    <?originalXFAVersion http://www.xfa.org/schema/xfa-template/2.4/ LegacyRendering:1?>
    Our client cannot upgrade their reader version and so we are in a very difficult position.  If anyone can suggest a way to tackle this performance issue we will be very grateful.
    Thanks,
    Kieran

    I'm working with Kieran on the same form and I think I have tracked the issue down to a difference between rendering methods in Adobe reader 7 and adobe reader 9.  I drew up a benchmark test script and ran it before and after I disabled direct rendering.  When runing the form in adobe reader 9, but with direct rendering forced to off.  I see the same symptoms that I saw on the adobe reader 7 client. 
    I disabled direct rendering using:
    <?originalXFAVersion http://www.xfa.org/schema/xfa-template/2.4/ LegacyRendering:1?>
    Does anyone know of particular objects or methods that might be handled poorly by the legacy rendering mode found in adobe reader 7 (XFA 2.4 and earlier)?
    Thanks
    David

  • Performance issue with insert query !

    Hi ,
    I am using dbxml-2.4.16, my node-storage container is loaded with a large document ( 54MB xml ).
    My document basically contains around 65k records in the same table ( 65k child nodes for one parent node ). I need to insert more records in to my DB, my insert XQuery is consuming a lot of time ( ~23 sec ) to insert one entry through command-line and around 50sec through code.
    My container is indexed with "node-attribute-equality-string". The insert query I used:
    insert nodes <NS:sampleEntry mySSIAddress='70011' modifier = 'create'><NS:sampleIPZone1Address>AABBCCDD</NS:sampleIPZone1Address><NS:myICMPFlag>1</NS:myICMPFlag><NS:myIngressFilter>1</NS:myIngressFilter><NS:myReadyTimer>4</NS:myReadyTimer><NS:myAPNNetworkID>ggsntest</NS:myAPNNetworkID><NS:myVPLMNFlag>2</NS:myVPLMNFlag><NS:myDAC>100</NS:myDAC><NS:myBcastLLIFlag>2</NS:myBcastLLIFlag><NS:sampleIPZone2Address>00000000</NS:sampleIPZone2Address><NS:sampleIPZone3Address>00000000</NS:sampleIPZone3Address><NS:sampleIPZone4Address>00000000</NS:sampleIPZone4Address><NS:sampleIPZone5Address>00000000</NS:sampleIPZone5Address><NS:sampleIPZone6Address>00000000</NS:sampleIPZone6Address><NS:sampleIPZone7Address>00000000</NS:sampleIPZone7Address></NS:sampleEntry> into doc('dbxml:/n_b_i_f_c_a_z.dbxml/doc_Running-SAMPLE')//NS:NS//NS:sampleTable)
    If I modify my query with
    into doc('dbxml:/n_b_i_f_c_a_z.dbxml/doc_Running-SAMPLE')//NS:sampleTable/NS:sampleEntry[@mySSIAddress='1']
    insted of
    into doc('dbxml:/n_b_i_f_c_a_z.dbxml/doc_Running-SAMPLE')//NS:NS//NS:sampleTable)
    Time taken reduces only by 8 secs.
    I have also tried to use insert "after", "before", "as first", "as last" , but there is no difference in performance.
    Is anything wrong with my query, what should be the expected time to insert one record in a DB of 65k records.
    Has anybody got any idea regarding this performance issue.
    Kindly help me out.
    Thanks,
    Kapil.

    Hi George,
    Thanks for your reply.
    Here is the info you requested,
    dbxml> listIndexes
    Index: unique-node-metadata-equality-string for node {http://www.sleepycat.com/2002/dbxml}:name
    Index: node-attribute-equality-string for node {}:mySSIAddress
    2 indexes found.
    dbxml> info
    Version: Oracle: Berkeley DB XML 2.4.16: (October 21, 2008)
    Berkeley DB 4.6.21: (September 27, 2007)
    Default container name: n_b_i_f_c_a_z.dbxml
    Type of default container: NodeContainer
    Index Nodes: on
    Shell and XmlManager state:
    Not transactional
    Verbose: on
    Query context state: LiveValues,Eager
    The insery query with update takes ~32 sec ( shown below )
    time query "declare namespace foo='MY-SAMPLE';declare namespace NS='NS';insert nodes <NS:sampleEntry mySSIAddress='70000' modifier = 'create' ><NS:sampleIPZone1Address>AABBCCDD</NS:sampleIPZone1Address><NS:myICMPFlag>1</NS:myICMPFlag><NS:myIngressFilter>1</NS:myIngressFilter><NS:myReadyTimer>4</NS:myReadyTimer><NS:myAPNNetworkID>ggsntest</NS:myAPNNetworkID><NS:myVPLMNFlag>2</NS:myVPLMNFlag><NS:myDAC>100</NS:myDAC><NS:myBcastLLIFlag>2</NS:myBcastLLIFlag><NS:sampleIPZone2Address>00000000</NS:sampleIPZone2Address><NS:sampleIPZone3Address>00000000</NS:sampleIPZone3Address><NS:sampleIPZone4Address>00000000</NS:sampleIPZone4Address><NS:sampleIPZone5Address>00000000</NS:sampleIPZone5Address><NS:sampleIPZone6Address>00000000</NS:sampleIPZone6Address><NS:sampleIPZone7Address>00000000</NS:sampleIPZone7Address></NS:sampleEntry> into doc('dbxml:/n_b_i_f_c_a_z.dbxml/doc_Running-SAMPLE')//NS:NS//NS:sampleTable"
    Time in seconds for command 'query': 32.5002
    and the query without the updation part takes ~14 sec ( shown below )
    time query "declare namespace foo='MY-SAMPLE';declare namespace NS='NS'; doc('dbxml:/n_b_i_f_c_a_z.dbxml/doc_Running-SAMPLE')//NS:NS//NS:sampleTable"
    Time in seconds for command 'query': 13.7289
    The query :
    time query "declare namespace foo='MY-SAMPLE';declare namespace NS='NS'; doc('dbxml:/n_b_i_f_c_a_z.dbxml/doc_Running-SAMPLE')//PMB:sampleTable/PMB:sampleEntry[@mySSIAddress='1000']"
    Time in seconds for command 'query': 0.005375
    is very fast.
    The Updation of the document seems to consume much of the time.
    Regards,
    Kapil.

  • Known performance issues

    Please discuss known performance issues with enqueue or dequeue of queustion in Oracle 9i and 10G versions? any knowsn bug numbers, patch nubmers etc

    Some suggestions to start with
    XML DB FAQ

  • Oracle 9i reading BLOB performance issues

    Windows XP Pro SP2
    JDK 1.5.0_05
    Oracle 9i
    Oracle Thin Driver for JDK 1.4 v.10.2.0.1.0
    DBCP v.1.2.1
    Spring v1.2.7 (I am using the JDBC template for convenience)
    I have run into serious performance issues reading BLOBs from Oracle using oracle's JDBC thin driver. I am not sure if it a constraint/mis-configuration with oracle or a JDBC problem.
    I am hoping that someone has some experience accessing multi-MB BLOBs under heavy volume.
    We are considering using Oracle 8 or 9 as a document repository. It will end up storing hundreds of thousands of PDFs that can be as large as 30 MBs. We don't have access to Oracle 10.
    TESTS
    I am running tests against Oracle 8 and 9 to simulate single and multi-threaded document access. Out goal is to get a sense of KBps throughput and BLOB data access contention.
    DATA
    There is a single test table with 100 rows. Each row has a PK id and a BLOB field. The blobs range in size from a few dozen KB to 12MB. They represent a valid sample of production data. The total data size is approx. 121 MBs.
    Single Threaded Test
    The test selects a single blob object at a time and then reads the contents of the blob's binary input stream in 2 KB chunks. At the end of the test, it will have accessed all 100 blobs and streamed all 121 MBs. The test harness is JUnit.
    8i Results: On 8i it starts and terminates successfully on a steady and reliable basis. The throughput hovers around 4.8 MBps.
    9i Results: Similar reliability to 8i. The throughput is about 30% better.
    Multi-Threaded Test
    The multi-threaded test uses the same "blob reader" functionality used in the single threaded test. However, it spawns 8 threads each running a separate "blob reader".
    8i Results: The tests successfully complete on a reliable basis. The aggregate throughput of all 8 threads is a bit more than 4.8 MBps.
    9i Results: Erratic. The tests were highly erratic on 9i. Threads would intermittently lock when accessing a BLOB's output stream. Sometimes they lock accessing data from the same row, othertimes it is distinct rows. The number and the timing of the thread "locks" is indeterminate. When the test completed successfully the aggregate throughput of the 8 threads was approx. 5.4 MBps.
    I would be more than happy to post code or the data model if that would help.
    Carlos

    Hi Murphy16,
    Try investigate where are the principal issues in your RAC system.
    Check:
    * Expensive SQL's;
    * Sorts in disks;
    * Wait Events;
    * Interconnect hardware issues;
    * Applications doing unnecessary manual LOCKs (SQL);
    * If SGA is adequatly sized (take care to not use of SWAP space "DISK");
    * Backup's and unnecessary jobs running at business time (Realocate this jobs and backups to night window or a less intensive work hour at database);
    * Rebuild indexes and identify tables that must be reorganized (fragmentation);
    * Verify another software consuming resources on your server;
    Please give us more info about your environment. The steps above are general, but you can use to guide u in basic performance issues.
    Regards,
    Rodrigo Mufalani
    http://mufalani.blogspot.com

  • DbAdapter / Toplink Performance issues

    I'm using the DbAdabpter / Toplink to fetch a sizable dataset (500 - 30,000) row for later emission to a file. The fetch of this data via the DbAdapter / Toplink seems to works reasonably well (albeit quite slow) for datasets between 500-7,000 rows. If I attempt to read a larger dataset, the DbAdapter invocation simply times out. I've tweaked the following configuration options suspecting they might help with the long running invoke the DbAdapter partner link:
    * created an on alarm branch and allowed for 15 minutes for the dataset to be returned.
    * increased the syncMaxWaitTime attribute to 15 minutes.
    * Configured the BPEL OC4J instance to use 2048MB for the JVM heap.
    I've tested the query being used by the DbAdapter via SQL navigator and it returns the data sub-second. I'm suspecting the performance issue is related to the DbAdapter / Toplink rendering the thousands of rows into an XML DOM representation. Might this be the case?
    To help further my hypothesis, I'd like to enable the Toplink profiler. I've found a document in the Oracle doc library that suggests it can be enabled with the following directive, "logProfile" (http://www.oracle.com/technology/products/ias/toplink/doc/1013/MAIN/_html/optimiz003.htm#BEEBCBJF). Any idea where I'd specify this directive? Perhaps somewhere in the toplink_mappings.xml file?
    I could be completely off base and the performance issue could be attributed to some other aspect of my BPEL process. Has anyone else encountered this sort of behavior when working with DbAdapters that return thousands of rows?
    Thanks,
    Peter

    Hi Peter,
    if you are still experiencing the timeout problem you may want to alter the transaction config timout setting in the server.xml file. The tuning guide indicates to change the one file but we have changed it in two locations.
    j2ee/OC4J_BPEL/config (to 700000) and integration/orabpel/system/appserver/oc4j/j2ee/home/config/ (600000) we have previously found that the sync_max_wait_time in the console needs to be set at a value lower than the settings in the above files (540 secs).
    For the performance have you captured the sql from the island log that BPEL is actually running (colaxa.cube.ws logging to debug), is it from a single table or from multiple. We managed to improve the perfromance by setting the use-joining in the toplink-mappings file, but then ended up creating a view in the source system to limit the queries being executed. I am not sure about BPEL's capacity to handle large payloads but it would be interesting to know.
    Ashley

  • E-rec performance issues - Candidate Assignements tab is taking longer time

    Hello,
    We have some serious performance issues with candidate assignments in e-rec system. For the first time if you access a requisition with 60 candidates assigned, its taking more than 3 min to load. If you access again then its taking less than 30 sec.I understand this could be because of the memory cache. My questions are below.
    1) Does it take more than 3 min to load 60 candidates your system?
    2) Is there a way to improve performance with memory cache settings?
    3) Are there any ideas to improve the performance of the candidates assignements page?
    We are in e-rec EHP4 system.
    Your help is appriciated.
    Thanks,
    Raghu.

    Hi,
    perhaps as an overall comment on this topic. There are performance issues in e-recruiting. There have been some improvements, Ryan named some of them. As the KW is one of the bottle necks changing to SES search may help as no more XML documents for indexing are stored which reduces the overall amount. In addition there is a note which splits the KW in a part used for indexing and a part for unstructured documents.
    Unfortunately overall it are valueable improvements but the problems will not be fully solved even if applying all. The best solution is still having an eye on data groth. This leads together technical, business and legal issues. Many countries have restrictions on the duration you can keep the data. By deleting data in time you can heavily reduce data grotth. Furthermore check with the business responsible if 50 MB attachments for each candidate really contributes to the process and the hiring decision. I know HR departments who insist that every candidate uploads the last 3-4 school reports even if he is 20 years into his job. Is this really necessary? Same issue is with the number of candidacies on a requisition / application group. I have seen recruiters reusing the same requisition every six months when they need a new intern for a department and then complaining that the system is to slow with >1000 candidacies on the requisition. Of course it would be great if the application could handle this easily but as it is not this way using this system as it is meant can help a lot.
    Cheers
    Roman

  • Performance issue in update new records from Ekko to my ztable

    I'm doing changes to an existing program
    In this program I need to update any new purchase orders created in EKKO-EBELN to my ztable-ebeln.
    I need to update my ztable with the new records created on that particular date.
    This is a daily running job.
    This is the code I wrote and I'm getting 150,000 records into this loop and I'm getting performance issue, can Anyone suggest me how to avoid performance issue.
    loop at tb_ekko.
        at new ebeln.
          read table tb_ztable with key ebeln = tb_ekko-ebeln binary search.
          if sy-subrc <> 0.
            tb_ztable-ebeln = tb_ekko-ebeln.
            tb_ztable-zlimit = ' '.
            insert ztable from tb_ztable.
          endif.
        endat.
      endloop.
    Thanks
    Hema.

    Modify  your code as follows:
    loop at tb_ekko.
    at new ebeln.
    read table tb_ztable with key ebeln = tb_ekko-ebeln binary search.
    if sy-subrc <> 0.
    tb_ztable_new-ebeln = tb_ekko-ebeln.
    tb_ztable_new-zlimit = ' '.
    append tb_ztable_new.
    clear tb_ztable_new.
    endif.
    endat.
    endloop.
    insert ztable from table tb_ztable_new.
    Regards,
    ravi

Maybe you are looking for

  • Calendar events created in iPhone don't sycn to iCal

    I migrated from a Blackberry to iPhone about a month ago, so am somewhat green to the nuances of the platform. I notice that when I create a calendar event in the iPhone (3g, 2.2.1), it does not get sync'ed to my iCal calendar. Changes in iCal sync t

  • PDF art in FM gone in linked RH project output

    I'm using TCS2 to link FrameMaker 9 books into RoboHelp 8 projects. In my book's FM files, there are many anchored frames containing PDFs imported by reference. (This is a practice that's been recommended by Dov Isaacs of Adobe and seems to work fine

  • My display has gotten too big for the screen!  How to fix?

    This is really strange. The tab bar at the top and the dock at the bottom don't both fit on the screen anymore. And when I move the mouse the whole screen shifts until it rests at its topmost or bottommost position. Same with left/right. There's abou

  • Keys not registering the correct characters

    My Mac Mini all of a sudden is starting to behave really unusually. When I try to type anything certain letters that I hit on the keyboard would produce a three-letter combination. For example when I type the period character on the keyboard, instead

  • Smartform, PDF Error, Unrecognized Token

    Hi all, I have used smarform to send the output of Order Confirmation in PDF format to customer's external mail id. The program is working fine and sending mail to customer's mail id. But the problem is when I am trying to open the PDF file, I am get