RE: [sap-dev] Email attachment CSV format and save to FTP more than 255
Posted by
Admin at
|
Share this post:
|
0 Comments
| | Posted by Dave Thornburgh (SAP JOAT) on May 18 at 11:13 PM | |
Rav -
If your line length can exceed 255 characters, then obviously it won't fit into the CONTENTS_TXT table - which is handled line-by-line as a text-format file.
What you can (should) do is visualize your .CSV file as one long stream of binary data. Store that stream of data into the CONTENTS_BIN table, 255 bytes at a time. Each time you need to simulate the end of a "line", you need to insert into that stream the correct end-of-line characters for the target operating system - since the Binary mode file won't be doing that for you.
If you're just getting started with interface files, allow me to give you an observation: Different platforms and different programs expect different things in a .CSV formatted file. If at all possible, I would recommend you get away from .CSV and instead move to Tab-delimited files. There are three distinct advantages: 1) smaller files (no quotes), 2) no interpretation headaches (when to quote), and 3) you can include commas or quotes in your literal data with no added hassles.
Dave
From: rav olarte via sap-dev [mailto:sap-dev@Groups.ITtoolbox.com]
Sent: Tuesday, May 18, 2010 1:10 AM
To: Dave Thornburgh
Subject: [sap-dev] Email attachment CSV format and save to FTP more than 255
Posted by rav olarte
on May 18 at 4:23 AM
HI,
Just wondering if you could advise if theres a way to extend the string
length used in SO_DOCUMENT_SEND_API1 and in saving file (CSV) to FTP.
The problem is that we have total value length of atleast 300 chars which is
not ok for 255 string length.
Hope you could help..
Thanks!
__.____._ If your line length can exceed 255 characters, then obviously it won't fit into the CONTENTS_TXT table - which is handled line-by-line as a text-format file.
What you can (should) do is visualize your .CSV file as one long stream of binary data. Store that stream of data into the CONTENTS_BIN table, 255 bytes at a time. Each time you need to simulate the end of a "line", you need to insert into that stream the correct end-of-line characters for the target operating system - since the Binary mode file won't be doing that for you.
If you're just getting started with interface files, allow me to give you an observation: Different platforms and different programs expect different things in a .CSV formatted file. If at all possible, I would recommend you get away from .CSV and instead move to Tab-delimited files. There are three distinct advantages: 1) smaller files (no quotes), 2) no interpretation headaches (when to quote), and 3) you can include commas or quotes in your literal data with no added hassles.
Dave
From: rav olarte via sap-dev [mailto:sap-dev@Groups.ITtoolbox.com]
Sent: Tuesday, May 18, 2010 1:10 AM
To: Dave Thornburgh
Subject: [sap-dev] Email attachment CSV format and save to FTP more than 255
Posted by rav olarte
on May 18 at 4:23 AM
HI,
Just wondering if you could advise if theres a way to extend the string
length used in SO_DOCUMENT_SEND_API1 and in saving file (CSV) to FTP.
The problem is that we have total value length of atleast 300 chars which is
not ok for 255 string length.
Hope you could help..
Thanks!
Copyright © 2010 Toolbox.com and message author.
Toolbox.com 4343 N. Scottsdale Road Suite 280, Scottsdale, AZ 85251
Toolbox.com 4343 N. Scottsdale Road Suite 280, Scottsdale, AZ 85251
SAP Development Enthusiast
Contributed 100 posts in a group to earn a Bronze Achievement
Related Content
In the Spotlight
White Papers
In the Spotlight
Toolbox.com for iPhone: Ask Questions & Get Answers Anywhere. Use the New iPhone App
View this thread online
Manage group e-mails
Create an FAQ on this topic
Tell us what you think
Unsubscribe from discussion
Manage group e-mails
Create an FAQ on this topic
Tell us what you think
Unsubscribe from discussion