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

ERROR while uploading the data into ztable with background processing

Former Member
0 Likes
1,588

Hi gurus,

i am trying to upload the data from excel file to internal table

its working fine ..

but........

if i try to upload the data with background processing , in sm37 it is saying "error during the upload of clipboard contents".

Regards,

Sri

11 REPLIES 11
Read only

Former Member
0 Likes
1,404

Hi,

Clear the clipboard contents of the excel sheet.

Hope this would help you.

Regards

Narin Nandivada

Read only

Former Member
0 Likes
1,404

When a program is executed in background, the programs runs in the application server and so connection exists with the PC.

And the FM ALSM_EXCEL_TO_INTERNAL_TABLE reads the file from PC. Since the connection is already lost when the program is run in background, the program will not work and might give a short dump.

So you might have to upload the file into application server and then use OPEN DATASET, READ DATASET commands to read data from the application server file.

Amit.

Read only

Former Member
0 Likes
1,404

Hi,

I have changed the excel file to text file.

now in SM37 i am getting the error

Cannot perform frontend function in batch input mode

please solve my problem

Regards

Read only

0 Likes
1,404

can any please tell me how we can upload the excel file to application server in background

Regards

Read only

0 Likes
1,404

hi there

u had to use open dataset close data set gui upload and download wont work in back ground

cheers

uday

Read only

0 Likes
1,404

Hi Sri,

the only way to this is to make connection for example via ftp command. You cannot use front end function modules (using presentation server) in the background ...

You can define ftp command in SM69 as /opt/openFT/bin/ncopy . Of course openFT must be installed by basis in you SAP.

Then you call your defined command via FM SXPG_CALL_SYSTEM

If you want to store data from internal table into application server, this is of course possible in background using DATASET.

Regards,

Karol

Edited by: Karol Seman on Aug 18, 2008 10:38 AM

Read only

0 Likes
1,404

Thanks for your reply.

I have used the open dataset and close dataset commands.

But still it is not getting upload

I am using ALSM_EXCEL_TO_INTERNAL_TABLE to upload the data

without this how can i get the data into application server or Internal table

every one is saying "use OPENDATASET and CLOSEDATASET"

but how to get the data from excel file (background )

pls give me sample code

Thanks in advance

Regards,

sri

Read only

0 Likes
1,404

Hi ,

in case of BG execution u need to do it in 2 steps.

Step 1--->Creation of file on APPs Server by Getting data from the Excel.

1. here u need to put validations like --->w/o creating file on apps server they cannt run/schedule the Job in BG.

2.Check the existence of the file in case of BG scheduling.

Step 2. Once file is created on the appserver , then u can get data from apps server by using OPEN data SET.

i mean to say is --->in case of BG jobs first they have to create a file on APPS sever then only they can schedule the JOB.

Regards

prabhu

Read only

former_member386202
Active Contributor
0 Likes
1,404

Hi,

FM GUI_UPLOAD doesnt work in background, use dataset to upload it from application server.

refer below code

*--Local Variables

DATA : l_file TYPE string,

l_line TYPE string,

l_index TYPE sy-tabix.

*--Clear

CLEAR : l_file.

l_file = p_ipfile.

*--Read the data from application server file.

OPEN DATASET l_file FOR INPUT IN TEXT MODE ENCODING DEFAULT.

IF sy-subrc NE 0.

*--Error in opening file

MESSAGE i368(00) WITH text-005.

ENDIF.

*--Get all the records from the specified location.

DO.

READ DATASET l_file INTO l_line.

IF sy-subrc NE 0.

EXIT.

ELSE.

SPLIT l_line AT cl_abap_char_utilities=>horizontal_tab

INTO st_ipfile-vbeln

st_ipfile-posnr

st_ipfile-edatu

st_ipfile-wmeng.

APPEND st_ipfile TO it_ipfile.

ENDIF.

ENDDO.

Regards,

Prashant

Read only

0 Likes
1,404

Hi patil,

thanks for your reply

my file path is C:\folder\inputtestfile.xls

first i need to know how to retrieve the data from that file.

i am using ALSM_EXCEL_TO_INTERNAL_TABLE but it is not working in background

you are saying how to get the data from application server to internal table

but

i want to know how we get the data from presentation server to appserver in background

Regards,

sri

Read only

Former Member
0 Likes
1,404

hi

check tcode cg3z

cheers

uday