Background scheduling in BAPI

REPORT  ZIND_BACKGROUND_JOB MESSAGE-ID zsd
                                    NO STANDARD PAGE HEADING
                                    LINE-SIZE 160.
Tables
TABLES: mara,mvke.
Data Definitions.
TYPES: BEGIN OF ty_mat,
         matnr     TYPE mara-matnr,
         vkorg     TYPE mvke-vkorg,                " Sales Org
         vtweg     TYPE mvke-vtweg,                " Dist. Channel
         prdha     TYPE mara-prdha,                " Prod Hierarchy
         err(60)   TYPE C,
       END OF ty_mat.
DATA: gt_matnr     TYPE STANDARD TABLE  OF ty_mat WITH HEADER LINE,
      gt_matnr_err TYPE STANDARD TABLE  OF ty_mat WITH HEADER LINE.
DATA: gs_matnr_err TYPE ty_mat.
DATA: lv_file_name    TYPE string,
      lv_message(200) TYPE c.
DATA : JN(8) TYPE C,
       val(1) .
DATA: PRIPAR TYPE PRI_PARAMS,
      ARCPAR TYPE ARC_PARAMS.
For BAPI
DATA: headdata             TYPE bapimathead,
      clientdata           TYPE bapi_mara,
      clientdatax          TYPE bapi_marax,
      return               TYPE bapiret2,
      salesdata            TYPE bapi_mvke,
      salesdatax           TYPE bapi_mvkex.
DATA: ret  TYPE STANDARD TABLE OF bapi_matreturn2 WITH HEADER LINE.
Selection Screen
SELECTION-SCREEN BEGIN OF BLOCK b001 WITH FRAME TITLE text-001.
SELECT-OPTIONS: s_matnr FOR mara-matnr,
                s_vkorg FOR mvke-vkorg OBLIGATORY,
                s_vtweg FOR mvke-vtweg OBLIGATORY,
                s_matkl FOR mara-matkl.
SELECTION-SCREEN END OF BLOCK b001.
SELECTION-SCREEN BEGIN OF BLOCK b002 WITH FRAME TITLE text-002.
    PARAMETERS: p_err       TYPE localfile OBLIGATORY.
SELECTION-SCREEN: END OF BLOCK b002.
SELECTION-SCREEN BEGIN OF BLOCK b003 WITH FRAME TITLE text-003.
PARAMETERS: P_FORE RADIOBUTTON GROUP rad,
            P_BACK RADIOBUTTON GROUP rad.
SELECTION-SCREEN: END OF BLOCK b003.
PARAMETERS : P_JOB LIKE TBTCJOB-JOBNAME.
At selection screen
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_err.
  PERFORM get_filename USING 'Output - Error File'
                       CHANGING p_err.
AT SELECTION-SCREEN ON BLOCK B003.
IF P_BACK = 'X' AND  P_JOB NE SPACE.
  PERFORM PRINTER_GET.
  PERFORM JOB_OPEN.
  PERFORM JOB_SUMBIT.
  PERFORM JOB_CLOSE.
  STOP.
ELSEIF P_JOB = SPACE AND P_BACK = 'X' .
  MESSAGE 'Enter The Job Name' type 'I'.
ENDIF.
START-OF-SELECTION.
START-OF-SELECTION.
  PERFORM 100_collect_dbrecs.
  PERFORM 200_process_dbrecs.
END-OF-SELECTION.
*&     TOP-OF-PAGE.
TOP-OF-PAGE.
  WRITE: 40 'Material Product Hierarchy Update Report'.
  ULINE (115).
*SKIP.
  WRITE: /'MATERIAL'.
  WRITE: /.
  ULINE (115).
