IDoc to file - how to delete a blank record at the end of the file.

Hi,
My senario is IDoc to file.  I have successfully implemented this using FCC. But when i checked the flat file, it has a blank record at the end of the file( i think PI adds one blank line/record at the end of the file).  Please suggest me What i need to do, to delete the blank record .
Thanks & regards
Sreeni

Kindly Check below.
Check whether the problem is at mapping level of  adapter level.. to do this count no. of rows/IDOC before mapping and after mapping in IE and no. of rows in the output file.
Thnx
Subbu

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

  • TS1367 My MacBook air has a blinking file folder icon on a blank screen with a ? In the center of the icon. I've tried turning on and off three times but it hasn't helped.  Any suggestions?

    My MacBook Air has a blinking file folder icon on a blank screen with a ? In the middle of the icon. I've tried turning my computer off and on three times with no luck.  Any recommendations on how to fix the problem? 

    Reinstall OS X without erasing the drive
    1. Repair the Hard Drive and Permissions
    Boot from your Snow Leopard Installer disc. After the installer loads select your language and click on the Continue button. When the menu bar appears select Disk Utility from the Utilities menu. After DU loads select your hard drive entry (mfgr.'s ID and drive size) from the the left side list.  In the DU status area you will see an entry for the S.M.A.R.T. status of the hard drive.  If it does not say "Verified" then the hard drive is failing or failed. (SMART status is not reported on external Firewire or USB drives.) If the drive is "Verified" then select your OS X volume from the list on the left (sub-entry below the drive entry,) click on the First Aid tab, then click on the Repair Disk button. If DU reports any errors that have been fixed, then re-run Repair Disk until no errors are reported. If no errors are reported click on the Repair Permissions button. Wait until the operation completes, then quit DU and return to the installer.
    If DU reports errors it cannot fix, then you will need Disk Warrior and/or Tech Tool Pro to repair the drive. If you don't have either of them or if neither of them can fix the drive, then you will need to reformat the drive and reinstall OS X.
    2. Reinstall Snow Leopard
    If the drive is OK then quit DU and return to the installer.  Proceed with reinstalling OS X.  Note that the Snow Leopard installer will not erase your drive or disturb your files.  After installing a fresh copy of OS X the installer will move your Home folder, third-party applications, support items, and network preferences into the newly installed system.
    Download and install Mac OS X 10.6.8 Update Combo v1.1.

  • How to add a new line at the end of eTEXT file

    Hi,
    I have modified the RTF template for the R12.1.3 Positive Pay File report (IBYPOS_PAY_en.rtf). Everything is good, except that the bank requires a "T" (Capital T) character in a new line at the end of the text file. Has any of you came across this before? How do I modify the template to achieve this?
    Thank you,
    Sinan Topuz

    I believe this is related to BI Publisher. Any comments would be greatly appreciated.
    Thanks,
    Sinan

  • How can I Read lines of data from a file starting at the end of the file??

    Can anyone help me with how to read lines of data starting from the end of a file instead of the beginning?? I do not want to load the entire file into memory as the files are very rather large. Instead I want to start at the end of the file and read lines backward , until I find the particular data item i am searching for, then stop.
    Can this be done in Java ? I know it can be done in Perl.
    Thanks.

    Thanks for your suggestion about the RandomAccessFile, I did actually thought about that approach , but wasn't sure it would work.
    I do not want to read the file in a sequential forward manner because the files contain large number of lines of data that have already been processed and therefore there is no need to reprocess these lines of data.
    The Unprocessed lines are always at the the end of the file and these are the data lines I am interesting in getting at without having to read the entire file. Therefore, i figure that if I can read the data from the end of the file then this would be much more efficient.

  • Extra Blank line inserted at the end of the target file

    Hi,
    This is File to File senario and target files created with a extra blank line at the end of the file.
    Below is the source file structure and the content.
    <ns0:MT_MOD_FL xmlns:ns0="http://file2file/MES">
       <EMPLOYEE>
          <ID>12</ID>
          <Name>SREENI</Name>
          <Designation>M2</Designation>
       </EMPLOYEE>
       <EMPLOYEE>
          <ID>121</ID>
          <Name>RAJA</Name>
          <Designation>M3</Designation>
       </EMPLOYEE>
    </ns0:MT_MOD_FL>
    Below is the generated target file
    12     SREENI     M2
    121     RAJA     M3
    Here Generated target file suppose to have only two line instead of 3.
    What exactly do i need to change to generate the file with 2 line.
    I am not using any mapping as both source and target message structure are same.
    IN FCC i used only fieldSeparator, even i have not used endSeparator.
    Thanks in Advanace...

    Hi! Raghu,
    Just go through the below Help..documantation
    [http://help.sap.com/saphelp_nw04/helpdata/en/0d/5ab43b274a960de10000000a114084/frameset.htm]
    NameA.endSeparator
    To define an additional string as a separator after the last column in a row, specify it here. The system skips this string when it processes the last column (otherwise the system would treat it as part of the last column).
    NameA.fieldSeparator
    If you make an entry here, the system expects that the structure contains the specified character string (one or more characters) as a separator between the individual columns.
    If you have not made an entry for fieldFixedLengths, this is the only specification to identify the individual columns in a row.
    If you made a specification for fieldFixedLengths, the extra length of the separator is taken into account, but no further consistency checks are performed.
    Regards::
    Amar Srinivas Eli

  • Previously Firefox would show a number at the end of the file name (renaming the file by adding a number) showing that I had already downloaded a file at least once before. Recently that isn't happening. How do I get that feature back?

    When downloading, previously Firefox would show a number at the end of the file name (renaming the file by adding a number) showing that I had already downloaded a file at least once. Now that isn't happening. How do I get that feature back?

    When downloading, previously Firefox would show a number at the end of the file name (renaming the file by adding a number) showing that I had already downloaded a file at least once. Now that isn't happening. How do I get that feature back?

  • How to delete a database record by using EJB entity beans

    Hi, All,
    Does anyone know how to use entity bean to delete a database record? I have all the EJB entity beans created, including access beans to each. I can successfully create records, find and update records, however, I haven't find a way to delete records yet.
    Your response is appreciated.
    Cathy

    Please see EJB Forums for continue discussion on this subject.
    Reference titile: "how to delete database record by using CMP entity beans "

  • How to remove the blank lines at the end of the JTextArea .

    Hi,
    I need to remove the blank lines in the JTextArea at the end. Suppose i am giving 'A' in the first line and press the enter key two times, after i am giving the 'B' in the third line and press enter key for two times. I need to remove, the last two lines of JTextAreae, . How i can remove these lines?

    String#trim() removes all whitespace from both ends of the String.
    The requirement was to remove line breaks from the end of the String only.
    String#replaceAll with a suitable regex would do the trick. Untested regex for this:text.replaceAll("[\\n\\r]+$", "")db

  • How to write to the end of a file

    i am tryign to write to the end of a file using bufferwriter and bufferreadear. I am trying to the read the file until i reach the end and then write in the end. I have some code but i dont know how to read until the end of the file.
    File file = new  File ("Product.txt");
              FileReader reader = new FileReader (file);
              BufferedReader readBuff = new BufferedReader (reader);
              FileWriter write = new FileWriter(file);
              BufferedWriter writeBuff = new BufferedWriter(write);
              String line = readBuff.readLine();     
    // i know i need to put a while loop somewhere around here

    I want to write to the end of the file, what do you mean when you say "then write() until you've written that many bytes, which will overwrite the bytes already in the file."
              File file = new  File ("Products.txt");
              FileReader reader = new FileReader (file);
              BufferedReader readBuff = new BufferedReader (reader);
              FileWriter write = new FileWriter(file);
              BufferedWriter writeBuff = new BufferedWriter(write);
              String line = readBuff.readLine();
              long fileSize = file.length();
              readBuff.close();
              writeBuff.close();
              } catch (IOException e){
                   System.out.println ("Error -- " + e.toString());
         }

  • I want to write record type variable in ult file.How to i can write record type varable without column name.

    I want to write record type variable in ult file.How to i can write record type varable without column name.
    type rec_format_type is record
         format1  VARCHAR(3),
         format2  VARCHAR(3),
    my_record     rec_format_type;
    UTL_FILE.PUT_LINE(file_out, my_record);

    ibney wrote:
    I have below requirement.
    DECLARE
         emp_data UTL_FILE.FILE_TYPE;
    BEGIN
        emp_data := UTL_FILE.FOPEN ('EXDATAPUMP','TEST_BC_NN_PARALLEL.csv','W',32000);
        FOR TEST1 IN (SELECT /*+ PARALLEL(TEST_BC_NN,4) */  * FROM TEST_BC_NN) LOOP
            UTL_FILE.PUT_LINE (emp_data, TEST1);---Here i want to write record in utl file.without knowing the structure of table
        END LOOP;
        UTL_FILE.FCLOSE (emp_data);
    END;
    Why all the ugly upper case? You do realise that NO programming standard, ranging from Java and .Net, to C/C++ and Ada (of which PL/SQL is an implementation of), use upper-case-for-reserved-words as a standard.
    The easiest and simplest way to address your requirement is as follows:
    SQL> create or replace type TStringArray is table of varchar2(4000);
      2  /
    Type created.
    SQL>
    SQL>
    SQL> begin
      2          for c in(
      3                  select
      4                          TStringArray(
      5                                  to_char(empno,'000000'),
      6                                  ename,
      7                                  to_char(hiredate,'yyyy-mm-dd')
      8                          ) as COLS
      9                  from    emp
    10                  order by empno
    11          ) loop
    12                  for i in 1..c.Cols.Count loop
    13                          dbms_output.put( c.Cols(i) );   -- write column
    14                          if i < c.Cols.Count then
    15                                  dbms_output.put( '|' ); -- write column separator
    16                          end if;
    17                  end loop;
    18                  dbms_output.put_line( ' *end*' );               -- write record terminator
    19          end loop;
    20  end;
    21  /
    007369|SMITH|1980-12-17 *end*
    007499|ALLEN|1981-02-20 *end*
    007521|WARD|1981-02-22 *end*
    007566|JONES|1981-04-02 *end*
    007654|MARTIN|1981-09-28 *end*
    007698|BLAKE|1981-05-01 *end*
    007782|CLARK|1981-06-09 *end*
    007788|SCOTT|1987-04-19 *end*
    007839|KING|1981-11-17 *end*
    007844|TURNER|1981-09-08 *end*
    007876|ADAMS|1987-05-23 *end*
    007900|JAMES|1981-12-03 *end*
    007902|FORD|1981-12-03 *end*
    007934|MILLER|1982-01-23 *end*
    PL/SQL procedure successfully completed.
    SQL>

  • How to change "_review" at the end of the file name in Acrobat XI Pro

    For our business workflow, we need to be able to change the "_review" at the end of the file name when creating shared-review PDFs. Older versions of Acrobat Pro allowed me to customize the ending of the file name before it was saved as a shared review PDF. For example, when we send the initial review PDF, we append "_Review"; when we send a mark-up PDF (to capture changes before the next revision), we append "_Mark-Up". However, the XI Pro version does not (it automatically appends "_review" and doesn't give an option to change it).
    Is there something I need to configure in my settings to allow file name changes for shared-review PDFs?

    So why did you said that in your first posting? My glass sphere is out for cleaning...
    Instead of type c use strings and add spaces until they have the appropriate length.
    loop at outtab assigning <pout>.
      while strlen( <pout>-val ) < 135.
        concatenate <pout>-val `` into <pout>-val.
      endwhile.
    endloop.

  • Remove Line feed at the end of the file while using file adapter

    Hi All,
    I have a requirement. We are sending a file from SAP to FTP using file adapter. we are successful in sending the file to FTP but at the end of the file a extra blank line is created .
    Can anyone please suggest how to remove the extra line feed at the end of the file.
    Thanks and Regards,
    LRK.

    check this:
    http://help.sap.com/saphelp_nw04/helpdata/en/2c/181077dd7d6b4ea6a8029b20bf7e55/frameset.htm
    To define an additional string as a separator after the last column in a row, specify it here. The system skips this string when it processes the last column (otherwise the system would treat it as part of the last column).
    Also there are solved threads which deal with same problem....you can even check them out...
    regards,
    Abhishek.

  • TS4592 I have an ibooks file that when I make a change to a page in one chapter it throws a bunch more pages in at the end of the chapter from another chapter in the book.  Anybody have any ideas what is going on?

    I have an ibooks file that when I make a change to a page in one chapter it adds additional pages at the end of the chapter from another chapter.  Any ideas what is going on and how I can fix this?

    Text  pages?  from what you say you are getting the auto flow function to add pages either because you have  flowing text or because you  have a lot of blank lines as you would if  you  tap return to  move  blank space around.

  • How do I duplicate layers & groups without automatically adding a "copy", "copy 1", "copy #" at the end of the new group?

    How do I duplicate layers & groups without automatically adding a "copy", "copy 1", "copy #" at the end of the new group?
    It's been pestering me for quite a while now, since I often work with the same elements over and over again. Its frustrating to have to change the name of each layer manually, especially if I'm copying a whole group.
    Is there a setting in Photoshop or perhaps an external script that can help fix this for me?
    Cheers,
    Qiming

    There is no way to defeat this within the program itself. Here's the workaround:
    Duplicate the file (from the Image menu).
    Drag the Group or layers from the Layers list from the duplicate to the image window of the original , while holding down Shift.
    That will make a "copyless" copy and reposition the copyed material in the exact same position it was on the original.

Maybe you are looking for

  • Allowing Digital signatures for Reader

    I've come across an issue that I have not been able to figure out. I have created a pdf on my computer which has Acrobat X. Within my document I have portions where there are digital signature. Now I can sign the blocks when I use my computer, but wh

  • How can I add a third line of text to a title?

    I am making a music video for my highschool students to teach about recycling and I want to add a title to the bottom with the song title, the name of the ficticious band and the ficticious record label. I have tried to add the third line of text, bu

  • Support for windows 2k12 R2 and Exchange 2k13 in Oracle VM 3.3.1

    We are planning to deploy Windows 2k12 R2 and exchange 2k13 in Oracle VM 3.3.1 which is based on Xen 4.3 hypervisor.  Kindly let me know whether windows 2k12 R2 and exchange 2k13 is supported on ovm 3.3.1 or not. if not then what is the possibility o

  • After Upgrade into SP 2013 Business data from other SQL DB

    Hi All, We are in process of SP upgrade from 2010 to 2013. We had a basic form in 2010 that was designed using SP Designer 2010. Now after the upgrade, we need to add few new fields (some might be drop-down lists) which will pull business data from S

  • How to change deployment.properties

    hi there, here's the situation : i am working on an intranet aplication with jws. The company has a proxy. So most of the users can't access internet. The users need to install java 5.0 to run the application. I've managed to automatically install it