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

Upload Excel table to internal table in background

Former Member
0 Likes
6,579

I am using fm ALSM_EXCEL_TO_INTERNAL_TABLE to upload Excel tables from the Application Server. The process works great in foreground mode.

My program requirement is to call an ABAP object from the SAP Job Scheduler (SM36/SM37). So when I run the ALSM_EXCEL_TO_INTERNAL_TABLE in a background job, the programs abends. In the job log, I get error ALSMEX037 Error during import of clipboard contents.

Has anyone seen this error? What causes this error? How can I get around this error in a background job?

<<text removed>>

Edited by: Matt on Mar 5, 2009 1:55 PM - do not offer rewards

1 ACCEPTED SOLUTION
Read only

former_member376453
Contributor
0 Likes
2,678

We can not use this in background mode.

Kuntal

Edited by: Kuntal Nandi on Mar 4, 2009 11:34 PM

I am using fm ALSM_EXCEL_TO_INTERNAL_TABLE to upload Excel tables from the Application Server. The process works great in foreground mode.

My program requirement is to call an ABAP object from the SAP Job Scheduler (SM36/SM37). So when I run the ALSM_EXCEL_TO_INTERNAL_TABLE in a background job, the programs abends. In the job log, I get error ALSMEX037 Error during import of clipboard contents.

Has anyone seen this error? What causes this error? How can I get around this error in a background job?

<<text removed>>

Edited by: Matt on Mar 5, 2009 1:55 PM - do not offer rewards

7 REPLIES 7
Read only

former_member376453
Contributor
0 Likes
2,679

We can not use this in background mode.

Kuntal

Edited by: Kuntal Nandi on Mar 4, 2009 11:34 PM

Read only

Former Member
0 Likes
2,678

This message was moderated.

Read only

0 Likes
2,678

Sorry for the reply I have given, I havn't checked that you are in background. You have to do some manual configuration. Follow the links given by Avinash.

Kuntal

Read only

Former Member
0 Likes
2,678

Hi,

You cannot upload / download from the PC in background mode. You can upload from the application server in background using datasets: OPEN DATSET, READ DATASET, TRANSFER DATASET.

Regards,

~Satya

Read only

Former Member
0 Likes
2,678

Hi,

From background its not possible for you to upload an excel file because the background jobs are run in different processors and they are not directly linked with the pc where the file is stored so the better way to read the excel file is to write another program and execute in frontecd which will read the excel file and store it on the application server and then from application server its easy to retrieve data into an internal table using open dataset and close dataset....

Regards

Siddarth

Read only

Former Member
0 Likes
2,678

I'm sorry.. Did I fell to mention I want to UPLOAD A EXCEL (.xls) file FROM the APPLICATION SERVER in BACKGROUND?

Also, I tried the OPEN DATASET xx FOR INPUT IN BINARY MODE and I get garbage data..

Any sample code would help for the open dataset, transfer, close dataset statements that will work with a .xls file type. Not a .csv, .txt or anything else...

Read only

0 Likes
2,678

Hi,

Instead of using in binary mode try using in text mode....

or use this FM

TEXT_CONVERT_XLS_TO_SAP

Regards,

Siddarth