Tedious background task help

I am making an instant messenger and I've run into a minor problem. The code for the networking portion of the file is correct, however I am unsure of when to call some of the networking information. In example, I want the client to constantly ask the server for information, but I don't know how I would go about doing this. I've tried using a timer, but that actually just lagged up my GUI; is there a way around lagging up my GUI while using a timer, or should I be using something else?
Sorry if this is the wrong place for this question. :\

Is your requester using the same process as the GUI or is it being run as a separate thread?

Similar Messages

  • Function Module MASTER_IDOC_DISTRIBUTE to be called in background task?

    Hi,
    We are generating outbound Idocs in a report. In this report we are using Function Module Master_Idoc_Distribute. Now we have faced some performance issues and the basis consultant is asking us to:
    Call the function module using CALL FUNCTION Master_Idoc_Distribute IN BACKGROUND TASK.
    1) How will calling the FM Master_IDOC_Distribute in background task help improve the performance?
    2) By calling the function module in background task, will it have any impact on the sequencing of the idocs? If yes what is the way out, as the idoc sequence is very important.
    Thanks in advance,
    Mick

    1) How will calling the FM Master_IDOC_Distribute in background task help improve the performance?
    ->Calling the FM in background task will help in performance as it will be called in the background process mode like a tRFC.So it will not occupy any dialog process which are limited.
    2) By calling the function module in background task, will it have any impact on the sequencing of the idocs? If yes what is the way out, as the idoc sequence is very important.
    ->It will not have any impact on IDoc sequence.

  • 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.

  • 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

  • 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

  • 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.

  • 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

  • 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

  • Problem in background task with Control channel trigger in Windows 8.1 app

    Hi,
    I created app with control channel trigger as background task.
    This is working fine in windows 8.1 desktop whenever app in background and switching from my app to other apps.
    But this same behavior is not working fine in windows tab, whenever app switching the notification associated with background task is not working. And some times it throws delayed notifications.
    As assumption based, is there any problem in tab to initiate the background task in suspended mode? or is there any regulations for control channel trigger using?
    Expecting your feedback!!! thanks

    Hello Kabir,
    Since this issue is related windows store apps, I move it to the
    store app forum for getting better help.
    Rgeards.
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • How to convert a workflow background task into a  general task ??

    Dear Experts ,
    I am working om std SAP workflow for invoice document parking :
    I have done the following activities :
    1. Activate Work flow Template for Document Completion
        Here i activated the event   "Complete the Parked Log. IV Document"--> Incoming Invoice Document Parked. It is showing      a  green traffic light .
    In agent assignment
    Complete the Parked Log. IV Document>Complete the Parked Log. IV Document>Complete the Parked Invoice--> i have assigned  the user MMCONFIG
    2. In Define Release Criteria  i have the following settings :
       1000          H Credit     0.01     INR     US     MMCONFIG
       1000          S Debit     0.01     INR     US     MMCONFIG
    3. In Activate Workflow Template for Release for Posting
      Here i activated the event Incoming Invoice Complete: ReleaseRel  & i m getting a green traffic light .
    In assign agents  i did the following
    Release the Completed Log. IV Document>Release the Completed Log. IV Document>Release the Completed Log. IV Document  i assigned the user MMCONFIG
    In Invoice Parking: Approve Release i assigned the user MMCONFIG .
    For Invoice Parking: Release Invoice
    Invoice Parking: Posting an Invoice " I AM NOT ABLE TO ASSIGN ANY USER AS THESE ARE BACKGROUND TASKS ".
    Now when do a MIR7 - Park invoice & save the invoice as complete i am getting a mail in the mail box of MMCONFIG saying :
    "Invoice Release 5105xxxxxxx 2009, Completed by MMCONFIG  "
    I go & release the same invoice .
    Then i executed MIRO & tried posting the released invoice . The sysem doesnt allow me 2 post the invoice .
    It automatically goes to MIR4 transaction & forces me to save as complete
    if i try to post it the system says "Parked document is release-relevant and cannot be posted"
    Pls tell me how can I post the invoice & IF MY SETTINGS FOR THE WORKFLOW IS OK ???
    Regards
    Anis
    Edited by: anis bazmi on Nov 6, 2009 9:08 AM

    Hi argadip,
    Please help me tooo...
    Task has been transported from develpment client to another client for integration testing.
    in the shopping cart advice product has been created by the employee.
    then it goes to advisor for the approval
    This has been done by the workflow.
    It is implemented in both dutch and english.
    English - it is working fine.
    Dutch - the task is not defined.(the code is missing)
    after transporting , we did changes in the task created for implementing this approval description.
    It was working fine in both dutch and english.
    But the corrections in the code are there....
    only in the output After transported to another client dutch part approval description is not correct some part of it are missing
    Is the problem related to the transport or with the modifications of task defined ??
    Can anyone suggest me how to solve this problem.

  • BackGround Task to execute report is 'IN PROCESS'

    Hello Experts,
    I have developd a workflow where i have added a task which will execute a report in background as code below -
    SUBMIT rhakti00
         USING SELECTION-SCREEN 1000
        WITH SELECTION-TABLE rspar
          AND RETURN.
    The output of the report is not relevant for my req so i dnt need to display the output of report after thts y i want to run this report in background.
    Now,while executing the task ,the report has started executing in background perfectly but tht task remain in 'IN PROCESS' status. When i checked the tRFC for that task so its showing me mesaage that - "Screen output without connection to user."
    Plz suggest how to complete my background task.
    Regards
    Nitin

    thnks for the reply Kiran,
    regarding ur point to send report output to many users....i want to make it clear tht i dont need to send or display the output of the report. I just need to execute the report in background and task shud get complete.
    Also,Can u plz explain it further abt writing code in FM and thn get the output in export or table parameter.......i mean which field or which table of which type shud i use in export or table paramenters of FM. if u can tell me somethg in coding also..tht will ne helpful...
    Regards
    Nitin

  • Function called IN BACKGROUND TASK goes to work process DIA, not BGD

    I'm calling a function IN BACKGROUND TASK
    In SM50, I see it running in a DIA work process.
    I want it to run in a BGD work process.
    Can this be done?  If so, how?  If not, why not?

    Hi...
    It looks like, it will always run in DIA process and not Background process...I am not sure that we can change the work process
    Check the below link..
    http://help.sap.com/saphelp_40b/helpdata/pt/69/c24f864ba111d189750000e8322d00/content.htm
    What is written in the link is...
    "Background updates (CALL FUNCTION IN BACKGROUND TASK) represent a variant of remote function call that is synchronous with the end of a transaction (COMMIT WORK). In background updating, an update is run in another dialog work process that may be in the same or in another application server and R/3 System. Because such updates run in their own LUWs, they may start only after all critical updates have been completed. Otherwise, it would not be possible to roll back background changes in the event of an error in another update component. "
    IF you get the answer of whether we can change the work process then please let us know...

  • Save Order - Call function in background Task

    Hi all,
    I have written a function module which is called in order save Badi and copies the system status on the Master contract to the sub contracts.
    This works fine but when I call this function in background task the status is not getting copied over.For testing I have created a program similar to function module and scheduled that in background and this was working as required.
    Can someone please let me know if I missed out anything or how can i resolve this issue.
    Any inputs in this regard would be very helpful.
    Thanks and regards,
    Vijay

    Hi Heinz,
    You can check the result in SM58 transaction.
    For more information pls. refer this thread :
    No IMPORTING parameters allowed in CALL FUNCTION IN BACKGROUND TASK
    Best regards,
    Prashant

  • CALL FUNCTION IN BACKGROUND TASK - enable tRFC

    Hi Experts,
    I want to call a Remote Function module 'IN bACKGROUND TASK' and get the status in SM58 within the same AS. Kindly help me to do this.
    Requirement is to call the remote function module asynchronously in a guarentied way.
    Thank you
    Nikhil

    The scenario works fine for me. The issue was unable to create a proper test condition in the RFC.
    CALL FUNCTION 'ZMY_RFCASYNC'
       IN BACKGROUND TASK
       EXPORTING...
       TABLES...
       EXCEPTIONS...
    Simulated error condition in 'ZMY_RFCASYNC'
    and got entry in SM58 by simply making an exception. 
    Thank you all.

