EXPORT - IMPORT in BACKGROUND JOB

Hello ABAP Gurus,
There are two programs I am using.
In 1st Program I am Exporting the Data to the ABAP Memory and then after that scheduling the second program in background from 1st Program through
1 ) JOB_OPEN
2 ) SUBMIT
3 ) JOB_CLOSE
Now I am trying to Import the data that is Exported in the second program which is scheduled in background.
But I am not able to Import it.
My question is that - Does EXPORT - IMPORT Statements works in such scenario when background job is scheduled.
As it is working fine if, I only submits and does not put in the Background  JOB.
Looking forward for the answer.
Helpful answers will definately be awarded.
Thanks in Advance
Sudhanshu Garg

Hi Sudhanshu,
Export/import to memory uses ABAP memory which will not be accessible by the background job.
No need of creating the structures in dictionary
You can use the Table INDX for storing your data in the database.
See the link below for an example.
http://help.sap.com/saphelp_45b/helpdata/en/34/8e73a36df74873e10000009b38f9b8/content.htm

Similar Messages

  • How to Export/Import a batch job

    Hi there,
    I am wondering if there is/are transaction that can export/import a background job(s). Because, one of our production background jobs got deleted somehow and we have same job that sits in QA system, so we want to export that background jobs and import to Production system, since it has around 70+ steps
    Thanks
    Kumar

    I'm not sure
    but if these jobs can be put in a request and.. then transport..
    U can try..

  • Problem with Export/Import  in background

    Hi Experts,
    I am having a requirement in which i am exporting an flag to memory from one program and importing that in another program. in foreground it is working fine. But in background it is not working. Is there any work around.
    Report 1:
    DATA:l_flag type c value 'X'.
    free memory id 'ZFLAG'.
    EXPORT L_FLAG TO MEMORY ID 'ZFLAG'.
    LEAVE PROGRAM.
    Report 2:
    DATA:L_FLAG TYPE C.
      import l_FLAG from memory id 'ZFLAG'.
      free memory id 'ZFLAG'.
      IF l_FLAG = 'X'.
      LEAVE PROGRAM.

    Hi,
    You can export the flag to database ..it is not required to be a internal tabel. You can refer to this link..
    It is explained with example
    http://help.sap.com/saphelp_45b/helpdata/en/34/8e73a36df74873e10000009b38f9b8/content.htm
    Here obj1 can be single variable..
    EXPORT obj1 ... objn TO DATABASE dbtab(ar) ID key
    This will work in Background not the Export to MEMORY statement.

  • Importing SAP background Jobs to CPS

    Hi,
    We have installed free version of SAP CPS for testing. We are able to create new job through SAP CPS on Backend system.
    But how to import existing jobs from backend SAP (AS ABAP) system to SAP CPS
    Thanks and Regards,
    Yash

    Hi,
    The import creates definitions in CPS that match the definitions of the jobs in SAP, you can find these under "Job Definitions" or under "Job Chains" (depending if it was a single step or multi-step job).
    If you want to start running the job from CPS, you need to submit the corresponding job definition in CPS with the desired scheduling parameters and put the one directly in SAP on hold or remove it all together.
    Based on your questions, monitoring of SAP jobs by CPS could also be of interest to you.
    You can find more information on both topics in the administration guide that comes with the product (under the "i" icon in the user interface).
    Regards,
    Anton.

  • Importing background jobs

    Is there a way to import SAP background jobs from one client to another? In SM37, there ia an option to export the job, but I don't see an option to import it.
    Thanks

    Hi,
    The 'export' option you see is just a possibility to export to Excel the table of jobs in the selection.
    Regards,
    Eli

  • Background job stoppped in client export

    Dear all,
      I am trying to do client export form one SAP system to other SAP system. I sheduled the client export process in background job,it was running for long time.
    Now when i check in sm50 the BGD process is been stopped , but in scc3 it shows its processing.
    What is the necessary steps i need to start the job without stopping it.
    Kindly Guide me.
    Regards,
    Rakesh

    Hi ,
          I resheduled the process, once again i am getting the same error.
    My Background job is been stopped after few minutes.
    The reason is RFC in background. But i had defined the RFC between the two systems clearly and my customizing and workbench transports is working fine.
    Kindly guide me ,
    Regards,
    Rakesh.

  • Scheduled TMS_ # TMS_TP_IMPORT  background jobs fail with error code 0232

    Is anyone else having the problem we've just encountered since upgrading to ECC 6.0 and CRM 2007, where once setting up the automatic import ALL background jobs, to have all of the Transport Change Requests imported into the Q-Prod testing systems automatically, fail after several successful runs?
    After setting up the automatic import background job to run every 15 minutes, the first few run successfully (importing any transports as it should), then the transports stop being imported.
    The background jobs continue to run, but have the following in the job log overviews CRM 2007 - "Could not start transport control program tp". R\3 ECC 6.0 - "Transport control program tp ended with error code 0232".
    Only by deleting the background job and recreating it (or manually importing) from STMS, can the transports continue to be imported. Although I have noticed that there are multiple tp.exe processes started, which need to be deleted before the STMS and TMS Background jobs work again.
    The:
       DB is SQL Server 2005
       disp+work is at version 7000.150.14.48855
       R3Trans is at version 7000.149.14.47907
       tp is at version 7000.144.14.39594
    Any suggestions on how to cure this for good?

    Thanks All
    FYI
    SAP first suggested the following notes: 19466, 1150361, and to add a Startup profile parameter rfc/use_gwstart = 1. Which was only partially successful.
    I guess it had more to do with RFC processes hanging than it did with the tp, which was fixed in a later kernel patch level.
    I've upgraded the kernel to the latest (70000.181.0.0) and my problem was fixed.
    Ken

  • IMPORT/EXPORT statement in Background Mode

    Hey dudes,
    I am facing a problem in my coding. I am dealing with coding in several events in IS-U, transaction FPY1.
    However, it's not so important ya. Now I am written some code on IMPORT and EXPORT some parameters between 2 program code. It's work very fine only in 'DEBUG MODE', but when it's running not debug mode (Is BACKGROUND MODE), coz it's massive run program.
    I suspect it's because of the background job. Does background job using ABAP Memory? IMPORT/EXPORT is only for dialog work process, not background work process?? I have a lot of question mark on my head now..
    Hope anyone facing dis issue before can help.
    Cheers,
    Isaac.

    Are you trying to pass data via EXPORT/IMPORT between two programs that are both running in background, or from an online session to a background process?... i.e. what are the two lots of program code that you are wanting to pass parameters between? 
    It would be fine for a background program to "export" data to a memory ID, then for the same batch program to submit another program that does the "import" from the same memory ID... but this method won't work for an online user doing an "export" and a batch job doing an "import" -> for this to work, you would need to persist the parameters so that the batch job can retrieve them.
    If you can explain the scenario a bit more, will try to offer more help...
    Jonathan

  • How to change file type when exporting a report with a background job

    Hi,
    I've set up a background job in SM36 to execute a SAP Query I've created, set to send the results as a file to an external email address. When it arrives the file is a .htm (and it seems to cut out after a few pages of data), but I'd like it to export as a .xls, .txt or .csv.
    I've checked the job, the query and my user settings, but I can't find where the change the file extension used - can anyone please tell me how to do it?
    Thanks,
    Tim

    Hi Shiva,
    Can you please confirm where in SQ01/2 the file path information / settings are?
    Thanks,
    Tim

  • QA Approval - importing queue with background jobs

    Hi all,
    I have activated the QA approval in my system and it all works fine.  I have scheduled a background job via STMS to import the whole test system buffer each day and this works fine too. Now I want to schedule a background job to import the production buffer automatically too. This would allow us to have all approved transports automatically imported once a day (as QA approval is activated only approved transports would be imported).
    Sounds simple, but with QA approval the production buffer displays approved and non-approved requests, so the background job fails as not all transports in the buffer are in the correct status.
    Any suggestions on how I can get around this problem? 
    Thanks
    Claire.

    Hello Claire,
    This issue has been described in SAP Note 313991. please check.
    Regards,
    Debasis

  • Export to MS Access in background job

    Hi,
    is it possible in ABAP to export data to MS Access file (.mdb) in background job?
    We have an idea to run external program in RFC mode in .NET - but it requires to have WIndows installed on external machine which is not good.
    /BR / Thank you

    >We have an idea to run external program in RFC mode in .NET - but it requires to >have WIndows installed on external machine which is not good.
    Seems to me the only viable solution.   Otherwise, create your output as a flat file written somewhere on the server (or where the server can see or ftp to), and have your Access app pick it up from there.
    matt

  • Send/export the background job spool in Excel (in MHTML format) in ECC 6.0.

    Hello All,
    I have a requirement to send/export the background job spool in Excel (in MHTML format) in ECC 6.0. Please help.
    Thank you.
    Nalini

    Hi Jigar,
    Thanks for your response.
    Anything is like download to desktop or email is fine. But in MHTML format.
    We can download the ALV report in MHTML spreadsheet format when we run the program online. But the program is running for long time and going to dump.
    So i scheduled it as background job and downloading the output in  .HTML format. But user wants the spool/report output in .MHTML spreadsheet format.
    I can write the code. Instead of changing the existing program I would like to know is there any way (from standard SAP) that I can get the background spool in MHTML spreadsheet format.
    Thanks,
    Nalini

  • Rule set import - Background job did not run

    Hi,
    I am setting up my CC 5.2 production system. I have downloaded from ruleset from the dev CC and imported it into production. However the background job generated did not run. I am implementing SAP note 999785 to fix this, but am wondering what should I do about the rule set? Do I need to delete the rule set and reimport it? As this background job did not run I notice that the permission rules did not generate.
    Any advice is welcome.
    Thanks

    Hi,
    as the backgorund job never ran and no rules were created, I can just reimport the ruleset and let the job run. I have tried this and the rules were created successfully

  • Export of report/query to a file for background job runs

    I have a requirement to automate the export of a report or query to a file  so when a background job runs a  new file is generated to the drive. 
    This cannot be a customized solution for 1 report, it must be able to adapt to other reports or queries as well.
    Any help will be highly appreciated.
    Thank you,
    Thamina

    Hi,
    SAP have created a standard program RSTXPDFT4 to convert your Sapscripts spools into a PDF format.
    Specify the spool number and you will be able to download the sapscripts spool into your local harddisk.
    It look exactly like what you see during a spool display.
    Please note that it is not restricted to sapsciprts spool only.  Any reports in the spool can be converted using the program 'RSTXPDFT4'.
    Regards,
    Pavan

  • Problems creating background job for program (job open, submit and close)

    Hi gurus,
    im trying to start a background job using the FM BP_START_DATE_EDITOR to show the start date to the job or if it's imediate. this FM it's working fine, after call it im opening a job, submiting it and call the job close FM and the job close FM creates me the job.
    The problem it's when i go to the sm37 to see the job status the job has been canceled, and the job log says that i have to give a start date to the job.
    What i dont understand it's either the job is imediate or i choose a date to start the job always gives me this error...
    Below goes my code,
    any ideas will be rewarded
      CLEAR: stdt_modify_type, stdt_output.
      CALL FUNCTION 'BP_START_DATE_EDITOR'
           EXPORTING
                stdt_dialog                    = 'Y'
                stdt_input                     = stdt_input
                stdt_opcode                    = 14
           IMPORTING
                stdt_modify_type               = stdt_modify_type
                stdt_output                    = stdt_output
           EXCEPTIONS
                fcal_id_not_defined            = 1
                incomplete_last_startdate      = 2
                incomplete_startdate           = 3
                invalid_dialog_type            = 4
                invalid_eventid                = 5
                invalid_opcode                 = 6
                invalid_opmode_name            = 7
                invalid_periodbehaviour        = 8
                invalid_predecessor_jobname    = 9
                last_startdate_in_the_past     = 10
                no_period_data_given           = 11
                no_startdate_given             = 12
                period_and_predjob_no_way      = 13
                period_too_small_for_limit     = 14
                predecessor_jobname_not_unique = 15
                startdate_interval_too_large   = 16
                startdate_in_the_past          = 17
                startdate_is_a_holiday         = 18
                startdate_out_of_fcal_range    = 19
                stdt_before_holiday_in_past    = 20
                unknown_fcal_error_occured     = 21
                no_workday_nr_given            = 22
                invalid_workday_countdir       = 23
                invalid_workday_nr             = 24
                notbefore_stdt_missing         = 25
                workday_starttime_missing      = 26
                no_eventid_given               = 27
                OTHERS                         = 28.
      IF sy-subrc <> 0.
        MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
        MOVE 'X' TO gv_flag.
      ENDIF.
      DATA jobname LIKE tbtcjob-jobname.
      DATA jobcount LIKE tbtcjob-jobcount.
      DATA job_release LIKE  btch0000-char1.
      DATA job_imediate TYPE c.
      CLEAR: jobname, jobcount, job_release.
      CONCATENATE 'MAPAEXEC' sy-uname sy-datum
                   INTO jobname SEPARATED BY space.
      CALL FUNCTION 'JOB_OPEN'
           EXPORTING
                jobname          = jobname
           IMPORTING
                jobcount         = jobcount
           EXCEPTIONS
                cant_create_job  = 1
                invalid_job_data = 2
                jobname_missing  = 3
                OTHERS           = 4.
      IF sy-subrc <> 0.
        MESSAGE i003(zmapas).
        EXIT.
      ENDIF.
      SUBMIT z_mapa_execucao_orcamental
             VIA JOB jobname NUMBER jobcount
             WITH ano EQ ano
             WITH so_perio IN so_perio
             WITH so_date IN so_date
             WITH so_org EQ so_org
             WITH so_num IN so_num
             AND RETURN.
      IF stdt_output-startdttyp EQ 'I'.
        CLEAR job_imediate.
        job_imediate = 'X'.
      ENDIF.
      CALL FUNCTION 'JOB_CLOSE'
           EXPORTING
                calendar_id                 = stdt_output-calendarid
                event_id                    = stdt_output-eventid
                event_param                 = stdt_output-eventparm
                event_periodic              = stdt_output-periodic  "?
                jobcount                    = jobcount
                jobname                     = jobname
                laststrtdt                  = stdt_output-laststrtdt
                laststrttm                  = stdt_output-laststrttm
                prddays                     = stdt_output-prddays  "??
                prdhours                    = stdt_output-prdhours  "?
                prdmins                     = stdt_output-prdmins  "??
                prdmonths                   = stdt_output-prdmonths
                prdweeks                    = stdt_output-prdweeks  "?
                predjob_checkstat           = stdt_output-checkstat
                pred_jobcount               = stdt_output-predjobcnt
                pred_jobname                = stdt_output-predjob
                sdlstrtdt                   = stdt_output-sdlstrtdt
                sdlstrttm                   = stdt_output-sdlstrttm
                strtimmed                   = job_imediate
                targetsystem                = stdt_output-instname
                start_on_workday_not_before = stdt_output-notbefore
                start_on_workday_nr         = stdt_output-wdayno
                workday_count_direction     = stdt_output-wdaycdir
           IMPORTING
                job_was_released            = job_release
           EXCEPTIONS
                cant_start_immediate        = 1
                invalid_startdate           = 2
                jobname_missing             = 3
                job_close_failed            = 4
                job_nosteps                 = 5
                job_notex                   = 6
                lock_failed                 = 7
                OTHERS                      = 8.
      IF sy-subrc <> 0.
        MESSAGE i003(zmapas).
        EXIT.
      ELSE.
        MESSAGE i004(zmapas) WITH jobname.
      ENDIF.
    Thanks in advance,
    Best Regards
    João Martins

    Hello João.
    In debug mode, check the value of variables you passed to parameters sdlstrtdt and sdlstrttm.
    As aditional info, I usually achieve your goal without FM BP_START_DATE_EDITOR.
    Check this code:
    CALL FUNCTION 'JOB_OPEN'
          EXPORTING
               jobname          = w_jobname
          IMPORTING
               jobcount         = w_jobcount
          EXCEPTIONS
               cant_create_job  = 1
               invalid_job_data = 2
               jobname_missing  = 3
               OTHERS           = 4.
    CHECK sy-subrc = 0.
    CLEAR seltab_wa.
    MOVE: t_jobs-param TO seltab_wa-selname,
    t_processar-line+34 TO seltab_wa-low.
    APPEND seltab_wa TO seltab.
    seltab_wa-selname = 'P_LOJA'.
    seltab_wa-low = t_processar-ficheiro+7(4).
    APPEND seltab_wa TO seltab.
    *** Submete o programa para o JOB
    SUBMIT (t_jobs-repid)
      WITH  SELECTION-TABLE seltab
      USER sy-uname
       VIA JOB w_jobname NUMBER w_jobcount
       AND RETURN.
    *** Encerra o JOB
      l_hora = sy-uzeit.
      ADD 60 TO l_hora.
    CALL FUNCTION 'JOB_CLOSE'
       EXPORTING
          jobcount           = w_jobcount
          jobname           = w_jobname
          sdlstrtdt            = sy-datum
          sdlstrttm           = l_hora
          targetserver       = w_servidor
       IMPORTING
          job_was_released     = l_liberado
       EXCEPTIONS
          cant_start_immediate = 1
          invalid_startdate    = 2
          jobname_missing      = 3
          job_close_failed     = 4
          job_nosteps          = 5
          job_notex            = 6
          lock_failed          = 7
          OTHERS               = 8.
    Regards.
    Valter Oliveira.

