JOB_CLOSE and Background Job Process a FM

HI Guys,
I have my code like this:
data: jobname like tbtcjob-jobname value
                             'TESTJOB'.
data: jobcount like tbtcjob-jobcount,
      host like msxxlist-host.
data: begin of starttime.
        include structure tbtcstrt.
data: end of starttime.
data: starttimeimmediate like btch0000-char1.
Job open
  call function 'JOB_OPEN'
       exporting
            delanfrep        = ' '
            jobgroup         = ' '
            jobname          = jobname
            sdlstrtdt        = sy-datum
            sdlstrttm        = sy-uzeit
       importing
            jobcount         = jobcount
       exceptions
            cant_create_job  = 01
            invalid_job_data = 02
            jobname_missing  = 03.
  if sy-subrc ne 0.
                                       "error processing
  endif.
data: lv_weekday type WEEK_DAY.
CALL FUNCTION 'DATE_TO_DAY'
  EXPORTING
    DATE          = sy-datum
IMPORTING
   WEEKDAY       = lv_weekday.
Close job
  starttime-sdlstrtdt = sy-datum.
  starttime-sdlstrttm = SY-UZEIT.
  call function 'JOB_CLOSE'
       exporting
            event_id             = starttime-eventid
            event_param          = starttime-eventparm
            event_periodic       = starttime-periodic
            jobcount             = jobcount
            jobname              = jobname
            laststrtdt           = starttime-laststrtdt
            laststrttm           = starttime-laststrttm
            prddays              = 1
            prdhours             = 0
            prdmins              = 0
            prdmonths            = 0
            prdweeks             = 0
            sdlstrtdt            = starttime-sdlstrtdt
            sdlstrttm            = starttime-sdlstrttm
            strtimmed = 'X'                  "starttimeimmediate
           targetsystem         = host
       exceptions
            cant_start_immediate = 01
            invalid_startdate    = 02
            jobname_missing      = 03
            job_close_failed     = 04
            job_nosteps          = 05
            job_notex            = 06
            lock_failed          = 07
            others               = 99.
  if sy-subrc eq 0.
                                       "error processing
  endif.
This is the Program I want the Batch Job to Execute a BAPI Function Module in the Place of DATE_TO_DAY function module. Is it Possible ??????
And also I get an error at the JOB_CLOSE Function Module with SY-SUBRC = 5.
Can anyone know why this is happening and what should be done to overcome this.
Thanks & Regards,
YJR.

Hi Ravi,
The below code which has an EXPORT and IMPORT commands
The IMPORT does'nt work in Background.
Do I need to do anything else.
REPORT  ZTEST_LM22.
DATA: LV_NAME(10) TYPE C.
LV_NAME = 'HELLO'.
export lv_name to memory id 'ZNAM'.
submit ztest_lm22_a.
REPORT  ZTEST_LM22_A.
DATA: GV_JOBNAME  TYPE BTCJOB VALUE 'TEST_UNPACK',
      GV_JOBCOUNT TYPE BTCJOBCNT.
data: lv_date type SYDATUM,
      lv_time type SYUZEIT.
lv_date = SY-datum.
lv_time = sy-uzeit.
CALL FUNCTION 'JOB_OPEN'
  EXPORTING
    JOBNAME          = GV_JOBNAME
    SDLSTRTDT        = lv_date
    SDLSTRTTM        = lv_time
  IMPORTING
    JOBCOUNT         = GV_JOBCOUNT
  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.
ENDIF.
SUBMIT ztest_lm22_b AND RETURN
                               VIA JOB GV_JOBNAME
                               NUMBER GV_JOBCOUNT.
CALL FUNCTION 'JOB_CLOSE'
  EXPORTING
    JOBCOUNT             = GV_JOBCOUNT
    JOBNAME              = GV_JOBNAME
    STRTIMMED            = 'X'
  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.
ENDIF.
REPORT  ZTEST_LM22_B.
DATA: LV_NAME(10) TYPE C,
      GV_NAME(10) TYPE C.
IMPORT LV_NAME = GV_NAME FROM MEMORY ID 'ZNAM'.
WRITE: GV_NAME.
If you see in SM37 the Spool does'nt have this value.
Could you just run a quick test and see what else should be done...
Thanks & Regards,
YJR.

