Problem with attachtment XLS (last column of the xls)

Hi,
iam working on interface in which i will be sending an email along with attachtment where my email along with attachtment are working perfectly ,the problem is with the XLS where the last column of the XLS is taking 255 char which is the length of the field .
How i have to  restrict it ?
solution on this would be helpfull .
Thanks ,
shankar.
I have attached the sample code too.
FUNCTION zemail_send_attachment.
""Local Interface:
*" IMPORTING
*" VALUE(EMAILID)
*" VALUE(SUBJECT)
*" VALUE(ATYPE)
*" TABLES
*" ATTACH_FILE STRUCTURE SOLISTI1
*" BODY OPTIONAL
This table requires information about how the data in the
tables OBJECT_HEADER, CONTENTS_BIN and CONTENTS_TXT are
to be distributed to the documents and its attachments.
DATA objpack LIKE sopcklsti1 OCCURS 2 WITH HEADER LINE.
This table must contain the summarized data dependent on each object type.
SAPscript objects store information here about forms and styles,
for example. Excel list viewer objects store the number of rows and columns
amongst other things and PC objects store their original file name.
DATA objhead LIKE solisti1 OCCURS 1 WITH HEADER LINE.
This table must contain the summarized content of the objects identified as binary objects.
DATA objbin TYPE STANDARD TABLE OF solisti1 INITIAL SIZE 0
WITH HEADER LINE.
This table must contain the summarized content of the objects identified as ASCII objects.
DATA objtxt LIKE solisti1 OCCURS 10 WITH HEADER LINE.
This table must contain the document recipients.
DATA reclist LIKE somlreci1 OCCURS 5 WITH HEADER LINE .
This structure must contain the attributes of the document to be sent.
DATA: doc_ching LIKE sodocchgi1.
DATA: tab_lines LIKE sy-tabix.
Create the internal table for body , subject
DATA: it_body LIKE solisti1 OCCURS 10 WITH HEADER LINE.
CONSTANTS: con_cret TYPE c VALUE cl_abap_char_utilities=>horizontal_tab,
con_tab TYPE c VALUE cl_abap_char_utilities=>cr_lf.
Move Body to Internal Table (body into it_body)
LOOP AT body .
MOVE body TO it_body .
APPEND it_body .
ENDLOOP.
doc_ching-obj_descr = subject. "Subject of the Email
Move the Subject and Body to OBJTXT
objtxt[] = it_body[].
DESCRIBE TABLE objtxt LINES tab_lines.
READ TABLE objtxt INDEX tab_lines.
doc_ching-doc_size = ( tab_lines - 1 ) * 255 + STRLEN( objtxt ).
CLEAR objpack-transf_bin.
objpack-head_start = 1.
objpack-head_num = 0.
objpack-body_start = 1.
objpack-body_num = tab_lines.
objpack-doc_type = 'RAW'.
APPEND objpack.
Convert IT to Excel format
IF atype = 'XLS' .
LOOP AT attach_file .
REPLACE ALL OCCURRENCES OF '#' IN attach_file WITH con_cret ."INTO objbin.
IF sy-tabix = 1.
MOVE attach_file TO objbin.
ELSE.
CONCATENATE con_tab attach_file INTO objbin.
ENDIF.
APPEND objbin.
ENDLOOP.
ELSEIF atype = 'TXT' .
Convert IT to Text format
LOOP AT attach_file .
REPLACE ALL OCCURRENCES OF '#' IN attach_file WITH con_cret. " INTO objbin.
CONCATENATE attach_file con_tab INTO objbin .
APPEND objbin .
ENDLOOP.
ENDIF.
DESCRIBE TABLE objbin LINES tab_lines.
objhead = subject. APPEND objhead.
Creating the entry for the compressed attachment
objpack-transf_bin = 'X'.
objpack-head_start = 1.
objpack-head_num = 1.
objpack-body_start = 1.
objpack-body_num = tab_lines.
IF atype = 'XLS'.
objpack-doc_type = atype.
ELSEIF atype = 'TXT'.
objpack-doc_type = 'RAW'.
ENDIF.
objpack-obj_name = 'ATTACHMENT'.
objpack-obj_descr = 'TEST'. "Attachment File Name
objpack-doc_size = tab_lines * 255.
APPEND objpack..
reclist-receiver = emailid.
reclist-rec_type = 'U'.
APPEND reclist.
CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
EXPORTING
document_data = doc_ching
put_in_outbox = 'X'
commit_work = 'X'
IMPORTING
SENT_TO_ALL =
NEW_OBJECT_ID =
TABLES
packing_list = objpack
object_header = objhead
contents_bin = objbin
contents_txt = objtxt
receivers = reclist
EXCEPTIONS
too_many_receivers = 1
document_not_sent = 2
operation_no_authorization = 4
OTHERS = 99 .
ENDFUNCTION.