*&      Form  100_collect_dbrecs
FORM 100_collect_dbrecs .
  SELECT   maramatnr mvkevkorg mvkevtweg maraprdha
     INTO  CORRESPONDING FIELDS OF TABLE gt_matnr
     FROM  mara INNER JOIN mvke
     ON    maramatnr = mvkematnr
     WHERE mara~matnr IN s_matnr
       AND mara~prdha NE space
       AND mara~matkl IN s_matkl
       AND mara~lvorm EQ space
       AND mvke~vkorg IN s_vkorg
       AND mvke~vtweg IN s_vtweg
       AND mvke~prodh EQ space.
ENDFORM.                    " 100_collect_dbrecs
*&      Form  200_process_dbrecs
FORM 200_process_dbrecs.
  IF gt_matnr[] IS INITIAL.
    MESSAGE s000 WITH 'No Materials Processed.'.
  ELSE.
    LOOP AT gt_matnr.
      CLEAR:  headdata,
              clientdata,
              clientdatax,
              return,
              salesdata  ,
              salesdatax,
              ret.
      REFRESH: ret.
Filling Material.
      MOVE: gt_matnr-matnr   TO headdata-material,
            'X'              TO headdata-sales_view.
Sales Org
      MOVE: gt_matnr-vkorg TO salesdata-sales_org,
            gt_matnr-vkorg TO salesdatax-sales_org.
*Dist Channel
      MOVE: gt_matnr-vtweg TO salesdata-distr_chan,
            gt_matnr-vtweg TO salesdatax-distr_chan.
*Prod Hierarchy
      MOVE: gt_matnr-prdha TO salesdata-prod_hier,
            'X'            TO salesdatax-prod_hier.
      PERFORM  220_bapi_call.
      CLEAR: gt_matnr.
    ENDLOOP.
Download Error Files
    IF gt_matnr_err[] IS INITIAL.
no errors to be downloaded
    ELSE.
Error File being downloaded.
  lv_file_name = p_err.
  CALL FUNCTION 'GUI_DOWNLOAD'
    EXPORTING
      filename                = lv_file_name
      filetype                = 'ASC'
    TABLES
      data_tab                = gt_matnr_err
    EXCEPTIONS
      file_write_error        = 1
      no_batch                = 2
      gui_refuse_filetransfer = 3
      invalid_type            = 4
      no_authority            = 5
      unknown_error           = 6
      header_not_allowed      = 7
      separator_not_allowed   = 8
      filesize_not_allowed    = 9
      header_too_long         = 10
      dp_error_create         = 11
      dp_error_send           = 12
      dp_error_write          = 13
      unknown_dp_error        = 14
      access_denied           = 15
      dp_out_of_memory        = 16
      disk_full               = 17
      dp_timeout              = 18
      file_not_found          = 19
      dataprovider_exception  = 20
      control_flush_error     = 21
      OTHERS                  = 99.
  IF sy-subrc = 0.
    WRITE: /05 'Error File Download - Successful.'.
  ELSE.
    MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
            WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4
            INTO lv_message.
    FORMAT INTENSIFIED ON.
    WRITE: /05 'Write error:', lv_message COLOR COL_NEGATIVE.
  ENDIF.
    ENDIF.
  ENDIF.
ENDFORM.                    " 200_process_dbrecs
*&      Form  220_BAPI_CALL
FORM 220_bapi_call .
  DATA: lv_message(60) TYPE c.
  CALL FUNCTION 'BAPI_MATERIAL_SAVEDATA'
    EXPORTING
      headdata       = headdata
      clientdata     = clientdata
      clientdatax    = clientdatax
      salesdata      = salesdata
      salesdatax     = salesdatax
    IMPORTING
      return         = return
    TABLES
      returnmessages = ret.
  IF sy-subrc EQ 0.
    MOVE : return-message TO lv_message.
    IF return-type EQ 'E'.
      WRITE: /  gt_matnr-matnr,
               'Change Failed -', lv_message.
      MOVE-CORRESPONDING gt_matnr TO gs_matnr_err.
      APPEND gs_matnr_err to gt_matnr_err. CLEAR gs_matnr_err.
    ELSE.
      WRITE: / gt_matnr-matnr,
               'Change Successful -', lv_message, ' for ', gt_matnr-vkorg,' ', gt_matnr-vtweg.
      CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
        EXPORTING
          wait = 'X'.
      COMMIT WORK.
    ENDIF.
  ENDIF.
