FCC in line feed data.
Hi Friends,
In my scenario we are using FCC on the sender side of file adapter.
The main problem is the file is coming in the form of single line.
Example: HeaderData1Data2Data3ItemData1Data2Data3ItemData1Data2Data3ItemData1Data2Data3FooterData
To over come this I tried with the endSeparator as '0X00'.
But not working.
Can some one suggest with some inputs.
Thanks in advance.
Jeevan.
Hi,
Give input file format and field structure so that we can design accordingly. Most of the time use fieldFixedLengths statement to divide columns and meanwhile mention fieldSeparator & endSeparator statement. Your problem will be sortout easily.
Edited by: NALLAM GUNA RANJAN on Feb 4, 2009 10:15 AM
Edited by: NALLAM GUNA RANJAN on Feb 4, 2009 10:16 AM
Similar Messages
-
How do we remove Carriage Return (line feed) inserted in FCC files
Hi Experts,
The file that we generate has a carriage return at the end.
Is there any way in which we can remove this carriage return (line feed) from the file?
The FCC parameters used at our end are as below:
structure.filedNames:
structure.fieldFixedLengths:
structure.fixedLengthTooShortHandling: Cut
Kindly tell us a solution ASAP.
Thanks & Regards
DhwaniDear All,
Let me elaborate on my query
Consider that the files output looks like below:
12 34 45 545 5454 UL
23 33 43 434 4545 FG
45 44 44 586 6535 GM
Now there is an extra line(Carriage Return) getting inserted after the last line 45 44 44 586 6535 GM which is not required at our end.
The cursor of the file instead of stopping on the last character M, points to the next line.
Can you please suggest how to remove this extra line from the files.
I dont understan how will remove context help in this case.
Regards
Dhwani -
How can an external table handle data with line feed between delimiters?
I have defined an external table as below. My data is pipe delimited and comes from a DOS system.
I already remove any carriage returns before putting the file into the DATA_DIR for reading. But
I have found that some of my VARCHAR fields have embeded line feeds.
Is it possible to have a definition that would remove any line feed characters between the delimiters?
Below I also threw together a sample data set there ID #2 has that extra character. Yes, I could
write an awk script to pre-process all my data files. But I am hoping there is a way for Oracle
to also do this.
I understand the LDTRIM to remove any leading and trailing spaces in the delimited field. Is there a
REPLACE or TRANSLATE option. I did a bit of searching but I must be asking the wrong things.
Thanks for any help
Eric
CREATE TABLE table_ext
id NUMBER,
desc1 VARCHAR2(64 CHAR),
desc2 VARCHAR2(255 CHAR),
add_date DATE
ORGANIZATION EXTERNAL
TYPE ORACLE_LOADER
DEFAULT DIRECTORY data_dir
ACCESS PARAMETERS
RECORDS DELIMITED BY NEWLINE
CHARACTERSET WE8ISO8859P1
BADFILE log_dir:'table_ext.bad'
DISCARDFILE log_dir:'table_ext.dis'
LOGFILE log_dir:'table_ext.log'
FIELDS TERMINATED BY '|' LDRTRIM
MISSING FIELD VALUES ARE NULL
id INTEGER EXTERNAL(38),
desc1 CHAR(64),
desc2 CHAR(255),
add_date CHAR DATE_FORMAT DATE MASK "yyyy-mm-dd hh24:mi",
LOCATION( 'data.txt' )
PARALLEL
REJECT LIMIT UNLIMITED;
1|short desc|long desc|2001-01-01 00:00
2|short desc| long
desc |1999-03-03 23:23
3|short desc| long desc | 2011-02-02 02:02Thanks for looking. But that relates to the record delimiter which in my case is the pipe character '|'. In my various data sets this is consistent. I expect each record to be one per line. But between two delimiters some data has a line feed. So I'm looking for a method that will "cleanup" the field data as it gets imported.
I was hoping there was an option that would ignore any embedded line feeds (\n) characters. I.e., those not at the end of the line.
Eric -
Hello friends
In a particular application, it is required to print a single line of data on a dot matrix printer (continuous sheets) at a frequency of 30 seconds. That is printing is to be carried out line-by-line on the same form without a form feed.
We are facing a problem of a form feed after printing of each line. Kindly help me to solve this problem of auto form-feed. How to continuously print at a regular interval without from-feeding.
Shahid BaigIs this printer connected to a network?
You may need to look at the printer manual to see if there is a setting for a form feed. I remember when we had a dot matrix printer on the network about 12 years ago, there would be a network timeout setting of something like 30 seconds. So if you didn't continue to send data, the network will end the print job and send the file to the printer which would auto form feed at the end. Many of our basic programs had to be rewritten because they would do an LPRINT periodically, if you took along time progressing through the inputs, you would easily hit the 30 second timeout. So all the programs had to be rewritten to save the data to be printed to a file, and only once you execute a print command, it would read the file back in and Lprint it (or a Print#1) to the LPT port.
Since the printer was on the network, and basic could only print to LPT's, we had to use a net command to capture the LPT1 port and direct it to the network queue.
I don't remember all the details, but those are the bits and pieces I do remember. I think the answer to your problem lies in there somewhere.
Namely:
1. Printer setting to auto form feed.
2. Network setting that closes print job after timeout period. -
Replace Line Feed a field with imported data
Hi, I’m trying to replace a line feed in a form field where data is imported to the field.
I can make the replace function work when typing into the field, but I can’t figure out how to make it work on imported data.
This is the script I use:
if (xfa.event.newText.match(/[\n]/) )
xfa.event.change = "LF"
Regards,
KirstineHi,
So if I am getting you correctly, the imported data has the new lines (\n)?
You could try the layout:ready event and test against the field's .rawValue. But this is going to be very inefficient.
Niall -
FCC in receiver channel - get rid of last line feed?
Dear experts,
I have the following XML structure
<DT_SALES_REPORT_JDE_CA>
<list>
<RecordsetA>
<a>
<b>
</RecordsetA>
<RecordsetB>
<a>
<b>
<c>
</RecordsetB>
<a>
<b>
<c>
<RecordsetB>
</RecordsetB>
</list>
</DT_SALES_REPORT_JDE_CA>
and I am using CC in the receiver file adapter:
RecordsetA.fieldSeparator ","
RecordsetB.fieldSeparator ","
RecordsetA.endSeparator "\n
RecordsetB.endSeparator "\n
RecordsetA.beginSeparator "
RecordsetB.beginSeparator "
which gives me this structure:
"a","b"
"a","b","c"
"a","b","c"
This is fine the only issue I have is that at the very end it also gives me a line feed of course.
But I have to get rid of that last line feed!
But how can I achieve that? Is that possible at all?
I cannot use ".fixedLength" because the fields have variable lenghts.
Thank you for any ideas and best regards,
PeterHello Zameer Hamza,
You are right. I removed the .endSeperator and line feeds are entered automatically. But now I still have one line feed at the very end which I do not need.
Would you have any other ideas how to resolve this?
thank you again,
Peter -
Folder action to find and replace text and change line feeds
I want to use a folder action to find and replace text and change Mac carriage returns to DOS line feeds inside text files.
The text to be replaced is: "/Users/wim/Music/iTunes/iTunes Music/Music" (without the quotes)
This text has to be removed (i.e. replaced by an empty string)
The text occurs many times within each file.
The files are playlists exported from iTunes in the M3U format (which are text files). They contain Mac carriage returns. These need to be changed to DOS line feeds.
I have found the following two perl commands to achieve this:
To find and replace text: perl -pi -w -e 's/THIS/THAT/g;' *.txt
To change carriage returns to line feeds: perl -i -pe 's/\015/\015\012/g' mac-file
I know that it's possible to make a folder action with Automator that executes a shell script.
What I want to do is drop the exported playlists in M3U format in a folder so that the folder action will remove the right text and change the carriage returns.
My questions are:
Is it possible to make a folder action that executes command line commands instead of shell scripts?
What is the correct syntax for the two commands when used in a folder action shell script? Especially, how do I escape the slashes (/) in the string to be removed?
Thanks for your helpOk, I've include an applescript to run a shell command. The applesript command quoted form makes a string that will end up as a single string on the bash command line. Depending on what you want to do, you may need multiple string on the bash command lines. I've included some information on folder actions.
It is easier to diagnose problems with debug information. I suggest adding log statements to your script to see what is going on. Here is an example.
Author: rccharles
For testing, run in the Script Editor.
1) Click on the Event Log tab to see the output from the log statement
2) Click on Run
For running shell commands see:
http://developer.apple.com/mac/library/technotes/tn2002/tn2065.html
on run
-- Write a message into the event log.
log " --- Starting on " & ((current date) as string) & " --- "
-- debug lines
set desktopPath to (path to desktop) as string
log "desktopPath = " & desktopPath
set unixDesktopPath to POSIX path of desktopPath
log "unixDesktopPath = " & unixDesktopPath
set quotedUnixDesktopPath to quoted form of unixDesktopPath
log "quoted form is " & quotedUnixDesktopPath
try
set fromUnix to do shell script "ls -l " & quotedUnixDesktopPath
display dialog "ls -l of " & quotedUnixDesktopPath & return & fromUnix
on error errMsg
log "ls -l error..." & errMsg
end try
end run
How to set up a folder action.
1) right click on folder. click on Enable folder actions
2) Place script in
/Library/Scripts/Folder Actions Scripts
3) right click on folder. click on attach folder action
pick your script.
Create a new folder on the desktop & try.
You can put multiple folder actions on a folder. There are other ways of doing this.
Here is my test script:
on adding folder items to this_folder after receiving dropped_items
repeat with dropped_item_ref in dropped_items
display dialog "dropped files is " & dropped_item_ref & " on folder " & this_folder
end repeat
end adding folder items to
How to make the text into an AppleScript program.
Start the AppleScript Editor
/Applications/AppleScript/Script Editor.app
In Snow Leopard it's at: /Applications/Utilities/AppleScript Editor
Copy the script text to the Applescript editor.
Note: The ¬ is typed as option+return. ption+return is the Applescript line continuation characters.
You may need to retype these characters.
Save the text to a file as an script and do not check any of the boxes below. -
Working with line feed, carriege return, tab etc in JSP web layout
Hi guys,
After looking at an old thread
line feed, carriege return, tab etc in JSP web layout
I think I am experiencing the same problem here and I'm struggling to implement the solution, mainly because I am a complete newbie at jsp reports (and most things webby).
1) Can I add the code following code directly to the web source? If not then how do I find the css file being used?
table pre {
overflow-x: auto; /* Use horizontal scroller if needed; for Firefox 2, not needed in Firefox 3 */
white-space: pre-wrap; /* css-3 */
white-space: -moz-pre-wrap !important; /* Mozilla, since 1999 */
/* width: 99%; */
word-wrap: break-word; /* Internet Explorer 5.5+ */
2) I'm not sure how to set the width to be same as the width of the table cell.
Here's the web source and thanks very much in advance!
<%@ taglib uri="/WEB-INF/lib/reports_tld.jar" prefix="rw" %>
<%@ page language="java" import="java.io.*" errorPage="/rwerror.jsp" session="false" %>
<%@ page contentType="text/html;charset=ISO-8859-1" %>
<!--
-- Version control data:
-- $Revision: $
-- $Date: $
-->
<!--
<rw:report id="report" parameters="userid=xxx/xxx@xxx">
<rw:objects id="objects">
</rw:objects>
-->
<html>
<head>
<meta name="GENERATOR" content="Oracle 9i Reports Developer"/>
<title> STAR Solution Plan Report </title>
</head>
<body>
<!-- Data Area Generated by Reports Developer -->
<rw:dataArea id="MG2GRPFR69">
<rw:foreach id="RG2691" src="G_issue_solution">
<!-- Start GetGroupHeader/n --> <table>
<TABLE border=0 cellPadding=0 cellSpacing=0 width="100%" style="font-family: Book Antiqua; font-size: 10pt">
<TBODY>
<TR>
<TD vAlign=center align="left">
<p><IMG src="http://witton3/star/Docs/EU_Man/TIMET_Logo.jpg" width="150" height="77"><br>
</p>
</TD>
<TD vAlign=center align="right">
<p><IMG src="http://witton3/star/Docs/EU_Man/Star_Logo.gif" width="116" height="46">
</p>
</TD>
</TR></TBODY></TABLE>
<p align=center style='margin-right:.5in;margin-left:.5in;text-align:center'><span
style='font-size:18.0pt;font-family:"Book Antiqua"'>STAR System Documentation</span></p>
<p align=center style='margin-right:.5in;margin-left:.5in;text-align:center'>
<u><b><span
style='font-size:13.5pt;font-family:"Book Antiqua"'>Solution Plan for STCR </span><font size="4"><span style="font-family: Book Antiqua">
<rw:field id="F_issue_id" src="issue_id" breakLevel="RG2691" breakValue=" "> F_issue_id </rw:field>
</span></b></u></font></p>
<P>NOTE: <font color="#008000">For existing STAR programs, unless explicitly
stated in the solution plan, functionality pre-existing in the program or report
will be retained. Approval of the solution plan implies agreement that
current functionality not being modified is still acceptable going forward, in
the light of the specific changes documented. </font></P>
<b><u><p>Root Cause of Issue</b></u></p>
<p> <rw:field id="F_root_cause" src="root_cause" breakLevel="RG2691" breakValue=" "> F_root_cause </rw:field>
</p>
<b><u><p>Overview of Solution</b></u></p>
<p> <rw:field id="F_solution_overview" src="solution_overview" breakLevel="RG2691" breakValue=" "> F_solution_overview </rw:field>
</p>
<b><u><p>Functionality Changes</b></u></p>
<b><p>After implementation of these changes the users will now be able to:</b></p>
<p> <rw:field id="F_sp_new_functionality" src="sp_new_functionality" breakLevel="RG2691" breakValue=" "> F_sp_new_functionality </rw:field>
</p>
<b><p>After implementation of these changes the users will no longer be able to:</b></p>
<p> <rw:field id="F_sp_removed_functionality" src="sp_removed_functionality" breakLevel="RG2691" breakValue=" "> F_sp_removed_functionality </rw:field>
</p>
<b><p>After implementation of these changes the users will need to do this differently:</b></p>
<p> <rw:field id="F_sp_changed_functionality" src="sp_changed_functionality" breakLevel="RG2691" breakValue=" "> F_sp_changed_functionality </rw:field>
</p>
<b><u><p>Program Units Affected</b></u></p>
<!-- End GetGroupHeader/n --> <tr>
<td valign="top">
<table summary="STAR System Documentation" border="1" width="100%" style="font-family: Book Antiqua; font-size: 10pt">
<!-- Header -->
<thead>
<tr>
<th width="100" align="left" <rw:id id="HBprgunittype69" asArray="no"/>> <b><font face="Book Antiqua">Program <br>Unit Type </font></b></th>
<th width="200" align="left" <rw:id id="HBprgunitname69" asArray="no"/>> <b><font face="Book Antiqua">Program Unit Name </font></b></th>
<th align="left" <rw:id id="HBdescofchange69" asArray="no"/>> <b><font face="Book Antiqua">Description of Change </font></b></th>
<th align="left" <rw:id id="HBtechnotes69" asArray="no"/>> <b><font face="Book Antiqua">Technical Notes </font></b></th>
</tr>
</thead>
<!-- Body -->
<tbody>
<rw:foreach id="RG1691" src="G_issue_prg_units">
<tr>
<td width="100" align="left" valign="top" <rw:headers id="HFprgunittype69" src="HBprgunittype69"/>> <font face="Book Antiqua" size="2"><rw:field id="Fprgunittype69" src="program_unit_type" nullValue=" "> F_prgunittype </rw:field></font></td>
<td width="200" align="left" valign="top" <rw:headers id="HFprgunitname69" src="HBprgunitname69"/>> <font face="Book Antiqua" size="2"><rw:field id="Fprgunitname69" src="program_unit_name" nullValue=" "> F_prgunitname </rw:field></font></td>
<td <rw:headers id="HFdescofchange69" src="HBdescofchange69"/>> <font face="Book Antiqua" size="2"><rw:field id="Fdescofchange69" src="sp_description_of_change" nullValue=" "> F_descofchange </rw:field></font></td>
<td <rw:headers id="HFtechnotes69" src="HBtechnotes69"/>> <font face="Book Antiqua" size="2"><rw:field id="Ftechnotes69" src="sp_technical_notes" nullValue=" "> F_technotes </rw:field></font></td>
</tr>
</rw:foreach>
</tbody>
</table>
</td>
</tr>
<b><u><p>Security</b></u></p>
<p> <rw:field id="F_sp_security" src="sp_security" breakLevel="RG2691" breakValue=" "> F_sp_security </rw:field>
</p>
<b><u><p>Site Specific data /processing</b></u></p>
<p> <rw:field id="F_sp_site_specific_info" src="sp_site_specific_info" breakLevel="RG2691" breakValue=" "> F_sp_site_specific_info </rw:field>
</p>
<b><u><p>Impacts and restrictions</b></u></p>
<p> <rw:field id="F_sp_impacts_and_restrictions" src="sp_impacts_and_restrictions" breakLevel="RG2691" breakValue=" "> F_sp_impacts_and_restrictions </rw:field>
</p>
<b><u><p>Pre-Implementation data modifications</b></u></p>
<p> <rw:field id="F_sp_pre_imp_data_mods" src="sp_pre_imp_data_mods" breakLevel="RG2691" breakValue=" "> F_sp_pre_imp_data_mods </rw:field>
</p>
<b><u><p>Post Implementation user actions</b></u></p>
<p> <rw:field id="F_sp_post_imp_data_mods" src="sp_post_imp_data_mods" breakLevel="RG2691" breakValue=" "> F_sp_post_imp_data_mods </rw:field>
</p>
</table>
</rw:foreach>
</rw:dataArea> <!-- id="MG2GRPFR69" -->
<!-- End of Data Area Generated by Reports Developer -->
</body>
</html>
<!--
</rw:report>
-->The solution in the original post was:
set the
width to be same as the width of the table cell
add following class to css file
table pre {
overflow-x: auto; /* Use horizontal scroller if needed; for Firefox 2, not needed in Firefox 3 */
white-space: pre-wrap; /* css-3 */
white-space: -moz-pre-wrap !important; /* Mozilla, since 1999 */
/* width: 99%; */
word-wrap: break-word; /* Internet Explorer 5.5+ */
But I dont have a css file ... can I just add this to the web source and if so where? -
How to insert line feed in the alert text
HI,
I am sending a message from BMP using alert.
I need to insert a line feed in the error message because the message is a concatenation of multiple error messages.
Regards
Vijay.You already have the solution. The XML created by EDI disassembler does not have White Space and Indent enabled so what you see is unindented/non-whitepaced XML.
However if you view it in IE then you will see it indented and properly formatted. I would assume that you want to do something with the disassembled message such as store it or process it as opposed to having someone read it in a browser or notepad++ ?
because for processing the data whitespace or indentation is not really consequential.
Regards. -
Losing Line-feed in XML parsing (XMLTRANSFORM) or File output (clob2file)?
Hi all, need some help please!
I'm using a xslt file to transferm a XML file into a txt format file. Within the XSLT file, there is a carriage-return (<xsl:text>
</xsl:text>) (it disappeared already, here is what i'm using "#xD" or "#xA", have to take the '&' and ';' away), but the final output txt file seems to lose this carriage-return/line-feed information. The output data became one-line.
Here are the steps I've used:
1. lv_xml_data = XMLTRANSFORM (a.xml_data, b.f_xslt)
=> output data into XMLTYPE;
2. using XMLTYPE.getclobval to get the output data into CLOB format.
lv_output_clob := XMLTYPE.getclobval (lv_xml_data);
3. using encoding:
lv_output_clob :=
DBMS_XMLGEN.CONVERT (lv_output_clob, DBMS_XMLGEN.entity_decode);
4. using clob2file write to a file with txt format.
DBMS_XSLPROCESSOR.clob2file (lv_output_clob,
lv_output_dir,
lv_filename,
NLS_CHARSET_ID ('UTF8')
Been struggling with these a few days already. Any help is appreciated. I would really like to get some input to see what might cause the carriage-return/line-feed characters lost.
Thanks in advance!
-Jane
Edited by: user9084567 on Feb 1, 2010 1:45 PM
Edited by: user9084567 on Feb 1, 2010 1:47 PM
Edited by: user9084567 on Feb 1, 2010 1:48 PMA_non,
After a few testing, I can identify the CRLF was lost in XMLTRANSFORM. I had read your other thread related to this, and try to run this sample code:
/* Formatted on 2010/02/03 15:32 (Formatter Plus v4.8.8) */
DECLARE --Local variables here
v_xml XMLTYPE
:= XMLTYPE
('<
offers xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="xsd.xsd"><
submit type="DAM" date="2007-03-28" name="MKTPART1" mode="NORMAL"/><
offer name="Jamestown" flag="true" version_no="1.0"><
standing date="2007-03-29" type="WED"/><
identifier external_id="523736560"/><
/offer><
/offers>'
v_xslt XMLTYPE
:= XMLTYPE
('<
xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> <
xsl:output method="text"/> <
xsl:variable name="new_line" select="''
''" /> <
xsl:template match="/"> <
xsl:value-of select="/offers/offer/...name"/><
xsl:value-of select="$new_line" /><
xsl:value-of select="/offers/submit/...date"/><
xsl:value-of select="$new_line" /><
xsl:value-of select="/offers/offer/standing/...date"/><
xsl:value-of select="$new_line" /><
xsl:value-of select="/offers/offer/standing/...type"/><
xsl:value-of select="$new_line" /><
/xsl:template><
/xsl:stylesheet>'
BEGIN -- Test statements here
DBMS_OUTPUT.put_line (XMLTYPE.transform (v_xml, v_xslt).getstringval ());
END;
But come out these error:
Error at line 2
ORA-31011: XML parsing failed
ORA-19202: Error occurred in XML processing
LPX-00230: invalid character 10 (U+000A) found in a Name or Nmtoken
Error at line 4
ORA-06512: at "SYS.XMLTYPE", line 310
ORA-06512: at line 2
Can not figure out why. Try to use this <xsl:variable name="new_line" select="''& # x A ;''" /> inside my style sheet, but it seems not taking it. Not too sure what's exactly should be the quotes for "''& # x A ;''" (w/o space). If I used doub quote + two single quotes, it returns error, LPX-00601: Invalid token in: ' '; if I used single quote + double quote, it did not bring in CRLF at all.
Any input?
Thanks in advance. -
Problems uploading a text file with line feed characters from Windows
Hi,
I am using the FM GUI_UPLOAD to load a text file in which at the end of each line there is a line feed character. When I upload the file, the FM interprets the entire file as ONE record; it does not recognize the line feed character at the end of each file line. I am using the parameter in the FM "HAS_FIELD_SEPARATOR" and it does not do anything to remidiate this issue.
The funny thing is that WS_upload works like a charm and it separates every line in the text file according to the line feed character at the end of each file line.
Why a FM that is obsolete would work better and with less effort than the new one? We are on 4.6c and will go to ECC6.0 May 2009.
Can anybody recommenced a way to process this type of file using GUI_upload?
The file to process is downloaded from a bank Website into a Windows PC. Sending the file to Unix first is not an option.
Thanks,
Pierre Martinez
Edited by: Pierre Martinez on Aug 15, 2008 1:09 AMHi,
I have done that and Notepad does NOT interpret the line feed character. The file looks all messed up. Notepad does NOT split the data into records. The Hex character at the end of each file line is 0A.
The user will download the file into a Windows desktop from the bank's website and from there an ABAP program needs to read it and parse it. But the ABAP program can not even catch the entire file with gui_upload. WS_upload can catch it with no issues.
I tried catching the file into an internal table of data type string using GUI_upload, but it only catches two bytes of the file and nothing else.
I will try catching the file in some other type of data type for the internal table in gui_upload.
Once I catch it, I can split the file by the line feed character. I need to catch it first, but "my glove" is not big enough. Defining the internal table for the gui_upload as character is a guessing game since I really do not know how big the text file is since GUI_upload will put it in a one record.
Thanks. -
A space in xml-document is stored in database as New line feed instead of n
Hello,
I have got the following problem:
An xml-document is inserted by an xsql servlet into an object view. First this document is translated by an xsl file. Then an instead of trigger inserts the values into the right tables.
When a space is present (only one space no further string-value) in the xml-document then this space is inserted into the database as a new line feed.(chr(10))
When I add the following line to the tag
<bnr_name xml:space="preserve"> </bnr_name>
then the space is stored as a space. (chr(32))
What I want is that this space is inserted as a NULL- value.
Does anyone know a solution in xml or xsl? (Of course I can solve it on the database side by programming a function around it, but I want to solve it on the xml or xsl side)
Bye
jan-Paul DuisterFew questions which might help to understand the issue.
1. Is client's data is coming in more than 72 chars per each line? Then you can request client to send the data with max. 72 chars per line. Else dividing the string into 72 chars will loose the readability of text since logic can not be built to divide the text.
Start reading the text string starting from left for maximum 72 chars . If 72th character is non space then go backwards i.e. read 71, 70, 69... till last character should be a SPACE.
Eg. string is
'xxxxxxxxxxx...........This material is created for plant xyz. date of creation is 03.02.2009'.
x = string72(1) should be a SPACE else take x = string71(1) and likewise. -
Mail receiver adapter - line feed problem
Hi!
I am just configuring a mail receiver adapter. In the module tab i configured a conversion from XML to plain which works well. The plain text file is created but there are no line feeds after the plain text lines.
The configuration in the module tab looks like this:
Modulename: localejbs/AF_Modules/MessageTransformBean
Type: Local Enterprise Bean
Module key: XML2Plain
<u>Module configuration:</u>
XML2Plain - Transform.Class - com.sap.aii.messaging.adapter.Conversion
XML2Plain - Tansform.ContentType - text/plain;charset=utf-8
XML2Plain - xml.conversionType - SimpleXML2Plain
XML2Plain - xml.addHeaderLine - 0
XML2Plain - xml.fieldFixedLengths - 80,80,80,80,80,80
XML2Plain - xml.fixedLengthTooShortHandling - Cut
Can anybody please help me?
Thanks in advance
ChrisHi Stefan!
Thanks for your reply! Your suggestions would be perfect if I already had any kind of line break, eg. lf or crlf. At the moment there is no separator at the end of each line.
<u>The XML file looks like this:</u>
<b> <?xml version="1.0" encoding="UTF-8" ?>
<ns:X_ANSI_TXT xmlns:ns="urn:customer.com:edi:kunden">
<MSG>
<LINE_01>*** START OF REPORT ***</LINE_01>
<LINE_02>PO CHANGE REQUEST</LINE_02>
<LINE_03>DATE: 10/05/05 TIME: 0744</LINE_03>
<LINE_04 />
<LINE_05>PO TYPE: CR: Change to Release</LINE_05>
<LINE_06>PO #: DB65544027560070</LINE_06>
<LINE_07>ORIGINAL PO DATE: 02/03/93</LINE_07>
<LINE_08>PO CHANGE REQUEST DATE: 10/05/05</LINE_08>
<LINE_09>SHPMT PMT METHOD: CC: COLLECT</LINE_09>
<LINE_10>FOB POINT: OR:ORIGIN (SHIPPNG PT)</LINE_10>
<LINE_11>FOB DESCRIPTION: ORIGIN (SHIPPNG PT)</LINE_11>
<LINE_12>*** END OF REPORT *** </LINE_50>
<LINE_13 />
</MSG></b>
<u>After conversion the output looks like this:</u>
<b>*** START OF REPORT *** PO CHANGE REQUEST DATE: 10/05/05 TIME: 0744 PO TYPE: CR: Change to Release PO #: DB65544027560070 ORIGINAL PO DATE: 02/03/93 PO CHANGE REQUEST DATE: 10/05/05 SHPMT PMT METHOD: CC: COLLECT FOB POINT: OR:ORIGIN (SHIPPNG PT) FOB DESCRIPTION: ORIGIN (SHIPPNG PT) *** END OF REPORT ***</b>
<u>I would like to create a more readable format like this:</u>
<b>*** START OF REPORT ***
PO CHANGE REQUEST
DATE: 10/05/05 TIME: 0744
PO TYPE: CR: Change to Release
PO #: DB65544027560070
ORIGINAL PO DATE: 02/03/93
PO CHANGE REQUEST DATE: 10/05/05
SHPMT PMT METHOD: CC: COLLECT
FOB POINT: OR:ORIGIN (SHIPPNG PT)
FOB DESCRIPTION: ORIGIN (SHIPPNG PT)
END OF REPORT ***</b>
Do I have to change the XML message or is there a chance to use a module entry?
Kind regards
Chris -
Hi,
we need to produce a flat file using the content conversion of the file adapter without any line feed (the target structure is a complex one with several record types).
Example
What we get now:
*AAheaderA
*ABheaderB
*BAItem1
*CAsubitem1
*BAItem2
What we need:
AAheaderAABheaderBBAItem1CAsubitem1*BAItem2
It seems that with NameA.endSeparator parameter you can only add a new character, but I need to delete the line feed.
Is it possible with standard file adapter or do we need do create our own module with java?
Thank you.Hi Stefano,
So you Basically want to do content conversion at the receiver end and that is basically to get the entire data in one line.For that please go through these links below.It clearly explains your requirement.
<a href="/people/arpit.seth/blog/2005/06/02/file-receiver-with-content-conversion Receiver with Content Conversion</a>
<a href="http://help.sap.com/saphelp_nw04/helpdata/en/d2/bab440c97f3716e10000000a155106/frameset.htm">Converting File Content in the Receiver Adapter</a>
carefully make a note of the "The endSeparator parameter.
Regards,
abhy -
Regarding problem with new line feed for DME file generation
Hello Experts,
I m facing a problem in the DME file generation.
we want each record in the DME file should be in new line. for that we have add the new line feed character in the each row end. So in the SAP output it looks ok, But if we download that file the carriage return field is coming in the end of every row.
can any one tell how to solve this issue.
Please refer the below line code which i m using for new line
DATA: GM_newline TYPE c VALUE cl_abap_char_utilities=>CR_LF
You reply is valuable..
Thanks,
SureshDATA: GM_newline TYPE c VALUE cl_abap_char_utilities=>newline.
Maybe you are looking for
-
Customizing the code inspector with check for two executable statements in same line
Hi Everyone, I have a reuirement to customize the code inspector.I need to create a check 'Two executable statements should not be in the same line'. While doing so i am facing one problem as in internal table it is capturing the report as word by wo
-
Read character 3+4 from filename and move to other position
Hello, I need a javascript to read my filename (I have the one for the full filename) and especially the 3rd and 4th position of the filename. The characters on position 3 and 4 must be moved to the position just before the extension. Example: 4PEN12
-
Fonts not showing correctly only when on my account page on app store
fonts not showing correctly only when on my account page on app store
-
Anyone know of a way to print the Inspector Window or export it to text? Thanks.
-
Upgrading to latest spec newer Mac with previous Snow Leopard Backup
Hi, would like very much to know if the following would be achievable. At some point in the near future I may upgrade my Mac again from the current MacBook pro 17" unibody Intel core Duo (early 2009) running Snow Leopard 10.6.4 to either the latest a