Files listed as "No Date" in Finder
All files being created in Word, Excel or other apps, as well as items pulled via Browser, suddenly appear in finder and in folders WAY at the bottom of the directory in a group by "No Date"
Just began happening yesterday. Extremely annoying and makes it difficult to find anything. Plus the scroll bar inconveniently overlaps that last item, making it hard to click on even after you've found it
Hi, the process you suggested didn't work for me because the 'Restore Defaults' button was grayed out.
Thanks
Similar Messages
-
how to get SQL server Total DB size , Total DB free space , Total Data & Log File Sizes and Total Data & Log File free Sizes from a list of server
Hi Shivanq,
To get a list of databases, their sizes and the space available in each on the local SQL instance.
dir SQLSERVER:\SQL\localhost\default\databases | Select Name, Size, SpaceAvailable | ft -auto
This article is also helpful for you to get DB and Log File size information:
Checking Database Space With PowerShell
I hope this helps. -
Used Migration Assistant to successfully transfer PC files to Mini. However file creation or modified date does not transfer. Date of creation is listed as day of transfer. I would gratefully appreciate any help in solving this?
I have the same problem; used Migration Assistant to transfer all my pix from PC to MacbookPro, however dates of pix were not transferred. Date created as the date of transfer. Cannot sort my pix according to date.
Anybody has an answer? -
I used migration assistant and my ethernet cable to move data and apps from my 5-yr old Intel-based iMac to my brand new Intel-based iMac running OS Lion. The old machine was running OS 10.5.8. Not all my files transferred (or I can't find them). I've seen recommendations to select the old computer in System Preferences, but that didn't work. Help. Thanks!
IMO, wrong choice. Start over, using a FireWire cable and following the steps in Pondini's Setup New Mac guide.
-
Rolling, Jumping finder file lists on OS 9 clients
Weird. 10.4.8 Server with some Tiger clients and some OS 9 clients.
On shared volumes on the OS 9 clients the files lists in finder windows roll up and down and sometimes jump. So much so that sometimes it's difficult to select a file in the list. Or while creating/changing a file name, the list will suddenly jump so that the curser ends up on a different file.
Anyone know what's going/how to fix?Yeah its clear. I have had the same issue with OS9 clients on a 10.4 Server. I assume it was some update to improve the refresh time of an OS X finder client but it has created this jumping for OS 9 clients. I only have 2 clients on 9 out of 50 so I'm about to get them to OS X finally. That would be the best fix at this point.
What i have done that works as a temp fix is find the jumping files and just replace or copy them back to the server from the 9 client. there may be more then one jumping file and if it's a large folder or a constantly updated folder by OS X clients you'll be chasing your tail a lot. If It is a folder with minor content changes and even only for the OS 9 users you can fix it and most likely not have to do it again for some time. -
How can i read the text files and buffer the data in Vector?
hi. I have been running into this problem for days, but with no luck and losing right direction.
The problem is : I am trying to read a text file and buffer the data into a
Queue for each user.
the sample text file is as below:( 1st column is timestamp, 2nd is user_id, 3rd is packet_id, 4th is packet_seqno, 5th is packet_size)
0 1 1 1 512
1 2 1 2 512
2 3 1 3 512
3 4 1 4 512
4 5 1 5 512
5 6 1 6 512
6 7 1 7 512
7 8 1 8 512
8 9 1 9 512
9 10 1 10 512
10 1 2 11 512
11 2 2 12 512
12 3 2 13 512
13 4 2 14 512
14 5 2 15 512
15 6 2 16 512
16 7 2 17 512
17 8 2 18 512
18 9 2 19 512
19 10 2 20 512
20 1 3 21 512
21 2 3 22 512
22 3 3 23 512
23 4 3 24 512
24 5 3 25 512
25 6 3 26 512
26 7 3 27 512
27 8 3 28 512
28 9 3 29 512
29 10 3 30 512
30 1 4 31 512
31 2 4 32 512
32 3 4 33 512
33 4 4 34 512
34 5 4 35 512
35 6 4 36 512
36 7 4 37 512
37 8 4 38 512
38 9 4 39 512
39 10 4 40 512
40 1 5 41 512
41 2 5 42 512
42 3 5 43 512
43 4 5 44 512
44 5 5 45 512
45 6 5 46 512
46 7 5 47 512
47 8 5 48 512
48 9 5 49 512
49 10 5 50 512
50 1 6 51 512
51 2 6 52 512
52 3 6 53 512
53 4 6 54 512
54 5 6 55 512
55 6 6 56 512
56 7 6 57 512
57 8 6 58 512
58 9 6 59 512
59 10 6 60 512
60 1 7 61 512
61 2 7 62 512
62 3 7 63 512
63 4 7 64 512
64 5 7 65 512
65 6 7 66 512
66 7 7 67 512
67 8 7 68 512
68 9 7 69 512
69 10 7 70 512
70 1 8 71 512
71 2 8 72 512
What I wanna do is to read all the data above and buffer them in a queue for each user( there are only 10 users in total).
I already created a class called Class packet:
public class packet {
private int timestamp;
private int user_id;
private int packet_id;
private int packet_seqno;
private int packet_size;
/** Creates a new instance of packet */
public packet(int timestamp,int user_id, int packet_id,int packet_seqno, int packet_size)
this.timestamp = timestamp;
this.user_id=user_id;
this.packet_id=packet_id;
this.packet_seqno=packet_seqno;
this.packet_size=packet_size;
}then I wanna to create another Class called Class user which I can create a queue for each user (10 users in total) to store type packet information. the queue for each user will be in the order by timestamp.
any idea and sample code will be appreciated.Doesn't sound too hard to me. Your class User (the convention says to capitalize class names) will have an ArrayList or Vector in it to represent the queue, and a method to store a Packet object into the List. An array or ArrayList or Vector will hold the 10 user objects. You will find the right user object from packet.user_id and call the method.
Please try to write some code yourself. You won't learn anything from having someone else write it for you. Look at sample code using ArrayList and Vector, there's plenty out there. Post in the forum again if your code turns out not to behave. -
I am working with a custom table zscs_record.
data is being fetched in the perform upload_workarea.
but the list contains no data.
there might be any problem with the display_log.
if anybody plz can find where is the mistake full points will be rewarded.
just copy the program and execute it.
REPORT yreport1 LINE-SIZE 260
NO STANDARD PAGE HEADING
MESSAGE-ID zsc_supply_chain.
T Y P E - P O O L S *
TYPE-POOLS: SLIS.
C o n s t a n t V A R I A B L E S *
CONSTANTS: c_e TYPE char1 VALUE 'E',
c_a TYPE char1 VALUE 'A',
c_s TYPE char1 VALUE 'S',
c_x TYPE char1 VALUE 'X',
c_dynpro_0201(4) TYPE c VALUE '0201',
c_prognam(12) TYPE c VALUE 'SAPRCKM_MR22',
c_dynpro_1000(4) TYPE c VALUE '1000',
c_dynpro_0120(4) TYPE c VALUE '0120',
c_okcode(10) TYPE c VALUE 'BDC_OKCODE',
c_entr(5) TYPE c VALUE '=ENTR',
c_dummy(6) TYPE c VALUE '=DUMMY',
c_down(5) TYPE c VALUE '=DOWN',
c_save(5) TYPE c VALUE '=SAVE',
c_back(5) TYPE c VALUE '=BACK',
c_onli(5) TYPE c VALUE '=ONLI',
c_ee(3) TYPE c VALUE '/EE',
c_one TYPE ckml_kongr VALUE '1' ,
c_bkpf(4) TYPE c VALUE 'BKPF',
c_wfp TYPE bukrs VALUE 'WFP',
c_sa TYPE blart VALUE 'SA',
c_ags TYPE ktosl VALUE 'AGS',
c_usd TYPE waers_iso VALUE 'USD',
c_budat(14) TYPE c VALUE 'MR21HEAD-BUDAT',
c_bukrs(14) TYPE c VALUE 'MR21HEAD-BUKRS',
c_werks(14) TYPE c VALUE 'MR21HEAD-WERKS',
c_xblnr(14) TYPE c VALUE 'MR21HEAD-XBLNR',
c_kongr(14) TYPE c VALUE 'CKMLKONT-KONGR',
c_bktxt(14) TYPE c VALUE 'MR21HEAD-BKTXT',
c_mr22 TYPE tstc-tcode VALUE 'MR22',
c_f13 TYPE tstc-tcode VALUE 'F.13',
c_n(1) TYPE c VALUE 'N',
c_bag TYPE char9 VALUE '%Bagging%',
c_ltsh TYPE char12 VALUE '%LTSH%Clear%',
c_trnsf TYPE char30 VALUE '%Transformation%Clear%',
c_ste TYPE char20 VALUE '%Stevedoring%Clear%',
c_mat TYPE char30 VALUE '%Material%Revaluation',
c_mat1 TYPE char8 VALUE 'MATERIAL',
c_rev TYPE char10 VALUE 'REVOLUTION',
c_tabname TYPE tabname VALUE 'ZSCT_RECORD',
c_prognam3(7) TYPE c VALUE 'SAPF124',
c_prognam4(8) TYPE c VALUE 'SAPMSSY0',
c_cursor(10) TYPE c VALUE 'BDC_CURSOR',
c_konts_low(9) TYPE c VALUE 'KONTS-LOW',
c_bukrx_low(9) TYPE c VALUE 'BUKRX-LOW',
c_saknr(7) TYPE c VALUE 'X_SAKNR',
c_augdt(5) TYPE c VALUE 'AUGDT',
c_testl(5) TYPE c VALUE 'TESTL',
c_xausbel(7) TYPE c VALUE 'XAUSBEL',
c_xnausbel(8) TYPE c VALUE 'XNAUSBEL',
c_fehler(8) TYPE c VALUE 'X_FEHLER',
c_mr21(23) TYPE c VALUE 'MR21HEAD-SCREEN_VARIANT',
c_lagmat(18) TYPE c VALUE 'LAGERMATERIAL_0250',
c_psp(30) TYPE c VALUE 'PSP-ELEMENT - OHNE BWKEY_0250',
c_ckmatnr(20) TYPE c VALUE 'CKI_MR22_0250-MATNR(',
c_ckzuumb(20) TYPE c VALUE 'CKI_MR22_0250-ZUUMB(',
c_ckpspnr(20) TYPE c VALUE 'CKI_MR22_0250-PSPNR(',
c_ckbwkey(20) TYPE c VALUE 'CKI_MR22_0250-BWKEY(',
c_sp(1) TYPE c VALUE ')',
c_shkzg1 TYPE shkzg VALUE 'H',
c_shkzg2 TYPE shkzg VALUE 'S',
*For ALV column positions
c_col_pos1 TYPE sycucol VALUE '01',
c_col_pos2 TYPE sycucol VALUE '02',
c_col_pos3 TYPE sycucol VALUE '03',
c_col_pos4 TYPE sycucol VALUE '04',
c_col_pos5 TYPE sycucol VALUE '05',
c_col_pos6 TYPE sycucol VALUE '06',
c_col_pos7 TYPE sycucol VALUE '07',
c_col_pos8 TYPE sycucol VALUE '08',
c_col_pos9 TYPE sycucol VALUE '09',
c_col_pos10 TYPE sycucol VALUE '10',
c_col_pos11 TYPE sycucol VALUE '11',
c_col_pos12 TYPE sycucol VALUE '12',
c_col_pos13 TYPE sycucol VALUE '13',
c_col_pos14 TYPE sycucol VALUE '14',
c_col_pos15 TYPE sycucol VALUE '15',
*For ALV Field Names of final Table
c_fld_recid TYPE slis_fieldname VALUE 'RECID', "Record ID number
c_fld_kongr TYPE slis_fieldname VALUE 'KONGR', "Reason code
c_fld_hkont TYPE slis_fieldname VALUE 'HKONT', "GL Account
c_fld_projk TYPE slis_fieldname VALUE 'PROJK', "Project code
c_fld_werks TYPE slis_fieldname VALUE 'WERKS', "Plant
c_fld_matnr TYPE slis_fieldname VALUE 'MATNR', "Commodity
c_fld_zcptp TYPE slis_fieldname VALUE 'ZCPTP', "Cose portion to be posted
c_fld_zerrf TYPE slis_fieldname VALUE 'ZERRF', "Success flag
c_fld_zerrc TYPE slis_fieldname VALUE 'ZERRC', "Error code
c_fld_zertx TYPE slis_fieldname VALUE 'ZERTX', "Error txt
c_fld_hkont1 TYPE slis_fieldname VALUE 'HKONT',
c_fld_opbal TYPE slis_fieldname VALUE 'OPBAL',
c_fld_exp TYPE slis_fieldname VALUE 'EXP',
c_fld_cap TYPE slis_fieldname VALUE 'CAP',
c_fld_err TYPE slis_fieldname VALUE 'ERR',
c_table TYPE slis_tabname VALUE 'i_log_disp'.
*T Y P E S *
*Structure for uploading the data for further processing
TYPES: BEGIN OF t_zscs_record ,
recid TYPE zderecid, "Record id number
zerrf TYPE zdeerrf, "Processed \ not processed flag - FLAG X Success Blank
cpudt TYPE cpudt, "Day On Which Accounting Document Was Entered
kongr TYPE ckml_kongr, "Account Assignment Reason
hkont TYPE hkont, "General Ledger Account
projk TYPE char30, "WBS Element
werks TYPE werks_d, "Plant
matnr TYPE matnr, "Material Number
zcptp TYPE zdecptp, "cost portion to be posted
belnr TYPE belnr_d, "Accounting Document Number
zerrc TYPE zdeerrc, "Error code
zertx TYPE zdeertx, "Error text
set TYPE numc2,
END OF t_zscs_record ,
*Structre for modified WBS element
BEGIN OF t_zscs_record_m ,
recid TYPE zderecid, "Record id number
zerrf TYPE zdeerrf, "Processed \ not processed flag - FLAG X Success Blank
cpudt TYPE cpudt, "Day On Which Accounting Document Was Entered
kongr TYPE ckml_kongr, "Account Assignment Reason
hkont TYPE hkont, "General Ledger Account
projk TYPE char24,
werks TYPE werks_d, "Plant
matnr TYPE matnr, "Material Number
zcptp TYPE zdecptp, "cost portion to be posted
belnr TYPE belnr_d, "Accounting Document Number
zerrc TYPE zdeerrc, "Error code
zertx TYPE zdeertx, "Error text
set TYPE numc2,
END OF t_zscs_record_m,
*Structure for retrieving data from custom table ZSCT_AUTOINV
BEGIN OF t_zsct_autoinv,
saknr TYPE saknr, "G/L Account Number
fipos TYPE fm_fipex, "Commitment Item
geber TYPE bp_geber, "Fund
saknr_off TYPE saknr, "G/L Account Number
fipos_off TYPE fm_fipex, "Commitment Item
END OF t_zsct_autoinv,
*Structure for retrieving data from database table FMBDT
BEGIN OF t_fmbdt,
rldnr TYPE rldnr, "Ledger
rrcty TYPE rrcty, "Record Type
rvers TYPE versn, "Version
ryear TYPE gjahr, "Fiscal Year
robjnr TYPE gobjnr_r, "Object number for objects (account assignment elements)
cobjnr TYPE gobjnr_c, "Object number for transaction attributes
sobjnr TYPE gobjnr_s, "Object number for partner objects (accnt assignmnt elements)
rtcur TYPE rtcur, "Currency Key
drcrk TYPE shkzg, "Debit/Credit Indicator
rpmax TYPE rpmax, "period
rfund TYPE fm_fund, "Fund
rfundsctr TYPE fistl, "Funds Center
rmeasure TYPE fm_measure, "Funded Program
END OF t_fmbdt,
*Structure for retrieveing data from table SKAT
BEGIN OF t_skat,
spras TYPE spras, "Language Key
ktopl TYPE ktopl, "Chart of Accounts
saknr TYPE saknr, "G/L Account Number
txt50 TYPE txt50_skat, "G/L Account Long Text
END OF t_skat,
*Structure for tracking the errors occured during document posting
*through standard BAPI
BEGIN OF t_error_bapi,
number TYPE symsgno,
message TYPE bapi_msg,
recid TYPE zderecid,
set TYPE numc2,
END OF t_error_bapi,
*Structure for tracking the success occured during document posting
*through standard BAPI
BEGIN OF t_suc_bapi,
belnr TYPE belnr_d,
message TYPE bapi_msg,
recid TYPE zderecid,
set TYPE numc2,
END OF t_suc_bapi,
*Structure for tracking the errors occured during document posting
*through MR22 transaction code
BEGIN OF t_error_bdc,
recid TYPE zderecid, "Record id number
number TYPE symsgno,
message TYPE bapi_msg,
set TYPE numc2,
END OF t_error_bdc,
*Structure for tracking the document no. occured during successful posting
*through MR22 transaction code
BEGIN OF t_suc_bdc,
recid TYPE zderecid, "Record id number
var TYPE sy-msgv1,
message TYPE bapi_msg,
set TYPE numc2,
END OF t_suc_bdc,
BEGIN OF t_log_disp,
recid TYPE zderecid, "Record id number
kongr TYPE ckml_kongr, "Account Assignment Reason
hkont TYPE hkont, "General Ledger Account
projk TYPE char30, "WBS Element
werks TYPE werks_d, "Plant
matnr TYPE matnr, "Material Number
zcptp TYPE zdecptp, "cost portion to be posted
zerrf TYPE zdeerrf, "Processed \ not processed flag - FLAG X Success Blank
zerrc TYPE zdeerrc, "Error code
zertx TYPE zdeertx, "Error text
hkont1 TYPE hkont,
opbal TYPE dmbtr,
exp TYPE dmbtr,
cap TYPE dmbtr,
err TYPE dmbtr,
END OF t_log_disp.
*Field symbols declared for BAPIRET2
FIELD-SYMBOLS: <fs_return> TYPE bapiret2.
G l o b a l W O R K A R E A S *
DATA: w_zscs_record TYPE t_zscs_record,
w_zscs_record_mod TYPE t_zscs_record,
w_fmbdt TYPE t_fmbdt,
w_bapi TYPE t_zscs_record,
w_bdc TYPE t_zscs_record,
w_temp TYPE t_zscs_record, "#EC NEEDED
w_bapiheader TYPE bapiache09,
w_return TYPE bapiret2,
w_accoutgl TYPE bapiacgl09,
w_currency TYPE bapiaccr09,
w_bdcdata TYPE bdcdata,
w_messtab TYPE bdcmsgcoll,
w_error_bapi TYPE t_error_bapi,
w_suc_bapi TYPE t_suc_bapi,
w_error_bdc TYPE t_error_bdc,
w_suc_bdc TYPE t_suc_bdc,
w_fieldcatalog TYPE slis_fieldcat_alv, "Workarea for populating fieldcatalog
w_log_disp TYPE t_log_disp.
I n t e r n a l T a b l e s *
DATA: i_zscs_record TYPE STANDARD TABLE OF t_zscs_record,
i_zscs_record1 TYPE STANDARD TABLE OF t_zscs_record,
i_bapi TYPE STANDARD TABLE OF t_zscs_record,
i_bdc TYPE STANDARD TABLE OF t_zscs_record,
i_fmbdt TYPE STANDARD TABLE OF t_fmbdt,
i_accoutgl TYPE STANDARD TABLE OF bapiacgl09,
i_currency TYPE STANDARD TABLE OF bapiaccr09,
i_return TYPE STANDARD TABLE OF bapiret2,
i_bdcdata TYPE STANDARD TABLE OF bdcdata INITIAL SIZE 0,
i_messtab TYPE STANDARD TABLE OF bdcmsgcoll INITIAL SIZE 0,
i_bdcdata1 TYPE STANDARD TABLE OF bdcdata INITIAL SIZE 0,
i_messtab1 TYPE STANDARD TABLE OF bdcmsgcoll INITIAL SIZE 0,"#EC NEEDED
i_autoinv TYPE STANDARD TABLE OF t_zsct_autoinv,
i_autoinv1 TYPE STANDARD TABLE OF t_zsct_autoinv,
i_error_bapi TYPE STANDARD TABLE OF t_error_bapi,
i_suc_bapi TYPE STANDARD TABLE OF t_suc_bapi,
i_error_bdc TYPE STANDARD TABLE OF t_error_bdc,
i_suc_bdc TYPE STANDARD TABLE OF t_suc_bdc,
i_fieldcatalog TYPE slis_t_fieldcat_alv,
i_log_disp TYPE STANDARD TABLE OF t_log_disp. "internal table for final log display
G l o b a l V A R I A B L E S *
DATA: v_rec TYPE string,
v_rec1 TYPE string,
v_count TYPE numc2 VALUE 1,
v_flag TYPE char1, "#EC NEEDED
v_subrc TYPE sysubrc,
v_objkey TYPE awkey,
v_amt TYPE zdecptp,
v_txt50 TYPE txt50_skat,
v_pspid TYPE ps_pspid, "#EC NEEDED
v_totexppe TYPE zdecptp,
v_totcapit TYPE zdecptp,
v_toterror TYPE zdecptp,
v_todmbtr TYPE dmbtr,
v_repid TYPE sy-repid.
S E L E C T I O N - S C R E E N D E F I N I T I O N *
S E L E C T I O N - S C R E E N *
*Begin of inv selection block
SELECTION-SCREEN BEGIN OF BLOCK inv WITH FRAME TITLE text-001.
PARAMETERS: p_pstdat TYPE budat DEFAULT sy-datum, "Posting Date
p_rtmode AS CHECKBOX DEFAULT c_x, "Run in test mode
p_prsall RADIOBUTTON GROUP rad DEFAULT 'X' USER-COMMAND com, "Process All
p_cstcpt RADIOBUTTON GROUP rad, "Process cost to be capitalized
p_cstexp RADIOBUTTON GROUP rad, "Process cost to be expensed
p_exauto AS CHECKBOX. "Execute Automatic Clearing
SELECTION-SCREEN END OF BLOCK inv.
*End of inv selection block
I N I T I A L I Z A T I O N *
INITIALIZATION.
Subroutine for clearing the memory space
PERFORM clear_memory. "To clear the memory space.
A T S E L E C T I O N - S C R E E N O U T P U T *
AT SELECTION-SCREEN OUTPUT.
For checking the Clearing program through transaction code F.13 only
when user selects the radio button Process All
IF p_prsall = c_x. "Process All
p_exauto = c_x. "Execute Automatic Clearing
ELSE.
p_exauto = ' '. "Execute Automatic Clearing
ENDIF.
MODIFY SCREEN.
START OF SELECTION *
START-OF-SELECTION.
Subroutine for uploading data from custom database table
ZSCT_RECORD based on the condition selected by user
PERFORM upload_workarea.
END OF SELECTION *
END-OF-SELECTION.
Subroutine for populating the respective internal tables
for posting the documents either through standard BAPI or MR22 transaction code
PERFORM populate_bapi_bdc.
IF NOT i_bapi[] IS INITIAL.
Subroutine for posting documents through standard BAPI
PERFORM post_bapi.
ENDIF.
IF NOT i_bdc[] IS INITIAL.
Subroutine for posting documents through MR22 transaction code
PERFORM call_transaction_mr22.
ENDIF.
Subroutine for automatic clearing
IF p_exauto = c_x.
PERFORM clear_f13.
ENDIF.
IF ( ( i_error_bapi IS NOT INITIAL ) OR ( i_error_bdc IS NOT INITIAL ) ).
Subroutine for displaying the log file
PERFORM display_log.
ENDIF.
PERFORM FINAL_list.
*& Form CLEAR_MEMORY
text
form CLEAR_MEMORY.
Refreshing the global internal tables
REFRESH: i_zscs_record,
i_zscs_record1,
i_bapi,
i_bdc,
i_fmbdt,
i_accoutgl,
i_currency,
i_return,
i_bdcdata,
i_messtab,
i_bdcdata1,
i_messtab1,
i_autoinv,
i_error_bapi,
i_suc_bapi,
i_error_bdc,
i_suc_bdc.
Clearing the global work areas
CLEAR: w_zscs_record,
w_zscs_record_mod,
w_fmbdt,
w_bapi,
w_bdc,
w_temp,
w_bapiheader,
w_return,
w_accoutgl,
w_currency,
w_bdcdata,
w_messtab,
w_error_bapi,
w_suc_bapi,
w_error_bdc,
w_suc_bdc,
*Clearing the global variables
v_rec,
v_rec1,
v_flag,
v_subrc,
v_objkey,
v_amt,
v_pspid.
endform. " CLEAR_MEMORY
*& Form UPLOAD_WORKAREA
Subroutine for uploading data from custom database table *
ZSCT_RECORD based on the condition selected by user *
form UPLOAD_WORKAREA .
IF p_prsall = c_x.
Selecting the non processed data from table ZSCT_RECORD
SELECT recid "#EC CI_NOFIRST "Record id number
zerrf "Processed\not processed flag
cpudt "Day On Which Accounting Document Was Entered
kongr "Account Assignment Reason
hkont "General Ledger Account
projk "WBS Element
werks "Plant
matnr "Material Number
zcptp "cost portion to be posted
belnr "Accounting Document Number
zerrc "Error code
zertx "Error text
FROM zsct_record
INTO TABLE i_zscs_record
WHERE zerrf NE space
AND cpudt = '20081022'.
IF sy-subrc NE 0.
MESSAGE text-021 TYPE 'I'.
LEAVE LIST-PROCESSING.
ENDIF.
ELSEIF p_cstcpt = c_x.
Selecting the non processed data from table ZSCT_RECORD
SELECT recid "#EC CI_NOFIRST
zerrf
cpudt
kongr
hkont
projk
werks
matnr
zcptp
belnr
zerrc
zertx
FROM zsct_record
INTO TABLE i_zscs_record
WHERE zerrf NE space
AND kongr <> c_e.
IF sy-subrc NE 0.
MESSAGE text-021 TYPE 'I'.
LEAVE LIST-PROCESSING.
ENDIF.
ELSEIF p_cstexp = c_x.
Selecting the non processed data from table ZSCT_RECORD
SELECT recid "#EC CI_NOFIRST
zerrf
cpudt
kongr
hkont
projk
werks
matnr
zcptp
belnr
zerrc
zertx
FROM zsct_record
INTO TABLE i_zscs_record
WHERE zerrf NE space
AND kongr EQ c_e.
IF sy-subrc NE 0.
MESSAGE text-021 TYPE 'I'.
LEAVE LIST-PROCESSING.
ENDIF.
ENDIF.
IF sy-subrc = 0.
Sort the internal table by record id
SORT i_zscs_record BY recid.
ENDIF.
endform. " UPLOAD_WORKAREA
*& Form POPULATE_BAPI_BDC *
Subroutine for posting documents through standard BAPI *
FORM populate_bapi_bdc.
DATA: v_tabix TYPE sy-tabix.
Sort the data retrieved from ZSCT_RECORD by KONGR,HKONT & PROJK
SORT i_zscs_record BY kongr hkont projk.
IF NOT i_zscs_record IS INITIAL.
LOOP AT i_zscs_record INTO w_zscs_record_mod.
v_tabix = sy-tabix.
Check if the record id is initial
IF NOT w_zscs_record_mod-recid IS INITIAL.
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_OUTPUT'
EXPORTING
input = w_zscs_record_mod-recid
IMPORTING
output = w_zscs_record-recid.
ENDIF.
Check if the reason code is initial
IF NOT w_zscs_record_mod-kongr IS INITIAL.
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_OUTPUT'
EXPORTING
input = w_zscs_record_mod-kongr
IMPORTING
output = w_zscs_record-kongr.
ENDIF.
Assign the values
w_zscs_record-hkont = w_zscs_record_mod-hkont.
CALL FUNCTION 'CONVERSION_EXIT_ABPSP_OUTPUT'
EXPORTING
input = w_zscs_record_mod-projk
IMPORTING
output = w_zscs_record-projk.
w_zscs_record-werks = w_zscs_record_mod-werks.
w_zscs_record-matnr = w_zscs_record_mod-matnr.
w_zscs_record-zcptp = w_zscs_record_mod-zcptp.
w_zscs_record-cpudt = w_zscs_record_mod-cpudt.
Concatenate KONGR,HKONT & PROJK value to make an unique combination to populate the separete
internal table relevant for posting through BAPI and MR22 transaction
CONCATENATE w_zscs_record-kongr w_zscs_record-hkont w_zscs_record-projk INTO v_rec.
IF v_tabix NE 1.
IF v_rec1 = v_rec.
v_count = v_count. "#EC NEEDED
ELSE.
v_count = v_count + 1.
ENDIF.
ENDIF.
Populate the set number into the two different internal table
relevant for posting through BAPI and MR22 transaction
w_zscs_record-set = v_count.
If the KONGR (Reason code) value is equal to 'E' then the
posting will be occur through standard BAPI
IF w_zscs_record-kongr = c_e.
APPEND w_zscs_record TO i_bapi.
If the KONGR (Reason code) value is not equal to 'E' then the
posting will be occur through MR22 transaction code
ELSEIF w_zscs_record-kongr NE c_e.
APPEND w_zscs_record TO i_bdc.
ENDIF.
v_rec1 = v_rec.
Clear the memory
CLEAR: w_zscs_record,
v_rec.
ENDLOOP.
ENDIF.
endform. " POPULATE_BAPI_BDC
*& Form POST_BAPI
text
form POST_BAPI .
Local structre declaration
TYPES:
Structre for populating record id
BEGIN OF lt_recid,
recid TYPE zderecid,
END OF lt_recid,
Structre for table PRPS
BEGIN OF lt_prps,
pspnr TYPE ps_intnr, "WBS Element
posid TYPE ps_posid, "Work Breakdown Structure Element (WBS Element)
pgsbr TYPE ps_pgsbr, "Business area for WBS element
func_area TYPE fkber, "Functional Area
END OF lt_prps .
Local data declaration
DATA: lw_bapi TYPE t_zscs_record,
lw_bapi1 TYPE t_zscs_record,
lw_recid TYPE lt_recid,
li_recid TYPE STANDARD TABLE OF lt_recid, "#EC NEEDED
li_prps TYPE STANDARD TABLE OF lt_prps,
lw_prps TYPE lt_prps,
li_temp TYPE STANDARD TABLE OF t_zscs_record,
li_temp1 TYPE STANDARD TABLE OF t_zscs_record,
li_bapi TYPE STANDARD TABLE OF t_zscs_record,
li_bapi_m TYPE STANDARD TABLE OF t_zscs_record_m,
lw_bapi_m TYPE t_zscs_record_m,
li_skat TYPE STANDARD TABLE OF t_skat,
li_skat1 TYPE STANDARD TABLE OF t_skat,
li_skat2 TYPE STANDARD TABLE OF t_skat,
lw_temp TYPE t_zscs_record,
li_autoinv TYPE STANDARD TABLE OF t_zsct_autoinv,
lw_autoinv TYPE t_zsct_autoinv,
lv_count TYPE numc10,
lw_skat TYPE t_skat,
lw_skat1 TYPE t_skat, "#EC NEEDED
lw_skat2 TYPE t_skat, "#EC NEEDED
lv_count1 TYPE numc10,
lw_index TYPE sy-index.
Assigning the I_BAPI data to a local internal table
li_temp[] = i_bapi[].
li_bapi[] = i_bapi[].
li_temp1[] = i_bapi[].
Sort the internal table by SET
SORT i_bapi BY set.
Sort the internal table LI_TEMP by SET
SORT li_temp BY set.
Delete adjacent duplicates from LI_TEMP compring SET
DELETE ADJACENT DUPLICATES FROM li_temp COMPARING set.
Sort the internal table LI_TEMP1 by PROJK
SORT li_temp1 BY projk.
Delete adjacent duplicates from LI_TEMP1 compring PROJK
DELETE ADJACENT DUPLICATES FROM li_temp1 COMPARING projk.
Sort the internal table LI_BAPI by HKONT
SORT li_bapi BY hkont.
Delete adjacent duplicates from LI_BAPI compring HKONT
DELETE ADJACENT DUPLICATES FROM li_bapi COMPARING hkont.
Check if the li_bapi is initial or not
IF NOT li_bapi[] IS INITIAL.
Retrieve the text information from database table SKAT
for all the G/L Account relevant to LTSH Overland Clearing Account/
Transformation Clearing / Stevedoring Clearing Account / Bagging Clearing Account
SELECT spras "#EC CI_SGLSELECT
ktopl
saknr
txt50
FROM skat
INTO TABLE li_skat
FOR ALL ENTRIES IN li_bapi
WHERE spras = c_e
AND saknr = li_bapi-hkont
AND ( txt50 LIKE c_bag
OR txt50 LIKE c_ltsh
OR txt50 LIKE c_trnsf
OR txt50 LIKE c_ste
OR txt50 LIKE c_mat ).
IF sy-subrc EQ 0.
SORT li_skat1 BY saknr.
ENDIF.
Spiliting the internal table with respect to the TXT50
LOOP AT li_skat INTO lw_skat.
v_txt50 = lw_skat-txt50.
TRANSLATE v_txt50 TO UPPER CASE. "#EC SYNTCHAR
IF v_txt50 CS c_mat1 AND
v_txt50 CS c_rev.
Internal table regaring all the G/L Account relevant to Material revolution Account
APPEND lw_skat TO li_skat2.
ELSE.
Internal table regaring all the G/L Account relevant to LTSH Overland Clearing Account/
Transformation Clearing / Stevedoring Clearing Account / Bagging Clearing Account
APPEND lw_skat TO li_skat1.
ENDIF.
CLEAR: lw_skat,
v_txt50.
ENDLOOP.
REFRESH: li_skat.
Retrieve required data from custom table ZSCT_AUTOINV
SELECT saknr
fipos
geber
saknr_off
fipos_off
FROM zsct_autoinv
INTO TABLE li_autoinv
FOR ALL ENTRIES IN li_bapi
WHERE saknr = li_bapi-hkont.
IF sy-subrc = 0.
Sort li_autoinv by GEBER
i_autoinv1 = li_autoinv.
SORT li_autoinv BY geber.
Delete adjacent duplicates from li_autoinv comparing GEBER
DELETE ADJACENT DUPLICATES FROM li_autoinv COMPARING geber.
ENDIF.
IF NOT li_autoinv[] IS INITIAL.
Retrieve required data from database table FMBDT
SELECT rldnr
rrcty
rvers
ryear
robjnr
cobjnr
sobjnr
rtcur
drcrk
rpmax
rfund
rfundsctr
rmeasure
FROM fmbdt "#EC CI_NOFIRST
INTO TABLE i_fmbdt
FOR ALL ENTRIES IN li_autoinv
WHERE ryear = p_pstdat+0(4)
AND rfund = li_autoinv-geber.
ENDIF.
IF sy-subrc = 0.
SORT i_fmbdt BY rfund.
ENDIF.
ENDIF.
Populate the internal table with the modified WBS element
value for further processing
LOOP AT i_bapi INTO w_bapi.
lw_bapi_m-recid = w_bapi-recid.
lw_bapi_m-zerrf = w_bapi-zerrf.
lw_bapi_m-cpudt = w_bapi-cpudt.
lw_bapi_m-kongr = w_bapi-kongr.
lw_bapi_m-hkont = w_bapi-hkont.
lw_bapi_m-projk = w_bapi-projk.
lw_bapi_m-werks = w_bapi-werks.
lw_bapi_m-matnr = w_bapi-matnr.
lw_bapi_m-zcptp = w_bapi-zcptp.
lw_bapi_m-belnr = w_bapi-belnr.
lw_bapi_m-zerrc = w_bapi-zerrc.
lw_bapi_m-zertx = w_bapi-zertx.
lw_bapi_m-set = w_bapi-set.
APPEND lw_bapi_m TO li_bapi_m.
CLEAR: lw_bapi_m.
ENDLOOP.
Sort LI_BAPI_M by WBS element
SORT li_bapi_m BY projk.
Delete adjacent duplicates from LI_BAPI_M comparing WBS element
DELETE ADJACENT DUPLICATES FROM li_bapi_m COMPARING projk.
Check if LI_BAPI_M is initial
IF NOT li_bapi_m[] IS INITIAL.
Retrieve the required data from table PRPS for all the
WBS element
SELECT pspnr
posid
pgsbr
func_area
FROM prps
INTO TABLE li_prps
FOR ALL ENTRIES IN li_bapi_m
WHERE posid = li_bapi_m-projk.
IF sy-subrc = 0.
SORT li_prps BY posid.
ENDIF.
ENDIF.
lw_index = 1.
LOOP AT li_temp INTO lw_temp.
w_temp = lw_temp.
clearing workares
CLEAR: w_bapiheader,
lv_count,
v_amt.
****Populating the BAPIHEADER*******
Reference Transaction
w_bapiheader-bus_act = c_bkpf.
User Name
w_bapiheader-username = sy-uname.
Document Header Text
w_bapiheader-header_txt = text-020.
Company Code
w_bapiheader-comp_code = c_wfp.
Document Date in the Document
w_bapiheader-doc_date = p_pstdat.
Posting Date in the Document
w_bapiheader-pstng_date = p_pstdat.
Fiscal Year
w_bapiheader-fisc_year = p_pstdat+0(4).
Fiscal Period
w_bapiheader-fis_period = p_pstdat+4(2).
Document Type
w_bapiheader-doc_type = c_sa.
Reference Document Number
w_bapiheader-ref_doc_no = sy-datum.
Initialize the counter
lv_count = 1.
lv_count1 = 1.
LOOP AT i_bapi INTO lw_bapi FROM lw_index.
IF lw_temp-set NE lw_bapi-set.
lw_index = sy-tabix.
EXIT.
ELSE.
lw_bapi1 = lw_bapi.
CLEAR: v_pspid.
READ TABLE li_prps INTO lw_prps WITH KEY posid = lw_bapi-projk BINARY SEARCH.
IF sy-subrc = 0.
w_accoutgl-bus_area = lw_prps-pgsbr.
w_accoutgl-func_area = lw_prps-func_area.
ENDIF.
*****Populating the internal table regarding G/L account item***********
w_accoutgl-itemno_acc = lv_count.
w_accoutgl-acct_key = c_ags.
w_accoutgl-acct_type = c_s.
w_accoutgl-grant_nbr = text-019.
w_accoutgl-wbs_element = lw_bapi-projk.
READ TABLE i_autoinv1 INTO lw_autoinv WITH KEY saknr = lw_bapi-hkont.
IF sy-subrc = 0.
Get the information for the G/L accounts relevant for LTSH OVERland Clearing account or
Transformation Clearing Account Stevedoring Clearing Account or Bagging Clearing Account
READ TABLE li_skat1 INTO lw_skat1 WITH KEY saknr = lw_autoinv-saknr BINARY SEARCH.
IF sy-subrc = 0.
w_accoutgl-gl_account = lw_bapi-hkont.
IF NOT lw_autoinv-fipos EQ space.
CALL FUNCTION 'CONVERSION_EXIT_FMCIS_INPUT'
EXPORTING
input = lw_autoinv-fipos
IMPORTING
output = w_accoutgl-cmmt_item.
ELSE.
w_accoutgl-cmmt_item = lw_autoinv-saknr.
ENDIF.
w_currency-amt_doccur = lw_bapi-zcptp * ( -1 ).
ENDIF.Debug. and find the problem . since you are not using the standadrd tables , they are custom tables. so try to find the reason using debugging. may be you don't have data which satisfies the selection criteria.
-
File listing within a folder of images
When I scan old film to create digital files, I put them in a folder with the file name ending in a sequential number ( 1, 2, 3, etc). Sometimes, when I open the folder to work on the image files in Photoshop Elements 11, I find the files list in the proper sequential order, but other times, especially when I have recently had some files open, the files will be listed in the order that I last opened them. How can I force PSE 11 to always list them in numerical order upon opening the folder?
Robert CarneyNo, you were clear. In PSE11, the files are displayed in the common 'date taken' order (chronological) which is not the alphabetical order you gave to your photo files.
That alphabetical sort order was present up to PSE10 in folder view only.
It was dropped in PSE11, so the workaround was the one I indicated.
In PSE12, the alphabetical filename order has been restored, not only in folder view, but in all views, thumbnail view, import batch... -
I loaded Mac OS X v10.7 Lion yesterday. Everything’s running fine, except for a simple problem. Any time I want to copy a file, JPEG, etc., I am prompted “Finder wants to make changes. Type your password to allow this.” I don’t want this!! Is there a way to unlock “Finder” or rid this process?
Back up all data.
This procedure will unlock all your user files (not system files) and reset their ownership and access-control lists to the default. If you've set special values for those attributes on any of your files, they will be reverted. In that case, either stop here, or be prepared to recreate the settings if necessary. Do so only after verifying that those settings didn't cause the problem. If none of this is meaningful to you, you don't need to worry about it.
Step 1
If you have more than one user account, and the one in question is not an administrator account, then temporarily promote it to administrator status in the Users & Groups preference pane. You can demote it back to standard status when this step has been completed.
Triple-click the following line to select it. Copy the selected text to the Clipboard (command-C):
sudo chflags -R nouchg,nouappnd ~ $TMPDIR.. ; sudo chown -R $UID:20 ~ $_ ; chmod -R -N ~ $_ 2> /dev/null
Launch the Terminal application in any of the following ways:
☞ Enter the first few letters of its name into a Spotlight search. Select it in the results (it should be at the top.)
☞ In the Finder, select Go ▹ Utilities from the menu bar, or press the key combination shift-command-U. The application is in the folder that opens.
☞ Open LaunchPad. Click Utilities, then Terminal in the icon grid.
Paste into the Terminal window (command-V). You'll be prompted for your login password, which won't be displayed when you type it. You may get a one-time warning not to screw up. If you don’t have a login password, you’ll need to set one before you can run the command.
The command will take a noticeable amount of time to run. Wait for a new line ending in a dollar sign (“$”) to appear, then quit Terminal.
Step 2
Boot into Recovery by holding down the key combination command-R at startup. Release the keys when you see a gray screen with a spinning dial.
When the OS X Utilities screen appears, select
Utilities ▹ Terminal
from the menu bar. A Terminal window will open.
In the Terminal window, type this:
resetpassword
That's one word, all lower case, with no spaces. Then press return. A Reset Password window will open. You’re not going to reset a password.
Select your boot volume ("Macintosh HD," unless you gave it a different name) if not already selected.
Select your username from the menu labeled Select the user account if not already selected.
Under Reset Home Directory Permissions and ACLs, click the Reset button.
Select
▹ Restart
from the menu bar. -
I have saved many PDF files from my mails - when I want to open (Adobe Reader on Samsung tablet) the file last saved I have no possibility find it simply by sorting file list by time - (list is fixed by name only) - how to change list order?.
Sorting by time could be based on documents'
(a) Date/Time created
(b) Date/Time modified
(c) Date/Time last opened / accessed
Adobe Reader for Android shows (c) in Recents.
(Click the image above to enlarge)
The last opened PDF document appears at the top. Please note that it is not customizable - meaning that you (as a user) cannot change the sorting criteria. -
Please Help. compare two excel files. Can't get the find command to work
Hello, I'm new to applescript. I'm trying to write a script to compare column B of one excel file to column B of the another excel file.
I will have to had a repeat loop to proceed down the column but I'm stuck on the find command.
Below is some of the code I have so far. The applescript error message is "Microsoft Excel got an error: The object you are trying to access does not exist. It highlights the find column."
set patientFile to choose file with prompt "Please select the patient Excel file:"
set patientName to name of (info for patientFile)
tell application "Microsoft Excel"
open patientFile
set thepatientFile to workbook patientName
end tell
display dialog "Is your patient SNP data in column B of the " & " " & patientName & " " & "excel file?" buttons {"No", "Yes"} default button 2
if the button returned of the result is "No" then
display dialog "Please put your data in column B" buttons {"Cancel"} default button 1
if the button returned of the result is "Cancel" then
end if
else
display dialog "Is column E empty? The results of this program will be stored in column E of the" & " " & patientName & " " & "excel file." buttons {"No", "Yes"} default button 2
if the button returned of the result is "No" then
display dialog "Please put your data in empty column E" buttons {"Cancel"} default button 1
if the button returned of the result is "Cancel" then
end if
else
set relativeFile to choose file with prompt "Please select the relative Excel file:"
set relativeName to name of (info for relativeFile)
tell application "Microsoft Excel"
open relativeFile
set therelativeFile to workbook relativeName
end tell
end if
end if
display dialog "Is your relative SNP data in column B of the" & " " & relativeName & " " & "excel file?" buttons {"No", "Yes"} default button 2
if the button returned of the result is "No" then
display dialog "Please put your data in column B" buttons {"Cancel"} default button 1
if the button returned of the result is "Cancel" then
end if
else
display dialog "Does column C contain the result data you would like copied from" & " " & relativeName & " " & "excel file?" buttons {"No", "Yes"} default button 2
if the button returned of the result is "No" then
display dialog "Please put the data you would like copied in column C." buttons {"Cancel"} default button 1
if the button returned of the result is "Cancel" then
end if
else
tell application "Microsoft Excel"
activate object workbook patientName
copy value of cell "A1" to cellPatientFile
find (range "B:B" of workbook relativeName) what cellPatientFile
if cellPatientFile is true then
set bold of font object of cellPatientFile to true
end if
end tell
end if
end if
Does any one have any hints towards solving this problem? Thank you for any help.Hi,
taffners wrote:
Thank you everyone for your help. I attached my code. It works now but kinda slow. Does anyone have any hints on making it faster.
Important : when you use the find command, it's preferable to use the properties ( look in and look at).
Example : find searchRange what searchTerm look in values look at whole
Otherwise, it will search according to the criteria of your last find.
Example, if you uncheck 'Find entire cells only', and after that you run the script,
find column 2 what 10.0 --> match 110.0 or 1110.0 or 310.0, .... , because it look at part.
set screen updating to false : Yes it improves the speed.
Here are my tests (no duplicate values in the Excel column ) on old computer (Powermac G5) .
set screen updating to false without any activate object command
2000 rows --> 3.7 minutes, your script : 11.5 minutes
4000 rows --> 7.5 minutes, your script : 23 minutes
8000 rows --> 15 minutes, your script : 46 minutes
But, it's faster to search through a list without using the Excel find command, no need to set the screen updating, You can continue working on the workbook or another workbook, this will not disturb the script.
Tests on my script :
2000 rows --> 4 seconds
4000 rows --> 21 seconds
8000 rows --> 1.3 minutes
17000 rows --> 6 minutes
Here is the script :
main()
display dialog "Done"
on main()
script o
property patientSNP_list : {}
property relativeSNP_list : {}
property resultsList : {}
property copyAnswerList : {}
on findLookAtWhole(value) -- case sensitive
set {low, high} to {1, count my relativeSNP_list}
considering case
repeat while low ≠ high
set mid_ to (low + high) div 2
if value is in items low thru mid_ of my relativeSNP_list then
set high to mid_
else
set low to mid_ + 1
end if
end repeat
end considering
if (item low of my relativeSNP_list is value) then
set end of my resultsList to item low of my copyAnswerList
else
set end of my resultsList to {"no"}
end if
end findLookAtWhole
end script
--opens File1. Names it patientName
set patientFile to choose file with prompt "Please select the patient Excel file:"
set patientName to name of (info for patientFile)
tell application "Microsoft Excel"
open patientFile
set thepatientFile to workbook patientName
set patientSheet to sheet (name of active sheet) of thepatientFile
end tell
--This Dialog assigns where the data is stored for file1
display dialog "What Column is your patient SNP data of the " & " " & patientName & " " & "excel file?" default answer "" buttons {"submit"} default button 1
set PatientSNPCol to (text returned of the result)
--This Dialog assigns what row your data starts at for file1
display dialog "What row does your patient SNP data start in the " & " " & patientName & " " & "excel file?" default answer "" buttons {"submit"} default button 1
set patientSNPRow to (text returned of the result)
set patientStartCell to PatientSNPCol & patientSNPRow
--This Dialog assigns the last row of data for file1
display dialog "What row is the last row of you patient SNP data start of the " & " " & patientName & " " & "excel file?" default answer "" buttons {"submit"} default button 1
set patientLastRow to (text returned of the result)
set patientLastCell to PatientSNPCol & patientLastRow
--This Dialog assigns the location of the data copied from file2
display dialog "What column would you like the results of this program stored in of the" & " " & patientName & " " & "excel file." default answer "" buttons {"submit"} default button 1
set resultsLocation to (text returned of the result)
--opens File2. Names it relativeName
set relativeFile to choose file with prompt "Please select the relative Excel file:"
set relativeName to name of (info for relativeFile)
tell application "Microsoft Excel"
open relativeFile
set therelativeFile to workbook relativeName
set relativeSheet to sheet (name of active sheet) of therelativeFile
end tell
--This dialog assigns the column of data in file2
display dialog "What Column is your relative SNP data of the " & " " & relativeName & " " & "excel file?" default answer "" buttons {"submit"} default button 1
set relativeSNPCol to (text returned of the result)
--This dialog assigns the column of data begining copied to excel file1.
display dialog "What Column contains the data you would like copied to the " & " " & patientName & " " & "excel file in column" & " " & resultsLocation & " " & "?" default answer "" buttons {"submit"} default button 1
set copyAnswer to (text returned of the result)
tell application "Microsoft Excel" -- get values
set o's patientSNP_list to value of range (PatientSNPCol & patientSNPRow & ":" & PatientSNPCol & patientLastRow) of patientSheet
set lastrow to first row index of (last cell of used range of relativeSheet)
set o's relativeSNP_list to value of range (relativeSNPCol & "1:" & relativeSNPCol & lastrow) of relativeSheet
set o's copyAnswerList to value of range (copyAnswer & "1:" & copyAnswer & lastrow) of relativeSheet
end tell
set tc to (count o's relativeSNP_list)
repeat with i from 1 to tc --convert list of lists to one list
set item i of o's relativeSNP_list to item 1 of item i of o's relativeSNP_list
end repeat
set tc to (count o's patientSNP_list)
repeat with i from 1 to tc -- AppleScript find method, not the Excel Find
o's findLookAtWhole(item 1 of (item i of o's patientSNP_list))
end repeat
tell application "Microsoft Excel" -- set values
set value of range (resultsLocation & patientSNPRow & ":" & resultsLocation & patientLastRow) of patientSheet to o's resultsList
end tell
end main
If you have lots of rows and you want it to go faster.
I have another script that uses the power of (/usr/bin/awk and his associative arrays) in a do shell script
17000 rows --> awk : 2 seconds, applescript : 6 seconds, total : 8 seconds
34000 rows --> awk : 3 seconds, applescript : 11 seconds, total : 14 seconds -
Relocating files based on creation date
Hello,
I have a folder full of hundreds of Video clips. I am interested in a script that will
1. look at the files sequentially
2. For each file read the creation date
3. If a Folder with that creation date does not exist, create a folder with that creation date (YYYY-MM-DD)
4. Move the file to the folder with the file's creation date
I've never used automator. Is this easy to do using that program?
The reason I want to do this is to avoid having to manually re-organize the videos by date, if I were to import the contents of the existing folder of video clips into iMovie.
Appreciate any input you can provide.
Thanks.Automator is designed to take small, pre-written routines (actions) and string them together into a workflow. There isn't a default action to do something like this, but the Run AppleScript action can be used. Actually, an AppleScript would probably be the way to go, but I just happened to have an Automator action lying around for some reason.
Tested workflow:
1) *Ask for FInder Items* {Type: Folders}
2) *Get Folder Contents* (be careful with getting subfolders - this action will go into packages)
3) *Run AppleScript:*
<pre style="
font-family: Monaco, 'Courier New', Courier, monospace;
font-size: 10px;
font-weight: normal;
margin: 0px;
padding: 5px;
border: 1px solid #000000;
width: 720px; height: 340px;
color: #000000;
background-color: #FFEE80;
overflow: auto;"
title="this text can be pasted into an Automator 'Run AppleScript' action">
on run {input, parameters} -- create folders and move
make new folders from file creation dates (if needed), then move document files into their respective new folders
if no container is specified (missing value), the new folder will be created in the containing folder of the item
if the container is not a valid path (and not missing value), one will be asked for
input: a list of Finder items (aliases) to move
output: a list of the Finder items (aliases) moved
set output to {}
set SkippedItems to {} -- this will be a list of skipped items (errors)
set TheContainer to "" -- a Finder path to a destination folder, or missing value for the source folder
if TheContainer is not missing value then try -- check the destination path
TheContainer as alias
on error
set TheContainer to (choose folder with prompt "Where do you want to move the items?")
end try
tell application "Finder" to repeat with AnItem in the input -- step through each item in the input
if TheContainer is not missing value then -- move to the specified folder
set {class:TheClass, name:TheName, name extension:TheExtension} to item AnItem
else -- move to the source folder
set {class:TheClass, name:TheName, name extension:TheExtension, container:TheContainer} to item AnItem
end if
if TheClass is document file then try -- just documents
set TheDate to text 1 thru 10 of (creation date of AnItem as «class isot» as string) -- YYYY-MM-DD
try -- check if the target folder exists
get ("" & TheContainer & TheDate) as alias
on error -- make a new folder
make new folder at TheContainer with properties {name:TheDate}
end try
-- duplicate AnItem to the result
move AnItem to the result
set the end of output to (result as alias) -- the new file alias
on error -- permissions, etc
-- set the end of SkippedItems to (AnItem as text) -- the full path
set the end of SkippedItems to TheName -- just the name
end try
end repeat
ShowSkippedAlert for SkippedItems
return the output -- pass the result(s) to the next action
end run
to ShowSkippedAlert for SkippedItems
show an alert dialog for any items skipped, with the option to cancel the workflow
parameters - SkippedItems [list]: the items skipped
returns nothing
if SkippedItems is not {} then
set {AlertText, TheCount} to {"Error with AppleScript action", count SkippedItems}
if TheCount is greater than 1 then
set theMessage to (TheCount as text) & space & " items were skipped:"
else
set theMessage to "1 " & " item was skipped:"
end if
set {TempTID, AppleScript's text item delimiters} to {AppleScript's text item delimiters, return}
set {SkippedItems, AppleScript's text item delimiters} to {SkippedItems as text, TempTID}
if button returned of (display alert AlertText message (theMessage & return & SkippedItems) ¬
alternate button "Cancel" default button "OK") is "Cancel" then error number -128
end if
return
end ShowSkippedAlert
</pre> -
OutOfMemoryError while using File.list()
I'm facing OutOfMemoryError while using file.list(). Below is the description of the requirement
We have a directory structure of the following format -
**sourcedir\<date folders>\No Retry\<reason folders>\..\..\....\<*.ini files>**
sourcedir will be passed as argument to the program. The directories present in between "<>" can be in multiples of 10. The *.ini files can be in multiple of lacs in each directory.
The program is required to browse through the directory structure and look for *.ini files. The *.ini files are parsed for some data which needs to be stored in data base. We are using "File.list()" to load the name of files and FileFilter to find *.ini" files. As the number of files are huge the program is throwing OutOfMemoryError. We have increased heap space, it solved the problem. But we are looking for a solution which will not throw this error in future as the number of files may increase.
Can you please suggest us a technique to solve this permanently as we are beginners to java.I suggest you try using a memory profiler to see where your memory is being used.
The problem you suggest shouldn't consume so much memory. -
Can ditto select files based on modification date?
Hi. I'm trying to use ditto to make backups. I would like to have it select only files modified after a certain date. Is there a way to do this?
I noticed the bom (bill of materials) option... can that be used for this purpose somehow? Not quite sure how best to create a BOM that includes only files based on modification date.
Any suggestions? Thanks
Ericditto doesn't provide a way to select only files modified after a certain date -- but find does; see the "-newer" and "-newerXY" options. Using find, you can generate a BOM file listing files that have been modified after a certain date.
Then you can pass that BOM file to ditto.
Powerbook G4 1GHz Mac OS X (10.3.9) -
Can I Delete any files in the Application Data\Apple Computer directory?
I'm using and iPhone 4S and Windows XP. (I know I'm WAY behind, and we're saving to buy an iMac soon.) I have a plethora of files in this directory
C:\Documents and Settings\User\Application Data\Apple Computer\Logs\CrashReporter
Are there any files there I can delete. Some of them on my iPhone 3G go back a couple years.
And how about the files under here?
C:\Documents and Settings\User\Application Data\Apple Computer\MobilSync
Is there a document that describes what all these files do, which ones I can delete, which ones are vital, etc.?
Thanks in advance!You need call another PHP file
<?php
$directory = './files/uploads';
getDirectoryList ($directory);
//This function find all the files in the directory
function getDirectoryList ($directory)
// create an array to hold directory list
$results = array();
// create a handler for the directory
$handler = opendir($directory);
// open directory and walk through the filenames
while ($file = readdir($handler)) {
// if file isn't this directory or its parent, add it to the results
if ($file != "." && $file != "..") {
//$results[] = $file;
// Delete Files
$filename = $file;
unlink($filename); //this delete a file
// tidy up: close the handler
closedir($handler);
?>
Maybe you are looking for
-
Price Condition&Price update are disabled in S.O even after partial invoice
Dear All, We are using manual pricing condition in the Sales Order, when we do a partial delivery and billing for a Sales Order line item, the update prices function (button) is inactive and price conditions are greyed out. We are using Pricing Type
-
Differences between XtremeGamer and XtremeGamer Fatal1ty PRO Seri
I was looking at those two XFi cards and I would like to know if there's another difference appart from the X-RAM and the external connector.
-
How to enable database access from Java or CSharp ?
I set up an Oracle Express database on my local computer. Now I want to connect to this databsee from a CSharp (or Java) program. How do I have to specify the connection string? The following does NOT work: connectionstring = "Data Source=XE;User Id=
-
When I try to attach my JPEG files to my email, they open as a picture in my email message instead of as a file. Any help?
-
My f6 (backlight) button doesn't work, stuck without backlight.
G'day, I just started MBP 13' recently and am still getting used to the switch from windows to mac. However, my f6 button doesn't seem to be working anymore and I can't seem to locate the problem. It does not lit the backlight at all and even worst,