Maybe you are looking for

  • Case Insensitive File Names in Sender File Adapter

    Hi, I've tried my best to search SDN on this issue with no help... My sender file name can have any case (upper or lower) e.g. ABC_123.txt or ABc_345.txt or aBC_456.txt However configuring the file name in the sender file channel as 'ABC*' did not wo

  • No signal to dual monitors on start up

    HP ENVY Phoenix 810-170st CTO Desktop PC, windows 8.1 Two computer monitors, same models, one connected by dvi and one by hdmi. Upon start up they will randomly fail to display anything and will say "no signal, entering power saving mode". Sometimes

  • When will I get an email confirming my loan for Education?

    Hello, I have applied for a Finance on my laptop Macbook Air 13" (for installments in a period of 10months) and it's been more than a week since I sent the required documentation for the loan by post (I live in the UK). Since then, I haven't heard ne

  • IronPort Bounce notifications

    So...we have Symantec DLP running.  When a user sends an email that contains data blocked by a Symantec DLP policy they get an email from DLP saying their email was blocked.  They also get an undeliverable from our Exchange environment saying ironpor

  • Active ID - unable to change no matter what I do

    I recently had to send my original blackberry 8900 back to the provider for a replacement model due to a fault it had developed. This has meant that the Active ID Desktop Manager (DM) uses to identify the device has changed. Since I dont now have acc