Application Development and Automation 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: 
Read only

GOS Attachment from CSV File

0 Likes
850

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.

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
Read only

athavanraja
Active Contributor
0 Likes
718

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

Raja

Read only

0 Likes
718

Raja,

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

Dale

Read only

Former Member
0 Likes
718

Hi

check these links, may be useful

refer to:

Reward points if useful

Regards

Anji

Read only

0 Likes
718

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