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 Advance
I 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.
Similar Messages
-
Attaching a tab delimited file to mail
Hi,
I have to attach a tab delimited file to a mail and sent it using Function Module 'SO_DOCUMENT_SEND_API1'.
I have filled in the following details but i am not sure about what should be given for 'lt_packing_list-doc_type'. Should it be a 'TXT 'or any other file format. Some one has suggested me a 'CSV' but i guess for that the data should be separated by a comma and i need a tab delimited file.
Please suggest me what needs to be done.
Thank you,
Taher
DATA:
con_tab TYPE c VALUE cl_abap_char_utilities=>horizontal_tab,
con_cret TYPE c VALUE cl_abap_char_utilities=>cr_lf.
LOOP AT gt_output INTO ls_output.
CONCATENATE ls_output-email
ls_output-pos
ls_output-txt
ls_output-func
ls_output-mail
INTO gt_attach SEPARATED BY con_tab.
CONCATENATE con_cret gt_attach INTO gt_attach.
CONDENSE gt_attach.
APPEND gt_attach.
* Fill the document data.
lv_xdocdata-doc_size = 1.
* Populate the subject/generic message attributes
lv_xdocdata-obj_langu = sy-langu.
lv_xdocdata-obj_name = 'SAPRPT'.
lv_xdocdata-obj_descr = 'Report' .
* Fill the document data and get size of attachment
CLEAR lv_xdocdata.
READ TABLE gt_attach INDEX lv_xcnt.
lv_xdocdata-doc_size =
( lv_xcnt - 1 ) * 255 + STRLEN( gt_attach ).
lv_xdocdata-obj_langu = sy-langu.
lv_xdocdata-obj_name = 'SAPRPT'.
lv_xdocdata-obj_descr = ' Report'.
CLEAR lt_attachment. REFRESH lt_attachment.
lt_attachment[] = gt_attach[].
* Describe the body of the message
CLEAR lt_packing_list. REFRESH lt_packing_list.
lt_packing_list-transf_bin = space.
lt_packing_list-head_start = 1.
lt_packing_list-head_num = 0. lt_packing_list-body_start = 1.
DESCRIBE TABLE lt_message LINES lt_packing_list-body_num.
lt_packing_list-doc_type = 'RAW'.
APPEND lt_packing_list.
* Create attachment notification
lt_packing_list-transf_bin = 'X'.
lt_packing_list-head_start = 1.
lt_packing_list-head_num = 1.
lt_packing_list-body_start = 1.
DESCRIBE TABLE lt_attachment LINES lt_packing_list-body_num.
lt_packing_list-doc_type = ?????. "TXT or any other format
lt_packing_list-obj_descr = 'Report'.
lt_packing_list-obj_name = 'Report'.
lt_packing_list-doc_size = lt_packing_list-body_num * 255.
APPEND lt_packing_list.
* Add the recipients email address
LOOP AT gt_receivers INTO ls_receivers.
CLEAR lt_receivers.
lt_receivers-receiver = ls_receivers.
lt_receivers-rec_type = 'U'.
lt_receivers-com_type = 'INT'.
APPEND lt_receivers.
ENDLOOP.Hi Taher,
Which table you populate your data to (CONTENTS_BIN,CONTENTS_TXT,CONTENTS_HEX) ?.
As both the message and attachment reside one table (contents_txt) in it_packing_list body of message should start with 1 line, but of an attachment when body of message ends. This is:
* Describe the body of the message
CLEAR lt_packing_list. REFRESH lt_packing_list.
lt_packing_list-transf_bin = space.
lt_packing_list-head_start = 1.
lt_packing_list-head_num = 0. lt_packing_list-body_start = 1.
DESCRIBE TABLE lt_message LINES lt_packing_list-body_num.
lt_packing_list-doc_type = 'RAW'.
APPEND lt_packing_list.
* Create attachment notification
lt_packing_list-transf_bin = 'X'.
lt_packing_list-head_start = 1.
lt_packing_list-head_num = 1.
lt_packing_list-body_start = "start of attachemnt with next line after body of message
Next thing is what I appointed before. Both should be passed as ASCII so in both lt_packing_list-transf_bin = space.
Please see my code.
CONSTANTS: con_cret(2) type c VALUE cl_abap_char_utilities=>cr_lf,
con_tab(2) TYPE c VALUE cl_abap_char_utilities=>horizontal_tab.
DATA: doc_attr TYPE sodocchgi1,
it_packing_list TYPE TABLE OF sopcklsti1 WITH HEADER LINE,
it_message TYPE TABLE OF solisti1 WITH HEADER LINE,
it_attachment TYPE TABLE OF solisti1 WITH HEADER LINE,
it_txt TYPE TABLE OF solisti1 WITH HEADER LINE,
it_receivers TYPE TABLE OF somlreci1 WITH HEADER LINE.
"Document attributes
doc_attr-obj_name = 'EXT_MAIL'.
doc_attr-obj_descr = 'External test mail'. "title
doc_attr-obj_langu = sy-langu.
doc_attr-sensitivty = 'F'. "functional message
"Message in ASCII (txt) format
APPEND 'This is body message' TO it_message. "message is from 1 to 2
APPEND 'and second line for message.' TO it_message.
APPEND LINES OF it_message TO it_txt.
"Determine how data are distrtibuted to document and attachment
"First line in it_packing describes message body
it_packing_list-transf_bin = space. "ASCII format
it_packing_list-body_start = 1. "message body starts from 1st line
DESCRIBE TABLE it_message LINES it_packing_list-body_num. "lines in it_txt table for message body
it_packing_list-doc_type = 'RAW'.
APPEND it_packing_list.
"Attachment in ASCII (txt) format
CONCATENATE '1first' 'second' 'third' 'fourth' into it_attachment SEPARATED BY con_tab. "first line
CONCATENATE con_cret it_attachment.
APPEND it_attachment.
CONCATENATE '2first' 'second' 'third' 'fourth' into it_attachment SEPARATED BY con_tab. "second line
CONCATENATE it_attachment con_cret into it_attachment.
APPEND it_attachment.
APPEND LINES OF it_attachment TO it_txt.
"Further lines in it_packing describe attachment
CLEAR it_packing_list.
it_packing_list-transf_bin = space. "ASCII format
it_packing_list-body_start = 3.
DESCRIBE TABLE it_attachment LINES it_packing_list-body_num.
it_packing_list-doc_type = 'txt'.
it_packing_list-obj_name = 'Test attachment'.
it_packing_list-obj_descr = 'Title of an attachment'.
it_packing_list-obj_langu = sy-langu.
"size od attachment = length of last line + all remaining lines * 255
READ TABLE it_attachment INDEX it_packing_list-body_num.
it_packing_list-doc_size = STRLEN( it_attachment ) + 255 * ( it_packing_list-body_num - 1 ).
APPEND it_packing_list.
"Receivers
it_receivers-receiver = "some mail address.
it_receivers-rec_type = 'U'. "internet address
it_receivers-com_type = 'INT'. "send via internet
APPEND it_receivers.
CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
EXPORTING
document_data = doc_attr
put_in_outbox = 'X'
commit_work = 'X'
* IMPORTING
* SENT_TO_ALL =
* NEW_OBJECT_ID =
TABLES
packing_list = it_packing_list
* OBJECT_HEADER =
* CONTENTS_BIN =
contents_txt = it_txt
* CONTENTS_HEX =
* OBJECT_PARA =
* OBJECT_PARB =
receivers = it_receivers.
* EXCEPTIONS
* TOO_MANY_RECEIVERS = 1
* DOCUMENT_NOT_SENT = 2
* DOCUMENT_TYPE_NOT_EXIST = 3
* OPERATION_NO_AUTHORIZATION = 4
* PARAMETER_ERROR = 5
* X_ERROR = 6
* ENQUEUE_ERROR = 7
* OTHERS = 8
IF sy-subrc = 0.
WAIT UP TO 2 SECONDS.
SUBMIT rsconn01 WITH mode = 'INT'
* WITH ouput = 'X'
AND RETURN.
ENDIF.
I am using SO01 t-code to see the document and attachemnt.
I am sure when you get rid of the differences with the codes you will get desired result.
Regards
Marcin -
Tab delimited file on app server. How to do that?
Hello,
When i transfer a tab delimited file from pre. server(windows) to app. server(windows) using CG3Z , the tab delimitation is not working.
for eg : the file with below layout
01.04.2007 31.03.2008 1 120
01.05.2007 31.07.2008 2 140
is getting changed like
01.04.2007#31.03.2008#1#120
01.05.2007#31.07.2008#2#140
All i need is a tab delimited file in app server also . Wats that i need to do for this ? Also how can i write a tab delimited file on app server through my program using open dataset.
Thanks for ur time.
Jeeva.Hi..
Check this code: you will find the solution:
Using the Static Attribute <b>CL_ABAP_CHAR_UTILITIES=>HORIZONTAL_TAB</b>
Example:
This is the Simple way you can download the ITAB with Tab delimiter:
DATA : V_REC(200).
OPEN DATASET P_FILE FOR OUTPUT IN TEXT MODE ENCODING DEFAULT.
LOOP AT ITAB INTO WA.
Concatenate WA-FIELD1 WA-FIELD2
INTO V_REC
SEPARATED BY CL_ABAP_CHAR_UTILITIES=>HORIZONTAL_TAB.
TRANSFER V_REC TO P_FILE.
ENDLOOP.
CLOSE DATASET P_FILE.
Note: if there are any Numeric fields ( Type I, P, F) In your ITAB then before CONCATENATE you have to Move them to Char fields ..
Reward if Helpful.
Example:
DATA: V_RECORD(200).
OPEN DATASET P_FILE FOR INPUT IN TEXT MODE ENCODING DEFAULT.
IF SY-SUBRC <> 0.
EXIT.
ENDIF.
DO.
READ DATASET P_FILE INTO V_RECORD.
IF SY-SUBRC NE 0.
EXIT.
ENDIF.
SPLIT V_Record at CL_ABAP_CHAR_UTILITIES=>HORIZONTAL_TAB
INTO WA-FIELD1 WA-FIELD2.
APPEND WA TO ITAB.
ENDDO.
<b>reward if Helpful.</b> -
How to extract a tab delimiter file on appli server in openhub destination
Hi All,
in my scenario i want download a file on application server in tab delimiter file where iam not able to do it.while creating OHD iam selecting seperator feild has ';'(semicolan).tab delimiter fule format is not posible with semicolan and even i tried it with "comma" also but not getting the tab delimiter formate.please help how to get that particular format..
thanks
vamshi..Hi Dashyam,
May help you:----
with comma delimiter file read
I want to download comma delimiter file on to presentation server from inte
http://wiki.sdn.sap.com/wiki/display/ABAP/UploadaCommaDelimitedCSVfilethatcontainscommasindata+fields
Regards,
Suman -
How to Convert iTunes Songs (Apple lossless audio file) to a MP3 for E-mail
How to Convert iTunes Songs (Apple lossless audio file) to a MP3 for E-mail?
My computer is Windows 7 and my Itunes software version is 1.0.2
Many thanks in advance...iTunes 1.0.2 is +at least+ eight years old.
The current version is 9.2, and it's free.
If that was a typo, and you're using something more current:
In the iTunes preferences, change the import settings to mp3.
Then select the songs you wish to convert.
From the "Advanced" menu, choose "Create mp3 version".
When done, change the import settings back to Apple Lossless.
That's it.
BTW, this is the Logic Pro forum, which has absolutely nothing to do with iTunes. -
How to generate a tab delimited file in 4.6C
Hi ,
I have to genarate a tab delimited file in 4.6C version. I am concatenating all fields of internal table into one text line and passing that to file.How to give tab in <b>"concatenate"</b> statement under <b>"separated by "</b>. Please suggest.
Thanks,
sam.Hello Sam,
CONSTANTS: CON_TAB TYPE X VALUE '09'.
CONCATENATE G_T_OUTTAB-VBELN
G_T_OUTTAB-POSNR
G_T_OUTTAB-VKBUR
L_F_POSID
G_T_OUTTAB-BSTKD
L_F_NETWR
L_F_ERDAT_OR
L_F_ERDAT_IN
G_T_OUTTAB-VBELN_IN
L_F_ERDAT_DE
G_T_OUTTAB-VBELN_DE
INTO OUTPUT
SEPARATED BY CON_TAB.
Vasanth -
How can I save a Numbers spreadsheet as a tab delimited file?
Okay, I would like to save a Numbers spreadsheet as a tab delimited file. But of course I can't do that, since Numbers only saves as a comma separated values file.
Plan B: I can open up a CSV file created by Numbers in TextEdit, and I would like to Find and Replace all the commas with tabs. So I open up the Find window, enter a comma under Find, but of course when I put the cursor in the Replace blank and hit the Tab key, it just goes to the next blank instead of giving me a Tab.
Is there a way I can get a Tab into that blank so I can replace all the commas with tabs?
--DaveHello
When we use TextEdit as I described, rows are separated by Returns.
It appears that your program requires LineFeeds.
Here is a neat soluce.
Save this script as an Application Bundle.
--\[SCRIPT tsv2csv]
(* copy to the clipboard a block of datas separated by tabs
run the script
You will get on the desktop a csv file named from the current date-time.
The values separator is set to match the Bento's requirements:
If the decimal separator is period, the script uses commas.
If the decimal separator is comma, the script uses semi-colons.
This may be changed thru the setting of the property maybeSemiColon.
According to the property needLF,
embedded Returns will be replaced by LineFeeds
or
embedded LineFeeds will be replaced by Returns
Yvan KOENIG (Vallauris, FRANCE)
le 10 octobre 2008
property needLF : true
(* true = replace Returns by LineFeeds
false = replace LineFeeds by Returns *)
property maybeSemicolon : true
(* true = use semiColons if decimal separator is comma
false = always uses commas *)
--=====
try
set |données| to the clipboard as text
on error
error "the clipboard doesn't contain text datas !"
end try
set line_feed to ASCII character 10
if |données| contains tab then
if maybeSemicolon then
if character 2 of (0.5 as text) is "," then
set |données| to my remplace(|données|, tab, quote & ";" & quote)
else
set |données| to my remplace(|données|, tab, quote & "," & quote)
end if -- character 2 of (0.5…
else
set |données| to my remplace(|données|, tab, quote & "," & quote)
end if -- maybeSemiColon
end if -- |données| contains tab
if needLF then
if |données| contains return then set |données| to my remplace(|données|, return, line_feed)
set |données| to my remplace(|données|, line_feed, quote & line_feed & quote)
else
if |données| contains line_feed then set |données| to my remplace(|données|, line_feed, return)
|données| to my remplace(|données|, return, quote & return & quote)
end if -- needLF
set |données| to quote & |données| & quote
set p2d to path to desktop as text
set nom to my remplace(((current date) as text) & ".csv", ":", "-") (* unique name *)
tell application "System Events" to make new file at end of folder p2d with properties {name:nom}
write |données| to file (p2d & nom)
--=====
on remplace(t, tid1, tid2)
local l
set AppleScript's text item delimiters to tid1
set l to text items of t
set AppleScript's text item delimiters to tid2
set t to l as text
set AppleScript's text item delimiters to ""
return t
end remplace
--=====
--[/SCRIPT]
Yvan KOENIG (from FRANCE vendredi 10 octobre 2008 13:47:36) -
Handling Tab Delimited File generation in non-unicode for multi byte lang
Hi,
Requirement:
We are generating a Tab Delimited File in different languages (Single Byte and Multi Byte) and placing the files at application server.
Problem:
Our system is a Non-unicode system so we are facing problems with generation of Tab delimited file for multibyte languages like Russian, Japanese, Chinese etc.,
I am actually using data: d_tab TYPE X value '09' but it dont work for multi byte. I cant see tab delimited file at application server path.
Any thoughts about how to proceed on this issue?Please let me know.
Thanks & Regards,
Pavan>
Pavan Ravikanti wrote:
> Thanks for your answer but do you reckon cl_abap_char_utilities will be a work around for data: d_tab type X VALUE '09' .
> Pavan.
On a non-unicode system the X Variant is working, but not on a unicode system. Here you must use the class. On the other hand you can use the class on a non-unicode system und your char var will always be correct (one byte/twobyte depending on which system your report is running).
What you are planning to do is to put a file with an amount of possible characters into a system with has a less amount of characters. Thats not working in no way.
What you can do is to build up a multi-code-page system where the codepage is bound to the user or bound to the logon-language. Here you you can read and process textfiles in several codepages - but not a textfile in unicode. You have to convert the unioce textfile into a non-unicode textfile before processing it.
Remember that SAP does not support multi-code-page Systems anymore and multi-code-page systems will result in much more work when converting the system to unicode.
Even non-unicode system will not be maintained by SAP in the near future.
What you encounter here are problems for what unicode was developped. A unicode system can handle non-unicode textfiles, but the other way round will always lead to problems which cant be solved. -
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 -
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 -
Hi All,
I am trying to create a tab delimited file using Sender File adapter using <b>File content Conversion in Adapter Module</b>. I want a constant space beteween the fields of length 8 spaces. When i use ' ' as field seperater , the file that is generated is <b>19' 'Stringtest14,Hiring' '09/03/2007' 'Managing Dir, Operations</b>. I want the file without colons i.e <b>19 Stringtest14,Hiring' 09/03/2007 Managing Dir, Operations</b>.
Please Advice...
Regards,
XIerHi Xler
<b>content conversion parameters ,, just like</b>
Recordset structure = DT_PRY,*
DT_PRY.fieldnames = ID,empname,empno,country
DT_PRY.fieldSeparator = '0x09' (tab delimited)
DT_PRY.endSeparator = 'nl'
<b>
The FCC...</b>
Document Name : MT_PRY
Document Namespace : http://product.com/prvsoup
Recordset Name : recordset
Recordset structure = DT_PRY,*
DT_PRY.fieldnames = ID,empname,empno,country
DT_PRY.fieldSeparator = '0x09'
DT_PRY.endSeparator = 'nl'
ignoreRecordsetName = true
http://help.sap.com/saphelp_nw04/helpdata/en/14/80243b4a66ae0ce10000000a11402f/frameset.htm
<b>can take the help of this blog</b>
/people/shabarish.vijayakumar/blog/2005/08/17/nab-the-tab-file-adapter
<b>Conversion agent</b>
/people/william.li/blog/2006/03/17/how-to-get-started-using-conversion-agent-from-itemfield
/people/paul.medaille/blog/2005/11/18/conversion-agent-a-free-lunch
/people/alexander.bundschuh/blog/2006/03/14/integrate-sap-conversion-agent-by-itemfield-with-sap-xi
/people/paul.medaille/blog/2005/11/17/more-on-the-sap-conversion-agent-by-itemfield
Thanks!
Questions are welcome here!!
<b>Also mark helpful answers by rewarding points</b>
Regards
Abhishek Agrahari -
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. -
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 -
Opening a tab-delimited file in numbers
Hello,
I have a tab-delimited file with the extension .srt to open in Numbers. I can do this easily in Microsoft Excel by going to the Open menu. It then gives me the option to say how the file is delimited and then it opens it. I can't seem to do this in Numbers... When I get to the Open menu and try to open the file, it is grayed out, so unaccessible... how does one do this in Mac?
ThanksAs was explained here many times, Numbers may open csv files if :
(1) the file name ends with ".csv"
(2) values are separated by commas if the decimal char in use on the machine is the period
values are separated by semi-colons if the decimal char in use on the machine is the comma.
(3) we have no way to change the values separator.
Yvan KOENIG (VALLAURIS, France) samedi 18 juin 2011 20:50:54
iMac 21”5, i7, 2.8 GHz, 4 Gbytes, 1 Tbytes, mac OS X 10.6.7
Please : Search for questions similar to your own before submitting them to the community
To be the AW6 successor, iWork MUST integrate a TRUE DB, not a list organizer !
Maybe you are looking for
-
I count on using the Firefox restore session feature. But it's stopped working. For the past couple of days, it hasn't worked a single time. (I haven't changed anything on my PC.) It just suddenly stopped working. Now it gives me an error message tha
-
i have mac 10.6.8 and safari 5.1.10. on checking help website i am told latest flash player 16.0.0.305 is already installed BUT does not appear on my list of applications and am unable to access websites requiring it. have also downloaded flash playe
-
Hi SAP Experts, we are using the 1099 report S_P00_07000134 currently for vendor reporting. we have a requirement to report even rebate customers for 1099 now. Can you please explain the steps to config and tips to run the report S_P00_07000134 for b
-
Infotype 105 usage in Concurrent Employment environments
Hi, experts - The University of Cincinnati uses concurrent employment, and we are currently experiencing problems with ESS when an employee switches primary assignments. After the infotype 712 update, the employee is unable to log in to ESS. When we
-
Hi, I would like to know how to get the current time (07H25 for instance). Does someone know how to do it ? Thanks in advance, Fred.