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
Similar Messages
-
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 create a TAB Delimited file with blank columns
Hi,
In my requirement i want to generate a tab delimated file. So i used FCC in Reciever CC and am able to create a tab delimated file. But the file content is not in the format i am expecting. File created as shown below.
Eid First Name Middle Name Last name
7 raj reddy petter
8 ram johnson
Here 'Johnson' is last name of 'ram', But it displayed under the 'Middle name' column, as the employee does not have the middle name.
But i want file in the format shown below.
Eid First Name Middle Name Last name
7 raj reddy petter
8 ram johnson
Please suggest me what i need to do to generate the file in the required format.
Thanks in Advance..
Regards
SreeniHi,
You can handle this in mapping. just pur a condition for all the fields(middle name, last name) if missing like
field---
equalS-----If then----Constant(Space)-----Target field ---else----Field-----Target Field.
Constant(blank)
Thanks! -
How to upload a TAB Delimited file and pls tell me the internal tble format
Hello All,
When i upload a TAB Delimited .txt file its giving me # Symbols in between the internal table fields.
pls advise.
Sureshdata: begin of wa_input,
plnnr(8) type c,
plnal(2) type c,
vornr(4) type c,
arbpl(8) type c,
steus(4) type c,
ltxa1(40) type c,
ltext(1000) type c,
end of wa_input.
data: i_input like wa_input occurs 0 with header line.
call function 'WS_UPLOAD'
exporting
filename = p_input " file path
filentype = 'DAT'
tables
data_tab = i_input
exceptions
file_open_error = 1
file_write_error = 2
invalid_filesize = 3
invalid_table_width = 4
invalid_type = 5
no_batch = 6
unknown_error = 7. -
Generating tab delimited file on presentation server
Hi All,
I have to generate a tab delimited file on presentation server. The file shouldn't have '#' as separator. Instead it should be separated by TAB (when you press TAB button, some spaces will come naa... like that) ' '. Please advice me how to do this...
Thanks in Advance,
Regards,
PhaniHi,
Check this example..
DATA: BEGIN OF itab OCCURS 0,
matnr TYPE matnr,
werks TYPE werks_d,
END OF itab.
itab-matnr = 'ABC'.
itab-werks = 'ASDF'.
APPEND itab.
itab-matnr = 'EFG'.
itab-werks = 'DHIS'.
APPEND itab.
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
filename = 'C:\test.txt'
write_field_separator = 'X'
TABLES
data_tab = itab
EXCEPTIONS
file_write_error = 1
no_batch = 2
gui_refuse_filetransfer = 3
invalid_type = 4
no_authority = 5
unknown_error = 6
header_not_allowed = 7
separator_not_allowed = 8
filesize_not_allowed = 9
header_too_long = 10
dp_error_create = 11
dp_error_send = 12
dp_error_write = 13
unknown_dp_error = 14
access_denied = 15
dp_out_of_memory = 16
disk_full = 17
dp_timeout = 18
file_not_found = 19
dataprovider_exception = 20
control_flush_error = 21
OTHERS = 22.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ELSE.
MESSAGE s208(00) WITH 'File downloaded'.
ENDIF.
Thanks,
Naren -
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. -
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 -
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 -
DMEE tab-delimited file required
Dear Experts
with trx DMEE you define file formats to be used as payment medium
on screen 'format attributes' you indicate if fields have a fixed length or are delimited with a character
what to do when you want to have a tab-delimited file?
Regards BenHi, 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,
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 -
Tab Delimited File Using Receiver FCC
Hi Experts,
I need to generate a Tab Delimited File Using Receiver FCC. I have achieved the same by copying the tab length from a notepad and used the same in name.fieldSeparator parameter.
The other below mentioned values for name.fieldSeparator didnu2019t produce the expected result:
name.fieldSeparator=u2019htu2019
name.fieldSeparator=u2019\tu2019
name.fieldSeparator=u2019 0x09u2019
So just need to know if my approach for achieving this is fine or not.
Thanking you in advance.
Aditya.Verma,
name.fieldSeparator=u2019 0x09u2019
I see a space after the first comma. Try removing it and give a try.
'0x09' with no spaces.
Regards,
---Satish -
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. -
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 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) -
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
Maybe you are looking for
-
I upgraded my Dell computer from Vista to Windows 7. I saved my iTunes library on an external hard drive. I somehow managed to erase them from my iPod. Now my songs won't play on the Dell and my iPod is not "recognized" as a device by my computer.
-
E1200 stops serving DHCP all of a Sudden (affects both wireless and wired)
Greetings All, I have a 2 year E1200 router that has given me very good service uptil now. Now, it appears to suddenly stop serving DHCP at least once daily. This results in a situation where all my devices (3 over wifi, 2 directly wired) suddenly a
-
SVG line chart raises ORA-20001 witha valid SQL query
Hi, I am on version 1.6 & 10g database. I developed an SVG line chart which was working fine, but I wanted to fill in some sparse data by using data densification. So I enhanced my query with a partitioned outer join as follows: select null l, month_
-
Hi! I want to make a Java Fighting Game and I'm not even close to sure about how to do collision detection...if I could get any help (tutorials, examples, etc) it'd be a big help....thank you.
-
OS X Mail - Always reply from the account mail was receive by.
I have three email accounts: A, B, and C. Suppose I get email addressed to account A. When I reply to that email, I obviously want to send the reply from the same account, namely A. However Mail chooses to reply to mail sent to A from account B, i