Two transactions, same program, processed in background task problem

Y0 Team ABAP,
i got something here that bugs me.
I have done a report. Nothing special, simple selection screen, selection of data, and output via SALV.
One of my selection screen fields (a parameter) is VKBUR and it is "obligatory".
2 weeks ago i got the requirement to create a copy of this program, and adopt VKBUR as select option.
Since i didnt want changeanomalies i decided not to duplicate the program, but just add a second transaction to my program.
In a routine at event at-selection-screen output, i´m hiding either the parameter or the select option, depending on which tcode was used.
In some routine which gets triggered at the event at-selection-screen i´m moving either what we got in our parameter to our local range we use for the select, or just assign the select option to our local range, or process an error message if according field is not filled. Yeah that obligatory condition is done by myself since i cant just set the obligatory addition to the statement.
This all works quite fine so far.
BUT:
Today i hear that the end-users process that report in background task by pressing F9.
Problem is now that when it is processed in background task, sy-tcode is initial, so i dont know which of the transactions the user picked, and so i dont know which of the two fields has to be filled.
Sure i could do another report, containing just my second selection screen, and when this is checked, do a submit on my real report, tho i still believe there must be some more elegant way.
Any ideas?

Unfortunateley those subtotals cant be handeled by the layout, thats why i manually add them.
But you got me back on track! right now i´m for your solution.
right now i´m having just ONE selection screen with the select option on it.
User can decide if he fills just one value or more.
In the end i loop over my output table and look if there are records of different VKBUR´s.
If there are i know he wants subtotals and process them. If its just data of one VKBUR i can spare myself the hassle as there is anyway just one records per VKBUR so subtotaling this wouldnt make sense.
thanks. Thats what i will present my consultant now lets see if i can get him satisfied with it...

