How to skip blank line in FCC
Hi,
How to deal with blank rows in FCC for fixed width file?
I want to ignore these records as they will fail the message in mapping.
thanks,
Anirudh.
Hi
Look this thread might help u
Blank line in receiver file adapter content conversion
Similar Messages
-
How to skip blank line (EOF char) at the end of the file while creating ?
Hi,
In my program I have to create a file in Text mode using OPEN DATASET statement. This file is being sent to a third party system for their processing. I came to know while creating the file using OPEN DATASET, one LF character is inserted end of the file resulting a blank line end of the file. Thus if my internal table contains 5 reocrds, in the created text file I can see 6 lines where last is a blank. My question is how to remove this blank line which is causing issue in the thirdparty system.
Here is the Code I have used.
TRY.
Write the file in Text Mode
OPEN DATASET lv_outpf FOR OUTPUT IN TEXT MODE ENCODING NON-UNICODE
WITH SMART LINEFEED
MESSAGE lv_msg.
IF lv_msg IS NOT INITIAL.
WRITE / lv_msg.
EXIT.
ENDIF.
LOOP AT itab_new INTO st.
TRANSFER st TO lv_outpf.
ENDLOOP.
CLOSE DATASET lv_outpf.
CATCH cx_root. "#EC No Handler
ENDTRY.an effective way to do it:
open your dataset in binary mode, transfer the records but between each record transfer the LF (or CRLF according to your need)
after the last record you don't transfer the LF -
Skipping Blank Lines in text File
I am working on an assignment in which i have to read from a text file and store the strings individually. The problem i have is that the text file has blank line between each set of strings. So i figured to use "fin.nextLine();" to skip that blank line and continue with storing the values. but i get
"Exception in thread "main" java.util.NoSuchElementException: No line found
at java.util.Scanner.nextLine(Unknown Source)
at processmsg.ProcessMessages.choice1(ProcessMessages.java:68)
at processmsg.ProcessMessages.main(ProcessMessages.java:25)"
which is where the fin.nexLine() is at. How can i just skip that blank line?
System.out.println("Please enter the file location");
Scanner stdin = new Scanner(System.in);
String fileName = stdin.nextLine();
// read the information from the file
try {
Scanner fin = new Scanner(new File(fileName));
String tSendName = fin.nextLine();
while(tSendName != null)
String tRecieveName = fin.nextLine();
String tPhoneNumber = fin.nextLine();
String tDate = fin.nextLine();
String tTime = fin.nextLine();
String tStatus = fin.nextLine();
String tMessage = fin.nextLine();
PhoneMessage phonemessage = new PhoneMessage(tSendName, tRecieveName,
tPhoneNumber, tDate, tTime, tStatus, tMessage);
fin.nextLine();
tSendName = fin.nextLine();don't know if you want the whole code, the whole code is kind of large and spread out over 3 different classes. and yes the text file is standard
sender
reciever
phone number
date
time
status
message
sender
reciever
phone number
date
time
status
message
sender
reciever
phone number
date
time
status
message
private static void choice()
// scan the file location from the user
System.out.println("Please enter the file location");
Scanner stdin = new Scanner(System.in);
String fileName = stdin.nextLine();
// read the information from the file
try {
Scanner fin = new Scanner(new File(fileName));
String tSendName = fin.nextLine();
while(tSendName != null)
String tRecieveName = fin.next();
String tPhoneNumber = fin.next();
String tDate = fin.nextLine();
String tTime = fin.nextLine();
String tStatus = fin.nextLine();
String tMessage = fin.nextLine();
PhoneMessage phonemessage = new PhoneMessage(tSendName, tRecieveName,
tPhoneNumber, tDate, tTime, tStatus, tMessage);
// skip blank line between entries
fin.nextLine();
// test date string for correct format
int month = Integer.parseInt(tDate.substring(0,2));
int day = Integer.parseInt(tDate.substring(3,5));
int year = Integer.parseInt(tDate.substring(6,10));
// test time string for correct format
int hour = Integer.parseInt(tTime.substring(0,2));
int minute = Integer.parseInt(tTime.substring(3,5));
int second = Integer.parseInt(tTime.substring(6,8));
tSendName = fin.nextLine();
msgList.add(phonemessage);
fin.close();
} catch (FileNotFoundException e) {
System.out.println("The file " + fileName + " was not found!");
} catch (java.lang.NumberFormatException e) {
System.out.println("The date and/or time is not of the correct format");
} -
How to create blank line in alv output
Hi all,
Iam getting alv output with currency values like below
text1 20.0 10.0 30.0
text2 25.0 11.0 30.0
text3 27.0 19.0 30.0
text1 24.0 18.0 30.0
text2 27.0 16.0 30.0
text3 29.0 15.0 30.0
text1 23.0 17.0 30.0
text2 22.0 13.0 30.0
text3 21.0 14.0 30.0
and so on...
My requirement is to create blank line after text3. Since its currency field even i claer work area iam able to get 0.0.
If i use no-zero in field catalog i will be able to get blank values for all 0.0, but thats not required.
Can u help me out how to crate blank line after one set of values(text1, text2, text3) in alv display
ThanksHi,
If i use no-zero, then all 0.0 will be replaced by blank, but that is not required.
I want only blank line to be displayed after set of line items.
Skip doesn't help in alv. Secondly if i append blank work area i will be getting 0.0 as it is a currency field. -
How to insert blank lines in the ALV output.
Hi Friends,
Could any body help me out How to insert blank lines in the ALV output.?? Any Code pls...
Thank you,
Vikram.Chi vikram
do like this
In the fieldcatalog table all the fields should be in editable mode
ie lw_fcat-edit = 'X'.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_callback_program = sy-repid
i_callback_pf_status_set = 'SET_PF_STATUS'
i_callback_user_command = 'USER_COMMAND'
is_layout = lv_layout
it_fieldcat = lt_fcat[]
i_save = 'A'
is_variant = lv_variant
TABLES
t_outtab = lt_license[]
EXCEPTIONS
program_error = 1
OTHERS = 2.
IF sy-subrc 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
ENDFORM. " display_data
*& Form user_command
FORM user_command USING r_ucomm TYPE sy-ucomm
rs_selfield TYPE slis_selfield.
CASE r_ucomm.
WHEN 'ADD'. "
data: lv_ind type i.
data: lv_line type i.
describe table lt_license lines lv_line.
loop at lt_license into lw_license.
lv_ind = sy-tabix.
if lv_ind = lv_line.
append initial line to lt_license.
endif.
endloop.
ENDCASE.
ENDFORM. "user_command
reward points if useful
Rohan -
How to remove blank lines in the end of list .
hi,
in a complex report ,when there are only 20 pages,and linecount is 65(2) ,in the last page only 27 lines are filled and data is completed.then blank lines are printing from 27th line to 63 line.then end of page is triggering.
so plz help me how to remove the blank lines here and immediately print the endof page.Hi,
will this work for you.
SET BLANK LINES OFF.
These statements allow you to specify whether you want to output blank lines or not. Use SET BLANK LINES ON to output blank lines or SET BLANK LINES OFF to suppress them.
Regards
Viswanath Babu -
How to suppress blank line in top and end of portlet
I created one small report (portlet) however when i execute this one; i remarked there is one blank line in the top
and another one at the end of the report. How can i eliminate these lines. I need this space to be able to see
a lot of information in the same page.
I use portal 3.0.9.2After developping a lot of portlet and read a lot of TAR on metalink and a lot of message on OTN i discovered the solution.
Wnen you create one report with the wizard there is no way to erase the first line ( header ) in the result.
Second for the last line of the results ( blank line ) ; the problem is with netsacpe 4.75 ( no problem with internet explorer )
with Netscape you will see one blank line and not with internet explorer ( confirm with Oracle support )
Anyway in the place of developping one report with the wizard ; you can copy and paste your sql statement of your report
inside one dynamic page and control all you want.
I will give you one example than i created; i hope it will help other persons like me
( we need to read a lot of thing to do something really simple with portal )
<HTML>
<HEAD>
<style type="text/css">
<!--
.TabFontText {
font-family: Arial, Helvetica;
font-size: 9pt;
-->
</style>
</HEAD>
<BODY>
<ORACLE>
begin
htp.p('<table cellspacing=0>');
for c in ( select '<a TARGET="_blank" HREF="http://'||ssdw_portal.pkg_globl.
fnc_get_server_port||'/pls/portal30/docs/FOLDER/SSDW_AIDE/'||replace(item.name,
' ','+')||'">'||item.display_name||'</a>' filename , to_char(item.updatedate,'dd/mm/yyyy hh24:mi') last_updated
FROM portal30.wwsbr_all_items item ,
portal30.wwsbr_all_folders folder
WHERE folder.name = 'SSDW_AIDE'
and folder.caid = item.caid
and folder.id = item.folder_id
and item.language = 'us'
and item.name like 'GUIDE%ANG%'
order by item.name ) loop
htp.p('<tr>');
htp.p('<td bgcolor=#CCCCCC width=325>');
htp.p('<font class="TabFontText" >');
htp.p(c.filename);
htp.p('</td>');
htp.p('</font>');
htp.p('<td bgcolor=#CCCCCC width=125>');
htp.p('<font class="TabFontText">');
htp.p(c.last_updated);
htp.p('</td>');
htp.p('</font>');
htp.p('</tr>');
end loop;
htp.p('</table>');
end;
</ORACLE>
</BODY>
</HTML>
Marc Fortin
[email protected] -
How to supress blank lines in smartforms...
Hello Experts,
I am showing the address of the customer in my form but I noticed that when a variable doesn't have a
value, it still shows as a blank line. For example:
Customer 123
<--- I want to remove this line
San Francisco, California.
How can we do this guys?
Thank you and take care!Hi Viraylab,
There are two ways by which you might clear this issue.
1. If you have created a template for the same and under that, if you have created separate rows for each field/group of fields, then you need to remove those rows, as the blank row will be displayed as it is.
2. You can directly write the code for the condense using the statement CONDENSE wa_field.
Regards,
-Syed.
Edited by: wahid hussain syed on Dec 16, 2008 11:17 AM -
How to suppress blank lines in smartforms
Hi all,
How can we suppress blank lines in smartforms?
In my scenario I am having customer address details in main window.
i.e. Name
Street
P O Box
P O Box Location
Post Code
Telephone
Fax.
Suppose if there is no value for P O Box Location the address is getting displayed as
Name
Street
P O Box
-> Leaving blank space
Post Code
Telephone
Fax.
But I want it as
Name
Street
P O Box
Post Code
Telephone
Fax.
i.e The blank line should not be displayed.
Kindly let me know how to do this.
Regards,
Neethupriya.Hi Neethu,
Are you using ADDRESS option in smartforms or code to get address from customer master?
If you are using code, you can give condition like P O Box Location <> SPACE in condition tab.
Pranav -
How to handle blank line in File adapter
Hi,
I am using a file adapter with CSV as input file. If I have a blank line in CSV file, BPEL is failing read it, no instance is created and file is archieved.
Please let me know how to handle this issue.
ThanksHi Yatan,
I am already using rejectedMessageHandlers, I am on 10.1.3.3.
Here's my bpel.xml
============
<?xml version = '1.0' encoding = 'UTF-8'?>
<BPELSuitcase>
<BPELProcess id="EmpAddressUpdABCSImpl" src="EmpAddressUpdABCSImpl.bpel">
<partnerLinkBindings>
<partnerLinkBinding name="ReadFile">
<property name="wsdlLocation">ReadFile.wsdl</property>
<property name="rejectedMessageHandlers">file://E:/HRARCHIVE/BadData</property>
</partnerLinkBinding>
<partnerLinkBinding name="InsertAddressUpd">
<property name="wsdlLocation">InsertAddressUpd.wsdl</property>
<property name="retryInterval">60</property>
</partnerLinkBinding>
</partnerLinkBindings>
<configurations>
<property name="sensorLocation">sensor.xml</property>
<property name="sensorActionLocation">sensorAction.xml</property>
</configurations>
<activationAgents>
<activationAgent className="oracle.tip.adapter.fw.agent.jca.JCAActivationAgent" partnerLink="ReadFile">
<property name="portType">Read_ptt</property>
<property name="rejectedMessageHandlers">file://E:/HRARCHIVE/BadData</property>
</activationAgent>
</activationAgents>
</BPELProcess>
</BPELSuitcase>
Someone told me that this can be achieved by changing the native schema, I tried many options but no result. Please suggest me.
-- Shirish -
How to add blank lines (in column) in SQLplus
I get error when doing below insert, how do I add blank lines in column (via SQLplus)?
insert into a values(1, '78 ABC house,
Some Road
London E34');
ThanksJust set "SQLBLANKLINES" to ON:
SQL> set sqlblanklines on
SQL>
SQL> insert into dept values (50, 'This department
2
3 has several
4
5 blank lines','This
6
7 Loc') ;
1 row created.
SQL> select * from dept where deptno = 50 ;
DEPTNO DNAME LOC
50 This department This
has several Loc
blank lines
1 row selected.
SQL> -
How to avoid blank lines in smartforms?
Hi all,
I am using an INCLUDE TEXT in a smartform. The problem is it is priniting with the blank lines entered in the standard text.
I couldn't find any option for avoiding these blank lines using the respective smartstyles.
Is there any option to avoid the blank lines ? Please help me.
Thanks,
AravindHi,
well if the blank lines are present in the include text.
then you have to modify the standard text.
in the smartform the text is printed as it is.
you need to make changes to the standard text. -
How to skip a line like !-- PJG STAG 4700 -- ?
I am doing a project that requires me to parse a documents.
The documents have different tags, and main text area between <TEXT> and </TEXT>, here is an example:
<DOC>
<DOCNO> FT911-3 </DOCNO>
<HEADLINE>
FT 14 MAY 91 / International Company News: Contigas plans DM900m east
German project
</HEADLINE>
<!-- PJG 0012 frnewline -->
<TEXT>
CONTIGAS, the German gas group 81 per cent owned by the utility Bayernwerk, said yesterday that it intends to invest DM900m in the next four years.
</TEXT>
</DOC>
Since the main porpuse is to read text body, so I will skip those text between tags except <TEXT></TEXT>.
I can use switch statement to skip the text between tags, but I can't find a way to skip a line like:
<!-- PJG 0012 frnewline -->
any suggestions?Let me correct my former statement for jesper1, this is SGML( Standard Generalized Markup Language)
document, early version for XML, so jesper1 are kind of right.
For freekee:
First step:
/** returns a hashmap of initialized tags
* This way we can have more than one tagstring map to the same
* tag type. For example, we might have DOCID and DOCUMENTID both
* map to the BEGIN_DOCID tag.
private HashMap initTags() {
int NUM_TAGS = 20;
Integer tagVals[] = new Integer[NUM_TAGS];
HashMap tags = new HashMap();
for (int i = 0; i < NUM_TAGS; i++) {
tagVals[i] = new Integer(i);
tags.put("<DOC>", tagVals[0]);
tags.put("</DOC>", tagVals[1]);
tags.put("<PARENT>", tagVals[2]);
tags.put("<TITLE>", tagVals[2]);
tags.put("<TL>", tagVals[2]);
tags.put("<HEADLINE>", tagVals[2]);
tags.put("</PARENT>", tagVals[3]);
tags.put("</TITLE>", tagVals[3]);
tags.put("</TL>", tagVals[3]);
tags.put("</HEADLINE>", tagVals[3]);
tags.put("<TEXT>", tagVals[4]);
tags.put("</TEXT>", tagVals[5]);
tags.put("<DOCID>", tagVals[6]);
tags.put("<DOCNO>", tagVals[6]);
tags.put("</DOCID>", tagVals[7]);
tags.put("</DOCNO>", tagVals[7]);
tags.put("<DATELINE>", tagVals[8]);
tags.put("</DATELINE>", tagVals[9]);
return tags;
second step:
/* this will read the file of documents, parse them and return a list of document */
/* objects. Could be called the document factory since it generates useful */
/* document objects that can then be indexed. */
/* Documents are created when an end of document tag is encountered. */
public ArrayList readDocuments() {
String dateline = null;
String docName = null;
ArrayList documentList = new ArrayList();
boolean done = false;
int documentID = 0;
int length = 0;
int offset = 0;
String title = null;
boolean endOfFile = false;
while (! done) {
System.out.println("Token --> " + in.sval);
/* check to see if we hit the end of the file */
try {
if (in.nextToken() == in.TT_EOF) {
done = true;
endOfFile = true;
continue;
/* now test for a tag */
switch (in.ttype) {
// where does "END_DOC" come from?
// Since: tags.put("</DOC>", tagVals[1]), so </DOC> is mapped to value 1.
// and since in the initialization: private final static int END_DOC = 1;
// in.ttype returns a int, like TT_WORD
case END_DOC:
/* when we hit the end of a document, lets create a new object */
/* to store info needed for indexing */
length = in.currentPosition - offset;
Document d = new Document (documentID, docName, title, dateline,
inputFileName, offset, length, distinctTerms);
++documentID;
documentList.add(d);
break;
/* initialize document attributes when we start a new doc */
case BEGIN_DOC:
System.out.println("Started new document");
offset = in.currentPosition;
docName = null;
dateline = null;
title = null;
distinctTerms = new HashMap();
break;
case BEGIN_DOC_NAME:
docName = readNoIndex(in, END_DOC_NAME);
break;
case BEGIN_TITLE:
title = readNoIndex(in, END_TITLE);
break;
case BEGIN_DATELINE:
dateline = readNoIndex(in, END_DATELINE);
break;
case BEGIN_TEXT:
readText(in, stopWords);
break;
/* only time we get a word here is if its outside of any tags */
case WORD:
break;
default: {
System.out.println("Unrecognized tag: "+in.sval);
System.exit(-1);
} catch (IOException e) {
System.out.println("Exception while reading doc ");
e.printStackTrace();
return documentList;
}Did I answer your question correctly? -
How to SKIP a line in REPORTS 2.5 ?
Hi
I am trying to print something on a sheet which has perforations in the middle of the sheet. I need to skip the perforation line from my repeating frame which keeps printing the data. For eg. If I cross line no 11 then I need to skip one line and then start printing.
Could someone help with this one.
Thanks
Prabs
nullHi,
Add "SKIP 1" to the BREAK command:
BREAK ON amount SKIP 1 -
I wants to count number of blank lines in a java program using io package. Please give your logic or code.
regards
YOGESHI think this class will help you:
http://www.cs.arizona.edu/people/reges/teachers/TextReader.html
This class has methods to readLine(), which reads a line until it gets to a "\n" (end line character). If you want to do, what I thought you want to do, you could readLine(), which returns a string, then say
String line = (input.readLine()).trim();
if(line.equals(""))
blankLines ++;
Anyway, I hope this helps, and another thing that would probably help you too, is if I actually showed you where to get the TextReader class :-) , so... here is where to get it:
http://www.cs.arizona.edu/people/reges/
then just click on TextReader which will be on the frame to your left. From there you can download the source and use it.
good luck
Maybe you are looking for
-
I also tried a hard reset ( I read in a discussion that it usually fixes most problems), but nothing when it askes me to connect it to itunes it does not work.
-
Transfer functions imported from Simulink through MIT not working in Labview
Hi, I am just starting to use Labview interface with Simulink using Model Interface Toolkit (MIT). I am trying to import an integrater model from simulink. The model is very simple. An input port connected to an output port through an integrator mode
-
Is 2 INIT possible with selective data
Hi I m havg around 50000 consumer data, and in cube it's not uploading the whole data in one go, can i do 2 INIT with SELECTIVE UPLOADING means 25000 consumer first time and 25000 consumer 2nd time only through INIT. Gaurav
-
Unable to restore using enter prise manager 10.0?
Hi, I have taken the backup using enter prise manager 10.0 . when i am trying to restore in another machine it got failed to restore ? please can anyone tell me how to perform the restore option ? Thanks Rangan Sampath
-
Inside bleed on facing pages?
hi, im creating a spiral bound booklet in cs4 i've set up master facing pages with my margins and grid, just wondering if it's possible to split the pages so that there is space between the pages to set up an inside bleed, but still remain in a sprea