Scheduling a Report from outside Scheduler but viewing the output in Plus

We are using Discoverer 10.1.2
I know that we can schedule a report within Discoverer Plus and the resulting out put can be seen in Discoverer under scheduled work books
I am also aware that we put Discoverer command line commands in a DOS script and then schedule that script to run using an Enterprise scheduler and automatically export that report Excel.
What I want is to schedule reports using our enterprise scheduler but view the resulting output in Discoverer under scheulded work books
I was thinking that when we schedule a report Discoverer creates a package, something like EUL5_BATCH_PACKAGE080314170249.RUN;.
Once that package is created, if I copy it and rename it and then schedule to run from our enterprise scheduler, would I be able to view the output from Discoverer ?
----- Added on 03/15/2008-------
I did try running the above package EUL5_BATCH_PACKAGE080314170249.RUN from SQL Plus as I had indicated above. The settings on the report schedule were -
- Run immediately
- Never repeate
- Delete the results after 9999 days ( maximum allowed )
Now the first time the report ran automatically using DBMS_JOBS since I had set the report to run immediately.
After that when I tried running EUL5_BATCH_PACKAGE080314170249.RUN from SQL Plus, the procedure completed but when I looked at the Discoverer front end, it indicated the run was in error with Unique constraint violation on EUL5_BQ_TABLES.EUL5_BQT_UK_1 index. However when I looked at the table it did not have any data in it.
I the ran the procedure again from SQL Plus and this time it completed and when I looked at the Discoverer Plus front end, the results were ready for me to view.
When I tried running the procedure again, it failed again with unique constraint violation and when the procedure was executed after that it again ran and i was able to view the results.
So, ever alternate run from SQL Plus was successful. I would continue to try out different combinations of schedule parameters to see if I can get it to work.
However, any one has already tried this before please let me know if what I am trying Is this possible ?
Any help would be appreciated
Thank you
Message was edited by:
manav_purohit
Message was edited by:
manav_purohit

Thanks for the suggestion Rod. However, if I use DBMS_JOB.CHANGE, the report will still run using DBMS_JOB. What I would prefer is to not use DBMS_JOB.
Running anything in DBMS_JOB means, the job is not visible in the enterprise scheduler that we use. Our enterprise scheduler is being monitored at a data center and if any jobs fail, appropriate on call individuals are contacted. Records are kept of failures and root cause is analyzed. So I want to take advantage of these procedures for scheduled reports as well.
I am still looking for some alternative method.

