FDM Fixed-Width Import Format & Multiple Accounts/Periods Issue
Hi FDM experts,
I have an issue that I wanted to reach out to you on regarding fixed-width import formats and how to cater for my current scenario for export to Hyperion Planning.
I am working with a flat file (.txt) I need to import to FDM with the current format;
A
B
C
D
E
F
G
Z
Year
Channel
Product
Jan-MTD-Account 1
Jan-MTD-Account 2
Jan-YTD-Account1
Jan-YTD-Account2
Dec-YTD-Account2
2013
Channel_1
Product_1
1000
2000
1000
2000
10000
These are all fixed in width so the field lengths will need to be defined in the import format. The requirement for loading to the system is only a speciifc Month YTD value for both Account1 and Account 2.
If my chosen Month is 2013 Jan, I will only require columns F and G to be loaded. These are the issues I have identified;
Can a fixed width import format cater for loading to multiple accounts in the same file? Or would I need a separate import format per account?
Can a fixed width import format cater for loading to a variable Actual Month period? Or do I need 12 import formats/locations per month?
Your help is much appreciated!
Many thanks
Aaron
Hi Aaron,
the solution you are looking for needs pivoting your source file.
Think that FDM, by default, only accepts files with one single column for amount. You have to pivot your file based on your logic and import the pivoted file.
For example:
Year Channel Product ... Jan-YTD-Acc1 Jan-YTD-Acc2 ...
2013 CH1 PR1 1000 2000
If your POV is Jan-2013, your data imported will look like:
Year Channel Produc Account Amount
2013 CH1 PR1 ACC1 1000
2013 CH1 PR1 ACC2 2000
All this process can be automated by playing with Import Scripts.
HTH
Similar Messages
-
Does Oracle Financials Support Multiple account periods ( Future Periods or 13th Periods as they are called)
basically we are dealing with a Multi - national company , they have different accounting periods for different countries they work in (Jan - Dec 31 in US, April 1 - March 31 for their Australia Ops)
ultimately they want to use oracle financials globally for all their accounting , the challenge we have right now is we can have only 1 "13th period" in which we can post adjusting entries, so we can either use it for the US or Australia.
any ideas ?Hello.
You can define multiple calendars and assign a different calendar to each set of books. For example, you can use a monthly calendar for one set of books, and a quarterly calendar for another.
Each set of books has an associated period type. When you assign a calendar to a set of books, the set of books only accesses the periods with the appropriate period type. Thus, you can define an accounting calendar with periods of more than one period type; however, each set of books will only use periods of a single period type.
For example, you could define a Week period type and specify 52 periods per year. You can assign up to 366 accounting periods per fiscal year for any period type, and maintain actual balances for those periods. However, for budgets you can only use the first 60 periods.
For example, assume you have a July 1 to June 30 fiscal year and the current date is July 15, 1995. If you choose the Calendar year type, General Ledger appends the year 1995 to the period name (JUL-95) because July begins in 1995. If you choose the Fiscal year type, General Ledger appends 1996 to the period name (JUL-96) because the fiscal year ends in 1996.
Using the same July to June fiscal year example, if the current date is March 15, 1995 and you choose the Fiscal year type, General Ledger appends the year 1995 to the period name because the fiscal year ends in 1995.
Octavio -
May the Same CD Be Imported to Multiple Accounts?
If a friend lends me a CD that he has already imported to his iTunes account on his computer, am I allowed to import it to my account on my computer? I want to know if this is possible or if it violates the terms of service (or copyright law) somehow.
Confirming what The Fiend said, it would absolutely break the law. It would be just as if your friend made a copy of the CD and gave you the copy. If you want that CD, your friend will have to delete all the imported tracks and any other copies and then give you the original CD. Or you will need to buy your own copy.
Regards. -
Fixed width field format in txt file
I want to create text file for sending to bank. Every row in the text file is of variable length. For Ex: 1st row contains name and a fixed length of 33 char. 2nd row contains company and fixed length of 12 char.
Howewer when i download the data using GUI_DOWNLOAD it is taking the row with full length i.e. 256 char that of the internal table line.
If I use the truncate trailing blanks parameter, it removes all the spaces that are on the right of the name. what is our requirement is that irrespective of whatever is the actual length of the name it should take only 33 characters in first row. (ie If i place cursor on first character and press END button on keypad the cursor must move to 34 char).
But at present what is happening is that it is either moving to the actual end of the name or column 256 ie the end of line.
Any help to this will be highly appreciated.You have to move the contents to a string variable. Put the Line feed(cl_abap_char_utilities=>newline) or CR_LF (cl_abap_char_utilities=>dr_lf) at the offset as required by you.
Download the file as 'BIN' using GUI_DOWNLOAD. You have to pass the length as the length of the string variable.
Try this & come back if you have any doubts.
BR,
Suhas -
Multiple Account Assignment issue with BAPI_PO_CREATE1 for service POs
Whle creating service PO through BAPI_PO_CREATE1, The account assignments at the service line items were not being added correctly at the item level, instead they are getting split further wrt tax jurisdiction. This is occuring when an item have multiple service line items with mutltiple account assignments.
The sample code is below, and the all the internal tables and structure were related to BAPI_PO_CREATE1. Tried with BADI ME_TAX_FROM_ADDRESS and User Exit enhancement SAPL2012, which were not helpful for this particular scenario.
Item Details
W_BAPI_ITEM-PO_ITEM = 1.
W_BAPI_ITEMX-PO_ITEM = 1.
W_BAPI_ITEM-ITEM_CAT = D.
W_BAPI_ITEMX-ITEM_CAT = 'X'.
W_BAPI_ITEM-ACCTASSCAT = K.
W_BAPI_ITEMX-ACCTASSCAT = 'X'.
W_BAPI_ITEM-PLANT = USMP. Tax Jurisdiction code 3604931001
W_BAPI_ITEMX-PLANT = 'X'.
W_BAPI_ITEM-MATL_GROUP = IT37.
W_BAPI_ITEMX-MATL_GROUP = 'X'.
W_BAPI_ITEM-QUANTITY = 1.
W_BAPI_ITEMX-QUANTITY = 'X'.
W_BAPI_ITEM-PRICE_UNIT = 1.
W_BAPI_ITEMX-PRICE_UNIT = 'X'.
W_BAPI_ITEM-PO_UNIT = LE.
W_BAPI_ITEMX-PO_UNIT = 'X'.
W_BAPI_ITEM-NET_PRICE = 100.
W_BAPI_ITEMX-NET_PRICE = 'X'.
W_BAPI_ITEM-PCKG_NO = 3456.
W_BAPI_ITEMX-PCKG_NO = 'X'.
W_BAPI_ITEM-PREQ_NAME = RTPTS02.
W_BAPI_ITEMX-PREQ_NAME = 'X'.
APPEND W_BAPI_ITEM TO IT_BAPI_ITEM.
APPEND W_BAPI_ITEMX TO IT_BAPI_ITEMX.
Delivery address details - Tax Jurisdiction 3305923401
W_BAPI_ADDRDEL-PO_ITEM = 1.
W_BAPI_ADDRDEL-NAME = COR.
W_BAPI_ADDRDEL-NAME_2 = Chairman.
W_BAPI_ADDRDEL-BUILD_LONG = 1001R
W_BAPI_ADDRDEL-CITY = plainview.
W_BAPI_ADDRDEL-STREET = old country road.
W_BAPI_ADDRDEL-POSTL_COD1 = 11803.
W_BAPI_ADDRDEL-COUNTRY = US.
W_BAPI_ADDRDEL-REGION = NY.
APPEND W_BAPI_ADDRDEL TO IT_BAPI_ADDRDEL.
First Account Assignment - 3310300441
W_BAPI_POACNT-SERIAL_NO = 1.
W_BAPI_POACNTX-SERIAL_NO = 1.
W_BAPI_POACNTX-SERIAL_NOX = 'X'.
W_BAPI_POACNT-CREAT_DATE = 11/03/2010.
W_BAPI_POACNTX-CREAT_DATE = 'X'.
W_BAPI_POACNT-QUANTITY = 0.75.
W_BAPI_POACNTX-QUANTITY = 'X'.
W_BAPI_POACNT-DISTR_PERC = 75.
W_BAPI_POACNTX-DISTR_PERC = 'X'.
W_BAPI_POACNT-NET_VALUE = 75 .
W_BAPI_POACNTX-NET_VALUE = 'X'.
W_BAPI_POACNT-PO_ITEM = 1.
W_BAPI_POACNTX-PO_ITEM = 1.
W_BAPI_POACNTX-PO_ITEMX = 'X'.
W_BAPI_POACNT-GL_ACCOUNT = 641099.
W_BAPI_POACNTX-GL_ACCOUNT = 'X'.
W_BAPI_POACNT-COSTCENTER = 10010394.
W_BAPI_POACNTX-COSTCENTER = 'X'.
W_BAPI_POACNT-CO_AREA = 1234.
W_BAPI_POACNTX-CO_AREA = 'X'.
APPEND W_BAPI_POACNT TO IT_BAPI_POACNT.
APPEND W_BAPI_POACNTX TO IT_BAPI_POACNTX.
Second Account Assignment
W_BAPI_POACNT-SERIAL_NO = 2.
W_BAPI_POACNTX-SERIAL_NO = 2.
W_BAPI_POACNTX-SERIAL_NOX = 'X'.
W_BAPI_POACNT-CREAT_DATE = 11/03/2010.
W_BAPI_POACNTX-CREAT_DATE = 'X'.
W_BAPI_POACNT-QUANTITY = 0.25.
W_BAPI_POACNTX-QUANTITY = 'X'.
W_BAPI_POACNT-DISTR_PERC = 25.
W_BAPI_POACNTX-DISTR_PERC = 'X'.
W_BAPI_POACNT-NET_VALUE = 25 .
W_BAPI_POACNTX-NET_VALUE = 'X'.
W_BAPI_POACNT-PO_ITEM = 1.
W_BAPI_POACNTX-PO_ITEM = 1.
W_BAPI_POACNTX-PO_ITEMX = 'X'.
W_BAPI_POACNT-GL_ACCOUNT = 641099.
W_BAPI_POACNTX-GL_ACCOUNT = 'X'.
W_BAPI_POACNT-COSTCENTER = 10010393.
W_BAPI_POACNTX-COSTCENTER = 'X'.
W_BAPI_POACNT-CO_AREA = 1234.
W_BAPI_POACNTX-CO_AREA = 'X'.
APPEND W_BAPI_POACNT TO IT_BAPI_POACNT.
APPEND W_BAPI_POACNTX TO IT_BAPI_POACNTX.
Service Item detials
W_BAPI_SERVICE-OUTL_IND = 'X'.
W_BAPI_SERVICE-SUBPCKG_NO = 3457.
W_BAPI_SERVICE-LINE_NO = 1.
W_BAPI_SERVICE-PCKG_NO = 3456.
W_BAPI_SERVICE-EXT_LINE = 0000000000.
W_BAPI_SERVICE-QUANTITY = 0.
W_BAPI_SERVICE-BASE_UOM = 0.
W_BAPI_SERVICE-PRICE_UNIT = 0.
W_BAPI_SERVICE-GR_PRICE = 0.
W_BAPI_SERVICE-SHORT_TEXT = 0.
W_BAPI_SERVICE-MATL_GROUP = 0.
W_BAPI_SERVICE-DISTRIB = 0.
APPEND W_BAPI_SERVICE TO IT_BAPI_SERVICE.
W_BAPI_SERVICE-OUTL_IND = 'X'.
W_BAPI_SERVICE-LINE_NO = 2.
W_BAPI_SERVICE-PCKG_NO = 3457.
W_BAPI_SERVICE-EXT_LINE = 0000000010.
W_BAPI_SERVICE-QUANTITY = 10.
W_BAPI_SERVICE-BASE_UOM = STD.
W_BAPI_SERVICE-PRICE_UNIT = 0.
W_BAPI_SERVICE-GR_PRICE = 5.
W_BAPI_SERVICE-SHORT_TEXT = Cabling Services1.
W_BAPI_SERVICE-MATL_GROUP = IT37.
W_BAPI_SERVICE-DISTRIB = 2.
APPEND W_BAPI_SERVICE TO IT_BAPI_SERVICE.
W_BAPI_SERVICE-OUTL_IND = 'X'.
W_BAPI_SERVICE-LINE_NO = 3.
W_BAPI_SERVICE-PCKG_NO = 3457.
W_BAPI_SERVICE-EXT_LINE = 0000000020.
W_BAPI_SERVICE-QUANTITY = 10.
W_BAPI_SERVICE-BASE_UOM = STD.
W_BAPI_SERVICE-PRICE_UNIT = 0.
W_BAPI_SERVICE-GR_PRICE = 5.
W_BAPI_SERVICE-SHORT_TEXT = Cabling Services2.
W_BAPI_SERVICE-MATL_GROUP = IT37.
W_BAPI_SERVICE-DISTRIB = 2.
APPEND W_BAPI_SERVICE TO IT_BAPI_SERVICE.
Service Account assignment details
W_ACC_SERVICE-PCKG_NO = 3457.
W_ACC_SERVICE-LINE_NO = 2.
W_ACC_SERVICE-SERNO_LINE = 1.
W_ACC_SERVICE-SERIAL_NO = 1. "Account Assignment Link
W_ACC_SERVICE-NET_VALUE = .
W_ACC_SERVICE-QUANTITY = 50 .
W_ACC_SERVICE-PERCENTAGE = 100 .
APPEND W_ACC_SERVICE TO IT_ACC_SERVICE.
W_ACC_SERVICE-PCKG_NO = 3457.
W_ACC_SERVICE-LINE_NO = 3.
W_ACC_SERVICE-SERNO_LINE = 1.
W_ACC_SERVICE-SERIAL_NO = 1. "Account Assignment Link
W_ACC_SERVICE-NET_VALUE = .
W_ACC_SERVICE-QUANTITY = 50 .
W_ACC_SERVICE-PERCENTAGE = 50 .
APPEND W_ACC_SERVICE TO IT_ACC_SERVICE.
W_ACC_SERVICE-PCKG_NO = 3457.
W_ACC_SERVICE-LINE_NO = 3.
W_ACC_SERVICE-SERNO_LINE = 1.
W_ACC_SERVICE-SERIAL_NO = 2. "Account Assignment Link
W_ACC_SERVICE-NET_VALUE = .
W_ACC_SERVICE-QUANTITY = 50 .
W_ACC_SERVICE-PERCENTAGE = 50 .
APPEND W_ACC_SERVICE TO IT_ACC_SERVICE.
EKKN table entries:
When created thru ME21N with the same set of data,which is expected
ZEKKN MENGE NETWR SAKTO KOSTL
01 0.750 75.00 0000641099 0010010394
02 0.250 25.00 0000641099 0010010393
But through BAPI_PO_CREATE1, the below split is being done with respect to Tax Jurisdiction code.
01 0.500 50.00 0000641099 0010010394
02 0.250 25.00 0000641099 0010010394
03 0.250 25.00 0000641099 0010010393
Please advice the solution.
PS: there were different tax jurisdiction codes were being determined.
Plant, Cost Center and Delivery Address.Hi,
To commit BAPI or to run it properly , you need to fulfill all required data for BAPI.
You can go to BAPI documentation to check for mandetory parameters and also check with Function consultant for more data and confifuration/
Reward if useful! -
ICloud multiple account syncing issues
My dad and I have 2 separate iCloud accounts. We both have iPads and iPhones. Both devices are synced to both of our separate accounts; individual accounts to each of our corrasponding devices. However, when he opens his contacts, his contacts list shows my contacts for some odd reason. Nothing else is synced by our iClouds but simply our contacts. I have spent hours on this issues, troubleshooting multiple times. I'm extremely current with technology (being 20), especially Apple products, but for some reason I cannot seem to resolve this issue. Why is this happening?
Strange... That shouldn't be possible unless there were another device, such as his computer, that is syncing with your account with contact syncing enabled; or if one of you has set up the other's iCloud account as a secondary account in Settings>Mail,Contacts,Calendars and enabled contacts syncing.
-
I recently set up multiple accounts on my imac, When I was trying to figure out how to share the documents I must have done something wrong. When logged into the Admin account, I open up any document and I get a message box that says, "The Document could not be opened. The file isn't in the correct format. The file might be corrupted, truncated, or in an unexpected format." What did I do and how do I fix it?
Without knowing what you did it is impossible to give advice on how to correct it.
If these were files you copied over from some other system then just Re-Copy them replacing the ones that are corrupted.
Other then that I suggest you Wipe the drive and start over with a clean reinstall of the OS and programs. Then if you want to share files to All Accounts place those files in a folder in the ROOT of the drive. -
FDM Import Format Spec with multiple Amount Fields
Hello,
I'm in the process of setting up an Import specification for one of our sites and the source extract consists of the following fields:
Source Account Description BegBalDR BegBalCr YTDDR YTDCR
01-511-5110 Inventory Adjustment 1,754.00 0 0 14,844.76
I'm am trying to Import Field 5 & 6 and net them if necessary (example: YTDDR - YTDCR) and I continue to get an error. I have tried several diffrent ways but it seems that I can only import one or the other. After reading the FDM Admin guide I am wondering if I need to create a custom Script to accomplish this task.
Any advice would be appreciated.
Thank you,
TonyThis might be slightly complicated, but I think its the most direct solution ........
Step 1 -
In your Import Format, assign the Amount as :
FieldName, Start, Length, Expression
Amount, 1, 1, Script=NetAmounts5and6.uss
Step 2 -
Create an Import (DataPump) script called NetAmounts5and6 with the following code :
Function NetAmount5and6(strField, strRecord)
'Hyperion FDM DataPump Import Script:
'Created By: cbeyer
'Date Created: 2/13/2009 5:57:14 PM
'Purpose:
'Get the last two fields
Dim tmpRecord
Dim strCurrentChar
Dim strYTDCR
Dim strYTDDR
Dim x
'Initialize fields
tmpRecord = strRecord
'Ensure we have data
If Trim(tmpRecord) = "" Then Exit Function
strYTDCR = ""
strYTDDR = ""
'Get YTD CR
'One could use the replace command to change all spaces to a delimittable field and then
'split out the string into a one dimensional array using the split command; however,
'This would only work best if there is an exact number of spaces between the two numbers
'Since I do not know if this is true, instead i'm looking for numeric/numeric like characters
'and splitting based off of that.
For x = Len(tmpRecord) To 1 Step -1
strCurrentChar = Mid(tmpRecord,x,1)
If (IsNumeric(strCurrentChar) Or strCurrentChar = "$" Or strCurrentChar = "." Or strCurrentChar = "," ) Then
strYTDCR = strCurrentChar & strYTDCR
Else
Exit For
End If
Next
'Trim down temporary record holder to remove the previous found amount and white space at the end of the string
tmpRecord = RTrim(Left(tmpRecord,x)) 'Remove the first number from the string and white space
'Get YTD DR
For x = Len(tmpRecord) To 1 Step -1
strCurrentChar = Mid(tmpRecord,x,1)
If (IsNumeric(strCurrentChar) Or strCurrentChar = "$" Or strCurrentChar = "." Or strCurrentChar = "," ) Then
strYTDDR = strCurrentChar & strYTDDR
Else
Exit For
End If
Next
'do the math
If IsNumeric(strYTDCR) And IsNumeric(strYTDDR) Then
NetAmount5and6 = strYTDDR - strYTDCR
Else
NetAmount5and6 = 0 'This will cause the record to fail on import
End If
End Function -
Multiple import formats in one FDM application....?
I wanted to know in my situation where there are 15 EBS Set of Books. whether it is possible to use only 1 FDM application to import all these data into my HFM application.
My ERPi application is like this :
1 source application that is EBS.
1 target application that is HFM.
15 EBS Set of books, for which i think i have to create 15 import formats in ERPi for each set of books. this also implies to the locations.
then I have to do the common period mapping and category mapping.
in the Data load Setup: I have to select each location and do the member mapping. create a data load rule for each location.
FDM Application:
i already have an FDM application which i am using to import data from EBS to HFM using ERPi, till now i have only used 1 set of books just to verify that everything is working fine. now as everything is working fine with the application, I want to add additional import formats in the existing FDM application to answer the import formats and locations created in the ERPi application.
Is it possible to do like this, if so then i need your assistance in achieving this task.
please put your comments in this regards.
Thanks,
Shantan KommeraYou can do this by specifiying the appropriate data load rule to be used by ERPi within Integration Option 1 in the location. This will kick off the data load rule you specify in ERPi that should be tied to the corresponding set of books in EBS.
-
FDM - Import Format (Fixed Column Type - No Delimiter)
Hello,
Question on FDM. I've built an import format and successfully imported a Fixed Column type text file. Everything imports beautifully. FYI - The format of the file looks just like a Trial Balance with a column for Debits and one column for Credits. In the import format setup, I am using the DrCrSplit script. Weird thing here is that I noticed it just ignored any of the rows where the balance was over 1 million (but brought everything else in perfectly). I've played with the Start and Length fields to no avail.
Does anyone have any ideas?
Thanks,
JamesGood day,
You can add a script as the last item to you amount import format, this will dump the values to a text file which may give you some idea of the issue. Open you file in a hex editor, there may be non printing characters.
Thanks
Function dumpamt(strField, strRecord)
'Declare Local Variables
Dim objFSAppend
Dim objFAppend
Dim strFileAppend
Dim blnCreate
'Initialize the file path
strFileAppend = "\\networkdirectoy\YourFileName.txt"
blnCreate = True
'Open the file system object and create the file
Set objFSAppend = CreateObject("Scripting.FileSystemObject")
Set objFAppend = objFSAppend.OpenTextFile(strFileAppend, 8, blnCreate)
'Append Data to File
objFAppend.WriteLine(strField)
'Close the objects
objFAppend.Close
Set objFAppend = Nothing
Set objFSAppend = Nothing
dumpamt = strField
End Function -
Multiple FDM Import Formats for One Location
I want to import trial balance data directly from the Oracle Financials database. I'm creating an import integration script to pull the ledgers directly via a SQL statement. My issue is that I also want to be able to write scripts to modify each individual field on the import, similar to a delimited import script where I can have a script for each dimension. Do you know if it's possible to combine import integration and delimited scripts in a single location? I'm guessing it may be a combination of the Import Format and Integration Options settings on the location, but I'm not sure which one should go where. Any help would be greatly appreciated.
This is not possible. Any adjustments to the data would need to be done within the integration script.
-
Importing fixed width text from a .txt file
I am really struggling to do in Numbers '09 something which I can do easily in Excel.
I have a txt file containing plain text in fixed-width columns which I would like to import into numbers.
I just cannot find a way to do it.
I have tried using the Insert/choose menu item - but it won't take .txt files.
I have tried to copy/paste the data, but it get's pasted into a single column.
The data consists of many lines like this:
Part Value Device Package Library Sheet
A-IN JST-2.0-4 JST-2.0-4 JST-20M KMILLAR 1
A-IN JST-2.5-4 JST-2.5-4 JST-25M KMILLAR 1
A-IN JST-2.8-4 JST-2.8-4 JST-28M KMILLAR 1
(and so on....)
(Each column is an exact number of characters wide, but these forums make that hard to see due to the variable spaced fonts).
How can I import this data into numbers?
(Sorry, but I cannot get the data in any other format, such as CSV, the application which exports it only support fixed width colums with spaces for padding).
Many thanks in advance,
KennyHere is a script treating the case of fixed widths values.
--[SCRIPT fixedwidth_values_toTSV.scpt]
Enregistrer le script en tant que Script : fixedwidth_values_toTSV.scpt
déplacer le fichier ainsi créé dans le dossier
<VolumeDeDémarrage>:Users:<votreCompte>:Library:Scripts:Applications:Numbers:
Il vous faudra peut-être créer le dossier Numbers et peut-être même le dossier Applications.
aller au menu Scripts , choisir Numbers puis choisir fixedwidth_values_toTSV
Choisir un fichier texte.
Le script détermine la largeur des différentes colonnes puis remplace les groupes séparateurs par des caractères TAB.
Le résultat est passé dans le presse-paiers et est enregistré à la place du contenu initial.
Vous pouvez alors
(1) coller dans le document de votre choix
(2) ouvrir le fichier texte modifié dans Numbers qui accepte sans broncher les ficiers .txt.
Utilisation alternative : enregistrer le script en tant que Progiciel (Application sous 10.6.x)
Glisser-déposer l'icône d'un fichier texte sur celle de l'application lancera le traitement voulu.
--=====
L'aide du Finder explique:
L'Utilitaire AppleScript permet d'activer le Menu des scripts :
Ouvrez l'Utilitaire AppleScript situé dans le dossier Applications/AppleScript.
Cochez la case "Afficher le menu des scripts dans la barre de menus".
Sous 10.6.x,
aller dans le panneau "Général" du dialogue Préférences de l'Éditeur Applescript
puis cocher la case "Afficher le menu des scripts dans la barre des menus".
--=====
Save the script as a Script: fixedwidth_values_toTSV.scpt
Move the newly created file into the folder:
<startup Volume>:Users:<yourAccount>:Library:Scripts:Applications:Numbers:
Maybe you would have to create the folder Numbers and even the folder Applications by yourself.
go to the Scripts Menu, choose Numbers, then choose "fixedwidth_values_toTSV"
Choose a text file.
The script scan the file's contents to extract the width of every column then it replace the separator groups by TAB characters.
The result is passed to the clipboard and is written in the original file.
So you may :
(1) paste in the document of your choice
(2) open the modified text file with Numbers which is fair enough to do that.
An alternate track is to save the script as an Application Package (Application under 10.6.x)
Drag and drop the icon of a text file on the application's one will do the job.
--=====
The Finder's Help explains:
To make the Script menu appear:
Open the AppleScript utility located in Applications/AppleScript.
Select the "Show Script Menu in menu bar" checkbox.
Under 10.6.x,
go to the General panel of AppleScript Editor’s Preferences dialog box
and check the “Show Script menu in menu bar” option.
--=====
Yvan KOENIG (VALLAURIS, France)
2010/08/19
--=====
on run
set un_fichier to choose file with prompt "Choose e text file…" of type {"public.plain-text"} without invisibles
my commun(un_fichier)
end run
--=====
on open (sel)
set un_fichier to item 1 of sel
tell application "System Events" to set type_ID to type identifier of disk item ("" & un_fichier)
if type_ID is "public.plain-text" then my commun(un_fichier as alias)
error "The file “" & un_fichier & "” isn’t a text file !"
end open
--=====
on commun(le_fichier)
set le_contenu to read le_fichier
set le_contenu to "azer ertyuio wxcv dfghj
qszaed dc fghj mlkjhgf nbvcxw
aqwzsx edcrfv tg byhn aaaaaaa "
set listedelistes to {}
set plusgrandelongueur to 0
set pluspetitelongueur to 999999
set listelignesbrutes to paragraphs of le_contenu
repeat with refd_uneligne in listelignesbrutes
set maybe to contents of refd_uneligne
set maybe2 to count of maybe
if maybe2 > plusgrandelongueur then set plusgrandelongueur to maybe2
if maybe2 < pluspetitelongueur then set pluspetitelongueur to maybe2
copy my decoupe(maybe, space) to end of listedelistes
end repeat
set differencedelongueur to plusgrandelongueur - pluspetitelongueur
set des_espaces to space
repeat differencedelongueur times
set des_espaces to des_espaces & space
end repeat
set largeur1 to 0
repeat with refd_uneligne in listedelistes
set maybe to length of first item of refd_uneligne
if maybe > largeur1 then set largeur1 to maybe
end repeat
set liste_finale to {}
repeat with refd_uneligne in listelignesbrutes
set maybe to contents of refd_uneligne
set maybe2 to text 1 thru largeur1 of maybe
repeat while maybe2 ends with space
set maybe2 to text 1 thru -2 of maybe2
end repeat
copy maybe2 to end of liste_finale
copy text (largeur1 + 2) thru plusgrandelongueur of (maybe & des_espaces) to contents of refd_uneligne
end repeat
Enter the bigger loop *)
set cest_Lafin to false
repeat
Deprieve the stored rows of the treated column's items *)
set flag to 0
repeat
set flag to flag + 1
set flag2 to 0
repeat with refd_uneligne in listelignesbrutes
if "" & character flag of contents of refd_uneligne is space then set flag2 to flag2 + 1
end repeat
if flag2 < (count of listelignesbrutes) then exit repeat
end repeat
repeat with refd_uneligne in listelignesbrutes
copy text flag thru -1 of contents of refd_uneligne to contents of refd_uneligne
end repeat
Prepare the extraction of next column *)
repeat with refd_uneligne in listelignesbrutes
copy my decoupe(contents of refd_uneligne, space) to end of listedelistes
end repeat
Extract the width of the column to treat *)
set largeur1 to 0
repeat with refd_uneligne in listedelistes
set maybe to length of first item of refd_uneligne
if maybe > largeur1 then set largeur1 to maybe
end repeat
Extract the column's values *)
repeat with i from 1 to count of listelignesbrutes
set maybe to contents of item i of listelignesbrutes
set maybe2 to text 1 thru largeur1 of maybe
repeat while maybe2 ends with space
set maybe2 to text 1 thru -2 of maybe2
end repeat
copy (contents of item i of liste_finale) & tab & maybe2 to item i of liste_finale
try
copy text (largeur1 + 2) thru -1 of maybe to item i of listelignesbrutes
on error
set cest_Lafin to true
end try
end repeat -- i
if cest_Lafin then exit repeat
end repeat -- bigger loop
set le_contenu to my recolle(liste_finale, return)
set the clipboard to le_contenu
set eof of le_fichier to 0
write le_contenu to le_fichier
end commun
--=====
on decoupe(t, d)
local oTIDs, l
set oTIDs to AppleScript's text item delimiters
set AppleScript's text item delimiters to d
set l to text items of t
set AppleScript's text item delimiters to oTIDs
return l
end decoupe
--=====
on recolle(l, d)
local oTIDs, t
set oTIDs to AppleScript's text item delimiters
set AppleScript's text item delimiters to d
set t to l as text
set AppleScript's text item delimiters to oTIDs
return t
end recolle
--=====
--[/SCRIPT]
Yvan KOENIG (VALLAURIS, France) vendredi 20 août 2010 12:44:33 -
I have a few questions around import formats as I have recently seen some new approached that I have not seen before:
Firstly are Import Formats auditable? Can the changes etc be tracked?
Secondly the formats I see are concatenating GL accounts and a few things from the GL to create a new "unique" account that is then mapped in FDM.
E.g.,
in the GL
GL Account
810000 - Revenue $10,000
GL Attribute1
BL - Blue
GL Attribute2
T1 - Dakota
FDM Import
Then creates a source GL Account of
810000BLT1
FDM mapping
810000BLT1 = TO_00001
HFM
TO_00001 $10,000
Has anyone seen this before, where effectively a new account is created from the import format ?1. I can't make a comment on FDMEE, but what is now 'classic' FDM does not audit the import format table. However if it is a requirement, then i am sure your DBA could sort something out
2. Yes, this is quite common, but perhaps more for the other dimensions rather than the account dimension. -
Import Format: Copy source account into UD1
The Source G/L Account is used for both the HFM Account and HFM UD1 (Custom1). The mapping for FM Accounts and FM UD1 is set-up based on the GL Accounts. UD1 is not included in the GL extract file.
How can I easy copy source Account into UD1 through the import format that can be used for several locations with different import formats?
Example:
GL Account: 1000 -> HFM account: 1000 > HFM UD1: FinS
GL Account: 3000 -> HFM account: ctrl_Logic -> HFM UD1: Stat
Currently I use for UD1 a script like DW.Utilities.fParseString(strRecord,4,2) to do that and it works. Unfortuntely I have at least many different locations with different import formats that would require this script to be adjusted for each import format.
Any idea? Thanks for your help!Good day
To get this working for different import format layouts you need to make use of the Res.PVarTemp1,,5 FDM variables, you can store information between different fields in the import fields. There are also workarounds if you need to store more than 5 values.
So you need to create two scripts, the TempPut is attached to the account import field and the TempGet is attached to the UD1 import field
Function TempPut(strField, strRecord)
Res.PvarTemp1 = strfield
TempPut = strfield
End Function
Function TempGet(strField, strRecord)
TempGet= Res.PVarTemp1
End Function
Hope this helps -
How to copy FDM setting (import format, dimension mapping, control table)
Dear All,
How to copy FDM setting (import format, dimension mapping, control table) from application to another application.
I found that only dimension mapping can be imported. Is there any way to copy FDM application quickly?
Thanks your helpIf you get a chance try the following script, it's so simple and easy to extract all the map data to XML and will help in to import back through Import script.
Sub MapExtractor()
'UpStream WebLink Custom Script:
'Created By: SatyaK
'Date Created: 12/08/09
'Purpose: This Script will produce a Account Map File for
' the current location.
'Execute the export
strFilePath = API.IntBlockMgr.InterfaceMgr.fExportMapToXML("File Path", PPOVPeriod)
End Sub
-------------
Maybe you are looking for
-
Hi, I hope that this makes sense to those who read it. If, it doesn't then, please - someone say so. In case some of you recognize my monicker it has been a good while since I visited and asked for help. Kappy, I didn't understand everything - had so
-
My earphone that came with the ipod touch is not working
the earphone that came with the ipod is not workin, the microfone doesnt work, and the volume control doesnt too, but, the stop/play button works, and the overall sound from the phone, wat is happening? can smeone help me?
-
my iphone is not recognised by my pc with windows 7 . ive tried with different cables. i tunes installed.. any suggestion?
-
I've created a simulation in Flash 8. The simulation is working fine in IE7 but when I'm launching the sim in Safari browser the sim is not working as it should. I'm getting some issues like: Some SWFs are not getting loaded. Some Functions are not w
-
Video quality differences (3G DUN vs Road Runner)
I've always used iChat from my RoadRunner connection and accepted the subpar video quality. The other day I was connected to my 3G (HSDPA) phone and browsing from the airport and fired up ichat and did a test video call to one of the apple3utest IDs.