Similar Messages

  • Difference between batch job and Background Job

    Hi Forum,
    Can anyone distinguish between batch job and background job for me please ?
    SK

    Hi,
    Batch Job:
    A batch job is a process that runs in the background, often deferred and unattended, to process data in groups (batch) rather than by individual transactions (e.g. a monthly phone bill rather than a bill for each individual phone call). A batch job executes a sequence of programs and technical instructions that are stored in a command file. Progress and error messages are output to a log file allowing users to determine, at any time, if the batch job completed successfully or identify the cause of the problem. Because batch jobs run in the background they are less visible to the end user.
    In a business-computing context, batch job scheduling implies the automatic execution of background tasks (batch jobs) at pre-determined points in time (e.g. every day at 8pm, midday on Wednesday).
    3 types of batch job scheduling can be distinguished: native, basic and advanced batch job scheduling.
    Most operating systems and some business solutions software come equipped with native batch job scheduling tools that provide a limited service (e.g. Windows Scheduled Tasks, UNIX crontab, SAP CCMS) locally to each installation. However, business processes may span multiple platforms, applications, countries and companies. Their complexity may require much more functional power as provided by basic batch job scheduling including national and regional variations in the working calendar, sequence variations according to the day of the month, triggering of jobs by the successful completion of preceding jobs, elimination of gaps and reduced batch windows. Major benefits of basic batch job scheduling are enhanced productivity, operations reliability and cost-reduction. For e-business applications that require real-time processing, the distance between interactive individual processing and batch processing tends to decrease. Advanced batch job scheduling can handle these advanced requirements: event-driven scheduling for a real-time synchronization with interactive processing, just-in-time scheduling to run operations as soon as possible, cross-platform and cross application services for the entire IT landscape, real-time overall monitoring to track background operations for all applications on all servers.
    The standard benefits of batch job scheduling are drastically amplified when job schedulers can handle the end-to-end automation and monitoring requirements for all background operations.
    To schedule a back ground job follow the below steps:
    1. Use Transaction SM36.
    2. Assign a job name.
    3. Set the job’s priority, or “Job Class”:
    High --- Class A
    Medium --- Class B
    Low ---Class C
    4. Here you can specify,when the job is to start by choosing Start Condition. If you want the job to repeat, or be periodic, check the box at the bottom.
    Else click on the immediate and save this.
    5. Now,define the job’s steps by choosing Step.
    Here you need to give the ABAP program that has been used and the name of the variant thats being used.
    6. Save the fully defined job to submit it to the background processing system.(You need to click save button on the main screen i.e SM36)
    7. When you need to modify, reschedule, or otherwise manipulate a job after you've scheduled it the first time, you'll manage jobs from the Job Overview.
    8. Release the job so that it can run.
    The job, even those scheduled for immediate processing, can not run without first being released.So,do remember to release.
    Hope this helps you.
    Regards,
    Rakesh

  • Update Work Process and Background work process

    Hi Friends,
    I have a doubt regarding the "Update Work Process and Background work process" ......
    which one is used at what scenario ?????
    If not wrong --> update work process is used when there is an update task .........??? and similarly If background work process is used when there a background task is given explicitly .........???
    Can we can update anything through Background>????
    If yes .... which workprocess will be selected at that time??????
    Expecting your answers ??
    Thanks in advance !!
    Cheers
    R.Kripa.

    HI
    GOOD
    UPDATE WORK PROCESS->
    http://help.sap.com/saphelp_nw04s/helpdata/en/e5/de86e135cd11d3acb00000e83539c3/content.htm
    BACKGROUND WORK PROCESS->
    http://help.sap.com/saphelp_nw2004s/helpdata/en/4a/2d513897110872e10000009b38f889/content.htm
    THANKS
    MRUTYUN

  • Background Job processing

    After writing a report, I used this Function Module “LIST_TO_ASCI” to copy my report to an internal table (DOWNTAB) because I’ll use that internal table to download a text file on the server using dataset.
    Here is my code:
    FORM DL_REP_SERVER.
       DATA: ABAP_LIST LIKE ABAPLIST OCCURS 1,
            MV_FILE2 LIKE RLGRAP-FILENAME.
      DATA: BEGIN OF DOWNTAB OCCURS 1,
              LINE(150),
            END   OF DOWNTAB.
      CLEAR: MV_FILE2.
      MV_FILE2 = ‘J:/Downloads/Report.txt’.
      CALL FUNCTION 'LIST_TO_ASCI'
           EXPORTING
                LIST_INDEX         = SY-LSIND
           TABLES
                LISTASCI           = DOWNTAB
                LISTOBJECT         = ABAP_LIST
           EXCEPTIONS
                LIST_INDEX_INVALID = 1
                OTHERS             = 2. 
      OPEN DATASET MV_FILE2 FOR OUTPUT IN TEXT MODE.
      IF SY-SUBRC <> 0.
        IF SY-SUBRC = 8.
          MESSAGE E037 WITH 'File could not be opened'.
        ELSE.
          MESSAGE E037 WITH 'Error occurs in downloading the file'.
        ENDIF.
      ENDIF.
      LOOP AT DOWNTAB.
        TRANSFER DOWNTAB TO MV_FILE2.
      ENDLOOP.
      CLOSE DATASET MV_FILE2.
    ENDFORM.                    " DL_REP_SERVER
    My big problem is this, when I’m running my program ordinarily (not as background job), I’m getting all the pages downloaded correctly but when I run it as background job (using SM36), I’m only getting the last page of my report being downloaded. Definitely, I can’t debug it because it’s in background. I can’t figure out why. Hope that I stated my problem clearly. Any help would be greatly appreciated. Thanks.

    You can debug batch jobs by going to 'SM37', type in 'JDBG' in the
    command line ( no '/' ), put the cursor on the job and press enter - will
    take you to the job in debug mode.
    You can do this only after the job has finished execution. This will simulate the exact background scenario with the same selection screen values as used in the job also sy-batch will set to 'X'.
    So type in the transaction code 'JDBG' and place your cursor on the job after It has finished. It will take you to a SAP program in debug mode. Step through this program which is about 10 lines, after this your program will be executed in the debug mode.
    Steps
    1. Create variant called BACKGROUND for program to be debugged.
    2. Execute ZDEBUGBG (pgm code below) in background for immediate processing.
    3. Execute transaction SM50.
    4. Select process that runs ZDEBUGBG.
    5. Goto 'Program/Session' 'Program' 'Debugging'.
    A se80 debug session will open.
    6. Change variable W_EXIT to 'E'.
    7. Step thru (F6) until ZWBTEST comes up.
    1. Go to Transaction SM66 and find your work porocess.
    Select the line work process is on and click on the Debugging button.
    If this is a custom program, you can put a wait statement in the code to buy yourself sometime.
    2. Go to Transaction SM50. From the tool bar "Program/session"->Program->Debugging.
    goto SM37 and from Program menu(not sure.. try other menu's)
    -->Catchjob . it will goto the active job in debugging mode.

  • Background Job Processing Spool Retention period

    Hi ,
    In my program i am calling another ABAP program and sumitting the same as a background job(using Job_Submit,Close etc.)
    In this case i can view the Spool generated by the called program(using sm37).
    But this spool exists for a very less period in the system.Is it possible to specify a retention period,as 90 days in my case.?
    Pls Help !!!
    Answers will be rewarded.
    Regards,
    Rohan

    hi Roahn,
    You must set print parameters before the printing process starts.
    When printing lists after creating them, the system uses the print format specified in the print parameters to split the completed list and fit it onto the print pages, truncating it if necessary.
    When printing lists while creating them, the system uses the print format to actually format the list in the program.
    Print parameters are set either interactively by the user or from within the program.
    For each print process, the spool system needs a complete and consistent set of print parameters. In ABAP, the structure PRI_PARAMS (ABAP Dictionary) represent a set of print parameters.
    When passing the print parameters interactively, the system displays a dialog box after starting the report, on which the user has to enter the most important print parameters.
    It's shown below which input field of the Print List Output dialog window conform to which PRI_PARAMS component.
    Input field----
    Retention period
    Component-------PEXPI
    Meaning----
    Number of days for which the system holds the spool request before deleting it. (Default value: 8).

  • Error in Background Job Processing.

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

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

  • Continue background job processing.

    Hi All,
    How to handle the system error
    MESSAGE E328 WITH MATNR  RAISING CONVERSION_NOT_FOUND thrown by FM MATERIAL_UNIT_CONVERSION so that the background job continue processing.
    Thanks and Regards,
    Ashik K.

    Hi,
    I just now checked with this FM and worked with these two options:
    1. Runtime error type 'E' will stop the program if we COMMENT the EXCEPTIONS while calling FM
    * EXCEPTIONS
    *   CONVERSION_NOT_FOUND         = 1
    *   INPUT_INVALID                = 2
    *   MATERIAL_NOT_FOUND           = 3
    *   MEINH_NOT_FOUND              = 4
    *   MEINS_MISSING                = 5
    *   NO_MEINH                     = 6
    *   OUTPUT_INVALID               = 7
    *   OVERFLOW                     = 8
    *   OTHERS                       = 9
    2. Runtime error type 'E' (which stops the program) will not come in this case
    EXCEPTIONS
       CONVERSION_NOT_FOUND         = 1
       INPUT_INVALID                = 2
       MATERIAL_NOT_FOUND           = 3
       MEINH_NOT_FOUND              = 4
       MEINS_MISSING                = 5
       NO_MEINH                     = 6
       OUTPUT_INVALID               = 7
       OVERFLOW                     = 8
       OTHERS                       = 9
    Hope this helps.
    Regards,
    Amit Mittal.

  • Background Jobs - Process Chains

    Hello,
    I want to schedule a background job for a process chain so that it triggers the process type and start executing...
    Can anyone please let me know how i can do it?

    HI,
    The background control options are available to directly schedule the start process. You can start the process chain immediately (when activating the process chain), at a specified time, or after a particular event. When you activate the process chain the start process is scheduled in the background, as defined in your selections.
    If there are not sufficient options available, you can trigger the start of the process chain using API. You can use the SAP NetWeaver Scheduling Framework to start the chain and to have more extensive scheduling options.
    You can also trigger the start of a process chain using a metachain. A metachain is a process chain, for which you determine this start condition, that is fixed to another process chain. The process chain is started directly by this metachain.
    Tarak

  • RSCRMBW_REPORT Background Jobs & Process Chain

    Hello Everyone,
    I have a program in a process chain that runs a query through rscrmbw_report. The program is the first step in the chain, followed by a DTP. When we have previously ran this program in our production box, we found that the we did not get all of the data from the query. We believe the fault is with the DTP running asynchronous to the background jobs of RSCRMBW_REPORT- In SM37, we believe we have found jobs from the report positioned before and after the DTP job.
    I've made some slight changes and on a small volume of data (~1000), the chain works with no issue. However, I am concerned with dealing with a large number of records (~1,000,000+). As of now, I'm not sure I believe the analysis of the background jobs because there are still jobs that appear before and after the DTP, but the data is consistant between the destination of the DTP and the query.
    Any advice on how to ensure those jobs run before my DTP? I've tried using commit work and wait, which I believe works because the DB should be open while the query jobs are running and I believe that the statement will wait for those jobs to finish before proceeding out of the code and to the DTP.
    Thanks & Regards,
    Christian

    HI,
    The background control options are available to directly schedule the start process. You can start the process chain immediately (when activating the process chain), at a specified time, or after a particular event. When you activate the process chain the start process is scheduled in the background, as defined in your selections.
    If there are not sufficient options available, you can trigger the start of the process chain using API. You can use the SAP NetWeaver Scheduling Framework to start the chain and to have more extensive scheduling options.
    You can also trigger the start of a process chain using a metachain. A metachain is a process chain, for which you determine this start condition, that is fixed to another process chain. The process chain is started directly by this metachain.
    Tarak

  • Batch job and background job

    Hi
    what is the difference between a batch job and backgroun job ??
    thanks
    kumar

    hi kumar,
    As far as I know
    Batch job are the jobs created with sessions. You can process those sessions in SM35. These are not direct update methods.
    Where as the background jobs are the jobs running in the background with out user interaction. Once you schedule the job for the background job it will run with out user interaction according to the given schedule.
    You can run the batch jobs also in background.

  • How to cancel the background job processing in ABAP programming?

    Hi,
    I have a requirement where i need to cancel the job depending on some constraint. My code is something like this:
    Select some data from the table.
    if sy-subrc = 0.
    Do nothing.
    Else
    Cancel the job
    call function 'BP_JOB_ABORT'
      exporting
       jobcount                         = number
        jobname                          = name
    EXCEPTIONS
       CHECKING_OF_JOB_HAS_FAILED       = 1
       JOB_ABORT_HAS_FAILED             = 2
       JOB_DOES_NOT_EXIST               = 3
       JOB_IS_NOT_ACTIVE                = 4
       NO_ABORT_PRIVILEGE_GIVEN         = 5
       OTHERS                           = 6
    The above code is cancelling the job but it is throwing an exception called CX_SY_DYN_CALL_PARAM_MISSING because i dint pass job count. How can we find the job count of next job that is going to run? Or How to handle the exception which it is throwing. Even if i try to handle that exception something like this:
    TRY
    call function 'BP_JOB_ABORT'
      exporting
       jobcount                         = number
        jobname                          = name
    EXCEPTIONS
       CHECKING_OF_JOB_HAS_FAILED       = 1
       JOB_ABORT_HAS_FAILED             = 2
       JOB_DOES_NOT_EXIST               = 3
       JOB_IS_NOT_ACTIVE                = 4
       NO_ABORT_PRIVILEGE_GIVEN         = 5
       OTHERS                           = 6
    RAISE EXCEPTION TYPE CX_SY_DYN_CALL_PARAM_MISSING.
    CATCH
    CX_SY_DYN_CALL_PARAM_MISSING.
    ENDTRY.
    It avoids the exception but it doesnt cancel the job.  I even tried with function modules like JOB_OPEN
    JOB_SUBMIT,BP_JOB_SELECT,BP_JOB_ABORT and tried to build some logic using status overview table (TBTCO) and TBTCP (Jobstep overview table).
    Can someone suggest me the right way to write this program ?
    Thanks in advance.
    Rashmi

    Hi,
    Problem is solved.
    Create an background job with 2 steps. The first step in the background job calls the program ZBACKJOB_STEP1.  In the variant we have a wrong material number
    If the material number is not found in Mara, the next step in the job should not get executed and the job should get cancelled..
    In the above posts i had asked how do I get the job count of the job that is currently triggering the program at the runtimeu2026..If u see the below code uu2019ll get to know.. We have to use the standard structure TBTCM which captures the properties/characteristics of the job.
    REPORT ZBACKJOB_STEP1.
    TABLES: MARA,TBTCM.
    PARAMETERS : MATNR TYPE MATNR.
    START-OF-SELECTION.
      SELECT SINGLE * FROM MARA WHERE MATNR = MATNR.
      IF SY-SUBRC IS INITIAL.
        WRITE / : 'This is the material selected on the selection-screen' , MARA-MATNR.
    ELSE.
            CALL FUNCTION 'GET_JOB_RUNTIME_INFO'
          IMPORTING
            EVENTID                                    = TBTCM-EVENTID
            EVENTPARM                             = TBTCM-EVENTPARM
            EXTERNAL_PROGRAM_ACTIVE = TBTCM-XPGACTIVE
            JOBCOUNT                                = TBTCM-JOBCOUNT
            JOBNAME                                  = TBTCM-JOBNAME
            STEPCOUNT                              = TBTCM-STEPCOUNT
          EXCEPTIONS
            NO_RUNTIME_INFO                    = 1
            OTHERS                                     = 2.
        IF SY-SUBRC = 0.
          CALL FUNCTION 'BP_JOB_ABORT'
            EXPORTING
              JOBCOUNT                                     = TBTCM-JOBCOUNT
              JOBNAME                                       = TBTCM-JOBNAME
            EXCEPTIONS
              CHECKING_OF_JOB_HAS_FAILED  = 1
              JOB_ABORT_HAS_FAILED              = 2
              JOB_DOES_NOT_EXIST                   = 3
              JOB_IS_NOT_ACTIVE                      = 4
              NO_ABORT_PRIVILEGE_GIVEN       = 5
              OTHERS                                         = 6.
          IF SY-SUBRC <> 0.
          ENDIF.
        ENDIF.
      ENDIF.
    Regards,
    Rashmi

  • Background Job Processing/Spool List Recipient

    When setting up a report to run as a background job and setting it up to e-mail the results via the Spool List Recipient button, it always sends the results in htm format. Is there a way it can be e-mailed in Excel?

    hi swapna.
    in scot it is not configured as excel how to do it.to get an attachment in excel format
    thanks in advance

  • ALV, initialization and background job

    Hi,
    I've got a basic report that is causing some problems.
    On my selection screen there are 2 buttons ,say Button 1 and Button 2. If you click button 1 set gv_var to 'A', click button 2 and gv_var is set to 'B'.
      IF sy-ucomm = 'PB_1'.
        gv_ var = 'A'.
      ELSEIF sy-ucomm = 'PB_2'.
        gv_var = 'B'.
    ENDIF.
    In the initialization section gv_var is initialized to A.
    When I execute this report in the foreground there are no problems. However, when I Execute it in the background gv_var doesn't change. It just stays at the value it was set at in the Initialization section.
    Any ideas?

    Hi,
    Please note that AT USER-COMMAND will not get triggered for background jobs.
    Even your custom defined Menu bar will not be available for Background jobs.
    The reason is: According to SAP system, you have scheduled a job, and the job is run. And if the job status is completed, you will view the output.
    There you cannot capture the Sy-ucomm value, since according to SAP system the job is completed, meaning that the report is run and the output is displayed. No more events can be triggered at that place.
    Which is not the case with foreground mode, since, until you leave the program, the program is still under execution only.
    Best Regards,
    Suresh

  • Mail configuration and background job scheduling for ST22 Data

    Experts,
    I want to know how can i schedule a background job in SAP to extract data from ST22 and send a automated mail for the same?
    Any help will be appreciated, Thanks!!!
    Regards,
    Vinit Pagaria

    You don't need to do that, simply configure CCMS (RZ20) to send you an alert via mail when a dump occurs.
    Read,
    http://help.sap.com/saphelp_nw04/helpdata/EN/90/4e313f8815d036e10000000a114084/frameset.htm
    Regards
    Juan

  • Creating EXCEL documents and background jobs

    Hi there,
    I was wondering whether the method 'SAVE_DOCUMENT_TO_URL' of the interface 'i_oi_spreadsheet' will work when called in a background job with the intention to store the information somewhere on the SAP servers filepath ...
    If so then I would assume that one needs to install both SAPGUI and MS EXCEL on the server to get it actual working?
    Thx,
    Steven

    Yes it does seem silly that there is check like that.  However have a look at the first perform in the function: Create_Spreadsheet.  Right inside of that form there is another perform for get_spreadsheet_interface.  The following is the very first executable line in this perform:
    * don't do anything in batch, because there is no GUI...
      check sy-batch is initial.
    By exiting at this point, l_iref_spreadsheet will be initial and message e893(ux) will be issued.  Based upon that; the if sy-batch is initial around the SAPGUI_PROGRESS_INDICATOR call can never not be true.

Maybe you are looking for

  • Reading and Writing to a Log file

    Hello, I'm writing a class that will write a user id to a log file every time they click on a particular button. However, I don't want a new line every time a user clicks on the button, I'd like to be able to find their id in the log, increment a cou

  • Not working call for laptop to mobile phones

    hi sar not working UAE to INDIA  mobiles call i nied help 

  • A simple responsive banner

    Greetings. I'm attempting to make a simple responsive banner. There's an image floating left with 100px width and an image floating right with 100px width. In the middle I'm trying to place paragraph text to fill in the empty space between the two im

  • VIP in Intermediate state after relocate

    11.2.0.2.0 windows 2008 2 node RAC Rolling patch. Brought down and relocated all services to node 2. All services start ok except for node 1 VIP which goes to intermediate and FAILED OVER state. C:\Windows\system32>crsctl status resource -t ora.rac01

  • Port forwarding ends in Huawai EchoLife HG612

    Hi port forwarding was working via the internet (no-ip.org) to my computer at home with the BT Infinity router. Now I get this message: "A user name and password are being requested by http://martin0574.no-ip.org. The site says: "HuaweiHomeGateway" W