Trouble importing contacts from a tab-delimited file into Contacts on 10.9.5
I am having Trouble importing contacts from a tab-delimited file into Contacts on MacBook Pro, OS 10.9.5, Intel 2.4 GHz Core 2 Duo., 400GB drive, 4GB memory DDR3
So far I have:
- Followed closely the help screen in Contacts app
- Modified my source document meticulously - first in MS Word, then copied and tweaked in Apple's "Text Edit" app
- The problem arises when I go to access the document for import. Specifically, the target document, and all others in that file, are "greyed out" and thus can't be "opened" to facilitate the import process
- Tried changing the extension of the document name to ".txt", ".rtf", and ".rtd". No change or improvement.
- Searched Apple.com/help and found nothing relevant
Can anyone offer some advice or tell me what I may be overlooking in this process?
Any help will be greatly appreciated!
Thanks,
<Email Edited By Host>
Hi Rammohan,
Thanks for the effort!
But I don't need to use GUI upload because my functionality does not require to fetch data from presentation server.
Moreover, the split command advised by you contains separate fields...f1, f2, f3... and I cannot use it because I have 164 fields. I will have to split into 164 fields and assign the values back to 164 fields in the work area/header line.
Moreover I have about 10 such work areas. so the effort would be ten times the above effort! I want to avoid this! Please help!
I would be very grateful if you could provide an alternative solution.
Thanks once again,
Best Regards,
Vinod.V
Similar Messages
-
Acquire data from a tab delimited file using a popup dialog object on a stamp
I am trying to import data from a tab delimited file using a popup dialog object on a stamp. I have purchased the book by Thom Parker--All About PDF Stamps in Acrobat and Paperless Workflows and have been working through the examples in the appendix.
My problem is understanding how to bring the data into the dialog object from the file.
I don't want to plagiarize his book--so am electing at this time not to show my code. The script is reading the file, just not bringing in the records from the file so that I can select which line to import into the stamp.
I have typed in the code exactly how the book describes, but when the popup dialog object is selected, there is nothing in the drop-down. When I click OK, the first record is put on the stamp--except for the fields that I am wanting to appear in the dialog object popup box.
I have searched the forums, and also the JavaScript reference. There are examples of the popup dialog object, but none of them show how to import the data from a file--just for the items to be typed in as the list.
Any help would be greatly appreciated! i have been trying to work on this for several months now.Karl
Thank you for getting back with me!
In answer to your questions:
1. Your trusted function is not a trusted function. Did you put this
function into a folder level script so that it will get executed at system
startup?--
yes--I saved the script as a .js file and put it in the following path (I have Acrobat XI Pro for Windows)
C:\Documents and Settings\tjohnson\Application Data\Adobe\Acrobat\Privileged\11.0\JavaScripts\GetTabData.js
2. The script cannot find your tab delimited data file, or it cannot
extract the data. Did you add the data file in the correct location? The
location from the script in the book would be c:\mydata\Contacts.txt
Yes--the file is in the same path as the book.
Below is my code that references the file.
var cPath = "/c/mydata/Contacts.txt";
the slashes in the book go in the direction of the text above--should they go in the direction that you have in your question?
Also, the name and email address need to be separated by one Tab character.
They are.
3. The fields need to be named the same way as the columns in the data file (the two names are in the first line of the file).
My headings are RevByFromTab and EmailFromTab--which match the names of the two fields on the stamp.
So, check that you are not getting any errors in the JavaScript console
(Ctrl-J or Cmd-J), and verify that the tab delimited file is in the correct
location
When I run in the java script console--and I just run the script on the stamp,
it says
TypeError: event.source is null
17:Console:Exec
undefined
When I place the stamp on the page, the popup box is working, but when you click on the down arrow, there is nothing listed. When I click OK, the RevByFromTab is populated by the first item in the file, but the EmailFromTab field says undefined.
Thank you
Message was edited by: tdjohnson7700 -
How do you import multiple sets of tab delimited text into your form?
Is there an easy way to bring in form data from a text file of data values(tab delimited) with multiple instances of each variable? In my current project, I would like to bring name, address, phone, etc data from the text file for a couple hundred people into a PDF form which I create and format to my given specs. I know I can import the text and select which instance of the variable I want to populate the similarly named fields, but I was wondering if I could appropriately name or create the various fields in the form so that it would auto populate each subsequent instance of the variables with the next line of data?. In this case, I want to end up with a nicely formatted address book.
Thanks!It is possible but not just a simple import of data.
Each form field in the multiple page PDF would need a unique name not repeated on another page of the PDF. Fortunately the Acrobat form standard includes the "template" object and this object can be spawned or used to add a new page with the form fields automatically renamed with a prefix string of the page number and template added to each form field on the new page. So if one were to import a row from your tab delimited file into the template, one could then spawn a new page from the template with the data and rename the fields so there would be no conflict of like named fields.
A Lesson in Templates for Adobe Acrobat by Dave Wraight
With newer versions of Acrobat there is a mail merge feature.
Create PDFs from Word mail merges -
Program to upload data from a tab-delimited file ...
I have to upload data from a tab-delimited file with following fields into database table(ZCBU) with same fields:
CBU (parent)
KUNNR (child)
ERDAT (effective from)
MANDT (client)
SFID (salesforce ID)
AEDAT (effective to)
AENAM (assigned by).
This file can be of type PC(txt) or UNIX.
plz tell me how to do this in both type of filesHi,
DATA: bdcdata LIKE bdcdata OCCURS 0 WITH HEADER LINE.
DATA: xfile TYPE string.
DATA: BEGIN OF itab OCCURS 0,
empno TYPE zmemp-empno,
name TYPE zmemp-first_name,
last TYPE zmemp-last_name,
comp TYPE zmemp-comp,
place TYPE zmemp-place,
END OF itab.
PARAMETER : p_file TYPE rlgrap-filename OBLIGATORY.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file.
Form to get the file path of legacy data stored on presentation server
PERFORM get_file_path.
START-OF-SELECTION.
MOVE p_file TO xfile.
to get the data from excel sheet data into an internal table
PERFORM get_data.
LOOP AT itab .
REFRESH bdcdata.
PERFORM bdc_dynpro USING 'ZM_EMPLOYEE' '9001'.
PERFORM bdc_field USING 'BDC_CURSOR'
'S9001_EMPNO'.
PERFORM bdc_field USING 'BDC_OKCODE'
'=CREA'.
PERFORM bdc_field USING 'S9001_EMPNO'
itab-empno.
PERFORM bdc_dynpro USING 'ZM_EMPLOYEE' '9002'.
PERFORM bdc_field USING 'BDC_CURSOR'
'S9002_PLACE'.
PERFORM bdc_field USING 'BDC_OKCODE'
'=SAVE'.
PERFORM bdc_field USING 'S9002_EMPNO'
itab-empno.
PERFORM bdc_field USING 'S9002_FIRST_NAME'
itab-name.
PERFORM bdc_field USING 'S9002_LAST_NAME'
itab-last.
PERFORM bdc_field USING 'S9002_COMP'
itab-comp.
PERFORM bdc_field USING 'S9002_PLACE'
itab-place.
PERFORM bdc_dynpro USING 'ZM_EMPLOYEE' '9001'.
PERFORM bdc_field USING 'BDC_CURSOR'
'S9001_EMPNO'.
PERFORM bdc_field USING 'BDC_OKCODE'
'=BACK'.
CALL TRANSACTION 'ZMEMP'
USING bdcdata
UPDATE 'A'
MODE 'N'.
ENDLOOP.
Start new screen *
FORM bdc_dynpro USING program dynpro.
CLEAR bdcdata.
bdcdata-program = program.
bdcdata-dynpro = dynpro.
bdcdata-dynbegin = 'X'.
APPEND bdcdata.
ENDFORM. "BDC_DYNPRO
Insert field *
FORM bdc_field USING fnam fval.
CLEAR bdcdata.
bdcdata-fnam = fnam.
bdcdata-fval = fval.
APPEND bdcdata.
ENDFORM. "BDC_FIELD
*& Form get_file_path
FORM get_file_path .
CALL FUNCTION 'KD_GET_FILENAME_ON_F4'
CHANGING
file_name = p_file.
ENDFORM. " get_file_path
*& Form get_data
FORM get_data .
DATA : lines1 TYPE i.
MOVE p_file TO xfile.
CALL FUNCTION 'GUI_UPLOAD'
EXPORTING
filename = xfile
filetype = 'ASC'
has_field_separator = 'X'
TABLES
data_tab = itab.
DESCRIBE TABLE itab LINES lines1.
WRITE : / lines1 , 'REcords uploaded' .
ENDFORM. " get_data
Regards,
Nihar Swain, -
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. -
Import tab delimited file into pdfs
I have a tab delimited file with 1000's of rows. I want to complete a form and save it for each row. Rather than using the importData() function by itself and manually going through each record I would like to automate this so it will fill out a form for each row and save a copy of each. I have a little experience in acrobat javascript, but some knowledge of building the form and adding javascript.
You can use the doc.importTextData method to import a row of data into the form and then use the doc.extractPages method to save to a new file, clear the form, and repeat the process for each row.
importTextData: http://livedocs.adobe.com/acrobat_sdk/9.1/Acrobat9_1_HTMLHelp/JS_API_AcroJS.88.502.html
extractPages: http://livedocs.adobe.com/acrobat_sdk/9.1/Acrobat9_1_HTMLHelp/JS_API_AcroJS.88.465.html
Note that the return codes for importTextData in the documentation are wrong. The positive values should be negative and vice versa. -
Problem importing CSV or tab-delimited file into Address Book
I am trying to import a text file (tab delimited) or csv file into address book. The files are created in Excel and consist 8 columns with address info (first name, last name, street, city etc). For the sake of simplicity, the file only contains 2 records - so all in all 3 rows with data where the first row contains the headers as described above.
I am perfectly able to import the fields first name, last name using Address Book's text import feature. However, as soon as I try to map Address Book's address field (Home, work or other) to my text file's headers, the import wizard stops responding. I can still scroll through the records with the left and right error, but the record count is screwed up ("-3 of 2") and clicking the OK button doesn't result in anything.
So I am able to import the names but not the addresses - so I better rename the Address Book to Name Book
Any clue of what's going wrong?I've been wrestling with the exact same problem. I have come to a solution, though serendipitously. The address variables belong to a group say address Office.
1 - I creted a column with address Office which clued in AddressBook the the existence of the data for +address Other+ (and it assigned the columns ot the proper data)
2 - address book does have an entry of address with all group elements of same colour, normally. I reassign address other to address office
3 - I also assign address office (in right-hand column) to address office.
At this point I have two groups of address office
4 - I indicate to the second group 'do not import'
5 - Then hit OK
It seems that this loop is necessary to instantiate the proper group name to the group of variables. Why? who knows. Bad UI? Clearly. Apple engineers should've thought about it before? no kidding... -
Importing a .xls tab delimited file into number
Hi there... I downloaded a .xls document from the internet and attempted to open it in Numbers. The following import problem presented itself:
Import Warning - This is a tab delimited document, not a valid Excel document. The data might look different.
Indeed the data does look different- all of the formatting is visible, and the document is essentially unusable. Is there a way to convert this sort of document into something that can be used in Numbers?
ThanksI opened the document in Text Edit, but was unable to convert tab to commas... here is a clip from the original document when it is opened in both TextEdit and Numbers
<table border="1">
<!-- <tr><td colspan = "15" valign="middle" align="center">Date: 2/15/2008</td></tr>--> -
Import data from a Fixed Length File into Oracle database
Hi,
I would like to import data from a Fixed Length text file into a table using HTML DB application.
As of now, i have a .sql file(that uses external table) to import the data into Oracle tables
I would like to integrate this in my HTML DB application so that the user can directly import the data into the table.
Sample data
XXXYYYYZZZZZ
Data should be read to table that has
Col1 Col2 Col3
XXX YYYY ZZZZZHi,
I would like to import data from a Fixed Length text
file into a table using HTML DB application.AFAIK, fixed length imports are not something you can do directly with the HTML DB tools or available APIs.
As of now, i have a .sql file(that uses external
table) to import the data into Oracle tables
I would like to integrate this in my HTML DB
application so that the user can directly import the
data into the table.Any fixed-length data needs to have a specification associated with it that indicates which character position begins a new column and what each column represents. Some also include what datatype should be used for each of those.
If you really want to do this I would suggest that you create a table that you can store the file spec in. It would probably have columns for field name, start position, length or end position, datatype and any alias/column name you might want to apply. You would then use this table in a PL/SQL procedure (probably a package with the main processing procedure and various supporting procedures/functions) to read the file into memory, apply the file spec to each line and then do inserts into your table.
Obviously, this is just a concept or strategy. Implementing it will depend on your PL/SQL skills and determination. If you want to pursue this strategy I'm sure you can find some jump-starts by doing a search on the PL/SQL forum.
This may not sound like an answer - but the answer is you need to code it to fit your requirements. Hope that helps.
Earl -
Import data from a spreadsheet (data file) into TestStand steps
Hi,
I have some 100+ customers with different configuration data. Whenever I need to run test for a different customer, I need to update the TestStand steps in each sequence file with new values.
I'm thinking if there's a better way to simplify this, perhaps by using a spreadsheet/data file to input the data? But I have no idea how to do this?
My steps are from two sources, one type is a dotNET DLL, another type is Active X/COM (calls TestComplete software).
Any suggestion would be appreciated!
Thanks!
ph2Yes there is, make use of the PropertyLoader. Checkout the examples found in the TestStand Examples folder.
Regards
Ray Farmer -
I'm having trouble importing video from my panasonic hdc-tm900 into iPhoto.
it used to work fine (at 1080p/60) and when i plug it in to the computer it shows the older videos i have already downloaded, but not the new videos. they are all 1080/60. I'm running a new macbook pro with mavericks. i believe this is the first batch i tried to download with mavericks... i can only load the videos in one bunch ono the desktop and open them with quicktime, but can't export or import to iPhoto. curious!
What version of iPhoto do you have?
As a test launch iPhoto with the Option key held down and create a new, test library. Try to import some videos from the camera and the Desktop to test to see if the same problem persists. Does it? -
Importing data from tab delimited file
Hi everyone,
This is my first question on here so I hope I am doing the right thing.
I've searched online as much as I can to find an answer or a way to fix my problem but I have not been able to find a resolution.
My issue is I'm trying to import name and contact information from a excel file, that I have saved as a tab delimited file, into a fillable PDF file. I'm able select the text file through the import option and it shows the correct information as different rows that I can import but when I select one and click on to finish the import of the data I get an error message advising that some of the text could not be imported. The issue is nothing is being imported at all.
I've made sure that all the relevant fields are the same name as what the form has but still cannot get anything to import.
Does anyone have any ideas why this may not be working? Also I basically have no ability to write JavaScript to import the information otherwise I would look at travelling down that path.
Please let me know if I need to be any more specific.
Regards,
AdamOk I can share the form itself and will need to quickly create some data itself to go along with it
PDF Form Shared Files - Acrobat.com
Here is the tab delimited file I am trying to use (well the format anyway).
Test Data File Shared Files - Acrobat.com
Adam
Thanks Pat Willener -
Upload tab-delimited file from the application server to an internal table
Hello SAPients.
I'm using OPEN DATASET..., READ DATASET..., CLOSE DATASET to upload a file from the application server (SunOS). I'm working with SAP 4.6C. I'm trying to upload a tab-delimited file to an internal table but when I try load it the fields are not correctly separated, in fact, they are all misplaced and the table shows '#' where supposedly there was a tab.
I tried to SPLIT the line using as separator a variable with reference to CL_ABAP_CHAR_UTILITIES=>HORIZONTAL_TAB but for some reason that class doesn't exist in my system.
Do you know what I'm doing wrong? or Do you know a better method to upload a tab-delimited file into an internal table?
Thank you in advance for your help.Try:
REPORT ztest MESSAGE-ID 00.
PARAMETER: p_file LIKE rlgrap-filename OBLIGATORY.
DATA: BEGIN OF data_tab OCCURS 0,
data(4096),
END OF data_tab.
DATA: BEGIN OF vendor_file_x OCCURS 0.
* LFA1 Data
DATA: mandt LIKE bgr00-mandt,
lifnr LIKE blf00-lifnr,
anred LIKE blfa1-anred,
bahns LIKE blfa1-bahns,
bbbnr LIKE blfa1-bbbnr,
bbsnr LIKE blfa1-bbsnr,
begru LIKE blfa1-begru,
brsch LIKE blfa1-brsch,
bubkz LIKE blfa1-bubkz,
datlt LIKE blfa1-datlt,
dtams LIKE blfa1-dtams,
dtaws LIKE blfa1-dtaws,
erdat LIKE lfa1-erdat,
ernam LIKE lfa1-ernam,
esrnr LIKE blfa1-esrnr,
konzs LIKE blfa1-konzs,
ktokk LIKE lfa1-ktokk,
kunnr LIKE blfa1-kunnr,
land1 LIKE blfa1-land1,
lnrza LIKE blfa1-lnrza,
loevm LIKE blfa1-loevm,
name1 LIKE blfa1-name1,
name2 LIKE blfa1-name2,
name3 LIKE blfa1-name3,
name4 LIKE blfa1-name4,
ort01 LIKE blfa1-ort01,
ort02 LIKE blfa1-ort02,
pfach LIKE blfa1-pfach,
pstl2 LIKE blfa1-pstl2,
pstlz LIKE blfa1-pstlz,
regio LIKE blfa1-regio,
sortl LIKE blfa1-sortl,
sperr LIKE blfa1-sperr,
sperm LIKE blfa1-sperm,
spras LIKE blfa1-spras,
stcd1 LIKE blfa1-stcd1,
stcd2 LIKE blfa1-stcd2,
stkza LIKE blfa1-stkza,
stkzu LIKE blfa1-stkzu,
stras LIKE blfa1-stras,
telbx LIKE blfa1-telbx,
telf1 LIKE blfa1-telf1,
telf2 LIKE blfa1-telf2,
telfx LIKE blfa1-telfx,
teltx LIKE blfa1-teltx,
telx1 LIKE blfa1-telx1,
xcpdk LIKE lfa1-xcpdk,
xzemp LIKE blfa1-xzemp,
vbund LIKE blfa1-vbund,
fiskn LIKE blfa1-fiskn,
stceg LIKE blfa1-stceg,
stkzn LIKE blfa1-stkzn,
sperq LIKE blfa1-sperq,
adrnr LIKE lfa1-adrnr,
mcod1 LIKE lfa1-mcod1,
mcod2 LIKE lfa1-mcod2,
mcod3 LIKE lfa1-mcod3,
gbort LIKE blfa1-gbort,
gbdat LIKE blfa1-gbdat,
sexkz LIKE blfa1-sexkz,
kraus LIKE blfa1-kraus,
revdb LIKE blfa1-revdb,
qssys LIKE blfa1-qssys,
ktock LIKE blfa1-ktock,
pfort LIKE blfa1-pfort,
werks LIKE blfa1-werks,
ltsna LIKE blfa1-ltsna,
werkr LIKE blfa1-werkr,
plkal LIKE lfa1-plkal,
duefl LIKE lfa1-duefl,
txjcd LIKE blfa1-txjcd,
sperz LIKE lfa1-sperz,
scacd LIKE blfa1-scacd,
sfrgr LIKE blfa1-sfrgr,
lzone LIKE blfa1-lzone,
xlfza LIKE lfa1-xlfza,
dlgrp LIKE blfa1-dlgrp,
fityp LIKE blfa1-fityp,
stcdt LIKE blfa1-stcdt,
regss LIKE blfa1-regss,
actss LIKE blfa1-actss,
stcd3 LIKE blfa1-stcd3,
stcd4 LIKE blfa1-stcd4,
ipisp LIKE blfa1-ipisp,
taxbs LIKE blfa1-taxbs,
profs LIKE blfa1-profs,
stgdl LIKE blfa1-stgdl,
emnfr LIKE blfa1-emnfr,
lfurl LIKE blfa1-lfurl,
j_1kfrepre LIKE blfa1-j_1kfrepre,
j_1kftbus LIKE blfa1-j_1kftbus,
j_1kftind LIKE blfa1-j_1kftind,
confs LIKE lfa1-confs,
updat LIKE lfa1-updat,
uptim LIKE lfa1-uptim,
nodel LIKE blfa1-nodel.
DATA: END OF vendor_file_x.
FIELD-SYMBOLS: <field>,
<field_1>.
DATA: delim TYPE x VALUE '09'.
DATA: fld_chk(4096),
last_char,
quote_1 TYPE i,
quote_2 TYPE i,
fld_lth TYPE i,
columns TYPE i,
field_end TYPE i,
outp_rec TYPE i,
extras(3) TYPE c VALUE '.,"',
mixed_no(14) TYPE c VALUE '1234567890-.,"'.
OPEN DATASET p_file FOR INPUT.
DO.
READ DATASET p_file INTO data_tab-data.
IF sy-subrc = 0.
APPEND data_tab.
ELSE.
EXIT.
ENDIF.
ENDDO.
* count columns in output structure
DO.
ASSIGN COMPONENT sy-index OF STRUCTURE vendor_file_x TO <field>.
IF sy-subrc <> 0.
EXIT.
ENDIF.
columns = sy-index.
ENDDO.
* Assign elements of input file to internal table
CLEAR vendor_file_x.
IF columns > 0.
LOOP AT data_tab.
DO columns TIMES.
ASSIGN space TO <field>.
ASSIGN space TO <field_1>.
ASSIGN COMPONENT sy-index OF STRUCTURE vendor_file_x TO <field>.
SEARCH data_tab-data FOR delim.
IF sy-fdpos > 0.
field_end = sy-fdpos + 1.
ASSIGN data_tab-data(sy-fdpos) TO <field_1>.
* Check that numeric fields don't contain any embedded " or ,
IF <field_1> CO mixed_no AND
<field_1> CA extras.
TRANSLATE <field_1> USING '" , '.
CONDENSE <field_1> NO-GAPS.
ENDIF.
* If first and last characters are '"', remove both.
fld_chk = <field_1>.
IF NOT fld_chk IS INITIAL.
fld_lth = strlen( fld_chk ) - 1.
MOVE fld_chk+fld_lth(1) TO last_char.
IF fld_chk(1) = '"' AND
last_char = '"'.
MOVE space TO fld_chk+fld_lth(1).
SHIFT fld_chk.
MOVE fld_chk TO <field_1>.
ENDIF. " for if fld_chk(1)=" & last_char="
ENDIF. " for if not fld_chk is initial
* Replace "" with "
DO.
IF fld_chk CS '""'.
quote_1 = sy-fdpos.
quote_2 = sy-fdpos + 1.
MOVE fld_chk+quote_2 TO fld_chk+quote_1.
ELSE.
MOVE fld_chk TO <field_1>.
EXIT.
ENDIF.
ENDDO.
<field> = <field_1>.
ELSE.
field_end = 1.
ENDIF.
SHIFT data_tab-data LEFT BY field_end PLACES.
ENDDO.
APPEND vendor_file_x.
CLEAR vendor_file_x.
ENDLOOP.
ENDIF.
CLEAR data_tab.
REFRESH data_tab.
FREE data_tab.
Rob -
How to convert Mail attachment file Tab Delimited file to XML.
Hi PI Experts
I have XI scenario: MAIL XI SAP (ABAP Proxy), the process is
1. XI will receive tab delimited file as attachment in mail.
2. XI will convert the tab delimited file into XML, then map to the target structure.
3. Target will be posted into ECC through ABAP Proxy.
Can anyone help me how can I convert the attachment file (i.e. Tab delimited file) to XML while configuring the sender side.
Thanks in AdvanceI just grabed what I answered from another thread. It should work.
Processing sequence as follows:
1. localejbs/AF_Modules/PayloadSwapBean Local Enterprise Bean swap1
2. localejbs/AF_Modules/MessageTransformBean Local Enterprise Bean tran1
3. sap.com/com.sap.aii.adapter.mail.app/XIMailAdapterBean Local Enterprise Bean mail
Module Configuration as follows: Fill the XXXX part with your info.
swap1 swap.keyName payload-name
swap1 swap.keyValue MailAttachment-1
tran1 Transform.Class com.sap.aii.messaging.adapter.Conversion
tran1 Transform.ContentType ext/xml;charset=utf-8
tran1 xml.conversionType SimplePlain2XML
tran1 xml.documentName XXXXXXX_Mail
tran1 xml.documentNamespace http://XXXXX.com.au/XXXX
tran1 xml.fieldSeparator \t
tran1 xml.processFieldNames fromConfiguration
tran1 xml.structureTitle rows
Once you set up the above configuration, you will get one record at a time.
Create a souce message interface like the followings:
XXXXXXXXX_Mail
rows
record
Target message interface:
XXXXXXXXX
rows
field 1
field 2
field 3
Write a UDF function to remove the TAB space
public removeTABSpace(String record,Container container){
//write your code here
StringTokenizer st = new StringTokenizer(record,"\t",false);
String t="";
while (st.hasMoreElements()) t += st.nextElement();
return t;
Write another UDF to get the field 1 for example:
public String getField1(String input,Container container){
int counter=0;
int beginIndex=0;
int endIndex=0;
int i;
for (i=0;i<input.length();i++){
if (input.charAt(i)==34){
counter=counter+1;
if (counter==1){
beginIndex=i+1;
counter=0;
break;
for (i=0;i<input.length();i++){
if (input.charAt(i)==34){
counter=counter+1;
if (counter==2){
endIndex=i;
counter=0;
break;
input=input.substring(beginIndex,endIndex);
return input;
Get the mapping like the followings:
record - removeTABSpace - getField1 - field 1
If you need to get field 2, you will need to write another UDF similar to the above one to handle it. -
Hiall,
I filled an internal table with the data from a tab delimited file (trought the FM FTP_TOR3).
All my date is in the internal table, but I want to split it now. I tried with the '#' (as ALT + 3), but he doesn 't split the line.
I'm on 4.6, so I cannot use the horizontal_tab as splitterWhile I was searching on this forum on unicode-characters (had a feeling it was something like this), I found a post with practicly the same problem (but with a somewhat bizarre title ), there they told me to use this :
data : c_tab type x value '09'.
as splitter. Apparently, it has something to do with Unix unicode, and the windows # differs from the Unix #.
Problem solved, thanks for the help
(awarded you 10 points for the help )
kr
Björn
Maybe you are looking for
-
Printing items in a folder problem - help
Ok, I've created a workflow that basically goes like this: Get specified items Get folder contents Filter contents for text files Print text files Move text files to somewhere else I then save it as a folder action plug in and assign it to a specific
-
It isnt only an issue with youtube, which makes me think that it is a safari problem. whenever i want to see any videos online, the place where they should be on the page is just blank. also, i keep "installing" a flash player, but it keeps telling m
-
HT201364 why, i cannot get the free upgrade for mavericks
in app store there is a message on update tab: os x mavericks and there is a button with the message "free upgrade", but when i pushed that button there is a message that "We could not complete your purchase. The product distribution file could not b
-
Need quick response if possible please (pop/clicks throughout project)
i've made many cd's with waveburner. i've imported regular 16bit tracks and created an order the cd. The cd's are nothing fancy just a few earlier fades than the original audio track...changing gaps to 1 sec instead of 2 sec. Then bounced the project
-
I have an old mac and wish to install an iphoto program. The app store only offers me the latest version of iphoto, but I think the mac can only support iphoto 5. Any suggestions on where I can get iphoto 5?