ENDFORM.                    " 220_BAPI_CALL
*&      Form  get_filename
      Call up a dialog window to retrieve the filename
     --> P_FILETITLE    Dialog file title
     <-- P_FILENAME     FIle name retrieved
FORM get_filename  USING    p_filetitle         TYPE c
                   CHANGING p_filename          TYPE localfile.
  CALL FUNCTION 'WS_FILENAME_GET'
    EXPORTING
      def_filename     = ' '
      def_path         = ' '
      mask             = ',.,..'
      mode             = 'O'
      title            = p_filetitle
    IMPORTING
      filename         = p_filename
    EXCEPTIONS
      inv_winsys       = 1
      no_batch         = 2
      selection_cancel = 3
      selection_error  = 4
      OTHERS           = 5.
ENDFORM.                    " get_filename
*&      Form  JOB_OPEN
   BACK GROUND JOB ASSIGNING JOB NAME AND IMPORTING JOB NUMBER
form JOB_OPEN .
  CALL FUNCTION 'JOB_OPEN'
    EXPORTING
    DELANFREP              = ' '
    JOBGROUP               = ' '
      jobname                = P_JOB
    SDLSTRTDT              = NO_DATE
    SDLSTRTTM              = NO_TIME
    JOBCLASS               =
   IMPORTING
     JOBCOUNT               = JN
  CHANGING
    RET                    =
   EXCEPTIONS
     CANT_CREATE_JOB        = 1
     INVALID_JOB_DATA       = 2
     JOBNAME_MISSING        = 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
            INTO lv_message.
   FORMAT INTENSIFIED ON.
    WRITE: /05 'Write error:', lv_message COLOR COL_NEGATIVE.
  ENDIF.
endform.                    " JOB_OPEN
*&      Form  JOB_SUMBIT
     SUBMITTING THE JOB
form JOB_SUMBIT .
CALL FUNCTION 'JOB_SUBMIT'
  EXPORTING
  ARCPARAMS                         =
    authcknam                         = SY-UNAME
  COMMANDNAME                       = ' '
  OPERATINGSYSTEM                   = ' '
  EXTPGM_NAME                       = ' '
  EXTPGM_PARAM                      = ' '
  EXTPGM_SET_TRACE_ON               = ' '
  EXTPGM_STDERR_IN_JOBLOG           = 'X'
  EXTPGM_STDOUT_IN_JOBLOG           = 'X'
  EXTPGM_SYSTEM                     = ' '
  EXTPGM_RFCDEST                    = ' '
  EXTPGM_WAIT_FOR_TERMINATION       = 'X'
    jobcount                          = JN
    jobname                           = P_JOB
  LANGUAGE                          = SY-LANGU
  PRIPARAMS                         = pripar
   REPORT                            = SY-REPID
  VARIANT                           = ' '
IMPORTING
  STEP_NUMBER                       =
EXCEPTIONS
   BAD_PRIPARAMS                     = 1
   BAD_XPGFLAGS                      = 2
   INVALID_JOBDATA                   = 3
   JOBNAME_MISSING                   = 4
   JOB_NOTEX                         = 5
   JOB_SUBMIT_FAILED                 = 6
   LOCK_FAILED                       = 7
   PROGRAM_MISSING                   = 8
   PROG_ABAP_AND_EXTPG_SET           = 9
   OTHERS                            = 10
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4
         INTO lv_message.
   FORMAT INTENSIFIED ON.
    WRITE: /05 'Write error:', lv_message COLOR COL_NEGATIVE.
ENDIF.
submit ZIND_BACKGROUND_JOB
      via job     p_JOB
          number  JN
      to sap-spool without spool dynpro
          spool parameters PRIPAR
             and return.
