Triggering a report after the completion of processing the session

Hi Friends,
I want to know how to trigger an report after the completion of processing the session.
Thanks,
Raj

Hi
        SELECTION-SCREEN                               *
PARAMETERS: p_name     LIKE apqi-groupid,
            p_datum    LIKE apqi-credate,
            p_time     LIKE apqi-cretime,
            p_event    LIKE tbtco-eventid.
             DATA                                     *
DATA: fl_job_ok TYPE c,
      fl_event TYPE c,
      cont_sysubrc_6 TYPE i.
DATA: start_time LIKE sy-uzeit,
      start_date LIKE sy-datum,
      time       LIKE sy-uzeit,
      delta_time TYPE i.
DATA: apqitab LIKE STANDARD TABLE OF apqi WITH HEADER LINE.
DATA:
  btc_running       LIKE tbtco-status VALUE 'R',
  btc_ready         LIKE tbtco-status VALUE 'Y',
  btc_scheduled     LIKE tbtco-status VALUE 'P',
  btc_released      LIKE tbtco-status VALUE 'S',
  btc_aborted       LIKE tbtco-status VALUE 'A',
  btc_finished      LIKE tbtco-status VALUE 'F',
  btc_put_active    LIKE tbtco-status VALUE 'Z',
  btc_unknown_state LIKE tbtco-status VALUE 'X'.
                     START-OF-SELECTION                              *
START-OF-SELECTION.
  DATA: a VALUE '1', b.
Controllo esistenza job:
  start_time = sy-uzeit.
  start_date = sy-datum.
  DO.
    apqitab-creator = sy-uname.
    CALL FUNCTION 'BDC_OBJECT_SELECT'
      EXPORTING
        name                   =  p_name
        datatype               = 'BDC'
    CLIENT                 = SY-MANDT
        date_from              = p_datum
    DATE_TO                =
        time_from              = p_time
    TIME_TO                =
       QSTATE                 = 'F'
        session_creator        = apqitab-creator
      TABLES
        apqitab                = apqitab
      EXCEPTIONS
        invalid_datatype       = 1
        OTHERS                 = 2.
    IF sy-subrc <> 0.
      fl_job_ok = space.
    ELSE.
      LOOP AT apqitab.
        CASE apqitab-qstate.
          WHEN 'F'.          fl_job_ok = 'X'. EXIT.
          WHEN 'E'.          fl_job_ok = 'E'. EXIT.
          WHEN OTHERS.       fl_job_ok = space.
        ENDCASE.
      ENDLOOP.
      IF fl_job_ok = 'X' OR fl_job_ok = 'E'.
        EXIT.
      ENDIF.
    ENDIF.
    IF start_date <> sy-datum.
      start_time = sy-uzeit.
    ENDIF.
    time = sy-uzeit.
    delta_time = time - start_time.
    IF delta_time > 1800.
      EXIT.
    ENDIF.
    REFRESH apqitab.
  ENDDO.
  IF fl_job_ok = 'X'. " Trovato JOB
    fl_event = 'X'.
    IF fl_event = 'X'.
Attiva evento
      CALL FUNCTION 'BP_EVENT_RAISE'
        EXPORTING
          eventid                = p_event
        EXCEPTIONS
          bad_eventid            = 1
          eventid_does_not_exist = 2
          eventid_missing        = 3
          raise_failed           = 4
          OTHERS                 = 5.
      IF sy-subrc <> 0.
        MESSAGE e999(zfagm) WITH p_event 'is not actived'(002).
      ELSE.
        MESSAGE i999(zfagm) WITH p_event 'is successfully actived'(002).
      ENDIF.
    ELSE.
      MESSAGE e999(zfagm) WITH p_event 'is not actived'(002).
    ENDIF.
  ELSE.
    IF fl_job_ok = space.
      MESSAGE e999(zfagm) WITH p_event 'is successfully actived'(002).
    ELSE.
      MESSAGE e999(zfagm) WITH p_event 'is successfully actived'(002).
    ENDIF.
  ENDIF.