Similar Messages

  • Removing podcast episodes from iTunes 12 but keeping the files

    I want to be able to remove a podcast episode from iTunes 12 but keep the audio file on my computer. This used to be an option, but now I am no longer asked if I want to keep the file. It's just automatically moved to the Trash. I like to archive podcast episodes on my external drive, but I don't always feel like getting the drive out when I'm done listening, plugging it in and dragging and dropping the files. I'm lazy like that. I would keep the episodes I plan to archive on iTunes until I feel like breaking out the drive, except that brings me to my second issue: my podcasts seem to all be set to automatically delete played episodes after 24 hours, at least depending on what view I'm in. I have "Delete Played Episodes" set to "Off" in my default podcast settings, and when I context click a podcast in the "My Podcasts" view and select "Podcast Settings" it says "Delete Played Episodes" is "Off". However when I go to the Playlists view, select an episode and click the "Settings..." button at the bottom, it always says the selected podcast has "Delete Played Episodes" set to "On", even if I click to change it to "Off" in that view. So there's obviously a contradiction there. I don't want to take the chance that my played episodes will be automatically deleted so the sooner I get them off iTunes the better. Unfortunately that means deleting them, then dragging them from Trash back to the iTunes Media/Podcasts folder and into each appropriate podcast folder, which is annoying. Please tell me that the removal of the "Keep the file" option is just a bug. If Apple is, for whatever reason, trying to discourage me from moving my played episodes out of iTunes and onto another drive, then I'm just going to stop using iTunes altogether.

    The iTunes Store reads your feed at intervals and caches the contents (the information, not the actual media files): when you make a change to the feed it usually takes 1-2 days for this to be reflected in the Store. Pinging doesn't seem to make a lot of difference. Very occasionally it all slows down and can take several days.

  • Don't have money for new tech or headphones. I want to watch a movie from my laptop via AirPlay (watch a movie straight from Apple TV), but hear the sound on my headphones attached to my MB Air.  Is there any way to do this??

    I don't have money for new tech or headphones. I want to watch a movie from my laptop via AirPlay (watch a movie straight from Apple TV), but hear the sound on my headphones attached to my MB Air.
    Is there any way to do this??
    http://superuser.com/questions/853821/watch-a-movie-straight-from-apple-tv-but-h ear-the-sound-on-my-headphones-on-my

    Thanks for your help.  Since I'm uninterested in loading all my photos (the only option) into photostream, I won't be able to use the settings in ATV.  I guess I'm just stuck with using iPhoto on my MB Air.  Thanks again.
    paul

  • I imported all my favorites from Internet Explorer, but in the Firefox window I don't see a favorites tab. I've got a bunch of favorites that I don't want to have to redo. Any advice?

    Question
    I imported all my favorites from Internet Explorer, but in the Firefox window I don't see a favorites tab. I've got a bunch of favorites that I don't want to have to redo. Any advice?

    You can usually find the imported IE Favorites in a folder ("From Internet Explorer") at the bottom of the Bookmarks Menu folder (Bookmarks > Show All Bookmarks).
    If you have problems with importing the IE Favorites in Firefox then export the Favorites in IE to an HTML file and import that file in the Firefox Bookmarks Manager.<br />
    That way you also preserve any sorting that you may have done in IE with the Favorites.
    * Export the favorites in IE to an HTML file (bookmarks.html): File > Import and Export
    * Import the HTML file in Firefox: Bookmarks > Show All Bookmarks > Import & Backup > Import HTML: From File
    See also:
    * http://kb.mozillazine.org/Import_bookmarks ("Import from another browser" and "Import from file")

  • How do you delete albums from an I-phone 4,only able to delete from camera roll,but not the other albums

    How do you delete albums from an I-phone 4,only able to delete from camera roll,but not the other albums

    How did the photos get onto the phone ? Only photos taken with the phone or saved from emails/websites etc can be deleted directly on the device. Photos that were synced from your computer are deleted by moving/removing/de-selecting them from where they were synced from on your computer and then re-syncing.

  • After an erroneous contacts delete on the mac, they've been removed from icloud and all the synced devices. I was able to restore the contacts from a backup, but since the iCloud version is newer than the backuped one, they are deleted every iCloud sync

    After an erroneous contacts delete on the mac, they've been removed from iCloud and all the synced devices.
    I was able to restore the contacts from a backup, but since the iCloud version is newer than the backuped one, they are deleted every iCloud sync.
    Now I have an iPhone with the contacts and iCloud deactivated, but I lost all the contacts on the Mac and the iPad.
    There is a way to tell iCloud "restart using the contacts I have on this device"?

    An iCloud backup will save the state of your Camera Roll at the time of the backup but, if you delete photos from the Camera Roll, they will not be in the next backup taken.
    If you are using the iCloud Photo Library (beta) read this FAQ which will tell you what happens when you delete photos from one of the devices sharing the Photo Library.
    iCloud Photo Library beta FAQ - Apple Support
    The relevant section is:
    How does iCloud delete photos and videos from iCloud Photo Library?
    Deleting a photo or video from your Photos app will also remove the item from iCloud Photo Library and from your iCloud storage allocation. Photos and videos you remove can be recovered from the Recently Deleted album for 30 days. After 30 days, your content will be removed from the Recently Deleted album. Photos are backed up on our servers for up to 30 days after they're deleted from the Photos app. If you need to recover these photos during that time, contact Apple Support.

  • I have different music files all over three computers. Everytime I connect my iPod to one of these computers it transfer the music files from that computer but delete the music files that I already have in my iPod. I want all my music in my iPod.

    I have different music files in three computers.
    Everytime I connect my iPod into one of these computers it transfer the music files from that computer but delete the music files that I already have in my iPod.
    I want all my music in my iPod.
    What I need to do?
    Thanks!

    I haven't researched it and I don't claim to know everything about iTunes, but it has always been my understanding that you can only use one computer per iPod, but you can have multiple iPods per computer. From what I understand, this is to prevent illegal sharing and whatnot.

  • HT4858 with photo stream on and importing pictures from your camera into your Ipad - after 30 days the pictures will be removed from photo stream, but will the pictures still be in your Ipad ? andy

    with photo stream on and importing pictures from your camera into your Ipad - after 30 days the pictures will be removed from photo stream, but will the pictures still be in your Ipad ? andy

    To my knowledge, pictures in photo stream stay there untill there is more than 1000 of them, then after that the oldest ones are removed from photo stream.  If your photos have synced to your devices via photo stream or manual syncing they will be there until you elect to delete them.

  • How do you extend the frame from one side but not the whole thing?

    I am updating my blog and want to put a rectangle picture into the pre-set frame. I need to stretch it horizontally but the entire frame (i.e., both sides and top/bottom) stretched instead. How do you extend the frame from one side but not the whole thing?

    In Inspector, select the Graphic Inspector. Choose, from the Fill options, Image Fill. Select the image from the dropdown and click Open. Now go back to Inspector and click on Scale to Fit. Choose from the options in the window. There are a number of them which should address your problem:
    With the Blog template, you will probably need to insert a text box over the stock placement frame and work with that instead.
    Mark

  • Why report section is appearing twice in the output of report designer

    Hi Gurus,
    I have created a report in the report designer and my report contains 5 sections.
    each report section is one query view.
    i inserted all the query views and done some formatting .
    but when i executed the report , one of the report section is appearing twice in the output.
    ex: i need the output like this
    section1
    section2
    section3
    section4
    section5
    But the output i am getting is as follows.
    section1
    section2
    section3
    section3
    section4
    section5
    report designer experts can please let me know why this problem is coming and also please provide possible solution for this.
    Thanks in advance.
    Raj.

    Hi Gurus,
    I have created a report in the report designer and my report contains 5 sections.
    each report section is one query view.
    i inserted all the query views and done some formatting .
    but when i executed the report , one of the report section is appearing twice in the output.
    ex: i need the output like this
    section1
    section2
    section3
    section4
    section5
    But the output i am getting is as follows.
    section1
    section2
    section3
    section3
    section4
    section5
    report designer experts can please let me know why this problem is coming and also please provide possible solution for this.
    Thanks in advance.
    Raj.

  • How to view the output submitted by other user

    Product : EBS R12.0.4
    Plateform : RHEL AS 4.6
    I want to view the output submitted by other users. I have tested it for responsiblity level in which sysadmin can view the other users request but it is labour work. Can anyone suggest to view it with less work.
    Regards,

    Hi,
    you need to understand the new RBAC concept and the involved objects. Just to mention that Grants are here specific EBS-RBAC objects you have to deal with. You need to be sysadmin and functional Administrator to define and assign those objects. I know that the metalink note is short and could be longer, but all steps are right.
    If you ask mainly what you are doing by utilizing this notes, you are defining additional where clauses, internally added to the basic object (here concurrent requests) and additionally you are granting rights to get buttons enabled (log / out).
    If you need something else, just let me know.
    Regards
    Volker

  • How to view the output maintained at handling unit level

    Hi All,
    How to view the output which was maintained at Handling unit level in the delivery.
    Say for ex:- If we maintain the out put type LD00 at delivery level, we can view the output for the same in the change mode of outbound delivery.
    In the same way how can e view the output which was maintained at handling unit level.
    Regards,
    Mallesh.

    Hi,
    Go to 'VL02N' transaction code give the Delivery number and from menu Outbound delivery select issue output to. then select the proper output type (already issued) and select the print preview button.
    It is just as you see for other output's only.
    Reward if it helps.
    Thanks
    Venkat Cheedalla.

  • Unable to view the output of a concurrent program

    Dear Members,
    I am using Oracle R12.1.3 Vision Instance.
    I have run the Create Accounting program. When I click on the view output button, the browser gets displayed and also gets closed immediately. I am unable to view the output.
    Can any one please help me in resolving this issue?
    Many thanks in advance.
    Regards.

    Dear Members,
    I am facing the above problem in IE.
    When I tried in Mozilla, I can view the outputs without any issues.
    Can any one suggest me why I am not able to view the output in the IE?
    Regards.

  • What are the steps  to view the output for check printing

    what are the steps  ,the method to view the output for check printing

    Hi,
    You can ask your functional person to make a payment to a vendor which will then issue a check. You can use the same payment run in program RFFOUS_C and create new checks by voiding the previous check number with a void reason code.
    You can do this as many times as you want and test your check output.
    Regards
    Shounak

  • Z reports from MM point of view

    hi sap guru's
                     i just want verious  z reports which basically client required and which is not available in SAP MM plz send me reports
    and how we can see the effect of  z reports ( mean s which T code use to see )
    regards

    Hi
    Take a look at this
    This is a report for pending purchase requisition
    This involves abap coding
    REPORT  zmmr_pending_prs  NO STANDARD PAGE HEADING LINE-COUNT
    65 LINE-SIZE 255.
    Structure declaration
    TYPE-POOLS : slis.
    TABLES : eban , ekbe ,ekko ,ekpo, lfa1,makt,mara,marc.
    Work Variables and internal tables
    **--Internal Table for Purchase Requisition -EBAN
    DATA: BEGIN OF i_eban OCCURS 0 ,
          banfn LIKE eban-banfn,
          bnfpo LIKE eban-bnfpo,
          bsart LIKE eban-bsart,
          ekgrp LIKE eban-ekgrp,
          afnam LIKE eban-afnam,
          txz01 LIKE eban-txz01,
          matnr LIKE eban-matnr,
          werks LIKE eban-werks,
          menge LIKE eban-menge,
          badat LIKE eban-badat,
          lfdat LIKE eban-lfdat,
          ebeln LIKE eban-ebeln,
          ebelp LIKE eban-ebelp,
          bedat LIKE eban-bedat,
          bsmng LIKE eban-bsmng,
          END OF i_eban .
    **-- Internal Table for Purchasing Document Item - EKPO
    DATA : BEGIN OF i_ekpo OCCURS 0,
           ebeln LIKE ekpo-ebeln,
           ebelp LIKE ekpo-ebelp,
           matnr LIKE ekpo-matnr,
           werks LIKE ekpo-werks,
           banfn LIKE ekpo-banfn,
           bnfpo LIKE ekpo-bnfpo,
           END OF i_ekpo .
    **--Internal Table for n  History per Purchasing Docum - EKBE
    DATA: BEGIN OF i_ekbe OCCURS 0 ,
          ebeln LIKE ekbe-ebeln,
          ebelp LIKE ekbe-ebelp,
          belnr LIKE ekbe-belnr,
          bwart LIKE ekbe-bwart,
          budat LIKE ekbe-budat,
          menge LIKE ekbe-menge,
          matnr LIKE ekbe-matnr,
          werks LIKE ekbe-werks,
          END OF i_ekbe .
    *--  final Intenral Table for displaying output.
    DATA: BEGIN OF it_output OCCURS 0 ,
          bsart LIKE eban-bsart,
          badat LIKE eban-badat,
          matnr LIKE eban-matnr,
          werks LIKE eban-werks,
          txz01 LIKE eban-txz01,
          menge LIKE eban-menge,
          banfn LIKE eban-banfn,
          bnfpo LIKE eban-bnfpo,
          ekgrp LIKE eban-ekgrp,
          afnam LIKE eban-afnam,
          lfdat LIKE eban-lfdat,
          ebeln LIKE eban-ebeln,
          ebelp LIKE eban-ebelp,
          bedat LIKE eban-bedat,
          belnr LIKE ekbe-belnr,
          menge1 LIKE ekbe-menge,
          budat LIKE ekbe-budat,
          bwart LIKE ekbe-bwart,
          lifnr LIKE ekko-lifnr,
          END OF it_output .
    ***---- Data Declaration For ALV.
    DATA: fieldcatalog TYPE slis_t_fieldcat_alv WITH HEADER LINE,
          gd_tab_group TYPE slis_t_sp_group_alv,
          gd_layout    TYPE slis_layout_alv,
          gd_repid     LIKE sy-repid,
          gt_events     TYPE slis_t_event,
          gd_prntparams TYPE slis_print_alv.
    **-- Input Screen
    SELECTION-SCREEN BEGIN OF BLOCK blk WITH FRAME TITLE text-001.
    SELECT-OPTIONS : s_matnr FOR eban-matnr ,
                     s_badat FOR eban-badat,
                     s_werks FOR eban-werks.
    PARAMETERS :     p_afnam LIKE eban-afnam .
    SELECT-OPTIONS : s_ekgrp FOR eban-ekgrp,
                     s_banfn FOR eban-banfn .
    SELECTION-SCREEN END OF BLOCK blk .
    *AT SELECTION-SCREEN ON p_werks.
    PERFORM check_plant.             " Validation for plant.
    START-OF-SELECTION.
    perform top-of-page .
    **-- Validate input fields.
    PERFORM validate_input.
    **-- Get Data for P.R.and History  per Purchasing Document
      PERFORM get_data.
    **-- Process Data
      PERFORM process_data .
      PERFORM build_fieldcatalog .
      PERFORM display_data .
    *&      Form  get_data
          text
    -->  p1        text
    <--  p2        text
    FORM get_data .
    ***---- Get All the data for Purchase Requisition From EBAN
    SELECT banfn bnfpo bsart ekgrp afnam txz01 matnr werks menge badat lfdat
      ebeln ebelp bedat bsmng INTO TABLE i_eban FROM eban CLIENT SPECIFIED
      WHERE mandt = sy-mandt
      AND banfn IN s_banfn
      AND ekgrp IN s_ekgrp
    AND afnam = p_afnam
      AND matnr IN s_matnr
      AND werks IN s_werks
      AND badat IN s_badat.       " Index EBAN~1 used
      SORT i_eban BY banfn .
    DELETE i_eban WHERE banfn NOT IN s_banfn .
      IF NOT i_eban[] IS INITIAL .
        SELECT ebeln ebelp  matnr werks banfn bnfpo INTO TABLE i_ekpo
        FROM ekpo CLIENT SPECIFIED
        FOR ALL ENTRIES IN i_eban
        WHERE mandt = sy-mandt
         AND matnr = i_eban-matnr
         AND werks = i_eban-werks
         AND banfn = i_eban-banfn
         AND bnfpo = i_eban-bnfpo.
      ENDIF .
    ***---- Get All the data for History per Purchasing Document from EKBE
      IF NOT i_ekpo[] IS INITIAL .
        SELECT ebeln ebelp belnr bwart budat menge matnr werks
        INTO TABLE i_ekbe
        FROM ekbe CLIENT SPECIFIED
        FOR ALL ENTRIES IN i_ekpo
        WHERE mandt = sy-mandt
        AND ebeln = i_ekpo-ebeln
        AND ebelp = i_ekpo-ebelp
        AND bwart = '105'
        AND matnr = i_ekpo-matnr
        AND werks = i_ekpo-werks. " ebeln ebelp primary keys
      ENDIF.
    ENDFORM.                    " get_data
    *&      Form  build_fieldcatalog
          text
    -->  p1        text
    <--  p2        text
    FORM build_fieldcatalog .
      DATA position TYPE i.
      position = -1.
      position = position + 1.
      CLEAR  fieldcatalog.
      fieldcatalog-fieldname   = 'BSART'.
      fieldcatalog-seltext_m   = 'PR Type'.
      fieldcatalog-col_pos     = position.
      fieldcatalog-outputlen   = 4.
      APPEND fieldcatalog TO fieldcatalog.
      CLEAR  fieldcatalog.
      position = position + 1.
      fieldcatalog-fieldname   = 'BADAT'.
      fieldcatalog-seltext_m   = 'PR Date'.
      fieldcatalog-col_pos     = position.
      fieldcatalog-outputlen   = 10.
      APPEND fieldcatalog TO fieldcatalog.
      CLEAR  fieldcatalog.
      position = position + 1.
      fieldcatalog-fieldname   = 'MATNR'.
      fieldcatalog-seltext_m   = 'Item Code'.
      fieldcatalog-col_pos     = position.
      fieldcatalog-outputlen   = 18.
      APPEND fieldcatalog TO fieldcatalog.
      CLEAR  fieldcatalog.
      position = position + 1.
      fieldcatalog-fieldname   = 'TXZ01'.
      fieldcatalog-seltext_m   = 'Material Description'.
      fieldcatalog-col_pos     = position.
      fieldcatalog-outputlen   = 40.
      APPEND fieldcatalog TO fieldcatalog.
      CLEAR  fieldcatalog.
      position = position + 1.
      fieldcatalog-fieldname   = 'MENGE'.
      fieldcatalog-seltext_m   = 'PR Qty'.
      fieldcatalog-col_pos     = position.
      fieldcatalog-outputlen   = 13.
      APPEND fieldcatalog TO fieldcatalog.
      CLEAR  fieldcatalog.
      position = position + 1.
      fieldcatalog-fieldname   = 'BANFN'.
      fieldcatalog-seltext_m   = 'PR No'.
      fieldcatalog-col_pos     = position.
      fieldcatalog-outputlen   = 10.
      APPEND fieldcatalog TO fieldcatalog.
      CLEAR  fieldcatalog.
      position = position + 1.
      fieldcatalog-fieldname   = 'EKGRP'.
      fieldcatalog-seltext_m   = 'Pur Grp'.
      fieldcatalog-col_pos     = position.
      fieldcatalog-outputlen   = 7.
      APPEND fieldcatalog TO fieldcatalog.
      CLEAR  fieldcatalog.
      position = position + 1.
      fieldcatalog-fieldname   = 'AFNAM'.
      fieldcatalog-seltext_m   = 'Raised By'.
      fieldcatalog-col_pos     = position.
      fieldcatalog-outputlen   = 12.
      APPEND fieldcatalog TO fieldcatalog.
      CLEAR  fieldcatalog.
      position = position + 1.
      fieldcatalog-fieldname   = 'LFDAT'.
      fieldcatalog-seltext_m   = 'Required Date'.
      fieldcatalog-col_pos     = position.
      fieldcatalog-outputlen   = 13.
      APPEND fieldcatalog TO fieldcatalog.
      CLEAR  fieldcatalog.
      position = position + 1.
      CLEAR  fieldcatalog.
      fieldcatalog-fieldname   = 'EBELN'.
      fieldcatalog-seltext_m   = 'PO Number'.
      fieldcatalog-col_pos     = position.
      fieldcatalog-outputlen   = 18.
      APPEND fieldcatalog TO fieldcatalog.
      CLEAR  fieldcatalog.
      position = position + 1.
      CLEAR  fieldcatalog.
      fieldcatalog-fieldname   = 'BEDAT'.
      fieldcatalog-seltext_m   = 'PO Date'.
      fieldcatalog-col_pos     = position.
      fieldcatalog-outputlen   = 10.
      APPEND fieldcatalog TO fieldcatalog.
      CLEAR  fieldcatalog.
      position = position + 1.
      CLEAR  fieldcatalog.
      fieldcatalog-fieldname   = 'BELNR'.
      fieldcatalog-seltext_m   = 'GR NO'.
      fieldcatalog-col_pos     = position.
      fieldcatalog-outputlen   = 18.
      APPEND fieldcatalog TO fieldcatalog.
      CLEAR  fieldcatalog.
      position = position + 1.
      fieldcatalog-fieldname   = 'MENGE1'.
      fieldcatalog-seltext_m   = 'Supplied Qty'.
      fieldcatalog-col_pos     = position.
      fieldcatalog-outputlen   = 13.
      APPEND fieldcatalog TO fieldcatalog.
      CLEAR  fieldcatalog.
      position = position + 1.
      fieldcatalog-fieldname   = 'BUDAT'.
      fieldcatalog-seltext_m   = 'Supplied Date'.
      fieldcatalog-col_pos     = position.
      fieldcatalog-outputlen   = 13.
      APPEND fieldcatalog TO fieldcatalog.
      CLEAR  fieldcatalog.
    position = position + 1.
    fieldcatalog-fieldname   = 'BWART'.
    fieldcatalog-seltext_m   = 'movement type'.
    fieldcatalog-col_pos     = position.
    fieldcatalog-outputlen   = 3.
    APPEND fieldcatalog TO fieldcatalog.
    CLEAR  fieldcatalog.
      position = position + 1.
      fieldcatalog-fieldname   = 'LIFNR'.
      fieldcatalog-seltext_m   = 'Supplier'.
      fieldcatalog-col_pos     = position.
      fieldcatalog-outputlen   = 10.
      APPEND fieldcatalog TO fieldcatalog.
      CLEAR  fieldcatalog.
    ENDFORM.                    "build_fieldcatalog
    *&      Form  display_data
          text
    -->  p1        text
    <--  p2        text
    FORM display_data .
      IF it_output[] IS INITIAL.
        MESSAGE 'No Data Exist' TYPE 'E'.
      ENDIF.
      gd_repid = sy-repid.
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
           EXPORTING
                i_callback_program      = gd_repid
                i_callback_top_of_page   = 'TOP-OF-PAGE'  "see FORM
                i_callback_user_command = 'USER_COMMAND'(001)
               i_grid_title           = outtext
                is_layout               = gd_layout
                it_fieldcat             = fieldcatalog[]
               it_special_groups       = gd_tabgroup
                it_events               = gt_events
                is_print                = gd_prntparams
                i_save                  = 'X'
               is_variant              = z_template
           TABLES
                t_outtab                = it_output
                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.
    *ENDFORM.                    " display_alv_data
    ENDFORM.                    " display_data
    FORM top-of-page.
    *ALV Header declarations
      DATA: t_header TYPE slis_t_listheader,
            wa_header TYPE slis_listheader,
            t_line LIKE wa_header-info,
            ld_lines TYPE i,
            ld_linesc(10) TYPE c.
    Title
      wa_header-typ  = 'H'.
      wa_header-info = 'Pending Purchase Requisition Report '
      DESCRIBE TABLE i_eban LINES ld_lines.
      ld_linesc = ld_lines.
      CONCATENATE 'Total No. of Records: ' ld_linesc
                        INTO t_line SEPARATED BY space.
      APPEND wa_header TO t_header.
      CLEAR wa_header.
    Date
      wa_header-typ  = 'S'.
      wa_header-key = 'Date: '.
      CONCATENATE  sy-datum+6(2) '.'
                   sy-datum+4(2) '.'
                   sy-datum(4) INTO wa_header-info.   "todays date
      APPEND wa_header TO t_header.
      CLEAR: wa_header.
      wa_header-typ  = 'A'.
      wa_header-info = t_line.
      APPEND wa_header TO t_header.
      CLEAR: wa_header, t_line.
      CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
        EXPORTING
          it_list_commentary = t_header.
               i_logo             = 'Z_LOGO'.0
    ENDFORM .                    "top-of-page
    *&      Form  validate_input
          text
    -->  p1        text
    <--  p2        text
    *FORM validate_input .
    *-- validate the input material.
    SELECT SINGLE * FROM mara CLIENT SPECIFIED
    WHERE mandt = sy-mandt
    AND  matnr IN s_matnr.
    IF sy-subrc <> 0.
       MESSAGE 'Enter Valid Material Number' TYPE 'E'.
    ENDIF.
    *-- validate the input plant.
    SELECT SINGLE * FROM t001w CLIENT SPECIFIED
    WHERE mandt = sy-mandt
    AND werks  = p_werks.
    IF sy-subrc <> 0.
       MESSAGE 'Enter Valid plant.' TYPE 'E'.
    ENDIF.
    *-- validate the input plant / material record
    SELECT SINGLE * FROM marc CLIENT SPECIFIED
    WHERE mandt = sy-mandt
    AND matnr IN s_matnr
    AND werks  = p_werks .
    IF sy-subrc <> 0.
       MESSAGE 'Material is not defined in Selected Entered Plant.'
        TYPE 'E'.
    ENDIF.
    *-- validate the input Purchase Grp.
    SELECT SINGLE * FROM marc CLIENT SPECIFIED
    WHERE mandt = sy-mandt
    AND matnr IN s_matnr
    AND werks  = p_werks
    AND ekgrp IN s_ekgrp.
    IF sy-subrc <> 0.
       MESSAGE 'Material is not defined in Selected Entered Plant.'
        TYPE 'E'.
    ENDIF.
    *ENDFORM.                    " validate_input
    *&      Form  process_data
          text
    -->  p1        text
    <--  p2        text
    FORM process_data .
    **-- Process All the data into Final Internal table it_output
      LOOP AT i_eban.
        it_output-bsart = i_eban-bsart.
        it_output-badat = i_eban-badat.
        it_output-matnr = i_eban-matnr.
        it_output-werks = i_eban-werks.
        it_output-txz01 = i_eban-txz01.
        it_output-menge = i_eban-menge.
        it_output-banfn = i_eban-banfn.
        it_output-bnfpo = i_eban-bnfpo.
        it_output-ekgrp = i_eban-ekgrp.
        it_output-afnam = i_eban-afnam.
        it_output-lfdat = i_eban-lfdat.
        it_output-ebeln = i_eban-ebeln.
         ebelp LIKE eban-ebelp,
        it_output-bedat = i_eban-bedat.
        READ TABLE i_ekpo WITH KEY matnr = it_output-matnr
                                   werks = it_output-werks
                                   banfn = it_output-banfn
                                   bnfpo = it_output-bnfpo.
        IF sy-subrc = 0.
          it_output-ebeln = i_ekpo-ebeln.
          it_output-ebelp = i_ekpo-ebelp.
        ENDIF.
        SELECT SINGLE lifnr INTO ekko-lifnr FROM ekko CLIENT SPECIFIED
        WHERE mandt = sy-mandt
        AND ebeln = it_output-ebeln.
        IF sy-subrc = 0.
          it_output-lifnr = ekko-lifnr.
        ENDIF.
        READ TABLE i_ekbe WITH KEY ebeln = it_output-ebeln
                                   ebelp = it_output-ebelp
                                   matnr = it_output-matnr
                                   werks = it_output-werks.
        IF sy-subrc = 0.
          it_output-menge1 = i_ekbe-menge.
          it_output-budat = i_ekbe-budat.
          it_output-bwart = i_ekbe-bwart.
          it_output-belnr = i_ekbe-belnr.
        ENDIF.
        APPEND it_output.
        CLEAR it_output.
      ENDLOOP.
    ENDFORM.                    " process_data

