BACK GROUND FILE CREATION

IF SY-BATCH = ' X'
IF NOT i_down[] IS INITIAL.
        OPEN DATASET p_pf_01 FOR OUTPUT IN TEXT MODE ENCODING DEFAULT.
        LOOP AT i_down.
          v_down-co_name = i_down-co_name.
          v_down-plant   = i_down-plant.
          v_down-d_adr   = i_down-d_adr.
          v_down-matnr   = i_down-matnr.
          v_down-maktx   = i_down-maktx.
          v_down-mat_typ = i_down-mat_typ.
          v_down-str_loc = i_down-str_loc.
          v_down-d_sotxt = i_down-d_sotxt.
          v_down-lifnr   = i_down-lifnr.
          v_down-name1   = i_down-name1.
          v_down-kunnr   = i_down-kunnr.
          v_down-pspnr   = i_down-pspnr.
          v_down-vbeln   = i_down-vbeln.
          v_down-posnr   = i_down-posnr.
          v_down-d_taxid = i_down-d_taxid.
          v_down-meins   = i_down-meins.
          v_down-budat   = i_down-budat.
          v_down-xblnr   = i_down-xblnr.
          v_down-rmenge  = i_down-rmenge.
          v_down-imenge  = i_down-imenge.
          v_down-bwart   = i_down-bwart.
          v_down-bmenge  = i_down-bmenge.
          v_down-mblnr   = i_down-mblnr.
          v_down-remak   = i_down-remak.
          CONCATENATE  v_down-co_name
                       v_down-plant
                       v_down-d_adr
                       v_down-matnr
                       v_down-maktx
                       v_down-mat_typ
                       v_down-str_loc
                       v_down-d_sotxt
                       v_down-lifnr
                       v_down-name1
                       v_down-kunnr
                       v_down-pspnr
                       v_down-vbeln
                       v_down-posnr
                       v_down-d_taxid
                       v_down-meins
                       v_down-budat
                       v_down-xblnr
                       v_down-rmenge
                       v_down-imenge
                       v_down-bwart
                       v_down-bmenge
                       v_down-mblnr
                       v_down-remak
                 INTO
                     i_csv_file-csv_record
                 SEPARATED BY c_coma.
          IF p_pf_01 IS NOT INITIAL.
            TRANSFER i_csv_file-csv_record TO p_pf_01.
            IF sy-subrc = 0.
              l_flag1 = 'X'.
            ENDIF.
          ELSE.
            MESSAGE s045(zz) WITH text-039.
          ENDIF.
        ENDLOOP.
        CLOSE DATASET p_pf_01.    
ENDUIF.
When i execute that Logic in Back Ground , i am not getting file in APP server
could any one help on this pls

Hi ,
Are you giving any value to field  p_pf_01 or not? May this field is used for Presentation server file.
Put a break-point at Open Dataset statement and debug.
Hope this helps you..
Regards,
Ashok