Max

Similar Messages

  • Please tell the complete WM Process steps

    Hi,
    Please tell me the complete WM Process/steps.  In my new assignment I have been to ask to look after WM also.  Can anybody please help me with steps involved in WM, that is like after GR/ Inbound delivery is done, what is procedure for putaway, picking & also for transfer posting.
    Thanks in Advance.
    Sharan

    Hello Sharan,
    Check the very first post in this forum by Mohammad Arif Mansuri , he has a boat load of links and your questions are addressed in the WM/IM links.
    Also I must say my experience is every place has a different place of doing things, so you will have to go through whats knows as training on the job it seems.
    Its a part of IT and especially SAP , given its so vast.
    So work hard and ask questions and you'll be there. Don't be shy of saying I do not know how this works here. Ask the business folks how they do things.
    Hopefully this was helpful.
    Regards

  • TS1372 I was just about to about to update my iPod nano 7 from 1.0.2 to 1.0.3 . And after the complete download of the software,it says "The firmware file could not be found"   A little help anyone!!!

    I was just about to about to update my iPod nano 7 from 1.0.2 to 1.0.3 . And after the complete download of the software,it says "The firmware file could not be found"   A little help anyone!!!

    Welcome to Apple Discussions!
    Take a look at these two articles. The error messages are not the same, but they may help...
    http://docs.info.apple.com/article.html?artnum=304309
    http://docs.info.apple.com/article.html?artnum=301267
    If not, post back.
    btabz

  • TS3694 uploading iOS 7 to iphone 5 and after it downloaded, it was at the end of processing the file when i received  and error (3004) .  what do i do

    was at the end of processing the file when i received  and error (3004) .  what do i do

    http://lmgtfy.com/?q=iPhone+error+code+3004

  • I'm downloading a movie to each of my kids new ipads.  it says that it's downloading, but the completion % has shown the same % since it began 2 hours ago.  is this normal? one shows 94%, the other 24%.  how do I know if it's progressing?

    I'm downloading a movie to each of my kids new ipads.  it says that it's downloading, but the completion % has shown the same % since it began 2 hours ago.  is this normal? one shows 94%, the other 24%.  how do I know if it's progressing?

    You are on Windows 2000, you do not have a "Firefox" button, and should consider yourself to be fortunate in that you still have menus and don't have to do anything to get the menus back instead of the "Firefox" button. (The same applies to Windows XP users).
    Use the "File" menu to get to Import. You are not on Windows 7 or Vista, and don't have to put up with the nonsense added for Aero.
    If you want the "Firefox" button you can get it with View -> toolbars -> (uncheck) Menu Bar. The menu bar and the "Firefox" button were supposed to be mutually exclusive (which is impossible in some cases without being incompatible).
    Once you are using the "Firefox" button ...
    Use the "Alt" key to view the menu bar (temporarily) containing File, Edit, View, History, Bookmarks, Tools, and Help. On Windows 7 and Vista, the menu bar was hidden by default in Firefox 4 and above. These menu items are more or less available under the "Firefox" button which has the most used of the built-in Firefox menu items available in a different format.
    To get back to having menus again. "Firefox" button -> Options (second column) -> (check) Menu Bar
    You can make '''Firefox 7.0.1''' look like Firefox 3.6.*, see numbered '''items 1-10''' in the following topic [http://dmcritchie.mvps.org/firefox/firefox-problems.htm#fx4interface Fix Firefox 4.0 toolbar user interface, problems (Make Firefox 4.0 thru 8.0, look like 3.6)]. ''Whether or not you make changes, you should be aware of what has changed and what you have to do to use changed or missing features.''
    * http://dmcritchie.mvps.org/firefox/firefox-problems.htm#fx4interface

  • I had trouble with a iTunes download.  Two songs of an album were not complete.  I contacted iTunes and yawl post the the download again.  My iTunes now has the complete copies.  The trouble is my iPhone will not accept/sync the complete copies.  What up?

    I had trouble with a iTunes download.  Two songs of an album were not complete.  I contacted iTunes and they redownloaded the tunes.  My iTunes now has the complete copies.  The trouble is my iPhone will not accept/sync the complete copies.  It will only play the original incomplete copies of these songs.  I've made new playlists and made sure I had the correct items checked to backup/sync.  Still only the incomplete copies are played via the iPhone.  What's up?  What can I do to get to the iPhone to sync the correct version?

    - Are you saying that they are not listed in your Purchased section?
    Downloading past purchases from the App Store, iBookstore, and iTunes Store
    - Are they listed in your Puchases history when you log into your account on your computer?
    - Are they still available now for purchase? If not then you are out of luck
    If they are still available and listed in your Puchase History then contact iTunes
    http://www.apple.com/support/itunes/

  • How to see the complete code behind the tile?

    Hi All,
    I am working on MSA 4.0. I am able to see the code by double clicking on the methods in the tile but unable to view the complete code behind the tile. I want to see the complete code behind the tile. Can anyone help me with this?
    Best regards
    Vasudha

    Hi Boyai,
    Thanks for the reply. I am able to open the code. Two VBA windows for UI and BOL source code are opened.
    1) I compiled the code.
    2) I selected a particular tile. The methods , event handlers are displayed there.On double clicking one of the method i am able to view a particular code.
    But i want to view the complete code behind that tile like in MSA 5.0 when we right click on the tile-> view code.
    How can i view the complete code behind the tile in MSA 4.0?
    Best Regards
    Vasudha.

  • Phone hog links give me error message "an error occuredon the server when processing the URL

    When ever I click on the links sent from phone hog.com to earn free minutes I get the following error message. "An error occurred on the server when processing the URL. Please contact the system administrator" I have made several contacts with phone hog help and they claim it is my settings on my computer. However I contacted my internet provider TDS telecom and they indicated that this is a phone hog issue. I do not have any other problems with any other links I click on with this type of error message.

    Hello msFit,
    it's well known, that in all these cases you describe I'm not a friend of a detailed troubleshooting. To be able to be independent in all this things It is one of the reasons why I prefer an external FTP program. The difficulties with which you have to fight encourage me in this opinion, not least because we always search for experts, we don't charge a "jack of all trades".
    To manage several websites or to upload my files and sometimes for the opposite way, for a necessary download from my server or to use a "a site-wide synch", I'm using FileZilla. It simply looks easier for me to keep track of all operations precisely and generate or reflect easily the desired tree structure.
    Above all, FileZilla has a feature (translation from my German FileZilla) called "compare file list". Here it's possible to use file size or modification time as a criterion. There is also the possibility to "hide identical files", so that only these files which you want to redact remain visible.
    And even if it means you have to install a new program, I am convinced that there is an advantage. Here is the link to get it and where you can read informations about how it works:
    http://filezilla-project.org/ and http://wiki.filezilla-project.org/Tutorial#Using_the_site_manager
    Mac: Mac OS X (Use: Show additional download options)
    http://filezilla-project.org/download.php
    Of course, you also need all the access data to reach your server and for MIME issues, you should contact your web host/provider.
    Good luck!
    Hans-Günter
    P.S.
    Since I use two screens, the whole thing became even more comfortable.

  • HT1918 When I try to purchase a apps, system require me to verify my credit card account.  I've provided all the complete information of the credit card but system always ask me to contact iTunes support to finish this transition, why ?

    When I try to purchase a apps, system require me to verify my credit card account.  I've provided all the complete information of the credit card but system always ask me to contact iTunes support to finish this transition, why ?

    Answered in your Other post on this Topic...
    https://discussions.apple.com/message/24053626#24053626

  • My itunes won't show the complete page for the license agreement page

    i just got a new ipod nano and like my itunes won't show the complete page for the license agreement page. I can see like two thirds of the page but can't see the rest so i can't agree to the license agreement. Advice please

    You need to set your screen resolution to 1024x768 on this screen
    Start > Control Panel > Display > Settings tab

  • If i want to gift a friend an album but he already has some of the songs, will itunes charge me for the complete album, or the 'complete my album' price?

    I'd like to gift a friend an album, but he already has most of the tracks. So I was wondering if itunes would charge me for the complete price of the album or the 'complete my album' price.

    You will be charged for the entire album. The Gifting feature is not recipient-specific, so it would have no way to know that a particular recipient you might be sending to would already have the album. Why not just gift the songs you know your friend doesn't have?
    Cheers,
    GB

  • Captivate not resuming after quiz complete just getting the loading screen

    Hi Everyone.
    I am using captivate 5 and have created a 60 slide project. The project contains 8 quiz questions and is published as scorm 1.2. The project is delivered using moodle 2.02. The problem is this. When the project is first launched it loads and plays correctly. If the student exits before the quiz is complete and then comes back to it later the project resumes correctly, The problem occurs where the student exits the project after the quiz is complete. If after this point the student tries to re-launch the project later, the project launches but gets stuck at the gray loading screen. I have installed the latest hotfixes and the problem seems to occur on all browsers.
    Any ideas would be gratefully appreciated.
    regards
    J

    OK.  I've not struck this issue before with Moodle, but that may be due to using earlier versions of Moodle.
    Here are a couple of things to try:
    Try setting more grading attempts in Moodle and not make any changes to the Captivate lesson itself.  If this now allows the user to open the module again, you know where the issue is.
    If changing the attempts in Moodle has no effect, try changing the Required settings in the Captivate module Quiz > Settings.  Set it so that the user can skip the quiz if they want.  That's the least restrictive setting.  If that now allows the user to progress again, this setting may be your issue.

  • What is the relationship between Process and Session parameter in Oracle

    Hi All
    I ran into a problem
    "ORA-00020: maximum number of processes (150) exceeded " on the other day and I want to fix this temporary by increase the process by some number like 200.
    Someone suggesting the syntax to fix my problem then the database must restart after running this command.
    alter system set processes=200 scope=spfile;
    However, I check the v$Paramenter view I see 2 values I believe they go together are
    Processes: 150
    Sessions:170.
    Here are my questions:
    1. "alter system set processes=200 scope=spfile;" is the correct way to increase the max Processes?
    2. Do I have change the number of Sessions after changing the number of Processes?
    3. Is there other way to increase the processes number without reboot the Oracle database?
    Regards,
    Jdang

    According to the Oracle version# Reference manual which documents the database parameters sessions is set to 1.1 * process + 5 using the 10gR2 version.
    Basically an Oracle process cooresponds to an OS process that performs the actual work for the session.
    An Oracle session is a collection of memory structure entries that identifies and keeps track of what is being done for a client of the Oracle database.
    Sometimes a single background process will support multiple sessions even in dedicated server mode such as when recursive SQL is performed to support the DML statement being done in the session.
    PS - you should consider increasing processes first and only increase sessions if you still have an issue.
    HTH -- Mark D Powell --
    Message was edited by: mdp add PS
    mpowel01

  • How to know in an IDOC you are at the end of processing the EDIDD table?

    I am fairly new to processing IDOCS.
    I am working with the user exit EXIT_SAPLVEDF_002.  This is in the IDOC FM IDCO_OUTPU_INVOIC.  I am working with SAP AFS (the IDOC is /AFS/INVOIC02 but is the same as IDOC INVOIC02 with added logic for AFS).
    I know the FM processes one segment at a time and builds the EDIDD table and then passes it to the user exit after it adds each segment to the table.
    There isn't any other user exit that executes near the end of the processing - none that I could find.
    I am looking to do something that is similar to someone doing a SAVE in DYNPRO and using a user exit to do any final processing before the document is saved.
    Is there some segment name that is the key so that I know I am at the end of processing?
    Is there some status in the IDOC control record that would be set so I would know when it hits this that I can now review the entire EDIDD table?
    Points awarded for any help!
    Thanks.
    Scott

    I found the segment to search for - it's the summary segment 'ED1EDS01'.  It is passed after the detail processing has been added into the EDIDD table.

  • Is the Arch install process the same as Mint's?

    1.)Taking into consideation that it took me a few trys to even register for the forum (facepalms) and that I have only ever been a Mint user, how does the Arch install process compare to that of Mints?
    2.)Will the install for a duel boot with Windows 7 be just as easy with Arch as it is with Mint?
    3.)Are my questions an indication that I am probably not ready for Arch? (laughs)
    4.)I really only use the Linux half of my duel boot when I am on unsecure networks while travleing and it makes me feel safer etc.. and when I do use it it's really just for browsing the internet. Should I just stick with Mint if thats all I really do?
    I have heard only good things about Arch and if it's not going to make me want to rip out my hair, I would certinly like to reaplce Mint with Arch. Thank you for your time and help.

    I came from Mint to Arch, via Debian and LFS. With regards to Grub, I'm still using the same grub installed by Mint two years ago, even though I no longer have Mint on the system. However, I do use a separate /boot partition and I'm comfortable editing grub.cfg directly when required. It does, however, mean that I never have to worry about adding a new OS for dual boot. Having said that, it's certainly not something I would suggest to anyone with limited experience.
    Don't let others put you off with the "Arch is high maintenance" thing. If I'm honest, I don't find Arch significantly more high maintenance than any other Linux distro, though certainly during install and initial set up it helps if you have a reasonably good understanding of how the system is configured. Whereas the likes of Mint and other pre-built general distros have most of the system configuration done for you out of the box, on Arch you have to walk the extra mile and do it yourself. Linux is like women. The more you have to do to get them, the more you will get out of them in the end
    Nevertheless, I fully agree with the "Test in a VM and get comfortable" philosophy first. This will help when you eventually come to a full install significantly. I did two test installs before a complete one, noting down where I had to pay particular attention. Also make sure that you don't need any firmware files, especially for network, when installing for real, or at least get the files and put them on a USB stick. Nothing worse than installing a system them not having any network to get the firmware required to get the network working. Catch 22 anyone?
    Last edited by Roken (2012-04-23 10:46:23)

