Reg. Special Character at end of each line
Hello Experts,
I have an internal table of type string which has to be uploaded into the directories
Each line has to be ended with a comma and for which I concatenated the work area and ',' before appending to the internal table. This is fine till this point.
After downloading the file from the directory, when opened with a notepad, i could see a special character (LINE FEED rectangular box) at the end of each line.
I couldn't understand why this character got appended at the end of each record. Pl suggest me on how i can overcome this special character.
Thanks
RK
Hi,
I am developing one HRMS report for sending salaries to bank. Bank has given one format, there should be 24 spaces at the end of each line in the report. But I am not getting any spaces in the report at the end of line. I have tried soo many ways to get that, but I unable to get spaces. If I put any character it is coming, but if I put space that is not coming. For the line that is set the height of the Repeating Frame long enough to have the blank space. Vertical Elasticity should be expand.
Also you can try by setting the property *"Vert. Space between frames"* for the Repeating frame.
Hope this helps.
Best Regards
Arif Khadas
Similar Messages
-
How to delete a character at the end of each line in a file
Hi
How to remove a character or symbol at the end of each line in a file?
I am having a file with every end of line conatins special chars @.
I need to remove or delete that sysmbol from file.
RegardsJoeBorland wrote:
File is large about above 20,000 lines.
I need to find the optimum solution.
Like reading a file and find the end of character and writing into a file.
The above way is correct or any other way?Try it and see. Such a program will only be a dozen lines long. -
Adding a pipe character '|' at the end of each line
How can I add a '|' at the end of each line in a text file?
Please provide an example.
TIAUsing Readers and Writers are often a better choice for text: they are designed for character-based I/O, handling different character set encodings and thus more easily localizable.
BufferedReader and PrintWriter are buffered which in many cases will increase performance.
These classes also provide line-oriented methods, readLine() and println(), which will handle end-of-line delimiters in a platform-independant way.
BufferedReader in = null ;
PrintWriter out = null ;
try {
in = new BufferedReader(new FileReader("infile.txt")) ;
out = new PrintWriter(new FileWriter("outfile.txt")) ;
String line ;
while ((line = in.readLine()) != null) {
out.print(line) ;
out.println('|') ;
out.flush() ;
} catch (FileNotFoundException e) {
System.err.println("problem opening file for read: "+e) ;
} catch (IOException e) {
System.err.println("problem reading file: "+e) ;
} finally {
try {
if (out != null) out.close() ;
if (in != null) in.close() ;
} catch (IOException e) {
System.err.println("problem closing files: "+e) ;
} -
Text in the textfield has "=" symbols at end of each line. how to remove ?
For certain cases, if one does cut & paste (multiple lines of text ) into the text area from email, the symbol ("=") appears at end of each line. I was told to handle such cases and remove the "=" at end of each line from the text area. If I replace "=" with space, It would replace every single appearance of "=" with space instead of just only at the end. Any help will be greatly appreciated.
-thanksHi
Try to find out new line character.And if position of thses "=" is specific to new line char. you search it out from there and then can replace with any char or space.
Hope this will work . -
Space at end of each line in the RDF report.
Hi All,
I am developing one HRMS report for sending salaries to bank. Bank has given one format, there should be 24 spaces at the end of each line in the report. But I am not getting any spaces in the report at the end of line. I have tried soo many ways to get that, but I unable to get spaces. If I put any character it is coming, but if I put space that is not coming.
Anyone please tell me how to get spaces at end of each line in RDF report. Its urgent guys...... Anyone please help me out.
Thank you,
PhaniHi,
I am developing one HRMS report for sending salaries to bank. Bank has given one format, there should be 24 spaces at the end of each line in the report. But I am not getting any spaces in the report at the end of line. I have tried soo many ways to get that, but I unable to get spaces. If I put any character it is coming, but if I put space that is not coming. For the line that is set the height of the Repeating Frame long enough to have the blank space. Vertical Elasticity should be expand.
Also you can try by setting the property *"Vert. Space between frames"* for the Repeating frame.
Hope this helps.
Best Regards
Arif Khadas -
PI 7.1 Receiver file adapter - Spaces are truncated at end of each line
In Receiver file adapter, I specified file content conversion parameters. My file structure is as below:
Header
Field1 10
Field2 20
Field3 8
Filler 20
Detail
Field1 10
Field2 8
Filler 8
In both Header and Details structures I have to fill 20 and 8 spaces at end of each line. In XML (Payload) I can view the spaces. But when the text file is created all the spaces are truncated.
Could you please solve this issue.
RegardsRecordset Structure: ns1:MT_SAP,REC,Header,Detail
ns1:MT_SAP.fieldSeparator '0'
ns1:MT_SAP_PNC_PPAY.fieldContentFormatting nothing
REC.fieldContentFormatting nothing
REC.fieldSeparator '0'
REC.processConfiguration FromConfiguration
Header.fieldFixedLengths 10,20,8,20
Header.endSeparator 'nl'
Header.fixedLengthTooShortHandling Ignore
Header.fieldNames Field1,Field2,Field3,Filler
Header.fieldContentFormatting nothing
Detail.fieldFixedLengths 10,8,8
Detail.endSeparator 'nl'
Detail.fieldNames Field1,Field2,Filler
Detail.fieldContentFormatting nothing
Detail.fixedLengthTooShortHandling Ignore -
Square at end of each line in entourage mail
Help please! I have searched the internet, unsuccessfully, to find out how to remove a square box that shows itself at the end of each line of text in my entourage mail... whether incoming or composed mail....
Does anyone have an answer?
Thanks so much,
Wildlife....Help please! I have searched the internet, unsuccessfully, to find out how to remove a square box that shows itself at the end of each line of text in my entourage mail... whether incoming or composed mail....
The best place to ask would be in the forums which MS runs to help people with its products:
http://groups.google.com/group/microsoft.public.mac.office.entourage/topics -
Question marks at end of each line in messages sent with 10.4.6 mail
Some Outlook users are finding ?s at the end of each line in my emails sent from 10.4.6. I did not have this problem in 10.3.9. The problem appears to be resolved when I choose UTF-8 message encoding. There appears to be no way to make Mail automatically choose UTF-8, and I am reluctant to enter Terminal to direct Mail to do so as suggested in one discussion. So 3 questions: 1. how do I get Mail to choose UTF-8 automatically? 2. why hasn't Apple fixed this? 3. how friendly is UTF-8 to non-Outlook users? I don't want to make a change in Terminal so that all email goes UTF-8 and then find out that this messes something else up. Help?
So 3 questions: 1. how do I get Mail to choose UTF-8
automatically?
See this note. Perhaps you would be more comfortable with the "dingbat" fix.
http://homepage.mac.com/thgewecke/woutlook.html
2. why hasn't Apple fixed this?
I don't know. Perhaps they are tired of adjusting their stuff to conform to bugs in MS products.
3. how
friendly is UTF-8 to non-Outlook users?
All modern mail clients can read it fine, but webmail is unpredictable. Best thing is perhaps to try it and see if you get any complaints. -
How to remove # from the end of each lines of .csv file.
Hi ,
I have uploaded .csv file from my local m/c (windows) to application server (unix) thru. FM 'ARCHIVFILE_CLIENT_TO_SERVER'
Issue is when I open the file in AL11 it is showing # at end of each line. Click below link to see the output file.
[https://docs0.google.com/document/edit?id=1PzjhljdCC2Wgj9L1dZ51G4pHJ0G_7jJwQAMqcJHdggc&hl=en#]
Pls. help me how to remove all the # from the file.
Thanks in advance.
DevinderHi ,
use this
Declare this
that # value is actually use of Tab in file
so in order to remove that use below code
DATA :C_TAB(1) TYPE c VALUE cl_abap_char_utilities=>HORIZONTAL_TAB .
loop at it_data .
refno = it_data-line .
REPLACE ALL OCCURRENCES OF c_tab IN refno WITH ''.
modify it_data .
endloop.
Regards
Deepak. -
Reg: Special Character Appearing in Excel O/P.
I am getting excel output generated via an Oracle report (CSV format). In the excel output, I am getting a special character for TAB (Chr9, a box). Since user wants to sort the data, because of this character they are not able to sort data in sheet properly.
Can anyone suggest what could cause this special character to appear in the report output? I am looking from layout perspective also. Is this has something to do with the printing style applied to the concurrent program?
Thanks In advance.I had the same problem and this is what I did, works great. You have the total control.
function BeforeReport return boolean is
fp text_io.file_type;
begin
-- creating a file name
:CP_filename := 'C:\Gap'||to_char(sysdate,'MMDDYYHHMISS')||'.csv';
-- Opening the file in write mode
fp := text_io.fopen(:CP_filename,'w');
-- writing the column headings into the file
text_io.put_line(fp,'"Platform","Sys#","GapType",');
text_io.fclose(fp);
return (TRUE);
end;
and then where ever it is suitable, depending on the requirement, write into file by opening it in the append mode.
function R_G_systemplatformFormatTrigge return boolean is
fp text_io.file_type;
begin
-- srw.message(99,:dname);
fp := text_io.fopen(:CP_filename,'a');
text_io.put(fp,'"' || :systemplatform || '",');
text_io.put(fp,'"' || to_char(:sysno) || '",');
text_io.put_line(fp,'"' || :CF_gaptype || '",');
text_io.fclose(fp);
return (TRUE);
end;
This works great. Hope this helps. -
How can I eliminate automatic "quotation marks" that are appearing at the end of each line?
I keep getting "quotation marks" at the end of every line when I type. How can I eliminate these marks as they are even showing up when I print and I will not have on my wedding programs! Please help (from a desperate bride-to-be)!
It sounds like you are using an East Asian font and unless you are issuing invitations in Chinese, Japanese, or Korean that doesn't sound like a good idea.
Peter -
Method GUI_DOWNLOAD not creating CRLF at end-of-each-line of output
Hello SDN Community, has anyone experienced CL_GUI_FRONTEND_SERVICES=> GUI_DOWNLOAD not putting the CRLF at end of exported lines? This can be seen when you view the output file in notepad (the file contents wrap) or an editor with hex view enabled (0A0D).
I have tried running an ABAP that runs this method and on some people's laptop's the file wraps and on others the file is formatted (as would be expected) as per the CRLF's.
My understanding is that the GUI_DOWNLOAD method should provide the CRLF's. And on my laptop (running Vista and SAP ECC 6.0 back-end) it wraps the output because there are no CRLF's in the file.
Your experiences would be appreciated.
Thank you,
Dean Atteberry.Thank you, Alejandro, for your comments. I am using two systems - on one it works and on the other it does not.
The one that works is an SAP ECC 6.0 where the CL_GUI_FRONTEND_SERVICES class has a Last Change date of 03.07.2006.
The one do not work is SAP ECC 6.0 where the CL_GUI_FRONTEND_SERVICES class has a Last Change date of 07/08/2009.
If I look at the code in GET_PLATFORM, it is verry different between the two systems.
On the one that works, it executes following code and platformID has value of '5'. This later used to assign the correct value for CRLF variable which is used to concatenate to end of records (value is '0A0D').
ELSE.
* SAP GUI for Windows
IF ACTIVEX IS NOT INITIAL.
* returns Windows Platform
* VER_PLATFORM_WIN32s 0
* VER_PLATFORM_WIN32_WINDOWS 1 (Win95/98)
* VER_PLATFORM_WIN32_NT 2
CALL METHOD HANDLE->CALL_METHOD
EXPORTING
METHOD = 'GetWindowsPlatform'
P_COUNT = 0
QUEUE_ONLY = ' '
IMPORTING
RESULT = platformID
EXCEPTIONS
OTHERS = 1.
IF SY-SUBRC <> 0.
RAISE CNTL_ERROR.
ENDIF.
On the one that does not work, it executes following code. In the debugger, when control comes back from CL_GUI_CFW=>FLUSH call, I can see the PLATFORMID variable change to '15'. This is moved to M_PLATFORM and ultimately is used later in a case statement to assign the appropriate value to CRLF variable.
HOWEVER, THERE IS NO "WHEN 15" statement in the CASE statement - IT ONLY GOES UP TO '14'. Because of this, no value is assigned to the CRLF variable and when subsequently this variable is concatenated to the output line, there is no CRLF (0A0D) at the end of the line. Because the CRLF variable is blank. [see coding snippets at end-of-note]
Is there an better place than General ABAP forum to discuss this? Possibly this item might benefit from the attention of SAP developers?
Following are code snippets illustrating findings from debugging...
This shows the FLUSH statement that causes '15' to appear in the PLATFORMID variable.
IF bPLATFORMEX = ABAP_TRUE.
CALL METHOD HANDLE->CALL_METHOD
EXPORTING
METHOD = 'GetPlatformEx'
P_COUNT = 0
QUEUE_ONLY = ' '
IMPORTING
RESULT = PLATFORMID
EXCEPTIONS
OTHERS = 1.
CALL METHOD CL_GUI_CFW=>FLUSH
EXCEPTIONS
CNTL_SYSTEM_ERROR = 1
CNTL_ERROR = 2
others = 3.
IF SY-SUBRC <> 0.
RAISE CNTL_ERROR.
ENDIF.
MOVE PLATFORMID TO M_PLATFORM.
This shows the method GET_LF_FOR_DESTINATION_GUI, where you can see that values only go up to 14. [look in attributes for CL_GUI_FRONTEND_SERVICES to see attribute values]
CASE PLATFORM_ID.
WHEN CL_GUI_FRONTEND_SERVICES=>PLATFORM_WINDOWSXP. <---- this is '14'
MOVE CL_ABAP_CHAR_UTILITIES=>CR_LF TO GUI_CRLF.
WHEN CL_GUI_FRONTEND_SERVICES=>PLATFORM_NT50.
MOVE CL_ABAP_CHAR_UTILITIES=>CR_LF TO GUI_CRLF.
<...lines snipped...>
WHEN CL_GUI_FRONTEND_SERVICES=>PLATFORM_TRU64.
MOVE CL_ABAP_CHAR_UTILITIES=>NEWLINE TO GUI_CRLF.
WHEN CL_GUI_FRONTEND_SERVICES=>PLATFORM_OS2.
MOVE CL_ABAP_CHAR_UTILITIES=>NEWLINE TO GUI_CRLF.
WHEN CL_GUI_FRONTEND_SERVICES=>PLATFORM_UNKNOWN.
RAISE CNTL_ERROR.
ENDCASE.
ENDIF.
MOVE GUI_CRLF TO LINEFEED.
This shows the FORM put_char_linebuffer you can see CRLF being concatenated to output line...
prc_column_idx = prc_column_idx + 1.
ENDWHILE.
CONCATENATE prc_encoded_string prc_encoded_crlf
INTO prc_encoded_string IN BYTE MODE.
ENDIF.
* Add data lines
LOOP AT par_data_tab ASSIGNING <f_data_tab>.
PERFORM put_char_linebuffer USING <f_data_tab>
par_write_field_separator
par_trunc_trailing_blanks
par_col_select
par_col_select_mask
par_write_lf
strDecimal
strDatFormat
par_dat_mode
par_trunc_trailing_blanks_eol
CHANGING converter
prc_encoded_string.
IF par_write_lf IS NOT INITIAL.
* Add CR to line.
CONCATENATE prc_encoded_string prc_encoded_crlf
INTO prc_encoded_string IN BYTE MODE.
ENDIF.
ENDLOOP.
* Write BOM if requested and Unicode encoding
CLEAR prc_bom_string. -
Let me know if anybody have got any clue to resolve this issue
In the far upper right of the Actions panel is a small menu icon. That includes the option for the menu-based route to turning the hidden characters on and off in case it ever happens again and you can't find this posting to help recall it.
-
Finding the end of a line in a JTextArea and inserting a comma
Hi,
At the moment I am reading in a comma delimited file into a JTextArea.
This part is ok I can see the file in the window correctly.
The problem that I am having now is that I want to add a comma to the end of each line in the JTextArea.
Does anyone know how to do this?
Thank youWell you have to get the String value of the JTextField.
String text = YourJTextField.getText()
Then you have to make a loop and check each single character if it equals '\n', that means "RETURN" or "NEW LINE".
That is the direction I would go. Inform yourself about String manipulations first, like how to look for character, how to compare them and how to add them. -
utl_file.utl_raw adds a line feed at the end of the line. I have to send some binary files to my vendor and they do not want a line feed at the end of the line.
When I execute the sample program below, it creates a file with a line feed(chr(10)) at the end of the line. When I do dump in hexa, it shows a character x0A
How to avoid the line feed at end of line?
We are using Oracle 9i on unix platform.
declare
l_output utl_file.file_type;
v_raw raw(32767);
v_trlr_rec_code VARCHAR2(2);
v_trlr_evnt_title VARCHAR2(6);
begin
l_output := utl_file.fopen( 'RM_MHE_IN_DIR', 'abc.dat', 'w', 14 );
v_trlr_rec_code := '99';
v_trlr_evnt_title := 'STARTD';
v_raw := HEXTORAW(v_trlr_rec_code) || utl_raw.cast_to_raw(v_trlr_evnt_title);
utl_file.put_raw( l_output, v_raw );
utl_file.fflush( l_output );
utl_file.fclose( l_output );
dbms_output.put_line( utl_raw.cast_to_varchar2( v_raw ) );
EXCEPTION
WHEN OTHERS THEN
dbms_output.put_line( sqlerrm );
end;
/oops, sorry i overlooked the fact that the db is 9i; thanks for pointing it out Solomon.
Not sure about this, but a workaround could be to remove the "\n" characters at the end of each line using one of the many Unix utilities after the file has been created.
isotope
Maybe you are looking for
-
Oracle 9i: Help with loadjava jar files to call out web service from pl/sql
I'm trying to build a web service client using dbws_callout_utility.zip (version used for prio 10g database). I followed the articles in oracle site to loadjava jar files (soap.jar, dms.jar, ejb.jar, jssl-1_1.jar, mail.jar, servlet.jar) into Oracle D
-
SQL Query -How2bring multiple results into one field using Formatted Search
Hi Everyone i am trying to bring in the results of the field dbo.Lot_ITEM.LOT using a formatted search into a row level using the following query: SELECT dbo.LOT_ITEM.LOT FROM dbo.DLN1 INNER JOIN dbo.LOT_ITEM ON dbo.DLN1.ItemCode = dbo.LOT_
-
Can we use Abstract Window Toolkit(AWT) or Swing classes in JSP? If is it so, is it preferable to use those in jsp? Details are welcome. Thanks
-
Saving field values to the Database
Hello , I have created a GP Application where the user enters some details in the webdynpro screen which goes for Approval to the approver...now I want to save these values in some database like SAP R/3 and retrieve them later on based on some Id num
-
When I try to play a video clip in Safari I get a Plug-ins blocked message
When Safari is open and I try to play a video clip, it won't play and I get a Plug-ins blocked message. How can I fix it?