Text Tab delimited file-Strcuture-validation
Hi Folks,
1.Is there a way to check whether the file is text tab delimited or not,programatically ?
2.can we check whether the data in the text tab delimited file is in line with the structure of the internal table into which it is going to be uploaded ?
Thanks,
K.Kiran.
hi try this
DO.
READ DATASET p_ufile INTO in_file.
IF sy-subrc <> 0.
EXIT.
ENDIF.
APPEND in_file.
CLEAR in_file.
ENDDO.
CLOSE DATASET p_ufile.
LOOP AT in_file.
SPLIT in_file AT c_tab INTO
wa_citm_b-type
wa_citm_b-vbeln
wa_citm_b-posnr
wa_citm_b-uepos.
wa_citm_b-matnr
lv_menge
wa_citm_b-arktx
wa_citm_b-vbegdat
wa_citm_b-venddat
wa_citm_b-prctr
wa_citm_b-zterm
wa_citm_b-faksp
wa_citm_b-taxm1
wa_citm_b-vlaufz
wa_citm_b-vlauez
wa_citm_b-vlaufk
wa_citm_b-vkuegru
wa_citm_b-bstkd
wa_citm_b-bstdk
wa_citm_b-posex
wa_citm_b-bstkd_e
wa_citm_b-bstdk_e
wa_citm_b-period.
IF NOT wa_citm_b-posnr CA sy-abcde.
APPEND wa_citm_b TO lt_citm_b.
ENDIF.
ENDLOOP.
Similar Messages
-
Issue related to Excel to Text tab delimited conversion
Hi,
I am facing a strange issue in converting an excel file to a text tab delimited file. I have an excel sheet which contains two columns:
vendor new_zip
153357 99645-6340
162642 99669-7631
$209930-1 91320-1201
$209989-1 91710-5766
When i save this file as a text tab delimited file this is how it turns into:
vendor new_zip
153357 99645-6340
162642 99669-7631
$209930-1 91320-1201
$209989-1 91710-5766
i am using WS_UPLOAD since i am not using the enterprise version of SAP. In the above mentioned u can see that the zip values(first character) of the first two records and the vendor numbers(last character) of the last two records get in line with each other. so when i load this file it gives a "File open error" exception. if i move the zip codes of the first two records by one space so that they are not in line with the vendor numbers of the last two records the file uploading happens fine. but this is something which cant be done from the user point of view. so can anyone tell as to what can be done without changing the concept of using text tab delimited file and aviod this problem?
thanks & regards,
Bala.The following program uses alsm_convert_excel_to_internal_table.but i want to use split at tab delimiter.pls help.
REPORT ZSAINAL_BDC_TRAN .
*INCLUDE BDCRECX1.
*definition of selection screen
SELECTION-SCREEN BEGIN OF BLOCK bl1 WITH FRAME .
SELECTION-SCREEN BEGIN OF BLOCK bl2 WITH FRAME TITLE text-t01.
SELECTION-SCREEN SKIP.
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 10(20) text-c01.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN SKIP.
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 10(10) text-c02.
SELECTION-SCREEN POSITION 22.
PARAMETERS: p_txt RADIOBUTTON GROUP grp1 DEFAULT 'X'.
SELECTION-SCREEN COMMENT 30(12) text-c03.
SELECTION-SCREEN POSITION 46.
PARAMETERS: p_xls RADIOBUTTON GROUP grp1 .
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN SKIP.
SELECTION-SCREEN END OF BLOCK bl2.
*PARAMETERS
PARAMETERS ctumode LIKE ctu_params-dismode DEFAULT 'A'.
PARAMETERS cupdate LIKE ctu_params-updmode DEFAULT 'S'.
SELECTION-SCREEN SKIP.
SELECTION-SCREEN END OF BLOCK bl1.
*DATA
DATA : bdc_data LIKE STANDARD TABLE OF bdcdata INITIAL SIZE 10
WITH HEADER LINE.
*DATA: bdc_tab LIKE TABLE OF bdcdata INITIAL SIZE 0 WITH HEADER LINE.
*Internal table to get legacy data records structured in
*target format
DATA: BEGIN OF inrec OCCURS 0,
lifnr LIKE lfa1-lifnr,
name1 LIKE lfa1-name1,
stras LIKE lfa1-stras,
ort01 LIKE lfa1-ort01,
END OF inrec.
*Internal table of structure ALSMEX_TABLINE suitable for
*uploading records from an Excel worksheet
DATA: it_excel TYPE STANDARD TABLE OF alsmex_tabline
INITIAL SIZE 0 WITH HEADER LINE,
it_excel_dummy TYPE alsmex_tabline.
data: messtab like bdcmsgcoll occurs 0 with header line.
DATA: L_MSTRING(480).
DATA: L_SUBRC LIKE SY-SUBRC.
*START-OF-SELECTION
START-OF-SELECTION.
PERFORM read_data.
PERFORM populate_bdcdata.
*START NEW SCREEN
FORM bdc_dynpro USING program dynpro.
CLEAR bdc_data.
bdc_data-program = program.
bdc_data-dynpro = dynpro.
bdc_data-dynbegin = 'X'.
APPEND bdc_data.
ENDFORM.
*INSERT FIELD
FORM bdc_field USING fnam fval.
IF FVAL <> NODATA.
CLEAR bdc_data.
bdc_data-fnam = fnam.
bdc_data-fval = fval.
APPEND bdc_data.
ENDIF.
ENDFORM.
*& Form read_data
text
--> p1 text
<-- p2 text
FORM read_data.
IF p_txt = 'X'.
CALL FUNCTION 'GUI_UPLOAD'
EXPORTING
filename = 'C:\URMILA.TXT'
filetype = 'ASC'
has_field_separator = 'X'
HEADER_LENGTH = 0
READ_BY_LINE = 'X'
IMPORTING
FILELENGTH =
HEADER =
TABLES
data_tab = inrec
EXCEPTIONS
file_open_error = 1
file_read_error = 2
no_batch = 3
gui_refuse_filetransfer = 4
invalid_type = 5
no_authority = 6
unknown_error = 7
bad_data_format = 8
header_not_allowed = 9
separator_not_allowed = 10
header_too_long = 11
unknown_dp_error = 12
access_denied = 13
dp_out_of_memory = 14
disk_full = 15
dp_timeout = 16
OTHERS = 17
IF sy-subrc <> 0.
WRITE: /'ERROR UPLOADING TXT FILE FROM PRESENTATION SERVER!',
/ 'RETURN CODE : ',sy-subrc.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
ELSE. "filetype is excel
-read excel file into an int. table in row/col format--
CALL FUNCTION 'ALSM_EXCEL_TO_INTERNAL_TABLE'
EXPORTING
filename = 'C:\URMILA.XLS'
i_begin_col = 1
i_begin_row = 1
i_end_col = 4
i_end_row = 3
TABLES
intern = it_excel
EXCEPTIONS
inconsistent_parameters = 1
upload_ole = 2
OTHERS = 3.
IF sy-subrc <> 0.
WRITE: /'ERROR UPLOADING XLS FILE FROM PRESENTATION SERVER!',
/ 'RETURN CODE : ',sy-subrc.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ELSE.
--now fill data from it_excel into final legacy data itabinrec----
IF NOT it_excel[] IS INITIAL.
CLEAR inrec.
REFRESH inrec[].
LOOP AT it_excel.
it_excel_dummy = it_excel.
AT NEW col.
CASE it_excel_dummy-col.
WHEN 1.
inrec-lifnr = it_excel_dummy-value(10).
WHEN 2.
inrec-name1 = it_excel_dummy-value(35).
WHEN 3.
inrec-stras = it_excel_dummy-value(35).
WHEN 4.
inrec-ort01 = it_excel_dummy-value(35).
APPEND inrec.
CLEAR inrec.
ENDCASE.
ENDAT.
AT END OF row.
ENDAT.
ENDLOOP.
ENDIF.
ENDIF.
ENDIF.
ENDFORM.
*& Form populate_bdcdata
to populate BDCDATA table from legacy file data contained in
internal table inrec.
--> p1 text
<-- p2 text
FORM populate_bdcdata.
IF not inrec[] IS INITIAL.
LOOP AT inrec.
CLEAR bdc_data.
REFRESH bdc_data.
PERFORM bdc_dynpro USING 'SAPMF02K' '0106'.
PERFORM bdc_field USING 'BDC_OKCODE'
'/00'.
PERFORM bdc_field USING 'RF02K-LIFNR'
inrec-lifnr.
PERFORM bdc_field USING 'RF02K-BUKRS'
'1000'.
PERFORM bdc_field USING 'RF02K-D0110'
'X'.
PERFORM bdc_dynpro USING 'SAPMF02K' '0110'.
PERFORM bdc_field USING 'BDC_OKCODE'
'=PF03'.
PERFORM bdc_field USING 'LFA1-NAME1'
inrec-name1.
PERFORM bdc_field USING 'LFA1-SORTL'
'ALLGEMEIN'.
PERFORM bdc_field USING 'LFA1-STRAS'
inrec-stras.
PERFORM bdc_field USING 'LFA1-PFACH'
'645793'.
PERFORM bdc_field USING 'LFA1-ORT01'
inrec-ort01.
PERFORM bdc_field USING 'LFA1-PSTLZ'
'12001'.
PERFORM bdc_field USING 'LFA1-ORT02'
'COOK'.
PERFORM bdc_field USING 'LFA1-PSTL2'
'76905'.
PERFORM bdc_field USING 'LFA1-LAND1'
'DE'.
PERFORM bdc_field USING 'LFA1-REGIO'
'11'.
PERFORM bdc_field USING 'LFA1-SPRAS'
'DE'.
PERFORM bdc_field USING 'LFA1-TELF1'
'06894/55501-0'.
PERFORM bdc_field USING 'LFA1-TELFX'
'06894/55501-100'.
PERFORM bdc_dynpro USING 'SAPLSPO1' '0100'.
PERFORM bdc_field USING 'BDC_OKCODE'
'=YES'.
CALL TRANSACTION 'FK02'
USING bdc_data
MODE ctumode
UPDATE cupdate
MESSAGES INTO MESSTAB.
ENDLOOP.
perform mess_handling.
ENDIF.
ENDFORM. " populate_bdcdata
*& Form mess_handling
ERROR MESSAGE HANDLING IN CALL TRANACTION
--> p1 text
<-- p2 text
form mess_handling.
tables:T100.
LOOP AT MESSTAB.
SELECT SINGLE * FROM T100 WHERE SPRSL = MESSTAB-MSGSPRA
AND ARBGB = MESSTAB-MSGID
AND MSGNR = MESSTAB-MSGNR.
IF SY-SUBRC = 0.
L_MSTRING = T100-TEXT.
IF L_MSTRING CS '&1'.
REPLACE '&1' WITH MESSTAB-MSGV1 INTO L_MSTRING.
REPLACE '&2' WITH MESSTAB-MSGV2 INTO L_MSTRING.
REPLACE '&3' WITH MESSTAB-MSGV3 INTO L_MSTRING.
REPLACE '&4' WITH MESSTAB-MSGV4 INTO L_MSTRING.
ELSE.
REPLACE '&' WITH MESSTAB-MSGV1 INTO L_MSTRING.
REPLACE '&' WITH MESSTAB-MSGV2 INTO L_MSTRING.
REPLACE '&' WITH MESSTAB-MSGV3 INTO L_MSTRING.
REPLACE '&' WITH MESSTAB-MSGV4 INTO L_MSTRING.
ENDIF.
CONDENSE L_MSTRING.
WRITE: / MESSTAB-MSGTYP, L_MSTRING(250).
ELSE.
WRITE: / MESSTAB.
ENDIF.
ENDLOOP.
endform. " mess_handling -
Import text into a form from a tab delimited file using an action
Good evening.
I am using Adobe Acrobat XI Pro
I have been working all weekend so far on this, and have tried many options.
What I am wanting is to import a line of data from an excel file into a form, save the file with a name drived from the form fields, close the new file, then go back to the original file, import a line of data, and so on and so on.
I had all of this working in livecyle with a tool, but now that we are going to Windows 8 and Microsoft Office 2013, the driver that I need to load the excel file into the form is not available--so now I have to redo the forms in Adobe and import using a tab delimited file.
I would like to do this with an action.
Thus far, I have the following.
**Credit goes to George Johnson who helped me with the script to save the file using field names a few months ago**
To start, I have a folder level script
mySaveAs = app.trustPropagatorFunction(function(doc,path)
app.beginPriv();
var myDoc = event.target;
myDoc.saveAs(path);
app.endPriv();
myTrustedSpecialTaskFunc = app.trustedFunction(function(doc,path)
//privileged and/or non-privileged code above
app.beginPriv();
mySaveAs(doc, path);
app.endPriv
//Privileged and/or non-privileged code below
For the Action, I start with the Form file loaded
Then I execute a javascript to import the text into the file.
this.importTextData("/c/data/clerical.txt");
The next step is to save the file using field names as part of the file name
--credit goes to George Johnson who assisted me with this on a similar project a few months ago.
//Get the Field Value
var fn=getField("Last").valueAsString + "-" + getField("First").valueAsString;
//Specify the folder
var fldr = "/c/data/";
//Determine the full path
var fp=fldr + fn + ".pdf";
//save the file
myTrustedSpecialTaskFunc(this, fp);
That is as far as I have gotten.
What I want to do now is load the original form file, import the next line into the form, save the file, repeat.
If anyone could assist me, I would greatly appreciate it.
**note I had to type this from my I-pad because I kept getting kicked off the internet from my computer. I hope my code is typed correctly.George
Thank you so much for your response.
Yes--there are multiple lines in the data file--it will vary from month to month. It looks like from what you are saying is that I need to do the global variable since it will constantly change, and then increment it as it goes through the text file. When it reaches the end, then it will stop.
I looked at the following links--but this is from Adobe 9 API--I don't know if things have changed with XI--especially since 9 used batch processing and XI has actions.
Count PDF Files
http://help.adobe.com/livedocs/acrobat_sdk/9.1/Acrobat9_1_HTMLHelp/wwhelp/wwhimpl/js/html/ wwhelp.htm?href=JS_API_AcroJS.88.1.html
Global counter
http://help.adobe.com/livedocs/acrobat_sdk/9.1/Acrobat9_1_HTMLHelp/wwhelp/wwhimpl/js/html/ wwhelp.htm?href=JS_API_AcroJS.88.1.html
I am not exactly sure how to include this in my code.
If you could point me in the right direction, I would appreciate it. -
The selected file does not appear to be a valid comma separated values (csv) file or a valid tab delimited file. Choose a different file.
I guess your question is, "what's wrong with the file?"
You're going to have to figure that out yourself, as we cannot see the file.
Importing into Address book requires either a tab-delimited or a comma-delimited file. You can export out of most spreadsheets into a csv file. However, you need to make sure you clean up the file first. If you have a field that has commas in the field, they will create new fields at the comma. So, some lines will have more fields than the others, causing issues like the error you saw. -
To import addresses, need format of tab delimited file
I am trying to import addresses from my G3 PB Mozilla App. I exported addresses on G3 to both ldif and tab-delimited files and then attached to an email message which I sent to myself. I received email on Mac mini, but the 2 files showed up inline, not as attachments. I copied the ldif portion to a text file; ditto for tab-delimited. I tried importing into Address Book, but got message that format was not valid.
Can't I just edit the tab-delimited file in TextEdit, save as RTF, and get Address Book to recognize the data?
Thanks,
OwenHi, Did you get solution for this? Please let me know as I'm looking for the same solution. The Bank requirement is to generate a Tab delimited file but the RFFOGB_T with Format GB_BACS issues the output as below...
Required by Bank:
692532 73855963 RRS P R BACKLEY 169.91 GSLV
294518 99855581 CETS PRITECTIIN 799.72 GSLV
The output I get from SAP/DMEE:
........1........2........3........4........5........6....
VOL1000004 ....953312
1 <CR/LF>
HDR1A953312S 195331200000400010001 10040 100420000000
<CR/LF>
HDR2F0200000100 00
<CR/LF>
UHL1 10041999999 000000001 DAILY 000
<CR/LF>
6010392865540009960062063474662 00000115000ABC UK Ltd. 0
1465 <CR/LF>
6006206347466201760062063474662 00000115000SAPBACS0000003306 C
ONTRA ABC UK LTD. <CR/LF>
EOF1A953312S 195331200000400010001 10040 100420000000
<CR/LF>
EOF2F0200000100 00
<CR/LF>
UTL10000000115000000000011500000000010000001
<CR/LF>
END
<CR/LF>
<END>
Rgds,
Stan -
Discover Plus - Export to Text Tab delimited is not exporting all the rows
Hi gurus,
I am trying to export a large data report which has 1 million plus rows to text tab delimited. The export takes 9 plus hours to export and the data is not more than 100000.
My question is
1. How can I make the discoverer to export it quicker or rather faster to tab delimited.
2. Where can I change the number of rows to be exported.
Any help, suggestions is appreciated.
Thanks,
SAIHi Rod,
Yes. The text tab delimited export is taking lot of time. The total rows for this report are nearly 1 million. If I break down the report with condition and export it I was able to export it ( three files exported with 212000, 103000 and 687000 rows respectively).
But I m still having problems exporting it in one shot. Is there any way I could resolve this? Please let me know.
Thanks,
SAI -
Read Tab delimited File from Application server
Hi Experts,
I am facing problem while reading file from Application server.
File in Application server is stored as follows, The below file is a tab delimited file.
##K#U#N#N#R###T#I#T#L#E###N#A#M#E#1###N#A#M#E#2###N#A#M#E#3###N#A#M#E#4###S#O#R#T#1###S#O#R#T#2###N#A#M#E#_#C#O###S#T#R#_#S#U#P#P#L#1###S#T#R#_#S#U#P#P#L#2###S#T#R#E#E#T###H#O#U#S#E#_#N#U#M#1
i have downloaded this file from Application server using Transaction CG3Y. the Downloaded file is a tab delimited file and i could not see "#' in the file,
The code is as Below.
c_split TYPE abap_char1 VALUE cl_abap_char_utilities=>horizontal_tab.
here i am using IGNORING CONVERSION ERRORS in order to avoid Conversion Error Short Dump.
OPEN DATASET wa_filename-file FOR INPUT IN TEXT MODE ENCODING DEFAULT IGNORING CONVERSION ERRORS.
IF sy-subrc = 0.
WRITE : /,'...Processing file - ', wa_filename-file.
DO.
Read the contents of file
READ DATASET wa_filename-file INTO wa_file-data.
IF sy-subrc = 0.
SPLIT wa_file-data AT c_split INTO wa_adrc_2-kunnr
wa_adrc_2-title
wa_adrc_2-name1
wa_adrc_2-name2
wa_adrc_2-name3
wa_adrc_2-name4
wa_adrc_2-name_co
wa_adrc_2-city1
wa_adrc_2-city2
wa_adrc_2-regiogroup
wa_adrc_2-post_code1
wa_adrc_2-post_code2
wa_adrc_2-po_box
wa_adrc_2-po_box_loc
wa_adrc_2-transpzone
wa_adrc_2-street
wa_adrc_2-house_num1
wa_adrc_2-house_num2
wa_adrc_2-str_suppl1
wa_adrc_2-str_suppl2
wa_adrc_2-country
wa_adrc_2-langu
wa_adrc_2-region
wa_adrc_2-sort1
wa_adrc_2-sort2
wa_adrc_2-deflt_comm
wa_adrc_2-tel_number
wa_adrc_2-tel_extens
wa_adrc_2-fax_number
wa_adrc_2-fax_extens
wa_adrc_2-taxjurcode.
WA_FILE-DATA is having below values
##K#U#N#N#R###T#I#T#L#E###N#A#M#E#1###N#A#M#E#2###N#A#M#E#3###N#A#M#E#4###S#O#R#T#1###S#O#R#T#2###N#A#M#E#_#C#O###S#T#R#_#S#U#P#P#L#1###S#T#R#_#S#U#P#P#L#2###S#T#R#E#E#T###H#O#U#S#E#_#N#U#M#1
And this is split by tab delimited and moved to other variables as shown above.
Please guide me how to read the contents without "#' from the file.
I have tried all possible ways and unable to get solution.
Thanks,
ShrikanthHi ,
In ECC 6 if all the unicode patches are applied then UTF 16 will defintly work..
More over i would suggest you to ist replace # with some other * or , and then try to see in debugging if any further # appears..
and no # appears then try to split now.
if even now the # appears after replace statement then try to find out what exactly is it... wheather it is a horizantal tab etc....
and then again try to replace it and then split..
Please follow the process untill all the # are replaced...
This should work for you..
Let me know if you further face any issue...
Regards
Satish Boguda -
Text Tab delimited - using Numbers
I have some Numbers files that I need to upload to a contact manager as Text Tab - Delimited. I cannot seem to find the correct way of doing it, since I am not able to get them done.
If you need to export data from specific tables, you can try is selecting the cells, command-c to copy, and in a text editor, command-v to paste, and then save to file, which you should then be able to upload to the contact manager.
Selecting cells and copying them places their values on the clipboard tab-delimited.
SG -
Formatting a tab delimited file
Hello All,
I am populating a tab delimited text file with data from a resultset and I'm having problems lining up the columns properly. I tried using tabs, but the variable length of some of the entries are messing up the positioning of the data. Is there a way to create tab delimited fixed length fields with column headers? or is there some better way to do this in general?
Thanks,
JamesI got it working using StringBuffers. Where I missed it was that the formatting of the text of the report originally didn't work under the
code. It was being automatically formatted when it was passed as a message in an email under javamail. I had forgotten that Outlook will do that on it's own. When I tried to make the report an attachment, the defect in the formatting became apparent.
I also got it working (better solution) using POI. That way the attachment is an .xls file, rather than tab-delimited file.
FYI,
James -
Inserting a tab delimited file
Hi there,
I am inserting data into a database from text files. I can easily do this in sql with csv files but I need to be able to do it with tab delimited files. I know you can do this from the built in Oracle tool (I am using express edition) but I was wandering if anyone know how to write a script for it in sql.
Any help would be greatly appreciated.
ThanksIf you are using SQL Loader to load the data use below syntex
FIELDS TERMINATED BY X'9'
The X'9' is Hexadecimal Format -> X
and Hex 9 is the ASCII code of the TAB character.
Check out the link for more details:
http://asktom.oracle.com/pls/ask/f?p=4950:8:::::F4950_P8_DISPLAYID:533222350291
Regards
Arun -
Is there any methodology whereby a file can be exported, or saved, as a Tab Delimited File?
ThanksSelect All
Copy
Paste in a Pages document
Export as text.
Other way (my preffered one) :
Select All
Copy
run this Script :
--[SCRIPT clipboard2textFile]
Enregistrer le script en tant que Script :clipboard2textFile.scpt
déplacer le fichier créé dans le dossier
<VolumeDeDémarrage>:Users:<votreCompte>:Library:Scripts:
Copiez la table à exporter dans le Presse-papiers.
menu Scripts > clipboard2textFile
Le script créera un fichier TSV (valeurs séparées par TAB).
--=====
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".
+++++++
Save the script as a Script :clipboard2textFile.scpt
Move the newly created file into the folder:
<startup Volume>:Users:<yourAccount>:Library:Scripts:
Copy the table to export into the clipboard
menu Scripts > clipboard2textFile
The script will create a TSV file (Tab separated values).
--=====
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.
+++++++
Yvan KOENIG (VALLAURIS, France))
2009/07/07
2010/01/10 : Corrigé quelques coquilles dans les explications
--=====
on run
try
set enTexte to the clipboard as text
set fName to (do shell script "date " & quote & "+_%Y%m%d-%H%M%S" & quote) & "." & "txt"
set p2d to path to desktop
tell application "System Events" to make new file at end of p2d with properties {name:fName}
write enTexte to file ((p2d as text) & fName)
on error
if my parleAnglais() then
error "The clipboard doesn’t contain text data. Maybe you selected a Numbers sheet !"
else
error "Le presse-papiers ne contient pas de données texte. Vous avez peut-être copié une feuille de Numbers !"
end if
end try
end run
--=====
on parleAnglais()
local z
try
tell application "Numbers" to set z to localized string "Cancel"
on error
set z to "Cancel"
end try
return (z is not "Annuler")
end parleAnglais
--=====
--[/SCRIPT]
Yvan KOENIG (VALLAURIS, France) mardi 16 février 2010 21:57:42 -
Download Tab Delimited file from spool!
Hi Experts,
Is there any way to download tab delimited txt file from spool?
Spool is created for Statements and Invoices from Sap Script and Smartform which is in OTF format.
I am able to download this in Text file but I need this file in tab delimited format.I don't understand what you want to do as it seems impossible : the spool contains miscellaneous data, not compatible with tab delimited files which are used to store 2-dimensional tables (columns, rows).
-
Split tab delimited file coming from application server.
Hi,
i have received a tab delimited file from the application server.it contains # instead of tab at the application server.
i want to know how to split it.
i tried decalring constant as:
c_tab type x value'09'.
but it gives an error saying only c,n,d and t types are allowed.
please gelp.
Thanks,
Anand.Hi,
Do like this
*--Local Variables
DATA : l_file TYPE string,
l_line TYPE string.
*--Clear
CLEAR : l_file.
l_file = p_ipfile.
*--Read the data from application server file.
OPEN DATASET l_file FOR INPUT IN TEXT MODE ENCODING DEFAULT.
IF sy-subrc NE 0.
*--Error in opening file
MESSAGE i368(00) WITH text-005.
ENDIF.
*--Get all the records from the specified location.
DO.
READ DATASET l_file INTO l_line.
IF sy-subrc NE 0.
EXIT.
ELSE.
SPLIT l_line AT cl_abap_char_utilities=>horizontal_tab
INTO st_ipfile-vbeln
st_ipfile-posnr
st_ipfile-edatu
st_ipfile-wmeng.
APPEND st_ipfile TO it_ipfile.
ENDIF.
ENDDO.
*--Close dataset
CLOSE DATASET l_file.
Regards,
Prashant -
Splitting tab delimited file?
how to split a tab delimited file?
Hi,
Do like this
*--Local Variables
DATA : l_file TYPE string,
l_line(1000) TYPE c.
*--Clear
CLEAR : l_file.
l_file = p_aifile.
*--Read the data from application server file.
OPEN DATASET l_file FOR INPUT IN TEXT MODE ENCODING DEFAULT.
IF sy-subrc NE c_ok.
MESSAGE i368(00) WITH text-014.
ENDIF.
*--Get all the records from the specified location.
DO.
READ DATASET l_file INTO l_line.
IF sy-subrc NE c_ok.
EXIT.
ELSE.
SPLIT l_line AT cl_abap_char_utilities=>horizontal_tab
INTO st_ipfile-anlkl
st_ipfile-txt50
st_ipfile-txa50
st_ipfile-anlhtx
st_ipfile-sernr
st_ipfile-invnr
st_ipfile-aktiv
st_ipfile-invzu
st_ipfile-kostl
st_ipfile-raumn
st_ipfile-ord41
st_ipfile-gdlgrp
st_ipfile-herst
st_ipfile-typbz
st_ipfile-afabe
st_ipfile-afasl
st_ipfile-ndjar
st_ipfile-ndper
st_ipfile-tafabe
st_ipfile-tafasl
st_ipfile-tndjar
st_ipfile-tndper
st_ipfile-anbtr01
st_ipfile-anbtr02
st_ipfile-anbtr03
st_ipfile-anbtr04.
APPEND st_ipfile TO it_ipfile.
ENDIF.
ENDDO.
*--Close dataset
CLOSE DATASET l_file.
Regards,
Prashant
Edited by: Prashant Patil on Mar 5, 2008 4:11 PM -
Hi,
I must create a tab delimited output complex text file from a read on a database table. The file has multiple record lines in it. I have created the XSD from the sample output file and have each field terminated by a './T' . I must pass a tab for each field regardless of whether it is populated from my source data. I can not send a space in the field. How can I map a null value through the XSLT so that the output file has a tab? I've tried setting a default on the xsd but that seems to do nothing. Currently I am setting a fixed text through the mapper to space for all the fields that I do not use. I then go into the XSL and remove the space from the <xsl:text></xsl:text> element. This works, however when I go back into the mapper and change anything through the xslt, it wipes out all of my empty text elements.
Any ideas on how to create a tab delimited file that has tabs for fields that have no data?
Thank you much,
Kevin MeyerHi,
I must create a tab delimited output complex text file from a read on a database table. The file has multiple record lines in it. I have created the XSD from the sample output file and have each field terminated by a './T' . I must pass a tab for each field regardless of whether it is populated from my source data. I can not send a space in the field. How can I map a null value through the XSLT so that the output file has a tab? I've tried setting a default on the xsd but that seems to do nothing. Currently I am setting a fixed text through the mapper to space for all the fields that I do not use. I then go into the XSL and remove the space from the <xsl:text></xsl:text> element. This works, however when I go back into the mapper and change anything through the xslt, it wipes out all of my empty text elements.
Any ideas on how to create a tab delimited file that has tabs for fields that have no data?
Thank you much,
Kevin Meyer
Maybe you are looking for
-
Hi, I have a requirement to develop a report which will eventually be automated and its output sent as an email with pdf attachment, I did develop a sample report, but when I running the report, I am getting this message " A program is access e-mail
-
I think the title says it all. We have different Apple IDs on two computers for two users. To home share, is it necessary to change one of the Apple IDs to match the other, or can this be done just for purposes of home sharing -- i.e., select one A
-
Resizing Brochure to different paper sizes
I have created a brochure using an Apple template and have my paper size as 8.5 x 11. However, since each page in the template is 2 actual pages, when I go to print, the brochure is half the size. When I try and resize the page, the brochure image
-
Converting PAL to NTSC using Compressor, FCP or iDVD?
Hi guys, I'm currently editing some PAL footage from a Canon DSLR which has been compressed into an Apple Prores which measures 1920 x 1080. I need to put my finished project on a DVD so it to play in the US. Should I export to NTSC in FCP, Compresso
-
Getting the music back_
I've lost my iTunes library so a dont have all my song in my mac anymore. But, since i got my iPod with everything, i'm trying to pick the information there and drop it back into my computer. I dont know how to do this, it's not working by simply dra