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

Background Processing

Former Member
0 Likes
690

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.

6 REPLIES 6
Read only

Former Member
0 Likes
667

hi

You might be using GUI_UPLOAD in your program...this FM won't work in background process...

Read only

0 Likes
667

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.

Read only

Former Member
0 Likes
667

HI

what error it is

Read only

former_member386202
Active Contributor
0 Likes
667

Hi,

Try this FM ALSM_EXCEL_TO_INTERNAL_TABLE

Regards,

Prashant

Read only

Former Member
0 Likes
667

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!

Read only

0 Likes
667

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.