Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

GOS Attachment from CSV File

0 Kudos
189

I have tried using the code below in the link provided, but I am having a couple of issues and different things I try do not seem to help.

[url=https://www.sdn.sap.com/irj/sdn/weblogs?blog=/pub/wlg/3399] [original link is broken] [original link is broken] [original link is broken] [original link is broken];

The .csv attachment does appear on my business object BKPF in gos.

My issues are :

1. My records in the attachment will be more than 255 characters per line.

(I am getting truncation. Tried changing LT_DOC_CONTENT reference type to 1000 but then I get an empty attachment.)

2. When I do test with less than 255 characters, data is merged to one line.

(Do I have to specify a crlf for .csv attachment?)

Needed :

What do I need to modify in the abap code in the link mentioned to get an attachment in csv format, with more than 255 characters per record and have each record to itself, not merged to one line. This is for gos on the BKPF business object.

Thanks for any help you can provide.

4 REPLIES 4

athavanraja
Active Contributor
0 Kudos
57

if your operation is a not a background one you can try using BDS_BUSINESSDOCUMENT_CREATEF FM which is much easier to handle.

Raja

0 Kudos
57

Raja,

Thanks, but my operation will be in the background. Is there something available for background?

Dale

Former Member
0 Kudos
57

Hi

check these links, may be useful

refer to:

Reward points if useful

Regards

Anji

0 Kudos
57

Anji,

I had seen alot of this before posting my original questions.

I just hadn't paid as close attention to some of the detail.

By revisiting some of the information in the links you provided, I was able to use

some of the examples given, such as end of line. I was also able to understand more of how the soli-line could be extended to more than 255 chars. in the soli structure.

Thanks,

Dale