Using "in background task" in BAPIs

Hello,
I am calling a function module inside a BAPI with "in background task" addition. Basically I want that function executed in a separate background process so that the execution performance of the BAPI is not affected. Well, when executing the BAPI in SAP GUI everything works fine, but not when that same BAPI is executed by a remote .Net app that implements BAPI calls through .Net connector.
Is there a basis parameter that I need to set or is this even allowed? Please help.
Thanks,
Leon

When you are calling a function module in background task, the execution of the function module is done asynchronously. It will be exectued when a commit work happens. May be that is why you are not seeing the results. I am assuming you are not getting any error neither results.
Read help on the syntax for "RECEIVE RESULTS FROM FUNCTION func". May be that is what you may have to do, although, I admit, I never used it.
Regards,
Srinivas
Message was edited by: Srinivas Adavi
Sorry, this works only with FMs that are called using 'STARTING NEW TASK'. So please dont look at this.

Similar Messages

  • How to get return values In Background Task?

    Hi all,
    I have a Call Function Module In Background Task.In this FM I defined a return tables to get related info.But if use In Background Task mode,how to look/get these table values? Many thanks!
    Kelvin

    Hi,
    Create the list o/p of the return table and view the o/p in SP01 transaction.
    Regards,
    Prashant.

  • Creation of spool for job created by calling FM in background task

    Hi Gurus,
    1.Wanted to confirm if it is possible to attach spool to the job that has been created by calling a function module in background task.
    Currently I have created one RFC enabled FM and called it in background task. It runs fine, and the job is created which can be seen in SM37. But it does not contain the spool even if the RFC FM contains the code for list ALV.
    2. Also is it possible to control the name of the job created by calling the RFC FM in background task?
    Code for calling the FM is given below(ZK_XX is th RFC FM):
    CALL FUNCTION 'ZK_XX' IN BACKGROUND TASK
    CALL FUNCTION 'START_OF_BACKGROUNDTASK'
    EXPORTING
       startdate       = sy-datum
       starttime       = sy-uzeit
      NOSEND          = ' '
    COMMIT WORK.
    Thanks a lot for your help!!
    Warm Regards,
    Raveesh

    Thanks for replying.
    I need to do the processing in background. Hence using 'IN BACKGROUND TASK' addition.
    Please let me knowif you have some idea.
    Thanks & Warm Regards,
    Raveesh

  • RFC in background task LUW

    Hello,
    I've two RFC in user-exit. Both, using IN BACKGROUND TASK DESTINATION XI
    When i execute the transaction, the user-exit is raising and i can see the follow error in SM58:
    maximum size of requests for one LUW has been reached(1).
    I've changing in the CC the parameter Maximum Conecction, however the error continue.
    If i comment the second call function in the user-exit, the first call function is executed OK, the interface is right,
    ¿how can i do to execute two functions in the same LUW?
    thanks

    Hi,
    >>¿how can i do to execute two functions in the same LUW?
    you cannot - you need to do "commit work." after each RFC call
    Regards,
    Michal Krawczyk

  • When Background task raises exception that is not handeled

    Hi,
    I am using a background task that uses a method which does not handle exceptions raised by the function module it calls in turn. When such situation arises, i want to build some sort of exception handling mechanism in my workflow.
    e.g, BG task uses method 1 that calls method 2. method 2 raises some exception which is not handled in method1 or method2 results into short dump. As a result of this situation Workflow bg task changes the status to ERROR and I want to handle such unplanned exceptions in Workflow.
    Is there anyway for workflow to know (maybe some event) when one of it's BG task status changes to ERROR?
    Thanks,
    Saurabh

    Hi,
    Just use the exit_return macro in your method. See the following example.
    BEGIN_METHOD 'Method_Name' CHANGING CONTAINER
    **Data Declaration
    **fetching data from container
    CALL FUNCTION 'Function_module_name'
       EXPORTING
       IMPORTING
       TABLES
       EXCEPTIONS
         exception1 = 01
         OTHERS = 02.
       IF sy-subrc ne 0.
         EXIT_RETURN 9001 SPACE SPACE SPACE SPACE. 
                           "Define this event in the exceptions of the method.
       ENDIF.
    Passing data to container
    END_METHOD.
    After doing these changes in your method, you will be able to see your exception in the outcomes tab of the activity. Just activate your exception there. You will get a new branch for this exception in your workflow. In this branch, you can determine how do u want to handle the exception.
    Hope this will help you. Let me know if you have any doubt.
    Thanks
    Yogesh Sharma
    Edited by: Yogesh Sharma on Jul 10, 2008 8:54 AM
    Edited by: Yogesh Sharma on Jul 10, 2008 8:56 AM
    Edited by: Yogesh Sharma on Jul 10, 2008 8:57 AM

  • Background location updates with the help of background task in ios

    Hi,
    we are building a navigation application, that updates location in background. The application receives location updates while in background by using CLLocation manager delegates. In order to reduce battery usage we take updates only on regular intervals say 5 min. For this are using NSTimer to fire an event that starts location update, fetch location and stop location updates for next 5 mins. This approach works well in foreground. But once the application is background this fails. When application fetches the location and stops the location updates for first time, the app gets suspended and never fires event to start location manger for subsequent times.
    The solution we found, for keeping the timer alive is to track it using a background task. This way even if the location updates are stopped for a particular interval the application stays live to keep the timer running. My question is, is this method, a good approach for timed location updates in background states. Is this approach in any way prone to app store rejection as the 'background tasks' are designed to serve other specific scenarios.
    Please share your thoughts on these

    Bill & stephen,
    Not much help I'm afraid, but I just saw your post & wanted to let you know that I have the same problem, but for me it manifests itself in many apps. The only thing I've noticed is that it only seems to happen when I first start typing after not using the keyboard for a while (I'm not sure how long a while is, but maybe 30 seconds or so). Then I'll type & the first few letters will be fine, and then one letter double-types, and then it's fine again until I stop using it for whatever the threshold amount of time is. I'm guessing that it has something to do with the iPad's battery management & that it's shutting off the connection to the keyboard or something & once it picks it back up, then it double-types that letter.
    At least in Pages, it isn't as big of a deal because I know it's coming, I can correct it & then type for a long time. In Numbers, my keyboard use is much less consistent, so I need to be more cognisant of it.

  • Function module not working when used with 'In Background Task'

    hi,
    this is my code
    call function 'Z_IBD_FILL_ZINETACT'
                  in background task
                  destination  'SAPD220125'
                  tables
                      it_net1 = it_net1
                      it_net2 = it_net2
                      it_net3 = it_net3  .
    when this code is executed i am not getting any data in my internal tables i.e it_net1, it_net2, and it_net3
    but i changed this code see the below code
          call function 'Z_IBD_FILL_ZINETACT'
                 in background task (THIS IS COMMENTED)
                  destination  'SAPD220125'
                  tables
                      it_net1 = it_net1
                      it_net2 = it_net2
                      it_net3 = it_net3  .
    now i am getting data into my internal tables
    can any one tell me what can be the problem and how to solve it in my case
    its very urgent

    Hi,
    Pls. go through the  docu..
    CALL FUNCTION
    Variant 5
    CALL FUNCTION func IN BACKGROUND TASK.
    Additions:
    1. ... AS SEPARATE UNIT
    2. ... DESTINATION dest
    3. ... EXPORTING  p1 = f1    ... pn = fn
    4. ... TABLES     p1 = itab1 ... pn = itabn
    Effect
    Flags the function module func to be run asynchronously. It is not executed at once, but the data passed with EXPORTING or TABLES is placed in a database table and the next COMMIT WORK executes it in another work process.
    Note
    This variant applies only as of Release 3.0, so both the client system and the server system must be Release 3.0 or higher.
    Note
    qRFC with Outbound Queue
    This is an extension of tRFC. The tRFC is serialized using queues, ensuring that the sequence of LUWs required by the application is observed when the calls are sent.
    For further information about qRFC, refer to the Serialized RFC: qRFC With Outbound Queue section of the SAP Library.
    Addition 1
    ... AS SEPARATE UNIT
    Effect
    Executes the function module in a separate LUW under a new transaction ID.
    Addition 2
    ... DESTINATION dest
    Effect
    Executes the function module externally as a Remote Function Call (RFC); dest can be a literal or a variable.
    Depending on the specified destination, the function module is executed either in another R/3 System or as a C-implemented function module. Externally callable function modules must be flagged as such in the Function Builder (of the target system).
    Since each destination defines its own program context, further calls to the same or different function modules with the same destination can access the local memory (global data) of these function modules.
    Note
    Note that a database commit occurs at each Remote Function Call (RFC). Consequently, you may not use Remote Function Calls between pairs of statements that open and close a database cursor (such as SELECT ... ENDSELECT).
    Addition 3
    ... EXPORTING p1 = f1 ... pn = fn
    Effect
    EXPORTING passes values of fields and field strings from the calling program to the function module. In the function module, formal parameters are defined as import parameters. Default values must be assigned to all import parameters of the function module in the interface definition.
    Addition 4
    ... TABLES p1 = itab1 ... pn = itabn
    Effect
    TABLES passes references to internal tables. All table parameters of the function module must contain values.
    Notes
    If several function module calls with the same destination are specified before COMMIT WORK, these normally form an LUW in the target system. Calls with the addition 1 are an exception to this rule - they each have their own LUW.
    You cannot specify type 2 destinations (R/3 - R/2 connections).
    (See Technical details and Administration transaction.)
    Example
    REPORT  RS41503F.
    /* This program performs a transactional RFC.
    TABLES: SCUSTOM.
    SELECT-OPTIONS: CUSTID FOR SCUSTOM-ID DEFAULT 1 TO 2.
    PARAMETERS: DEST LIKE RFCDES-RFCDEST DEFAULT 'NONE',
                MODE DEFAULT 'N',
                TIME LIKE SY-UZEIT DEFAULT SY-UZEIT.
    DATA: CUSTITAB TYPE TABLE OF CUST415,
          TAMESS   TYPE TABLE OF T100,
          WA_CUSTITAB TYPE CUST415.
    SELECT ID NAME TELEPHONE INTO CORRESPONDING FIELDS OF TABLE CUSTITAB
                   FROM SCUSTOM WHERE ID IN CUSTID ORDER BY ID.
    PERFORM READ_CUSTITAB.
    EDITOR-CALL FOR CUSTITAB TITLE 'Editor for table CUSTITAB'.
    PERFORM READ_CUSTITAB.
    CALL FUNCTION 'TRAIN415_RFC_CALLTRANSACTION'
         IN BACKGROUND TASK
         DESTINATION DEST
         EXPORTING
              TAMODE    = MODE
         TABLES
              CUSTTAB   = CUSTITAB.
    CALL FUNCTION 'START_OF_BACKGROUNDTASK'
         EXPORTING
              STARTDATE = SY-DATUM
              STARTTIME = TIME
         EXCEPTIONS
              OTHERS    = 1.
    IF SY-SUBRC = 1.
      EXIT.
    ENDIF.
    COMMIT WORK.
    CALL TRANSACTION 'SM58'.
          FORM READ_CUSTITAB                                   *
    FORM READ_CUSTITAB.
      WRITE: / 'System ID:', SY-SYSID.
      SKIP.
      LOOP AT CUSTITAB into WA_CUSTITAB
        WRITE: / WA_CUSTITAB-ID, WA_CUSTITAB-NAME,
                 WA_CUSTITAB-TELEPHONE.
      ENDLOOP.
      ULINE.
    ENDFORM.
    Pls. reward if useful....

  • What is the use of CALL FUNCTION MODULE - AT BACKGROUND TASK?

    Hi experts,
    I found Call functional module in background task will make the FM run at the next commit work as some people said. So I have some questions:
    1 if we use COMMIT WORK commend, the pending FM will be called? If there are several FMs called at background task, what is the sequence of them? How many conditions will trigger the running of these FMs?
    2 Where can I find the log of this pending FMs? In SAP library, it says there are 2 tables. But I checked these tables and can only find the FM name and user of it. And I can not understand content of these tables. It seems one is for the main information of FM, and the other is for the data of the FM, maybe the parameters.
    3 If I call a FM in this way, Can I canncel it before the next commit work in some way?
    Finally, thanks for reading and help.

    HI,
    When the COMMIT WORK statement is executed, the function modules registered for the current SAP-LUW are started in the order in which they were registered. ROLLBACK WORK deletes all previous registrations for the current SAP-LUW.
    If the specified destination is not available when COMMIT WORK is executed, an executable program called RSARFCSE is started in background processing. By default, this tries to start the function modules registered for a SAP-LUW in their destination every 15 minutes and up to 30 times. These parameters can be changed in the transaction SM59. If the destination does not become available within the defined time, it is recorded in the database table ARFCSDATA as the entry "CPICERR". The entry in the database table ARFCSSTATE is deleted after a standard period of eight days

  • Send mail using CL_BCS through function module, run in background task.

    Hi,
    I am running a function module in Background task. in this function module I am sending mail using CL_BCS class.
    but mail is not generated. if I run the same function Module in foreground mail generated successfully....
    can anyone please tell me the reason behind this.

    Hi i realise that The LIST_TO_ASCII thing is not working correctly in background because the the list-processing in beckground is working not the same as in dialog i think.
    I can only get the last page of the list out when running in background. Any solution to this?
    my code:
        CALL FUNCTION 'LIST_TO_ASCI'
             EXPORTING
                  list_index         = sy-lsind
             TABLES
                 list_dyn_ascii = downtab
             EXCEPTIONS
                  empty_list         = 1
                  list_index_invalid = 2
                  OTHERS             = 3.
        IF sy-subrc NE 0.
          EXIT.
        ENDIF.
    Thanks ,
    LH

  • Use of function called "in background task"

    Hi folks!
    In my company there are rumors that a function called "in background task" can be used to make sure that all database changes of previous statements are already persisted. This would mean that a function called "in background task" can be used to read data from database that has been written by the same report - in any case (update dispatching over several instances,...). Usually this won't be a good idea (we know well about SAPs update concepts and read everything about it on help.sap.com). Has anybody some experiences about this or is there even a guru, able to explain why it will always work (or not)? We don't have evidence that the database has finished writing for sure when the function starts - that's why I'm worried.
    Example:
    REPORT test.
    INSERT something to database.
    CALL FUNCTION function in background task.
    End of the report
    Will it always work (when testing, it does)?
    Any help will be appreciated!
    Greetings

    Hi,
    Logically it is correct. BACKGROUND TASK Triggers an asynchronous process. This FM is executed in multiple steps.
    In first step system save the data passed to FM interface to buffer. When ever program encounters Explicit/implicit commit, the source code of the FM is processed.
    Note: You can't get back the data from this FM call.
    Check the F1 help on call function statement. You will get much more details.
    Thanks,
    Vinod.

  • IN BACKGROUND TASK as a different user ID

    Hi experts,
    I am performing a FM IN BACKGROUND TASK call in a BADI to automate creation of GR.
    Example:
    Step 1. User ABC performs GR for plant 0001.
    Step 2. BADI checks and automates another GR for plant 0002.
    The problem is user ABC only has authorization for plant 0001.
    During step 2, the BAPI returns an error saying that there is no authorization for plant 0002 as the BADI is triggered by user ABC.
    I am using FM BAPI_GOODSMVT_CREATE. I tried to pass in an ID with SAP_ALL to the PR_UNAME field to indicate this ID as the creator of the GR, but the authorization check still exists.
    Is there anyway I can force this background task to be executed by another ID instead of the triggering ID?
    Thanks in advance.

    Make sure to discuss this with the security team...
    The RFC destination you specify in your [call function - in background task|http://help.sap.com/abapdocu_70/en/ABAPCALL_FUNCTION_BACKGROUND_TASK.htm] can be used to specify a different user. Check for example the logical workflow destinations in transaction SM59...
    Cheers, harald

  • 'Missing parameter with PERFORM' error with a function IN BACKGROUND TASK

    I am getting this error when calling a custom function in MIGO user exit ZXMBCU01.  When I remove the 'IN BACKGROUND TASK' the function works fine and there are no error messages.  When using 'IN BACK...' you can't debug within it to see where the message comes from.  I see the message with SM58.  I am working in an sap 4.7 environment.  I have not found any solutions from google searches.
    Here is the statement within ZXMBCU01:
        CALL FUNCTION 'Z_UPDATE_MATERIAL_AVAIL_STATUS' IN BACKGROUND TASK
          EXPORTING
            work_order = xmseg-aufnr.
    Here is the code for the function:
    FUNCTION Z_UPDATE_MATERIAL_AVAIL_STATUS.
    ""Update function module:
    ""Local interface:
    *"  IMPORTING
    *"     VALUE(WORK_ORDER) LIKE  AUFK-AUFNR DEFAULT '0000000000'
    TABLES: eban, resb, aufk.
    -Global Types----
    TYPES: BEGIN OF t_data,
           rsnum TYPE resb-rsnum,
           rspos TYPE resb-rspos,
           aufnr TYPE resb-aufnr,          "Order Number
           bdmng TYPE resb-bdmng,          "Requirement Quantity
           enmng TYPE resb-enmng,          "Quantity withdrawn
           bsmng TYPE eban-bsmng,          "Quantity ordered against this purchase requisition
           END OF t_data.
    DATA:  gt_data TYPE t_data OCCURS 0,
           ga_data TYPE t_data.
    -Global Variables----
    DATA: gv_refused TYPE BAPIFLAG-BAPIFLAG,
          gs_caufvd  TYPE caufvd,
          g_text TYPE t100-text,
          gv_objnr LIKE aufk-objnr,
          gv_status LIKE  bsvx-sttxt,
          gv_trig_stat TYPE c.
    TABLES RETURNED FROM BAPI
    DATA:  BEGIN OF xreturn OCCURS 0.
            INCLUDE STRUCTURE bapiret2.
    DATA:  END OF xreturn.
      SELECT SINGLE objnr FROM aufk
         INTO gv_objnr
         WHERE  aufnr = work_order.
      CALL FUNCTION 'STATUS_TEXT_EDIT'
        EXPORTING
          flg_user_stat = 'X'
          objnr         = gv_objnr
          only_active   = 'X'
          spras         = sy-langu
        IMPORTING
          line          = gv_status.
      IF ( gv_status CS 'REL' ) AND
         ( gv_status NS 'NMAT' AND gv_status NS 'CNF' AND gv_status NS 'CLSD' AND
           gv_status NS 'TECO' AND gv_status NS 'DLFL' ).
        SELECT SINGLE *
          FROM AUFK
         WHERE aufnr = work_order AND
               ( auart = 'PM01' OR
                 auart = 'PM02' OR
                 auart = 'PM03' OR
                 auart = 'PM99' ).
        IF sy-subrc = 0.
          SELECT resbrsnum resbrspos resbaufnr resbbdmng resbenmng ebanbsmng
            INTO CORRESPONDING FIELDS OF ga_data
            FROM resb LEFT JOIN eban
              ON resbrsnum = ebanarsnr AND
                 resbrspos = ebanarsps
           WHERE resb~aufnr = work_order AND
                 resb~bdmng > 0.
        SELECT rsnum rspos aufnr bdmng enmng
          INTO CORRESPONDING FIELDS OF ga_data
          FROM resb
         WHERE aufnr = work_order
           AND bdmng > 0.
              SELECT SINGLE bsmng
                INTO ga_data-bsmng
                FROM eban
               WHERE arsnr = ga_data-rsnum
                 AND arsps = ga_data-rspos.
              IF sy-subrc <> 0.
                CLEAR ga_data-bsmng.
              ENDIF.
               IF ga_data-bdmng = ga_data-enmng OR
                  ga_data-bdmng = ga_data-bsmng.
                 "update status - but all items must pass
               ELSE.
                 gv_trig_stat = 'N'.
                 EXIT. "status won't change so get out now
               ENDIF.
         ENDSELECT.
       IF ga_data~bdmng > 0.
           IF ga_data-bdmng = ga_data-enmng OR
              ga_data-bdmng = ga_data-bsmng.
         IF gv_trig_stat <> 'N'.
              CALL FUNCTION 'CO_IH_USERSTATUS_SET'
                EXPORTING
                  I_AUFNR              = ga_data-aufnr    "'000005000263'
                  I_USR_STAT_INT       = 'E0002'
      I_USR_STAT_EXT       =
      I_SET_INACTIVE       =
      I_BUF_READ           =
                  I_SPRAS              = sy-langu
                IMPORTING
                  E_CHNG_REFUSED       = gv_refused
                  E_CAUFVD             = gs_caufvd
                TABLES
                  RETURN               = xreturn.
              LOOP AT xreturn
               WHERE type = 'E'.
              ENDLOOP.
              IF sy-subrc <> 0.
                CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'.
                RETURN.
              ELSE.
                READ TABLE xreturn INDEX 1.
                CALL FUNCTION 'PI_BP_GET_MESSAGE_TEXT'
                  EXPORTING
                    iv_message_id     = xreturn-id
                    iv_message_type   = xreturn-type
                    iv_message_number = xreturn-number
                    iv_message_v1     = xreturn-message_v1
                    iv_message_v2     = xreturn-message_v2
                    iv_message_v3     = xreturn-message_v3
                    iv_message_v4     = xreturn-message_v4
                  IMPORTING
                    ev_message_text   = g_text.
              ENDIF.
         ENDIF.
         ENDIF.
           ENDIF.
         ENDSELECT.
        ENDIF.
      ENDIF.
    ENDFUNCTION.
    Does anyone have any ideas?  Thank you very much in advance.
    Glenn Allen
    Software Architect (specializing in SAP)

    I'd be starting a process of elimination... perhaps start with an "exit." right after
    SELECT SINGLE objnr
      FROM aufk
      INTO gv_objnr
      WHERE aufnr = work_order.
    exit.  "leave FM NOW
    and if that doesn't crash, work down the code down the code in the function e.g. comment out the BAPI_commit call... and / or build a little test harness report to call the Z function in background task... btw, does the ST22 dump point to anything more specific...?

  • Background Task running under initiator not under WF-BATCH

    Hi All,
      I am trying to resolve a problem with a Background task running under intiator. Since the initiator does not have authorization to execute the task, it is not working.
    My understanding was, all background tasks will run under WF-BATCH!!. Is it correct?.  in 4.7, it is working this way.
    However in ECC 6.00  the background task before the first dialog work item is executed under 'intiator' in this case.  I have moved the same task after first dialog work item, and it was executed under WF-BATCH.. I cannot move the task after the dialog workitem as the task need to be executed immediatly after the creation of workflow.
    1. How can I run the task in backgroud under WF-BATCH?
    2. Inside the task, I am running a BDC to update a flag in downpayment transaction created using F-47. How can I run the process under batch user to overcome the authorization issue that initiator will not authorization.
    I am running this workflow in SAP ECC 6.0 level 13
    Any help is really appreciated..
    thanks in advance for your help.
    johnson

    This issue can be resolved with triggering the event using the additional flag export parameter 'CREATOR' in function module  ''SWE_EVENT_CREATE_FOR_UPD_TASK' as WF-BATCH. I was not passing this parameter and hence it didn't work in ECC 6.0 as it take who ran the process as creator and ran the background task under that users id.
    Thanks Rachid for your input to resolve this problem.
    johnson zavier

  • Qs about call FM in background task, and monitoring in SM37.

    Hi, guys, i got a question here, if I call a FM using addition "in background task" in a Z program, does this mean the FM process is running in background? And can I monitor my task in sm37?
    i've tried to do that, the FM was successfully proceeded, but I cannot see anything related to that task in SM37 under mine user ID.

    No, you cannot see that in SM37.
    What it means is that the function is being executed in a seprated thread and the program that called the function will continue the execution without waiting for the function finish execution, that means the function is called in a synchronous manner.
    Regards,
    Ravi
    Note : Please mark all the helpful answers

  • Windows 8.1 background task Javascript - Call angular controller function from task js

    Hi,
    The Ionic Side menu starter template for windows 8.1 is a very good option to run the ionic apps on Windows  8.1 phones.
    I am not sure whether this is related to Ionic/angular or VS2013 CTP 3.1 but if anyone can give some tips ,that would be great. I registered a background task as per the VS tutorial (Run JS task in background) and i tested it with windows toast notifications.However
    my requirement is to access webservice in background which I am not able to implement.
    The setup for background task is path to the js file but my requirement is to call a function defined within a controller.Is there any way i can access the controller function from an outside js file.I am new to Ionic,Angular and VS 2013.Any help would be great
    The structure of background task js file is as below
    (function() {
       --- I need to call my controller/service  function here---
        var notifications = Windows.UI.Notifications;
        var template = notifications.ToastTemplateType.toastImageAndText01;
        var toastXml = notifications.ToastNotificationManager.getTemplateContent(template);
        var toast = new notifications.ToastNotification(toastXml);
        var toastTextElements = toastXml.getElementsByTagName("text");
        toastTextElements[0].appendChild(toastXml.createTextNode("From Background!"));
        var toastNotifier = notifications.ToastNotificationManager.createToastNotifier();
        toastNotifier.show(toast);
        close();
     

    Are there any updates on this issue? I'm currently seeing this on a Lumia 822 with WP8.1, and the app has never been published to the store. I've only ever deployed the app from Visual Studio to my device. It worked when deploying the Debug build, then I
    tried a Release build, and it crashed immediately upon launch when trying to register the background task, but then I was able to go back to deploying/debugging the Debug build on the device for awhile. I made more changes, and now neither Debug nor Release
    builds work--both fail on the BackgroundTaskBuilder.Register() call with the error described in the original question:
    "The drive cannot locate a specific area or track on the disk. (Exception from HRESULT: 0x80070019)"
    I've tried changing the Task name during registration, rev-ing the version number of the application, adding the call to BackgroundExecutionManager.RemoveAccess() before BackgroundExecutionManager.RequestAccessAsync(), changing the name of the IBackgroundTask
    concrete implementation and changing the corresponding EntryPoint in the package.appxmanifest (as well as in the BackgroundTaskBuilder instance), and changing the package DisplayName to a new reserved name, all to no avail. The only thing I didn't try
    was associating with an entirely new app in the app store or paving my phone, as these are both fairly undesirable "workarounds."
    Even if this won't affect clients downloading the app from the store, this is a major roadblock during development, as we can essentially only use the emulator to test an app specifically designed to help solve problems involving moving around physically
    in the real world.
    Any more information would be greatly appreciated. If there's any information I can provide, please let me know.

Maybe you are looking for