‎2008 Jul 29 12:58 PM
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
‎2008 Jul 29 12:59 PM
Hi,
Clear the clipboard contents of the excel sheet.
Hope this would help you.
Regards
Narin Nandivada
‎2008 Jul 29 1:01 PM
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.
‎2008 Jul 30 9:46 AM
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
‎2008 Aug 18 9:28 AM
can any please tell me how we can upload the excel file to application server in background
Regards
‎2008 Aug 18 9:34 AM
hi there
u had to use open dataset close data set gui upload and download wont work in back ground
cheers
uday
‎2008 Aug 18 9:34 AM
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
‎2008 Aug 18 10:09 AM
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
‎2008 Aug 18 10:32 AM
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
‎2008 Aug 18 10:18 AM
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
‎2008 Aug 18 10:27 AM
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
‎2008 Aug 19 6:44 AM