Error with the data format in the TXT file, sending as an Email attachment

Hi all,
I have an problem in the data formating in the TXT file while sending as an attachment via an email by using the FM "SO_DOCUMENT_SEND_API1".
For eg:
The data in the TXT file is looking like as follows:
0 0 0 0 2        L O U D S P E A K R   O T H E R   3 8 W h i t e                  0 0
0031  L O U D S P E A K R   O T H E R   3 8 Black                               0 000
38    L O U D S P E A K R   O T H E R   3 8 Brown                                  0 00040
L O U D S P E A K R   O T H E R   3 8 Brown                                         0 00042
and so on
But it should come as :
0 0 0 0 2  L O U D S P E A K R   O T H E R   3 8 W h i t e
0 0 0031   L O U D S P E A K R   O T H E R   3 8 Black
0 00038    L O U D S P E A K R   O T H E R   3 8 Brown
0 00040    L O U D S P E A K R   O T H E R   3 8 Brown
All the internal tables are correctly filled.
The code is as follows:
gwa_objtxt = 'Please find attached DATA EXTRACT Sheet'.
  append gwa_objtxt to git_objtxt.
describe table git_objtxt lines gv_cnt.
  clear git_doc_data.
  read table git_objtxt index gv_cnt.
  git_doc_data-doc_size = ( gv_cnt - 1 ) * 255 + strlen( gwa_objtxt ).
  git_doc_data-obj_langu = sy-langu.
  git_doc_data-obj_descr = lv_mtitle.
  append git_doc_data.
  clear git_packing_list.
  refresh git_packing_list.
git_packing_list-transf_bin = space.
  git_packing_list-head_start = 1.
  git_packing_list-head_num = 0.
  git_packing_list-body_start = 1.
  git_packing_list-body_num   = gv_cnt.
  git_packing_list-doc_type = 'RAW'.
  append git_packing_list.
  Clear : gv_cnt.
  Describe table git_objbin lines gv_cnt.
  git_packing_list-transf_bin = 'X'.
  git_packing_list-head_start = 1.
  git_packing_list-head_num = 1.
  git_packing_list-body_start = 1.
  git_packing_list-body_num = gv_cnt.
  git_packing_list-doc_type = 'TXT'.
  git_packing_list-obj_descr = 'ATTACH.TXT'.
  git_packing_list-obj_name = 'book'.
  git_packing_list-doc_size = gv_cnt * 255.
  APPEND git_packing_list.
  clear git_receivers.
  refresh git_receivers.
  git_receivers-receiver = gv_eid.
  git_receivers-rec_type = 'U'.
  append git_receivers.
CALL FUNCTION 'SO_DOCUMENT_SEND_API1'
    EXPORTING
      DOCUMENT_DATA              = git_doc_data
      PUT_IN_OUTBOX              = 'X'
      COMMIT_WORK                = 'X'
    TABLES
      PACKING_LIST               = git_packing_list
      CONTENTS_BIN               = git_objbin
      CONTENTS_TXT               = git_objtxt
      RECEIVERS                  = git_receivers
    EXCEPTIONS
      TOO_MANY_RECEIVERS              = 1
      DOCUMENT_NOT_SENT                = 2
      DOCUMENT_TYPE_NOT_EXIST      = 3
      OPERATION_NO_AUTHORIZATION = 4
      PARAMETER_ERROR                    = 5
      X_ERROR                                      = 6
      ENQUEUE_ERROR                        = 7
      OTHERS                                        = 8.

