Time out in preselection criteria
Hi
We are facing a time out issue when we try to select a filter in the preselection criteria for infoObject 0EMPLOYEE__0COMP_CODE
For example, we execute a query and the preselection screen appears. We stand up in the
Depl Company Code (0EMPLOYEE__0COMP_CODE) selection button (or press F4) and the report doesn't respond anymore and after a couple of minutes...time out
This is happening in quality and production environment
Can you give us a hand to understand this?
Which could be the possible cause of this?
Thanks a lot for your help!
Hi;
Select the 0EMPLOYEE_0COMP_CODE.
Then go to Advance tab.
Confirm that you have "Posted Values" and "Only Posted values for navigation".
If this doesn't solve it change the last one to "Only Values in Inpoprovider".
Should be good in the variable is in the Characteristic Restriction area then Default values.
Your performance will improve.
Regards;
Ricardo
Similar Messages
-
Time out error 1.6 million internal table fields are computed using FMs
Hi , All ...
The Report running fine in server with less 300 record but ...production server which has 1.6 million record it gives error as time-out error and takes hell amount of time.
Please suggest ugently ..
I have tried few things
Internal table having 1.6 lacs ... fields to compute .. i have token in a batch
loop at i_cinfo into s_cinfo from 1 to 100000.
and so on ...also applied all the performace related .. like indexs, work areas , deleting adjacent duplicates , for all entries ..wherever applicable.
Please Suggest .
Report is as below
REPORT ZUSOTCBD_CREDIT_REPORT .
TABLES : KNA1, " General Data Customer Master
KNB1, " Customer Master (Company Code)
KNC1, " Customer master (transaction figures)
KNKK, " Customer master credit management: Control area data
T009, " Fiscal Year Variants P
T009Y, " Shortened fiscal years in Asset Accounting P
T001, " Co. Codes
T001CM, " Permitted Credit Control Areas per Company Code
RF42B, " Structure to hold credit data.
RF035, " Structure to hold credit managment fields
RF02L, " Structure to hold credit data.
TRAS, " Interval for Days in Arrears P
T000CM. " Data for DSO calculation.
Types
TYPES:
BEGIN OF type_final,
string(50) TYPE c, " String Value for Title
END OF type_final.
data:wa_final TYPE type_final. " Work Area to hold Title Data
DATA: RASID TYPE RF035-RASID value 'R03N'. " For Days in interval
DATA: MONAT(2) TYPE N.
DATA: GJAHR TYPE KNC1-GJAHR.
DATA: LD_PERIODS(32) TYPE N
VALUE '01020304050607080910111213141516'.
DATA sytabix type sy-tabix.
DATA LAND TYPE KNA1-LAND1 VALUE 'US'. " Country Key
DATA: LD_PERIOD TYPE BSID-MONAT, " Fiscal Year Variant
LD_GJAHR TYPE KNC1-GJAHR,
LD_COUNTER TYPE SY-TABIX.
Internal Tables
Internal table to hold Title Data *
DATA:
i_final TYPE STANDARD TABLE OF type_final.
**Internal Table Permitted Credit Control Areas per Company Code
DATA: BEGIN OF TCMTAB OCCURS 10.
INCLUDE STRUCTURE T001CM.
DATA: END OF TCMTAB.
*Internal table to store Customer no.
DATA : BEGIN OF ICUST OCCURS 0,
KUNNR TYPE KNA1-KUNNR, " Customer No.
END OF ICUST.
DATA: BEGIN OF BUKTAB OCCURS 20,
KKBER LIKE T001-KKBER, " Credit Control Area
BUKRS LIKE T001-BUKRS, " Co. Code
WAERS LIKE T001-WAERS, " Currency
PERIV LIKE T001-PERIV, " Fiscal Year Variant
BUTXT LIKE T001-BUTXT,
END OF BUKTAB.
Internal Table to store Fiscal year Data .
DATA: BEGIN OF GJATAB OCCURS 5,
PERIV LIKE T001-PERIV, " Fiscal Year Variant
GJAHR LIKE KNC1-GJAHR, " Fiscal Year
MONAT LIKE T009-ANZBP, "
ANZBP LIKE T009-ANZBP, " Number of posting periods
END OF GJATAB.
*Main Output internal table to be used to store credit history Information
DATA : BEGIN OF I_CINFO occurs 0,
KUNNR TYPE KNB1-KUNNR, " Customer
KNKLI TYPE KNKK-KNKLI, " Customer's account number with credit limit reference
KKBER TYPE KNKK-KKBER, " Credit Control Area
CTLPC TYPE KNKK-CTLPC, " Risk Category
KLIMK TYPE KNKK-KLIMK, " Credit Limit
SBGRP TYPE KNKK-SBGRP, " Credit representative group for credit management
ERDAT TYPE KNKK-ERDAT, " Created On
DTREV TYPE KNKK-DTREV, " Last Internal Review
REVDB TYPE KNKK-REVDB, " Last External Review
SALDO TYPE RF42B-SALDO, " Balance
DSOIN TYPE RF02L-DSOIN, " DSO
H06SA TYPE RF035-H06SA, " Highest Balance at the end of 6 Months
H06JA TYPE RF035-H06JA, " Year highest Balance 6 Months
H06MO TYPE RF035-H06MO, " Month OF hihest Balance 6 Months
H12SA TYPE RF035-H12SA, " Highest Balance at the end of 12 Months
H12JA TYPE RF035-H12JA, " Year highest Balance 12 Months
H12MO TYPE RF035-H12MO, " Month OF hihest Balance 12 Months
UMP2U TYPE RF42B-UMP2U, " Sales from the current Year
UMP1U TYPE RF42B-UMP1U, " Sales from the Previous Year
SFAEL TYPE RF035-SFAEL, " Total Past Due Open Item
SFAE1 TYPE RF035-SFAE1, " Aging buckets 0-15
SFAE2 TYPE RF035-SFAE2, " Aging buckets 16-30
SFAE3 TYPE RF035-SFAE3, " Aging buckets 31-60
SFAE4 TYPE RF035-SFAE4, " Aging buckets 60-90
SFAE5 TYPE RF035-SFAE5, " Aging buckets Over 90
END Of I_CINFO.
DATA : BEGIN OF S_CINFO ,
KUNNR TYPE KNB1-KUNNR, " Customer
KNKLI TYPE KNKK-KNKLI, " Customer's account number with credit limit reference
KKBER TYPE KNKK-KKBER, " Credit Control Area
CTLPC TYPE KNKK-CTLPC, " Risk Category
KLIMK TYPE KNKK-KLIMK, " Credit Limit
SBGRP TYPE KNKK-SBGRP, " Credit representative group for credit management
ERDAT TYPE KNKK-ERDAT, " Created On
DTREV TYPE KNKK-DTREV, " Last Internal Review
REVDB TYPE KNKK-REVDB, " Last External Review
SALDO TYPE RF42B-SALDO, " Balance
DSOIN TYPE RF02L-DSOIN, " DSO
H06SA TYPE RF035-H06SA, " Highest Balance at the end of 6 Months
H06JA TYPE RF035-H06JA, " Year highest Balance 6 Months
H06MO TYPE RF035-H06MO, " Month OF hihest Balance 6 Months
H12SA TYPE RF035-H12SA, " Highest Balance at the end of 12 Months
H12JA TYPE RF035-H12JA, " Year highest Balance 12 Months
H12MO TYPE RF035-H12MO, " Month OF hihest Balance 12 Months
UMP2U TYPE RF42B-UMP2U, " Sales from the current Year
UMP1U TYPE RF42B-UMP1U, " Sales from the Previous Year
SFAEL TYPE RF035-SFAEL, " Total Past Due Open Item
SFAE1 TYPE RF035-SFAE1, " Aging buckets 0-15
SFAE2 TYPE RF035-SFAE2, " Aging buckets 16-30
SFAE3 TYPE RF035-SFAE3, " Aging buckets 31-60
SFAE4 TYPE RF035-SFAE4, " Aging buckets 60-90
SFAE5 TYPE RF035-SFAE5, " Aging buckets Over 90
END Of s_cinfo.
*Internal table to hold month-wise balance.
DATA: BEGIN OF SALTAB OCCURS 12,
LNUMM(2) TYPE N, " Month
SALDO LIKE RF42B-SALDO, " Balance
END OF SALTAB.
*Internal table used for computing the Balance fields
DATA: BEGIN OF SALDO,
UML01 LIKE KNC1-UM01S,
UML02 LIKE KNC1-UM01S,
UML03 LIKE KNC1-UM01S,
UML04 LIKE KNC1-UM01S,
UML05 LIKE KNC1-UM01S,
UML06 LIKE KNC1-UM01S,
UML07 LIKE KNC1-UM01S,
UML08 LIKE KNC1-UM01S,
UML09 LIKE KNC1-UM01S,
UML10 LIKE KNC1-UM01S,
UML11 LIKE KNC1-UM01S,
UML12 LIKE KNC1-UM01S,
END OF SALDO.
Structure to hold Bal fields ------ -------
DATA: BEGIN OF SKNKK,
KUNNR LIKE KNA1-KUNNR, " Customer Number 1: Debitor
KONTO LIKE KNKK-KUNNR,
SFAE1 LIKE RF035-SFAE1, " Aging buckets 0-15
SFAE2 LIKE RF035-SFAE2, " Aging buckets 16-30
SFAE3 LIKE RF035-SFAE3, " Aging buckets 30-60
SFAE4 LIKE RF035-SFAE4, " Aging buckets 60-90
SFAE5 LIKE RF035-SFAE5, " Aging buckets Over 90
SFAEL LIKE RF035-SFAEL, " Total Due of Items
UML01 LIKE KNC1-UM01S,
UML02 LIKE KNC1-UM01S,
UML03 LIKE KNC1-UM01S,
UML04 LIKE KNC1-UM01S,
UML05 LIKE KNC1-UM01S,
UML06 LIKE KNC1-UM01S,
UML07 LIKE KNC1-UM01S,
UML08 LIKE KNC1-UM01S,
UML09 LIKE KNC1-UM01S,
UML10 LIKE KNC1-UM01S,
UML11 LIKE KNC1-UM01S,
UML12 LIKE KNC1-UM01S,
UMP1U LIKE RF42B-UMP1U, " Sales from the Previous Year
UMP2U LIKE RF42B-UMP2U, " Sales from the current Year
SALDO LIKE RF42B-SALDO, " Balance
END OF SKNKK.
DATA : BEGIN OF ICUST1 OCCURS 0,
KUNNR TYPE KNA1-KUNNR, "For Customer Filter.
END OF ICUST1.
**Internal table to hold fiscal varriants
DATA: BEGIN OF LT_PERIODS OCCURS 12,
PERIOD LIKE BSID-MONAT,
GJAHR LIKE KNC1-GJAHR,
END OF LT_PERIODS.
**Constants
constants : BUKRS1 TYPE KNB1-BUKRS VALUE '1000',
BUKRS2 TYPE KNB1-BUKRS VALUE '1031',
Recs Type i value '200',
B_count type i value '2'.
INITIALIZATION
INITIALIZATION.
IF RASID IS INITIAL.
SELECT * FROM TRAS.
EXIT.
ENDSELECT.
IF SY-SUBRC = 0.
RASID = TRAS-RASID.
ENDIF.
ENDIF.
SELECTION-SCREEN
parameters : p_path type rlgrap-filename default 'C:\Documents and Settings\C890971\Desktop\Credit_history.XLS'.
Start of selection processing
START-OF-SELECTION.
**Get Customers for Co. Code 1000 & 1031.
PERFORM GET_CUST.
Get / Compute Credit Information data for Company Codes 1000 & 1031.
PERFORM GET_CREDIT_DATA.
End of selection processing
*END-OF-SELECTION.
Listing Credit History Data
PERFORM DOWNLOAD_CREDIT_DATA.
S U B R O U T I N E S
*& Form GET_CUST
text
--> p1 text
<-- p2 text
FORM GET_CUST .
Get US only Customers.
Refresh icust.
Select kunnr from kna1 appending table icust
where Land1 = land.
**Delete duplicate records
Delete Adjacent duplicates from icust comparing kunnr.
if icust[] is not initial.
Limit the selection some more to Co. Code 1000 & 1031
As join will cost overhead as compared.
Select kunnr from knb1 into table icust1
for all entries in icust
where kunnr = icust-kunnr
and bukrs = bukrs1
OR bukrs = bukrs2.
**Delete duplicate records
Delete Adjacent duplicates from icust1 comparing kunnr.
endif.
**Free memory.
Free icust.
Credit Control Area
select * from T001CM into table TCMTAB
where bukrs = bukrs1 OR
bukrs = bukrs2.
ENDFORM. " GET_CUST
*& Form GET_CREDIT_DATA
text
--> p1 text
<-- p2 text
FORM GET_CREDIT_DATA .
DATA : L_TEXT(60) TYPE C ,
Ltext1(50) type C value 'Computing Credit-History Data For',
Ltext2(10) type C value 'Customers',
L_PCT type i value '10',
L_recs type i,
l_batch_recs type i,
l_s_rec type i value 1,
l_recs1(7) type N.
***Fetch data from KNKK table
PERFORM GET_KNKK_DATA .
***Computing Crredit Fields
**Number of Customers For whom Deatils needed.
Describe table I_CINFO lines l_recs.
l_recs1 = l_recs.
Concatenate Ltext1 l_recs1 Ltext2 into l_text separated by ' '.
PERFORM GET_PGRESS_INDICATOR USING l_text l_pct.
***If records are more than 200000, should be processed batch-wise
If l_recs > recs.
l_batch_recs = abs( l_recs / b_count ).
Do b_count times.
loop at i_cinfo INTO S_CINFO from l_S_REC to l_batch_recs.
**Remember the row
sytabix = sy-tabix.
**Compute DSO
PERFORM GET_DSO_FIELD .
Compute rest credit history data.
PERFORM COMPUTE_SFIELDS.
endloop.
l_S_REC = l_S_REC + l_batch_recs.
l_batch_recs = l_batch_recs + l_batch_recs.
IF l_batch_recs ge l_recs.
l_batch_recs = l_recs.
eNDIF.
Commit up to here to release the DB locks.
Commit work.
enddo.
else.
loop at i_cinfo INTO S_CINFO.
**Remember the row
sytabix = sy-tabix.
**Compute DSO
PERFORM GET_DSO_FIELD .
Compute rest credit history data.
PERFORM COMPUTE_SFIELDS.
endloop.
Endif.
ENDFORM. " GET_CREDIT_DATA
*& Form GET_KNKK_DATA
text
-->P_ICUST_KUNNR text
FORM GET_KNKK_DATA .
if icust1[] is not initial.
SELECT KUNNR KNKLI KKBER CTLPC KLIMK
SBGRP ERDAT DTREV REVDB
from KNKK into corresponding fields of table I_Cinfo
for all entries in icust1
where kunnr = icust1-kunnr.
Delete Adjacent duplicates from i_cinfo comparing kunnr.
endif.
**Free Memory for internal table icust1.
Free icust1.
ENDFORM. " GET_KNKK_DATA
**& Form GET_DSO_FIELD
text
--> p1 text
<-- p2 text
FORM GET_DSO_FIELD .
***Determine DSO Parameter
PERFORM DSO_PARAMETER.
***Compute DSO
CALL FUNCTION 'CUSTOMER_DSO_CALCULATION'
EXPORTING
I_KKBER = s_cinfo-kkber
I_KUNNR = s_cinfo-kunnr
I_ANZBUPER = T000CM-DSOPP
I_XCHILDS = T000CM-DSOCH
I_ACTBALANCE = T000CM-DSOAB
IMPORTING
E_DSOIN = RF02L-DSOIN
EXCEPTIONS
ERROR_MESSAGE = 1.
ENDFORM. " GET_DSO_FIELD
*& Form DSO_PARAMETER
text
--> p1 text
<-- p2 text
FORM DSO_PARAMETER.
IF T000CM-DSOPP IS INITIAL.
SELECT SINGLE * FROM T000CM.
IF SY-SUBRC EQ 0.
IF T000CM-DSOPP IS INITIAL.
T000CM-DSOPP = '003'.
ENDIF.
ELSE.
T000CM-DSOPP = '003'.
T000CM-DSOCH = ' '.
T000CM-DSOAB = 'X'.
ENDIF.
ENDIF.
ENDFORM. " DSO_PARAMETER
--> p1 text
<-- p2 text
FORM PERIODE_ERMITTELN_EXC USING
P03_BUDAT LIKE SYST-DATUM
P03_GJAHR LIKE KNC1-GJAHR
P03_MONAT LIKE MONAT.
CALL FUNCTION 'FI_PERIOD_DETERMINE'
EXPORTING
I_BUDAT = P03_BUDAT
I_PERIV = T001-PERIV
I_BUKRS = T001-BUKRS
I_GJAHR = P03_GJAHR
I_MONAT = P03_MONAT
IMPORTING
E_GJAHR = P03_GJAHR
E_MONAT = P03_MONAT
EXCEPTIONS
ERROR_MESSAGE = 1.
ENDFORM. "PERIODE_ERMITTELN_EXC
*& Form COMPUTE_SFIELDS
text
--> p1 text
<-- p2 text
FORM COMPUTE_SFIELDS .
**Compute Balance
PERFORM GET_SFIELDS .
S_CINFO-DSOIN = RF02L-DSOIN.
S_CINFO-SALDO = RF035-SALDO.
S_CINFO-H06SA = RF035-H06SA.
S_CINFO-H06JA = RF035-H06JA.
S_CINFO-H06MO = RF035-H06MO.
S_CINFO-H12SA = RF035-H12SA.
S_CINFO-H12JA = RF035-H12JA.
S_CINFO-H12MO = RF035-H12MO.
S_CINFO-UMP2U = RF42B-UMP2U.
S_CINFO-UMP1U = RF42B-UMP1U.
S_CINFO-SFAEL = RF035-SFAEL.
S_CINFO-SFAE1 = RF035-SFAE1.
S_CINFO-SFAE2 = RF035-SFAE2.
S_CINFO-SFAE3 = RF035-SFAE3.
S_CINFO-SFAE4 = RF035-SFAE4.
S_CINFO-SFAE5 = RF035-SFAE5.
modify..
MODIFY I_CINFO FROM S_CINFO INDEX sytabix.
CLEAR: S_CINFO,RF035,RF02L, RF42B.
ENDFORM. " COMPUTE_SFIELDS
text
-->P_C_INFO_KUNNR text
FORM GET_CUST_BAL_INFO.
LOOP AT TCMTAB.
CALL FUNCTION 'FI_COMPANY_CODE_DATA'
EXPORTING
I_BUKRS = TCMTAB-BUKRS
IMPORTING
E_T001 = T001
EXCEPTIONS
ERROR_MESSAGE = 1.
IF SY-SUBRC = 0.
MOVE-CORRESPONDING T001 TO BUKTAB.
BUKTAB-KKBER = TCMTAB-KKBER.
COLLECT BUKTAB.
ENDIF.
ENDLOOP.
LOOP AT BUKTAB WHERE PERIV NE SPACE.
GJATAB-PERIV = BUKTAB-PERIV.
COLLECT GJATAB.
ENDLOOP.
CLEAR: MONAT.
LOOP AT GJATAB.
T001-PERIV = GJATAB-PERIV.
CLEAR: GJAHR, MONAT.
PERFORM PERIODE_ERMITTELN_EXC USING SY-DATLO GJAHR MONAT.
CHECK SY-SUBRC = 0.
GJATAB-GJAHR = GJAHR.
GJATAB-MONAT = MONAT.
SELECT SINGLE * FROM T009 WHERE PERIV = GJATAB-PERIV.
IF SY-SUBRC = 0.
GJATAB-ANZBP = T009-ANZBP.
ENDIF.
MODIFY GJATAB.
ENDLOOP.
LOOP AT BUKTAB.
CHECK NOT ( BUKTAB-PERIV IS INITIAL ).
READ TABLE GJATAB WITH KEY BUKTAB-PERIV.
CHECK SY-SUBRC = 0
AND NOT ( GJATAB-GJAHR IS INITIAL ).
CALL FUNCTION 'CUSTOMER_BALANCE'
EXPORTING
KUNNR = S_cinfo-kunnr
BUKRS = BUKTAB-BUKRS
GJAHR = GJATAB-GJAHR
MONAT = GJATAB-MONAT
PERIV = GJATAB-PERIV
ANZBP = GJATAB-ANZBP
XH6MON = 'X'
XH12MON = 'X'
IMPORTING
UMP2U = RF42B-UMP2U
VMP2U = RF42B-UMP1U
SALDO = RF035-SALDO
UML01 = SALDO-UML01
UML02 = SALDO-UML02
UML03 = SALDO-UML03
UML04 = SALDO-UML04
UML05 = SALDO-UML05
UML06 = SALDO-UML06
UML07 = SALDO-UML07
UML08 = SALDO-UML08
UML09 = SALDO-UML09
UML10 = SALDO-UML10
UML11 = SALDO-UML11
UML12 = SALDO-UML12
EXCEPTIONS
NO_BALANCE = 4.
IF SY-SUBRC = 0.
SKNKK-UMP1U = SKNKK-UMP1U + RF42B-UMP1U.
SKNKK-UMP2U = SKNKK-UMP2U + RF42B-UMP2U.
SKNKK-SALDO = SKNKK-SALDO + RF035-SALDO.
SKNKK-UML01 = SKNKK-UML01 + SALDO-UML01.
SKNKK-UML02 = SKNKK-UML02 + SALDO-UML02.
SKNKK-UML03 = SKNKK-UML03 + SALDO-UML03.
SKNKK-UML04 = SKNKK-UML04 + SALDO-UML04.
SKNKK-UML05 = SKNKK-UML05 + SALDO-UML05.
SKNKK-UML06 = SKNKK-UML06 + SALDO-UML06.
SKNKK-UML07 = SKNKK-UML07 + SALDO-UML07.
SKNKK-UML08 = SKNKK-UML08 + SALDO-UML08.
SKNKK-UML09 = SKNKK-UML09 + SALDO-UML09.
SKNKK-UML10 = SKNKK-UML10 + SALDO-UML10.
SKNKK-UML11 = SKNKK-UML11 + SALDO-UML11.
SKNKK-UML12 = SKNKK-UML12 + SALDO-UML12.
ENDIF.
ENDLOOP.
ENDFORM. "
*& Form GET_SFIELDS
text
--> p1 text
<-- p2 text
FORM GET_SFIELDS .
sknkk-kunnr = S_CINFO-KUNNR.
**Clear target to store computed values
CLEAR: RF035.
**Compute Balance fields
PERFORM GET_CUST_BAL_INFO.
REFRESH: SALTAB.
SALTAB-LNUMM = '01'. SALTAB-SALDO = SKNKK-UML01. APPEND SALTAB.
SALTAB-LNUMM = '02'. SALTAB-SALDO = SKNKK-UML02. APPEND SALTAB.
SALTAB-LNUMM = '03'. SALTAB-SALDO = SKNKK-UML03. APPEND SALTAB.
SALTAB-LNUMM = '04'. SALTAB-SALDO = SKNKK-UML04. APPEND SALTAB.
SALTAB-LNUMM = '05'. SALTAB-SALDO = SKNKK-UML05. APPEND SALTAB.
SALTAB-LNUMM = '06'. SALTAB-SALDO = SKNKK-UML06. APPEND SALTAB.
SALTAB-LNUMM = '07'. SALTAB-SALDO = SKNKK-UML07. APPEND SALTAB.
SALTAB-LNUMM = '08'. SALTAB-SALDO = SKNKK-UML08. APPEND SALTAB.
SALTAB-LNUMM = '09'. SALTAB-SALDO = SKNKK-UML09. APPEND SALTAB.
SALTAB-LNUMM = '10'. SALTAB-SALDO = SKNKK-UML10. APPEND SALTAB.
SALTAB-LNUMM = '11'. SALTAB-SALDO = SKNKK-UML11. APPEND SALTAB.
SALTAB-LNUMM = '12'. SALTAB-SALDO = SKNKK-UML12. APPEND SALTAB.
READ TABLE SALTAB INDEX 1.
RF035-H06SA = SALTAB-SALDO.
RF035-H06MO = SALTAB-LNUMM.
RF035-H12SA = SALTAB-SALDO.
RF035-H12MO = SALTAB-LNUMM.
------ SALTAB ---------------------------------------------
LOOP AT SALTAB.
IF SALTAB-SALDO > RF035-H06SA
AND SY-TABIX < 7.
RF035-H06SA = SALTAB-SALDO.
RF035-H06MO = SALTAB-LNUMM.
ENDIF.
IF SALTAB-SALDO > RF035-H12SA
AND SY-TABIX < 13.
RF035-H12SA = SALTAB-SALDO.
RF035-H12MO = SALTAB-LNUMM.
ENDIF.
ENDLOOP.
------ Period--------------------
REFRESH LT_PERIODS.
CLEAR LD_COUNTER.
READ TABLE BUKTAB INDEX 1.
IF SY-SUBRC = 0.
READ TABLE GJATAB WITH KEY BUKTAB-PERIV.
DO GJATAB-MONAT TIMES
VARYING LD_PERIOD FROM LD_PERIODS(2) NEXT LD_PERIODS+2(2)
RANGE LD_PERIODS.
LT_PERIODS-GJAHR = GJATAB-GJAHR.
LT_PERIODS-PERIOD = LD_PERIOD.
LD_COUNTER = LD_COUNTER + 1.
APPEND LT_PERIODS.
ENDDO.
IF LD_COUNTER LT 12.
LD_GJAHR = GJATAB-GJAHR - 1.
CLEAR T009Y.
SELECT SINGLE * FROM T009Y WHERE PERIV = GJATAB-PERIV
AND GJAHR = LD_GJAHR.
DO GJATAB-ANZBP TIMES
VARYING LD_PERIOD FROM LD_PERIODS(2) NEXT LD_PERIODS+2(2)
RANGE LD_PERIODS.
IF T009Y-ANZBP > 0.
CHECK SY-INDEX <= T009Y-ANZBP.
ENDIF.
LD_COUNTER = LD_COUNTER + 1.
LT_PERIODS-GJAHR = LD_GJAHR.
LT_PERIODS-PERIOD = LD_PERIOD.
APPEND LT_PERIODS.
ENDDO.
ENDIF.
IF LD_COUNTER LT 12.
LD_GJAHR = LD_GJAHR - 1.
DO GJATAB-ANZBP TIMES
VARYING LD_PERIOD FROM LD_PERIODS(2) NEXT LD_PERIODS+2(2)
RANGE LD_PERIODS.
LD_COUNTER = LD_COUNTER + 1.
LT_PERIODS-GJAHR = LD_GJAHR.
LT_PERIODS-PERIOD = LD_PERIOD.
APPEND LT_PERIODS.
ENDDO.
ENDIF.
SORT LT_PERIODS BY GJAHR ASCENDING PERIOD ASCENDING.
LD_COUNTER = LD_COUNTER - 12.
DO LD_COUNTER TIMES.
DELETE LT_PERIODS INDEX 1.
ENDDO.
SORT LT_PERIODS BY GJAHR DESCENDING PERIOD DESCENDING.
READ TABLE LT_PERIODS INDEX RF035-H06MO.
RF035-H06MO = LT_PERIODS-PERIOD.
RF035-H06JA = LT_PERIODS-GJAHR.
READ TABLE LT_PERIODS INDEX RF035-H12MO.
RF035-H12MO = LT_PERIODS-PERIOD.
RF035-H12JA = LT_PERIODS-GJAHR.
ENDIF.
**Compute Due Dates fields
PERFORM GET_AGING_BUCKETS .
RF035-SFAE1 = SKNKK-SFAE1.
RF035-SFAE2 = SKNKK-SFAE2.
RF035-SFAE3 = SKNKK-SFAE3.
RF035-SFAE4 = SKNKK-SFAE4 .
RF035-SFAE5 = SKNKK-SFAE5.
ENDLOOP.
ENDFORM. " GET_BALANCE_SFIELDS
*& Form GET_AGING_BUCKETS
text
--> p1 text
<-- p2 text
FORM GET_AGING_BUCKETS .
DATA: BEGIN OF LT_BUKRS OCCURS 0,
BUKRS LIKE T001-BUKRS,
END OF LT_BUKRS.
DATA: BEGIN OF LT_BUKTAB OCCURS 0,
BUKRS LIKE T001-BUKRS,
WAERS LIKE T001-WAERS,
KKBER LIKE T014-KKBER,
END OF LT_BUKTAB.
DATA: LD_LINES LIKE SY-TABIX.
*...performance optimization: for more than one company codes check....*
*...if balances exist and avoid selection of open items, if they don't.*
*...exist..............................................................*
REFRESH LT_BUKRS.
REFRESH LT_BUKTAB.
DESCRIBE TABLE BUKTAB LINES LD_LINES.
IF LD_LINES GT 1.
SELECT DISTINCT BUKRS APPENDING CORRESPONDING FIELDS
OF TABLE LT_BUKRS
FROM KNC1 FOR ALL ENTRIES IN BUKTAB
WHERE BUKRS = BUKTAB-BUKRS AND
KUNNR = Sknkk-KUNNR.
SELECT DISTINCT BUKRS APPENDING CORRESPONDING FIELDS
OF TABLE LT_BUKRS
FROM KNC3 FOR ALL ENTRIES IN BUKTAB
WHERE BUKRS = BUKTAB-BUKRS AND
KUNNR = Sknkk-KUNNR.
SORT LT_BUKRS.
DELETE ADJACENT DUPLICATES FROM LT_BUKRS.
LOOP AT LT_BUKRS.
LOOP AT BUKTAB WHERE BUKRS = LT_BUKRS-BUKRS.
MOVE-CORRESPONDING BUKTAB TO LT_BUKTAB.
APPEND LT_BUKTAB.
ENDLOOP.
ENDLOOP.
ELSE.
READ TABLE BUKTAB INDEX 1.
MOVE-CORRESPONDING BUKTAB TO LT_BUKTAB.
APPEND LT_BUKTAB.
ENDIF.
*...process company codes for customer given by interface..........*
LOOP AT LT_BUKTAB WHERE KKBER = s_cinfo-KKBER.
CALL FUNCTION 'CUSTOMER_DUE_DATE_ANALYSIS'
EXPORTING BUKRS = LT_BUKTAB-BUKRS
KKBER = ' '
KKBER = s_cinfo-KKBER
KUNNR = Sknkk-KUNNR
RASID = RASID
IMPORTING SFAE1 = RF035-SFAE1
SFAE2 = RF035-SFAE2
SFAE3 = RF035-SFAE3
SFAE4 = RF035-SFAE4
SFAE5 = RF035-SFAE5
SFAEL = RF035-SFAEL
EXCEPTIONS NO_OPEN_ITEMS = 4.
IF SY-SUBRC = 0.
*-- RF035 -
SKNKK-SFAE1 = SKNKK-SFAE1 + RF035-SFAE1.
SKNKK-SFAE2 = SKNKK-SFAE2 + RF035-SFAE2.
SKNKK-SFAE3 = SKNKK-SFAE3 + RF035-SFAE3.
SKNKK-SFAE4 = SKNKK-SFAE4 + RF035-SFAE4.
SKNKK-SFAE5 = SKNKK-SFAE5 + RF035-SFAE5.
SKNKK-SFAE5 = SKNKK-SFAE5 + RF035-SFAE5.
SKNKK-SFAEL = SKNKK-SFAEL + RF035-SFAEL.
ENDIF.
ENDLOOP.
ENDFORM. " GET_AGING_BUCKETS
*& Form header
This Subroutine gets data for displaying title *
There are no interface parameters to be passed to this subroutine. *
FORM header .
wa_final-string = text-000. APPEND wa_final TO i_final.
wa_final-string = text-001. APPEND wa_final TO i_final.
wa_final-string = text-002. APPEND wa_final TO i_final.
wa_final-string = text-003. APPEND wa_final TO i_final.
wa_final-string = text-004. APPEND wa_final TO i_final.
wa_final-string = text-005. APPEND wa_final TO i_final.
wa_final-string = text-006. APPEND wa_final TO i_final.
wa_final-string = text-007. APPEND wa_final TO i_final.
wa_final-string = text-008. APPEND wa_final TO i_final.
wa_final-string = text-009. APPEND wa_final TO i_final.
wa_final-string = text-010. APPEND wa_final TO i_final.
wa_final-string = text-011. APPEND wa_final TO i_final.
wa_final-string = text-012. APPEND wa_final TO i_final.
wa_final-string = text-013. APPEND wa_final TO i_final.
wa_final-string = text-014. APPEND wa_final TO i_final.
wa_final-string = text-015. APPEND wa_final TO i_final.
wa_final-string = text-016. APPEND wa_final TO i_final.
wa_final-string = text-017. APPEND wa_final TO i_final.
wa_final-string = text-018. APPEND wa_final TO i_final.
wa_final-string = text-019. APPEND wa_final TO i_final.
wa_final-string = text-020. APPEND wa_final TO i_final.
wa_final-string = text-021. APPEND wa_final TO i_final.
wa_final-string = text-022. APPEND wa_final TO i_final.
wa_final-string = text-023. APPEND wa_final TO i_final.
wa_final-string = text-024. APPEND wa_final TO i_final.
ENDFORM. " header
*& Form DOWNLOADCREDITDATA
text
-->P_P_PATH text
FORM DOWNLOADCREDITDATA USING P_PATH.
DATA:
lw_file2 TYPE string . " File Path
lw_file2 = p_PATH.
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
BIN_FILESIZE = BIN_FILESIZE
filename = lw_file2
filetype = 'DBF'
APPEND = ' '
write_field_separator = ' '
HEADER = '00'
TRUNC_TRAILING_BLANKS = 'X'
WRITE_LF = 'X'
COL_SELECT = 'X'
COL_SELECT_MASK = ' '
DAT_MODE = 'X'
CONFIRM_OVERWRITE = ' '
NO_AUTH_CHECK = ' '
CODEPAGE = ' '
IGNORE_CERR = ABAP_TRUE
REPLACEMENT = '#'
WRITE_BOM = ' '
TRUNC_TRAILING_BLANKS_EOL = 'X'
WK1_N_FORMAT = '0'
WK1_N_SIZE = ' '
WK1_T_FORMAT = ' '
WK1_T_SIZE = ' '
IMPORTING
FILELENGTH = FILELENGTH
TABLES
data_tab = I_CINFO
fieldnames = i_final
EXCEPTIONS
file_write_error = 1
no_batch = 2
gui_refuse_filetransfer = 3
invalid_type = 4
no_authority = 5
unknown_error = 6
header_not_allowed = 7
separator_not_allowed = 8
filesize_not_allowed = 9
header_too_long = 10
dp_error_create = 11
dp_error_send = 12
dp_error_write = 13
unknown_dp_error = 14
access_denied = 15
dp_out_of_memory = 16
disk_full = 17
dp_timeout = 18
file_not_found = 19
dataprovider_exception = 20
control_flush_error = 21
IF sy-subrc <> 0.
Messege
ENDIF. " IF sy-subrc EQ 0
ENDFORM. " DOWNLOADCREDITDATA
*& Form DOWNLOAD_CREDIT_DATA
text
--> p1 text
<-- p2 text
FORM DOWNLOAD_CREDIT_DATA .
PERFORM HEADER.
PERFORM DOWNLOADCREDITDATA USING P_PATH.
ENDFORM. " DOWNLOAD_CREDIT_DATA
*& Form GET_PGRESS_INDICATOR
text
-->P_L_TEXT text
-->P_L_PCT text
FORM GET_PGRESS_INDICATOR USING L_TEXT
L_PCT.
CALL FUNCTION 'SAPGUI_PROGRESS_INDICATOR'
EXPORTING
PERCENTAGE = l_pct
TEXT = l_TEXT.
ENDFORM. " GET_PGRESS_INDICATORIf you are just Downloading to a Flat file then why dont you have logic in place for the program to dump the data read into the file to that point depending on any criteria like accounts or customer then clear the internal table and run it in the back ground.
try to use cursor to read the records from the table which will make it a bit more efficient than plain select stement. -
Greetings,
We are experiencing a very peculiar problem with a custom report where it times out after the stipulated 30 minutes (rdisp/max_wprun_time = 30 minutes). What is unusual is that, the same report, with the same selection criteria, finishes within 20 minutes at some times or even in a lesser duration. I have been unable to establish any correlation between when it runs and when it times out.
Some facts.
1. There are enough free dialog wp, memory and CPU utilization is approximately 50% (or even less) when it does/doesn't finish. By this, I mean that the system is by no means under any kind of stress.
2. Executing the report in the background is an option, but for what the report is meant for, it is necessary to run it in the foreground.
3. I created indices on the tables it reads, which I see being used in the Explain Plan. But using the same indices, the report doesn't finish at other times.
4. The table does an inner join of 2 huge tables; EKPO and EKKO and also an inner join on EBELN and EKET
5. I have checked for locks in the system, but with locks on EKPO and EKKO, the report is still able to finish at some times.
I can probably increase the time limit further, but that is the last thing I would like to do. What is perplexing is that the report finishes within the stipulated time at times. Am I missing something here ? Any help would be greatly appreciated.
Thanks,
KunalJust a followup before I close this thread.
The real issue here is that the report reads table A073 which has grown up to around 1 Gb. With this table being defined as fully buffered, buffering is not possible (or results in an error rather) and large amounts of time is spent reading it. In addition to this, the the program does an inner join of this table on MARA (another huge table).
All the above information was found out courtesy ST05.
Thank you for the inputs as always.
Kunal -
Time out error in report - Urgent
Hi Gurus,
Am developing the report for GL Account summary from tables bkpf, bseg. Due to lot of records in production server it is coming time out error. Please help me regarding this here am attaching my code.
REPORT ZFBLREPORT.
*TABLES : zgltax.
TYPE-POOLS : SLIS.
TYPES : BEGIN OF TY_ZGLTAX,
ZGL TYPE BSEG-HKONT,
ZTAX1 TYPE P DECIMALS 2,
ZTAX2 TYPE P DECIMALS 2,
CAMOUNT TYPE RF42B-SALDO,
PAMOUNT TYPE RF42B-SALDO,
TCAMOUNT TYPE RF42B-SALDO,
TPAMOUNT TYPE RF42B-SALDO,
END OF TY_ZGLTAX.
TYPES : BEGIN OF TY_BKPF,
BELNR TYPE BKPF-BELNR,
BUDAT TYPE BKPF-BUDAT,
END OF TY_BKPF.
TYPES : BEGIN OF TY_BSEG,
BELNR TYPE BSIS-BELNR,
DMBTR TYPE BSIS-DMBTR,
SHKZG TYPE BSIS-SHKZG,
HKONT TYPE BSIS-HKONT,
BUDAT TYPE BSIS-BUDAT,
BUZEI TYPE BSIS-BUZEI,
END OF TY_BSEG.
DATA : IT_FINAL TYPE STANDARD TABLE OF TY_ZGLTAX,
WA_FINAL TYPE TY_ZGLTAX.
DATA : IT_BKPF TYPE STANDARD TABLE OF TY_BKPF,
WA_BKPF TYPE TY_BKPF.
DATA : IT_BSEG TYPE STANDARD TABLE OF TY_BSEG,
WA_BSEG TYPE TY_BSEG.
DATA: CAMOUNT TYPE RF42B-SALDO,
PAMOUNT TYPE RF42B-SALDO.
DATA : INDEX TYPE SY-INDEX.
DATA : ID TYPE SY-TABIX.
DATA : START_DATE TYPE SY-DATUM.
DATA : END_DATE TYPE SY-DATUM.
DATA : START_QUATER TYPE SY-DATUM.
DATA : YEAR1(4) TYPE C.
DATA : T_FIELDALV TYPE SLIS_T_FIELDCAT_ALV.
DATA : IMPORT_VARIANT LIKE DISVARIANT.
DATA : XREPID LIKE SY-REPID.
DATA : LAYOUT TYPE SLIS_LAYOUT_ALV.
SELECTION-SCREEN BEGIN OF BLOCK BK1 WITH FRAME TITLE TEXT-001.
PARAMETER : P_PERIOD(1) TYPE C OBLIGATORY,
P_YEAR(4) TYPE C OBLIGATORY.
SELECTION-SCREEN END OF BLOCK BK1.
AT SELECTION-SCREEN ON P_PERIOD.
IF P_PERIOD > '4' OR P_PERIOD < '1'.
P_PERIOD = ''.
MESSAGE 'Enter Correct Quater Period' TYPE 'E'.
ENDIF.
START-OF-SELECTION.
PERFORM CALC_DATE.
PERFORM BUILD_LOGIC.
PERFORM INITIAL_ALV_FIELDCAT CHANGING T_FIELDALV[].
PERFORM LAYOUT.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
I_CALLBACK_PROGRAM = SY-REPID
I_GRID_TITLE = 'FBT Report'
i_callback_top_of_page = 'FORM_TOP_PAGE'
it_sort = p_sort
IS_LAYOUT = LAYOUT
IT_FIELDCAT = T_FIELDALV[]
I_SAVE = 'A'
TABLES
T_OUTTAB = IT_FINAL.
*& Form calc_date
text
--> p1 text
<-- p2 text
FORM CALC_DATE .
IF P_PERIOD = '1'.
CONCATENATE P_YEAR '04' '01' INTO START_DATE.
CONCATENATE P_YEAR '04' '01' INTO START_QUATER.
CONCATENATE P_YEAR '06' '30' INTO END_DATE.
ELSEIF P_PERIOD = '2'.
CONCATENATE P_YEAR '04' '01' INTO START_DATE.
CONCATENATE P_YEAR '07' '01' INTO START_QUATER.
CONCATENATE P_YEAR '09' '30' INTO END_DATE.
ELSEIF P_PERIOD = '3'.
CONCATENATE P_YEAR '04' '01' INTO START_DATE.
CONCATENATE P_YEAR '10' '01' INTO START_QUATER.
CONCATENATE P_YEAR '12' '31' INTO END_DATE.
ELSEIF P_PERIOD = '4'.
CONCATENATE P_YEAR '04' '01' INTO START_DATE.
YEAR1 = P_YEAR + 1.
CONCATENATE YEAR1 '01' '01' INTO START_QUATER.
CONCATENATE YEAR1 '03' '31' INTO END_DATE.
ENDIF.
ENDFORM. " calc_date
*& Form build_logic
text
--> p1 text
<-- p2 text
FORM BUILD_LOGIC .
SELECT * FROM ZGLTAX INTO CORRESPONDING FIELDS OF TABLE IT_FINAL.
IF IT_FINAL[] IS NOT INITIAL.
LOOP AT IT_FINAL INTO WA_FINAL.
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
EXPORTING
INPUT = WA_FINAL-ZGL
IMPORTING
OUTPUT = WA_FINAL-ZGL.
INDEX = SY-TABIX.
SELECT belnr dmbtr shkzg hkont budat buzei
SELECT *
FROM BSIS
INTO CORRESPONDING FIELDS OF TABLE IT_BSEG
WHERE
BUKRS = '3599' AND
HKONT = WA_FINAL-ZGL
AND GJAHR = P_YEAR.
Uses primary index (4.7)
SELECT *
FROM BSAS
APPENDING CORRESPONDING FIELDS OF TABLE IT_BSEG
WHERE
BUKRS = '3599' AND
HKONT = WA_FINAL-ZGL
AND GJAHR = P_YEAR.
LOOP AT IT_BSEG INTO WA_BSEG .
IF WA_BSEG-BUDAT >= START_DATE AND WA_BSEG-BUDAT <= END_DATE.
IF WA_BSEG-SHKZG = 'S'.
CAMOUNT = CAMOUNT - WA_BSEG-DMBTR.
ELSEIF WA_BSEG-SHKZG = 'H'.
CAMOUNT = CAMOUNT + WA_BSEG-DMBTR.
ENDIF.
ENDIF.
IF WA_BSEG-BUDAT >= START_QUATER AND WA_BSEG-BUDAT <= END_DATE.
IF WA_BSEG-SHKZG = 'S'.
PAMOUNT = PAMOUNT - WA_BSEG-DMBTR.
ELSEIF WA_BSEG-SHKZG = 'H'.
PAMOUNT = PAMOUNT + WA_BSEG-DMBTR.
ENDIF.
ENDIF.
ENDLOOP.
WA_FINAL-CAMOUNT = CAMOUNT.
WA_FINAL-PAMOUNT = PAMOUNT.
WA_FINAL-TCAMOUNT = CAMOUNT * WA_FINAL-ZTAX1 * WA_FINAL-ZTAX2 / (
100 * 100 ).
WA_FINAL-TPAMOUNT = PAMOUNT * WA_FINAL-ZTAX1 * WA_FINAL-ZTAX2 / (
100 * 100 ).
MODIFY IT_FINAL FROM WA_FINAL INDEX INDEX.
REFRESH IT_BSEG.
ENDLOOP.
ENDIF.
ENDFORM. " build_logic
*& Form layout
text
FORM LAYOUT .
LAYOUT-NO_SUBTOTALS = ' '.
ENDFORM. " LAYOUT
*& Form initial_alv_fieldcat
text
-->FIELDCAT text
FORM INITIAL_ALV_FIELDCAT CHANGING FIELDCAT TYPE SLIS_T_FIELDCAT_ALV.
DATA : LS_FIELDCAT TYPE SLIS_FIELDCAT_ALV.
DATA : CNTR TYPE I VALUE 1.
CLEAR LS_FIELDCAT.
CNTR = CNTR + 1.
LS_FIELDCAT-COL_POS = CNTR.
LS_FIELDCAT-FIELDNAME = 'ZGL'.
LS_FIELDCAT-SELTEXT_L = 'GL A/C NO'.
LS_FIELDCAT-OUTPUTLEN = 15.
APPEND LS_FIELDCAT TO FIELDCAT.
CLEAR LS_FIELDCAT.
CNTR = CNTR + 1.
LS_FIELDCAT-COL_POS = CNTR.
LS_FIELDCAT-FIELDNAME = 'ZTAX1'.
LS_FIELDCAT-SELTEXT_L = 'BASE TAX PERCENTAGE'.
LS_FIELDCAT-OUTPUTLEN = 15.
APPEND LS_FIELDCAT TO FIELDCAT.
CLEAR LS_FIELDCAT.
CNTR = CNTR + 1.
LS_FIELDCAT-COL_POS = CNTR.
LS_FIELDCAT-FIELDNAME = 'ZTAX2'.
LS_FIELDCAT-SELTEXT_L = 'TAX PERCENTAGE'.
LS_FIELDCAT-OUTPUTLEN = 15.
APPEND LS_FIELDCAT TO FIELDCAT.
CLEAR LS_FIELDCAT.
CNTR = CNTR + 1.
LS_FIELDCAT-COL_POS = CNTR.
LS_FIELDCAT-FIELDNAME = 'CAMOUNT'.
LS_FIELDCAT-SELTEXT_L = 'CUMULATIVE AMOUNT'.
LS_FIELDCAT-OUTPUTLEN = 20.
APPEND LS_FIELDCAT TO FIELDCAT.
CLEAR LS_FIELDCAT.
CNTR = CNTR + 1.
LS_FIELDCAT-COL_POS = CNTR.
LS_FIELDCAT-FIELDNAME = 'TCAMOUNT'.
LS_FIELDCAT-SELTEXT_L = 'Cumulative Tax % Amount'.
LS_FIELDCAT-OUTPUTLEN = 20.
APPEND LS_FIELDCAT TO FIELDCAT.
CLEAR LS_FIELDCAT.
CNTR = CNTR + 1.
LS_FIELDCAT-COL_POS = CNTR.
LS_FIELDCAT-FIELDNAME = 'PAMOUNT'.
LS_FIELDCAT-SELTEXT_L = 'AMOUNT FOR PERIOD'.
LS_FIELDCAT-OUTPUTLEN = 20.
APPEND LS_FIELDCAT TO FIELDCAT.
CLEAR LS_FIELDCAT.
CNTR = CNTR + 1.
LS_FIELDCAT-COL_POS = CNTR.
LS_FIELDCAT-FIELDNAME = 'TPAMOUNT'.
LS_FIELDCAT-SELTEXT_L = 'Tax AMOUNT FOR PERIOD'.
LS_FIELDCAT-OUTPUTLEN = 20.
APPEND LS_FIELDCAT TO FIELDCAT.
ENDFORM. "initial_alv_fieldcat
Points will be awarded
Regards
RaviHi Ravi kanth,
You are using select * statement which is very time consuming and low performance. Dont use select * instead use select field1 field2.... into table itab where field1 = s_field. Use corresponding field names in the select statement.
Follow the below rules.
1) Dont use nested select statements
2) If possible use for all entries in addition
3) In the where addition make sure you give all the primary key
4) Use Index for the selection criteria.
5) You can also use inner joins
6) You can try to put the data from the first select statement into an Itab and then in order to select the data from the second table use for all entries in.
7) Use the runtime analysis SE30 and SQL Trace (ST05) to identify the performance and also to identify where the load is heavy, so that you can change the code accordingly
<b>reward if useful</b>.
Regards,
sunil kairam. -
P & L Report using Report Painter does not run in PRD client ( time out)
Hi SAP Gurus
We created a P & L Statement on the basis of GLPCT table. We incorporated Accounts groups from a financial statemen version using KE5B in profit center accounting.
Report contains Account groups as well as profit centre group.
It takes around 5- 10 minutes to run in DEV client but in PRD it takes a lot of time and times out after a while.
Any suggestions....??
Regards
SatishHi Satish,
Use all the Index fields(Profit-center-based index) which are active for the table GLPCT in the Selection screen of the report and use maximum selection criteria.The processing time will improve to some extent.
~Andrew
Good you got the solution from the Basis Team, probably they might have increased the processing time limit of the report.But to increase the efficiency of the program the above will work.
Edited by: Andrew J on Jan 24, 2011 4:53 PM
One more tip for tuning the performance -
Workflow Subscription Time out
Hi,
I did a simple subscription workflow on manual activity. When status change from Pending to In Progress, I set a field. The workflow works fine almost all
day. However, I had seen many time out exceptions on event viewer e some other systems workflows with the error
“The database subscription query is longer
than expected. Check the database or simplify the database subscription criteria.
The following errors were encountered:
Exception message: Subscription query is taking long.
Subscription id: df0dcc33-a1c4-643c-4a03-319974477d75
Time spent in new state: 00:00:10.0138210
Time spent in querying state: 00:00:10.0648946
One or more subscriptions were affected by this.
Subscription name: ServiceManager.ActivityManagement.ActivityStatusChangedRule”
As I use powershell script to change a field activity, I would like call a .Net code beside powershell to increase performance. Anybody could send me a documentation about
this? What’s best practice to customization workflow at Service Manager?
JuanHi,
This is an indication that the database is being overwhelmed by the activity happening on the database. It could be because there are too many workflows. It could be because there are some connectors running that are hammering the database. It
could also be that there are too many users updating the database. It could also be that the subscription criteria is too complicated and involves too many table joins. Or it could be some combination of all of those things. If you see this
event consistently for one particular subscription and not others that is an indication that the criteria for that particular subscription may be too complicated or there are a lot of transactions that are happening frequently for the target class of that
subscription.
Please refer to the article below to troubleshoot this issue:
Troubleshooting Workflow Performance and Delays
http://blogs.technet.com/b/servicemanager/archive/2013/01/14/troubleshooting-workflow-performance-and-delays.aspx
And here is a similar thread for your reference:
https://social.technet.microsoft.com/Forums/systemcenter/en-US/9b0ead30-80e7-4147-8b16-c88cc1f9cd94/sql-query-warning-on-scsm-server
Regards,
Yan Li
Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact [email protected] -
ABAP Program analysis with se30 how to avoid time out ?
Hi Gurus,
my problem is that I would like to analysis the performance issues of an ABAP Specific transaction.
BAsically, I launch se30, provide transaction code under transaction field and click on execute.
This launch transaction and then I put parameters and :
a ) launch transcation
b ) launch in background immediate.
In both cases it doesn't work due to time out and I never obtain a usefull result.
My question is : how can I use to analys such a transaction and avoid time out problem ?
Thanks for your help,
Regards
MorganOne way would be to limit the selection criteria in such a way that the processed data is still representative but it finishes before the time out.
Even when a time out occurs, there should already be a trace file up to that point that you can evaluate. Depends on your processing logic, if it is one big outer loop it might be valid data, if you have several independent blocks, then you might be missing something important.
There is also the option "in parallel mode" where you can capture running BDC processes for analysis, maybe try this option as well. The trace file might grow pretty big though the longer your process runs, depending on aggregation level.
Thomas -
SXMB_MONI not Responding - Time Out
Hi All,
I am unable to see the processed XML messaged using the tcode SXMB_MONI.
When I enter the selection criteria of the messages and execute it the GUI doesn't respond for sometime and finally throws a time out exception.
Can somebody help me to solve this issue?
Any configurations do we need to do when the tcode deosn't respond?
Helpful Answers will be rewarded points.
Thanks & Regards,
ZabiullaHi,
can you check if your database performs well?
what database system do you have ?
for oracle, check with Note 1020260 - Delivering Oracle statistics
for sqlserver, Note 1124574 - Performance improvement for 'SQL Server' in trans SXMB_MONI
cheers,
Aaron -
WE05 takes a long time and ended with error message: time out
Hello,
When user trying to use WE05 transaction it takes more time and ended with error message time out.In the WE05 tranaction even i tried with minimal search options(like for just 2hrs duration,for one day) still getting the same error.I think there must be problem in EDIDC table.
Please suggest solution for this????
Regards,
Loki.You have to enter the selection ctiteria on WE05, might be there is a huge data on these tables. So the best option is to enter the selection criteria as much as you can to get the IDOC list. Also check the sie of EDIDC table and analyse the number of IDOC on that table. Make sure that index are updated of the table
Regards,
Subhash -
SSO Partner Application and Session Time out
Hi ,
We have an application on forums.oracle.com which is implementing the Authentication scheme as SSO, that is working well, now we want to implement Session Time out if the user is idle for some time and ask him to login again after the session fails, I have tried to implement this feature as given by Scott in the thread session timeout , well the problem is since we dont have a login page here how do we set the cookies owa_cookie.send(
name => 'HTMLDB_IDLE_SESSION',
value => to_char(sysdate+(20/1440),'DD-MON-YYYY HH24:MI:SS'),
expires => null,
path => '/',
domain => null
and where is the current point to implement it.
Any help on this is greatly welcome.
Thanks in Advance.Naveen,
I don't remember how the solution works. But if you don't have a login page you can usually put code in the post-authentication process of your authentication scheme to do whatever the login page process would have done.
Scott -
Dear All,
We have a business requirement to monitor and optimize the CRM WEB UI timeout and other related issues.
I would like to have time-out pop-up for the call center agents and hence they could better manage the sessions .
This will avoid loosing the valuable customer data for the session and so on.
We are now working on the following threads with CRM Technical folks.
Please share your experience or the detailed steps if you had implemented already.
SAP note 1877120 - CRM-IC: session timeout issue with CRM 7 EHP1 and higher
Also , have a look http://scn.sap.com/community/crm/webclient-ui-framework/blog/2012/05/17/session-time-out-warning-message-on-ui
2092893 - Session Time Out Notification
Regards
VenkatHello Venkat,
For business roles of type IC Webclient, you have to implement SAP Note 1877120. Don't forget to update your view layout in your custom enhancement if you have enhanced CRMCMP_IC_FRAME/HiddenView.
After implementation of 1887120, also implement 1977631 and 1955366.
Best Regards,
Sigrid -
RCA Connection Pool idle Time-Out takes no effect !
My question description goes here.
According to JCA specification, I developed my 'ManagedConnectionImpl' class from the interface 'ManagedConnection'. I realize the 'destroy()' function to send out logout request to the EIS.
Then I deployed the connector in Sun Java System Application Server, I noticed there are two parameters in Connection Pool part, they are:
1. Idle Timeout. It said it's the maximum time that a connection can remain idle in the pool. I assume the connection will be removed after the specific time expired and before it's removed it will call the recallable function, 'destroy()', in my concrete class, 'ManagedConnectionImpl'.
2. Pool Resize Quantity. it said it's number of connections to be removed when pool idle time expired.
I am weird about it. I think EIS had itself session control strategy, if the specific session time-out expired, it will invalidate this session. So I think we will set 'Idle Timeout' in application server to be shorter than the EIS session time-out. If the 'Idle Timeout' in application server expired, it should remove all connections inside otherwise maybe the connection with invalid session will exist! (the background knowledge is our system will return back soap fault when it meets invalid session, so the invalid connections will not be removed by switching on your configuration item, 'On Any Failure')
So I set "inital and minimum pool size" to 8, "maximum pool size" to 32 and "Pool Resize Quantity" to 32. (I expect AS to remove all when pool idle time expired)
After deploying, I send out requests at the first round and wait for the time expired but I can't see the desired logout requests from pool automatically even one. Firstly I guess if my recallable function definition is wrong but when I shut down the Application Server, the desired logout requests are sent out from pool automatically. So I think my recallable function definition is workable.
What's your comments on it?
P.S.
I am using Sun Java System Application Server 8.1.
Thanks in advance!
BRs
/LeoI have had following test to ensure I sent out notification to listener.
[#|2005-08-23T16:14:25.061+0800|INFO|sun-appserver-pe8.1_01|javax.enterprise.system.stream.out|_ThreadID=12;|
It's in managed env!|#]
[#|2005-08-23T16:14:25.062+0800|INFO|sun-appserver-pe8.1_01|javax.enterprise.system.stream.out|_ThreadID=12;|
enter matchManagedConnections() !|#]
[#|2005-08-23T16:14:25.062+0800|INFO|sun-appserver-pe8.1_01|javax.enterprise.system.stream.out|_ThreadID=12;|
try to find a matching and existing one, reuse it!|#]
[#|2005-08-23T16:14:25.062+0800|INFO|sun-appserver-pe8.1_01|javax.enterprise.system.stream.out|_ThreadID=12;|
Found a matching and existing one, reuse it!|#]
[#|2005-08-23T16:14:25.495+0800|INFO|sun-appserver-pe8.1_01|javax.enterprise.system.stream.out|_ThreadID=12;|
tearDown() is called, the application-level connection is released!|#]
[#|2005-08-23T16:14:25.496+0800|INFO|sun-appserver-pe8.1_01|javax.enterprise.system.stream.out|_ThreadID=12;|
enter calling close() of managed connection.|#]
[#|2005-08-23T16:14:25.496+0800|INFO|sun-appserver-pe8.1_01|javax.enterprise.system.stream.out|_ThreadID=12;|
Start calling close() of managed connection.|#]
[#|2005-08-23T16:14:25.496+0800|INFO|sun-appserver-pe8.1_01|javax.enterprise.system.stream.out|_ThreadID=12;|
start to notify the listener the completeness of connection.|#]
[#|2005-08-23T16:14:25.496+0800|INFO|sun-appserver-pe8.1_01|javax.enterprise.system.stream.out|_ThreadID=12;|
notify the listener the completeness of connection successfully.|#]
Whether it's related with the initial and minimum number parameter? Although I found it will not be created during AS start-up and will be created at the first request.
Whether it shall be kept to meet the minimum requirement? I have failed to set it to 0. -
Getting time out error when running the assigned verification in DRM 9.3.2.
Hi,
I have installed DRM 9.3.2.0.0 in my system (windows 7), when i am trying to run assigned verifications i am getting the time out error within a minute.
As suggested by oracle,I have added DWORD with value 480000 under Master Data Management in Registry editor. But still getting the error.
Please suggest a solution for this issue.
regards,
sathiyaPlease suggest me the solution.
regards,
sathiya -
Session time out when trying to redeem card!?
hi, I have tried to redeem my card 5 times now, and itunes keeps saying "session time out your sessions has timed out please try this operation from beginning" I am dualbooting windows xp and windows 7, I have used both OS's and still the same thing. when I try to redeem it on my ipod touch it tells me I have the wrong code. I do not have a mac availble im on vecation and only brought the PC laptop.
if it matters im using the itunes canadian store.This worked for me:
Establish in her router a WEP 128 bit data encryption password. (Post back if you need help on this). Apparently macs have slightly different Airport drivers and work better with WEP 128 bit than with WPA although this doesn't explain why my friend's MB had your mum-in-law's problem but could connect to my WPA protected network - go figure! Anyway, try a different password encryption and see if that works.
As for not sending mail, check with your Mail Server what the SMTP setting should be.
Joe -
I keep getting session time out whenever I try to purchase apps on iPhone 5. It keeps asking me to verify my credit card security number and then when I click DONE, it tells me session time out. Anyone can help?
Having problem with internet connectivity on WIFI - anything that depends on DNS for data whether it is a web browser or an app while using WIFI. I call this problem "WIFI Lockout".
This happens on iphone 4, ipad 2 and ipad 3 that has been updated to iOS 6.
I am not talking about the issue of the missing apple page (day 1) or the inability to turn on/configure WIFI after updating to iOS 6.
This is what i have discovered so far.
You could be in the middle of surfing or using any app that makes data calls based on DNS (when you type google.com that is translated in the background so your device knows where to go - summary only) and suddenly you can go no where or do nothing!
Sometimes conectivity goes trouble free for long periods, other times it is repetitive "WIFI Lockout".
Yea sure, you can restart the WIFI connection, but WHO wants to CONTINUALLY do that?
Interestingly enought the device is still successfully connected to the internet via WIFI, but DNS request fail to pass successfully from the iOS 6 device.
Apple (or any curious iOS 6 user that wants to see my point), when this happens "WIFI Lockout" open up a browser before you reset the WIFI connection and type type 74.125.227.144 (google) and then “go” (I tried both safari and chrome). A google search page will come up and you will be able to execute a search (of course any link you click on will not work as it is dependant on DNS resolution).
The above IP connection to google proves NON DNS traffic works, so the issue is not the WIFI connection to the access point that is the problem. It is not an access point configuration/firmware or security protocol issue either because data does pass when the above steps are followed.
I KNOW THIS IS NOT ALL OF THE PROBLEMS WITH iOS 6, BUT THIS IS A HUGE PROBLEM NOT BEING ABLE TO SURF OR GET DATA THE iOS 6 DEVICE IS REQUESTING WHILE ON WIFI.
Maybe you are looking for
-
Stage dimensions(size) in Flash CS4 (AS3)
Hi again, I need to know how to get the dimensions of my stage (x,y), BUT only the stage and not all the objects that might continue off the stage included. For example : My stage is 400 x 550. I want to get 400 and 550 returned. Thank you
-
Export to Excel Failed - Unexpected Error
I am trying to export a PDF document to Excel. The PDF uploads no problem but then the exporting process takes several minutes before ending with an error message. Export failed, unexpected error. Please advise.
-
After downloading Maverick I cannot save or email scans from my HP L7780. I receive error message "An error has occurred saving the file because it could not be written to. Check the properties for the file to make sure it is not read-only.
-
Adding objects into query Panel and no display report
Hi Folks, I had an issue with WEBI . Iam running the report with few objects at first time , all objects are displayed in the table format of report. I saved and closed the report . Later i opened the report and edited the report by adding new obje
-
Different picture to be displayed for a specific range of values in waveform chart
Hello there! I'm making a VI that is like a rainfall meter reader that displays an image of what will happen with a place with that amount of rain and will display a message (which will show on the string). Here is a picture of the FP. The mm of rain