*SUBMIT ZIND_BACKGROUND_JOB AND RETURN
*USER SY-UNAME " User for runtime authorizations
*VIA JOB p_JOB NUMBER JN
*" Job name and job number
*" from JOB_OPEN
*TO SAP-SPOOL " Print and archiving options from
*" GET_PRINT_PARAMETERS
*" Both sets of options come from
*" GET_PRINT_PARAMETERS
*SPOOL PARAMETERS PRIPAR
*ARCHIVE PARAMETERS ARCPAR
*WITHOUT SPOOL DYNPRO.
**End of Content Area
endform.                    " JOB_SUMBIT
*&      Form  JOB_CLOSE
      text
form JOB_CLOSE .
CALL FUNCTION 'JOB_CLOSE'
  EXPORTING
  AT_OPMODE                         = ' '
  AT_OPMODE_PERIODIC                = ' '
  CALENDAR_ID                       = ' '
  EVENT_ID                          = ' '
  EVENT_PARAM                       = ' '
  EVENT_PERIODIC                    = ' '
    jobcount                          = JN
    jobname                           = P_JOB
  LASTSTRTDT                        = NO_DATE
  LASTSTRTTM                        = NO_TIME
  PRDDAYS                           = 0
  PRDHOURS                          = 0
  PRDMINS                           = 0
  PRDMONTHS                         = 0
  PRDWEEKS                          = 0
  PREDJOB_CHECKSTAT                 = ' '
  PRED_JOBCOUNT                     = ' '
  PRED_JOBNAME                      = ' '
  SDLSTRTDT                         = NO_DATE
  SDLSTRTTM                         = NO_TIME
  STARTDATE_RESTRICTION             = BTC_PROCESS_ALWAYS
   STRTIMMED                         = 'X'
  TARGETSYSTEM                      = ' '
  START_ON_WORKDAY_NOT_BEFORE       = SY-DATUM
  START_ON_WORKDAY_NR               = 0
  WORKDAY_COUNT_DIRECTION           = 0
  RECIPIENT_OBJ                     =
  TARGETSERVER                      = ' '
  DONT_RELEASE                      = ' '
  TARGETGROUP                       = ' '
  DIRECT_START                      =
IMPORTING
  JOB_WAS_RELEASED                  =
CHANGING
  RET                               =
EXCEPTIONS
   CANT_START_IMMEDIATE              = 1
   INVALID_STARTDATE                 = 2
   JOBNAME_MISSING                   = 3
   JOB_CLOSE_FAILED                  = 4
   JOB_NOSTEPS                       = 5
   JOB_NOTEX                         = 6
   LOCK_FAILED                       = 7
   INVALID_TARGET                    = 8
   OTHERS                            = 9
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4
                  INTO lv_message.
   FORMAT INTENSIFIED ON.
    WRITE: /05 'Write error:', lv_message COLOR COL_NEGATIVE.
ENDIF.
endform.                    " JOB_CLOSE
*&      Form  PRINTER_GET
      text
form PRINTER_GET .
CALL FUNCTION 'GET_PRINT_PARAMETERS'
EXPORTING
   DESTINATION                    = 'LOCL'
   IMMEDIATELY                    = ''
   NO_DIALOG                      = 'X'
IMPORTING
   out_archive_parameters         = arcpar
   OUT_PARAMETERS                 = PRIPAR
   valid                          = val
EXCEPTIONS
   ARCHIVE_INFO_NOT_FOUND         = 1
   INVALID_PRINT_PARAMS           = 2
   INVALID_ARCHIVE_PARAMS         = 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.
endform.                    " PRINTER_GET
<b>Actually this prog schedules a job and i can see it in SM37, but when i try to release it error i get is step is not defined properly....
What can be the possible causes of the errors.
here in my prog i have two parameters which is obligatory (VTWEG and VKORG).
Iam not submitting this parameter in the background jb, how to do this???
is it necessary for it to be scheduled in background.
Pls help me ASAP.</b>
Title was edited by:
        Alvaro Tejada Galindo