Maybe you are looking for

  • XMLType setNull(nnn, Types.NULL) doesn't work in a ps.batchUpdate()

    All, A little background: Java version 1.5.0.08 on Solaris 10 with Oracle 10g R2. The XMLDB is using the Object Relational setup with a large XSD being shredded, the schema in question has three XMLType columns two of which are nullable, but all refe

  • NetworkManager dispatcher script doesn't work

    Hey there, i have created a script in networkmanagers dispatcher.d directory to automount my NAS once my home wifi is connected and unmount it once the connection is lost. The dispatcher service is running and all permissions and the execution bit ar

  • HT4367 Apple TV 2nd gen factory restore (blinking lights when plugged into TV)

    I have a 2nd gen apple TV, and when doing the above steps my unit does not show up in iTunes... I get rapid blinking lights when plugged into tv, and when plugged into itunes as per the steps here, itunes showing nothing.

  • Oracle Installer crashes in Windows XP attempting to install 10g database

    I downloaded the file "10201_database_win32.zip" from oracle, and attempted to install it on a Windows XP Professional 2002 with SP2. It crashes immediately, giving me no information at all. It starts with messages: No pre-requisite checks found in o

  • Classpath sourcepath question

    Getting this error when trying to complete tutorial "creating JSP from business components". os-2000 db 9.2.0.1 jdev 9.0.3 Error: cannot access directory oracle\jsp\runtime; verify that directory is reachable from classpath and/or sourcepath reboot d