Similar Messages

  • Back ground Job Creation  and maintanance ?

    Gurus
    I have a report, which will take more than the normal 10 min time.
    ISo i have to run it in the back ground session.
    Please let me know how to create a back grund job and maintain and process it?
    Also please tell me the Tcodes associated with this process.
    Thanks a lot.. Points will be awarded....of course...
    Meenakshi.N

    On the report screen, press F9 (or program -> execute in background). Give the printer name and to send to spooler or print immediately option in the initial screen. Press OK.
    Then, give the start time (options will appear) and click on "Save" button.
    Now, to see the status of the job, go to SM37.and execute by your username. Here you can see the job status, spool etc.
    Let me know if you have any questions.

  • How to download the application file to local file by back ground job?

    hi:
      can any one tell me how to download the application file to local file by back ground job? thanks in advance..
    Monson

    Hi,
    In order to download a file from application layer to a local file in background,
    first write a report(ZREPORT1) in which do the following steps:
    OPEN DATASET g_file_1 FOR INPUT IN TEXT MODE ENCODING DEFAULT.
    loop the g_file and append all the data into another internal table.
    end of this report you shd have all the data in the application layer file into your internal table.
    Now create another report(ZREPORT2) and submit this report in background.
    that is,
    JOB_OPEN
    JOB_SUBMIT and
    JOB_CLOSE
    and in job_submit submit ZREPORT1 which downloads the file in application layer.
    Please reward points if helpful.
    Regards,
    Arul.

  • Uploading XL file using call Transaction and running in back ground

    Hi all,
       I am updating the T-code VA01 using call TRansaction method ....
      i am uploading the file is XL file for that i m using the FM ALSM_EXCEL_TO_INTERNAL_TABLE.
      But if execute my program in the back ground This FM is giving Dump because it can not Execute in Back GRound...
      Plz let me know any FM to upload data from Excel file Both from foreground and back ground....
      Plz let me know ASAP..
    Thanks,
    Suresh

    HI...,,
    When u run any program in Background, it will not have any contacts with the presentation server.... You cannot upload  a presentation server file..
    But u can use the Application server file...
    SO first store this excel file's data in Application server using the transaction CG3Z and then use the Open data set and read dataset to upload the application server file !!!
    reward all helpful answers !!
    regards,
    sai ramesh

  • Truly dumb question. How do I get PS to actually complete a command, eg straighten an horizon, and finalise the change. Even doing a "save as" with a new file name and reloading brings the image back, straightened, but with the skewed back ground frame st

    Truly dumb question. How do I get PS to actually complete a command, eg straighten an horizon, and finalise the change. Even doing a "save as" with a new file name and reloading brings the image back, straightened, but with the skewed back ground frame still there. Is there a "apply change" or similiar command that I simply cannot see.

    brings the image back, straightened, but with the skewed back ground frame
    PSE did what you told it to do. Choose the Straighten and crop edges or fill edges options when you use the straighten tool if you want it to do more than just straighten the contents of the image. Many people prefer the plain straighten because they'd rather crop themselves than let PSE do it.

  • ME2ON - Delivery creation via back ground job

    Hi,
    We are using ME2ON transaction for subcontracting process. Requirement is to have a back ground job scheduled to create deliveries.
    Is there a trick to have this transaction executed in the back ground.(As this is a SAP  ENJOY transaction, BDC is not supported for back ground processing purpose) 
    you inputs are much appreciated
    Regards
    Sumanth

    manosijbasu  
    We are not keen in using older trasaction as that will not serve our purpose, we want to use ME2ON.
    BAPI- Can you please give me the BAPI name to create a outbound delivery for subcontracting.
    Concern is if i use the BAPI in the back ground, how can i populate the date automatically from the PO, if that is the case, then we are Rewriting the whole program(ME2ON)
    Best Regards
    Sumanth

  • Back ground creation of to

    Hello gurus,
    My scenario is that , when i do a gr , the goods are directed to a storage type gr1. Now as soon as the goods are moved to the GR1 storage tyhpe , a back ground job should create a to for bin to bin transfer. I tried creating a variant for lt10 but am not able to do it ..please advice..
    thnaks in advance
    kaush

    Gurus,
    I have already done the gr process, the material is moved form 902 to a storage type gr1. Now after moving it gr1, the customer wants these articles to be moved to storage type dc1. I want to create the TO in the background automatically as soon as the material arrives in the gr1 st type.
    I hope i have answered your question frenchy. What you said krishna , makes the bin a fixed bin,( by specifying the st type and bin in the movement type and that wouldnt be necessary in my case since i have defined the storage type strategy.
    any suggestions ...
    thanks
    kaushik

  • Back ground job work in MM

    CAN ANY BODY TELL ME WHAT IS A BACK GROUND JOB WORK IN MM pls explain it with good example tell me 1 or  2back ground job work relevent transactions
    good answer will be awarded
    kiran

    Hi,
    Background job means system will automatically perform some transaction / actions at perdetermined time based on the variants selected for that program.
    Ex 1: You want to see the list of PO or PR or Production order created for a day, you can create a ABAP program and give the creation date in selction screen.
    Provide the Plant or doc type, file path to download the report etc..
    and save the variant.
    You can set this program to run during mid night( 11.00 p.m) with the sysytem date (crrent date).
    So system will run this program and extract the report in Application server level as per the file location given in the program selection screen.
    Ex 2:
    MRP program
    Ex 3.
    Auto PO creation program
    Thanks,
    Kumar Arcot

  • How To Handle With Back Ground JOB From WEBUI When Click On "Appove"

    Hi
    How To Scheduled A Job Through ABAP Report In back end  Of CRM when i click on "Approve" Button in WEBUI  From result list.
    As per My requirement I have a Search View and Result View
    In Search View I have  Below Fields
    ITC Vendor ID    
    Claim Status
    User status (date status changed)
    Model
    Serial Number
    Date completed of Service Completion
    Based on Search Criteria I will get Result In Result View.(Suppose 10 Records I got In Result View)
    In the Result View I need to Add one Button As "Approve"
    When i Click On Approve button One Pop up Message Need to Open And In that popup window I need to Display Below Text
    "Approve  Claim Job Has Started In Background  
    Note: Only Claims Which are in Submitted  Status  Will be  Approved. you May Close This Window"
    In SAP CRM System  Back Ground Job Need To Start When Click On "Approve" Button In WEBUI .
    In the Back Ground ABAP Report which will validate based on Result List Records"
    In the Result List we may have all types of Claims which are status in "Submitted" "Pending" "Rejected" "Approve".
    I need to collect all records from Result list and validate Those Records who's Status in "Submitted
    1)Sort all the claims based on ITC Vendor ID.
    2)Grouped all the submitted claims against each ITC Vendor ID from the search result
    3)Change the status of the selected submitted claims to Approved.
    4)Displays information messages as mentioned whenever a claim is approved, the same message will be captured in the job log.
    ‘Claims <ClaimID 1>,…<ClaimID N> now approved for ITC Vendor ID’.
    5)Sending Email to each IRC.
    6)Capture all the approved claims in the below format (Format Attached "Screen Shot Attachment")
    7)Store the file in the Application Server AL11 in .csv format
    Please Find Attachement For Reference.
    1)ITC Claim Screen Shot
    2)Screen Shot For Attachment
    Thanks
    Raj

    Hi,
    You can add the following code in on approve method to show popup to the user,
    IF req_edit IS NOT BOUND. " gloabl attribute in impl class of the view
        REFRESH lt_buttons.
        lss_button-id  = 'btnyes'.
        lss_button-text = 'YES'.
        lss_button-on_click = 'YES'.
        APPEND lss_button TO lt_buttons.
        CLEAR lss_button.
        lss_button-id  = 'btnno'.
        lss_button-text = 'NO'.
        lss_button-on_click = 'NO'.
        APPEND lss_button TO lt_buttons.
        CLEAR lss_button.
        CALL METHOD comp_controller->window_manager->create_popup_2_confirm
          EXPORTING
            iv_title          = 'ATTENTION'
            iv_text           = 'Are you sure you want to edit this document?'
            iv_btncombination = '99'
            iv_custombuttons  = lt_buttons
          RECEIVING
            rv_result         = req_edit.
        req_edit->set_on_close_event( iv_event_name = 'EDIT' iv_view = me ). "#EC NOTEXT
        req_edit->open( ).
        RETURN.
      ELSE.
        lr_node ?= req_edit->get_context_node( 'OUTPUTNODE' ).
        lv_outbound = lr_node->get_event_name( ).
    *  CLEAR ptc_pricing_status.
    *    lv_outbound = req_edit->get_fired_outbound_plug( ).
        IF lv_outbound = 'YES'.
    you can use the submit report code here and you can al the validations here
        ELSE. " No
    if user clicks no nothing to do..
        ENDIF.
        CLEAR req_edit.
      ENDIF.
    Best Regards,
    Dharmakasi.

  • ERROR IN BDC SESSION BACK GROUND ( USING PP03 T.CODE)

    Hi Experts,
    When i am executing the session ( pp03 T.Code) ,it is working fine in fore ground as well as in display errors mode. But it is not working in back ground mode.
    it is raising the exception ( cntl-system-error).
    I used flat file which is in the presentation server . I accessed it by gui_upload Function Module.
    <b> I am also getting the error using data sets . After upload the presentation server data into one internal table .I sent it to application server using open data set ( transfer ) , after that i read the application server data using open dataset ( read )
    into another internal table ( i declared with same structure of flat file ) .</b>
    But this time also it is giving same error ( runtime exception).
    Please tell me how can i handle using datasets .  Its Very urgentttttttt
    Please any body help meee ( If any one worked on this (pp03 T.code) ) .
    Send the code  or Inform the full detailsss as soon as possibleeee
    regards ,
    dattu malge.

    Hi,
    Go to the transaction SM35 and select your session and then click the Process Button.
    Here you select the Processing Mode as "Background".
    It is not possible to execute the same session by more than one user at a same time.
    RSBDCSUB is used to automate the processing of Batch input session.
    Cheers,
    Hakim

  • BAPI_DOCUMENT_CREATE2 - Document upload to DMS - Back ground

    Hi,
    We are trying to uploda a file into DMS(CV01N) from SAP R/3, BAPI 'BAPI_DOCUMENT_CREATE2'. This works fine in foregroung but when we ececute it in background, we get an error saying 'Error while checking in and storing'.
    Could anyone please suggest me if we can sucessfully execute in back ground mode?
    Thanks,
    Ranjith Singh.

    it is not possible to download in background to a presentation server (your local PC) hence it is not possbile to upload either.
    when you submit the program to the background thenthe session is no longer attached to the PC that created it.
    Because of this you have to go via the application server.
    compare hundred of threads by searcing the ABAP forum with keywords +download +background
    http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/e0901cba-f49e-2910-748c-d7ce4c0c4c1c

  • RC-50004: Fatal: Error occurred in ApplyDatabase: Control file creation fai

    Hi guys,
    I am cloning and EBS 12.1.3 from one server to another, and when Configuring the target system database server with ''perl adcfgclone.pl dbTier'', I am getting the following error:
    RC-50004: Fatal: Error occurred in ApplyDatabase:
    Control file creation failed
    MOS is saying that it is due to wrong permissions on the /var/tmp/.oracle directory and we should give it the following permissions:
    chmod 777 /var/tmp/.oracle
    After giving those permissions and rebooting the server , and running the perl adcfgclone.pl dbTier script, I am still having the same problem:
    RC-50004: Fatal: Error occurred in ApplyDatabase:
    Control file creation failed
    This is the contents of the ApplyDBTier log file (since the file exceed 30.000 characters, i am going to post the parts where the errors occur:
    [oratest@DLAERPSRV01 ERP_DLAERPSRV01]$ cat ApplyDBTier_05021530.log
    Started ApplyDBTier at Thu May 02 15:30:44 WAT 2013
    Version:
    ApplyDBTier.java : 120.6.12010000.3
    ApplyDBTier (prog) -1 true true true...
    # Calling ApplyDBTechStack...
    Executing runInstallDriver...
    Started unzipping files...
    Completed runInstallDriver.
    Executing home registration for s_db_oh...
    instantiate file:
    source : /u02/oratest/db/tech_st/11.1.0/appsutil/template/adouidb.pl
    dest : /u02/oratest/db/tech_st/11.1.0/appsutil/clone/ouicli.pl
    backup : /u02/oratest/db/tech_st/11.1.0/appsutil/clone/ouicli.pl to /u02/oratest/db/tech_st/11.1.0/appsutil/out/ouicli20.pl
    setting permissions: 700
    setting ownership: oratest:dba
    instantiate file:
    source : /u02/oratest/db/tech_st/11.1.0/appsutil/template/config_ux.tmp
    dest : /u02/oratest/db/tech_st/11.1.0/rdbms/lib/config.c
    backup : /u02/oratest/db/tech_st/11.1.0/rdbms/lib/config.c to /u02/oratest/db/tech_st/11.1.0/appsutil/out/config21.c
    setting permissions: 700
    setting ownership: oratest:dba
    instantiate file:
    source : /u02/oratest/db/tech_st/11.1.0/appsutil/template/adlnkoh.sh
    dest : /u02/oratest/db/tech_st/11.1.0/appsutil/clone/adlnkoh.sh
    backup : /u02/oratest/db/tech_st/11.1.0/appsutil/clone/adlnkoh.sh to /u02/oratest/db/tech_st/11.1.0/appsutil/out/adlnkoh20.sh
    setting permissions: 700
    setting ownership: oratest:dba
    Executing script in InstantiateFile:
    /u02/oratest/db/tech_st/11.1.0/perl/bin/perl -I /u02/oratest/db/tech_st/11.1.0/perl/lib/5.8.3 -I /u02/oratest/db/tech_st/11.1.0/perl/lib/site_perl/5.8.3 -I /u02/oratest/db/tech_st/11.1.0/appsutil/perl /u02/oratest/db/tech_st/11.1.0/appsutil/clone/ouicli.pl
    script returned:
    Beginning OUI CLI cloning for s_db_ohThu May 2 15:30:46 2013
    /u02/oratest/db/tech_st/11.1.0/appsutil/jre/bin/java -classpath /u02/oratest/db/tech_st/11.1.0/appsutil/java:/u02/oratest/db/tech_st/11.1.0/oui/jlib/OraInstaller.jar:/u02/oratest/db/tech_st/11.1.0/appsutil/java/xmlparserv2.jar oracle.apps.ad.clone.util.OracleHomeCloner -OUICLI -e /u02/oratest/db/tech_st/11.1.0/appsutil/ERP_DLAERPSRV01.xml -nolink -oaVar s_db_oh -homestub db -log /u02/oratest/db/tech_st/11.1.0/appsutil/log/ERP_DLAERPSRV01/ohclone.log
    Running OUI CLI home cloning from within OracleHomeCloner:
    /u02/oratest/db/tech_st/11.1.0/oui/bin/runInstaller -clone -silent -force -nolink -waitForCompletion -invPtrLoc /u02/oratest/db/tech_st/11.1.0/admin/oui/ERP_DLAERPSRV01/oraInst.loc ORACLE_HOME=/u02/oratest/db/tech_st/11.1.0 ORACLE_BASE=/u02/oratest/db/tech_st/11.1.0 ORACLE_HOME_NAME=ERP_DB__u02_oratest_db_tech_st_11_1_0 -J-Doracle.installer.noLink=true
    Finished OUI CLI cloning for s_db_oh with return code: 0Thu May 2 15:30:56 2013
    Executing script in InstantiateFile:
    /u02/oratest/db/tech_st/11.1.0/appsutil/clone/adlnkoh.sh
    script returned:
    adlnkoh.sh started at Thu May 2 15:30:56 WAT 2013
    Log file located at /u02/oratest/db/tech_st/11.1.0/appsutil/log/ERP_DLAERPSRV01/make_05021530.log
    Using make file "ins_emagent.mk" for linking SYSMAN utilities...
    Error while running adlnkoh.sh.
    return code = .16
    Please check logfile located at /u02/oratest/db/tech_st/11.1.0/appsutil/log/ERP_DLAERPSRV01/make_05021530.log
    .end std out.
    .end err out.
    Executing Technology Stack Configuration...
    Executing runAutoConfig...
    Deleting files of type INSTALL
    Checking for file: /u02/oratest/db/tech_st/11.1.0/network/admin/ERP_DLAERPSRV01/sqlnet.ora
    Processing driver file: /u02/oratest/db/tech_st/11.1.0/appsutil/template/addbtmpl.drv
    Checking for file: /u02/oratest/db/tech_st/11.1.0/appsutil/install/ERP_DLAERPSRV01/txkConfigDbOcm.pl
    File exists
    File deleted
    Checking for file: /u02/oratest/db/tech_st/11.1.0/dbs/initERP.ora
    File exists
    File deleted
    Checking for file: /u02/oratest/db/tech_st/11.1.0/network/admin/ERP_DLAERPSRV01/listener.ora
    File exists
    File deleted
    Checking for file: /u02/oratest/db/tech_st/11.1.0/network/admin/ERP_DLAERPSRV01/tnsnames.ora
    File exists
    File deleted
    Testing for RAC specific parameters before running autoconfig
    No RAC specific parameters were found, running with CVM
    Starting CVM in INSTE8_SETUP mode
    Using Context file : /u02/oratest/db/tech_st/11.1.0/appsutil/ERP_DLAERPSRV01.xml
    Attempting to create a back up of the Context file
    Created back up file of name :
    /u02/oratest/db/tech_st/11.1.0/appsutil/out/ERP_DLAERPSRV01/05021531/ERP_DLAERPSRV01.xml
    ===========================================================================
    Starting synchronization of file system Context file and its templates with those in the database
    Database connection : Failed
    OAM Context editing support feature: Unverified
    OAM Customization support feature : Unverified
    File system template : /u02/oratest/db/tech_st/11.1.0/appsutil/template/adxdbctx.tmp
    Checking for customizations to Context template
    Warning: Unable to connect to Database.
    If the system is OAM enabled, this may result in loss of customizations.
    Looking for custom template at : /u02/oratest/db/tech_st/11.1.0/appsutil/template/custom/adxdbctx.tmp
    Custom template : Not Available
    Customizations found : None
    File system Context file :/u02/oratest/db/tech_st/11.1.0/appsutil/ERP_DLAERPSRV01.xml
    Checking the Context file for possible updates from the Database
    Warning: Unable to connect to Database.
    If the system is OAM enabled, this may result in loss of customizations and the Context files in DataBase and in the file system may be unsynchronized
    ===========================================================================
    Starting Updates of Context file Thu May 02 15:31:44 WAT 2013
    found context version : 120.34.12010000.14
    available update version : 120.34.12010000.14
    No updates to apply
    Starting DB listener with command:
    /u02/oratest/db/tech_st/11.1.0/appsutil/scripts/ERP_DLAERPSRV01/addlnctl.sh start ERP
    Logfile: /u02/oratest/db/tech_st/11.1.0/appsutil/log/ERP_DLAERPSRV01/addlnctl.txt
    You are running addlnctl.sh version 120.1.12010000.4
    Starting listener process ERP ...
    LSNRCTL for Linux: Version 11.1.0.7.0 - Production on 02-MAY-2013 15:32:23
    Copyright (c) 1991, 2008, Oracle. All rights reserved.
    Starting /u02/oratest/db/tech_st/11.1.0/bin/tnslsnr: please wait...
    TNSLSNR for Linux: Version 11.1.0.7.0 - Production
    System parameter file is /u02/oratest/db/tech_st/11.1.0/network/admin/ERP_DLAERPSRV01/listener.ora
    Log messages written to /u02/oratest/db/tech_st/11.1.0/admin/ERP_DLAERPSRV01/diag/tnslsnr/DLAERPSRV01/erp/alert/log.xml
    Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=DLAERPSRV01.camairco.local)(PORT=1523)))
    Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=DLAERPSRV01.camairco.local)(PORT=1523)))
    STATUS of the LISTENER
    Alias ERP
    Version TNSLSNR for Linux: Version 11.1.0.7.0 - Production
    Start Date 02-MAY-2013 15:32:23
    Uptime 0 days 0 hr. 0 min. 0 sec
    Trace Level off
    Security ON: Local OS Authentication
    SNMP OFF
    Listener Parameter File /u02/oratest/db/tech_st/11.1.0/network/admin/ERP_DLAERPSRV01/listener.ora
    Listener Log File /u02/oratest/db/tech_st/11.1.0/admin/ERP_DLAERPSRV01/diag/tnslsnr/DLAERPSRV01/erp/alert/log.xml
    Listening Endpoints Summary...
    (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=DLAERPSRV01.camairco.local)(PORT=1523)))
    Services Summary...
    Service "ERP" has 1 instance(s).
    Instance "ERP", status UNKNOWN, has 1 handler(s) for this service...
    The command completed successfully
    addlnctl.sh: exiting with status 0
    addlnctl.sh: check the logfile /u02/oratest/db/tech_st/11.1.0/appsutil/log/ERP_DLAERPSRV01/addlnctl.txt for more information ...
    .end std out.
    .end err out.
    checking DB Connection...
    DEBUG: checkDBConnection in()
    ADX Database Utility
    getConnection() -->
    sDbHost : DLAERPSRV01
    sDbDomain : camairco.local
    sDbPort : 1523
    sDbSid : ERP
    sDbUser : apps
    Trying to connect using SID...
    getConnectionUsingSID() -->
    JDBC URL: jdbc:oracle:thin:@DLAERPSRV01.camairco.local:1523:ERP
    Exception occurred: java.sql.SQLRecoverableException: ORA-01034: ORACLE not available
    ORA-27101: shared memory realm does not exist
    Linux-x86_64 Error: 2: No such file or directory
    Trying to connect using SID as ServiceName
    getConnectionUsingServiceName() -->
    JDBC URL: jdbc:oracle:thin:@(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=DLAERPSRV01.camairco.local)(PORT=1523))(CONNECT_DATA=(SERVICE_NAME=ERP)))
    Exception occurred: java.sql.SQLRecoverableException: ORA-01034: ORACLE not available
    ORA-27101: shared memory realm does not exist
    Linux-x86_64 Error: 2: No such file or directory
    Trying to connect using SID as ServiceName.DomainName
    getConnectionUsingServiceName() -->
    JDBC URL: jdbc:oracle:thin:@(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=DLAERPSRV01.camairco.local)(PORT=1523))(CONNECT_DATA=(SERVICE_NAME=ERP.camairco.local)))
    Exception occurred: java.sql.SQLException: Listener refused the connection with the following error:
    ORA-12514, TNS:listener does not currently know of service requested in connect descriptor
    Connection could not be obtained; returning null
    -------------------ADX Database Utility Finished---------------
    DEBUG: checkDBConnection out()
    Skipping Profile Phase
    Skipping Apply Phase
    Executing CreateDB...
    ADX Database Utility
    getConnectionUsingAppsJDBCConnector() -->
    APPS_JDBC_URL='null'
    Trying to get connection using SID based connect descriptor
    getConnection() -->
    sDbHost : DLAERPSRV01
    sDbDomain : camairco.local
    sDbPort : 1523
    sDbSid : ERP
    sDbUser : apps
    Trying to connect using SID...
    getConnectionUsingSID() -->
    JDBC URL: jdbc:oracle:thin:@DLAERPSRV01.camairco.local:1523:ERP
    Exception occurred: java.sql.SQLRecoverableException: ORA-01034: ORACLE not available
    ORA-27101: shared memory realm does not exist
    Linux-x86_64 Error: 2: No such file or directory
    Trying to connect using SID as ServiceName
    getConnectionUsingServiceName() -->
    JDBC URL: jdbc:oracle:thin:@(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=DLAERPSRV01.camairco.local)(PORT=1523))(CONNECT_DATA=(SERVICE_NAME=ERP)))
    Exception occurred: java.sql.SQLRecoverableException: ORA-01034: ORACLE not available
    ORA-27101: shared memory realm does not exist
    Linux-x86_64 Error: 2: No such file or directory
    Trying to connect using SID as ServiceName.DomainName
    getConnectionUsingServiceName() -->
    JDBC URL: jdbc:oracle:thin:@(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=DLAERPSRV01.camairco.local)(PORT=1523))(CONNECT_DATA=(SERVICE_NAME=ERP.camairco.local)))
    Exception occurred: java.sql.SQLException: Listener refused the connection with the following error:
    ORA-12514, TNS:listener does not currently know of service requested in connect descriptor
    Connection could not be obtained; returning null
    -------------------ADX Database Utility Finished---------------
    adcrdb.sh started at Thu May 2 15:32:40 WAT 2013
    The environment settings are as follows ...
    ORACLE_HOME : /u02/oratest/db/tech_st/11.1.0
    ORACLE_SID : ERP
    TWO_TASK :
    PATH : /u02/oratest/db/tech_st/11.1.0/perl/bin:/u02/oratest/db/tech_st/11.1.0/bin:/usr/bin:/usr/sbin:/u02/oratest/db/tech_st/11.1.0/appsutil/jre/bin:/bin:/usr/bin/X11:/usr/local/bin:/u02/oratest/db/tech_st/11.1.0/appsutil/clone/bin/../jre/bin:/u02/oratest/db/tech_st/11.1.0/appsutil/clone/bin/../jre/bin:/usr/kerberos/bin:/usr/local/bin:/bin:/usr/bin:/home/oratest/bin:.
    LD_LIBRARY_PATH : /u02/oratest/db/tech_st/11.1.0/lib:/usr/X11R6/lib:/usr/openwin/lib:/u02/oratest/db/tech_st/11.1.0/lib:/usr/dt/lib:/u02/oratest/db/tech_st/11.1.0/ctx/lib
    Executable : /u02/oratest/db/tech_st/11.1.0/bin/sqlplus
    The log information will be written to
    /u02/oratest/db/tech_st/11.1.0/appsutil/log/ERP_DLAERPSRV01/adcrdb_ERP.txt
    Creating the control file for ERP_DLAERPSRV01 database ...
    SQL*Plus: Release 11.1.0.7.0 - Production on Thu May 2 15:32:40 2013
    Copyright (c) 1982, 2008, Oracle. All rights reserved.
    Connected to an idle instance.
    ORACLE instance shut down.
    Connected to an idle instance.
    ORA-27154: post/wait create failed
    ORA-27300: OS system dependent operation:semget failed with status: 22
    ORA-27301: OS failure message: Invalid argument
    ORA-27302: failure occurred at: sskgpbitsper
    CREATE CONTROLFILE REUSE SET DATABASE "ERP"
    ERROR at line 1:
    ORA-01034: ORACLE not available
    Process ID: 0
    Session ID: 0 Serial number: 0
    alter database open resetlogs
    ERROR at line 1:
    ORA-01034: ORACLE not available
    Process ID: 0
    Session ID: 0 Serial number: 0
    alter tablespace TEMP add tempfile '/u02/oratest/db/apps_st/data/temp01.dbf' REUSE
    ERROR at line 1:
    ORA-01034: ORACLE not available
    Process ID: 0
    Session ID: 0 Serial number: 0
    ALTER DATABASE RENAME GLOBAL_NAME TO "ERP.camairco.local"
    ERROR at line 1:
    ORA-01034: ORACLE not available
    Process ID: 0
    Session ID: 0 Serial number: 0
    ORA-01034: ORACLE not available
    ORA-27101: shared memory realm does not exist
    Linux-x86_64 Error: 2: No such file or directory
    Connected to an idle instance.
    ORA-27154: post/wait create failed
    ORA-27300: OS system dependent operation:semget failed with status: 22
    ORA-27301: OS failure message: Invalid argument
    ORA-27302: failure occurred at: sskgpbitsper
    BEGIN dbms_backup_restore.zeroDbid(0); END;
    ERROR at line 1:
    ORA-01034: ORACLE not available
    Process ID: 0
    Session ID: 0 Serial number: 0
    ORACLE instance shut down.
    Connected to an idle instance.
    ORA-27154: post/wait create failed
    ORA-27300: OS system dependent operation:semget failed with status: 22
    ORA-27301: OS failure message: Invalid argument
    ORA-27302: failure occurred at: sskgpbitsper
    CREATE CONTROLFILE REUSE SET DATABASE "ERP"
    ERROR at line 1:
    ORA-01034: ORACLE not available
    Process ID: 0
    Session ID: 0 Serial number: 0
    alter database open resetlogs
    ERROR at line 1:
    ORA-01034: ORACLE not available
    Process ID: 0
    Session ID: 0 Serial number: 0
    alter tablespace TEMP add tempfile '/u02/oratest/db/apps_st/data/temp01.dbf' REUSE
    ERROR at line 1:
    ORA-01034: ORACLE not available
    Process ID: 0
    Session ID: 0 Serial number: 0
    ALTER DATABASE RENAME GLOBAL_NAME TO "ERP.camairco.local"
    ERROR at line 1:
    ORA-01034: ORACLE not available
    Process ID: 0
    Session ID: 0 Serial number: 0
    declare lib_ver varchar2(3);
    ERROR at line 1:
    ORA-01034: ORACLE not available
    Process ID: 0
    Session ID: 0 Serial number: 0
    ERROR:
    ORA-01012: not logged on
    Process ID: 0
    Session ID: 0 Serial number: 0
    Disconnected
    exit_code=1
    Checking for errors ...
    The database has not been successfully created. Shutting down the instance ...
    SQL*Plus: Release 11.1.0.7.0 - Production on Thu May 2 15:32:42 2013
    Copyright (c) 1982, 2008, Oracle. All rights reserved.
    Connected to an idle instance.
    ORACLE instance shut down.
    Disconnected
    .end std out.
    .end err out.
    ADX Database Utility
    getConnectionUsingAppsJDBCConnector() -->
    APPS_JDBC_URL='null'
    Trying to get connection using SID based connect descriptor
    getConnection() -->
    sDbHost : DLAERPSRV01
    sDbDomain : camairco.local
    sDbPort : 1523
    sDbSid : ERP
    sDbUser : apps
    Trying to connect using SID...
    getConnectionUsingSID() -->
    JDBC URL: jdbc:oracle:thin:@DLAERPSRV01.camairco.local:1523:ERP
    Exception occurred: java.sql.SQLRecoverableException: ORA-01034: ORACLE not available
    ORA-27101: shared memory realm does not exist
    Linux-x86_64 Error: 2: No such file or directory
    Trying to connect using SID as ServiceName
    getConnectionUsingServiceName() -->
    JDBC URL: jdbc:oracle:thin:@(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=DLAERPSRV01.camairco.local)(PORT=1523))(CONNECT_DATA=(SERVICE_NAME=ERP)))
    Exception occurred: java.sql.SQLRecoverableException: ORA-01034: ORACLE not available
    ORA-27101: shared memory realm does not exist
    Linux-x86_64 Error: 2: No such file or directory
    Trying to connect using SID as ServiceName.DomainName
    getConnectionUsingServiceName() -->
    JDBC URL: jdbc:oracle:thin:@(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=DLAERPSRV01.camairco.local)(PORT=1523))(CONNECT_DATA=(SERVICE_NAME=ERP.camairco.local)))
    Exception occurred: java.sql.SQLException: Listener refused the connection with the following error:
    ORA-12514, TNS:listener does not currently know of service requested in connect descriptor
    Connection could not be obtained; returning null
    -------------------ADX Database Utility Finished---------------
    RC-00118: Error occurred during creation of database
    Raised by oracle.apps.ad.clone.ApplyDatabase
    StackTrace:
    java.lang.Exception: Control file creation failed
    at oracle.apps.ad.clone.ApplyDatabase.doConf(ApplyDatabase.java:635)
    at oracle.apps.ad.clone.ApplyDatabase.doApply(ApplyDatabase.java:473)
    at oracle.apps.ad.clone.ApplyDatabase.<init>(ApplyDatabase.java:366)
    at oracle.apps.ad.clone.ApplyDBTier.<init>(ApplyDBTier.java:110)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
    at java.lang.reflect.Constructor.newInstance(Unknown Source)
    at oracle.apps.ad.clone.util.CloneProcessor.run(CloneProcessor.java:67)
    at java.lang.Thread.run(Unknown Source)
    [oratest@DLAERPSRV01 ERP_DLAERPSRV01]$
    Please guys, how can I solve this problem?

    @Hussain Sawwan
    Hi Hussain,
    After successfully configured the DbTier and AppsTier with their respective post clone scripts the appstier was automatically started at the end.
    But now, I can't seem to connect with my IE 9 and Firefow browsers.
    Link: http://dlaerpsrv01.camairco.local:8002/OA_HTML/
    Contents of the portpool.lst:
    ***** List of ports allocated based on port pool 2 *****
    Database Port : 1523 (EXT_PORT)
    RPC Port : 1628
    Web SSL Port : 4445
    ONS Local Port : 6102
    ONS Remote Port : 6202
    ONS Request Port : 6502
    Web Listener Port : 8002
    Active Web Port : 8002 (DUP_PORT)
    Forms Port : 9002
    Metrics Server Data Port : 9102
    Metrics Server Request Port : 9202
    JTF Fulfillment Server Port : 9302
    MSCA Server Port : 10212-10217
    MCSA Telnet Server Port : 10212,10214,10216 (DUP_PORT)
    MSCA Dispatcher Port : 10806
    Java Object Cache Port : 12347
    OC4J JMS Port Range for Oacore : 23010-23014
    OC4J JMS Port Range for Forms : 23510-23514
    OC4J JMS Port Range for Home : 24010-24014
    OC4J JMS Port Range for Oafm : 24510-24514
    OC4J JMS Port Range for Forms-c4ws : 26510-26514
    OC4J AJP Port Range for Oacore : 21510-21514
    OC4J AJP Port Range for Forms : 22010-22014
    OC4J AJP Port Range for Home : 22510-22514
    OC4J AJP Port Range for Oafm : 25010-25014
    OC4J AJP Port Range for Forms-c4ws : 26010-26014
    OC4J RMI Port Range for Oacore : 20010-20014
    OC4J RMI Port Range for Forms : 20510-20514
    OC4J RMI Port Range for Home : 21010-21014
    OC4J RMI Port Range for Oafm : 25510-25514
    OC4J RMI Port Range for Forms-c4ws : 27510-27514
    [root@DLAERPSRV01 appltest]#
    Entry in the /etc/hosts in my Win 7 Laptop:
    192.168.0.245 dlaerpsrv01.camairco.local dlaerpsrv01
    What could be the cause of this problem? It is unfortunate to reach at this point and not being able to connect.

  • Error encountered in Rapid clone (control file creation failed)

    hi all,
    i have 2- node ERP server running EBS 11.5.10 with database 9.2.0.5 and OS HP UX 11.11
    while running perl adcfgclone.pl dbTier
    i encountered the following error
    Verifying correctness of adcrdbclone.sql
    RC-00115: Not able to read temp001.dbf
    Raised by oracle.apps.ad.clone.ApplyDatabase
    RC-00115: Not able to read temp002.dbf
    Raised by oracle.apps.ad.clone.ApplyDatabase
    RC-00115: Not able to read temp003.dbf
    Raised by oracle.apps.ad.clone.ApplyDatabase
    RC-00115: Not able to read temp004.dbf
    Raised by oracle.apps.ad.clone.ApplyDatabase
    RC-00115: Not able to read temp005.dbf
    Raised by oracle.apps.ad.clone.ApplyDatabase
    RC-00115: Not able to read temp006.dbf
    Raised by oracle.apps.ad.clone.ApplyDatabase
    RC-00115: Not able to read temp001.dbf
    Raised by oracle.apps.ad.clone.ApplyDatabase
    RC-00115: Not able to read temp002.dbf
    Raised by oracle.apps.ad.clone.ApplyDatabase
    RC-00115: Not able to read temp003.dbf
    Raised by oracle.apps.ad.clone.ApplyDatabase
    RC-00115: Not able to read temp004.dbf
    Raised by oracle.apps.ad.clone.ApplyDatabase
    RC-00115: Not able to read temp005.dbf
    Raised by oracle.apps.ad.clone.ApplyDatabase
    RC-00115: Not able to read temp006.dbf
    Raised by oracle.apps.ad.clone.ApplyDatabase
    RC-00116: Error while reading dbf files. Control file creation will fail.
    an later part of log file
    Creating the control file for DVP_test database ...
    SQL*Plus: Release 9.2.0.5.0 - Production on Sun Jan 11 18:29:27 2009
    Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.
    Connected to an idle instance.
    ORACLE instance shut down.
    Connected to an idle instance.
    ORACLE instance started.
    Total System Global Area 598700552 bytes
    Fixed Size          737800 bytes
    Variable Size          419430400 bytes
    Database Buffers     167772160 bytes
    Redo Buffers          10760192 bytes
    Control file created.
    Database altered.
    alter tablespace TEMP1 add tempfile '/oradvp/ora/proddata/temp001.dbf' REUSE
    ERROR at line 1:
    ORA-00959: tablespace 'TEMP1' does not exist
    alter tablespace TEMP1 add tempfile '/oradvp/ora/proddata/temp002.dbf' REUSE
    ERROR at line 1:
    ORA-00959: tablespace 'TEMP1' does not exist
    alter tablespace TEMP1 add tempfile '/oradvp/ora/proddata/temp003.dbf' REUSE
    ERROR at line 1:
    ORA-00959: tablespace 'TEMP1' does not exist
    alter tablespace TEMP1 add tempfile '/oradvp/ora/proddata/temp004.dbf' REUSE
    ERROR at line 1:
    ORA-00959: tablespace 'TEMP1' does not exist
    alter tablespace TEMP1 add tempfile '/oradvp/ora/proddata/temp005.dbf' REUSE
    ERROR at line 1:
    ORA-00959: tablespace 'TEMP1' does not exist
    alter tablespace TEMP1 add tempfile '/oradvp/ora/proddata/temp006.dbf' REUSE
    ERROR at line 1:
    ORA-00959: tablespace 'TEMP1' does not exist
    but when i query v$tablespace it shows temporary tablespace is TEMP not temp1
    even on my production system the TEMPORARy Tablespace is TEMP
    when i see the alert file
    it says
    Tablespace 'TEMP' #2 found in data dictionary,
    but not in the controlfile. Adding to controlfile.
    File #143 found in data dictionary but not in controlfile.
    Creating OFFLINE file 'MISSING00143' in the controlfile.
    This file can no longer be recovered so it must be dropped.
    File #144 found in data dictionary but not in controlfile.
    Creating OFFLINE file 'MISSING00144' in the controlfile.
    This file can no longer be recovered so it must be dropped.
    File #145 found in data dictionary but not in controlfile.
    Creating OFFLINE file 'MISSING00145' in the controlfile.
    This file can no longer be recovered so it must be dropped.
    File #146 found in data dictionary but not in controlfile.
    Creating OFFLINE file 'MISSING00146' in the controlfile.
    This file can no longer be recovered so it must be dropped.
    File #147 found in data dictionary but not in controlfile.
    Creating OFFLINE file 'MISSING00147' in the controlfile.
    This file can no longer be recovered so it must be dropped.
    File #148 found in data dictionary but not in controlfile.
    Creating OFFLINE file 'MISSING00148' in the controlfile.
    This file can no longer be recovered so it must be dropped.
    File #149 found in data dictionary but not in controlfile.
    Creating OFFLINE file 'MISSING00149' in the controlfile.
    This file can no longer be recovered so it must be dropped.
    File #150 found in data dictionary but not in controlfile.
    Creating OFFLINE file 'MISSING00150' in the controlfile.
    This file can no longer be recovered so it must be dropped.
    File #151 found in data dictionary but not in controlfile.
    Creating OFFLINE file 'MISSING00151' in the controlfile.
    This file can no longer be recovered so it must be dropped.
    File #152 found in data dictionary but not in controlfile.
    Creating OFFLINE file 'MISSING00152' in the controlfile.
    This file can no longer be recovered so it must be dropped.
    File #153 found in data dictionary but not in controlfile.
    Creating OFFLINE file 'MISSING00153' in the controlfile.
    This file can no longer be recovered so it must be dropped.
    how can i come out though this confusion??

    i have opened the database but what about the next porcess now
    Beginning database tier Apply - Sun Jan 11 17:31:13 2009
    Log file located at /oradvp/ora/proddb/9.2.0/appsutil/log/DVP_test/ApplyDBTier_01110531.log
    RC-50004: Fatal: Error occurred in ApplyDatabase:
    Control file creation failed
    ERROR while running Apply...
    ERROR: Failed to execute adclone.pl
    Please check logfile.
    logfile says
    Checking for errors ...
    ORA-00959: tablespace 'TEMP1' does not exist
    ORA-00959: tablespace 'TEMP1' does not exist
    ORA-00959: tablespace 'TEMP1' does not exist
    ORA-00959: tablespace 'TEMP1' does not exist
    ORA-00959: tablespace 'TEMP1' does not exist
    ORA-00959: tablespace 'TEMP1' does not exist
    ORA-00376: file 148 cannot be read at this time
    ORA-01111: name for data file 148 is unknown - rename to correct file
    ORA-01110: data file 148: '/oradvp/ora/proddb/9.2.0/dbs/MISSING00148'
    ORA-00600: internal error code, arguments: [1236], [], [], [], [], [], [], []
    ORA-24313: user already authenticated
    ORA-01031: insufficient privileges
    ORA-01031: insufficient privileges
    ORA-24313: user already authenticated
    ORA-01031: insufficient privileges
    The database has not been successfully created. Shutting down the instance ...
    SQL*Plus: Release 9.2.0.5.0 - Production on Sun Jan 11 18:30:01 2009
    Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.
    Connected to an idle instance.
    ORACLE instance shut down.
    Disconnected
    .end std out.
    .end err out.
    ADX Database Utility
    getConnectionUsingAppsJDBCConnector() -->
    APPS_JDBC_URL='null'
    Trying to get connection using SID based connect descriptor
    getConnection() -->
    sDbHost : test
    sDbDomain : khannapaper.com
    sDbPort : 1528
    sDbSid : DVP
    sDbUser : APPS
    Trying to connect using SID...
    getConnectionUsingSID() -->
    JDBC URL: jdbc:oracle:thin:@test.khannapaper.com:1528:DVP
    Exception occurred: java.sql.SQLException: ORA-01034: ORACLE not available
    ORA-27101: shared memory realm does not exist
    HP-UX Error: 2: No such file or directory
    Trying to connect using SID as ServiceName
    getConnectionUsingServiceName() -->
    JDBC URL: jdbc:oracle:thin:@(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=test.khannapaper.com)(PORT=1528))(CONNECT_DATA=(SERVICE_NAME=DVP)))
    Exception occurred: java.sql.SQLException: ORA-01034: ORACLE not available
    ORA-27101: shared memory realm does not exist
    HP-UX Error: 2: No such file or directory
    Trying to connect using SID as ServiceName.DomainName
    getConnectionUsingServiceName() -->
    JDBC URL: jdbc:oracle:thin:@(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=test.khannapaper.com)(PORT=1528))(CONNECT_DATA=(SERVICE_NAME=DVP.khannapaper.com)))
    Exception occurred: java.sql.SQLException: Io exception: Connection refused(DESCRIPTION=(TMP=)(VSNNUM=153093376)(ERR=12514)(ERROR_STACK=(ERROR=(CODE=12514)(EMFI=4))))
    Connection could not be obtained; returning null
    -------------------ADX Database Utility Finished---------------
    RC-00118: Error occurred during creation of database
    Raised by oracle.apps.ad.clone.ApplyDatabase
    StackTrace:
    java.lang.Exception: Control file creation failed
         at oracle.apps.ad.clone.ApplyDatabase.<init>(ApplyDatabase.java:469)
         at oracle.apps.ad.clone.ApplyDatabase.<init>(ApplyDatabase.java:314)
         at oracle.apps.ad.clone.ApplyDatabase.<init>(ApplyDatabase.java:290)
         at oracle.apps.ad.clone.ApplyDBTier.<init>(ApplyDBTier.java:131)
         at java.lang.reflect.Constructor.newInstance(Native Method)
         at oracle.apps.ad.clone.util.CloneProcessor.run(CloneProcessor.java:68)
         at java.lang.Thread.run(Unknown Source)
    and why does it shows temporary tablespace TEMP1
    but in real it is TEMP
    i dropped around 50 days back from production and added TEMP to it

  • Back ground job in abap

    Dear  abapers  i want to send an excel attachment from my computer to email and i do that using the following code it works correctly but now i want the program to run in back ground twice a month to some ones email address by giving default recipient email address.
    with best regards,
    Hahu D.
    REPORT  YEMAIL12.
    data method1 like sy-ucomm.
    data g_user like soudnamei1.
    data g_user_data like soudatai1.
    data g_owner like soud-usrnam.
    data g_receipients like soos1 occurs 0 with header line.
    data g_document like sood4 .
    data g_header like sood2.
    data g_folmam like sofm2.
    data g_objcnt like soli occurs 0 with header line.
    data g_objhead like soli occurs 0 with header line.
    data g_objpara  like selc occurs 0 with header line.
    data g_objparb  like soop1 occurs 0 with header line.
    data g_attachments like sood5 occurs 0 with header line.
    data g_references like soxrl occurs 0 with header line.
    data g_authority like sofa-usracc.
    data g_ref_document like sood4.
    data g_new_parent like soodk.
    data: begin of g_files occurs 10 ,
       text(4096) type c,
        end of g_files.
    data : fold_number(12) type c,
            fold_yr(2) type c,
            fold_type(3) type c.
    parameters ws_file type rlgrap-filename  default 'd:\files\file1.xlsx'.
    * Can me any file fromyour pc ....either xls or word or ppt etc ...
    g_user-sapname = sy-uname.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR ws_file.
    CALL FUNCTION 'F4_FILENAME'
    EXPORTING
    * PROGRAM_NAME = SYST-CPROG
    * DYNPRO_NUMBER = SYST-DYNNR
    field_name = 'ws_file'
    IMPORTING
    file_name = ws_file.
    call function 'SO_USER_READ_API1'
    exporting
        user                            = g_user
    *    PREPARE_FOR_FOLDER_ACCESS       = ' '
    importing
        user_data                       = g_user_data
    *  EXCEPTIONS
    *    USER_NOT_EXIST                  = 1
    *    PARAMETER_ERROR                 = 2
    *    X_ERROR                         = 3
    *    OTHERS                          = 4
    if sy-subrc <> 0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    endif.
    fold_type = g_user_data-outboxfol+0(3).
    fold_yr = g_user_data-outboxfol+3(2).
    fold_number =  g_user_data-outboxfol+5(12).
    clear g_files.
    refresh : g_objcnt,
       g_objhead,
       g_objpara,
       g_objparb,
       g_receipients,
       g_attachments,
       g_references,
       g_files.
    method1 = 'SAVE'.
    g_document-foltp  = fold_type.
    g_document-folyr   = fold_yr.
    g_document-folno   = fold_number.
    g_document-objtp   = g_user_data-object_typ.
    *g_document-OBJYR   = '27'.
    *g_document-OBJNO   = '000000002365'.
    *g_document-OBJNAM = 'MESSAGE'.
    g_document-objdes   = 'hahu daily test this'.
    g_document-folrg   = 'O'.
    *g_document-okcode   = 'CHNG'.
    g_document-objlen = '0'.
    g_document-file_ext = 'TXT'.
    g_header-objdes =  'hahu daily fishikta ameley'.
    g_header-file_ext = 'TXT'.
    call function 'SO_DOCUMENT_REPOSITORY_MANAGER'
       exporting
         method             = method1
        office_user        = sy-uname
        ref_document       = g_ref_document
        new_parent         =  g_new_parent
    importing
        authority          =  g_authority
    tables
        objcont            = g_objcnt
        objhead            = g_objhead
        objpara            = g_objpara
        objparb            = g_objparb
        recipients         = g_receipients
        attachments        = g_attachments
        references         = g_references
        files              = g_files
       changing
         document           = g_document
        header_data        = g_header
    *   FOLMEM_DATA        =
    *   RECEIVE_DATA       =
    * File from the pc to send...
    method1 = 'ATTCREATEFROMPC'.
    g_files-text = ws_file.
    append g_files.
    call function 'SO_DOCUMENT_REPOSITORY_MANAGER'
       exporting
         method             = method1
        office_user        = g_owner
        ref_document       = g_ref_document
        new_parent         =  g_new_parent
    importing
        authority          =  g_authority
    tables
        objcont            = g_objcnt
        objhead            = g_objhead
        objpara            = g_objpara
        objparb            = g_objparb
        recipients         = g_receipients
        attachments        = g_attachments
        references         = g_references
        files              = g_files
       changing
         document           = g_document
        header_data        = g_header
    method1 = 'SEND'.
    g_receipients-recnam = 'MK085'.
    g_receipients-recesc = 'B'.
    g_receipients-sndex = 'X'.
    append  g_receipients.
    call function 'SO_DOCUMENT_REPOSITORY_MANAGER'
       exporting
         method             = method1
        office_user        = g_owner
        ref_document       = g_ref_document
        new_parent         =  g_new_parent
    importing
        authority          =  g_authority
    tables
        objcont            = g_objcnt
        objhead            = g_objhead
        objpara            = g_objpara
        objparb            = g_objparb
        recipients         = g_receipients
        attachments        = g_attachments
        references         = g_references
        files              = g_files
       changing
         document           = g_document
        header_data        = g_header.
    *-- End of Program

    Hi,
    Will this help you.?
    http://scn.sap.com/community/netweaver-administrator/blog/2010/02/25/how-to-email-output-from-background-jobs
    Regards
    Purnand

  • Problem in scheduling job in back ground

    hi all,
    My project scenario is ,i have written a program to create WBS element.
    For 1 WBS creation ,In production it takes 20 to 30 min to create as there are many transactional bdcs.
    so i want to run that perticular code (all bdcs) in back ground.
    so i wrote another program with name 'zback_job_for_wbs_creation' and added all the required code.
    in old program,i have written some code to execute this new program in back ground . this code is below..
    FORM submit_for_job.
      TABLES:btcevtjob.
      DATA:l_jobname LIKE tbtco-jobname,
           l_jobnumber LIKE rsjobinfo-jobnumb.
      DATA: count LIKE btcevtjob-jobcount,
            jobname LIKE btcevtjob-jobname.
      DATA: job_was_released LIKE btch0000-char1.
      jobname = 'WBS_CREATION'.
      EXPORT s_scrnum TO MEMORY ID 'W_SCRNUM'.
      EXPORT iscrh TO MEMORY ID 'W_ISCRH'.
      EXPORT iscrl1 TO MEMORY ID 'W_ISCRL1'.
      EXPORT iscrl2 TO MEMORY ID 'W_ISCRL2'.
      EXPORT iscrl2b TO MEMORY ID 'W_ISCRL2B'.
      EXPORT iscrl2a  TO MEMORY ID 'W_ISCRL2A'.
      EXPORT iscrl1a  TO MEMORY ID 'W_ISCRL1A'.
      CALL FUNCTION 'JOB_OPEN'
            EXPORTING
                  jobname          = jobname
           IMPORTING
                  jobcount         = count
      SUBMIT zback_job_for_wbs_creation
      with S_SCRNNUM IN S_SCRNUM
      and return via JOB JOBNAME NUMBER COUNT TO SAP-SPOOL
      WITHOUT SPOOL  DYNPRO.
      CALL FUNCTION 'JOB_CLOSE'
          EXPORTING
         jobcount                    = count
         jobname                     = jobname
          strtimmed                   = 'X'
        IMPORTING
             job_was_released            = job_was_released
       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
    here i have put break-point in my submitted program..but its not going to the program and job gets closed successfully without executing my code( Submitted Program).
    in above submit statement , if i just write submit progname and return ,then it goes to program.
    but job_close function module throws exception no 5.
    so pls help me out for this..
    i want my submitted program to be run in back ground..
    thanks.

    Hi,
    Start Job Monitor SM37 and search for your job. I think you will find it.
    Jobs are not linked to GUI frontend. So you can't debug your background job in that way.
    If you want to debug you must be tricky.
    Code a never ending loop with an exit condition which you can control by debugging.
    DATA:
    stop_for_capture.
    DO.
    IF sy-uname NE 'HABICH'. "change to your account
    EXIT.
    ENDIF.
    IF NOT stop_for_capture IS INITIAL.
    EXIT.
    ENDIF.
    ENDDO.
    When your job is running, start TA SM50 and mark relevant batch work process and
    choose by menu program -> program -> debugging.
    regards
    Walter Habich

Maybe you are looking for