Hi Naveen,
You are trying to submit the same program in background. You need to create 2 programs for that..
Create a program : ZBCKGD & inside it use FM JOB_SUBMIT & Pass program name as ZIND_BACKGROUND_JOB.
Export the selection criteria from ZBCKGD to ZIND_BACKGROUND_JOB.
Refer:/people/prashant.patil12/blog/2007/02/20/displaying-alv-grid-in-background-job
form JOB_SUMBIT .
CALL FUNCTION 'JOB_SUBMIT'
EXPORTING
ARCPARAMS =
authcknam = SY-UNAME
COMMANDNAME = ' '
OPERATINGSYSTEM = ' '
EXTPGM_NAME = ' '
EXTPGM_PARAM = ' '
EXTPGM_SET_TRACE_ON = ' '
EXTPGM_STDERR_IN_JOBLOG = 'X'
EXTPGM_STDOUT_IN_JOBLOG = 'X'
EXTPGM_SYSTEM = ' '
EXTPGM_RFCDEST = ' '
EXTPGM_WAIT_FOR_TERMINATION = 'X'
jobcount = JN
jobname = P_JOB
LANGUAGE = SY-LANGU
PRIPARAMS = pripar
<b>REPORT = 'ZIND_BACKGROUND_JOB'</b>
VARIANT = ' '
IMPORTING
STEP_NUMBER =
EXCEPTIONS
BAD_PRIPARAMS = 1
BAD_XPGFLAGS = 2
INVALID_JOBDATA = 3
JOBNAME_MISSING = 4
JOB_NOTEX = 5
JOB_SUBMIT_FAILED = 6
LOCK_FAILED = 7
PROGRAM_MISSING = 8
PROG_ABAP_AND_EXTPG_SET = 9
OTHERS = 10
IF

