Client deletion taking long time....
Hi All,
I have been going through tough times in SAP ECC right now.
I am doing a client deletion using SCC5. Total entries in tables were 58514.
It was going fine till it reached 58504. From then onwards, the tables SAP is deleting are having crores of entries, which is why it is taking time.
My question here is, Is their any way by which we can delete the entries fast?
Like from Database level. Database iam having is Oracle. Can we run any sql delete command to delete entries from backend while SAP client deletion is in progress.
Its been 3 days since i have started client deletion and it is very frustrating now.
Could anyone of you please help me with this?
Hi,
Thank u all for helping me out....
Well i am done with Client deletion....I deleted the entries from SQL level.
My client deletion is completed but with dictionary errors.
There are around 3-4 tables in which maximum of 100 entries are still remaining.
Now my doubt is whether i should go ahead with client copy or not?
If yes, please assist me with steps before starting copy, so that it doesnot take much time similar to client deletion (6 days)..
Regards,
Vikram
Similar Messages
-
Client Deletion Takes long time
Hi All,
Need help, Every month in our quality system we do client refresh so we delete existing data from quality and take export from production and Import into quality.Client Import takes 15 hrs but to delete client it almost takes 36 hrs. There are PCL4/2/1 tables which takes more time to delete the data even not sure they will delete all the data.Looks like these are cluster tables so what can be do to have more optimize client deletion.
To delete client from OS level is is safer side? What can be other ways...?Hi
PCL4 is not a cluster, at least on Ehp6 at DB level it is a transparent table, that means that the table does exist at both SAP & DB level.
There is a way to process deletion faster, at least for Oracle (but it could also work for other DB)
Create a new temporary table table with a CTAS command (copy table as select) to only include the data for the clients you want to keep.
You can then drop the original table and rename the temporary table to the original name.
Watch out CTAS does not copy indexes, constraints and default values.
If you are using Oracle DB datapump query parameter can be the best option.
You could export the data for the client you want to keep (setting a "query" option like query=" where MANDT in ('200', '300')") , truncate the table and import back the data.
The point here is that copying / inserting new records is faster than deleting.
Regards -
Delete statements are taking longer time
Hi All,
I have an issue with delete statement. below are my oracle DB details.
SQL>select * from v$version;
BANNER
Oracle Database 11g Enterprise Edition Release 11.1.0.6.0 - 64bit Production
PL/SQL Release 11.1.0.6.0 - Production
CORE 11.1.0.6.0 Production
TNS for Linux: Version 11.1.0.6.0 - Production
NLSRTL Version 11.1.0.6.0 - Production
I have a schema in the database which has 120 tables in it. The problem is, when the QA team is deleting the customers from customer table, it is running long time and haven't completed. this customer table have FK relation with other tables and have all the right indexes in place. then i have tried to identified the problem, why it is taking long time, and found that when they are running this delete query at the same time application is also running. the sessions created by application are locked most of the table and at the same time the delete session is also waiting for exclusive lock on those table. I given the same info to QA team and asked to stop the application when they deleting the customers. Then they said, they don't want to stop the application and the delete has to work and they asked for different solution. Here i am not sure, what solution i need to provide them.
Can you please suggest me a approach and Thanks in advance.Hari wrote:
and at the same time the delete session is also waiting for exclusive lock on those table. The only way the delete session could be waiting for an exclusive lock on the table is if the code to delete from the customer includes the command: lock table customer in exclusive mode;Unless your original description is wrong, either the deletion code has to change or the application has to stop modifying the customer table.
Regards
Jonathan Lewis
http://jonathanlewis.wordpress.com
Author: <b><em>Oracle Core</em></b> -
Connecting to the database taking long time to connect database server
Hi
When I execute procedure i am getting the below message at bottom of the Oracle SQL Developer
"Connecting to the database"
it is taking more than 10 min plz guideHi
have you installed a normal Oracle Client also on your Host? normal Oracle Client
Did you connect with host:port:sid or with a Oracle Naming Service? through TNS Service
Can you test tnsping <alias> yes, It is working fine
Did other user have the same problem? yes
Did you connect through WAN or LAN connection? LAN (Intranet)
Can you tell more about you client/database setup?
Database setup:
OS: Window 2008 server
version: 11.1.0
Client: 11.1.0
OS: Window 2008 server
Now I am not able to execute single select query which table contains 6 records and 15 columns it is taking long time I have waited 30 min still no resutls
only one table is behaving like this remaining is working fine
Edited by: user9235224 on Oct 6, 2012 7:06 PM -
Report Taking long time in QA system
Gurus,
I have developed a report which works fine in dev.Though in QA system its performance is not okay.Please go through th ecode and help me through.
TABLES: REGUH,BSAK,BSIS,LFA1,LFB1,BSAS.
**** Internal table declaration starts.
*** To Store Vendor clearing Document.
*** Internal table for credit card sub total.
DATA : BEGIN OF I_BSAK OCCURS 0,
XBLNR LIKE BSAK-XBLNR,
LIFNR LIKE REGUH-LIFNR,
PRCTR LIKE BSEG-PRCTR,
NAME1 LIKE LFA1-NAME1,
AUGDT LIKE BSAK-AUGDT,
AUGBL LIKE BSAK-AUGBL,
XBLNR1 LIKE BSAK-XBLNR,
GJAHR LIKE BSAK-GJAHR,
BELNR LIKE BSAK-BELNR,
BLDAT LIKE BSAK-BLDAT,
BLART LIKE BSAK-BLART,
SHKZG LIKE BSAK-SHKZG,
DMBTR LIKE BSAK-DMBTR,
AUGGJ LIKE BSAK-AUGGJ,
CPUDT LIKE BSAK-CPUDT,
LAUFD LIKE REGUH-LAUFD,
KTOKK LIKE LFA1-KTOKK,
RWBTR LIKE REGUH-RWBTR,
VBLNR LIKE REGUH-VBLNR,
HKONT LIKE BSEG-HKONT,
END OF I_BSAK.
*** Internal table for Vendor sub total.
DATA : BEGIN OF I_BSAK_LIFNR OCCURS 0,
LIFNR LIKE REGUH-LIFNR,
XBLNR LIKE BSAK-XBLNR,
PRCTR LIKE BSEG-PRCTR,
NAME1 LIKE LFA1-NAME1,
AUGDT LIKE BSAK-AUGDT,
AUGBL LIKE BSAK-AUGBL,
XBLNR1 LIKE BSAK-XBLNR,
GJAHR LIKE BSAK-GJAHR,
BELNR LIKE BSAK-BELNR,
BLDAT LIKE BSAK-BLDAT,
BLART LIKE BSAK-BLART,
SHKZG LIKE BSAK-SHKZG,
DMBTR LIKE BSAK-DMBTR,
AUGGJ LIKE BSAK-AUGGJ,
CPUDT LIKE BSAK-CPUDT,
LAUFD LIKE REGUH-LAUFD,
KTOKK LIKE LFA1-KTOKK,
RWBTR LIKE REGUH-RWBTR,
VBLNR LIKE REGUH-VBLNR,
HKONT LIKE BSEG-HKONT,
END OF I_BSAK_LIFNR.
*** Internal table for Profit center sub total.
DATA : BEGIN OF I_BSAK_PRCTR OCCURS 0,
PRCTR LIKE BSEG-PRCTR,
BELNR LIKE BSAK-BELNR,
GJAHR LIKE BSAK-GJAHR,
LIFNR LIKE REGUH-LIFNR,
XBLNR LIKE BSAK-XBLNR,
HKONT LIKE BSEG-HKONT,
NAME1 LIKE LFA1-NAME1,
AUGDT LIKE BSAK-AUGDT,
AUGBL LIKE BSAK-AUGBL,
XBLNR1 LIKE BSAK-XBLNR,
BLDAT LIKE BSAK-BLDAT,
BLART LIKE BSAK-BLART,
SHKZG LIKE BSAK-SHKZG,
DMBTR LIKE BSAK-DMBTR,
AUGGJ LIKE BSAK-AUGGJ,
CPUDT LIKE BSAK-CPUDT,
LAUFD LIKE REGUH-LAUFD,
KTOKK LIKE LFA1-KTOKK,
RWBTR LIKE REGUH-RWBTR,
VBLNR LIKE REGUH-VBLNR,
END OF I_BSAK_PRCTR.
*** Work area for sub totals.
DATA: WA LIKE I_BSAK.
DATA : I_BSAK_INIT LIKE I_BSAK OCCURS 0 WITH HEADER LINE.
*** To store line item.
DATA : BEGIN OF I_BSEG OCCURS 0,
BELNR LIKE BSEG-BELNR,
GJAHR LIKE BSEG-GJAHR,
BUZEI LIKE BSEG-BUZEI,
HKONT LIKE BSEG-HKONT,
SHKZG LIKE BSEG-SHKZG,
DMBTR LIKE BSEG-DMBTR,
PRCTR LIKE BSEG-PRCTR,
LIFNR LIKE REGUH-LIFNR,
AUGDT LIKE BSAK-AUGDT,
AUGBL LIKE BSAK-AUGBL,
XBLNR LIKE BSAK-XBLNR,
XBLNR1 LIKE BSAK-XBLNR,
BLDAT LIKE BSAK-BLDAT,
BLART LIKE BSAK-BLART,
NAME1 LIKE LFA1-NAME1,
END OF I_BSEG.
DATA : BEGIN OF I_BSEG_COPY OCCURS 0,
PRCTR LIKE BSEG-PRCTR,
BELNR LIKE BSEG-BELNR,
GJAHR LIKE BSEG-GJAHR,
BUZEI LIKE BSEG-BUZEI,
HKONT LIKE BSEG-HKONT,
SHKZG LIKE BSEG-SHKZG,
DMBTR LIKE BSEG-DMBTR,
LIFNR LIKE REGUH-LIFNR,
AUGDT LIKE BSAK-AUGDT,
AUGBL LIKE BSAK-AUGBL,
XBLNR LIKE BSAK-XBLNR,
XBLNR1 LIKE BSAK-XBLNR,
BLDAT LIKE BSAK-BLDAT,
BLART LIKE BSAK-BLART,
NAME1 LIKE LFA1-NAME1,
END OF I_BSEG_COPY.
*** To store GL account name
DATA: BEGIN OF I_SKAT OCCURS 0,
SAKNR LIKE SKAT-SAKNR,
TXT50 LIKE SKAT-TXT50,
END OF I_SKAT.
*** To store Vendor detail
DATA: BEGIN OF I_LFA1 OCCURS 0,
LIFNR LIKE LFA1-LIFNR,
NAME1 LIKE LFA1-NAME1,
KTOKK LIKE LFA1-KTOKK,
END OF I_LFA1.
DATA: I_INACT TYPE TABLE OF SY-UCOMM.
*** End of Internal table declaration.
*** Constant for company code
CONSTANTS : C_BUKRS(4) VALUE '0010'.
*** Data declaration.
DATA: FR_LAUFDT LIKE REGUH-LAUFD,
TO_LAUFDT LIKE REGUH-LAUFD,
COL,
HEADING(80),
HEADING1(10),
HEADING2(80),
AUTH_RESTRICT,
G_DETAIL,
G_SORTV,
G_SORTP,
G_SORTC,
G_FLAG,
V_XBLNR LIKE BSAK-XBLNR,
V_UCOMM LIKE SY-UCOMM,
V_AUGBL LIKE BSAS-AUGBL,
V_BELNR LIKE BSAS-BELNR.
DATA : BEGIN OF I_SEL OCCURS 0 ,
AUGBL LIKE BSAK-AUGBL,
END OF I_SEL.
DATA: PROGNAME TYPE SY-REPID,
DYNNUM TYPE SY-DYNNR,
DYNPRO_VALUES TYPE TABLE OF DYNPREAD,
FIELD_VALUE LIKE LINE OF DYNPRO_VALUES,
VALUES_TAB LIKE I_SEL OCCURS 0 WITH HEADER LINE.
DATA : RETURN_TAB LIKE DDSHRETVAL OCCURS 0 WITH HEADER LINE.
*** Selection screen.
SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-001.
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 1(30) TXT_PD FOR FIELD P_LAUFDF.
SELECTION-SCREEN POSITION POS_LOW.
PARAMETERS P_LAUFDF LIKE REGUH-LAUFD OBLIGATORY.
SELECTION-SCREEN COMMENT 52(5) TXT_TO FOR FIELD P_LAUFDT.
SELECTION-SCREEN POSITION POS_HIGH.
PARAMETERS P_LAUFDT LIKE REGUH-LAUFD.
SELECTION-SCREEN END OF LINE.
SELECT-OPTIONS: S_KTOKK FOR LFA1-KTOKK.
PARAMETERS: P_RWBTR LIKE REGUH-RWBTR.
SELECT-OPTIONS: S_LIFNR FOR REGUH-LIFNR.
* S_XBLNR FOR BSAK-XBLNR MATCHCODE OBJECT ZXBLNR.
**** Added By Rajesh On 17 OCT 08 (DEVK914797) ****
SELECT-OPTIONS: S_BELNR FOR BSAK-BELNR.
**** End of Addition By Rajesh *****
*** Added By Samir On 04 Sep 08 (DEVK914623) ***
SELECTION-SCREEN SKIP.
PARAMETERS: CHK_REC AS CHECKBOX.
*** End Of Addition By Samir ***
SELECTION-SCREEN END OF BLOCK B1.
*** Initialization.
INITIALIZATION.
TXT_PD = 'Payment Date'.
TXT_TO = 'to' .
G_SORTC = 'X'.
*** At selection-screen.
AT SELECTION-SCREEN.
FR_LAUFDT = P_LAUFDF.
IF P_LAUFDT IS INITIAL.
TO_LAUFDT = FR_LAUFDT.
ELSE.
IF P_LAUFDT LT P_LAUFDF.
MESSAGE E000(ZMSG) WITH 'To Date is less than From date'.
ENDIF.
TO_LAUFDT = P_LAUFDT.
ENDIF.
*** Heading.
WRITE FR_LAUFDT TO HEADING1.
WRITE TO_LAUFDT TO HEADING2.
IF HEADING1 <> HEADING2.
CONCATENATE 'Vendor Credit Card(s) Report for the Payment Date'
HEADING1 'To' HEADING2 INTO HEADING2 SEPARATED BY SPACE.
ELSE.
CONCATENATE 'Vendor Credit Card(s) Report for the Payment Date'
HEADING1 INTO HEADING2 SEPARATED BY SPACE.
ENDIF.
*** Start of selection.
START-OF-SELECTION.
G_DETAIL = 'X'.
PERFORM GET_DATA.
PERFORM MODIFY_ITAB. "Process and for authority check.
*** Added By Samir On 04 Sep 08 (DEVK914623) ***
**** Changed By Rajesh On 17 OCT 08 (DEVK914797) ****
IF CHK_REC = 'X'.
LOOP AT I_BSAK.
SELECT SINGLE BELNR
INTO V_BELNR
FROM BSAS
WHERE BUKRS = C_BUKRS
AND HKONT = '0000002012'
AND BELNR = I_BSAK-AUGBL
AND BUDAT = I_BSAK-AUGDT
AND BELNR IN S_BELNR. " For displaying only reconciled items.
**** End of Addition By Rajesh *****
IF SY-SUBRC <> 0.
DELETE I_BSAK.
ENDIF.
ENDLOOP.
ENDIF.
*** End Of Addition By Samir ***
LOOP AT I_BSAK.
MOVE-CORRESPONDING I_BSAK TO: I_BSAK_LIFNR.
APPEND: I_BSAK_LIFNR.
CLEAR: I_BSAK_LIFNR.
ENDLOOP.
LOOP AT I_BSAK.
MOVE-CORRESPONDING I_BSAK TO: I_BSAK_PRCTR.
READ TABLE I_BSEG WITH KEY BELNR = I_BSAK-BELNR.
I_BSAK_PRCTR-HKONT = I_BSEG-HKONT.
APPEND: I_BSAK_PRCTR.
CLEAR: I_BSAK_PRCTR.
ENDLOOP.
*loop at i_bseg.
* MOVE-CORRESPONDING I_BSAK TO: I_BSAK_PRCTR.
*endloop.
*perform write_data.
PERFORM DISPLAY_OUTPUT.
AT USER-COMMAND.
CASE SY-UCOMM.
WHEN 'EXPA'.
G_DETAIL = 'X'.
WHEN 'COLL'.
CLEAR G_DETAIL.
WHEN 'SORTV'.
CLEAR: V_UCOMM.
V_UCOMM = 'SORTV'.
G_SORTV = 'X'.
CLEAR G_SORTP.
CLEAR G_SORTC.
WHEN 'SORTC'.
CLEAR: V_UCOMM.
V_UCOMM = 'SORTC'.
CLEAR G_SORTV.
CLEAR G_SORTP.
G_SORTC = 'X'.
WHEN 'SORTP'.
CLEAR: V_UCOMM.
V_UCOMM = 'SORTP'.
CLEAR G_SORTV.
CLEAR G_SORTC.
G_SORTP = 'X'.
ENDCASE.
PERFORM DISPLAY_OUTPUT.
*perform write_data.
*** To get the header text in the output.
TOP-OF-PAGE.
PERFORM TOP_OF_PAGE.
TOP-OF-PAGE DURING LINE-SELECTION.
PERFORM TOP_OF_PAGE.
*& Form GET_DATA
* text
* --> p1 text
* <-- p2 text
FORM GET_DATA .
SY-LSIND = 0.
P_RWBTR = P_RWBTR * -1.
REFRESH I_BSAK_INIT.
CLEAR I_BSAK_INIT.
SELECT A~LIFNR A~LAUFD A~VBLNR A~RWBTR
B~KTOKK B~NAME1
FROM REGUH AS A INNER JOIN LFA1 AS B
ON A~LIFNR = B~LIFNR
INTO CORRESPONDING FIELDS OF TABLE I_BSAK_INIT
WHERE A~LAUFD BETWEEN FR_LAUFDT AND TO_LAUFDT AND
A~XVORL <> 'X' AND
A~ZBUKR = C_BUKRS AND
A~LIFNR IN S_LIFNR AND
A~RZAWE = 'X' AND
A~RWBTR LE P_RWBTR AND
B~KTOKK IN S_KTOKK.
IF SY-SUBRC <> 0.
MESSAGE 'Records Not Found' TYPE 'I'.
LEAVE LIST-PROCESSING.
ENDIF.
*---------------------PERFORMANCE ISSUE--------------------------
delete adjacent duplicates from i_bsak_init.
IF NOT I_BSAK_INIT[] IS INITIAL.
SELECT LIFNR AUGDT AUGBL GJAHR BELNR CPUDT BLDAT XBLNR
BLART SHKZG DMBTR AUGGJ
FROM BSAK
INTO CORRESPONDING FIELDS OF TABLE I_BSAK
FOR ALL ENTRIES IN I_BSAK_INIT
WHERE BUKRS = C_BUKRS AND
AUGBL = I_BSAK_INIT-VBLNR AND
XZAHL <> 'X'.
ENDIF.
*** Selecting all line item records from BSEG table.
IF I_BSAK[] IS NOT INITIAL.
SELECT BELNR GJAHR BUZEI HKONT SHKZG DMBTR PRCTR
FROM BSEG
INTO CORRESPONDING FIELDS OF TABLE I_BSEG
FOR ALL ENTRIES IN I_BSAK
WHERE BUKRS = C_BUKRS AND
BELNR = I_BSAK-BELNR AND
GJAHR = I_BSAK-GJAHR AND
BELNR <> I_BSAK-AUGBL AND
KOART <> 'K'.
ENDIF.
*** Selecting gl account name from SKAT table.
IF I_BSEG[] IS NOT INITIAL.
SELECT SAKNR TXT50
FROM SKAT
INTO CORRESPONDING FIELDS OF TABLE I_SKAT
FOR ALL ENTRIES IN I_BSEG
WHERE SPRAS = 'E' AND
KTOPL = C_BUKRS AND
SAKNR = I_BSEG-HKONT.
ENDIF.
SORT I_BSAK BY BELNR.
SORT I_BSAK_INIT BY VBLNR.
SORT I_BSEG BY BELNR GJAHR.
*** Selecting Credit Card No. into I_XBLNR table.
LOOP AT I_BSAK.
I_BSAK-XBLNR1 = I_BSAK-XBLNR.
CLEAR: V_XBLNR.
SELECT SINGLE XBLNR FROM BKPF INTO V_XBLNR
WHERE BUKRS = C_BUKRS AND
BELNR = I_BSAK-AUGBL.
IF SY-SUBRC EQ 0.
I_BSAK-XBLNR = V_XBLNR.
ENDIF.
READ TABLE I_BSEG WITH KEY BELNR = I_BSAK-BELNR
GJAHR = I_BSAK-GJAHR
BINARY SEARCH.
IF SY-SUBRC EQ 0.
I_BSAK-PRCTR = I_BSEG-PRCTR.
ENDIF.
READ TABLE I_BSAK_INIT WITH KEY VBLNR = I_BSAK-AUGBL BINARY SEARCH.
IF SY-SUBRC EQ 0.
I_BSAK-NAME1 = I_BSAK_INIT-NAME1.
I_BSAK-LAUFD = I_BSAK_INIT-LAUFD.
I_BSAK-KTOKK = I_BSAK_INIT-KTOKK.
ENDIF.
MODIFY I_BSAK TRANSPORTING XBLNR XBLNR1 PRCTR NAME1 LAUFD KTOKK.
ENDLOOP.
ENDFORM. " GET_DATA
*& Form MODIFY_ITAB
* text
* --> p1 text
* <-- p2 text
FORM MODIFY_ITAB .
*** Process on internal table
LOOP AT I_BSAK.
AUTHORITY-CHECK OBJECT 'F_LFA1_GRP'
ID 'KTOKK'
FIELD I_BSAK-KTOKK.
IF SY-SUBRC NE 0.
DELETE I_BSAK WHERE KTOKK EQ I_BSAK-KTOKK.
AUTH_RESTRICT = 'X'.
CONTINUE.
ENDIF.
ENDLOOP.
IF AUTH_RESTRICT EQ 'X'.
MESSAGE S005(ZMSG).
ENDIF.
LOOP AT I_BSAK.
IF I_BSAK-SHKZG = 'S'.
I_BSAK-DMBTR = I_BSAK-DMBTR * -1.
MODIFY I_BSAK .
ENDIF.
ENDLOOP.
LOOP AT I_BSEG.
IF I_BSEG-SHKZG = 'H'.
I_BSEG-DMBTR = I_BSEG-DMBTR * -1.
MODIFY I_BSEG .
ENDIF.
ENDLOOP.
*** Default Sorting on internal table .
SORT I_BSAK BY XBLNR LIFNR BELNR.
SORT I_BSEG BY BELNR HKONT.
SORT I_SKAT BY SAKNR.
ENDFORM. " MODIFY_ITAB
*& Form DISPLAY_OUTPUT
* text
* --> p1 text
* <-- p2 text
FORM DISPLAY_OUTPUT .
*** Coding for detail output starts
CLEAR SY-LSIND.
REFRESH I_INACT.
IF G_DETAIL EQ 'X'.
APPEND 'EXPA' TO I_INACT.
ELSE.
APPEND 'COLL' TO I_INACT.
ENDIF.
IF G_SORTV EQ 'X'.
APPEND 'SORTV' TO I_INACT.
SORT I_BSAK BY LIFNR.
SORT I_BSAK_LIFNR BY LIFNR.
ELSEIF G_SORTP EQ 'X'.
APPEND 'SORTP' TO I_INACT.
SORT I_BSAK BY PRCTR.
SORT I_BSAK_PRCTR BY PRCTR.
ELSE.
APPEND 'SORTC' TO I_INACT.
SORT I_BSAK BY XBLNR.
ENDIF.
SET PF-STATUS 'STAT' EXCLUDING I_INACT.
IF V_UCOMM = 'SORTC'.
PERFORM WRITE_DATA.
ELSEIF V_UCOMM = 'SORTV' . "Subroutine for card sub total.
PERFORM WRITE_DATA_VENDOR. "Subroutine for vendor sub total.
ELSEIF V_UCOMM = 'SORTP'. "Subroutine for profit center sub total.
* PERFORM WRITE_DATA_PROFIT.
PERFORM WRITE_DATA_PROFIT_NEW. " New subroutine for profit center.
ELSE.
PERFORM WRITE_DATA.
ENDIF.
ENDFORM. " DISPLAY_OUTPUT
*& Form F_COLOR
* text
* --> p1 text
* <-- p2 text
FORM F_COLOR .
IF COL = 'X'.
FORMAT COLOR COL_NORMAL INTENSIFIED OFF.
CLEAR COL.
ELSE.
FORMAT COLOR COL_NORMAL INTENSIFIED ON.
COL = 'X'.
ENDIF.
ENDFORM. " F_COLOR
*& Form TOP_OF_PAGE
* text
* --> p1 text
* <-- p2 text
FORM TOP_OF_PAGE .
*** Top-of-page is Common for summary and detail report.
*** To display top of page only on first page.
IF SY-PAGNO = 1 .
CALL FUNCTION 'Z_NPL_HEADING'
EXPORTING
LINE_SIZE = SY-LINSZ
HEADING1 = HEADING
HEADING2 = HEADING2.
FORMAT COLOR COL_HEADING INTENSIFIED ON.
**** To get output columns text descprition
ULINE.
WRITE:/ SY-VLINE NO-GAP, (10) 'Vendor' NO-GAP,
SY-VLINE NO-GAP, (35) 'Name of Payee' NO-GAP,
SY-VLINE NO-GAP, (10) 'G/L Num' NO-GAP,
SY-VLINE NO-GAP, (42) 'G/L Name' NO-GAP,
SY-VLINE NO-GAP, (07) 'Profit Center' NO-GAP,
SY-VLINE NO-GAP, (16) 'Credit Card NO.' NO-GAP,
SY-VLINE NO-GAP, (10) 'Pmnt Date' NO-GAP,
SY-VLINE NO-GAP, (08) 'Doc.Type' NO-GAP,
SY-VLINE NO-GAP, (10) 'Inv.Date' NO-GAP,
SY-VLINE NO-GAP, (16) 'Invoice' NO-GAP,
SY-VLINE NO-GAP, (14) 'Amount Paid' NO-GAP,
SY-VLINE.
ULINE.
ENDIF.
ENDFORM. " TOP_OF_PAGE
*& Form WRITE_DATA
* text
* --> p1 text
* <-- p2 text
FORM WRITE_DATA .
LOOP AT I_BSAK.
CLEAR WA.
MOVE-CORRESPONDING I_BSAK TO WA.
PERFORM WRITE.
AT END OF XBLNR. "Card sub total
IF G_SORTC EQ 'X'.
SUM.
IF G_DETAIL EQ 'X'. ULINE. ENDIF.
FORMAT COLOR COL_TOTAL INTENSIFIED OFF.
WRITE:/ SY-VLINE NO-GAP, (25) 'Credit Card Total:', I_BSAK-XBLNR ,
(35) I_BSAK-NAME1 NO-GAP.
WRITE: 110 SY-VLINE NO-GAP,(79) I_BSAK-DMBTR NO-GAP
CURRENCY 'USD',SY-VLINE.
ULINE.
ENDIF.
ENDAT. "End of Credit card Detail
**** Grand total
AT LAST. "Grand total
SUM.
FORMAT COLOR COL_TOTAL INTENSIFIED OFF.
WRITE:/ SY-VLINE NO-GAP,(107) 'Grand Total:',
SY-VLINE NO-GAP,(79) I_BSAK-DMBTR NO-GAP
CURRENCY 'USD', SY-VLINE.
ULINE.
ENDAT.
ENDLOOP. "End for I_BSAK loop
ENDFORM. " WRITE_DATA
*& Form WRITE_DATA_VENDOR
* text
* --> p1 text
* <-- p2 text
FORM WRITE_DATA_VENDOR .
LOOP AT I_BSAK_LIFNR.
CLEAR WA.
MOVE-CORRESPONDING I_BSAK_LIFNR TO WA.
PERFORM WRITE.
AT END OF LIFNR. "Vendor sub Total
IF G_SORTV EQ 'X'.
SUM.
IF G_DETAIL EQ 'X'. ULINE. ENDIF.
FORMAT COLOR COL_TOTAL INTENSIFIED ON.
WRITE:/ SY-VLINE NO-GAP,(15) 'Vendor Total:', I_BSAK_LIFNR-LIFNR.
WRITE: 110 SY-VLINE NO-GAP,(79) I_BSAK_LIFNR-DMBTR NO-GAP
CURRENCY 'USD',SY-VLINE.
ULINE.
ENDIF.
ENDAT. "End of Vendor Total
**** Grand total
AT LAST. "Grand total
SUM.
FORMAT COLOR COL_TOTAL INTENSIFIED OFF.
WRITE:/ SY-VLINE NO-GAP,(107) 'Grand Total:',
SY-VLINE NO-GAP,(79) I_BSAK_LIFNR-DMBTR NO-GAP
CURRENCY 'USD', SY-VLINE.
ULINE.
ENDAT.
ENDLOOP. "End for I_BSAK_LIFNR loop
ENDFORM. " WRITE_DATA_VENDOR
*& Form WRITE_DATA_PROFIT
* text
* --> p1 text
* <-- p2 text
FORM WRITE_DATA_PROFIT .
*** Changed By Samir On 18 Sep 08 (DEVK914685) ***
LOOP AT I_BSAK_PRCTR.
READ TABLE I_BSAK WITH KEY BELNR = I_BSAK_PRCTR-BELNR
GJAHR = I_BSAK_PRCTR-GJAHR.
IF SY-SUBRC = 0.
I_BSAK_PRCTR-LIFNR = I_BSAK-LIFNR.
I_BSAK_PRCTR-NAME1 = I_BSAK-NAME1.
I_BSAK_PRCTR-XBLNR = I_BSAK-XBLNR.
I_BSAK_PRCTR-LAUFD = I_BSAK-LAUFD.
I_BSAK_PRCTR-BLART = I_BSAK-BLART.
I_BSAK_PRCTR-BLDAT = I_BSAK-BLDAT.
I_BSAK_PRCTR-XBLNR1 = I_BSAK-XBLNR1.
MODIFY I_BSAK_PRCTR TRANSPORTING LIFNR NAME1 XBLNR LAUFD BLART BLDAT XBLNR1.
ENDIF.
ENDLOOP.
*** End Of Changes By Samir On 18 Sep 08 ***
SORT I_BSAK_PRCTR BY PRCTR.
LOOP AT I_BSAK_PRCTR.
PERFORM F_COLOR.
IF G_DETAIL = 'X'.
*** Changed By Samir On 18 Sep 08 (DEVK914685) ***
READ TABLE I_SKAT WITH KEY SAKNR = I_BSAK_PRCTR-HKONT BINARY SEARCH.
WRITE:/ SY-VLINE NO-GAP, (10) I_BSAK_PRCTR-LIFNR NO-GAP,
SY-VLINE NO-GAP, (35) I_BSAK_PRCTR-NAME1 NO-GAP,
SY-VLINE NO-GAP, (10) I_BSAK_PRCTR-HKONT NO-GAP,
SY-VLINE NO-GAP, (42) I_SKAT-TXT50 NO-GAP,
SY-VLINE NO-GAP, (07) I_BSAK_PRCTR-PRCTR NO-GAP,
SY-VLINE NO-GAP, (16) I_BSAK_PRCTR-XBLNR NO-GAP, " CREDIT CARD NO.
SY-VLINE NO-GAP, (10) I_BSAK_PRCTR-LAUFD NO-GAP,
SY-VLINE NO-GAP, (08) I_BSAK_PRCTR-BLART NO-GAP,
SY-VLINE NO-GAP, (10) I_BSAK_PRCTR-BLDAT NO-GAP,
SY-VLINE NO-GAP, (16) I_BSAK_PRCTR-XBLNR1 NO-GAP.
WRITE: SY-VLINE NO-GAP, (14) I_BSAK_PRCTR-DMBTR NO-GAP.
WRITE: SY-VLINE.
ENDIF.
*** End Of Changes By Samir On 18 Sep 08 ***
AT END OF PRCTR. "Profit Center sub Total
IF G_SORTP EQ 'X'.
SUM.
IF G_DETAIL EQ 'X'. ULINE. ENDIF.
FORMAT COLOR COL_TOTAL INTENSIFIED ON.
WRITE:/ SY-VLINE NO-GAP,(07) 'Profit Center Total:', I_BSAK_PRCTR-PRCTR.
WRITE: 110 SY-VLINE NO-GAP,(79) I_BSAK_PRCTR-DMBTR NO-GAP
CURRENCY 'USD',SY-VLINE.
ULINE.
ENDIF.
ENDAT. "End of Profit Center Total
**** Grand total
AT LAST. "Grand total
SUM.
FORMAT COLOR COL_TOTAL INTENSIFIED OFF.
WRITE:/ SY-VLINE NO-GAP,(107) 'Grand Total:',
SY-VLINE NO-GAP,(79) I_BSAK_PRCTR-DMBTR NO-GAP
CURRENCY 'USD', SY-VLINE.
ULINE.
ENDAT.
ENDLOOP. "End for I_BSAK_PRCTR loop
ENDFORM. " WRITE_DATA_PROFIT
*& Form WRITE
* text
* --> p1 text
* <-- p2 text
FORM WRITE .
IF G_DETAIL = 'X'.
IF WA-KTOKK = 'Z001'. " For HR Vendors
PERFORM F_COLOR.
READ TABLE I_BSEG WITH KEY BELNR = WA-BELNR GJAHR = WA-GJAHR BINARY SEARCH .
READ TABLE I_SKAT WITH KEY SAKNR = I_BSEG-HKONT BINARY SEARCH.
WRITE:/ SY-VLINE NO-GAP, (10) WA-LIFNR NO-GAP,
SY-VLINE NO-GAP, (35) WA-NAME1 NO-GAP,
SY-VLINE NO-GAP, (10) I_BSEG-HKONT NO-GAP,
SY-VLINE NO-GAP, (42) I_SKAT-TXT50 NO-GAP,
*** Changed By Samir On 18 Sep 08 (DEVK914685) ***
* SY-VLINE NO-GAP, (07) WA-PRCTR NO-GAP,
SY-VLINE NO-GAP, (07) I_BSEG-PRCTR NO-GAP,
*** End Of Changes By Samir On 18 Sep 08 ***
SY-VLINE NO-GAP, (16) WA-XBLNR NO-GAP, " CREDIT CARD NO.
SY-VLINE NO-GAP, (10) WA-LAUFD NO-GAP,
SY-VLINE NO-GAP, (08) WA-BLART NO-GAP,
SY-VLINE NO-GAP, (10) WA-BLDAT NO-GAP,
SY-VLINE NO-GAP, (16) WA-XBLNR1 NO-GAP.
WRITE: SY-VLINE NO-GAP, (14) WA-DMBTR NO-GAP.
WRITE: SY-VLINE.
ELSE.
LOOP AT I_BSEG WHERE BELNR = WA-BELNR AND GJAHR = WA-GJAHR .
PERFORM F_COLOR.
READ TABLE I_SKAT WITH KEY SAKNR = I_BSEG-HKONT BINARY SEARCH.
WRITE:/ SY-VLINE NO-GAP, (10) WA-LIFNR NO-GAP,
SY-VLINE NO-GAP, (35) WA-NAME1 NO-GAP,
SY-VLINE NO-GAP, (10) I_BSEG-HKONT NO-GAP,
SY-VLINE NO-GAP, (42) I_SKAT-TXT50 NO-GAP,
*** Changed By Samir On 17 Sep 08 (DEVK914671) ***
* SY-VLINE NO-GAP, (07) WA-PRCTR NO-GAP,
SY-VLINE NO-GAP, (07) I_BSEG-PRCTR NO-GAP,
*** End Of Changes By Samir On 17 Sep 08 ***
SY-VLINE NO-GAP, (16) WA-XBLNR NO-GAP, " CREDIT CARD NO.
SY-VLINE NO-GAP, (10) WA-LAUFD NO-GAP,
SY-VLINE NO-GAP, (08) WA-BLART NO-GAP,
SY-VLINE NO-GAP, (10) WA-BLDAT NO-GAP,
SY-VLINE NO-GAP, (16) WA-XBLNR1 NO-GAP.
WRITE: SY-VLINE NO-GAP, (14) I_BSEG-DMBTR NO-GAP.
WRITE: SY-VLINE.
ENDLOOP. "End for I_BSEG loop
ENDIF. "Endif for I_PAYR-KTOKK = 'Z001'
ENDIF. "Endif for g_detail = 'X'.
ENDFORM. " WRITE
*& Form WRITE_DATA_PROFIT_NEW
* text
* --> p1 text
* <-- p2 text
FORM WRITE_DATA_PROFIT_NEW .
REFRESH I_BSEG_COPY.
CLEAR I_BSEG_COPY.
* DATA I_BSEG_COPY LIKE I_BSEG OCCURS 0 WITH HEADER LINE.
* I_BSEG_COPY[] = I_BSEG[].
LOOP AT I_BSEG.
MOVE-CORRESPONDING I_BSEG TO I_BSEG_COPY.
APPEND I_BSEG_COPY.
CLEAR I_BSEG_COPY.
ENDLOOP.
LOOP AT I_BSEG_COPY.
READ TABLE I_BSAK_PRCTR WITH KEY BELNR = I_BSEG_COPY-BELNR GJAHR = I_BSEG_COPY-GJAHR ."HKONT = I_BSEG_COPY-HKONT.
IF SY-SUBRC = 0.
I_BSEG_COPY-LIFNR = I_BSAK_PRCTR-LIFNR.
I_BSEG_COPY-XBLNR = I_BSAK_PRCTR-XBLNR.
I_BSEG_COPY-NAME1 = I_BSAK_PRCTR-NAME1.
I_BSEG_COPY-AUGDT = I_BSAK_PRCTR-AUGDT.
I_BSEG_COPY-AUGBL = I_BSAK_PRCTR-AUGBL.
I_BSEG_COPY-XBLNR1 = I_BSAK_PRCTR-XBLNR1.
I_BSEG_COPY-BLDAT = I_BSAK_PRCTR-BLDAT.
I_BSEG_COPY-BLART = I_BSAK_PRCTR-BLART.
MODIFY I_BSEG_COPY TRANSPORTING LIFNR XBLNR NAME1 AUGDT AUGBL XBLNR1 BLDAT BLART.
ENDIF.
ENDLOOP.
SORT I_BSAK_PRCTR BY PRCTR BELNR.
SORT I_BSEG BY BELNR.
SORT I_BSEG_COPY BY PRCTR.
DATA COUNT TYPE I.
DATA G_BELNR LIKE BSAK-BELNR.
LOOP AT I_BSEG_COPY.
CLEAR G_BELNR.
G_BELNR = I_BSEG_COPY-BELNR.
COUNT = COUNT + 1.
READ TABLE I_BSAK WITH KEY BELNR = I_BSEG_COPY-BELNR.
IF SY-SUBRC <> 0.
DELETE I_BSEG_COPY WHERE BELNR = G_BELNR."INDEX count.
ENDIF.
ENDLOOP.
* LOOP AT I_BSAK_PRCTR.
LOOP AT I_BSEG_COPY.
CLEAR WA.
MOVE-CORRESPONDING I_BSEG_COPY TO WA.
PERFORM WRITE_PRCTR.
AT END OF PRCTR. "Profit center sub Total
IF G_SORTP EQ 'X'.
SUM.
IF G_DETAIL EQ 'X'. ULINE. ENDIF.
FORMAT COLOR COL_TOTAL INTENSIFIED ON.
WRITE:/ SY-VLINE NO-GAP,(20) 'Profit Center Total:', I_BSEG_COPY-PRCTR.
WRITE: 110 SY-VLINE NO-GAP,(79) I_BSEG_COPY-DMBTR NO-GAP
CURRENCY 'USD',SY-VLINE.
ULINE.
ENDIF.
ENDAT. "End of Vendor Total
**** Grand total
AT LAST. "Grand total
SUM.
FORMAT COLOR COL_TOTAL INTENSIFIED OFF.
WRITE:/ SY-VLINE NO-GAP,(107) 'Grand Total:',
SY-VLINE NO-GAP,(79) I_BSEG_COPY-DMBTR NO-GAP
CURRENCY 'USD', SY-VLINE.
ULINE.
ENDAT.
ENDLOOP. "End for I_BSAK_LIFNR loop
*ENDFORM. " WRITE_DATA_VENDOR
ENDFORM. " WRITE_DATA_PROFIT_NEW
*& Form WRITE_PRCTR
* text
* --> p1 text
* <-- p2 text
FORM WRITE_PRCTR .
IF G_DETAIL = 'X'.
IF WA-KTOKK = 'Z001'. " For HR Vendors
PERFORM F_COLOR.
* READ TABLE I_BSEG WITH KEY BELNR = WA-BELNR GJAHR = WA-GJAHR PRCTR = WA-PRCTR BINARY SEARCH .
READ TABLE I_SKAT WITH KEY SAKNR = WA-HKONT BINARY SEARCH.
WRITE:/ SY-VLINE NO-GAP, (10) WA-LIFNR NO-GAP,
SY-VLINE NO-GAP, (35) WA-NAME1 NO-GAP,
SY-VLINE NO-GAP, (10) WA-HKONT NO-GAP,
SY-VLINE NO-GAP, (42) I_SKAT-TXT50 NO-GAP,
*** Changed By Samir On 18 Sep 08 (DEVK914685) ***
SY-VLINE NO-GAP, (07) WA-PRCTR NO-GAP,
* SY-VLINE NO-GAP, (07) I_BSEG-PRCTR NO-GAP,
*** End Of Changes By Samir On 18 Sep 08 ***
SY-VLINE NO-GAP, (16) WA-XBLNR NO-GAP, " CREDIT CARD NO.
SY-VLINE NO-GAP, (10) WA-LAUFD NO-GAP,
SY-VLINE NO-GAP, (08) WA-BLART NO-GAP,
SY-VLINE NO-GAP, (10) WA-BLDAT NO-GAP,
SY-VLINE NO-GAP, (16) WA-XBLNR1 NO-GAP.
WRITE: SY-VLINE NO-GAP, (14) WA-DMBTR NO-GAP.
WRITE: SY-VLINE.
ELSE.
* LOOP AT I_BSEG WHERE BELNR = WA-BELNR AND GJAHR = WA-GJAHR AND PRCTR = WA-PRCTR .
PERFORM F_COLOR.
READ TABLE I_SKAT WITH KEY SAKNR = WA-HKONT BINARY SEARCH.
WRITE:/ SY-VLINE NO-GAP, (10) WA-LIFNR NO-GAP,
SY-VLINE NO-GAP, (35) WA-NAME1 NO-GAP,
SY-VLINE NO-GAP, (10) WA-HKONT NO-GAP,
SY-VLINE NO-GAP, (42) I_SKAT-TXT50 NO-GAP,
*** Changed By Samir On 17 Sep 08 (DEVK914671) ***
SY-VLINE NO-GAP, (07) WA-PRCTR NO-GAP,
* SY-VLINE NO-GAP, (07) I_BSEG-PRCTR NO-GAP,
*** End Of Changes By Samir On 17 Sep 08 ***
SY-VLINE NO-GAP, (16) WA-XBLNR NO-GAP, " CREDIT CARD NO.
SY-VLINE NO-GAP, (10) WA-LAUFD NO-GAP,
SY-VLINE NO-GAP, (08) WA-BLART NO-GAP,
SY-VLINE NO-GAP, (10) WA-BLDAT NO-GAP,
SY-VLINE NO-GAP, (16) WA-XBLNR1 NO-GAP.
WRITE: SY-VLINE NO-GAP, (14) WA-DMBTR NO-GAP.
WRITE: SY-VLINE.
* ENDLOOP. "End for I_BSEG loop
ENDIF. "Endif for I_PAYR-KTOKK = 'Z001'
ENDIF. "Endif for g_detail = 'X'.
ENDFORM. " WRITE_PRCTR
Thanks in advance
Raj.Ralph,
Thanks for the reply.
I have marked the sql statement in the code that is taking long time to run but Its my mistake not explaining the same in the description.
When I was debugging the code the below sql statement was taking long time.
IF NOT I_BSAK_INIT[] IS INITIAL.
SELECT LIFNR AUGDT AUGBL GJAHR BELNR CPUDT BLDAT XBLNR
BLART SHKZG DMBTR AUGGJ
FROM BSAK
INTO CORRESPONDING FIELDS OF TABLE I_BSAK
FOR ALL ENTRIES IN I_BSAK_INIT
WHERE BUKRS = C_BUKRS AND
AUGBL = I_BSAK_INIT-VBLNR AND
XZAHL <> 'X'.
ENDIF.
Any suggestions on the code?
Regards,
Raj. -
Process Chain taking long time in loading data in infocube
Dear Expert,
We are loading data thru PC in AR cube it takes data frm
PSA-> DSO->Activation->Index Deletion->DTP(load infocube)->IndexCreation->Create Aggregates.
In Index creation everyday its taking long time around 9 to 10 hrs to create it
when we go in RSRV and repair the infocube thr loading of data happens fast. We are doing it(RSRV) everyday. In DB02 we have seen dat 96% tablespace is used.
Please tell permanent solution.
Please suggest its BI Issue or Basis.
Regards,
AnkitHi ,
We are loading data thru PC in AR cube it takes data frm
PSA-> DSO->Activation->Index Deletion->DTP(load infocube)->IndexCreation->Create Aggregates.
In the above steps insted of Create Aggregates it should be Roll up Process of aggregates.
You can ask the basis team to check the Table space in the transaction db02old/db02.
Check if there is long running job in SM66/SM50 kill that job.
check there should be enough Batch process to perform the steps.
Hope this helps.
"Assigning points is the ways to say thanks on SDN".
Br
Alok -
ESS page taking long time to load
Dear Experts,
While logging to the sap portal, the ess page is taking long time to load. please advice.Dear Dishant,
Error as follows:
500 Internal Server Error is returned for HTTP request [http://sapprtlclus:50100/webdynpro/resources/sap.com/pb/PageBuilder]:
component [dispatcher],
web module [webdynpro/resources/sap.com/pcui_gp~xssutils],
application [sap.com/pcui_gp~xssutils],
DC name [sap.com/pcui_gp~xssutils],
CSN component[CA-GTF-TS-XSS],
problem categorization [],
internal categorization [1657115376].
[EXCEPTION]
com.sap.tc.webdynpro.services.exceptions.WDRuntimeException: Exception was thrown in preprocessing phase of application session lVF7nzKWRpXYazTzysiRjA--A*GK0SXT8TnfXfHX91En3w--/pcd:portal_content/com.sap.pct/every_user/com.sap.pct.erp.ess.bp_folder/com.sap.pct.erp.ess.roles/com.sap.pct.erp.ess.employee_self_service/com.sap.pct.erp.ess.employee_self_service/com.sap.pct.erp.ess.areagroup_overview/com.sap.pct.erp.ess.overview/sap.com/pcui_gp~xssutils/XssMenu/base/. The causing exception is nested. RID=579178403e4911e4c0f70000010f2eda
at com.sap.tc.webdynpro.clientserver.session.ApplicationSession.doPreprocessing(ApplicationSession.java:663)
at com.sap.tc.webdynpro.clientserver.session.ApplicationSession.doProcessing(ApplicationSession.java:349)
at com.sap.tc.webdynpro.clientserver.session.RequestManager.doProcessing(RequestManager.java:326)
at com.sap.tc.webdynpro.serverimpl.core.sessionctx.AbstractExecutionContextDispatcher.delegateToRequestManager(AbstractExecutionContextDispatcher.java:62)
at com.sap.tc.webdynpro.serverimpl.wdc.sessionctx.DispatchHandlerForRequestManager.service(DispatchHandlerForRequestManager.java:39)
at com.sap.tc.webdynpro.serverimpl.wdc.sessionctx.DispatchHandlerForRequestManager.service(DispatchHandlerForRequestManager.java:46)
at com.sap.engine.services.servlets_jsp.server.deploy.impl.module.IRequestDispatcherImpl.dispatch(IRequestDispatcherImpl.java:292)
at com.sap.tc.webdynpro.serverimpl.wdc.sessionctx.ExecutionContextDispatcher.dispatchToAppContext(ExecutionContextDispatcher.java:68)
at com.sap.tc.webdynpro.serverimpl.core.sessionctx.AbstractExecutionContextDispatcher.dispatch(AbstractExecutionContextDispatcher.java:53)
at com.sap.tc.webdynpro.clientserver.session.RequestManager.doProcessing(RequestManager.java:245)
at com.sap.tc.webdynpro.clientserver.embedding.JavaApplicationProxy$Runner.callRequestManager(JavaApplicationProxy.java:1244)
at com.sap.tc.webdynpro.clientserver.embedding.JavaApplicationProxy$Runner.callEmbeddedApplication(JavaApplicationProxy.java:1122)
at com.sap.tc.webdynpro.clientserver.embedding.JavaApplicationProxy$StartCommand.doExecute(JavaApplicationProxy.java:1575)
at com.sap.tc.webdynpro.clientserver.embedding.JavaApplicationProxy$AbstractCommand.execute(JavaApplicationProxy.java:1488)
at com.sap.tc.webdynpro.clientserver.embedding.JavaApplicationProxy$Runner.execute(JavaApplicationProxy.java:1028)
at com.sap.tc.webdynpro.clientserver.embedding.JavaApplicationProxy.execute(JavaApplicationProxy.java:859)
at com.sap.tc.webdynpro.clientserver.embedding.JavaApplicationProxy.start1(JavaApplicationProxy.java:637)
at com.sap.tc.webdynpro.portal.pb.impl.JavaApplicationProxyAdapter.create(JavaApplicationProxyAdapter.java:166)
at com.sap.portal.pb.PageBuilder.updateApplications(PageBuilder.java:1691)
at com.sap.portal.pb.PageBuilder.createPage(PageBuilder.java:411)
at com.sap.portal.pb.PageBuilder.init(PageBuilder.java:655)
at com.sap.portal.pb.PageBuilder.wdDoInit(PageBuilder.java:227)
at com.sap.portal.pb.wdp.InternalPageBuilder.wdDoInit(InternalPageBuilder.java:137)
at com.sap.tc.webdynpro.progmodel.generation.DelegatingComponent.doInit(DelegatingComponent.java:161)
at com.sap.tc.webdynpro.progmodel.controller.Controller.initController(Controller.java:227)
at com.sap.tc.webdynpro.progmodel.components.Component.initController(Component.java:258)
at com.sap.tc.webdynpro.progmodel.controller.Controller.init(Controller.java:206)
at com.sap.tc.webdynpro.clientserver.cal.ClientApplication.init(ClientApplication.java:590)
at com.sap.tc.webdynpro.clientserver.cal.ClientApplication.doPreprocessing(ClientApplication.java:1457)
at com.sap.tc.webdynpro.clientserver.session.ApplicationSession.doPreprocessing(ApplicationSession.java:660)
at com.sap.tc.webdynpro.clientserver.session.ApplicationSession.doProcessing(ApplicationSession.java:349)
at com.sap.tc.webdynpro.clientserver.session.RequestManager.doProcessing(RequestManager.java:326)
at com.sap.tc.webdynpro.serverimpl.core.AbstractDispatcherServlet.doContent(AbstractDispatcherServlet.java:87)
at com.sap.tc.webdynpro.serverimpl.wdc.DispatcherServlet.doContent(DispatcherServlet.java:89)
at com.sap.tc.webdynpro.serverimpl.core.AbstractDispatcherServlet.doPost(AbstractDispatcherServlet.java:62)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:754)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:847)
at com.sap.engine.services.servlets_jsp.server.Invokable.invoke(Invokable.java:152)
at com.sap.engine.services.servlets_jsp.server.Invokable.invoke(Invokable.java:38)
at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.runServlet(HttpHandlerImpl.java:466)
at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.handleRequest(HttpHandlerImpl.java:210)
at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:441)
at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:430)
at com.sap.engine.services.servlets_jsp.filters.DSRWebContainerFilter.process(DSRWebContainerFilter.java:38)
at com.sap.engine.services.httpserver.chain.AbstractChain.process(AbstractChain.java:78)
at com.sap.engine.services.servlets_jsp.filters.ServletSelector.process(ServletSelector.java:81)
at com.sap.engine.services.httpserver.chain.AbstractChain.process(AbstractChain.java:78)
at com.sap.engine.services.servlets_jsp.filters.ApplicationSelector.process(ApplicationSelector.java:278)
at com.sap.engine.services.httpserver.chain.AbstractChain.process(AbstractChain.java:78)
at com.sap.engine.services.httpserver.filters.WebContainerInvoker.process(WebContainerInvoker.java:81)
at com.sap.engine.services.httpserver.chain.HostFilter.process(HostFilter.java:9)
at com.sap.engine.services.httpserver.chain.AbstractChain.process(AbstractChain.java:78)
at com.sap.engine.services.httpserver.filters.ResponseLogWriter.process(ResponseLogWriter.java:60)
at com.sap.engine.services.httpserver.chain.HostFilter.process(HostFilter.java:9)
at com.sap.engine.services.httpserver.chain.AbstractChain.process(AbstractChain.java:78)
at com.sap.engine.services.httpserver.filters.DefineHostFilter.process(DefineHostFilter.java:27)
at com.sap.engine.services.httpserver.chain.ServerFilter.process(ServerFilter.java:12)
at com.sap.engine.services.httpserver.chain.AbstractChain.process(AbstractChain.java:78)
at com.sap.engine.services.httpserver.filters.MonitoringFilter.process(MonitoringFilter.java:29)
at com.sap.engine.services.httpserver.chain.ServerFilter.process(ServerFilter.java:12)
at com.sap.engine.services.httpserver.chain.AbstractChain.process(AbstractChain.java:78)
at com.sap.engine.services.httpserver.filters.SessionSizeFilter.process(SessionSizeFilter.java:26)
at com.sap.engine.services.httpserver.chain.ServerFilter.process(ServerFilter.java:12)
at com.sap.engine.services.httpserver.chain.AbstractChain.process(AbstractChain.java:78)
at com.sap.engine.services.httpserver.filters.MemoryStatisticFilter.process(MemoryStatisticFilter.java:57)
at com.sap.engine.services.httpserver.chain.ServerFilter.process(ServerFilter.java:12)
at com.sap.engine.services.httpserver.chain.AbstractChain.process(AbstractChain.java:78)
at com.sap.engine.services.httpserver.filters.DSRHttpFilter.process(DSRHttpFilter.java:43)
at com.sap.engine.services.httpserver.chain.ServerFilter.process(ServerFilter.java:12)
at com.sap.engine.services.httpserver.chain.AbstractChain.process(AbstractChain.java:78)
at com.sap.engine.services.httpserver.server.Processor.chainedRequest(Processor.java:475)
at com.sap.engine.services.httpserver.server.Processor$FCAProcessorThread.process(Processor.java:269)
at com.sap.engine.services.httpserver.server.rcm.RequestProcessorThread.run(RequestProcessorThread.java:56)
at com.sap.engine.core.thread.execution.Executable.run(Executable.java:122)
at com.sap.engine.core.thread.execution.Executable.run(Executable.java:101)
at com.sap.engine.core.thread.execution.CentralExecutor$SingleThread.run(CentralExecutor.java:328)
Caused by: com.sap.tc.webdynpro.services.exceptions.ApplicationFaultException: wdDoInit: exception thrown in this user coding area
at com.sap.tc.webdynpro.progmodel.generation.DelegatingComponent.doInit(DelegatingComponent.java:164)
at com.sap.tc.webdynpro.progmodel.controller.Controller.initController(Controller.java:227)
at com.sap.tc.webdynpro.progmodel.components.Component.initController(Component.java:258)
at com.sap.tc.webdynpro.progmodel.controller.Controller.init(Controller.java:206)
at com.sap.tc.webdynpro.clientserver.cal.ClientApplication.init(ClientApplication.java:590)
at com.sap.tc.webdynpro.clientserver.cal.ClientApplication.doPreprocessing(ClientApplication.java:1457)
at com.sap.tc.webdynpro.clientserver.session.ApplicationSession.doPreprocessing(ApplicationSession.java:660)
... 75 more
Caused by: com.sap.tc.webdynpro.progmodel.context.DictionaryException: failed to create provider: com.sap.mw.jco.JCO$Exception: (101) RFC_ERROR_PROGRAM: Parameter containing a user ID is missing: neither user nor user alias nor external ID nor SSO ticket nor X.509 certificate is specified{jco.client.lang=EN, jco.client.client=300, jco.client.passwd=<null>, jco.client.mshost=sapprdcluster, jco.client.group=SAPPRDCLUS, jco.client.r3name=PRD}
at com.sap.tc.webdynpro.progmodel.context.DictionaryHandler.getScalarType(DictionaryHandler.java:378)
at com.sap.tc.webdynpro.progmodel.context.DictionaryHandler.getDataType(DictionaryHandler.java:126)
at com.sap.tc.webdynpro.progmodel.context.DataAttributeInfo.init(DataAttributeInfo.java:438)
at com.sap.tc.webdynpro.progmodel.context.NodeInfo.initUnmappedAttributes(NodeInfo.java:1002)
at com.sap.tc.webdynpro.progmodel.context.DataNodeInfo.doInit(DataNodeInfo.java:294)
at com.sap.tc.webdynpro.progmodel.context.NodeInfo.init(NodeInfo.java:974)
at com.sap.tc.webdynpro.progmodel.context.NodeInfo.init(NodeInfo.java:978)
at com.sap.tc.webdynpro.progmodel.context.Context.init(Context.java:67)
at com.sap.tc.webdynpro.progmodel.controller.Controller.init(Controller.java:205)
at com.sap.tc.webdynpro.progmodel.components.Component.getCustomControllerInternal(Component.java:668)
at com.sap.tc.webdynpro.progmodel.components.Component.getController(Component.java:597)
at com.sap.tc.webdynpro.progmodel.components.Component.getController(Component.java:552)
at com.sap.tc.webdynpro.progmodel.generation.DelegatingComponent.getPublicInterface(DelegatingComponent.java:275)
at com.sap.pcuigp.xssfpm.wd.wdp.InternalFPMComponent.wdGetBackendConnectionsController(InternalFPMComponent.java:190)
at com.sap.pcuigp.xssfpm.wd.FPMComponent.wdDoInit(FPMComponent.java:204)
at com.sap.pcuigp.xssfpm.wd.wdp.InternalFPMComponent.wdDoInit(InternalFPMComponent.java:105)
at com.sap.tc.webdynpro.progmodel.generation.DelegatingComponent.doInit(DelegatingComponent.java:161)
... 81 more
Caused by: com.sap.dictionary.runtime.DdException: failed to create provider: com.sap.mw.jco.JCO$Exception: (101) RFC_ERROR_PROGRAM: Parameter containing a user ID is missing: neither user nor user alias nor external ID nor SSO ticket nor X.509 certificate is specified{jco.client.lang=EN, jco.client.client=300, jco.client.passwd=<null>, jco.client.mshost=sapprdcluster, jco.client.group=SAPPRDCLUS, jco.client.r3name=PRD}
at com.sap.dictionary.runtime.ProviderFactory.internalGetProvider(ProviderFactory.java:291)
at com.sap.dictionary.runtime.ProviderFactory.getProvider(ProviderFactory.java:161)
at com.sap.dictionary.runtime.DdDictionaryPool.getProvider(DdDictionaryPool.java:98)
at com.sap.dictionary.runtime.DdDictionaryPool.makeDictionary(DdDictionaryPool.java:77)
at com.sap.dictionary.runtime.DdDictionaryPool.makeDictionary(DdDictionaryPool.java:65)
at com.sap.dictionary.runtime.DdBroker.getDataType(DdBroker.java:230)
at com.sap.tc.webdynpro.progmodel.context.DictionaryHandler.getScalarType(DictionaryHandler.java:370)
... 97 more
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
at com.sap.dictionary.runtime.ProviderFactory.internalGetProvider(ProviderFactory.java:271)
... 103 more
Caused by: com.sap.mw.jco.JCO$Exception: (101) RFC_ERROR_PROGRAM: Parameter containing a user ID is missing: neither user nor user alias nor external ID nor SSO ticket nor X.509 certificate is specified
at com.sap.mdi.jco6.Factory.makeException(Factory.java:33)
at com.sap.mdi.jco6.Destination.connect(Destination.java:57)
at com.sap.dictionary.runtime.mdi.DataProvider.<init>(DataProvider.java:97)
at com.sap.dictionary.runtime.mdi.DataProvider.<init>(DataProvider.java:115)
... 108 more
Caused by: com.sap.mw.jco.JCO$Exception: (101) RFC_ERROR_PROGRAM: Parameter containing a user ID is missing: neither user nor user alias nor external ID nor SSO ticket nor X.509 certificate is specified
at com.sap.mw.jco.MiddlewareJRfc.generateJCoException(MiddlewareJRfc.java:559)
at com.sap.mw.jco.MiddlewareJRfc$Client.initialize(MiddlewareJRfc.java:1071)
at com.sap.mw.jco.JCO$Client.connect(JCO.java:3654)
at com.sap.mdi.jco6.Destination.connect(Destination.java:54)
... 110 more
Caused by: RfcException: [null]
message: Parameter containing a user ID is missing: neither user nor user alias nor external ID nor SSO ticket nor X.509 certificate is specified
Return code: RFC_INVALID_PARAMETER(19)
error group: 101
key: RFC_ERROR_PROGRAM
at com.sap.mw.rfc.api.RfcOptions.checkLogonData(RfcOptions.java:162)
at com.sap.mw.rfc.api.RfcOptions.checkParameters(RfcOptions.java:345)
at com.sap.mw.jco.MiddlewareJRfc$Client.initialize(MiddlewareJRfc.java:1066)
... 112 more -
Hi Experts,
I have tried the following delete statement but it is taking long time,and it's not giving any result.
DELETE FROM hs_table WHERE sno=1234 and effdt='25-MAY-10';
The records in the table are 90000.
And we are deleting only one report.
Thanks in advance ,
Please help it's very urgent.hoek wrote:
Sorry, typo, it's 'dd-mon-yyyy' and not 'dd-mon=yyyy'...I corrected thatNo need to be sorry, :-)
Actually, Oracle is pretty forgiving about delimiters in dates. Essentially, as long as ther is a single character that cannot be mistaken for a part of a valid date in the string or format mask it should work.
SQL> select to_date('25!MAY@2010', 'dd%mon=yyyy')
2 from dual;
TO_DATE('25
25-May-2010John -
VA05 & VA05N - Taking Long time to Give the Output.
Dear All,
VA05 & VA05N - Taking Long time to Give the Output for
Single date & Single Sales Office
if I create Z-Program (VBAK) also taking Long time for Single date & Single Sales Office.
Please Give some idea to Optimization the VA05 & VA05N.
Please Give your Valuable solution.
Thanks,
Durai.VDear Lakshmipathi,
In my Previous client (ECC 5.0) VA05N Executing very fast for one month date for all sales office.
They running SAP around 3 years, there data also huge but its giving fast output.
But my current client ECC 5.0, here running SAP around 2.5 years, But here taking Long time to give
the output for singe date & one Sales Office.
But Billing details report VF05N Executing very fast.
Thanks,
Durai.V -
I am extracting the data from ECC To bw .but Data Loading taking long tim
Hi All,
i am extracting the data from ECC To BI Syatem..but Data Loading Taking Long time. from last 6 hoursinfopackage is running.still it is showing yellow.Manually i made the red.and delete again i applied repeat of the last delta.but same proble is coming .in the status job is showing bckground job is not finished at source system.we requested to basis.basis people killed that job.again we schedule the chain also again same problem is coming.how can i solve this issue.
Thanks ,
chanduHi,
There are different places to track your job. Once your job is triggered in BW, you can track your load job where exactly it is taking more time and why. Follow below steps:
1) After InfoPackage is triggered, then take the request number and go to source system to check your extraction job status.
You can get the job status by taking the request number from BW and go to transaction SM37 in ECC. Then give the request number with begining '' and ending ''. Also give '*' to user name.
Job name: REQ_XXXXXX
User Name: *
Check the job status whether job is completed or cancelled or short dump. If the job is still running check in SM66 whether you can see any process. If not accordingly you got to check in ST22 or SM21 in ECC. If the job is complete, then the same in BW side now.
2) Check the data arrived in PSA, if not check whether Transfer routines or start routines are having bad SQL or code. Similarly in update rules.
3) Once it is through in Source system (ECC), Transfer rules , Update Rules, then the next task is updating the data might some time take more time which might be based on some parameters ( Number of parallel process to update database ). Check whether updating the database is taking more time and may be you got to check with the DBA guy also.
At all the times you should see minimum of atleast once process running all the time in SM66 till the time your job gets complete. If not you will see a log in ST22.
Let me know if you still have questions.
Assigning points is the only way of saying thanks in SDN.
Thanks,
Kumar. -
SSRS Reports taking long time to load
Hello,
Problem : SSRS Reports taking long time to load
My System environment : Visual Studio 2008 SP1 and SQL Server 2008 R2
Production Environment : Visual Studio 2008 SP1 and SQL Server 2008 R2
I have created a Parameterized report (6 parameters), it will fetch data from 1 table. table has 1 year and 6 months data, I am selecting parameters for only 1 month (about 2500 records). It is taking almost 2 minutes and 30 seconds
to load the report.
This report running efficiently in my system (report load takes only 5 to 6 seconds) but in
production it is taking 2 minutes 30 seconds.
I have checked the Execution log from production so I found the timing for
Data retrieval (approx~) Processing (approx~) Rendering (approx~)
10 second 15 sec
2 mins and 5 sec.
But Confusing point is that , if I run the same report at different time overall output time is same (approx) 2 min 30 sec but
Data retrieval (approx~) Processing (approx~) Rendering (approx~)
more than 1 min 15 sec
more than 1 min
so 1 question why timings are different ?
My doubts are
1) If query(procedure to retrieve the data) is the problem then it should take more time always,
2) If Report structure is problem then rendering will also take same time (long time)
for this (2nd point) I checked on blog that Rendering depends on environment structure e.g. Network bandwidth, RAM, CPU Usage , Number of users accessing same report at a time.
So I did testing of report when no other user working on any report But failed (same result output is 2 min 30 sec)
From network team I got the result is that there is no issue or overload in CPU usage or RAM also No issue in Network bandwidth.
Production Database Server and Report server are different (but in same network).
I checked that database server the SQL Server is using almost Full RAM (23 GB out of 24 GB)
I tried to allocate the memory to less amount up to 2GB (Trial solution I got from Blogs) but this on also failed.
one hint I got from colleague that , change the allocated memory setting from static memory to dynamic to SQL Server
(I guess above point is the same) I could not find that option Static and Dynamic memory setting.
I did below steps
Connected to SQL Server Instance
Right click on Instance go to properties, Go to Memory Tab
I found three options 1) Server Memory 2) Other memory 3) Section for "Configured values and Running values"
Then I tried to reduce Maximum Server memory up to 2 GB (As mentioned above)
All trials failed, this issue I could not find the roots for this issue.
Can anyone please help (it's bit urgent).Hi UdayKGR,
According to your description, your report takes too long to load on your production environment. Right?
In this scenario, since the report runs quickly in developing environment, we initially think it supposed to be the issue on data retrieval. However, based on the information in execution log, it takes longest time on rendering part. So we suggest you optimize
the report itself to reduce the time for rendering. Please refer to the link below:
My report takes too long to render
Here is another article about overall performance optimization for Reporting Services:
Reporting Services Performance and Optimization
If you have any question, please feel free to ask.
Best Regards,
Simon Hou -
The ODS activation is taking long time
Hi,
We are on SAP NetWeaver BI 701 (Support Package 5).
We create a Z ODS, it will contain a lot of data (180.000.000 month-end) and we want to generate specific reports about it.
The activation is taking long time, I assume is because we checked the flag "SIDs Generation upon Activation". I am confused about this check. I really need it? is this check the only problem.
Thanks for you help.
VictoriaHi Victoria:
If your Z DSO is used only for staging purposes (you don't have queries based on this DSO and you send the data to another DSO or to an InfoCube) then you don't need to check the "SIDs Generation Upon Activation" box.
Even more, to achieve better performance during data loads in this scenario, you might consider using a Write Optimized DSO instead of a Standard DSO, but if you decide to take this alternative don't forget to select the "Do Not check Uniqueness of Data" box if you need to write several records with the same Semantic Key.
Regards,
Francisco Milán. -
Hi All,
We are working on BI 7.0. version
In the varaible pop-up screen we have two info objects.
1. Fiscal year Period
2. JOA(Joint operating aggriment)
If u press F4 for JOA, it is taking long time to execute and finally the application is getting closed.same situation is there in RSRT also.
If i enter with out JOA the query is giving the output. Here i have to restrict the query by JOA.
i have changed the JOA peroperties in query designer.
Query execution for filter value selection = Values in master data table.......
but still the situation is the same.......
Could you please suggest any solution for this.....
Thanks & Regards,
PKHi Kamal,
You can set that at the query level in the query designer for each query.
1. Select the corresponding characteristic in the query designer.
2. Goto to the "Extended tab" in the properties
3. Select the "Values in the Master data table" in the "Query execution in the filter value selection.
Also see some recomendations:
Note 748623 - Input help (F4) has a very long runtime - recommendations
Hope this helps.
CK -
Update ztable is taking long time
Hi All,
i have run the 5 jobs with the same program at a time but when we check the db trace
zs01 is taking long time as shown below.here zs01 is having small amount of data.
in the below dbtrace for updating zs01 is taking 2,315,485 seconds .how to reduce this?
HH:MM:SS.MS Duration Program ObjectName Op. Curs Array Rec RC Conn
2:36:15 AM 2,315,485 SAPLZS01 ZS01 FETCH 294 1 1 0 R/3
The code as shown below
you can check the code in the program SAPLZS01 include LZS01F01.
FORM UPDATE_ZS01.
IF ZS02-STATUS = '3'.
IF Z_ZS02_STATUS = '3'. "previous status is ERROR
EXIT.
ELSE.
SELECT SINGLE FOR UPDATE * FROM ZS01
WHERE PROC_NUM = ZS02-PROC_NUM.
CHECK SY-SUBRC = 0.
ADD ZS02-MF_AMT TO ZS01-ERR_AMT.
ADD 1 TO ZS01-ERR_INVOI.
UPDATE ZS01.
ENDIF.
ENDIF.
my question is when updating the ztable why it is taking such long time,
how to reduce the time or how to make faster to update the ztable .
Thanks in advance,
regards
SuniTry the code like this..
data: wa_zs01 type zs01.
FORM UPDATE_ZS01.
IF ZS02-STATUS = '3'.
IF Z_ZS02_STATUS = '3'. "previous status is ERROR
EXIT.
ELSE.
SELECT SINGLE FOR UPDATE * FROM ZS01
WHERE PROC_NUM = ZS02-PROC_NUM.
-- change
CHECK SY-SUBRC = 0.
ADD ZS02-MF_AMT TO wa_ZS01-ERR_AMT.
ADD 1 TO wa_ZS01-ERR_INVOI.
UPDATE ZS01 from wa_zs01.
ENDIF.
ENDIF.
And i think this Select query for ZS01 is inside the ZS02 SELECT statement,
This might also make slow process.
If you want to make database access always use Workarea/Internal table to fetch the data
and work with that.
Accessing database like this or with Select.... endselect is an inefficient programming. -
Simple query is taking long time
Hi Experts,
The below query is taking long time.
[code]SELECT FS.*
FROM ORL.FAX_STAGE FS
INNER JOIN
ORL.FAX_SOURCE FSRC
INNER JOIN
GLOBAL_BU_MAPPING GBM
ON GBM.BU_ID = FSRC.BUID
ON UPPER (FSRC.FAX_NUMBER) = UPPER (FS.DESTINATION)
WHERE FSRC.IS_DELETED = 'N'
AND GBM.BU_ID IS NOT NULL
AND UPPER (FS.FAX_STATUS) ='COMPLETED';[/code]
this query is returning 1645457 records.
[code]PLAN_TABLE_OUTPUT
| Id | Operation | Name | Rows | Bytes | Cost (%CPU)|
| 0 | SELECT STATEMENT | | 625K| 341M| 45113 (1)|
| 1 | HASH JOIN | | 625K| 341M| 45113 (1)|
| 2 | NESTED LOOPS | | 611 | 14664 | 22 (0)|
| 3 | TABLE ACCESS FULL| FAX_SOURCE | 2290 | 48090 | 22 (0)|
| 4 | INDEX RANGE SCAN | GLOBAL_BU_MAPPING_BUID | 1 | 3 | 0 (0)|
| 5 | TABLE ACCESS FULL | FAX_STAGE | 2324K| 1214M| 45076 (1)|
PLAN_TABLE_OUTPUT
Note
- 'PLAN_TABLE' is old version
15 rows selected.[/code]
The distinct number of records in each table.
[code]SELECT FAX_STATUS,count(*)
FROM fax_STAGE
GROUP BY FAX_STATUS;
FAX_STATUS COUNT(*)
BROKEN 10
Broken - New 9
Completed 2324493
New 20
SELECT is_deleted,COUNT(*)
FROM FAX_SOURCE
GROUP BY IS_DELETED;
IS_DELETED COUNT(*)
N 2290
Y 78[/code]
Total number of records in each table.
[code]SELECT COUNT(*) FROM ORL.FAX_SOURCE FSRC-- 2368
SELECT COUNT(*) FROM ORL.FAX_STAGE--2324532
SELECT COUNT(*) FROM APPS_GLOBAL.GLOBAL_BU_MAPPING--9
[/code]
To improve the performance of this query I have created the following indexes.
[code]Functional based index on UPPER (FSRC.FAX_NUMBER) ,UPPER (FS.DESTINATION) and UPPER (FS.FAX_STATUS).
Bitmap index on FSRC.IS_DELETED.
Normal Index on GBM.BU_ID and FSRC.BUID.
[/code]
But still the performance is bad for this query.
What can I do apart from this to improve the performance of this query.
Please help me .
Thanks in advance.<I have created the following indexes.
CREATE INDEX ORL.IDX_DESTINATION_RAM ON ORL.FAX_STAGE(UPPER("DESTINATION"))
CREATE INDEX ORL.IDX_FAX_STATUS_RAM ON ORL.FAX_STAGE(LOWER("FAX_STATUS"))
CREATE INDEX ORL.IDX_UPPER_FAX_STATUS_RAM ON ORL.FAX_STAGE(UPPER("FAX_STATUS"))
CREATE INDEX ORL.IDX_BUID_RAM ON ORL.FAX_SOURCE(BUID)
CREATE INDEX ORL.IDX_FAX_NUMBER_RAM ON ORL.FAX_SOURCE(UPPER("FAX_NUMBER"))
CREATE BITMAP INDEX ORL.IDX_IS_DELETED_RAM ON ORL.FAX_SOURCE(IS_DELETED)
After creating the following indexes performance got improved.
But our DBA said that new BITMAP index at FAX_SOURCE table (ORL.IDX_IS_DELETED_RAM) can cause locks
on multiple rows if IS_DELETED column is in use. Please proceed with detailed tests.
I am sending the explain plan before creating indexes and after indexes has been created.
SELECT FS.*
FROM ORL.FAX_STAGE FS
INNER JOIN
ORL.FAX_SOURCE FSRC
INNER JOIN
GLOBAL_BU_MAPPING GBM
ON GBM.BU_ID = FSRC.BUID
ON UPPER (FSRC.FAX_NUMBER) = UPPER (FS.DESTINATION)
WHERE FSRC.IS_DELETED = 'N'
AND GBM.BU_ID IS NOT NULL
AND UPPER (FS.FAX_STATUS) =:B1;
--OLD without indexes
PLAN_TABLE_OUTPUT
Plan hash value: 3076973749
| Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
| 0 | SELECT STATEMENT | | 141K| 85M| 45130 (1)| 00:09:02 |
|* 1 | HASH JOIN | | 141K| 85M| 45130 (1)| 00:09:02 |
| 2 | NESTED LOOPS | | 611 | 18330 | 22 (0)| 00:00:01 |
|* 3 | TABLE ACCESS FULL| FAX_SOURCE | 2290 | 59540 | 22 (0)| 00:00:01 |
|* 4 | INDEX RANGE SCAN | GLOBAL_BU_MAPPING_BUID | 1 | 4 | 0 (0)| 00:00:01 |
|* 5 | TABLE ACCESS FULL | FAX_STAGE | 23245 | 13M| 45106 (1)| 00:09:02 |
PLAN_TABLE_OUTPUT
Predicate Information (identified by operation id):
1 - access(UPPER("FSRC"."FAX_NUMBER")=UPPER("FS"."DESTINATION"))
3 - filter("FSRC"."IS_DELETED"='N')
4 - access("GBM"."BU_ID"="FSRC"."BUID")
filter("GBM"."BU_ID" IS NOT NULL)
5 - filter(UPPER("FS"."FAX_STATUS")=SYS_OP_C2C(:B1))
21 rows selected.
--NEW with indexes.
PLAN_TABLE_OUTPUT
Plan hash value: 665032407
| Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
| 0 | SELECT STATEMENT | | 5995 | 3986K| 3117 (1)| 00:00:38 |
|* 1 | HASH JOIN | | 5995 | 3986K| 3117 (1)| 00:00:38 |
| 2 | NESTED LOOPS | | 611 | 47658 | 20 (5)| 00:00:01 |
|* 3 | VIEW | index$_join$_002 | 2290 | 165K| 20 (5)| 00:00:01 |
|* 4 | HASH JOIN | | | | | |
|* 5 | HASH JOIN | | | | | |
PLAN_TABLE_OUTPUT
| 6 | BITMAP CONVERSION TO ROWIDS| | 2290 | 165K| 1 (0)| 00:00:01 |
|* 7 | BITMAP INDEX SINGLE VALUE | IDX_IS_DELETED_RAM | | | | |
| 8 | INDEX FAST FULL SCAN | IDX_BUID_RAM | 2290 | 165K| 8 (0)| 00:00:01 |
| 9 | INDEX FAST FULL SCAN | IDX_FAX_NUMBER_RAM | 2290 | 165K| 14 (0)| 00:00:01 |
|* 10 | INDEX RANGE SCAN | GLOBAL_BU_MAPPING_BUID | 1 | 4 | 0 (0)| 00:00:01 |
| 11 | TABLE ACCESS BY INDEX ROWID | FAX_STAGE | 23245 | 13M| 3096 (1)| 00:00:38 |
|* 12 | INDEX RANGE SCAN | IDX_UPPER_FAX_STATUS_RAM | 9298 | | 2434 (1)| 00:00:30 |
Predicate Information (identified by operation id):
PLAN_TABLE_OUTPUT
1 - access(UPPER("DESTINATION")="FSRC"."SYS_NC00035$")
3 - filter("FSRC"."IS_DELETED"='N')
4 - access(ROWID=ROWID)
5 - access(ROWID=ROWID)
7 - access("FSRC"."IS_DELETED"='N')
10 - access("GBM"."BU_ID"="FSRC"."BUID")
filter("GBM"."BU_ID" IS NOT NULL)
12 - access(UPPER("FAX_STATUS")=SYS_OP_C2C(:B1))
31 rows selected
Please confirm on the DBA comment.Is this bitmap index locks rows in my case.
Thanks.>
Maybe you are looking for
-
How can we display Alerts based on Exceptions in BI7
Hi, <b>How can we display Alerts based on Exceptions in BI7?</b> My requirement is a dashboard kind of scenario where the alerts will be displayed using WAD in Portal. In 3.5, we used to schedule the alerts from the Reporting Agent and display that u
-
Schema validation in WL 9.1
I am using WL 9.1 and i get the following errors while validating the schema [webddr] XMLParser - file:///C:/dev/artfrank_Core_4_2_int/WFX_Core/core/stagi ng/resource/auth-service-war/WEB-INF/weblogic.xml (L2,C61): Document root elemen t "weblogic-we
-
Killing a Thread that runs a C code
Hi, In my Java application, i use a library written in C++ using JNI. The tasks that are executed by the C library sometimes take a lot of time, so I was considering adding an option for the user to be able to stop it. As these tasks are running in a
-
Running OSX Update, screen goes black - nothing!! HELP!!
I have an old iMac and I haven't used it for much besides a DVD player in the last 2 years. I'm planning on making it more of an every-day computer and was updating to 10.6.3 so that I could then update to 10.7. While running the 10.6.3 update, it s
-
Is there a scripting feature in Premiere Pro CS4? Answer me, please.