Error in background job of downloading data to  PC

Hi Gurus,
   I hv created a report for downloading data to PC using
GUI_DOWNLOAD FM when scheduling  job in background
job is getting canceled...................
give me some solution....

thnaks friend.i hv used DATASET as u said...............
But I M getting dump
FILE IS NOT OPEN
this is my code
TYPES:BEGIN OF T_MARD,
        MATNR LIKE MARD-MATNR,
        WERKS LIKE MARD-WERKS,
        LGORT LIKE MARD-LGORT,
        LABST LIKE MARD-LABST,
        MAKTX LIKE MAKT-MAKTX,
     END OF T_MARD.
***********WORK AREAS**********
DATA: WA_MARD TYPE T_MARD,
      WA_MARD1 TYPE T_MARD.
DATA:BEGIN OF IT_MARD1 OCCURS 0,
        MATNR(18),
        WERKS(4),
        LGORT(4),
        LABST(13),
        MAKTX(40),
     END OF IT_MARD1.
TYPES : BEGIN OF TY_BAT,
          LINE(100) TYPE C,
        END OF TY_BAT.
*********INTERNAL TABLES*******
DATA:IT_MARD TYPE STANDARD TABLE OF T_MARD INITIAL SIZE 0 WITH HEADER LINE .
types: BEGIN OF ITAB1,
            FIELD(100),
      END   OF ITAB1.
DATA : IT_BAT TYPE TABLE OF TY_BAT,
       WA_BAT TYPE TY_BAT,
       wa_itab1 type itab1.
data : it_tab type table of ALSMEX_TABLINE with header line.
*DATA: FILENAME1 TYPE STRING valu.
*DATA: FILENAME1(500).
DATA: FILENAME1 TYPE RLGRAP-FILENAME .
LOOP AT IT_MARD1.
      CONCATENATE IT_MARD1-MATNR IT_MARD1-LABST IT_MARD1-MAKTX
                  INTO wa_ITAB1    SEPARATED BY ' '.
      APPEND wa_itab1 to IT_tab.
      CLEAR wa_ITAB1.
    CLEAR WA_MARD.
  ENDLOOP.
  CONCATENATE 'D:\STOCKINH\'  SY-DATUM '.TXT' INTO FILENAME1.
open dataset filename1 for output in binary mode." ENCODING DEFAULT.
IF sy-subrc = 0.
EXIT.
ENDIF.
LOOP AT it_tab into wa_itab1.
TRANSFER wa_itab1 TO filename1.
CLEAR wa_itab1.
ENDLOOP.
close dataset filename1.
  MESSAGE S001(38) WITH 'Files Generated'.
  WA_BAT = 'ftp -s:d:\ftp\ftp_upload.txt'.
  APPEND WA_BAT TO IT_BAT.
  CLEAR FILENAME1.
   FILENAME1 = 'D:\STOCKINH\ftp_upload.BAT'.
open dataset filename1 for output in binary mode." ENCODING DEFAULT.
IF sy-subrc = 0.
EXIT.
ENDIF.
LOOP AT it_bat INTO wa_bat.
TRANSFER wa_bat TO filename1.
CLEAR wa_bat.
ENDLOOP.
close dataset filename1.
  CLEAR:  IT_BAT.
  REFRESH IT_BAT.
  WA_BAT-LINE = 'open 10.100.103.199'.
  APPEND WA_BAT TO IT_BAT.
  CLEAR WA_BAT.
  WA_BAT-LINE = 'epossync'.
  APPEND WA_BAT TO IT_BAT.
  CLEAR WA_BAT.
  WA_BAT-LINE = 'sync@1234'.
  APPEND WA_BAT TO IT_BAT.
  CLEAR WA_BAT.
  WA_BAT-LINE = 'lcd D:\STOCKINH\20080201.TXT'.
  APPEND WA_BAT TO IT_BAT.
  CLEAR WA_BAT.
  WA_BAT-LINE = 'cd /home/epossync/AMIT'.
  APPEND WA_BAT TO IT_BAT.
  CLEAR WA_BAT.
  WA_BAT-LINE = 'binary'.
  APPEND WA_BAT TO IT_BAT.
  CLEAR WA_BAT.
  WA_BAT-LINE = 'hash'.
  APPEND WA_BAT TO IT_BAT.
  CLEAR WA_BAT.
  WA_BAT-LINE = 'put D:\STOCKINH\20080201.txt'.
  APPEND WA_BAT TO IT_BAT.
  CLEAR WA_BAT.
  WA_BAT-LINE = ' '.
  APPEND WA_BAT TO IT_BAT.
  CLEAR WA_BAT.
  WA_BAT-LINE = 'bye'.
  APPEND WA_BAT TO IT_BAT.
  CLEAR WA_BAT.