I had this problem after migrating to JDeveloper 10.1.3. Problem was with inconsistent DB column types. In our case, the DB column was CHAR containing only numbers, but VO defined it as NUMBER. This caused no problem in 9.0.3 we used before.
   <ViewAttribute
      Name="ParentFlagNew"
      IsPersistent="false"
      Precision="1"
      Type="oracle.jbo.domain.Number"
      ColumnType="NUMBER"
      AliasName="PARENT_FLAG_NEW"
      Expression="PARENT_FLAG_NEW"
      SQLType="NUMERIC" >
      <Properties>
         <Property Name ="DISPLAY_LIST" Value ="1=Yes,0=No" />
         <Property Name ="DISPLAY_LIST_sk" Value ="1=Áno,0=Nie" />
         <Property Name ="Renderer" Value ="sk.transacty.cm_iface.bc4j_common.ListFieldRenderer" />
      </Properties>
      <DesignTime>
         <Attr Name="_DisplaySize" Value="1" />
      </DesignTime>
   </ViewAttribute>

Similar Messages

  • Is anyone else having problems with syncing your phone & iPad since the last update?

    is anyone else having problems with syncing your phone & iPad since the last update?

    Here's the problems I'm having with iPad 2 and iOS 5.1:
    Okay ... so, because I had less than a 1 Gig left (as reported by iTunes) on my 64Gig iPad, and the majority of the space was being used by "Photos" ... I decided to not keep my PC photos directory in sync with my iPad (Windows 7). So, in iTunes, I unchecked the option to sync computer photos to the iPad. I got the standard popup warning message that my iPad would not contain those albums after the next sync. I clicked OK and proceeded to sync expecting to have lots of space freed up.
    But weird things happened after syncing.
    (1) I still have all my photos on my iPad .... nothing disappeared at all. (And performed multiple syncs to try to force the change ... still nothing has been removed from my iPad.)
    (2) Somehow, I gained 20 Gigs of free space, as reported by both iTunes and my iPad as well.
    Anyone know what's going on here?
    I do have iMovie and another movie making app, Avid. Both of these contain projects that refer to photos in albums that were supposed to be removed after the sync ... but I can't imagine that would keep them there. Anyone have any ideas?
    I also installed the iPad app, iPhoto. I noticed that it build a directory listing and continuously want to update that listing from time to time.
    Would any of these things cause the iTunes photo sync changes to be ignored? And, how did I get free space to report back with an additional 19Gig or so, when there's no change at all.
    Unsure what's going on ...

  • Emacs is displaying the first column of the line on the last column of the previous line

    The first column of my lines are being displayed on the last column of the previous line. This a very irritating glitch that I have no clue how to fix or even troubleshoot. (red bars were added using preview to hide personal info)
    I've downloaded MacPorts and reinstalled emacs:
    GNU Emacs 24.4.1
    Copyright (C) 2014 Free Software Foundation, Inc.
    GNU Emacs comes with ABSOLUTELY NO WARRANTY.
    You may redistribute copies of Emacs
    under the terms of the GNU General Public License.
    For more information about these matters, see the file named COPYING.
    I'm open to any suggestions on how to fix this graphical glitch.
    Much thanks
    Message was edited by: Conner_36

    Given that the Emacs for OS X works ok and the Emacs shipped with OS X works it would seem to be some issue with MacPorts and their version.
    Totally unfamiliar with MacPorts so have no idea how the program gets compiled,what libraries it is using and what if any config settings are needs or set so I'm afraid I won;t be much help there.  That you are on a MBP with a retina display may be part of the problem.
    So with the setup you have now, hardware and software including OS,  it was working and then just like that it stopped? Something much have changed around the time it stop working if you can think back to then it might help you resolve the problem.
    As you are doing programming can i assume you have Xcode and the command line tools installed? If not how do you compile your code? The reason I ask is compiling Emacs from there GNU source is not all that difficult. It might be worth trying that.
    One last thing given that the two other versions of Emacs displayed the file OK this strongly suggests the problem is not in your .emacs file or your environment however as I wrote I am not familiar with MacPorts so it is possible there is another config file messing you up. As a test for this create a new user or log in as the Guest user (this is best as you;re guaranteed the environment is clean) and look at the file in question in MacPorts Emacs. If it displays OK then there is something in your environment causing this, If it messes up  even in the new user then I'd say ditch MacPorts..
    regards
    <edit>
    Just to rule out init files  if you start emacs with the -q(minus que) flag the .emacs file is not read in, if you use  --no-site-file it will not load the site file if it exists.
    I'd try running the MacPorts emacs with those two flags to see f anything changes.

  • After upgraded ios6 i got problem with whatapp. "last seen" function is not working

    HI eveyone
    after upgraded ios6 i got problem with whatapp. "last seen" function is not working .. it's doest show last seen who enter the chat . is anyone have the same problem .. i even restore and reinstall to my ph but it's  not work .. if someone know how to fix it, plz tell me how to do .. thanks

    Also, when I check this post several times a day, I always see warning 'Connection is untrust'. If I close browser and reopen immediately everything is ok.

  • Know the Last column of the table

    Hello 
    i use vb.net with excel
    I have a table
    with a spreadsheet, I want to know the Last
    column of the table 
    please help me ??

    i have a table in Excel file and i want to add the last column of this table in datagridview 
    i want to set ShtRange to give me the last column 
    i use this but don't give me a result 
    With Form1.xlWorkSheet
    Dim ShtRange As Range
    Dim dt As New System.Data.DataTable
    ShtRange = Form1.xlWorkSheet.Cells(1, Form1.xlWorkSheet.Columns.Count).End(XlDirection.xlToLeft)
    For Cnum As Integer = 1 To ShtRange.Columns.Count
    dt.Columns.Add(New DataColumn(TryCast(ShtRange.Cells(1, Cnum), Excel.Range).Value.ToString()))
    Next
    dt.AcceptChanges()
    Dim columnNames As String() = New String(dt.Columns.Count - 1) {}
    For i As Integer = 0 To dt.Columns.Count - 1
    columnNames(0) = dt.Columns(i).ColumnName
    Next
    For Rnum As Integer = 2 To ShtRange.Rows.Count
    Dim dr As DataRow = dt.NewRow()
    For Cnum As Integer = 1 To ShtRange.Columns.Count
    If TryCast(ShtRange.Cells(Rnum, Cnum), Excel.Range).Value2 IsNot Nothing Then
    dr(Cnum - 1) = TryCast(ShtRange.Cells(Rnum, Cnum), Excel.Range).Value2.ToString()
    End If
    Next
    dt.Rows.Add(dr)
    dt.AcceptChanges()
    Next
    Me.DataGridView1.DataSource = dt
    End With
    this is my table :

  • Does anyone have problems with iTunes movie rentals freezing in the middle of the movie?

    Does anyone have problems with iTunes movie rentals freezing in the middle of the movie, requiring a force quit, which causes your rental to disappear? This has happened multiple times to me recently. Last time Apple didn't refund my money after reporting the problem. I have been using iTunes for many years but am about to give up.

    Correction: I was refunded for the previous movie freeze.

  • [Enlightenment E17] Problems with EFM after last Update [solved]

    Hello Folks!
    I'm having some very ugly problems with my Enlightenment E17 Desktop after the last full system upgrade. This problem has already been reported to the German Arch Linux community, but no response yet, but I can't figure out that nobody else troubles the same probs.
    This is the following what I get when running pacman -Ss e17-svn
    community/e-svn 42849-1 (e17-svn)
    Enlightenment window manager DR17 (aka e17)
    community/e_dbus-svn 42682-1 (e17-libs-svn e17-svn)
    dbus abstraction layer for e17
    community/ecore-svn 42854-1 (e17-libs-svn e17-svn)
    Ecore is an abstraction layer for e17
    community/edje-svn 42794-1 (e17-libs-svn e17-svn)
    A graphical design and layout library based on Evas
    community/eet-svn 42851-1 (e17-libs-svn e17-svn)
    A data storage and compression library
    community/efreet-svn 42759-1 (e17-libs-svn e17-svn)
    freedesktop.org specifications for e17
    community/eina-svn 42822-1 (e17-libs-svn e17-svn)
    E17 file chunk reading/writing library
    community/embryo-svn 42739-1 (e17-libs-svn e17-svn)
    implementation of a C like scripting language for e17
    community/evas-svn 42855-1 (e17-libs-svn e17-svn)
    A hardware-accelerated canvas API for X-Windows
    The problems that occur to me are following: I'm using EFM as file manager. It's not the best one, but it fits into the E17 concept - simple, lightweight, fast - and thats what I like. But, after the latest update, when I click a folder on my desktop, EFM now comes up in a stupid very tiny window. The window is so small, that I need to resize it every time to see any content. Before the update, everything worked fine, the EFM windows came up as they should.
    Another problem I'm having with some applications, e.g. the Okular-Viewer, is that I'm not able to size down the window - it is always in full screen, and there's no chance to move it up (even not on the desktop preview widget) to move it down. Okular is always 100% filling my screen (over the height, only), and I'm not able to size it down. In the previous version, I didn't got this problems.
    My question is now: is there any way to install the previous Enlightenment E17 packages? They where much better that this one... or will another update come out soon??
    Thanks in advance for any help, any help is appreciated!
    beachcoder
    Last edited by beachcoder (2009-10-09 09:04:21)

    Have you tried starting with a clean config and the default theme, it helps sometimes after big code changes?
    If that doesn't help...
    beachcoder wrote:My question is now: is there any way to install the previous Enlightenment E17 packages? They where much better that this one... or will another update come out soon??
    If you find some mirror which keeps outdated packages that should not be a problem. Be sure to downgrade all of e17 packages (also some packages were deprecated and thus removed from the server during the last upgrade so you'd need to have those as well. You may still have those on your system though)
    About a quick update, depends if Ican replicate it and if there is an easy fix. These things happen now and then with pre-alpha software when they do make major code changes.  I try to test every update locally before putting it live but I of course can't test every single feature.
    Last edited by pressh (2009-10-09 06:03:31)

  • "There is a problem with your device,We're sorry the device you connected may be damaged and cannot be activated for service. "

    My problem is after i did a restore on my 32gb ipod touch i now get a error on itunes that says "There is a problem with your device,We're sorry the device you connected may be damaged and cannot be activated for service. " Please help

    In the ipad discussion forums there apparently is a HUGE problem with people not being able to update to ios 4.3.3, it apparently locks up their devices and they are also getting the error "there is a problem with your device".... some are reporting the same problem with their ipod touch as well... it looks like it's a global issue
    The forum is in the ipad section under the title of "There is a problem with your device".
    I have dodged a bullet on this one since i have not updated my ipod's or ipad in the last couple of days.... i will hold off syncing to itunes until this issue is fixed... good luck, and spread the word if you can to get apple to listen

  • We have been having a problem with newsletters for a client. The newsletter works fine except if we add a button and/or link to the top zone on that newsletter it blows up ONLY ON iPhones!

    We have been having a problem with newsletters for a client.
    The newsletter works fine except if we add a button and/or link to the top zone on that newsletter it blows up ONLY ON iPhones!
    This happened last month too. It seems to be related to length of the newsletter too. It works on every device except iPhones - so weird.

    Hi, is anyone else experiencing i-phone only problems on email campaigns? not bashing Apple, just having issues where our newsletter are only having issues on iPhones

  • Have a  problem with Lightroom 5.4.  Since the program crashed yesterday it won't launch, it comes up with the message "Lightroom encountered an error when reading its preview cache and needs to quit".  "  Lightroom will attempt to fix this problem net ti

    Have a  problem with Lightroom 5.4.  Since the program crashed yesterday it won't launch, it comes up with the message "Lightroom encountered an error when reading its preview cache and needs to quit".  "  Lightroom will attempt to fix this problem next time it launches".  Except that it doesn't, I keep getting the same message and the program closes.  Does anyone know what I  can do to repair it?  Can't back up, can't do anything.

    There are dozens of threads in this forum that describe the fix

  • HT1871 Hello i have one IPhone 4S and I use 3G net in my mobile sometime I have problem with temperature in my phone at the SIM card or battery how can I fix this problem. By update or version of 6.1.3

    Hello i have one IPhone 4S and I use 3G net in my mobile sometime I have problem with temperature in my phone at the SIM card or battery how can I fix this problem. By update or version of 6.1.3

    Could it be because the SIM card got damaged while I cut it to fit the IPhone?
    Very likely. Hard to believe the carrier in Mexico doesn't have a micro-SIM card available.
    Or somehow the Chinese carrier found out and locked it?
    No, which is not possible.
    What can I do? Get a new SIM and see if it works again?
    Get a micro-SIM from the carrier in Mexico that you don't have to manually cut down. If that carrier doesn't provide one, switch to another carrier that is not so low-budget.

  • I have problem with buying in games , I got the massage that the purchased can not be completed , please contact iTunes support.. I need help for my case please

    I have problem with buying in games , I got the massage that the purchased can not be completed , please contact iTunes support.. I need help for my case please

    http://www.apple.com/support/itunes/contact/

  • Ive downloaded some apps onto my pc yet only 1 has synced to my ipad, it says something about theres a problem with my billing, yet I purchased the 1 app I got for $20, but 1 free app and another paid, wont sync, i di have money in my account

    Ive downloaded some apps onto my pc yet only 1 has synced to my ipad, it says something about theres a problem with my billing, yet I purchased the 1 app I got for $20, but 1 free app and another paid, wont sync, i di have money in my account

    Right click on your iPad's name in the iTunes app on your computer and choose to transfer purchases. That should transfer anything that you have bought with the App Store app on the iPad to the iTunes app on your computer.

  • Hi i have a problem with my iphone 3gs. i updated the software to ios 6 but now when trying to activate the phone it comes up with a message saying that the activation server is currently unavailable, also it always says no sim! what can i do?

    i have an activation problem with my iphone 3gs. i updated the software to io6 using itunes but now the phone will not complete activation because it keeps saydin the activation server is not available and to re try later. ive been trying for 6 hours but it still wont activate. if i try using itunes then it sayd no sim inserted when there is one inserted, what can i do?

    You are right, but how could i send it to Apple? when the phone company first replaced my iphone they had in stock alots of iphones and they just sent mine back to Apple and gave me a new one, so all i did is to give them my phone, but now how could i sent it to Apple? and i cant send it by myself, and the store wont do that, its a lost for them.. so sending it to Apple wasnt an option from the begining.
    and for the record, i dont think the store where i bought it is an authorized shop.. its just a store who boughts phone's from Apple in a low price and sells it in much more money..

  • I have a problem with my iPhone 5 stopped working the sleep / power and simultaneously refused to obey the HOME button. I can not use either one or the other. I can not enable or disable the device, display lights up when you plug the charger. same displa

    I have a problem with my iPhone 5 stopped working the sleep / power and simultaneously refused to obey the HOME button. I can not use either one or the other. I can not enable or disable the device, display lights up when you plug the charger. same display works fine as it is surprising. or maybe someone knows what is the reason for this? is there any way to solve this problem?

    More than likely its a hardware issue, I have never encountered such a problem and best bet is to just go get it replaced. If you have insurance on your device apple will replace it as long as there was no water damage, if you dont have insurance they will charge $200 more or less. Hope you get it fixed

Maybe you are looking for

  • How can I only allow my Apple TVs access to my LAN?

    In my set-up, I have three Apple TVs in separate rooms all connected to a LAN via their ethernet ports. They are connected via a switch to my Airport Extreme and my Mac Mini is also connected to Airport as an iTunes server. The Airport runs a WiFi ne

  • N97 Mistery of dual flashLED

    Hi guys, i just bought my new nokia N97 white. I found a problem with the flash led. So i want to know whether its just me, or all the N97 in the world (Fatal Design Problem). Check out the photo in the attachment. The problem are, when i use my expe

  • Notes from my iPad won't synchronise with my iPhone and my iCloud portal, Why?

    I use icloud on all my IOS device and on my icloud portal from every computer I work with. All apps I see on the iCloud portal are very useful. I have begin to work with them and they are very useful because it is suppose to synchronise with my iPhon

  • What is the supported version of Oracle Enterprise Quality Data for WebLogic 12c

    Hi All, The recent release of Oracle Enterprise Data Quality is 11.1.1.6.1 for which supported weblogic server is WebLogic 10.3.6 Can anyone tell me that if WebLogic 12c also is a supported version for Oracle Enterprise Data Quality 11.1.1.6.1 and if

  • Photoshop elements 8, 9 on mac os ?

    can i use photoshop elements 8, 9 on mac os ? am planning to convert from ms pc