please give the code of
contents bin =  git_objbin " how  this is getting populated.
0 0 0 0 2 L O U D S P E A K R O T H E R 3 8 W h i t e <b>0 0</b>
0031 L O U D S P E A K R O T H E R 3 8 Black
0 000
38
from this im not able to understand is this over population or concatenation problem
y dont u make a append to the final table
like
data : begin of itxt occurs 0, ,
s1(132) type c ,
end of itxt.
loop at itab.
itxt-s1+0(4) = itab-f1.
itxt-s1+4(6) = itab-f2.
itxt-s1+10(8) = itab-f3.
itxts1+18(4) = itab-f4.
append itxt.
clear itxt.
endloop.
exchange this to the contents bin of hte Fm .
regards,
vijay.
can u please mail the text file and the expected o/p to my mail id [email protected]  so that i can see the same from the data provided i m not able to check the result properly .

Similar Messages

  • How can I permanently change the date format from the American format to the UK's without having to constantly change it manually every time I start a new spreadsheet?

    This is my first mac so I'm still getting my bearings with it. I've only used Windows programmes before. I can't understand why it's so hard to change the date format of the cells in Numbers to keep it showing the UK format. The system preferences of the mac show that it's in the correct region and has the correct date but this doesn't seem to transfer into the Numbers program. I was very impressed with the mac until I discovered this. If anyone knows how I can get the date to stay in the correct format without having to go through the process of altering it in the cell inspector everytime then I would be very grateful.

    Numbers & most apps, especially those from Apple, use the date format you have set in System Preferences > Language & Text > Region. You can then choose UK from the Region drop-down list. Mine says Custom because I've defined things further as in the second screenshot.

  • URGENT: XML-SQL: Error parsing different date formats in the same XML file.

    Hi Everyone,
    I have a big problem while using the XML-SQL utility. I have a XML file with different date formats. I get exception like the one below.
    "oracle.xml.sql.OracleXMLSQLException: 'java.text.ParseException: Unparseable date:"
    And the XML file is :
    <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <Info Key="ID">
         <Insert>
              <ID>1</ID>
              <BookingDate>10.12.2001</BookingDate>
              <OpeningTime>19:16</OpeningTime>
         </Insert>
    </Info>
    I have tried using different setDateFormat which is contrary.
    sav.setDateFormat("d.M.y");
    sav.setDateFormat("H:m:s");
    Can someone help me on the same.
    Thanks in advance.
    Subramanian.

    You might have to describe the columns as varchar then modify the table to the right format.

  • How to get the Date format inside the table

    I have a startdate column in the db in the format May 5, 2001 12:39:00 PM, when I query it from a view in this way : SELECT startdate, ... FROM ..., it returns the format in the db,
    However I have to do this SELECT
    decode(startdate, null, 'NOT START'), startdate), ... the result is 5-MAY-01,
    then I tried this to_char(startTime, 'Month DD, YYYY HH:MI: A.M.') the results become May 05, 2001 12:39:00 PM. (more space between month and day, and 05 instaed of 5)
    Does anybody know how to fix this, so I get exactly what is in the db?
    Thanks in advance

    No matter what you do if you are storing a date in a column it will get stored in the Oracle's internal 7 byte date format.
    The way you get it on retreiving it is as set by your date format. You can either change the default date format for the instance, the individual session or the individual SQL statement(in this case using to_char(date, 'format')).
    If you want to store the date in a format you want to store you'll have to store it as char or varchar2.
    <BLOCKQUOTE><font size="1" face="Verdana, Arial, Helvetica">quote:</font><HR>Originally posted by George ([email protected]):
    I have a startdate column in the db in the format May 5, 2001 12:39:00 PM, when I query it from a view in this way : SELECT startdate, ... FROM ..., it returns the format in the db,
    However I have to do this SELECT
    decode(startdate, null, 'NOT START'), startdate), ... the result is 5-MAY-01,
    then I tried this to_char(startTime, 'Month DD, YYYY HH:MI: A.M.') the results become May 05, 2001 12:39:00 PM. (more space between month and day, and 05 instaed of 5)
    Does anybody know how to fix this, so I get exactly what is in the db?
    Thanks in advance<HR></BLOCKQUOTE>
    When you do to_char() with 'month' oracle blank pads the month to nine characters, the same goes with day too. So to get rid of it you'll have to trim() the month. And if you want to get a single digit for date less than 10 instead of 0x you'll have to do a bit of extra jugglery using translate() or replace().
    Hope this helps
    Naveen

  • How to use the date format for the given req.?

    I have a requirement which should fetch the datas given by user. The user parameter is the date. The date will fetch the amount of the customer code for that particular month based on the date upto given by the user of that financial year.
    If the user parameter is given as 200703(YYYYMM) it should fetch the datas of the financial year from 200604(YYYYMM) to 200703(YYYYMM). The logic is the user parameter year should fetch the datas of previous year till the user given date and the month should be also do the same. Please do the needfull oracle experts.
    Regards,
    Mark

    As i am new to oracle i need help from you experts, The year and the month as seperate columns both as different data type as number and varchar2. There is no date column in the table.
    Table GTemp:
    DIVISION_CODE NUMBER(2)
    GL_CODE NUMBER(6)
    FINANCIAL_YEAR NUMBER(4)
    FINANCIAL_MONTH VARCHAR2(2)
    Query that i have used:
    SELECT ALL GTEMP.FINANCIAL_YEAR, GTEMP.FINANCIAL_MONTH, GTEMP.GL_CODE
    FROM GTEMP
    WHERE financial_year between 2007 - 1 and 2007
    and financial_month in ('4',' 12')
    and division_code = 11
    order by financial_month
    I know this will not fetch from the date the user parameter enters however is there any other options. Please help me out morgan...

  • "Bad data format" when reading txt file from the presentation server

    Hello,
    I have a piece of code which reads a txt file from the presentation server to an internal table like below:
    DATA : lv_filename type string.
    lv_filename = 'C:\abap\Test.txt'. "I created a folder called abap under C:\
    CALL method CL_GUI_FRONTEND_SERVICES=>GUI_UPLOAD
    EXPORTING
       FILENAME              = lv_filename
    CHANGING
       DATA_TAB            = lt_tsd. " lt_tab has the exact same fields as the Test.txt's. Test.txt has only one line, tab delimited.
    When running this code, exception BAD_DATA_FORMAT is issued.
    Is it because of the file encoding or delimiter or other reason?
    Thanks,
    Yang

    Hello,
    If its tab delimited then use the has_field_seperator parameter and check
    DATA : lv_filename type string.
    lv_filename = 'C:\abap\Test.txt'. "I created a folder called abap under C:\
    CALL method CL_GUI_FRONTEND_SERVICES=>GUI_UPLOAD
    EXPORTING
       FILENAME                = lv_filename
       FILETYPE                 = 'ASC'
       HAS_FIELD_SEPARATOR          = u2018Xu2019
    CHANGING
       DATA_TAB            = lt_tsd.
    Vikranth

  • Report file name error with Chinese Date format

    Hello,
    I am seeing an error at
    step Write UUT report in the standard model files.  This step is
    calling the API method save on the object Runstate.Report.
    The issue occurs on computers using chinese localization with the date in the report file name.
    Is this a known issue?  Is there a way to modify the filename before calling the above method to eliminate the problem?
    Solved!
    Go to Solution.

    An Error Message is attached. 
    WE have seen this on both Vista and XP.  We are using TestStand version 4.1.1.  I am not sure about the localization, but I have seen this on computers from Taiwan, Korea and Japan.  
    If I put a breakpoint in the Model file at the Write UUT Report Step, you can see Chinese Characters in the time portion of the file name.
    If you change the report name to not include the time and date, the error does not occur.
    We have seen this with ASCII and xml.  With XML, the error also occurs at the step "Add Root Tags to XML Report"
    Attachments:
    FileNameError.JPG ‏134 KB

  • In Thunderbird, how do I change the date format for the column display?

    I want the date to show as DD-MM-YYYY HH:MM AM/PM. Although this should be really obvious (and I know I've done it in the past), I can't find where to do this and can't find anything in Thunderbird Help on this, not even when I search "Thunderbird, change date format".

    Thunderbird usually uses the computer date and time and settings.
    I'm using Windows and notice that TB is using the short date format which I set up under Regional & Language Options.
    Are you using the International settings or Date/Time settings?
    It should pick up the settings from the 'International' or maybe its called now called 'Language & Text' setting.
    not sure which of these suits your macbook:
    http://www.macyourself.com/2008/08/31/modify-the-default-clock-in-os-xs-menu-bar-to-show-the-full-date/
    http://www.dummies.com/how-to/content/language-text-preferences-on-your-macbook.html
    http://www.dummies.com/how-to/content/how-to-change-your-macs-date-and-time.html
    http://www.youtube.com/watch?v=2zBMl8Vb3wc
    http://support.apple.com/kb/TS3579

  • What is the data format of the image buffer from a NI-IMAQ 1394 acquisition?

    I am acquiring a framebuffer which I desire to process using my own code.
    The configuration is:
    Set ATTR_VIDEO_FORMAT 1
    Set ATTR_VIDEO_MODE 3
    Results in
    Get ATTR_IMAGE_WIDTH == 1024
    Get ATTR_IMAGE_HEIGHT == 768
    Get ATTR_IMAGE_REP == COLORID_YUV422
    Get ATTR_BYTES_PER_PIXEL == 4
    What is the data layout of this framebuffer?

    Robert,
    I'm not sure if I understand exactly what you are asking here, but you can use the Get Buffer function call to access the image data and it will coorespond to the image type that you acquired (8 bit integer for monochrome and 32 bit for RGB).
    Let me know if this doesn't answer your question.
    Regards,
    Andy Bell
    Application Engineer
    National Instruments

  • To change the date format in the drop down

    Hi,
    I have a drop down in my VC Model. That drop down populates values for 'Fiscal Year' dynamically from a query.
    The values in the drop down are getting displayed as 'Z1/2008', 'K1/2009' where K1 and Z1 are fiscal yr variant. This fiscal yr variant is actually compounding of Fiscal year.
    But I want the values in the drop down to get displayed as '2008', '2009'. Does any one know the setting in VC for  this?
    Thanks
    Vikrant

    Hi Vikrant
    Are you using 'Fiscal year key' in your chart / report? try with Fiscal year ext key or fiscal year text
    I think  this will solve your problem.
    Regards
    Sandeep

  • Date format in the Web layout of Oracle 10g Reports

    Dear all,
    I want to change the date format in the oracle reports. I am using weblayout & paper layout. I have changed format mask using property inspector. It appears in paper layout. How can i get in the weblayout, please help me.
    With Regards,
    Srinivas

    Hi Srinivas,
    I think whatever applicable in Paper Layout should be applicable to Web Layout also.
    Regards,
    Raj

  • Date format in the file datastore

    Hi,
    I have source as file, in which I have date column. While creating the file datastore, I have selected the datatype as date & have given the source date format in the format column and it is working fine.
    But I have source file coming with different date formats for the same column.
    My question is whether i can give multiple date formats in the format column??
    1. If yes how to separate the formats i.e with comma or semi-colon or etc...
    2. If No, thn how to achieve it. as I can use to_date function, but in that also I have to give all the date formats.

    Assuming Oracle is target database..
    Try this...
    1. In your file data store make the column as Varchar2
    2. In the interface mapping -- specify the following string in the target column mapping
    TO_DATE(REPLACE('2011-06-01','-',''),'YYYYMMDD')
    If your target column is date, Oracle will convert database proper format and insert the date..
    Hope this works out....
    Thanks
    Satish
    Edited by: user12826256 on 01-Jul-2011 02:15

  • Setting date format for the entire SQL Server installation - SQL Server 2008 R2-2012

    Hi,
    I need to safeguard the behaviour of SQL codes that inserting into SQL tables with some date columns. For this purpose, I need to change the date format for the SQL instance and not using CONVERT and CAST.
    I've seen the SET DATE FORMAT statement, but if I use it, could I solve my problem?
    Thanks

    The language setting is related to the database user.
    BOL: "DEFAULT_LANGUAGE = { NONE | <lcid> | <language name> | <language alias> }              
    Specifies the default language for the new user. If a default language is specified for the user and the default language of the database is later changed, the users default language remains as specified.
    If no default language is specified, the default language for the user will be the default language of the database. If the default language for the user is not specified and the default language of the database is later changed, the default
    language of the user will change to the new default language for the database."
    LINK: http://technet.microsoft.com/en-us/library/ms173463.aspx
    The default language setting can be overridden by SET LANGUAGE for the session:
    http://technet.microsoft.com/en-us/library/ms174398.aspx
    Example:
    SET LANGUAGE us_english; -- mdy
    SELECT CAST ('12/13/2014' as DATE); -- 2014-12-13
    GO
    SET LANGUAGE british; -- dmy
    SELECT CAST ('12/13/2014' as DATE);
    GO
    (1 row(s) affected)
    Changed language setting to British.
    Msg 241, Level 16, State 1, Line 2
    Conversion failed when converting date and/or time from character string.
    Kalman Toth Database & OLAP Architect
    SELECT Video Tutorials 4 Hours
    New Book / Kindle: Exam 70-461 Bootcamp: Querying Microsoft SQL Server 2012

  • How do I change the date format in safari?

    I am in the UK, and the date format is the US format (ie month first) - I have changed my language in the Settings app, but no dice. In Chrome, Firefox etc there are language settings that I can change to alter the date format, but not for Safari ...

    Hugh_Jarse_69 wrote:
    I needed to drag British English to the top of the list of languages 
    It's great that worked for you, but you should be able to have any primary language you want combined with any date format you want by just setting the latter in system prefs/language & region/region.  Did Safari not do the right thing with the Region set to United Kingdom?

  • How to make the date format in ipod the same as in itunes?

    When I look at my podcasts in itunes, the dates come up as dd/mm/yyyy (which is correct), however, when I look at my podcasts on the ipod, the date comes up as mm/dd, which is very confusing.
    I cannot figure out how to make it so that the date format is the same.

    When I look at my podcasts in itunes, the dates come up as dd/mm/yyyy (which is correct), however, when I look at my podcasts on the ipod, the date comes up as mm/dd, which is very confusing.
    I cannot figure out how to make it so that the date format is the same.

Maybe you are looking for

  • Brand new ideapad u300s going into depot for 2nd time in in less than a month

    Hi, I can't seem to get any help on the phone, all I get told is send the unit in.  I ask to speak to a supervisor and you tell me they will call back in 24-48 hours; it's been a week.  I call back and ask to speak to a supervisor and you tell me it'

  • Hard Drive Crash - How to Copy from iPOD to new computer

    My hard drive crashed and is dead, with over 3000 files of songs in my iPOD library. Can I use my iPOD, which still has the library, to copy those files to a new hard drive recently installed? How? If I just synch with the new version, will I lose an

  • Calling HR infotype operation in a webdynpro ABAP application

    Hi, is it possible to call hr_infotype_operation on an infotype which has custom control to update the infotype. Because i have observed that all the 9 series infotypes which have custom control in them are giving short dump when hr_infotype_operatio

  • Advanced use of Business One XL Reporter

    Can you share me some document about Advanced use of Business One XL Reporter. For ex: - Linking ofsheetsin a workbook -Use of MS Excel macros -Link to MS Word and MS PowerPoint -Reportpackagesand jobs Thank you!

  • Limitations to a Lookup Property Table

    I am relatively new to Hyperion DRM. I have a question regarding any limitations to a lookup property table. How many members or rows can a look up table contain. I have a need to cross reference our sku numbers to a platform. The first thing that ca