Similar Messages

  • Gui_download Function module is not working in Background Scheduling

    Hi Experts,
    Function modules like GUI_DOWNLOAD are not working in background scheduled jobs, It is raising an exception. Though it is working fine in foreground execution.
    Please provide me solution for this challenging task.
    you could be rated well for this question.
    Thanks,
    Rama Krishna.

    Hello,
    work with open dataset and close dataset...
    just loop over itab and transfer itab field for field into a string field separated by ;
    Here is an extract of coding:
    OPEN DATASET p_dath FOR OUTPUT IN TEXT MODE ENCODING DEFAULT.
      LOOP AT itab_pos.
        CLEAR satz.
        MOVE itab_pos-vbeln TO satz-vbeln.
        MOVE ';' TO satz-fill1.
        MOVE itab_pos-kunnr TO satz-kunnr.
        MOVE ';' TO satz-fill2.
        MOVE itab_pos-ktgrd TO satz-ktgrd.
        MOVE ';' TO satz-fill3.
        MOVE itab_pos-fkdat TO satz-fkdat.
        MOVE ';' TO satz-fill4.
        MOVE itab_pos-budat TO satz-budat.
        MOVE ';' TO satz-fill5.
        MOVE itab_pos-cpudt TO satz-cpudt.
        MOVE ';' TO satz-fill6.
        MOVE itab_pos-fkimg TO satz-fkimg.
        MOVE ';' TO satz-fill7.
        MOVE itab_pos-netwr TO satz-netwr.
        MOVE ';' TO satz-fill8.
        MOVE itab_pos-vrkme TO satz-vrkme.
        MOVE ';' TO satz-fill9.
        MOVE itab_pos-ktgrm TO satz-ktgrm.
        MOVE ';' TO satz-fill10.
        MOVE itab_pos-matnr TO satz-matnr.
        MOVE ';' TO satz-fill11.
        MOVE itab_pos-mattxt TO satz-mattxt.
        MOVE ';' TO satz-fill12.
        MOVE itab_pos-gewei TO satz-gewei.
        MOVE ';' TO satz-fill13.
        MOVE itab_pos-brgew TO satz-brgew.
        TRANSFER satz TO p_dath.
      ENDLOOP.
      CLOSE DATASET p_dath.
    It is not so comfortable as it is with GUI_DOWNLOAD but it works in background!

  • Email background schedule report to gmail or yahoo mail

    Dear Expert,
    My self Nayan Lad having 1 year exp in SAP ABAP.
    Now my request is How can I send mail the background schedule report to some person's personal mail id through SAP.
    Please guide me so I can explore my knowledge.
    Thanks & regards,
    Nayan Lad
    Moderator Message: Please search for available information.
    Edited by: kishan P on Nov 11, 2010 11:03 AM

    hai ,
    please go through this example bcs_example8.
    thankyou,
    anji.

  • MB5T background schedule ouput in alv format

    Hi all,
    Please help me to get MB5T report ouput of background schedule in ALV.
    I have put that report in bacground scheduling & the output of the same in BEST format but my client want the output in AlV format.
    Please suggest.
    Regards,
    Anant

    Output of MB5T can't be in ALV format in background. In foreground also this is done in two steps., In first system display in BEST format..this can be changed to ALV manually in second step.

  • MC75 - background schedule option not available

    Hi
    i got a requirement to schedule the tcode MC75 in background mode.  But SAP has not given the option in the menu bar -> execute in background option like the tcode MD74. 
    Even the save button is disabled in the tcode MC75 hence not possible to save like a variant.
    I found a SAP notes relevant to that. The note no is 381061. But i am not able to implement the note in my system. I tried to customize the program by copying to zprogram using the code correction given In sap notes 381061. But could not find relevant to background scheduling.
    Can any one tell me how to customize the tcode for background scheduling.
    Regards
    Rajani Yeluri

    Hi Rajani,
    Could you please let me know how did you solve this issue? I am also looking for the same.
    I appreciate your response.
    Thank you.
    Murali

  • Background Schedule - Hardcore Input data

    Hi Experts
             I am developing a BDC, now i want to schedule the program into background.
            So i want to hardcore the input data like
             Select Method (Genrate session/Call transaction)
             Processing Mode
             Update Mode
             Nodata Indicator.
    These data i need to hardcore in the program itself for further processing of background schedule.
              How to do it, pls advise me on this.
    Thanks in advance.
    Regards
    Rajaram

    Hi Rajaram,
    As of my understanding do you want to put the following on your selection screen?
    Select Method (Genrate session/Call transaction)
    Processing Mode
    Update Mode
    Nodata Indicator
    then do so.
    There is a structure for call transaction parameters, which you can use for setting of selection screen and can set the default values as wellin initialization event.
    Structure name : CTU_PARAMS
    Reward pointsif useful.
    Thanks & Regards
    Rajini Rajuladevi
    Edited by: Rajini R M on Jun 4, 2008 8:44 AM

  • Background schedule process

    Hi
    I am new to Oracle 9iAS. Can someone tell me if there is any
    better way to implement a background scheduled process ?
    Currently, I am doing it via AT command. Just wondering if
    Oracle9iAS has any scheduler that I can make use of.
    Thanks
    CT

    You can set up the different step while schedule the back ground job. Each step will have the program name, variant.
    You can do his using transaction SM36 -> JOB WIZARD.
    Thanks,
    Srinivas

  • Background Scheduling - Deadline Monitoring

    Hi Experts,
    I have created new maintenance plan , its around 250 for Mechanical and 250 for Electrical
    Maintenance plan having strategy like every two month , every three month , every six month etc..
    Scheduling period is 3 year
    Now scheduling will be done through IP10 one time , but after first call object scheduling will get hold.
    I want to make it background scheduling - Deadline Monitoring
    Now the requirement is , For Example :
    Maintenance plan X have PM plan date is 21.07.2014
    Maintenance plan Y have PM plan date is 24.07.2014
    Maintenance plan Z have PM plan date is 29.07.2014
    As per above example each equipment will have different plan date , background scheduling can be done through IP30 but by the date is concern how can make it possible ?
    Please advise each maintenance plan has to be run as per their plan date.
    Thanks,
    Abhishek

    Hi Mr.Jogeshwara,
    Nice Document , Its really useful
    But my query is each equipment have different plan date , as explained in above example
    If Maintenance plan have Cycle Unit 60 day and Plan X date is on 21.07.2014 then 21.07.2014+60day , same as if maintenance plan Y date is 25.07.2014 then 25.07.2014 +60day
    Like that
    background scheduling needs to be done as per cycle unit
    If i will do background scheduling together of both the above maintenance plan X and Y then scheduling will be run exactly after 60 day and order will be generated in advance for Maintenance plan Y.
    Hope you understand my query.
    Thanks,
    Abhishek

  • Background Scheduling Z Report

    Hi,
    I have developed one report , it can output its result in alv report and excel file, So my requirement is to schedule the report and in background only email the report to the specified email id's. How can I achieve functionality of background scheduling and automatic email.
    I know we can do background scheduling with SA38 or SM36/SM37 but upon scheduling it is not saving my excel file at desired location.
    Ankesh

    You should search forums about this....
    You will need to save to the SAP Application server (in a folder which has write permission for SAP jobs) and possibly FTP to some shared drive within the network.  Local PC, local MS network, like C:\, D:\, etc. is not visible to a background job, since there is NO GUI/PRESENTATION server involved in a background job.  Outside of MS Office, an .XLS file is an unknown file type, probably....  how do you think you're creating a .XLS file in a background SAP job?

  • Background Scheduling is not triggered

    Hai all,
    We are doing ecc6.0 upgrade from 4.6c. While creating a production order the order number should be automatically updated in a z-table(using user wf_batch).
    For this they are using a Function module which is scheduled for every 5 min. The FM is stored in a business object.
    But whenever we create a production order, the background scheduling was not triggered.
    We are not able to find the program for this scheduling.It shows no jobs were found.
    How to schedule the Function module or the business object? or is there any other way to execute the business object or find the job in SM37?
    Regards,
    Kumar C

    Hi,
    We are implementing OWS. We have successfully installed and deployed OWS but yet to open the OWS applicaation. we are defining the entire CCD parameters. Apprreciate help on the same, whether you have have any setup document. A business flow or the process flow on OWS.
    Sincerely appreciat your help. My id: [email protected]
    Regards,
    Abhijit

  • Background Scheduling of Intercompany Invoices.....

    Hi,
    I want to know how we can do the background scheduling of all the Intercompany Invoices which gets due. This should be processed at the end of the day or as and when it becomes due. I want this background scheduling on one to one basis i;e for each Invoice which is intercompany, Intercompany Invoice should be generated (NO Collective Intercompany billing).
    Please let me know how this can be achieved.....
    Thanx in advance.....

    This should be processed at the end of the day
    Explore the possibility of scheduling the job VF06
    thanks
    G. Lakshmipathi

  • Background Scheduling Problem

    Hi everyone,
    I am getting problem in the BEx reporting.After loading the new data in the respective data targets, it is not reflecting in the BEx Analyzer. I have created the process chain, and loading is done in the background scheduling. I can see the updated request time and date in Monitor. It is showing that data is updated successfuly in the data targets.
    But when I execute the report after 2hrs, It will reflect in the query and it will show the latest updated records.
    If anybody knows the reason why it takes time to reflect in query, please give me some outputs.
    Thanks,
    Pandey

    Hi Manoranjan,
    If your data target is ODS, you can find the updated records for reporting only after activation. If it is InfoCube there could be some processs defined after dataload like create index,Stats and rollup if aggregate are present. may be this could be the reason...
    Hope this helps..
    Best Regards,
    DMK
    *Assign points if it serves your purpose...

  • Background Scheduling tutorial

    Hi All ,
    I want step by step tutorial/links/docs for  background Scheduling .
    Thanks in advace

    Hi,
    ABAP Editor transaction SE38 can be used to execute program in the background. In SE38 selection screen click on Program -> Execute -> Background and specify the name of the variant. You can schedule the program to run once at a certain time or periodically every month, week, days, hours or minutes.
    Moreover Transaction SM36 can be used to Schedule Background Job without selections parameters.
    Click on the steps, A popup window will open, Click on ABAP/4 button. The fields ABAP/4 Program name, Variant and Language will become input enable. Type the program name and save it by pressing on save Icon. Now Click on start condition, a popu up will appear asking about start date or Immediate etc.. pls provide applicable details and press on save Icon. and now finally press on Save Icon
    Steps
    SM36
    Put in Job Name
    Click on Steps
    Put in the ABAP program name
    The variant for your program if you have a selection screen and want certain values on there
    Save
    Click on Start Condition
    Put in e.g. Start Date and Start Time and Click on Period Values
    Save
    Don't forget to Save on the Initial Screen as well (Define Background Job)
    this will create you background job
    Go through the following link
    http://help.sap.com/saphelp_nw2004s/helpdata/en/c4/3a7f87505211d189550000e829fbbd/content.htm
    Reward me if it is helpful.

  • Background scheduling of FTP Connection through R/3

    Hello Friends,
      I have done FTP connection by using Z-pgm which uses function FTP_CONNECT. This is working fine in Foreground mode. 
    But in background scheduling of the z-pgm, i am getting the <b>error as 'RFC to program SAPFTP failed'.</b>
    I checked RFC destination SAPFTP in SM59. There Activation type is 'Start on Front End Work Station'. I tested the connection also. Its alright.
    How to do FTP processing in Background?
    Cheers,
    Seema

    Hello,
    you could try to use RFC destination 'SAPFTPA' - it's ftp on the application server. Since SAPFTP is  'Start on Front End Work Station' and in background there is no front end work station, it can't work.
    Regards Wolfgang

  • Background Scheduling in R3

    Hi All,
    Can we create Process chains in R/3.If means how?
    Can we call process chains in R/3 means Background scheduling?
    Please give information regarding this?
    Thanks,
    Mahesh

    Hi,
    We cannot create Process Chains in R/3 system. Do you have any requirement like this?
    In fact, you can try RSPC in R/3, then it will show the screen just like in BW. All process types are same.
    Any job can be scheduled in background in any system.
    Regards,
    Suman

