How to shrink a tablespace;;;Plz Help Me
Hello,
I have droped 2 big tables (more than 20 millions of records each one) and eventually many indexes in reference.
In my Database server I don't have enougth space, I have only 5Go.
I have to free disk space now by shrinking the size of Index and Data Tablespace.
I used theses scripts to analyse my object plecement repartiton on both tablespaces : INDEX and DATA.
1- select file_id, block_id, blocks,
owner||'.'||segment_name "Name"
from sys.dba_extents
where tablespace_name = 'INDX'
UNION
select file_id, block_id, blocks,
'Free'
from sys.dba_free_space
where tablespace_name = 'INDX'
order by 1,2,3
2- select file_id, block_id, blocks,
owner||'.'||segment_name "Name"
from sys.dba_extents
where tablespace_name = 'DATA'
UNION
select file_id, block_id, blocks,
'Free'
from sys.dba_free_space
where tablespace_name = 'DATA'
order by 1,2,3
After executing these scripts, I find many free extends in the middle and the command :
ALTER DATABASE DATAFILE ... RESIZE is failed
Any idea How to resize / reduce my tablespaces ?
My database version 's :
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 On Linux Sever.
Thanks a lot
Message was edited by:
OracleJavaLinux
hi
do one thing create new tablespace like TEST move table by table to that and viseversa
ie u have emp,dept ... etc tables move emp to ne tablespace and then move back to its original tablespace
for ex:emp,dept... belongs to APPS_TS_TX_DATA
alter table emp move tablespace TEST;
alter table emp move tablespace APPS_TS_TX_DATA;
after this rebuild all indexes on that tables
alter index <index_name> rebuild;
By this action u can recover unused space by the tables
Message was edited by:
BhanuChander
Similar Messages
-
Hello,
We had a UNDO Tablespace of 22Gb but it is using just 2GB. How to shrink undo tablespace. we are using clustered 3 node production database 10.2.0.4
Is there is way that we can shrink UNDO Tablespace or do i need to create a UNDO tablespace and assign the undo tablespace to DB and drop the old UNDO?
How to ensure that transactions are done and free to drop the old UNDO?
Is it something we need to restart all the three nodes as each node has its own UNDO Tablespace.
Need Help on this issue.
would appreciate your quick response.
Thanksif i am in your place i will do the following:
<pre class="jive-pre">1-Query DBA_DATA_FILES to determine the name of the datafiles of the UNDO</pre>
2. Create a new UNDO tablespace.
<pre class="jive-pre">CREATE UNDO TABLESPACE undo_ts2 DATAFILE '/directory/undo_ts2_01.dbf' SIZE xxxM;</pre>
3. Modify the database parameter to use the new UNDO tablespace.
<pre class="jive-pre"> ALTER SYSTEM SET undo_tablespace=undo_ts2 SCOPE=BOTH; </pre>
4-The Drawback:
<pre class="jive-pre">New transactions will begin using the new undo tablespace. After some time passes (at least the number of seconds specified by the UNDO_RETENTION initialization parameter), you can drop the old UNDO tablespace. The downside to this approach is that for a short time period, your database will have two UNDO tablespaces</pre>
Regards
Mohamed -
i have macbook 5.2 and i am using Mac OS 10.5.8 . which one is good for me to upgrade and how to do that..plz help me
You have a 13" Early or Mid 2009 MacBook. Either one can run OS X Mavericks with enough RAM, 2 GB minimum. But first you will need to update to OS X Snow Leopard 10.6.8 so that you have the Mac App Store installed on your MacBook
Buy this from apple;
http://store.apple.com/us/product/MC573/mac-os-x-106-snow-leopard
Then download and update with this update combo;
OS X Snow Leopard 10.6.8 v1.1 update combo
http://support.apple.com/kb/DL1399
After this you will have the Mac App Store on your MacBook and you should be able to download and install OS X Mavericks for free!
Your MacBook must meet these minimum tech specs to run Mavericks;
http://support.apple.com/kb/HT5842 -
I forgot my security questions how do I change it plz help
I forgot my security questions plz help me change it I have like 30$ in there
The Three Best Alternatives for Security Questions and Rescue Mail
1. Use Apple's Express Lane.
Go to https://expresslane.apple.com ; click 'See all products and services' at the
bottom of the page. In the next page click 'More Products and Services, then
'Apple ID'. In the next page select 'Other Apple ID Topics' then 'Forgotten Apple
ID security questions' and click 'Continue'. Please be patient waiting for the return
phone call. It will come in time depending on how heavily the servers are being hit.
2. Call Apple Support in your country: Customer Service: Contact Apple support.
3. Rescue email address and how to reset Apple ID security questions.
A substitute for using the security questions is to use 2-step verification:
Two-step verification FAQ Get answers to frequently asked questions about two-step verification for Apple ID. -
dear sir my iphone 4 is problem today i dnt no how
i m just update the ios 7.0.4 so not showing ime
plz help mePost in your native language.
It is unclear, what if any issue actually is occurring. -
My computer says I need a driver for my iPhone4s but I don't now how to get a driver plz help
I need help my computer says I need a driver for my iPhone 4s but I don't know how to get a driver for my iPhone plz help
Remove/delete itunes and reinstall it.
-
Hi..I forgot my apple security question plz tell me how can I reset it...
If you have a rescue email address (which is not the same thing as an alternate email address) set up on your account then you can try going to https://appleid.apple.com/ and click 'Manage your Apple ID' on the right-hand side of that page and log into your account. Then click on 'Password and Security' on the left-hand side of that page and on the right-hand side you might see an option to send security question reset info to your rescue email address.
If you don't have a rescue email address (you won't be able to add one until you can answer 2 of your questions) then see if this user tip helps : https://discussions.apple.com/docs/DOC-4551
e.g. you can try contacting iTunes Support : http://www.apple.com/support/itunes/contact/ - click on Contact iTunes Store Support on the right-hand side of the page, then Account Management , and then try Apple ID Account Security
or try ringing Apple in your country and ask to talk to the Accounts Security Team : http://support.apple.com/kb/HE57 -
How to delete client (urgent plz help me )
hi friends
i have created a client in my system and i have done client copy in my system (local client copy) why copying i got an error that is there is no enough space in the drive so i want to delete the client and copyed data .can any one help it urgent
thanks in advance
by sanHi SAN,
1. log into the client to delete
2. go into SCC5 and delete client
3. log into another client and delete entry with SCC4
4. reorg database to recover database space.
Actually, if you check "on" the little "Delete Entry from T000" checkbox, you can skip step 3.
One other way of deleting a client which could give significant performance gain and save time is at OS level using - R3trans
To delete a client( eg: 100 ), you have to create a command file "del100" with following entries
Clientremove
Client = 100
Select *
Place the command file in /usr/sap/trans/bin
$ cd /usr/sap/trans/bin
$ R3trans w <log file name> -u 1 <command file name >
e.g $ R3trans -w del100.log -u 1 del100
To check the progress...
$ tail -f del100
Also, check this link
http://help.sap.com/saphelp_nw04/helpdata/en/69/c24c9c4ba111d189750000e8322d00/content.htm
Check this SAP Note for DB reorganization 417539
Hope this will help you.
Hari.
PS: Points are welcome. -
I'm trying to buy something and it keeps asking me to answer my security questions but I don't know them and I want to rest them plz help
Contact iTunes store support for assistance: https://ssl.apple.com/emea/support/itunes/contact.html.
-
My camera does not work on my iPad how do I fix this plz help
My camera does not open like it is frozen please help
See If a single application is not responding or freezes
From Here
http://support.apple.com/kb/TS3281 -
I cannot install NI measurement pallete in Labview8 , how can I do this plz help
I have tried installing the NI measuremtn pallette which contains data
aquisation , ni funtion generator, NI scope and other things. I used
the same driver cd to install it in Labview 7.1 but it is not
installing in lab view 8, even I used the Modify funtion in Add/Remove
programs,.
One more thing I want to ask is on my PC labview 7.1 and labview 8 are
running in Parallel, could this be the problem, and is it ok to run
both of these programs in parallel.Also if you for some reason need the older drivers
You can copy the driver menu palletes from C:\Program Files\National Instruments\LabVIEW 7.1\instr.lib to C:\Program Files\National Instruments\LabVIEW 8.0\instr.lib. Restart LabVIEW and they will appear in the palette.
Buddy Curtis
Applications Engineer
Modular Instruments
Joji -
Very strange problem plz help////
user name == scott.
tablespace name == data and users.
data tablespace content approx.20 tables.
users tablespace content approx 5 tables.
both tables are under scott schema...
i want to reclaim data tablespace size..
so first i import complete tablespace data. as system user.
then after i want to drop data tablespace but i got error...
SQL> drop tablespace data including contents and datafiles;
drop tablespace data including contents and datafiles
ERROR at line 1:
ORA-00604: error occurred at recursive SQL level 1
ORA-02429: cannot drop index used for enforcement of unique/primary key
plz. sir help how can i drop this tablespace plz. help plz. plz. plz.Try
SQL> drop tablespace data including contents and datafiles cascade constraints;It seems that you have some referential integrity constraints, outside data tablespace, pointing to a table inside data tablespace. -
I Have designned a simple report in PLD which consist of two fields. The Customer Name and the Dates on which he is delivered goods. The Query base PLD By default shows the Report like:
Customer Delivery Date
Crest 01/05/2007
Crest 05/08/2007
Crest 06/09/2007
What I want is that I want to show the name of the Customer only once (possibly somewhere in header and in repetative area only Delivery Dates would be shown). i.e. the report should be like:
Customer : Crest
Delivery Dates:
01/05/2007
05/08/2007
06/09/2007
How Can I do this plz help someone.....Hi
Highlight the repetitive area. Print Layout Designer>Repetitive Area>Sort. Sort on Cust Code, tick Summary.
Print Layout Designer>Group>Group1. Now add a formula field in Repetitive Area -
SortValue().
Now your report will group on the Customer code (displayed in Repetitive Area (Header). Make the Customer Code field in Repetitive Area not visible)
Daan -
Plz help me out with for all entries
hi to all experts,
This is my sample code plz tell me how to output the data.plz help me out.im very much beginner in ABAP and i dont want to use loop and endloop is there any way
REPORT Z_FORALLENTERIES .
types : begin of ty_lfa1,
lifnr type lfa1-lifnr,
name1 type lfa1-name1,
land1 type lfa1-land1,
end of ty_lfa1.
types : begin of ty_lfb1 ,
lifnr type lfb1-lifnr,
bukrs type lfb1-bukrs,
pernr type lfb1-pernr,
end of ty_lfb1.
types : begin of ty_lfc1 ,
lifnr type lfc1-lifnr,
gjahr type lfc1-gjahr,
usnam type lfc1-usnam,
end of ty_lfc1.
types : begin of ty_lfbk ,
lifnr type lfbk-lifnr,
banks type lfbk-banks,
bankl type lfbk-bankl,
bankn type lfbk-bankn,
end of ty_lfbk.
types : begin of ty_final,
lifnr type lfa1-lifnr,
name1 type lfa1-name1,
land1 type lfa1-land1,
bukrs type lfb1-bukrs,
pernr type lfb1-pernr,
gjahr type lfc1-gjahr,
usnam type lfc1-usnam,
banks type lfbk-banks,
bankl type lfbk-bankl,
bankn type lfbk-bankn,
end of ty_final.
data : it_lfa1 type standard table of ty_lfa1 initial size 0 with header line.
data : it_lfb1 type standard table of ty_lfb1 initial size 0 with header line.
data : it_lfc1 type standard table of ty_lfc1 initial size 0 with header line.
*--internal for outputting data--
data : it_lfbk type standard table of ty_lfbk initial size 0 with header line.
data : it_final type standard table of ty_final initial size 0,
wa_final like line of it_final.
select lifnr name1 land1
into table it_lfa1[]
from lfa1 up to 10 rows.
if it_lfa1[] is not initial.
select lifnr bukrs pernr
into table it_lfb1[]
from lfb1
for all entries in it_lfa1[]
where lifnr eq it_lfa1-lifnr.
endif.
if it_lfb1[] is not initial.
select lifnr gjahr usnam
into table it_lfc1[]
from lfc1
for all entries in it_lfb1[]
where lifnr eq it_lfb1-lifnr.
endif.
if it_lfc1[] is not initial.
select lifnr banks bankl bankn
into table it_lfbk[]
from lfbk
for all entries in it_lfc1[]
where lifnr eq it_lfc1-lifnr.
endif.Hi
see this program almost same req
**************DATA TYPES DECLARATION **********************
TABLES: HRP1001, HRP1026, HRP1000,PCHDY.
TYPE-POOLS SLIS.
TYPES :BEGIN OF ST_OUTPUT,
COUNT TYPE STRING,
OBJID TYPE HRP1001-OBJID,
STEXT TYPE HRP1000-STEXT,
BEGDA TYPE HRP1000-BEGDA,
ENDDA TYPE HRP1000-ENDDA,
CANCRT TYPE T77CRT-CANCRT,
AEDTM TYPE HRP1026-AEDTM,
UNAME TYPE HRP1026-UNAME,
LSTEXT TYPE HRP1000-STEXT,
RINVT TYPE T777V-RINVT,
END OF ST_OUTPUT.
TYPES: BEGIN OF ST_HRP1000,
OBJID TYPE HRP1001-OBJID,
STEXT TYPE HRP1000-STEXT,
END OF ST_HRP1000.
TYPES : BEGIN OF ST_HRP1001,
OTYPE TYPE HRP1001-OTYPE,
OBJID TYPE HRP1001-OBJID,
RELAT type hrp1001-RELAT,
BEGDA TYPE HRP1001-BEGDA,
ENDDA TYPE HRP1001-ENDDA,
SCLAS TYPE HRP1001-SCLAS,
SOBID TYPE HRP1001-SOBID,
END OF ST_HRP1001.
TYPES : BEGIN OF ST_HRP1026,
OTYPE TYPE HRP1026-OTYPE,
OBJID TYPE HRP1001-OBJID,
AEDTM TYPE HRP1026-AEDTM,
UNAME TYPE HRP1026-UNAME,
DELET TYPE HRP1026-DELET,
CANCR TYPE HRP1026-CANCR,
END OF ST_HRP1026.
TYPES : BEGIN OF ST_REASON,
CANCR TYPE HRP1026-CANCR,
CANCRT TYPE T77CRT-CANCRT,
END OF ST_REASON.
TYPES : BEGIN OF ST_SOBID,
OTYPE TYPE HRP1001-OTYPE,
OBJID TYPE HRP1001-OBJID,
RELAT type hrp1001-OBJID,
BEGDA TYPE HRP1001-BEGDA,
ENDDA TYPE HRP1001-ENDDA,
SCLAS TYPE HRP1001-SCLAS,
SOBID TYPE HRP1001-OBJID,
END OF ST_SOBID.
TYPES : BEGIN OF ST_OBJID,
OBJID TYPE HRP1001-OBJID,
END OF ST_OBJID.
TYPES : BEGIN OF ST_LOCATION,
OTYPE TYPE HRP1001-OTYPE,
OBJID TYPE HRP1001-OBJID,
RSIGN TYPE HRP1001-RSIGN,
RELAT TYPE HRP1001-RELAT,
SCLAS TYPE HRP1001-SCLAS,
SOBID TYPE HRP1001-SOBID,
END OF ST_LOCATION.
TYPES : BEGIN OF ST_LOCATION1,
OTYPE TYPE HRP1001-OTYPE,
OBJID TYPE HRP1001-OBJID,
RSIGN TYPE HRP1001-RSIGN,
RELAT TYPE HRP1001-RELAT,
SCLAS TYPE HRP1001-SCLAS,
SOBID TYPE HRP1001-OBJID,
END OF ST_LOCATION1.
TYPES : BEGIN OF ST_LSTEXT,
OTYPE TYPE HRP1000-OTYPE,
OBJID TYPE HRP1000-OBJID,
LSTEXT TYPE HRP1000-STEXT,
END OF ST_LSTEXT.
TYPES : BEGIN OF ST_OBJID_SH,
OTYPE TYPE HRP1000-OTYPE,
OBJID TYPE HRP1000-OBJID,
END OF ST_OBJID_SH.
DATA : IT_OBJID_SH TYPE STANDARD TABLE OF ST_OBJID_SH.
DATA : WA_OBJID_SH TYPE ST_OBJID_SH.
DATA : IT_LSTEXT TYPE STANDARD TABLE OF ST_LSTEXT. "TOS STORE THE TEXT OF COURCE LOCATION
DATA : WA_LSTEXT TYPE ST_LSTEXT.
DATA : IT_LOCATION TYPE STANDARD TABLE OF ST_LOCATION. " TO STORE THE LOCATION OF COURCE
DATA : WA_LOCATION TYPE ST_LOCATION.
DATA : IT_LOCATION1 TYPE STANDARD TABLE OF ST_LOCATION1. " TO CONVERT SOBID INTO OBJID FOR COURCE LOCATION
DATA : WA_LOCATION1 TYPE ST_LOCATION1.
DATA : IT_SOBID TYPE STANDARD TABLE OF ST_SOBID. " TO CHANGE THE SOBID OF HRP1001 TO OBJID OF HRP1026
DATA : WA_SOBID TYPE ST_SOBID. " BY USING FOR ALL ENTRIES
DATA : IT_REASON TYPE STANDARD TABLE OF ST_REASON. "TO STORE T HE REASON FOR CANCELL TEXT
DATA : WA_REASON TYPE ST_REASON.
DATA : IT_OUTPUT TYPE STANDARD TABLE OF ST_OUTPUT. "OUTPUT FEILDS OF REPORT.
DATA : WA_OUTPUT TYPE ST_OUTPUT.
DATA : IT_OUTPUT_1 TYPE STANDARD TABLE OF ST_OUTPUT. " TEMP OUTPUT FEILDS OF REPORT.
DATA : WA_OUTPUT_1 TYPE ST_OUTPUT.
DATA : IT_HRP1000 TYPE STANDARD TABLE OF ST_HRP1000. "DATA FROM HRP1000 TABLE
DATA : WA_HRP1000 TYPE ST_HRP1000.
DATA : IT_HRP1001 TYPE STANDARD TABLE OF ST_HRP1001. "DATA FROM HRP1001 TABLE
DATA : WA_HRP1001 TYPE ST_HRP1001.
DATA : IT_HRP1026 TYPE STANDARD TABLE OF ST_HRP1026. "DATA FROM HRP1026 TABLE
DATA : WA_HRP1026 TYPE ST_HRP1026.
DATA : IT_OBJID TYPE STANDARD TABLE OF ST_OBJID. " TO STORE THE OBJID OF HRP1001
DATA : WA_OBJID TYPE ST_OBJID.
DATA: WS_FCAT TYPE SLIS_FIELDCAT_ALV . " FEILDCATALOG FOR ALV REPORT
DATA: IN_FCAT TYPE SLIS_T_FIELDCAT_ALV.
DATA: W_LAYOUT TYPE SLIS_LAYOUT_ALV.
DATA : LV_COUNT TYPE I. "FEILD FOR SERIAL NUMBER
***************************END OF DATA DECLARATION******************************************
***********SELECTION SCREEN DESIGN***********************
SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-001.
*SELECT-OPTIONS : S_OTYPE FOR HRP1001-OTYPE NO INTERVALS .
SELECT-OPTIONS : S_OBJID FOR HRP1001-OBJID NO INTERVALS .
SELECT-OPTIONS : DATE FOR SY-DATUM NO-EXTENSION OBLIGATORY.
SELECTION-SCREEN END OF BLOCK B1.
**********END OF SELECTION SCREEN DESIGN*****************
*****INITIALIZATION VENT TO ASIGN DEFAULT VALUES TO OTYPE
*INITIALIZATION.
S_OTYPE-LOW = 'D'.
S_OTYPE-SIGN = 'I'.
S_OTYPE-OPTION = 'EQ'.
APPEND S_OTYPE.
CLEAR S_OTYPE.
*************END OF EVENT INITIALIZATION*****************
*********VALIDATION FOR SCREEN FIELDS********************
AT SELECTION-SCREEN ON VALUE-REQUEST FOR S_OBJID-LOW.
IF S_OBJID IS NOT INITIAL.
SELECT OTYPE OBJID FROM HRP1000
INTO TABLE IT_OBJID_SH
WHERE OTYPE = 'D'.
IF SY-SUBRC EQ 0.
SEARCH HELP FOR QUALIFICATION.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
DDIC_STRUCTURE = ' '
RETFIELD = 'OBJID'
PVALKEY = ' '
DYNPPROG = SY-REPID
DYNPNR = SY-DYNNR
DYNPROFIELD = 'S_OBJID'
STEPL = 0
WINDOW_TITLE =
VALUE = ' '
VALUE_ORG = 'S'
MULTIPLE_CHOICE = ' '
DISPLAY = ' '
CALLBACK_PROGRAM = ' '
CALLBACK_FORM = ' '
MARK_TAB =
IMPORTING
USER_RESET =
TABLES
VALUE_TAB = IT_OBJID_SH
FIELD_TAB =
RETURN_TAB = RETURN_TAB
DYNPFLD_MAPPING =
EXCEPTIONS
PARAMETER_ERROR = 1
NO_VALUES_FOUND = 2
OTHERS = 3
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
ENDIF.
IF SY-SUBRC NE 0.
MESSAGE 'NO RECORD FOUND FOR THE GIVEN SELECTION CRITERIA.' TYPE 'E'.
ENDIF.
ENDIF.
REFRESH IT_OBJID.
***************VALIDATION OF SCREEN FIELDS ENDS***********
*****************START OF SELECTION ************************
START-OF-SELECTION.
SELECT OTYPE
OBJID
RELAT
BEGDA
ENDDA
SCLAS
SOBID FROM HRP1001 INTO TABLE IT_HRP1001
WHERE OTYPE = 'D'
AND OBJID IN S_OBJID
AND BEGDA GE DATE-LOW
AND ENDDA LE DATE-HIGH
AND ( SCLAS = 'E' OR SCLAS = 'ET' ).
IF SY-SUBRC NE 0.
MESSAGE 'NO RECORD FOUND FOR THE GIVEN SELECTION CRITERIA ' TYPE 'E'.
ENDIF.
LOOP AT IT_HRP1001 INTO WA_HRP1001.
WA_SOBID-OTYPE = WA_HRP1001-OTYPE.
WA_SOBID-OBJID = WA_HRP1001-OBJID.
WA_SOBID-RELAT = WA_HRP1001-RELAT.
WA_SOBID-BEGDA = WA_HRP1001-BEGDA.
WA_SOBID-ENDDA = WA_HRP1001-ENDDA.
WA_SOBID-SCLAS = WA_HRP1001-SCLAS.
WA_SOBID-SOBID = WA_HRP1001-SOBID.
APPEND WA_SOBID TO IT_SOBID.
ENDLOOP.
SELECT OTYPE
OBJID
AEDTM
UNAME
DELET
CANCR
NCONT
FROM HRP1026
INTO TABLE IT_HRP1026
FOR ALL ENTRIES IN IT_SOBID
WHERE OBJID = IT_SOBID-SOBID
AND ( OTYPE = 'E' OR OTYPE = 'ET' )
AND DELET = 'X' AND
BEGDA GE DATE-LOW AND
ENDDA LE DATE-HIGH.
IF SY-SUBRC EQ 0.
SELECT OBJID
STEXT
FROM HRP1000
INTO TABLE IT_HRP1000
FOR ALL ENTRIES IN IT_SOBID
WHERE OBJID = IT_SOBID-SOBID AND
BEGDA GE DATE-LOW AND
ENDDA LE DATE-HIGH.
SELECT CANCR
CANCRT
FROM T77CRT
INTO TABLE IT_REASON
FOR ALL ENTRIES IN IT_HRP1026
WHERE CANCR = IT_HRP1026-CANCR
AND LANGU = 'E' .
********PERFORM FOR GETTING T HE LOCATION OF THE COURCE**
PERFORM GET_LOCATION.
**************END OF LOCATION OF COURCE ******************
ELSE.
MESSAGE 'NO RECORD FOUND FOR THE GIVEN SELECTION CRITERIA ' TYPE 'E'.
ENDIF.
*****PERFORM FOR GETTING DATA INTO THE FINAL INTERNAL TABLE IT_OUTPUT**
PERFORM GET_DATA.
*********************************END OF PERFORM ET DATA ***************
***********LOGIC FOR PRONTING NUMBER OF RECORDS ***********************
LV_COUNT = 0.
LOOP AT IT_OUTPUT INTO WA_OUTPUT.
LV_COUNT = LV_COUNT + 1.
WA_OUTPUT-COUNT = LV_COUNT.
APPEND WA_OUTPUT TO IT_OUTPUT_1.
ENDLOOP.
REFRESH IT_OUTPUT.
IT_OUTPUT = IT_OUTPUT_1.
********************END OF LOGIC FOR NUMBER OF RECORDS ***************
****************DISPLAYING OUTPUT BY USEING GRID DISPLAY**********
PERFORM ALV_DISPLAY.
****************************END OF PERFORM FOR DISPLAYING **********
*& Form PERFORM_ALV
DISPLAY THE RECORDS IN ALV GRID FORMAT.
FORM ALV_DISPLAY.
PERFORM FIELD_CATALOG USING 'COUNT' 'Sr. No.'.
PERFORM FIELD_CATALOG USING 'OBJID' 'COURCE ID.'.
PERFORM FIELD_CATALOG USING 'STEXT' 'COURCE NAME'.
PERFORM FIELD_CATALOG USING 'LSTEXT' 'COURCE LOATION'.
PERFORM FIELD_CATALOG USING 'BEGDA' 'BEGIN DATE '.
PERFORM FIELD_CATALOG USING 'ENDDA' 'END DATE '.
PERFORM FIELD_CATALOG USING 'CANCRT' 'REASON'.
PERFORM FIELD_CATALOG USING 'AEDTM' 'DATE Of CANCEL'.
PERFORM FIELD_CATALOG USING 'NCONT' 'NUMBER OF BOOKINGS'.
PERFORM FIELD_CATALOG USING 'LOCTX' 'COURCE LOCATION'.
PERFORM FIELD_CATALOG USING 'UNAME' 'WHO CANCELLED'.
PERFORM FIELD_CATALOG USING 'LSTEXT' 'COURCE LOATION'.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
I_STRUCTURE_NAME = 'IT_OUTPUT'
I_GRID_TITLE = ' Cancelled courses with reason '
IT_FIELDCAT = IN_FCAT
TABLES
T_OUTTAB = IT_OUTPUT.
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. "PERFORM_ALV
*& Form FIELD_CATALOG
text
-->FIELD_NAME text
-->DIS_TEXT text
FORM FIELD_CATALOG USING FIELD_NAME DIS_TEXT.
CLEAR WS_FCAT.
WS_FCAT-TABNAME = 'IT_OUTPUT'.
WS_FCAT-FIELDNAME = FIELD_NAME.
WS_FCAT-SELTEXT_M = DIS_TEXT.
APPEND WS_FCAT TO IN_FCAT .
ENDFORM. "FIELD_CATALOG
*& Form GET_DATA
text
--> p1 text
<-- p2 text
FORM GET_DATA .
*sort it_sobid by objid.
LOOP AT IT_SOBID INTO WA_SOBID." where otype eq s_otype and objid eq s_objid.
READ TABLE IT_HRP1026 WITH KEY OBJID = WA_SOBID-SOBID OTYPE = WA_SOBID-SCLAS INTO WA_HRP1026.
IF SY-SUBRC EQ 0.
READ TABLE IT_HRP1000 WITH KEY OBJID = WA_SOBID-SOBID INTO WA_HRP1000.
READ TABLE IT_REASON WITH KEY CANCR = WA_HRP1026-CANCR INTO WA_REASON.
WA_OUTPUT-OBJID = WA_HRP1026-OBJID.
WA_OUTPUT-BEGDA = WA_SOBID-BEGDA.
WA_OUTPUT-ENDDA = WA_SOBID-ENDDA.
WA_OUTPUT-AEDTM = WA_HRP1026-AEDTM.
WA_OUTPUT-UNAME = WA_HRP1026-UNAME.
WA_OUTPUT-NCONT = WA_HRP1026-NCONT.
READ TABLE IT_HRP1000 WITH KEY OBJID = WA_SOBID-SOBID INTO WA_HRP1000.
WA_OUTPUT-STEXT = WA_HRP1000-STEXT.
READ TABLE IT_REASON WITH KEY CANCR = WA_HRP1026-CANCR INTO WA_REASON.
WA_OUTPUT-CANCRT = WA_REASON-CANCRT.
CLEAR WA_REASON-CANCRT.
READ TABLE IT_LOCATION1 WITH KEY OBJID = WA_HRP1026-OBJID INTO WA_LOCATION1..
READ TABLE IT_LSTEXT WITH KEY OBJID = WA_LOCATION1-SOBID OTYPE = 'F' INTO WA_LSTEXT.
WA_OUTPUT-LSTEXT = WA_LSTEXT-LSTEXT.
CLEAR WA_LSTEXT-LSTEXT.
APPEND WA_OUTPUT TO IT_OUTPUT.
CLEAR WA_OUTPUT.
CLEAR WA_OUTPUT-CANCRT.
ENDIF.
ENDLOOP.
ENDFORM. " GET_DATA
*& Form GET_LOCATION
text
--> p1 text
<-- p2 text
FORM GET_LOCATION .
SELECT OTYPE
OBJID
RSIGN
RELAT
SCLAS
SOBID
FROM HRP1001
INTO TABLE IT_LOCATION
FOR ALL ENTRIES IN IT_HRP1026
WHERE OTYPE = 'E' AND OBJID = IT_HRP1026-OBJID
AND RSIGN = 'A' AND RELAT = '024' AND SCLAS = 'F'
AND BEGDA GE DATE-LOW AND ENDDA LE DATE-HIGH.
IF SY-SUBRC NE 0.
MESSAGE 'NO RECORD FOUND FOR THE GIVEN SELECTION CRITERIA ' TYPE 'E'.
ENDIF.
LOOP AT IT_LOCATION INTO WA_LOCATION.
WA_LOCATION1-OTYPE = WA_LOCATION-OTYPE.
WA_LOCATION1-OBJID = WA_LOCATION-OBJID.
WA_LOCATION1-RSIGN = WA_LOCATION-RSIGN.
WA_LOCATION1-RELAT = WA_LOCATION-RELAT.
WA_LOCATION1-SCLAS = WA_LOCATION-SCLAS.
WA_LOCATION1-SOBID = WA_LOCATION-SOBID.
APPEND WA_LOCATION1 TO IT_LOCATION1.
CLEAR WA_LOCATION1.
ENDLOOP.
SELECT OTYPE
OBJID
STEXT
FROM HRP1000
INTO TABLE IT_LSTEXT
FOR ALL ENTRIES IN IT_LOCATION1
WHERE OBJID = IT_LOCATION1-SOBID
AND OTYPE = 'F'.
AND BEGDA GE DATE-LOW
AND ENDDA LE DATE-HIGH.
ENDFORM. " GET_LOCATION
<b>Reward if usefull</b> -
Plz help my external drive isn't being mounted
I have a WD external hard drive, and it stopped mounting on my MAC. I think it happened when I tried to delete the alias in Mac HD/Volumes/. Now when I plug in my drive it only mounts the alias in Volumes but not the actual drive. When I click on the alias it says that the original can't be found. Anybody know how to fix this? Plz help.
Thought you could use this info about getting FireWire to work!
First, you should always Repair Permissions in Disk Utility before and after any update; I would do that now. If you installed your update with FireWire plugged in, your Mac may not recognize it anymore.
Try resetting your FireWire ports by disconnecting all FW devices, shut down your Mac and unplug it from AC power (wall socket) for 30 minutes. plug it back in and try FW.
If that did'nt work, download the combo update from this site (yours may be corrupt), not Software Update, disconnect all firewire + USB devices except keyboard + mouse, Repair Permissions, re-install update, Repair Permissions again + try. Yours is the 10.4.6 Combo update. Others reading, download the Combo that applies to your system.
If that still did'nt get it Zap the PRAM. While restarting Mac hold down the following key combo Command-Option-P-R. Keep holding those keys down till you hear the second start-up chime, then release.
For those of you with Macs that are not PowerBooks or iBooks, a bad internal battery can cause FireWire to not be recognized, so make sure it's good! Also, here is Apple doc.#88338 on getting FireWire to work.
Good Luck!
Cheers!
DALE
Maybe you are looking for
-
This morning I received an email from work on my Mac. It was addressed to my Apple mail address. I use Apple Mail App. I noticed the message does not appear on my iPhone. Yes the account in set up properly as I receive other mail. I logged onto iClou
-
Help needed in debugging callablestatement changing performance
Looking for some help debugging a performance problem. We are in the process of converting an ASP web application running on IIS to a java web application running on OAS. We have java code using a CallableStatement that calls an Oracle PL/SQL Procedu
-
Java program HELPPPP!!!!!
Hello, I'm very new to Java programming, and well I'm taking Computer Science as my major, and I need a little help to this program: You will develop an inheritance hierarchy of classes to enhance your understanding of inheritance, encapsulation, and
-
How to import a album with multiple artists in the one album?
How do I import a album with multiple artists as the one album. Everytime I try to do this it does not collate it into one album, the other artists come up seperatley, also if this is possible can you set so that it works automatically everytime? Ho
-
Working with .mpg files
I have about 10 files (.mpg converted from VHS to Digital). Each file is ~4 to 6GB in size. I'd like to pull them into Premiere Elements 8.0, edit and create menus. When I started I tested one project to burn I noticed that roughly 2 hrs of video wil