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
Sreeni

Hi,
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!

Similar Messages

  • How to create a tab-delimited text file?

    Hi,
    I need to create a tab-delimited text file at presentation server getting content from an internal table. My file should also have a header - also tab-delimited. Data for a header is stored in some work area.
    Any ideas how to add tab-delimiter into a text file? Or should I go for a HEX file and use
    CONSTANTS: c_tab TYPE x VALUE '09'.
    and separate my data with this constant instead?
    Any thoughts whould be appreciated.
    TIA
    Ivaylo Mutafchiev

    Hi Ivaylo,
    Refer sample code:
        IF i_final_head[] IS NOT INITIAL.
          CALL FUNCTION 'GUI_DOWNLOAD'
            EXPORTING
              filename                = lcl_filename
              filetype                = 'ASC'
              write_field_separator   = 'X'
            TABLES
              data_tab                = i_final_head
            EXCEPTIONS
              file_open_error         = 1
              file_read_error         = 2
              no_batch                = 3
              gui_refuse_filetransfer = 4
              invalid_type            = 5
              no_authority            = 6
              unknown_error           = 7
              bad_data_format         = 8
              header_not_allowed      = 9
              separator_not_allowed   = 10
              header_too_long         = 11
              unknown_dp_error        = 12
              access_denied           = 13
              dp_out_of_memory        = 14
              disk_full               = 15
              dp_timeout              = 16
              OTHERS                  = 17.
          IF sy-subrc <> 0.
            MESSAGE s000 WITH text-031.
            EXIT.
          ENDIF.
        ENDIF.
    Reward points if this helps.
    Manish
    Message was edited by: Manish Kumar

  • 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 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

  • How to create an UTF8 data file with max length fields

    We have a legacy application which allows for a transparent text field a maximum length of 30 Bytes.
    The DB-Length of the field is 40 Chars.
    In old NUC days it was so simple:
    TYPES: BEGIN OF t_items,
             hwmc(30) TYPE C,  
    A move, that was it.
    Now we have migrated to unicode, use UTF8 for the external data and are puzzeling over how to create an output field with a fixed length of 30 Bytes.
    Has somebody an elegant idea?

    wyfwong, >> Does the schema which stores a large BLOB column has to create a large tablespace in order to store the column value or the database automatically enlarge the tablespace when a large BLOB column is loaded into the table? <<
    The answer to this question would depend on how you defined the tablespace adn datafiles used to store the tablespace objects to begin with: raw partitions verse files, autoextend on or off, etc....
    It would seem to me to be foolish not to predefine the tablespace at least large enough to hold the tables and indexes based on their expected near_term data loads. That is, if you know the initial load of data will be 60G then the tablespace should be larger than 60G to start with.
    HTH -- Mark D Powell --

  • How to create PDF from text file with specific layout?

    I wanted to create the pdf from text file in specific layout - Landscape orientation and JIS B3 Page size while at Adobe Acrobat Pro.
    In past, I could do a right click on a text file (desktop area) and select print to print out the document into .pdf BUT only if I set the Adobe PDF to Landscape and JIS B3 Page size BEFORE.  And I could only do 15 text documents at once.
    I wanted to see if I could do the create the pdf from text file with specific layout in Adobe Acrobat without having to go to Control Panel to preset the Adobe PDF to specific layout at every time.   I would have to set Adobe PDF back to normal layout after I'm done with these pdf print outs.  I do lots of pdfs in normal layout.  Sometimes I would forget to do that.
    So, How do I do that?

    No such luck.  It would output the contents in letter size even in JIS B3 Page layout at MS word. 
    Is there a script or action where I could set the orientation and page size before creating PDF on these text files?

  • 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.
    Suresh

    data: 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.

  • How to create a matrix like report with description column

    Hi,
    currently i have two tables - one describing a job and another describing the stock. it is a simple relation where a job uses stock.
    i join job and stock using stock_code. there are three categories of stock - namely envelope, insert, stationary.
    i wish to create a cross tab report - basically i would like it to look like
    jobname, envelope, stationary, insert
    abc, e1, s1, i1
    , ,s2,i2
    def, e2,s3,i4
    , e3, , i5
    basically for each job i would like to place the stock code under envelope, stationary, or insert based on what type of stock it is. i can do this in sql, however, i get left with blank spaces.
    i do this by
    select     
    "FILE_PARAMETER"."FILE_NAME" as "FILE_NAME",
    "CATEGORY",
    "STOCK"."STOCK_CODE" as "STOCK_CODE",
    decode(upper("CATEGORY"), 'LASER', "STOCK_CODE", '') "LASER",
    decode(upper("CATEGORY"), 'ENVELOPE', "STOCK_CODE", '') "ENVELOPE",
    decode(upper("CATEGORY"), 'INSERT', "STOCK_CODE", '') "INSERT",
    decode(upper("CATEGORY"), 'INSERT',"STOCK"."DESCRIPTION",'') "DESCRIPTION"
    from
    "FILE_PARAMETER" "FILE_PARAMETER",
    "JOB_OVERVIEW" "JOB_OVERVIEW",
    "STOCK" "STOCK"
    where
    "FILE_PARAMETER"."FILE_NAME"="JOB_OVERVIEW"."AP_JOB_CODE"
    and "FILE_PARAMETER"."SCODE"="STOCK"."STOCK_CODE"
    ORDER BY "FILE_PARAMETER"."FILE_NAME", "CATEGORY"
    unfortunately this doesn't give me exactly the output i want. i would like it to show the first piece of stock in each category on the first line, and each subsequent stock on the line after that for each job group. my solution at the moment will put the stock in the corresponding stock category column but i have been unable to find a solution to removing the blank space.
    i have created the matrix report in developer and it can do what i want, however, it will not show the description for insert only. the way i have grouped it, it wants to show it all, and being a reports newbie i have no idea how to fix that
    any solutions would be very much appreciated!

    This feature is supported in MS Access and known as CROSSTAB through TRANSFORM function.
    In Oracle this exists but not in a elegant way as in MS.
    You have addition function GROUP BY ROLLUP and CUBE and GROUP BY GROUPING SETS, available in 10g, which can help you.
    Look in manuals and play with it!

  • Create tab delimited file

    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 Meyer

    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 Meyer

  • Opening a tab delimited file and replacing a space

    Hi,
    I am trying to open a tab delimited file with 4 columns and corresponding values under it. If no value under the column, 0 should be replaced. I used the StringTokenizer and the split methods, but this doesnt seem to work. Any ideas?
    E.g
    Title1 Title2 Title3
    4 7
    5 2
    SHould be like this:
    Title1 Title2 Title3
    4 0 7
    0 5 2
    Thanks..

    The answer, however, is no. Java is a strongly typed
    language; there is no predefined manner in which a
    String object can be casted to an Integer object
    because a String is not an Integer.
    However, if you'd like to create an Integer based on
    the contents of a String, you can pass the String to
    the Integer.parseInt(String) method. That method
    will do one of two things: return the Integer object
    representing the integer contained within the String
    (if the String represents an Integer) or throw a
    NumberFormatException (if the String is not an
    Integer).Hi,
    Thanks tvynr for your reply. Ok first things, sorry, I had written that post in a hurry. Yes i dont usually put capital letters for my fields. Also i did mean using the add method. Not the get..
    And yes I have tried various different type castings. Just to see if one of them would work. And yes i did try Integer.parseInt() by passing in the string to get back its contents as an integer. *And yes the String content is an integer.
    Heres a snippet of my code -
                  List ArrScore1 = new ArrayList(); //List to store Score in one Array
                  List ArrScore2 = new ArrayList(); //List to store same Scores in another Array. FOr comparisions
                  List SCORES = new ArrayList();
                  int dist1,dist2 = 0;
                  float distance,percent;
                    while ((record = br.readLine())!= null)     //To read from a file line by line from first line
                      recCount++;
                      String rec = record;
                      String [] ScoreScop = rec.split("\t");
                      ArrScore1.add(ScoreScop[4])); 
                      ArrScore2.add(ScoreScop[4]);
                    } //End of While loop
                 System.out.println("Total Records: " + recCount);
                 for (int i=0; i<ArrScore1.size(); i++)
                    for (int j = i + 1; j < ArrScore2.size(); j++)
                       dist1  = Integer.parseInt(ArrScore2.get(j));  //Error I get here is is Cannot resolve symbol. What does this mean exactly?
    dist2 = Integer.parseInt(ArrScore1.get(i)); //Same error
    distance = dist1/dist2;
    percent = distance * 100;
    SCORES.add(percent); //Again same error
    } //End of j loop
    } // End of i loop
    I have included all the necessary packages as well. Including :
    import java.io.*;
    import java.util.*;
    import java.lang.*;
    import java.util.List;
    import java.util.ArrayList;Any idea what I am doing wrong here?

  • Tab Delimited File?

    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,
    XIer

    Hi 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

  • Opening a tab-delimited file in numbers

    Hello,
    I have a tab-delimited file with the extension .srt to open in Numbers. I can do this easily in Microsoft Excel by going to the Open menu. It then gives me the option to say how the file is delimited and then it opens it. I can't seem to do this in Numbers... When I get to the Open menu and try to open the file, it is grayed out, so unaccessible... how does one do this in Mac?
    Thanks

    As was explained here many times, Numbers may open csv files if :
    (1) the file name ends with ".csv"
    (2) values are separated by commas if the decimal char in use on the machine is the period
    values are separated by semi-colons if the decimal char in use on the machine is the comma.
    (3) we have no way to change the values separator.
    Yvan KOENIG (VALLAURIS, France) samedi 18 juin 2011 20:50:54
    iMac 21”5, i7, 2.8 GHz, 4 Gbytes, 1 Tbytes, mac OS X 10.6.7
    Please : Search for questions similar to your own before submitting them to the community
    To be the AW6 successor, iWork MUST integrate a TRUE DB, not a list organizer !

  • 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

  • Program to upload data from a tab-delimited file ...

    I have to upload data from a tab-delimited file with following fields into database table(ZCBU) with same fields:
    CBU (parent)
    KUNNR (child)
    ERDAT (effective from)
    MANDT (client)
    SFID (salesforce ID)
    AEDAT (effective to)
    AENAM (assigned by).
    This file can be of type PC(txt) or UNIX.
    plz tell me how to do this in both type of files

    Hi,
    DATA: bdcdata LIKE bdcdata    OCCURS 0 WITH HEADER LINE.
    DATA: xfile TYPE string.
    DATA: BEGIN OF itab OCCURS 0,
            empno TYPE zmemp-empno,
            name  TYPE zmemp-first_name,
            last  TYPE zmemp-last_name,
            comp  TYPE zmemp-comp,
            place TYPE zmemp-place,
            END OF itab.
    PARAMETER : p_file TYPE rlgrap-filename OBLIGATORY.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file.
    Form to get the file path of legacy data stored on presentation server
      PERFORM get_file_path.
    START-OF-SELECTION.
      MOVE p_file TO xfile.
    to get the data from excel sheet data into an internal table
      PERFORM get_data.
      LOOP AT itab .
        REFRESH bdcdata.
        PERFORM bdc_dynpro      USING 'ZM_EMPLOYEE' '9001'.
        PERFORM bdc_field       USING 'BDC_CURSOR'
                                      'S9001_EMPNO'.
        PERFORM bdc_field       USING 'BDC_OKCODE'
                                      '=CREA'.
        PERFORM bdc_field       USING 'S9001_EMPNO'
                                      itab-empno.
        PERFORM bdc_dynpro      USING 'ZM_EMPLOYEE' '9002'.
        PERFORM bdc_field       USING 'BDC_CURSOR'
                                      'S9002_PLACE'.
        PERFORM bdc_field       USING 'BDC_OKCODE'
                                      '=SAVE'.
        PERFORM bdc_field       USING 'S9002_EMPNO'
                                      itab-empno.
        PERFORM bdc_field       USING 'S9002_FIRST_NAME'
                                      itab-name.
        PERFORM bdc_field       USING 'S9002_LAST_NAME'
                                      itab-last.
        PERFORM bdc_field       USING 'S9002_COMP'
                                      itab-comp.
        PERFORM bdc_field       USING 'S9002_PLACE'
                                      itab-place.
        PERFORM bdc_dynpro      USING 'ZM_EMPLOYEE' '9001'.
        PERFORM bdc_field       USING 'BDC_CURSOR'
                                      'S9001_EMPNO'.
        PERFORM bdc_field       USING 'BDC_OKCODE'
                                      '=BACK'.
        CALL TRANSACTION 'ZMEMP'
        USING bdcdata
        UPDATE 'A'
        MODE   'N'.
      ENDLOOP.
           Start new screen                                              *
    FORM bdc_dynpro USING program dynpro.
      CLEAR bdcdata.
      bdcdata-program  = program.
      bdcdata-dynpro   = dynpro.
      bdcdata-dynbegin = 'X'.
      APPEND bdcdata.
    ENDFORM.                    "BDC_DYNPRO
           Insert field                                                  *
    FORM bdc_field USING fnam fval.
      CLEAR bdcdata.
      bdcdata-fnam = fnam.
      bdcdata-fval = fval.
      APPEND bdcdata.
    ENDFORM.                    "BDC_FIELD
    *&      Form  get_file_path
    FORM get_file_path .
      CALL FUNCTION 'KD_GET_FILENAME_ON_F4'
        CHANGING
          file_name = p_file.
    ENDFORM.                    " get_file_path
    *&      Form  get_data
    FORM get_data .
      DATA : lines1 TYPE i.
      MOVE p_file TO xfile.
      CALL FUNCTION 'GUI_UPLOAD'
        EXPORTING
          filename            = xfile
          filetype            = 'ASC'
          has_field_separator = 'X'
        TABLES
          data_tab            = itab.
      DESCRIBE TABLE itab LINES lines1.
      WRITE : / lines1 , 'REcords uploaded' .
    ENDFORM.                    " get_data
    Regards,
    Nihar Swain,

  • Import tab delimited file into pdfs

    I have a tab delimited file with 1000's of rows. I want to complete a form and save it for each row. Rather than using the importData() function by itself and manually going through each record I would like to automate this so it will fill out a form for each row and save a copy of each. I have a little experience in acrobat javascript, but some knowledge of building the form and adding javascript.

    You can use the doc.importTextData method to import a row of data into the form and then use the doc.extractPages method to save to a new file, clear the form, and repeat the process for each row.
    importTextData: http://livedocs.adobe.com/acrobat_sdk/9.1/Acrobat9_1_HTMLHelp/JS_API_AcroJS.88.502.html
    extractPages: http://livedocs.adobe.com/acrobat_sdk/9.1/Acrobat9_1_HTMLHelp/JS_API_AcroJS.88.465.html
    Note that the return codes for importTextData in the documentation are wrong. The positive values should be negative and vice versa.

Maybe you are looking for

  • Problem with XSU

    select trim(st.sql_text) as SQL from sys.v_$sqltext st, v$session se where st.address = se.sql_address and st.hash_value = se.sql_hash_value and se.sid = " + sid + " order by piece This query when used in OracleXMLQuery(conn, query).getXMLDOM() retur

  • In SAP 4.6c In classical reports output how to change Font size and Font type

    Dear Experts, In SAP 4.6c, in classical and interactive reports  output how to change font size and font type. Regards, Zaker.

  • Open in read / set save path

    Hello, I would like to open an image in read only mode and then set the save path to save to a different directory, without actually saving the document. The former i can manage. When the user selects save I wish the save directory to be different fr

  • Premiere pro keeps crashing since we updated to CC 2014.

    Specifically it will freeze the image while playing, continue to play the audio and still responds to play and stop commands and will allow to save but the picture will not come back till I close Premiere.  When I do close Premiere it seems to not fu

  • Dashboard image link with repository variable "script injection" warning.

    Hello, in order to make the migration easier we want to parameterize the URLs so they are centrally managed in the repository and not on every single dashboard page. Since I figured out the following works for a dashboard text item: '@{biServer.varia