Maybe you are looking for

  • External hard drive is not mounting via hub

    Hi mates, I bought LaCie D2 Quadra external hard drive and when I connected it to LaCie Huby firewire port it would not mount at all, but when I connected the hard drive straight to my MacBooks firewire port it mounted nicely. what could be the probl

  • MTO not considering available raw materials

    Here there are some available raw materials in unrestricted use. When any new sales order is generated for MTO finished material it is generating a new purchase requisition for the same raw material ( since that raw material is not assigned to the sa

  • How to make awt modal dialog to NOT appear on top of existing windows

    Hi, I am working on a program that displays awt modal dialog box when it needs some action from the user. My problem is that the modal dialog box cann't be top window as there is one VC++ window that needs to be always top window. Another requirement

  • Can i create AIF or WAV files larger then 4 gig?

    Can i create AIF or WAV files larger then 4 gig?  It seems like I have been doing that all along, but suddenly FCPX and Compressor 4 will not allow me to create and AIF file bigger then 4gig.  It claims that the file format does not support sizes abo

  • Copy data for long type field

    hello I am trying to copy data from one table to another both have long type field. but facing an error like SQL> copy from neo/neo1234@neo99_local insert temp using select * from temp1 Array fetch/bind size is 15. (arraysize is 15) Will commit when