Maybe you are looking for

  • Transformation File - Usage of Len function in Mapping-

    Hi, I am trying to load the data from  flat file to bpc 7.   I have maintained a Transformation file, under the mapping options iam using the following condition Mapping: Account = if (LEN(Col(7)) = 4 then Col(7) +str(.) +*Col(5) ; *Col(7) = *Str ( 

  • Why can't I log in to YouTube when using Firefox?

    Information is stored on other websites just fine, and I have been able to log on to my YouTube account through Internet Explorer 8. However, when I click the 'Sign In' button on YouTube, I keep getting an error message that reads, "The page isn't re

  • Writing smartform output into application server.

    Hi, i have a smartform output having logo and other details. After this i am converting the smartform output to PDF file and i tried write into application server using Open Dataset, Close Dataset. The thing is i am unable to see the output in pdf fi

  • Dynamic Converter Not Returning HTML

    Hi, I'm trying to call get_dynamic_conversion service using RIDC on a word document to convert it to HTML. However, the service is not returning HTML but instead hda that starts as follows: <?hda version="11gR1-11.1.1.4.0-idcprod1-101229T001824" jcha

  • Officejet 7610 margins are too big on my Mac

    I'm on my second OfficeJet 7610 Wide Format, because HP couldn't fix this problem the first time, so they assumed it was a hardware issue.  I don't think it is... The default margins for this printer are as small as 0.13 inches (3.3mm) based on the s