Similar Messages

  • Background task problem

    Hi have couple of background task in my workflow.My problem is that the task sometimes get stuck or sometimes take a lot of time in processing.I am not able to find out problem why it si happening.
    Can you help me out to drill down this problem.

    Hello,
    You wrote:
    "My problem is that the task sometimes get stuck or sometimes take a lot of time in processing"
    So sometimes it gets stuck forever, and sometimes it just takes a long time? Odd. Any difference between the two cases? Are they both with level 2?
    What does the method do?
    Has it always done this, or did it suddenly start showing this behaviour?
    regards
    Rick Bakker
    Hanabi Technology

  • Background task problem wont let me export to PDF

    Dear community, I have been publishing a newsletter made in Indesign but for some reason, for the last version, when I try to export it to PDF, it reports one background task error.  I am trying everything but I don't manage to  identify what caused it.
    I can still create PDF with other applications, so I believe it must come from Indesign.
    Thanks for your help.

    What is the exact error message?

  • Background task problem with alv grid display

    Hello !
    I have a problem when executing my program in background.
    In foreground I have no problem, my ALV appears. In the background I have a dump.
    The current ABAP program "SAPLKKBL" had to be terminated because one of the statements could not be executed.
    I use the function module 'REUSE_ALV_GRID_DISPLAY'
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
         EXPORTING
            i_callback_program      = gd_repid
            i_callback_user_command = 'F533_USER_COMMAND'
            is_layout               = gd_layout
            it_fieldcat             = fieldcatalog[]
            it_special_groups       = i_fgroup[]
            i_save                  = 'X'
            it_sort                 = gd_sort
            i_buffer_active         = ' '
            i_callback_pf_status_set = 'F534_SET_PF_STATUS'
         TABLES
            t_outtab                = mytab
         EXCEPTIONS
            program_error           = 1
            OTHERS                  = 2.
      IF sy-subrc <> 0.
        MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      ENDIF.
    I don't understand where the problem is. Please help me.
    Thank you.

    I love replying to old threads:
    Try this link
    http://scn.sap.com/people/prashant.patil12/blog/2007/02/20/displaying-alv-grid-in-background-job

  • Testing first BPM Process viewing my tasks problem.

    Hi,
    i've completed tutorial from http://www.oracle.com/webfolder/technetwork/tutorials/obe/fmw/obpm/11g/r1/firstProcess/firstprocess_obpm11g.htm.
    But when i try to browse tasks (in BP Workspace) asssinged to me I get error 'unable to find page.... etc. localhost.localdomain... etc' I am using remote server 192.168.xx.x and i assume that I need to change this localhost.localdomain setting to my URL192.xxx.
    Can someone tell me where/how I should I do it?

    My BPM Workspace application works fine. I have no problem to enter application.
    When I go to 'My task' and try to enter taks assigned to me eg. 'Please Enter a Hello Message' application tries to open URL something like that:
    http://localhost.localdomain:7001/workflow/HelloWorldUI/faces/adf.task-flow?_document=WEB-INF%2FSayHello_TaskFlow.xml&bpmWorklistLogin=login.jspx&tz=America%2FLos_Angeles&bpmWorklistContext=f370efbd-f4ac-4b4a-83fe-a249164be07e%3B%3B7nJgG2KwPjregH%2BXFNILkXSTsKXVb6cNCnoISKX3i5aeJpZRe0tlZagmDLZssbe%2Bi4X7%2FGQZiCz%2BjhYPeiOuzjevI0hh2e0rA5UfohqJqyVynnbZBQKgsMyE8PszlMSIvJAgdWWTKy091B7C0btLKmCXBGLkGsXJSkgQkGyq800t18ncTROsT7FJeb1s7oynNbz4Ub%2BaBBVfHHCx3CPtBfnBIDLVCMb0IvPOgEuPauSqL2ev6zQRgSJz6Z66YrWz&bpmWorklistTaskId=f4ee67a0-8a6d-4bb8-9eba-0aa1b0aed429&_id=SayHello_TaskFlow&lg=en&cy=US&bpmWorklistLogout=logout.jspx&bpmWorklistHttpURL=http%3A%2F%2F192.168.200.15%3A7001%2Fbpm%2Fworkspace&bpmBrowserWindowStatus=close
    when my BPM Workspace Application is deployed on 192.168.200.15:7001. I had to add entry in my etc/hosts to temporarily solve problem.
    192.168.200.15 localhost.localdomain
    But this will work only on my PC, I need to find global solution for this problem.
    Edited by: 928145 on 2012-04-18 01:09

  • How to get the custom program generated in Background

    Dear Freinds,
    I have written a below code in my submit program ( zreport) .
    REPORT  ZHRRPCPRRU0_SUBMIT  NO STANDARD PAGE HEADING MESSAGE-ID zhr_msg.
    SUBMIT RPTQTA00 VIA SELECTION-SCREEN
    WITH pnpbegda = sy-datum
    WITH pnpendda = lv_date
    with pnppernr = '99007057'.
    As per your logic i have used the submit program and i am able to default the dates  in the Standard program RPTQTA00 , that is perfectly correct . Now if run the standard report it is giivng me the ouput ..so the foreground concept is working correctly.
    Now if iam scheduling the Z report of the custom report (z program) where iam calling the submit program
    it is just scheduling and further when i look at the sm37 i can see the  job getting finished . However , i dont  find any spool because the standard report has not been executed , with my custom report (using the logic with submit program above in zprogram ) i am calling the standard program (RPTQTA00).
    so could you please let me know how the standard program will execute and get the spool genereated? in the case of background
    because when  i have executed only the standard report in background i can see that it is being exceuted spool as well, however when iam calling from custom program no spool is created because my custom program only submiting the standard report and it is not executing the standard report in the case of backround ...because when iam running the custom program in the Foreground it is calling the standard program and getting the values defaulted based on the parameters which i passed , so it gets defaulted later iam running the standard program manually .
    So please could you let me know how will the standard program also gets genereated in the backgroung along with my custom report.
    Thanks in advance
    regards
    madhuri,

    Hi Can you try the following?
    Hope this helps... (Taken from help)
    Example
    Scheduling a submitable program as a background task with the number number in a background request name. After scheduling, the background task is completed by function module JOB_CLOSE and released immediately.
    DATA: number TYPE tbtcjob-jobcount,
          name TYPE tbtcjob-jobname VALUE 'JOB_TEST',
          print_parameters TYPE pri_params.
    CALL FUNCTION 'JOB_OPEN'
      EXPORTING
        jobname          = name
      IMPORTING
        jobcount         = number
      EXCEPTIONS
        cant_create_job  = 1
        invalid_job_data = 2
        jobname_missing  = 3
        OTHERS           = 4.
    IF sy-subrc = 0.
      SUBMIT submitable TO SAP-SPOOL
                        SPOOL PARAMETERS print_parameters
                        WITHOUT SPOOL DYNPRO
                        VIA JOB name NUMBER number
                        AND RETURN.
      IF sy-subrc = 0.
        CALL FUNCTION 'JOB_CLOSE'
          EXPORTING
            jobcount             = number
            jobname              = name
            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
            OTHERS               = 8.
        IF sy-subrc <> 0.
        ENDIF.
      ENDIF.
    ENDIF.

  • Push Notification Background Task Crashes Emulator/Device

    I have a universal app for Win 8.1 and WinPhone 8.1. I have a background task triggered by push notifications, which has worked fine in my Win 8.1 app. I made the necessary changes as far as registration goes for the Phone 8.1 app, and as far as I can tell
    registration is fine. So I launch the app in the emulator, and send a raw notification using the 'Notification Simulator' tool. This does indeed trigger my background task JS file, but the emulator promptly crashes after displaying an error like "Network
    communication is no longer available" or some such. This happens even if I put a break point on the first statement of the background task script. I've also tried using a real push notification from my web service and that produces the same results (emulator/device
    crashing).
    I made a small test in which I changed my trigger type to a system event so I could manually trigger the background task via VS. Doing this, I was able to properly debug the background task script. So something is definitely messed up with the push notification
    trigger, but I have no idea what it could be. I've even copied my background task registration code to the 'RawNotifications Sample' app and that still works, so I know the registration code works. I've also copied the exact same code for the background task
    script from the sample app since I know that should work.
    The emulator crashing could be due to some errors I occasionally see in the background task, one of which is an 'Access denied' error when trying to access the
    'WebUIBackgroundTaskInstance.current' property inside the background task. Another error occurred when trying to access
    'ApplicationData.localSettings'. That one was something like 'failed to load state store'.
    If anyone can make sense of any of this that'd be wonderful. I can post some screenshots of errors, etc. later today for added clarification.
    Thanks.

    So I've done some more investigating and it turns out the
    sample app actually does not work as intended. When I thought it was working, I actually wasn't invoking the background task capability, but rather the
    pushnotificationreceived event on the notification channel. After running the part of the app that is supposed to run the background task on receiving a push notification, I get the same crashing behavior as my own application. Based on this,
    it would seem that Windows Phone 8.1 Developer Preview does not actually support background tasks triggered by push notifications.
    Here are some screenshots of the emulator after I try pushing a raw notification via the NSE.

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

  • How to get program which is been processed in background

    Hi Experts,
          While doing PI sheet (CO60) the document gets posted for movement type 101 in MIGO which is processed in background. I need know which standard program is processed to get the document posted in background.
      The two function modules are configured for this i.e pi02-COCM_PROCESS_RECORD
    pi05 - COCI_CONFIRM_OPERATION. I tried to debugg by setting break point in these two funtion module but it is not getting triggered.
       The reason might be because the process ia automatic or any other. How can i find out how the document is getting posted the break point is not get triggered for any cases .Please suggest.

    Hi Harshitha ,
        The FMs pi02-COCM_PROCESS_RECORD and pi05 -COCI_CONFIRM_OPERATION
      are called at multiple locations .Might be the place where u hav set the break point the FM is not getting triggered from that location but from the location where u hv not set the break point for the same FM.
        Instead set the break point in the FM definition. or set the debugging swith again where actually the posting is done.
    regards,
    ajit.

  • Background JOB scheduling for BD87 transaction for IDOC processing

    Hello All,
    I have a requirement to schedule program(BD87) for background processing.I have created varient for selection screen.
    Query is how do i slect a particular node ithe tree and execute a particular button in background processing.
    Do i need to write BDC for BD87 transaction?? or there is any other approach for the same.
    Thanks.

    oh!! that's different! if your IDOCs have errors and remain in status 51, no transaction in the whole world can proceed them.
    you will have to investigate what caused the status 51. go to transaction BD87, select your IDOCs and go to the IDOC-body. you have several segments there: contol, data and status ... go to the status-segment, open it and double-click on the message in red at the side of the status 51 - analyse the error, edit the IDOCs or - if that is no solution, kill them and create new ones.
    what is the error message? (just out of curiosity ...)

  • Two logical data base in Same program(ABAP-HR)

    Hi all,
    I want to use two logical database in the same program. Can u please explain me what is the process.
    Regards,
    Munna.

    You can do that...
    Use the function module LDB_PROCESS.
    This allows you to use the logical database as a routine for reading data. You can call more than one logical database from the same program. You may also call the same logical database more than once from the same program.
    When you call a logical database using the function module LDB_PROCESS, its selection screen is not displayed. Instead, you fill the selections using the interface parameters of the function module.
    The logical database does not trigger any GET events in the calling program, but passes the data back to the caller in callback routines.
    Calling a logical database using LDB_PROCESS thus decouples the actual data retrieval from the preceding selection screen processing and the subsequent data processing.
    Hope this helps.
    Vinodh Balakrishnan

  • Transaction/Report to process background work items which r in READY state

    HI,
    Can somebody kindly tell me the transaction/report program to process background work items which are in ready state. SM59 configuration was missing and hence, workflows failed to execute after being started successfully. Now, I want to comeplete these operations.
    Thanks a lot,
    Max

    Hi Max,
    Did you check transaction SWPC? If the workflows are in there you can start them through in a proper way.
    Regards,
    Martin

  • Background task stays with status "in process" without creating any error

    Hi all,
    we created a two step approval workflow for parked documents based on the SAP WF templates WF WS10000051 (WF frame) and WS10000053 (two step approval sub WF). The problem now is, that after the two approvals have been given and the release flag is set the system should post the document. This is done in a background task. This task is started automatically but the status stays at "in process" and the document remains "parked" and not posted.
    What we did so far to solve the problem:
    1.) Check if shortdump has been created via ST22 --> not the case
    2.) Refreshed buffer via SWU_OBUF
    3.) Reacticvated/executed task with workitem id from log in SWIA
    --> nothing solved the problem so far. Please help!
    Thanks in advance. Johannes

    Hello Johannes !
                  You have asked "What do you mean with populate the value?"
                            Populating means conceiving the variable or container with valid value.In your scenario , with reference to your URL http://img851.imageshack.us/i/wflog2.jpg/ , POSTED_FLAG should be populated with value X.It should not be "Not Set".
                            With reference to your URL http://img717.imageshack.us/i/wfprotocol.jpg/, Set Release Flag step does not sets release flag.
                            It's evident from the URL http://img263.imageshack.us/i/flagreleasesetsw01.jpg/
                The solution for your problem is straight forward : Pass all the export or result parameters of RELEASE step to SET RELEASE FLAG step. Similarly , pass all the export or result parameters of SET RELEASE FLAG step to POST PARKED DOCUMENT STEP.
    Answer for question 1 : After  successful workflow transportation, it's version changes.Never mind the versions unless either of the versions are inactive or the version you require is inactive.
    Answer for question 2 : The user WF-BATCH should have SAP_ALL and SAP_NEW profiles.
    Regards,
    S.Suresh

  • Background processing for a task

    Hi all,
    my problem is this: I enter in a step of a wf structure and for that step I must set the task in background--->double click on task and I thought that, in modify mode, the flag 'background processing' in label 'Execution' of the task was editable and instead no...How can I set my task/step in background?
    Thanks in advance
    Bye

    Hi,
    Follow the below steps
    1. Execute PFTC transaction.
    2. Choose the task type as Standard Task.
    3. Enter the task ID without Object type TS i.e. if task ID is TS90000000, then simply enter 90000000.
    4. Open in change mode and enable the check box BACk ground Processing.
    After the above steps are completed, Execute the transaction SWU_OBUF and click SHIFT + F1. to refresh teh buffer.
    Regards
    Pavan
    Edited by: Pavan Bhamidipati on Nov 21, 2011 4:24 PM

  • How can i give two tcode in same program

    Hi all,
    How can I give two tcode to the same program in which two conditions call in that two t codes
    how can I do so please help me for that.
    Ketan
    ABAP consultant

    hi,
    In your case, if the calling of the two transactions is mutually exclusive,
    then
    IF
    call transaction 'A'.
    else.
    Call transaction 'B'.
    endif.
    else,
    if you need to call the transactions one after the other,
    CALL TRANSACTION 'A'.
    CALL TRANSACTION 'B'.
    Thanks
    Sharath

Maybe you are looking for

  • Multiple iTunes accounts

    I have recently tried to shift my iTunes account to a new email address and have found a problem with my app updates.  Since I've purchase many apps over time on an old iTunes account, automatic updates in iTunes are not listed for that account unles

  • How to use standard workflows in my company?

    Hi Experts, I want to know how do i use standard workflows for my company. I have searched forum, but coudn't find proper answer. I have seen some standard workflow numbers(eg.WS12300111). But when i search for them it wont works. It will pop up "Cho

  • The path '....' cannot be found (cont.)

    The path '...' cannot be found. Verify that you have access to this location and try again, or try to find the installation package 'iTunes.msi' in a folder from which you can install the product iTunes. What in the WORLD does that mean?

  • Default port of Oracle 9i Database --- Oracle database installation

    Hi, I am new to oracle..searched across internet to know this particular detail of Oracle 9i database installation. My query being..Can Oracle database be installed in a way to use port's other than 1521. When do we go for making use of a port other

  • Total Hours Computer Has Been On

    I would like to know the total hours my computer has been on. I know there are commands to give uptime since power on but I remember a tool or utility that could report the cumulative hours the computer has been on (this was back in MacPlus days). An