‎2007 Nov 27 12:11 PM
hi all,
I have a report whre i am giveing input as excel sheet and conveting into text file and into internal table then i am inserting into ztable. it is working fine. but the problem is if i run it in backgound it is giving error. What are the possible ways to that. coz i am giving input as P_file.
Its an urgent ...please help me..
<b>points will be rewarded for useful answers</b>
regards,
Sunil kumar.
‎2007 Nov 27 12:16 PM
hi
You might be using GUI_UPLOAD in your program...this FM won't work in background process...
‎2007 Nov 27 12:24 PM
hi Perez,
i am using following code in my progrm to convert excel to internal table .
call function 'F4_FILENAME'
exporting
program_name = syst-cprog
dynpro_number = syst-dynnr
FIELD_NAME = ' '
importing
file_name = p_infile.
start-of-selection.
if r1 = 'X'.
call function 'ALSM_EXCEL_TO_INTERNAL_TABLE'
exporting
filename = p_infile
i_begin_col = '1'
i_begin_row = '2'
i_end_col = '18'
i_end_row = '9'
tables
intern = itab
exceptions
inconsistent_parameters = 1
upload_ole = 2
others = 3.
if sy-subrc <> 0.
message e010(zz) with text-001. "Problem uploading Excel preadsheet"
endif.
In sm37 if i check the job Log it is saying that 'ERROR DUE TO IMPORT OF CLIPBOARD CONTENTS'
JOB CANCELLED.
regards,
sunil kumar.
‎2007 Nov 27 12:18 PM
‎2007 Nov 27 12:18 PM
‎2007 Nov 27 12:19 PM
Hi,
It is difficult to give solution without watching your program, but you can refer to the error log in bakground. At SM37-->job log u can see that error & analyse it.
Hope this is useful for you!
‎2007 Nov 27 12:32 PM
Hi Sachchidanand,
For running any report in backgorund we needed varient. We know how to assiagn vareint. But there is no input fields to assign a varient.Varient is stored in SAP so when it runs background it gets values from varient and exceuted. But for giving input as file it dosent store in SAP nor i cant store this file name as vareint it stores only file name not the contents of file. i need a procedure to store the contents in SAP so that my report gets contents from SAP while running background. Hope u understood my question.
regards,
sunil kumar.