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: 

Attach table data as CSV file in GOS area of Invoice

0 Kudos
515

Hi Experts,

I would like to develop a program whic takes invoice number and fiscal year as input. in the program I have to extract data from a custom table and attach that data as csv file into GOS area of invoice. I DO NOT want to download the file into desktop or onto application server before uploading it to GOS. is this possible to do?

4 REPLIES 4

raymond_giuseppi
Active Contributor
450

Just create the csv in an internal table, and then process as usual (after the upload)

(e.g. SO_FOLDER_ROOT_ID_GET, SO_OBJECT_INSERT, BINARY_RELATION_CREATE_COMMIT or similar tool)

What did you already try and where are you stuck?

Sandra_Rossi
Active Contributor
0 Kudos
450

Yes of course it's possible. In the forum, you can find lots of questions, answers and snippets how to attach documents via GOS. No need to have the file on the desktop or application server, it will be a variable containing the CSV data.

0 Kudos
450

HI,

I am able to achieve it to some extent. the attached csv file when opened data comes like below. All data in one column

Sandra_Rossi
Active Contributor
450

I guess your file name has the extension ".csv", so there's no problem with your code.

If your Excel application is configured to have comma as value separator (US-like), it's normal that it doesn't recognize semicolon as value separator (French/Europe-like). You may use the menu Data > Text to Columns to manually split the fields at semicolon.

That's the limitation of CSV. XLSX is better supported (use software like abap2xlsx or standard XCO).