CLEAR FILENAME1.
FILENAME1 = 'D:\STOCKINH\ftp_upload.txt'.
open dataset filename1 for output in binary mode." ENCODING DEFAULT.
IF sy-subrc  = 0.
EXIT.
ENDIF.
LOOP AT it_bat INTO wa_bat.
TRANSFER wa_bat TO filename1.
CLEAR wa_bat.
ENDLOOP.
close dataset filename1.

Similar Messages

  • Why the background job for downloading file failed?

    I have a background job for downloading file with logical path.
    with
    'OPEN DATASET l_out_file FOR OUTPUT IN TEXT MODE ENCODING DEFAULT';
    Now, the program can be run in foreground;but when it running on background, it shows 'open file error'.
    I do not know what happen?
    Please help ~~

    Hi,
    The logical path you have provided might be incorrect or you might not have the necessary authorization to read/write on that folder.
    Please check the folder in transaction AL11 & check whether you have the authorization to read/write. BASIS consultant would be able to tell you about it.
    Best regards,
    Prashant

  • Error in background job for program RSGET_SMSY error message No active job

    Hello!
    I would like to set up the Change Request Management functionality in SAP Solution Manager.
    The only red warning by executing Test-button in Tcode “SOLAR_ADMIN_PROJECT” is:
    <b>Error in background job for program RSGET_SMSY error message No active job found</b>
    Can someone please tell me how to solve this problem?
    (tcodes, technical steps)
    Thank you very much!
    regards
    Thom

    Thank you very much!
    Can you also help me with the warning "Errors occurred during synchronization of the system landscape" in tcode SOLAR_PROJECT_ADMIN" --> System landscape --> Change requests --> "Refresh"?
    The second issue I cannot see any projects in Tcode "/TMWFLOW/CMSCONF"
    according to the SPRO-step "Set Project Assignment of Requests as Mandatory"
    Thank you!
    regards

  • Background Job Still Running - Data Can Be Displayed Only Msg Populated in Maintain Versions (OKEQ) Screen

    Hi,
    I try to create 2013 FY in "Setting for Each FY" in OKEQ - Maintain Versions unfortunately I have created Null FY, try to delete Null FY on the time it will ask Job schedule, I have cancelled the job & reopen Maintain Versions (OKEQ) screen on the time system populated the msg "Background Job still running - Data can be displayed only"
    In Settings for Each FY screen there is no New Entries button, all FY are blocked status, changes was not allowed.
    How can I resolve it.
    Waiting for your valuable suggestions.
    Regards,
    Nageswar.

    Dear Rajneesh Saxena
    Thanks for your prompt reply.
    Yes you are correct, on the time of deletion it will ask Background Job Process, for immediate deletion must & should select "NO".
    While "Settings for Each FY" screen populates message "Background Job Still Running - Data Can Be Displayed Only" open  screen in display mode enter the command "=KILL" in command bar press enter, then you will allow to changes get New Entries button also.
    Problem is solved
    Regards,
    Nageswar.

  • How To Run Background Job on Specific Date of Every Month

    Hi,
    I am looking for an option there we can Run Background job On Specific Date!
    Example: Task Name: Zprg1 > each month of "18", and same I want to repeat after 3 Days means on "22", then want to repeat after 5 days means on "28"
    please suggest.

    Hi swapZ,
    this is very easy:
    1. Schedule the Job Zprg1 on the 18th of this month and enter a mothly period:
    2. copy this job to new name  Zprg1_plus3 and repeate the action of point 1 with the date 22.04.2015.
    3. copy this job to new name  Zprg1_plus5 and repeate the action of point 1 with the date 28.04.2015.
    You will get thre jobs running every month on 18. 22. and 28.
    Best regards
    Willi Eimler

  • Error in background job for VT04 - RV56TRGN

    Hello!
    The selection criteria is fine - we want every shipping point to be used to create every variant. We also have TPPs mirroring the plant codes. The job log sepects some deliveries which are good and tries to process them - the endlogue is it found X no. of deliveries, processed them but did not write the shipment to the data base. Digging further, it shows the error - <u>the system cound not determine the TPP for the plant in the delivery line item.</u>
    When I look at the variant, it doesn't talk of the TPP at all - only the shipping point and all the other criteria mainly associated with the deliveries and their statuses. I am wondering how the system knows which TPP to use for each shipping point when no TPP is assiged in the variant? Is this a default configuration I am missing? Or something else? Appreciate any leads...
    Thanks a lot.

    PS: In addition to creating the shipments, we also need to make their status to 'complete' in the background job as it is a purely non value added activity for us but we need the shipments for the cost documents. Any ideas how I can go about that?
    Thanks.

  • Spool error for background job

    Hi All,
    I have scheduled one job in sap for a report.I have made a distribution list via tcode SO01.
    I have given this distribution list to the SPOOL RECEPIENT section in SM 36.
    The job is running successfully but is giving the following error and not sending emails to the distribution list.
    The error is :-
    "Spool list of step 1 could not be sent due to error 7".
    Does anybody has any idea about this error?
    Please help its a production issue.
    Thanks in advance
    Vivekanand Meghmala

    Look at SAP note : 760838
    Symptom
    Background job spool lists are not sent.
    Other terms
    RSBTCRTE, RSPO_SPOOLJOB_TO_OFFICE, SO_DOCUMENT_SEND_API1
    Reason and Prerequisites
    1. The jobs in question have recipient references in table TBTCO but these have no equivalent in the Business Object Repository.
    2. An error occurs when sending in the spool or in the Sapconnect layer.
    Solution
    This note does not provide a direct solution to the problem but it does provide a source code enhancement that you can use to create more trace information about the cause of the error. When you copy and execute a job with spool list recipients, trace messages are output when errors occur.
    After implementing the correction instructions, use transaction SE91 to create the following message:
    Message class: BT
    Number: 347
    Text: Spool list of step &1 could not be sent due to error &2.
    In detail, the error numbers mean:
    1 = Spool request does not exist (or no longer exists)
    2 = Spool request does not contain any data
    3 = Empty page area selected
    4 = No authorization to send the request
    5 = Access to the spool request is not possible
    6 = Read error in the Temse layer
    7 = Spool request could not be sent (sending problem)
    8 = Incorrect request type
    9 = Other

  • Back ground job to download data into excel in the given path on sel-screen

    Hi Friends,
      I have 2 radion buttons on the selection screen 1. Online 2. Back ground.
    If i select the back ground radion button all program should run in back ground only, and finally the data should be downloaded to excel file on the given path in selection screen.
    Does any one have code for this.
    Thanks in advance
    Ajay
    Edited by: Ajay kumar on Aug 30, 2010 11:03 AM

    Hi Ajay,
    try this way..
    If sy-batch = 'X' . "background Job
    *   Submit report in background and creating spool
      SUBMIT (w_rname) USING SELECTION-SET p_var
          TO SAP-SPOOL WITHOUT SPOOL DYNPRO
          SPOOL PARAMETERS wa_pri_params AND RETURN.
      COMMIT WORK AND WAIT.
    *   To fetch the spool number from TSP01 table
      IF sy-subrc EQ 0.
        SELECT rqident
               FROM tsp01
               INTO p_spool
    *             UP TO 1 ROWS
               WHERE rq2name = wa_pri_params-plist.
        ENDSELECT.
      ENDIF.
    ENDIF.
    * Fetching Spool data into internal table
      CALL FUNCTION 'RSPO_RETURN_ABAP_SPOOLJOB'
        EXPORTING
          rqident              = p_spool
        TABLES
          buffer               = t_Excel_data.
    "Now format the Data into excel format or Comma seperated format and download to Appl server.
    Prabhudas

  • Background job not updating data for some steps of program

    We have created a custom program and submitting the standard program RPRCCC_READ_KR1025
    which is used for conversion of AMEX credit card files.
    Since this program can update data for 1 company id at a time,we have created a background job
    for that program with 10 steps and 10 variants of data related to 10 different company codes.
    when this job is executed it is not updating data for all the 10 files , sometimes it updates 5,7,etc...
    If we execute the other files which didnt update in job manually they are getting updated.
    All the files executed with that program can be seen in PRTA transaction.
    Regards,
    Gautham.
    Edit: Solved.
    Since the standard program updates the database every time with commit work
    there should be some time until the next database update,so we can use wait command
    after the submit statement which will do the trick.
    Edited by: Gautham Vangaveti on Aug 5, 2010 7:20 PM

    Hi,
    I mean B(Sub Assembly)
    Item Rollup Flag
    A No
    --B                       Yes
    ---B1 No
    ---B2 No
    ---B3 No
    --C                      Yes
    In this case when we run cost rollup by giving item A, Oracle will consider below structure.
    A
    --C
    Regards,
    Sarvottam.

  • Error in Background Job Processing.

    Dear All,
             I am using a background job for processing the outbound delivery.
             In the user exit in delivery program I am checking for the combination of
             ship to party, Material & Batch of outbound delivery in a ztable. If the combination exists in
             Ztable I do not want to save & ignore this delivery creation and continue with the next
             delivery order creation thru the batch job.
             However I need to give an error / warning message for the delivery orders
             which are not created so I am giving the error message as success message
             in  the below format :-
              IF L_RETURN-TYPE = 'E'.
                MESSAGE S000(Z64_I) WITH L_RETURN-MESSAGE_V1
                                         L_RETURN-MESSAGE_V2
                                         L_RETURN-MESSAGE_V3
                                         L_RETURN-MESSAGE_V4
                                         DISPLAY LIKE 'E'.
                PERFORM FOLGE_GLEICHSETZEN(SAPLV00F).
                FCODE = 'ENT1'.
                SET SCREEN SYST-DYNNR.
                LEAVE SCREEN.
              ENDIF.
            But my job is finished as soon as the above message is encountered and the
            rest of the outbound deliveries are not created.
            However if I execute the progarm in foreground the execution is working fine.
            Could you please let me know what do I need to code / do corrections to make
            the program run successfully in background.
    Thanks & Regards
    Jitendra Gujarathi

    Hello,
    Check system log and also check work process trace, to know the error.
    I feel that it could be Authorization issue, you don't have sufficient authorization to do.
    Hope this helps.
    Regards
    venkata
    Edited by: venkata emandi on Sep 12, 2011 8:13 AM

  • Background job to download standard ALV reports

    Hi,
    Could anyone knows how to download an standard ALV report in a background job?
    In a job I made, some ALV reports were precessed and made, and their spools were made,
    but not downloaded.
    Regerds,
    Katsumi Makabe

    hi,
    I think you can have a network shared folder on application server.
    you said that it is a comma separated file.
    1) Using TCODE CG3Z, upload the flat file to application server , remember to copy the path (it contains file path aswellas name).
    2) Using DATASET read the filepath along with the name and read each line into workarea and split at ',' into fields.
    3) Then append those fields to internal table.
    using the FMs job_open, job_submit and job_close you can go for background scheduling.
    Please go through the following link for sample code on FTP.
    http://abap4.tripod.com/FTP_Using_SAP_Functions.html
    Reward points if helpful.
    Thanks and regards

  • Background job with download

    Hi
    Is it possible to set a program , that contains the download , in background?
    If so, how?
    Thank U
    Narendra

    hi,
    You cannot download to the frontend in a background job because the GUI isn't available.
    You will have to use OPEN DATASET stmts and
    put the file on the Application server in the background
    and then use the transaction CG3Y in the foreground to download the file to the pc from the application server.
    regards,
    priya.

  • Error in background job scheduling in Solman 7.0

    Hi Experts,
    I am working with Solman 7.0 configuration. In the IMG node for Scheduling background jobs (Solution manager-> General Settings), while following the documentation to schedule the jobs, I am facing issues with the following jobs:
    1. *SEND_SYSTEM_RELATIONSHIP_TO_SUPPORT *
    This job got cancelled on immediate scheduling, however has been scheduled for next day. What could be the reason by which it got cancelled?
    2. AI_SDK_FILL_FILE_TYPE_TABLE
    I cant find a job of this name in the system (while all other jobs are already available in the system by default). But, there is a program with the same name. Should I schedule the same in SM36?
    Regards,
    Arun.

    Hi,
    Yes schedule a job with program AI_SDK_FILL_FILE_TYPE_TABLE. Hope this solves your problem.
    Feel free to revert back.
    --Ragu

  • Background Job : To download file to windows server

    Hi Gurus,
    Here we have to develop a program thats creates a csv file in a network shared folder( a windows folder), We have to schedule it as a background process. We cant use gui_upload function module, since it doesnt support background jobs.
    Please share your ideas.
    Any idea about ftp?
    Thanks in advance,
    Anuroop

    hi,
    I think you can have a network shared folder on application server.
    you said that it is a comma separated file.
    1) Using TCODE CG3Z, upload the flat file to application server , remember to copy the path (it contains file path aswellas name).
    2) Using DATASET read the filepath along with the name and read each line into workarea and split at ',' into fields.
    3) Then append those fields to internal table.
    using the FMs job_open, job_submit and job_close you can go for background scheduling.
    Please go through the following link for sample code on FTP.
    http://abap4.tripod.com/FTP_Using_SAP_Functions.html
    Reward points if helpful.
    Thanks and regards

  • Error in Background Job:CALL_FUNCTION_CONFLICT_TYPE

    Hi
    We ran one job some 2 or 3 times on the same day but it is getting cancelled now due dump error ABAP/4 processor: CALL_FUNCTION_CONFLICT_TYPE. This dump is coming due to parameter type conflict in the function module JOB_CLOSE.
    Error analysis
    An exception occurred that is explained in detail below.
    The exception, which is assigned to class 'CX_SY_DYN_CALL_ILLEGAL_TYPE', was
    not caught in
    procedure "SUBMIT_JOB" "(FORM)", nor was it propagated by a RAISING clause.
    Since the caller of the procedure could not have anticipated that the
    exception would occur, the current program is terminated.
    The reason for the exception is:
    The call to the function module "JOB_CLOSE" is incorrect:
    The function module interface allows you to specify only
    fields of a particular type under "TARGETSERVER".
    The field "MYNAME" specified here is a different
    field type.
    CALL FUNCTION 'JOB_CLOSE'
    EXPORTING
    jobname = jobname
    jobcount = jobcount
    strtimmed = 'X'.
    strtimmed = 'X'
    TARGETSYSTEM = SY-HOST.
    targetsystem = sy-host
    targetserver = myname
    EXCEPTIONS "QIZK001068
    cant_start_immediate = 1 "QIZK001068
    invalid_startdate = 2 "QIZK001068
    jobname_missing = 3 "QIZK001068
    job_close_failed = 4 "QIZK001068
    job_nosteps = 5 "QIZK001068
    job_notex = 6 "QIZK001068
    lock_failed = 7 "QIZK001068
    OTHERS = 8.
    DATA myname LIKE msxxlist-name.
    Structure MSXXLIST Active
    NAME MSNAME2 CHAR 40 0 Application Server Name
    Function module JOB_CLOSE Active
    TARGETSERVER LIKE BTCTGTSRVR-SRVNSPACE
    Structure BTCTGTSRVR Active
    SRVNAME BTCSRVNAME CHAR 20 0 Server name
    My question is why is this dump coming now after running the same job again, as earlier it got run successfully. Also, do i need to fix this this.
    Edited by: deepti Gandham on May 18, 2010 2:54 PM

    Hi Deepti,
    Check the data types of the parameters TARGETSERVER & MYNAME. They might be different, and hence the error.
    Some one might have changed the types recently. Hence there was no error previously. The error might have come after the change.
    kindly correct the data types so that they match. Or else the error would continue to occur.
    Thanks,
    James

Maybe you are looking for