Maybe you are looking for

  • Sending WSSE security headers to non-weblogic web service

    I have been trying to send wsse headers to a non-weblogic web service. I am looking for a way to do this using the control file I generated from the wsdl or the page flow where I implement the control, or the message handler file. I have username and

  • Creating RFC destination in Visual Administrator results in error

    Hi. I am trying to set up ESS and MSS on a EP 6.0 with SP15. According to a Post-installation guide for SLD i have to create a RFC destination, but when i save the settings i get the following error: Error changing bundel's properties, see LOG for de

  • Function to find Average salary

    Hello everyone, First of all I would like to say that I am a newbie to PL/SQL so please be patient with me. I am trying to create a function that will calculate the average salary for employees and compare the average salary to each employee's salary

  • OBIEE Licensing

    OBIEE - we have done nothing more than install OBIEE 11.1.1.7  OBIEE 11g. I am new to OBIEE. How could I prove that we have not connected this OBIEE installation to any other databases. in this case we will be working with an Oracle EBS R12.2.4 Insta

  • Getting Error When I click on Data -- Load XML Data (XMLP Desktop 5.6.2)

    Hi All, I'm getting an error "Compile error in hidden module: Module_registry" when i click on Data -->Load XML Data on MSword. I have installed XMLP Desktop 5.6.2 successfuly. Can anybody help me..? Regards, Aanta