HORGUNIT data cant able to delete. Pls help on this.
Hi BW Experts,
I am trying to delete the master data from "0ORGUNIT".I have selected by right clicking " Delete master data". It is throwing message as " Not all master data are deleted".I have checked using the TCODE : SLG1 and specified the parameters as RSMD and MS_DEL.
It is showing that "Master data 89990175 (SID 89990175) is used in /BI0/HORGUNIT and, therefore, not deleted. I hope some data is available in Hierachy table.I dont know how to delete the data from this Characteristic (0ORGUNIT).
Can u please help on this issue.
Thanks in advance.
Thanks,
Ram.
Hi Praveen,
Thanks a lot. Well done.
Full points assigned.
Thanks,
Jelina
Similar Messages
-
while updating the older version iTunes to latest one it shows "a network error occurred while attempting to read from the file: C:\windows\installer\iTunes64.msi. pls help on this matter to connect my i5 to PC. Thanks in advance
(1) Download the Windows Installer CleanUp utility installer file (msicuu2.exe) from the following Major Geeks page (use one of the links under the "DOWNLOAD LOCATIONS" thingy on the Major Geeks page):
http://majorgeeks.com/download.php?det=4459
(2) Doubleclick the msicuu2.exe file and follow the prompts to install the Windows Installer CleanUp utility. (If you're on a Windows Vista or Windows 7 system and you get a Code 800A0046 error message when doubleclicking the msicuu2.exe file, try instead right-clicking on the msicuu2.exe file and selecting "Run as administrator".)
(3) In your Start menu click All Programs and then click Windows Install Clean Up. The Windows Installer CleanUp utility window appears, listing software that is currently installed on your computer.
(4) In the list of programs that appears in CleanUp, select any iTunes entries and click "Remove", as per the following screenshot:
(5) Quit out of CleanUp, restart the PC and try another iTunes install. Does it go through properly this time? -
Hi,
I need a help to resolve my problem.Actually i have a JSP page with a list box. When i select some value in the list box, appropriate values must list out according to the selected value.And i have a submit button to process that jsp page.
I wrote a validation as all the fields must be entered to submit a page.
But when i tried with the following code,it's just moving to processing page when i select a values from the list box.This is happening when i cheked the validation.
Pls help with this code.This is very urgent.
Code is as follows
"Example1.jsp"
<%
String str1 = request.getParameter("Modem");
%>
<html>
<head>
<script language = "JavaScript">
function Validate()
if(document.UpdateFiosAccounts.Modem.value == "Select One")
alert("Please select the value")
document.UpdateFiosAccounts.Modem.focus()
return false
if(document.UpdateFiosAccounts.text1.value == "")
alert("Please type some text")
document.UpdateFiosAccounts.text1.focus()
return false
return true
</script>
</head>
<body>
<form name = "UpdateFiosAccounts" action="./Example1.jsp" method ="post" onSubmit= "return Validate()">
Pls select One:<select name="Modem" size="1" onChange="document.UpdateFiosAccounts.submit()">
<%
if(str1 == null)
%>
<option value="Select One">Select One</option>
<option value="One">One</option>
<option value="Two">Two</option>
<option value="Three">Three</option>
<option value="Four">Four</option>
<%
else
%>
<option value="<%=str1%>"><%=str1%></option>
<%
%>
</select><br>
Pls type something: <input type ="text" name="text1">
<input type ="submit" value="submit" onClick="document.UpdateFiosAccounts.action='./Accounts.jsp'">
</form>
</body>
</html>Hi! The reason is that in the onChange property you are doing the submit, so, when you select something, it goes automatically and never pases through your validation function. So, remove that onChange. Next, the button is a submit buton, so, no matter what your validation does, the page will go. You need to change the submit type of the button to just button (<input type="button" onclick="function to validate">) and then you will get what you want. By the way, this is NOT a Java question, is more JavaScript question.
Hope this helps. -
hi my id is do** @gmail.com, I buy from BG Globul on 9.9.2013. When i upgrade on ios 7 i cant activte becouse when i enter id and pass for appstore i see that i cant activate the phone with this id.
I dont have another id
Pls help me!
<Personal Information Edited by Host>Hello GDonkov,
I'd suggest taking a look through the following article for information and steps that can help get your iPhone activated.
iPhone: Troubleshooting activation issues
http://support.apple.com/kb/TS3424
Cheers,
Allen -
Download data to Excel- very urgent pls help
Hi Experts
Following is my coding. i need to download and save the it_material table as Excel file.
pls help me out
REPORT zvio1001 LINE-SIZE 190
LINE-COUNT 55
MESSAGE-ID zz
NO STANDARD PAGE HEADING.
TABLES: mara,marce,makt,marc,mvke,zmpkg,t005t,cdhdr.
DATA : BEGIN OF it_mara OCCURS 0,
mandt LIKE mara-mandt, "Client
matnr LIKE mara-matnr,
meins LIKE mara-meins,
laeda LIKE mara-laeda,
aenam LIKE mara-aenam,
END OF it_mara.
DATA : BEGIN OF it_marc OCCURS 0,
matnr LIKE marc-matnr,
werks LIKE marc-werks,
END OF it_marc.
DATA : BEGIN OF it_makt OCCURS 0,
matnr LIKE makt-matnr,
maktx LIKE makt-maktx,
END OF it_makt.
DATA : BEGIN OF it_zmpkg OCCURS 0,
matnr LIKE makt-matnr,
zppqt LIKE zmpkg-zppqt,
zspqt LIKE zmpkg-zspqt,
zpmqt_3 LIKE zmpkg-zpmqt_3,
END OF it_zmpkg .
DATA : BEGIN OF it_material OCCURS 0,
mandt LIKE mara-mandt, "Client
werks LIKE marc-werks,
matnr LIKE marc-matnr,
maktx LIKE makt-maktx,
meins LIKE mara-meins,
zppqt LIKE zmpkg-zppqt,
zspqt LIKE zmpkg-zspqt,
zpmqt_3 LIKE zmpkg-zpmqt_3,
laeda LIKE mara-laeda,
aenam LIKE mara-aenam,
date LIKE sy-datum,
time LIKE sy-uzeit,
user LIKE sy-uname,
END OF it_material.
P a r a m e t e r s *
Start of tabbed screens
SELECTION-SCREEN BEGIN OF TABBED BLOCK list FOR 20 LINES.
SELECTION-SCREEN TAB (30) gc_gen USER-COMMAND gen_tab
DEFAULT SCREEN 1001.
SELECTION-SCREEN TAB (30) gc_view USER-COMMAND view_tab
DEFAULT SCREEN 1002.
SELECTION-SCREEN TAB (30) gc_outp USER-COMMAND outp_tab
DEFAULT SCREEN 1003.
SELECTION-SCREEN END OF BLOCK list.
SELECTION-SCREEN BEGIN OF SCREEN 1001 AS SUBSCREEN.
SELECTION-SCREEN BEGIN OF BLOCK box01 WITH FRAME TITLE text-401.
PARAMETERS : p_werks LIKE marc-werks OBLIGATORY.
PARAMETERS : p_vkorg LIKE mvke-vkorg OBLIGATORY.
SELECT-OPTIONS : s_matnr FOR mara-matnr.
SELECT-OPTIONS : s_mtart FOR mara-mtart.
SELECT-OPTIONS : s_mmsta FOR marc-mmsta. "A01
SELECT-OPTIONS : s_dispo FOR marc-dispo.
SELECT-OPTIONS : s_beskz FOR marc-beskz.
SELECT-OPTIONS : s_lgpro FOR marc-lgpro.
SELECT-OPTIONS : s_lgfsb FOR marc-lgfsb.
SELECTION-SCREEN SKIP.
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 1(31) text-014.
PARAMETERS : p_repall RADIOBUTTON GROUP sel2 DEFAULT 'X'.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 1(31) text-011.
PARAMETERS : p_change RADIOBUTTON GROUP sel2.
SELECTION-SCREEN COMMENT 36(1) text-013.
PARAMETERS : p_chgdat LIKE sy-datum DEFAULT sy-datum.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN SKIP.
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 1(31) text-010.
PARAMETERS : p_excdel AS CHECKBOX DEFAULT 'X'.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN END OF BLOCK box01.
SELECTION-SCREEN END OF SCREEN 1001.
View Selection Screen
SELECTION-SCREEN BEGIN OF SCREEN 1002 AS SUBSCREEN.
SELECTION-SCREEN BEGIN OF BLOCK box05 WITH FRAME TITLE text-403.
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 1(77) text-109.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 1(31) text-021.
PARAMETERS: p_sales AS CHECKBOX DEFAULT 'X'.
SELECTION-SCREEN COMMENT 38(20) text-022.
PARAMETERS: p_mrp AS CHECKBOX DEFAULT 'X'.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 1(31) text-023.
PARAMETERS: p_store AS CHECKBOX DEFAULT 'X'.
SELECTION-SCREEN COMMENT 38(20) text-024.
PARAMETERS: p_accnt AS CHECKBOX DEFAULT 'X'.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 1(31) text-025.
PARAMETERS: p_cost AS CHECKBOX DEFAULT 'X'.
SELECTION-SCREEN COMMENT 38(20) text-026.
PARAMETERS: p_purch AS CHECKBOX DEFAULT 'X'.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN END OF BLOCK box05.
SELECTION-SCREEN END OF SCREEN 1002.
SELECTION-SCREEN BEGIN OF SCREEN 1003 AS SUBSCREEN.
extract format selection
SELECTION-SCREEN BEGIN OF BLOCK box04 WITH FRAME TITLE text-402.
PARAMETERS : p_vari LIKE ltdxt-variant OBLIGATORY.
SELECTION-SCREEN SKIP.
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 1(31) text-009.
PARAMETERS: p_report RADIOBUTTON GROUP sel1 DEFAULT 'X'.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 1(31) text-016.
PARAMETERS : p_repcoo RADIOBUTTON GROUP sel1.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 1(31) text-017.
PARAMETERS : p_reppak RADIOBUTTON GROUP sel1.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN SKIP.
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 1(31) text-008.
PARAMETERS: p_extun RADIOBUTTON GROUP sel1.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN SKIP.
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 1(31) text-007.
PARAMETERS: p_extpc RADIOBUTTON GROUP sel1.
SELECTION-SCREEN END OF LINE.
PARAMETERS: p_pcfile LIKE rlgrap-filename
DEFAULT 'c:\#ups\CLIENTIDCCYYMMDDHHMMSS.ITM'.
DEFAULT 'd:\P0121205MMM_YYYYMMDD HHMMSS.XLS'.
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 1(40) text-015.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN END OF BLOCK box04.
SELECTION-SCREEN END OF SCREEN 1003.
F i e l d S y m b o l s *
FIELD-SYMBOLS: <f>.
D a t a *
common include for file layouts
INCLUDE zvin1010.
AT SELECTION-SCREEN OUTPUT.
LOOP AT SCREEN.
IF screen-name = 'P_PCFILE'.
screen-input = 0.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
I N I T I A L I Z A T I O N *
INITIALIZATION.
gc_gen = text-401.
gc_outp = text-402.
gc_view = text-403.
SET up the file directory depending on the system id.
GET PARAMETER ID 'WRK' FIELD p_werks.
GET PARAMETER ID 'VKO' FIELD p_vkorg.
CLEAR s_mtart.
s_mtart-sign = 'E'.
s_mtart-option = 'EQ'.
s_mtart-low = 'ROH'.
s_mtart-high = ''.
APPEND s_mtart.
CLEAR s_mtart.
s_mtart-sign = 'E'.
s_mtart-option = 'EQ'.
s_mtart-low = 'MFPK'.
s_mtart-high = ''.
APPEND s_mtart.
CLEAR s_mtart.
s_mtart-sign = 'E'.
s_mtart-option = 'EQ'.
s_mtart-low = 'VERP'.
s_mtart-high = ''.
APPEND s_mtart.
START-OF-SELECTION.
check that the download is active
PERFORM get_data.
*& Form GET_DATA
text
--> p1 text
<-- p2 text
FORM get_data .
SELECT mandt matnr meins laeda aenam
FROM mara
INTO TABLE it_mara
WHERE matnr IN s_matnr.
IF NOT it_mara[] IS INITIAL.
SELECT matnr werks
FROM marc
INTO TABLE it_marc
FOR ALL ENTRIES IN it_mara
WHERE matnr = it_mara-matnr
AND werks = p_werks.
SELECT matnr maktx
FROM makt
INTO TABLE it_makt
FOR ALL ENTRIES IN it_marc
WHERE matnr = it_marc-matnr
AND spras = 'E'.
SELECT matnr zppqt zspqt zpmqt_3
INTO TABLE it_zmpkg
FROM zmpkg
FOR ALL ENTRIES IN it_marc
WHERE matnr = it_marc-matnr
AND werks = p_werks.
ENDIF.
LOOP AT it_mara.
READ TABLE it_marc WITH KEY matnr = it_mara-matnr.
IF sy-subrc EQ 0.
READ TABLE it_makt WITH KEY matnr = it_mara-matnr.
IF sy-subrc EQ 0.
READ TABLE it_zmpkg WITH KEY matnr = it_mara-matnr.
IF sy-subrc EQ 0.
it_material-mandt = it_mara-mandt.
it_material-matnr = it_mara-matnr.
it_material-maktx = it_makt-maktx.
it_material-meins = it_mara-meins.
it_material-laeda = it_mara-laeda.
it_material-aenam = it_mara-aenam.
it_material-werks = it_marc-werks.
it_material-zppqt = it_zmpkg-zppqt.
it_material-zspqt = it_zmpkg-zspqt.
it_material-zpmqt_3 = it_zmpkg-zpmqt_3.
it_material-date = sy-datum.
it_material-time = sy-uzeit.
it_material-user = sy-uname.
APPEND it_material.
ENDIF.
ENDIF.
ENDIF.
ENDLOOP.
ENDFORM. " GET_DATAHi Kumar,
After building your it_material internal table, try using GUIO_DOWNLOAD to load the data into an excel sheet.
check this sample code.
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
FILENAME = SELECT_FILE " Filename
FILETYPE = 'ASC'
APPEND = ' '
TABLES
DATA_TAB = ITAB_STR_1
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
OTHERS = 22.
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
EXIT.
ENDIF.
Hope this is helpful to you. If you need further information, revert back.
Reward all the helpful answers.
Regards
Nagaraj T -
Item on the listbox cant be selected. PLS HELP.
hello! i am a newbie to ABAP development.
I followed the listbox steps stated on the RSDEMO_DROPDOWN_LISTBOX because I want to populate my listbox (I created from the screen painter) with the data from a table. It was successful and I can see the data now. Problem is when I am selecting an item of the listbox, it wont be selected. the only thing always selected is the first item on the listbox? what is happening? I do not understand. PLS HELP.
big thanks.
TYPE-POOLS: VRM.
DATA: VALUE TYPE VRM_VALUES WITH HEADER LINE.
DATA: DD1(20).
DATA: INT_SPFLI LIKE SPFLI OCCURS 10 WITH HEADER LINE.
SELECT * FROM SPFLI INTO TABLE INT_SPFLI.
START-OF-SELECTION.
SET SCREEN 100.
MODULE PBO OUTPUT.
LOOP AT INT_SPFLI.
VALUE-TEXT = INT_SPFLI-CITYFROM.
APPEND VALUE.
ENDLOOP.
CALL FUNCTION 'VRM_SET_VALUES'
EXPORTING
ID = 'DD1'
VALUES = VALUE[].
ENDMODULE.
MODULE PAI INPUT.
CASE SY-UCOMM.
WHEN 'BTNEXIT'.
LEAVE PROGRAM.
ENDCASE.
ENDMODULE.<b>THIS IS A FOLLOW UP QUESTION.</b>
I have listbox DD1 and I populated that with SPFLI-CITYFROM data. I used SELECT DISTINCT statement so that it will not repeat same entry on my list box. It was successful but then on the 2nd time and on the succeeding times you click on the listbox (trying to select other item), the listbox shows all the city entries from the SPFLI-CITYFROM. The SELECT DISTINCT takes effect only at first because as I have said on the 2nd and succeeding times you click the listbox, it will show you all entries of SPFLI-CITYFROM. why is that? i dont understand.
im sorry if i sound so dumb. im a newbie.<b> big thanks to all. </b>
TYPE-POOLS: VRM.
DATA: VALUE TYPE VRM_VALUES WITH HEADER LINE.
DATA: DD1(20).
DATA: INT_SPFLI TYPE STANDARD TABLE OF SPFLI WITH HEADER LINE.
SELECT DISTINCT CITYFROM FROM SPFLI INTO CORRESPONDING FIELDS OF TABLE INT_SPFLI.
START-OF-SELECTION.
SET SCREEN 100.
MODULE PBO OUTPUT.
LOOP AT INT_SPFLI.
VALUE-KEY = INT_SPFLI-CITYFROM.
APPEND VALUE.
ENDLOOP.
CALL FUNCTION 'VRM_SET_VALUES'
EXPORTING
ID = 'DD1'
VALUES = VALUE[].
ENDMODULE.
MODULE PAI INPUT.
CASE SY-UCOMM.
WHEN 'BTNEXIT'.
LEAVE PROGRAM.
ENDCASE.
ENDMODULE. -
Hi, I cant install iTunes.. pls help
when i open the installation i have an error...
here it is:
http://img528.imageshack.us/my.php?image=77435484bo6.png
how can i solve this problem?
pls help,
SagiIt's a fairly generic message. So probably the first thing to try would be to work through the "General Installation Troubleshooting" section from the following document:
Trouble installing iTunes or QuickTime software in Windows
... if you run into any problems withose procedures, describe the problems with them for us. (That may be able to give us an additional heads up on what's causing your current installation error message.) -
pls give me a solution need the answer A.S.A.P thank you....!
You might be able to re-enable it via this page : http://appleid.apple.com, then 'reset your password'
If it then works on your computer's iTunes but not your iPad / iPhone / iPod Touch then try logging out of your account on the device by tapping on your id in Settings > iTunes & App Stores and then log back in and see if that 'refreshes' the account on it
If that doesn't fix it then you might need to contact Apple : http://www.apple.com/support/itunes/contact/ - click on Contact iTunes Store Support on the right-hand side of the page -
im up dating my i phone to iOS 6 then my baterry completely drain i forget to plug my charger,when i re charged my battery for 12 hrs my i phone wont start again i try to conect to my computer but it cant be read also.pls help
Thanks too all the people who responded. . . . (noone)
Got it sorted though. Seems that Apple has issues with multiple apple id's.
Seems i had to somehow remember and use the original id i had when i first bought my 1st iPhone. . . .
Even after that it was extremely hard to get my apps back on my PC.
If anyone else has the same problem. . . .email Apple. Cya. -
Pls help me this is an urgent requirement on ALV GRID
Hi all
Here i am sendig my requirement pls help me on coding ..
Report Assignment For ELTPs:
Selection criteria :
Circle id : Select option without interval and mandatory
SPR Id : Select option without interval
Project Status : Parameter
Output required in ALV Grid format with the below structure :
cProjects ID SPR ID Project Name Circle ID Circle Description Delegation Status No. of CU Projects CU-PO Share FLCB FLCB
NAME FLCL ID FLCL Name FLCL Email ID
1232007
1230
ABCD No 0
1242007
1240
ABCD Partial 2
1112007
1241
XYZ
2222007
1242
WXY
1252007
1250
EFGH Full 1
3332007
1251
DEF
Requirement :
1. The report should list all the CFU projects and the corresponding CU projects circle wise based on the circles entered on the selection screen and which have the SPR ids and Project status on the selection screen.
2. If SPR id or Project status is not entered then all the projects to be considered for the given circle/s.
3. It should display the details of the CFU project first. The corresponding CU projects should be listed below that CFU project in the successive rows.
4. For example, project 1232007 is a CFU project which does not have any CU under it. Hence, another CFU project 1242007 is displayed in the second row. It has 2 CU projects under it. The details of those two CU projects are displayed in the 3rd and 4th rows.
5. Total share given to the CU circle (by adding different PO shares to that circle in that project) by the CFU project should be displayed in the field CU-PO Share.
6. For CU projects, the fields Delegation Status, No. of CU projects and CU-PO share should be space.
7. FLCB, FLCL ID, FLCL name and FLCL email need to given for all the projects in all the rows.
Tables to be referred: ZSCP_PROJECT, ZSCP_CIRCLE_M, ZSCP_PJ_CL_PO_MP, ZSCP_PRJ_LINK, USR21,
ADR6, BUT000,CGPL_TEXT.
[<b>b]Here i done the coding the but the error showing that field catolog is not found..
pls check this and kindly send the code .....</b></b>
REPORT Z_64328_TEST .
TYPE-POOLS : SLIS.
TABLES : ZSCP_PROJECT,ZSCP_CIRCLE_M,ZSCP_PJ_CL_PO_MP,ZSCP_PRJ_LINK,
USR21,ADR6, BUT000.
SELECT-OPTIONS : S_CIRID FOR ZSCP_CIRCLE_M-CIRCLE_ID NO INTERVALS.
SELECT-OPTIONS : S_SPR_ID FOR ZSCP_PROJECT-SPR_PROJECT_ID NO INTERVALS.
PARAMETERS : P_STAT LIKE ZSCP_PROJECT-PRJ_STAT.
DATA : GS_LAYOUT1 TYPE SLIS_LAYOUT_ALV,
CT_FIELDCAT1 TYPE SLIS_T_FIELDCAT_ALV,
G_REPID TYPE SY-REPID,
TEMP_CAT1 TYPE SLIS_FIELDCAT_ALV,
HEADER_ALV1 TYPE SLIS_T_LISTHEADER,
HEADER_ALV_WA1 TYPE SLIS_LISTHEADER,
GT_SORT TYPE SLIS_T_SORTINFO_ALV WITH HEADER LINE,
GS_KEYINFO TYPE SLIS_KEYINFO_ALV.
DATA : SPRID TYPE ZSPR_PROJECT_ID.
DATA : CID TYPE ZCIRCLE_ID.
DATA : ITAB TYPE TABLE OF ZSCP_PROJECT.
DATA : WA TYPE ZSCP_PROJECT.
DATA : ITAB1 TYPE TABLE OF ZSCP_CIRCLE_M.
DATA : WA1 TYPE ZSCP_CIRCLE_M.
SELECT * FROM ZSCP_CIRCLE_M INTO TABLE ITAB1.
SELECT * FROM ZSCP_PROJECT INTO TABLE ITAB WHERE SPR_PROJECT_ID IN S_SPR_ID OR CIRCLE_ID IN S_CIRID.
LOOP AT ITAB INTO WA.
READ TABLE ITAB1 INTO WA1 WITH KEY CIRCLE_ID = WA-CIRCLE_ID.
WRITE : WA1-CIRCLE_DESC.
WRITE : WA-CIRCLE_ID,
WA-PROJECT_ID,
WA-DELEG_STAT,
WA-PRJ_STAT,
WA-FLCB,
WA-FLCL.
ENDLOOP.
*PERFORM FIELD_CATALOG1.
PERFORM alv_display1.
FORM FIELD_CATALOG1.
CLEAR TEMP_CAT1.
TEMP_CAT1-TABNAME = 'ITAB'.
TEMP_CAT1-FIELDNAME = 'CIRCLE_ID'.
TEMP_CAT1-KEY = 'X'.
TEMP_CAT1-SELTEXT_M = 'CIRCLEID'.
TEMP_CAT1-OUTPUTLEN = 10.
APPEND TEMP_CAT1 TO CT_FIELDCAT1.
CLEAR TEMP_CAT1.
TEMP_CAT1-TABNAME = 'ITAB'.
TEMP_CAT1-FIELDNAME = 'SPR_PROJECT_ID'.
TEMP_CAT1-KEY = 'X'.
TEMP_CAT1-SELTEXT_M = 'CPROJECTID'.
TEMP_CAT1-OUTPUTLEN = 10.
APPEND TEMP_CAT1 TO CT_FIELDCAT1.
CLEAR TEMP_CAT1.
TEMP_CAT1-TABNAME = 'ITAB'.
TEMP_CAT1-FIELDNAME = 'CIRCLE_DESC'.
TEMP_CAT1-KEY = 'X'.
TEMP_CAT1-SELTEXT_M = 'CIRCLEDESC'.
TEMP_CAT1-OUTPUTLEN = 10.
APPEND TEMP_CAT1 TO CT_FIELDCAT1.
CLEAR TEMP_CAT1.
TEMP_CAT1-TABNAME = 'ITAB'.
TEMP_CAT1-FIELDNAME = 'DELEG_STAT'.
TEMP_CAT1-KEY = 'X'.
TEMP_CAT1-SELTEXT_M = 'DELGSTAT'.
TEMP_CAT1-OUTPUTLEN = 10.
APPEND TEMP_CAT1 TO CT_FIELDCAT1.
CLEAR TEMP_CAT1.
TEMP_CAT1-TABNAME = 'ITAB'.
TEMP_CAT1-FIELDNAME = 'PRJ_STAT'.
TEMP_CAT1-KEY = 'X'.
TEMP_CAT1-SELTEXT_M = 'PROJSTAT'.
TEMP_CAT1-OUTPUTLEN = 10.
APPEND TEMP_CAT1 TO CT_FIELDCAT1.
CLEAR TEMP_CAT1.
TEMP_CAT1-TABNAME = 'ITAB'.
TEMP_CAT1-FIELDNAME = 'FLCB'.
TEMP_CAT1-KEY = 'X'.
TEMP_CAT1-SELTEXT_M = 'FLCB1'.
TEMP_CAT1-OUTPUTLEN = 10.
APPEND TEMP_CAT1 TO CT_FIELDCAT1.
CLEAR TEMP_CAT1.
TEMP_CAT1-TABNAME = 'ITAB'.
TEMP_CAT1-FIELDNAME = 'FLCL'.
TEMP_CAT1-KEY = 'X'.
TEMP_CAT1-SELTEXT_M = 'FLCL1'.
TEMP_CAT1-OUTPUTLEN = 10.
APPEND TEMP_CAT1 TO CT_FIELDCAT1.
ENDFORM. "END CATALOG1.
FORM ALV_DISPLAY1.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
I_INTERFACE_CHECK = ' '
I_BYPASSING_BUFFER = ' '
I_BUFFER_ACTIVE = ' '
I_CALLBACK_PROGRAM = G_REPID
I_CALLBACK_PF_STATUS_SET = ' '
I_CALLBACK_USER_COMMAND = ' '
I_CALLBACK_TOP_OF_PAGE = 'TOP-OF-PAGE1 '
I_CALLBACK_HTML_TOP_OF_PAGE = ' '
I_CALLBACK_HTML_END_OF_LIST = ' '
I_STRUCTURE_NAME =
I_BACKGROUND_ID = ' '
I_GRID_TITLE =
I_GRID_SETTINGS =
IS_LAYOUT = GS_LAYOUT1
IT_FIELDCAT = CT_FIELDCAT1
IT_EXCLUDING =
IT_SPECIAL_GROUPS =
IT_SORT = GT_SORT[]
IT_FILTER =
IS_SEL_HIDE =
I_DEFAULT = 'X'
I_SAVE = 'A '
TABLES
T_OUTTAB = ITAB
EXCEPTIONS
PROGRAM_ERROR = 1
OTHERS = 2
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
ENDFORM.
Thanks and regards
Nagendra Kumarhi nagendra,
go through this code.
TYPE-POOLS : SLIS.
TABLES : ZSCP_PROJECT,ZSCP_CIRCLE_M,ZSCP_PJ_CL_PO_MP,ZSCP_PRJ_LINK,
USR21,ADR6, BUT000.
SELECT-OPTIONS : S_CIRID FOR ZSCP_CIRCLE_M-CIRCLE_ID NO INTERVALS.
SELECT-OPTIONS : S_SPR_ID FOR ZSCP_PROJECT-SPR_PROJECT_ID NO INTERVALS.
PARAMETERS : P_STAT LIKE ZSCP_PROJECT-PRJ_STAT.
DATA : GS_LAYOUT1 TYPE SLIS_LAYOUT_ALV,
CT_FIELDCAT1 TYPE SLIS_T_FIELDCAT_ALV,
G_REPID TYPE SY-REPID,
TEMP_CAT1 TYPE SLIS_FIELDCAT_ALV,
HEADER_ALV1 TYPE SLIS_T_LISTHEADER,
HEADER_ALV_WA1 TYPE SLIS_LISTHEADER,
GT_SORT TYPE SLIS_T_SORTINFO_ALV WITH HEADER LINE,
GS_KEYINFO TYPE SLIS_KEYINFO_ALV.
DATA : SPRID TYPE ZSPR_PROJECT_ID.
DATA : CID TYPE ZCIRCLE_ID.
DATA : ITAB TYPE TABLE OF ZSCP_PROJECT.
DATA : WA TYPE ZSCP_PROJECT.
DATA : ITAB1 TYPE TABLE OF ZSCP_CIRCLE_M.
DATA : WA1 TYPE ZSCP_CIRCLE_M.
SELECT * FROM ZSCP_CIRCLE_M INTO TABLE ITAB1.
SELECT * FROM ZSCP_PROJECT INTO TABLE ITAB WHERE SPR_PROJECT_ID IN S_SPR_ID OR CIRCLE_ID IN S_CIRID.
LOOP AT ITAB INTO WA.
READ TABLE ITAB1 INTO WA1 WITH KEY CIRCLE_ID = WA-CIRCLE_ID.
WRITE : WA1-CIRCLE_DESC.
WRITE : WA-CIRCLE_ID,
WA-PROJECT_ID,
WA-DELEG_STAT,
WA-PRJ_STAT,
WA-FLCB,
WA-FLCL.
ENDLOOP.
PERFORM FIELD_CATALOG1.
PERFORM alv_display1.
FORM FIELD_CATALOG1.
CLEAR TEMP_CAT1.
TEMP_CAT1-TABNAME = 'ITAB'.
TEMP_CAT1-FIELDNAME = 'CIRCLE_ID'.
TEMP_CAT1-KEY = 'X'.
TEMP_CAT1-SELTEXT_M = 'CIRCLEID'.
TEMP_CAT1-OUTPUTLEN = 10.
APPEND TEMP_CAT1 TO CT_FIELDCAT1.
CLEAR TEMP_CAT1.
TEMP_CAT1-TABNAME = 'ITAB'.
TEMP_CAT1-FIELDNAME = 'SPR_PROJECT_ID'.
TEMP_CAT1-KEY = 'X'.
TEMP_CAT1-SELTEXT_M = 'CPROJECTID'.
TEMP_CAT1-OUTPUTLEN = 10.
APPEND TEMP_CAT1 TO CT_FIELDCAT1.
CLEAR TEMP_CAT1.
TEMP_CAT1-TABNAME = 'ITAB'.
TEMP_CAT1-FIELDNAME = 'CIRCLE_DESC'.
TEMP_CAT1-KEY = 'X'.
TEMP_CAT1-SELTEXT_M = 'CIRCLEDESC'.
TEMP_CAT1-OUTPUTLEN = 10.
APPEND TEMP_CAT1 TO CT_FIELDCAT1.
CLEAR TEMP_CAT1.
TEMP_CAT1-TABNAME = 'ITAB'.
TEMP_CAT1-FIELDNAME = 'DELEG_STAT'.
TEMP_CAT1-KEY = 'X'.
TEMP_CAT1-SELTEXT_M = 'DELGSTAT'.
TEMP_CAT1-OUTPUTLEN = 10.
APPEND TEMP_CAT1 TO CT_FIELDCAT1.
CLEAR TEMP_CAT1.
TEMP_CAT1-TABNAME = 'ITAB'.
TEMP_CAT1-FIELDNAME = 'PRJ_STAT'.
TEMP_CAT1-KEY = 'X'.
TEMP_CAT1-SELTEXT_M = 'PROJSTAT'.
TEMP_CAT1-OUTPUTLEN = 10.
APPEND TEMP_CAT1 TO CT_FIELDCAT1.
CLEAR TEMP_CAT1.
TEMP_CAT1-TABNAME = 'ITAB'.
TEMP_CAT1-FIELDNAME = 'FLCB'.
TEMP_CAT1-KEY = 'X'.
TEMP_CAT1-SELTEXT_M = 'FLCB1'.
TEMP_CAT1-OUTPUTLEN = 10.
APPEND TEMP_CAT1 TO CT_FIELDCAT1.
CLEAR TEMP_CAT1.
TEMP_CAT1-TABNAME = 'ITAB'.
TEMP_CAT1-FIELDNAME = 'FLCL'.
TEMP_CAT1-KEY = 'X'.
TEMP_CAT1-SELTEXT_M = 'FLCL1'.
TEMP_CAT1-OUTPUTLEN = 10.
APPEND TEMP_CAT1 TO CT_FIELDCAT1.
ENDFORM. "END CATALOG1.
FORM ALV_DISPLAY1.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
I_INTERFACE_CHECK = ' '
I_BYPASSING_BUFFER = ' '
I_BUFFER_ACTIVE = ' '
I_CALLBACK_PROGRAM = G_REPID
I_CALLBACK_PF_STATUS_SET = ' '
I_CALLBACK_USER_COMMAND = ' '
I_CALLBACK_TOP_OF_PAGE = 'TOP-OF-PAGE1 '
I_CALLBACK_HTML_TOP_OF_PAGE = ' '
I_CALLBACK_HTML_END_OF_LIST = ' '
I_STRUCTURE_NAME =
I_BACKGROUND_ID = ' '
I_GRID_TITLE =
I_GRID_SETTINGS =
IS_LAYOUT = GS_LAYOUT1
IT_FIELDCAT = CT_FIELDCAT1
IT_EXCLUDING =
IT_SPECIAL_GROUPS =
IT_SORT = GT_SORT[]
IT_FILTER =
IS_SEL_HIDE =
I_DEFAULT = 'X'
I_SAVE = 'A '
TABLES
T_OUTTAB = ITAB
EXCEPTIONS
PROGRAM_ERROR = 1
OTHERS = 2
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
ENDFORM.
<b>please reward points if helpfull.</b>
with regards,
radhika kolluru. -
Pls. help tune this query
This is the SQL i would like to tune for performace...
The table structure is given below.
The table has about 5 million rows.
On the first day, load_flag has all the rows as 'I'.
Then from the second day onwards only around 10% of records will be between Load_Start_Time and Load_End_Time. Among these around 40% will have Record_key like 'TP%'. And among those most of the records (95%)will have load_flag as 'U' and a very few (5%) as 'I'. At present there are unique and primary key indexes on record_key. Please advice me whether it's better to go for an index on any of these columns and what type would be better. I thought it would help to have a bit map index on load_flag and a function base index on SUBSTR (RECORD_KEY).
Also pls. let me know if the order of predicates is right.
Thanks in advance.
M_STG_TPDB_TPD_TL_W_PH_LOI_CNTBLTY_STATUS_CE SQ_STG_TPD_STG_TL_CS_EXTRACTED_RECS_MOD "SELECT TPD_STG_TL_CS_EXTRACTED_RECS.RECORD_KEY, TPD_STG_TL_CS_EXTRACTED_RECS.DATA_SOURCE, TPD_STG_TL_CS_EXTRACTED_RECS.CONTACTABLE_INDICATOR, TPD_STG_TL_CS_EXTRACTED_RECS.LEGAL_OWNERSHIP_ISSUE_IND, TPD_STG_TL_CS_EXTRACTED_RECS.ADMIN_CONTROL_INDICATOR, TPD_STG_TL_CS_EXTRACTED_RECS.BANKRUPTCY_INDICATOR, TPD_STG_TL_CS_EXTRACTED_RECS.ASSIGNED_INDICATOR, TPD_STG_TL_CS_EXTRACTED_RECS.IN_TRUST_INDICATOR, TPD_STG_TL_CS_EXTRACTED_RECS.DIVORCE_CASE_INDICATOR, TPD_STG_TL_CS_EXTRACTED_RECS.POA_COP_INDICATOR, TPD_STG_TL_CS_EXTRACTED_RECS.SOURCE_EXTRACT_DATE_TIME
FROM
TPD_STG_TL_CS_EXTRACTED_RECS
WHERE
LOAD_FLAG IN ('I','U')
AND SUBSTR (RECORD_KEY, 1,2)='TP'
AND STG_UPDATE_DATE_TIME>'$$Load_Start_Time'
AND STG_UPDATE_DATE_TIME<='$$Load_End_Time'"
Table structure
CREATE TABLE TPD_STG_TL_CS_EXTRACTED_RECS
RECORD_KEY VARCHAR2(35 BYTE),
SCHEME_NAME VARCHAR2(50 BYTE),
ORGANISATION_NAME VARCHAR2(50 BYTE),
SUPERIOR_TITLE_1 VARCHAR2(50 BYTE),
TITLE_1 VARCHAR2(50 BYTE),
FIRST_NAME_1 VARCHAR2(50 BYTE),
MIDDLE_NAME_1 VARCHAR2(50 BYTE),
SURNAME_1 VARCHAR2(50 BYTE),
ADDRESS_LINE_1_1 VARCHAR2(50 BYTE),
ADDRESS_LINE_2_1 VARCHAR2(50 BYTE),
ADDRESS_LINE_3_1 VARCHAR2(50 BYTE),
ADDRESS_LINE_4_1 VARCHAR2(50 BYTE),
ADDRESS_LINE_5_1 VARCHAR2(50 BYTE),
ADDRESS_LINE_6_1 VARCHAR2(50 BYTE),
POST_CODE_1 VARCHAR2(12 BYTE),
COUNTRY_1 VARCHAR2(50 BYTE),
OVERSEAS_INDICATOR_1 CHAR(1 BYTE),
DOB_1 NUMBER(8),
GENDER_1 CHAR(1 BYTE),
NINO_1 VARCHAR2(9 BYTE),
DEATH_INDICATOR_1 CHAR(1 BYTE),
PRODUCT_HOLDING_ROLE_TYPE_1 VARCHAR2(21 BYTE),
GONE_AWAY_INDICATOR_1 CHAR(1 BYTE),
THAMES_LEGAL_OWNERSHIP_IND_1 CHAR(1 BYTE),
SOURCE_SYSTEM_PARTY_INDV_ID_1 VARCHAR2(15 BYTE),
SUPERIOR_TITLE_2 VARCHAR2(50 BYTE),
TITLE_2 VARCHAR2(50 BYTE),
FIRST_NAME_2 VARCHAR2(50 BYTE),
MIDDLE_NAME_2 VARCHAR2(50 BYTE),
SURNAME_2 VARCHAR2(50 BYTE),
ADDRESS_LINE_1_2 VARCHAR2(50 BYTE),
ADDRESS_LINE_2_2 VARCHAR2(50 BYTE),
ADDRESS_LINE_3_2 VARCHAR2(50 BYTE),
ADDRESS_LINE_4_2 VARCHAR2(50 BYTE),
ADDRESS_LINE_5_2 VARCHAR2(50 BYTE),
ADDRESS_LINE_6_2 VARCHAR2(50 BYTE),
POST_CODE_2 VARCHAR2(12 BYTE),
COUNTRY_2 VARCHAR2(50 BYTE),
OVERSEAS_INDICATOR_2 CHAR(1 BYTE),
DOB_2 NUMBER(8),
GENDER_2 CHAR(1 BYTE),
NINO_2 VARCHAR2(9 BYTE),
DEATH_INDICATOR_2 CHAR(1 BYTE),
PRODUCT_HOLDING_ROLE_TYPE_2 VARCHAR2(21 BYTE),
GONE_AWAY_INDICATOR_2 CHAR(1 BYTE),
THAMES_LEGAL_OWNERSHIP_IND_2 CHAR(1 BYTE),
SOURCE_SYSTEM_PARTY_INDV_ID_2 VARCHAR2(15 BYTE),
JOINT_OWNER_INDICATOR CHAR(1 BYTE),
JOINT_LIFE_TYPE NUMBER(1),
SAME_ADDRESS_INDICATOR CHAR(1 BYTE),
TITLE_LA1 VARCHAR2(50 BYTE),
FIRST_NAME_LA1 VARCHAR2(50 BYTE),
SURNAME_LA1 VARCHAR2(50 BYTE),
DOB_LA1 NUMBER(8),
TITLE_LA2 VARCHAR2(50 BYTE),
FIRST_NAME_LA2 VARCHAR2(50 BYTE),
SURNAME_LA2 VARCHAR2(50 BYTE),
DOB_LA2 NUMBER(8),
PRODUCT_HOLDING_REF_NUMBER VARCHAR2(28 BYTE),
PARENT_PRODUCT_HOLDING_REF_NUM VARCHAR2(9 BYTE),
OCDB_REFERENCE_NUMBER VARCHAR2(17 BYTE),
BUSINESS_GROUP CHAR(3 BYTE),
SCHEME_NUMBER VARCHAR2(8 BYTE),
TRUSTEE_SEQUENCE_NUMBER NUMBER(10),
MEMBER_NUMBER VARCHAR2(10 BYTE),
PRSN_ID NUMBER(10),
OLD_SCHEME_NUMBER VARCHAR2(8 BYTE),
PUBLIC_SECTOR_INDICATOR CHAR(1 BYTE),
ELIGIBLE_INDICATOR CHAR(1 BYTE),
SCHEME_STATUS NUMBER(1),
SCHEME_TYPE CHAR(2 BYTE),
Q_DATE_WITH_PROFIT_STATUS NUMBER(1),
A_DATE_WITH_PROFIT_STATUS NUMBER(1),
LATEST_WITH_PROFIT_STATUS NUMBER(1),
NPSW_INDICATOR CHAR(1 BYTE),
PRODUCT_HOLDING_STATUS CHAR(1 BYTE),
MATURITY_DATE_OF_CONTRACT NUMBER(8),
DUE_END_DATE_OF_CONTRACT NUMBER(8),
OUT_OF_FORCE_DATE NUMBER(8),
OUT_OF_FORCE_REASON_CODE NUMBER(2),
DATA_SOURCE VARCHAR2(3 BYTE),
PRODUCT_TYPE VARCHAR2(30 BYTE),
PRODUCT_DESCRIPTION VARCHAR2(50 BYTE),
SERVICING_AGENT_NUMBER VARCHAR2(10 BYTE),
CONTACTABLE_INDICATOR CHAR(1 BYTE),
LEGAL_OWNERSHIP_ISSUE_IND CHAR(1 BYTE),
ADMIN_CONTROL_INDICATOR CHAR(1 BYTE),
BANKRUPTCY_INDICATOR CHAR(1 BYTE),
ASSIGNED_INDICATOR CHAR(1 BYTE),
IN_TRUST_INDICATOR CHAR(1 BYTE),
DIVORCE_CASE_INDICATOR CHAR(1 BYTE),
POA_COP_INDICATOR CHAR(1 BYTE),
DONOR_POLICY_INDICATOR CHAR(1 BYTE),
TAX_JURISDICTION NUMBER(2),
INELIGIBLE_DATE NUMBER(8),
INELIGIBILITY_REASON NUMBER(2),
A_DATE_CASH_OR_BONUS_TYPE CHAR(1 BYTE),
VALUATION_APPLICABLE_DATE NUMBER(8),
A_DATE_PIP_AMOUNT NUMBER(12),
A_DATE_NPSW_AMOUNT NUMBER(10),
A_DATE_MINIMUM_APPLIED_AMOUNT NUMBER(10),
A_DATE_MINIMUM_CALC_AMOUNT NUMBER(10),
A_DATE_POLICY_VALUE NUMBER(16),
A_DATE_DATE_PIP_CALCULATED NUMBER(8),
A_DATE_ALGORITHM_NUMBER NUMBER(2),
M_DATE_VOTING_VALUE NUMBER(12),
M_DATE_POLICY_VALUE NUMBER(16),
E_DATE_CASH_OR_BONUS_TYPE CHAR(1 BYTE),
E_DATE_PIP_AMOUNT NUMBER(12),
E_DATE_NPSW_AMOUNT NUMBER(10),
E_DATE_MINIMUM_APPLIED_AMOUNT NUMBER(10),
E_DATE_MINIMUM_CALC_AMOUNT NUMBER(10),
E_DATE_POLICY_VALUE NUMBER(16),
E_DATE_DATE_PIP_CALCULATED NUMBER(8),
E_DATE_ALGORITHM_NUMBER NUMBER(2),
P_DATE_CASH_OR_BONUS_TYPE CHAR(1 BYTE),
P_DATE_PIP_AMOUNT NUMBER(12),
P_DATE_NPSW_AMOUNT NUMBER(10),
P_DATE_MINIMUM_APPLIED_AMOUNT NUMBER(10),
P_DATE_MINIMUM_CALC_AMOUNT NUMBER(10),
P_DATE_POLICY_VALUE NUMBER(16),
P_DATE_DATE_PIP_CALCULATED NUMBER(8),
P_DATE_ALGORITHM_NUMBER NUMBER(2),
SOURCE_EXTRACT_DATE_TIME DATE,
SCHEME_SEQUENCE_NUMBER NUMBER(3),
LOAD_FLAG CHAR(1 BYTE),
STG_CREATE_DATE_TIME DATE,
STG_UPDATE_DATE_TIME DATE
TABLESPACE TPDBS01A_DATA
PCTUSED 0
PCTFREE 10
INITRANS 1
MAXTRANS 255
STORAGE (
INITIAL 128K
NEXT 128K
MINEXTENTS 1
MAXEXTENTS 2147483645
PCTINCREASE 0
BUFFER_POOL DEFAULT
LOGGING
NOCOMPRESS
NOCACHE
NOPARALLEL
MONITORING;
CREATE UNIQUE INDEX PK_STG_TL_CS_EXTRACTED_RECS ON TPD_STG_TL_CS_EXTRACTED_RECS
(RECORD_KEY)
LOGGING
TABLESPACE TPDBS01A_DATA
PCTFREE 10
INITRANS 2
MAXTRANS 255
STORAGE (
INITIAL 128K
NEXT 128K
MINEXTENTS 1
MAXEXTENTS 2147483645
PCTINCREASE 0
BUFFER_POOL DEFAULT
NOPARALLEL;
ALTER TABLE TPD_STG_TL_CS_EXTRACTED_RECS ADD (
CONSTRAINT PK_STG_TL_CS_EXTRACTED_RECS
PRIMARY KEY
(RECORD_KEY)
USING INDEX
TABLESPACE TPDBS01A_DATA
PCTFREE 10
INITRANS 2
MAXTRANS 255
STORAGE (
INITIAL 128K
NEXT 128K
MINEXTENTS 1
MAXEXTENTS 2147483645
PCTINCREASE 0
));I would like to discuss a bit more how a composite index is used. This is not anymore the question of the OP, but I think it will deepen my understanding and maybe that of others as well.
So we have this situation to start with.
* A select on two different columns.
* An index on each column would lead to an INDEX RANGE SCAN because of the where condition.
* Instead of 2 indexes where only one would be used (not considering bitmap conversions), we add a composite index on both columns.
* The CBO will choose and access the index.
Question is: How is this access is done in detail?
So 400 rows come out of the index range scan.
This would not be possible if it only scanned one of the two predicates. I agree. The output of the index seem to be only those (400) rows that fit with the where clause on both columns.
This is supported by the fact that an Index only access is possible when we select only information that is in the index (Oracle 9i output).
SQL> explain plan for
2 select record_key
3 from mytable
4 where stg_update_date_time >= to_date('2007-11-11','yyyy-mm-dd')
5 and stg_update_date_time < to_date('2007-11-12','yyyy-mm-dd')
6 and record_key like 'TP%'
7 /
Explained.
SQL> select * from table(dbms_xplan.display);
PLAN_TABLE_OUTPUT
| Id | Operation | Name | Rows | Bytes | Cost |
| 0 | SELECT STATEMENT | | 160 | 2400 | 2 |
| 1 | INDEX RANGE SCAN | I1 | 160 | 2400 | 2 |
Note: cpu costing is off, PLAN_TABLE' is old version
9 rows selected.
SQL> Unfortunately I don't see the filter operation, probably because the plan table is old in my system.
The index is build on columns "stg_update_date_time" and "record_key". So it must access these columns in that order.
I think, that maybe the range scan is done on the date column and then a further access/filter operation is done to rule out any index entries (leaf nodes) that do not fit with the LIKE 'TP%' expression.
Since I expect that is is faster to access the data in the index than in the table this should improve performance quite a bit. It is not the same access plan/speed however as with a clause like this:
SQL> select * from table(dbms_xplan.display);
PLAN_TABLE_OUTPUT
| Id | Operation | Name | Rows | Bytes | Cost |
| 0 | SELECT STATEMENT | | 1 | 520 | 3 |
| 1 | TABLE ACCESS BY INDEX ROWID| MYTABLE | 1 | 520 | 3 |
| 2 | INDEX RANGE SCAN | I1 | 1 | | 2 |
Note: cpu costing is off, PLAN_TABLE' is old version
10 rows selected.
SQL> The difference can be seen in the cost estimation.
I hope somebody does understand what I would like to point at.
Result of this considerations:
1) Composite index can be used
2) The index is used as a range scan on one column and as a filter operation after this access on the second column. This is like an extra select statement inside the index structure.
3) The resulting table access is as small as possible.
4) A faster access plan can be achieved when the first column is accessed with direct (unique) scan on the first and a range scan on the second column.
br Sven
Message was edited by:
Sven Weller -
Hi,
I've needed to print output like below. pls help me out .
Thanks & Regards,
Ramana.SQL> select '*****'||chr(10)||'****'||chr(10)||'***'||chr(10)||'**'||chr(10)||'*' from dual;
'*****'||CHR(10)||'
SQL> -
Pls help me , this is very urgent
I have a column called description with values as follows
Admin Support
Admin Support
Admin Support
Air Support
Cable - Disaster Response
Cable - Operational Support
Cable - PMPP (Preparedness)
Cable - Program Support
Capacity Building
Capacity Building
Chemical, Biological, Radiological, & Nuclear
Commodity Procurement Contract
Communications
Computer Support
Contract Services (warehousing)
Coordination
Coordination
Disaster Assistance Response Program
I have another column in this table for which i have to update with the sequence nos. The update should happen in such a way that if the description is same then i have update with sequence.currval and if the description is different then i have to update with sequence.nextval for each row as follows
Admin Support----- 1
Admin Support----- 1
Admin Support----- 1
Air Support----- 2
Cable - Disaster Response----- 3
Cable - Operational Support----- 4
Cable - PMPP (Preparedness)----- 5
Cable - Program Support----- 6
Capacity Building----- 7
Capacity Building----- 7
Chemical, Biological, Radiological----- 8
Commodity Procurement Contract----- 9
Communications----- 10
Computer Support----- 11
Contract Services----- 12
Coordination----- 13
Coordination----- 13
Disaster Assistance Response----- 14
Pls help me how do i do this, this is very urgent
Thanks
VinodIf you want your sequence to start from 1, you can eliminate creating a special sqeuence for this, you can do it using ROWNUM in SQL,update your_table a
set (a.description, a.col1)
= (select c.description, c.rn from
(select b.description, rownum rn from
(select distinct description from your_table order by description) b) c
where c.description = a.description);P.S Just an alternative.
Thx,
SriDHAR -
Dear All,
We are using SAP B1 2005. We use Purchase Requisition In Purchase Module... In PR ADD- on Report is not generated. PR form there is button Report.. when i click on it. Report Viewer is not working..
Error message " Load Report Failed ". Please help in this Issue...Hi Arun........
I guess you are getting rpt file link at the moment of button click.
I think you are using crystal report through SDK.
Better you take help of your Technical Person.
he might be knowing exactly.
And 2005B is very old version.
Try to upgrade as soon as possible because SAP has already stopped giving support for 2005....
Regards,
Rahul -
How can i use my new Apple ID, instead of using the old Apple ID what will i do to delete the old Apple ID in my phone
Heres the situation guys, my sister is working abroad, when she went home, she gave me her iphone, I started using this phone almost a year now, when Apple noticing me to update my phone, I cant do it because i don't know the password, i create my own Apple ID and started using it just now, everytime i try to update my phone the old Apple ID kept on appearing instead of my Apple ID,
Maybe you are looking for
-
I used Organize Bookmarks to put some bookmarks in folders. When I had done all the bookmarks that appeared outside of folders in the Organize Bookmarks window, I closed it and looked at my bookmarks menu. Under my folders were some other bookmarks t
-
Connecting iTunes to Samsung smart TV using airport express.
Does anyone have any experience of connecting airport express to a Samsung smart TV to use as powered speakers? I have connected using a standard convertor cable from 3.5mm jack to dual connections but this is not showing up on the TV 'Source'. Sam
-
Editing video by half frames or less
I'm and audio guy trying to edit video, so I'm not sure if I'm using the correct terms, but can you slide video in Final Cut Pro by less than a frame? e.g. a half frame or 1/4 frame, or even miliseconds? I know that in ProTools you can "nudge" audio
-
Hi all, I was doing this repository and catalog migration from Dev to Prod. My version is 11g. So, I did this from Weblogic Enterprise Manager usning Deployment option. Now, I notice that the user cannot see My Folders in Analysis. And moreover I not
-
How to run InDesign Javascript without Interruption
Hi all, I want to run InDesign Javascript, while running the script nobody should interrupt. How to do it??? Thanks in Advance, Mahesh