Emailing Adhoc Query Output

Dear Friends,
I have a requirement in which HR managers needs to be delivered some reports in his mail early morning. The query to extract the required data is already developed and this can be scheduled early morning to retrive the data. Is there any way to mail him the output directly from the scheduled job without going for any extra ABAP development.
Regards,
Mithun

In the schedule job, there's a button 'Spool List Recipient'. This allows the spool output of the job to be sent to someone (either SAP inbox or external email address) once the background job is run.

Similar Messages

  • Unable to report adhoc query output on HRP tables

    Hi All,
    I am using adhoc query to report the data from HRP table (customised) but the data is not being picked even though the table has the records. The fields from the field group and the infotype fields are properly mapped but the output is blank.
    Any pointers/suggestions on how we can achieve this would be helpful.

    @ semvladigo : Thanks for the reply. Could you please let me know further info on the standard functionality.
    @ Albert : Thanks for the input. I am in PA and using PNPCE but it is not working with this LDB. 
                      When I query (in PCH) I am not getting results when I select 'ALL' in the reporting period.
                      It worked fine when infoset built in PCH LDB with reporting period other than 'ALL' (like Today, Keydate).
                      Please advise.

  • Change layout of Adhoc query output list for Custom infotype

    Hi All,
    The fields in the Infoset query output on a custom infotype are aligned with the fields u2018payment typeu2019 and u2018amountu2019 appearing repeatedly(in columns) as declared in the Infotype and the output will be a long horizontal list.
    Instead, the requirement is that the output list should show vertically so that If I choose u2018Payment Typeu2019 and u2018Amountu2019 as output fields, it will show a long vertical list as in the case of a standard infotype (IT0008).
    Also, this way enables user to use Payment Type as a selection criteria so as to just pulling the needed payment type. When we use IT0008 in the infoset it works fine but in custom IT it does not work.
    Any pointers/suggestions on how we can achieve this would be helpful.

    Hi yu liang,
                     You can find vendor list having Vendor No. & without showing total liability for every vendor.
    after executing the report,
    1.You need to select "change layout (ctrl+F8)",
    a small window comes, it has two part -> column content & hidden fields.
    then u select "Vendor" from hidden field & move it to column content.
    2. at column content there is a column named "Total". u need to remove check for your column name "amount".
    now select "copy" button or enter. u will find the req. report.
    u can save it also by ur name.
    hope its helpful to u.......
    plz, reward points as a way of thanks if helpful...

  • Adhoc Query error AQ_AD_HOC 221

    Hi All,
    I have added 7 fields with char1 as value in th it0077 group in the additional filed. My problem is while using the adhoc query output when i select only the infotype 77 fields i am getting the following error
    Mesage ID: AQ_AD_HOC Message number: 221
    Error when generatimg the report (see long Text).
    but when i select any other infotype fields and also 77 infotype fields then its coming fine. I dont know where i m doing wrong.
    I have used LDB PNPCE, and in the coding part of the additional fields i am using rp_provide_from_last.
    Please let me know where i am going wromg.
    Thanks and Regards,
    Salish Nair

    Hi,
    There may be many reasons for that issue. Can you please debugg the code to more deeper. Put break point in perform generate_report in the Fm AQ_INT_SAVE_QUERY_DEFINITION.
    Procedure
    If the selection screen is too large, you need to reduce the number of your selections.
    Make sure that the assigned InfoSet is correct. The name of the assigned InfoSet is stored in the menu option 'Extras -> Template Information'.
    Output at least one field. Otherwise you will not be able to save or generate reports.
    If you do not have this problem, execute the query using the 'Output' function.
    Otherwise, there is an error in the InfoSet Query.
    Thanks & Regards,
    Sandip Biswas

  • Automating ADHOC query reports to generate Emails

    Hi Experts
    Hope you guys are doing fine.
    I have a requirement where we need to automate the ADHOC query reports to trigger emails with the Excel attachment of the report to a set of users.
    To explain in detail,we have some adhoc queries which are run manually on monthly basis(by our functional guys).Once the output report is generated,they used to download them into Excel document and send that to a set of users as an email attachment.
    Now we are planning to automate the entire process,so that these query reports once set to run on monthly basis should trigger emails to set of users with the excel attachment.
    Now,i am looking for solution on how to proceed on this.Since the program behind the query(which starts with AQ*) is not be a modifiable program,i can write any custom code here.Alternately,i planned to set a background job which runs the query and then use a  custom pgm which reads the spool no for the pgm and then to read the data from the spool into an internal table and then use a FM to send the internal table data as an email attachment.But wasn't sure of what FM's to use to read the spool no. and data from the spool.
    Is there any alternate way to work on this or any suggestions on my assumed process would be really appreciated.
    Thanks

    Ok, here's what you do:
    - Go to T/C: SQ01 and find your query
    - From the menu at the top select Query>More functions>Display Report Name (copy the report name)
    - Go to Transaction SO23 and create a new shared distribution list - give it a name and title, click the dropdown on folder and click the create folder button, give the folder a name and save/green tick.
    - Click on the Dist. list content tab and enter all the external email addresses that the report should go to ( the recipient type should be internet address or via internet or something like that)
    - Go to Transaction SM36 and click on the Job wizard button, go through the wizard entering the program name we copied earlier. In the print parameters section make sure it is set to print immediately, then on the spool list recipients button select the dropdown box, select distributions lists and find the one you created earlier. Define the variants, periods, time etc etc
    - When the job runs it will process the output via SAPConnect (transaction SCOT) you will be able to see the status of the emails by going to transaction SCOT and selecting the menu option Utilities>Overview send requests.
    Job Done, Chillax
    PS: remember the output type of the query in SQ01 needs to be set to excel or whatever you require otherwise a PDF/html attachment will be created in the email.
    PPS: If SAPConnect is not set up in your system speak to your basis guy to set it up - If you don't have any basis resource, it is really easy to set up, plenty of guides around.

  • Adhoc query-Problem with Personnel no output field

    Hi Gurus,
    We are trying to run an adhoc query using a customized Info set(PNPCE logical database).
    While running the query,we had selected Personnel no(from Payroll status P0003 table) as output field and Company code(from Org assignment P0001) as input field in the selection.
    Problem is in the output field we are seeing the Personnel name details in place of Personnel no.Could anyone please suggest what could be the reason behind this and how to fix it.
    Your help will be highly appreciated.
    Warm Rgds
    Sushil

    Hi Sushil,
    The default output for fields with a text and a value (Name = text, PERNR = value) is the text.  You can change this by right clicking on the output box in Ad Hoc and selecting "Value".  If you want both name and number, select "Value and Text". 
    You can also change this default to Value from Text if in Ad Hoc, you go to Edit --> Settings.  On the last tab, change the radio buttion for output default to Value from Text.  This will change it for all fields so you would see the eight digit number rather than the name of the position or org unit.  Thus, you may want to keep it at Text and use the right click to change specific fields as needed.
    By the way, it is usually best to utilize the personnel number field from IT0000-Actions, although it can be obtained from any infotype if you include that field in the field group when creating your infoset. 
    Paul

  • Adhoc Query- problem with the output file format

    Hi Gurus,
    I have a problem in exporting the output of an adhoc query to Excel format.
    The menu option I chose to export the report data into Excel is List>Export>Spreadsheet.
    However,I think I've just pressed the wrong option to export my report and now I can't seem to change it from a HTML file option.
    Can anybody help me correct this output setting.
    Points assured for apt help...

    Hi Sushil,
    There are two ways to save the output in the excel format.
    As you have mentioned, you can use
    List -> Export-> Spreadsheet.
    Then select table. Now the output will open in a spreadsheet.
    The other way is
    List -> Export-> Local File
    Here you need to select the option spreadsheet. Then mention the path where you want the file to be stored. Also mention the format as .xls
    Hope this helps
    Regards,
    Brinda

  • Adhoc query - Hit list 40, output 5

    My client has an adhoc query set up and the selections make sense the hit list number is correct as compared to what is on the DB - I have checked using SE16.
    However when the output is produced only 5 records are shown.
    There are no auths issues according to SU53 and also I have access to all infotypes in PA & PD so I am slightly confused as to what is going on here.
    Perhaps some of you have had the same experience and have an idea or clues as to what is going on here.
    Many thanks in advance,
    Kind regards,
    Dan

    Hi,
    Hit lists show employee hits, output shows output hits. You have difference because in the output not every employee has a record in the infotype that you selected for output.
    For example you have 40 employee and only 5 of them have record in IT 0016. So if you select IT 0016 for output only 6 records will be displayed, though according with you selection criteria 40 employee were selected.
    Just add to output fields from infotype that every employee has (e.g. from IT 0001) and you will see all of them in the output.
    Cheers

  • How to send email alert to users from the query output ?

    Hi all,
    I intend to write a pl/sql to send email alert to user based on the following query output :-
    Item_______Qty_on_hand________Min_qty______email
    [email protected]
    [email protected]
    [email protected]
    once run, I will like to distribute to those email id. How should I code that in pl/sql ? or any other better idea is welcome. Thanks.
    Rgds
    Lim

    http://asktom.oracle.com/pls/ask/f?p=4950:8:3439330610438686683::NO::F4950_P8_DISPLAYID,F4950_P8_CRITERIA:255615160805,

  • Issue in adhoc Query

    Dear All,
    When i am running adhoc query for a particular infotype iam getting fine.
    My issue is iam not getting the start and end date of the record.
    can any body help me out how to get the start date and end date of each record.
    Thanks in advance
    Regards
    Ananya.K

    Hi,
    If you want to add the dates to the output of the querry, While creating/editing the query, you should add feilds ENDDA and BEGDA for the infotype to get the start and end date correct.
    If this does not answer your question, could you explain your query in detail?
    Thanks,
    Dhiraj

  • Problem in Adhoc Query's set operation functionality.

    Hi Experts,
    I am facing problem executing Adhoc Query's set operation functionality.
    In Selection Tab, following operations are performed :-
    Execute a query and mark it as 'Set A'.(Say Hit list = X)
    Execute another query and mark it as 'Set B'.(Say Hit list = Y)
    In Set operation Tab, following operations are performed :-:-
    Carry out an Operations 'Set A minus Set B'.
    which results in Resulting Set = Z.
    Transfer the resulting set 'in hit list' and press the copy resulting set button.
    In Selection Tab, Hit list is populated with Z.
    And when output button is pressed, I get to see 'Y' list and not 'Z' list.
    Kindly help.
    Thanks.
    Yogesh

    Hi Experts,
    I am facing problem executing Adhoc Query's set operation functionality.
    In Selection Tab, following operations are performed :-
    Execute a query and mark it as 'Set A'.(Say Hit list = X)
    Execute another query and mark it as 'Set B'.(Say Hit list = Y)
    In Set operation Tab, following operations are performed :-:-
    Carry out an Operations 'Set A minus Set B'.
    which results in Resulting Set = Z.
    Transfer the resulting set 'in hit list' and press the copy resulting set button.
    In Selection Tab, Hit list is populated with Z.
    And when output button is pressed, I get to see 'Y' list and not 'Z' list.
    Kindly help.
    Thanks.
    Yogesh

  • Additional field in adhoc query

    Hi all, I need to be able to report on the IT105 subtype 0001 system ID for employees who are withdrawn from the company, however, when someone leaves their IT105 record is delimited so adhoc query will not output anything.  Has anyone coded an additional field that will look at the latest record regardless of the date?
    If you have, please can you share the code with me!?
    Many thanks!

    Hi Tanya ,
    Please find the code below. It is designed for additional structure z105_last which is bassed on P0105 type.
    data l_it_p0105 type standard table of p0105.
    clear: l_it_p0105, z105_last.
    call function 'HR_READ_SUBTYPE'
      exporting
        tclas                 = 'A'
        pernr                 = peras-pernr
        infty                 = '0105'
        subty                 = '0001'   
        begda                 = '18000101'
        endda                 = pn-endda
      tables
        infty_tab             = l_it_p0105
      exceptions
        others                = 1.
    if sy-subrc = 0.
      describe table l_it_p0105.
      read table l_it_p0105 into z105_last index sy-tfill.
    endif.
    Regards,
    Sergey

  • Can we call a function module in ADHOC query

    Hi
    Can we call a function module in ADHOC query if yes how.
    Also we ned to know how to call a function module in SAP query.
    An early responce is appreciated.
    Thanks and best regards
    Rajeev

    Okay as far as I understand your aim is:
    To fill a field in the output list with a value that is based on the current line information and calculated by a function module
    So go to SQ02 and create an additional field in the InfoSet.
    You can refer in the coding to the technical names you can see in the left tree window like P0000-PERNR.
    More information is avaiable in the Help part look for additional field in SQ02.
    Regards,
    Michael

  • Problem with a Currency field in Adhoc Query - HR

    Hi,
    I have an Adhoc query that uses Custom infotype fields (Z infotype and z fields).
    The currncy field also has a reference field in the infotype (of type waers).
    Wehen we try to get the ouput of the Adhoc Query it gives following error:
    The report cannot be generated because the internal description is invalid or incomplete, or because the selection screen is too large.
    Regenerate the assigned InfoSet, and read the log. If the InfoSet is OK, make sure that at least one field is given as output.
    If you used the 'Refresh' icon to start the query, use the 'Output' menu option to execute the query. This gives you a full screen display of the data.
    If an output was generated, the query cannot work with actual data in the construction view. In this case, always use the 'Output' function to execute the query.
    I have already tried a number of solutions:
    1> Regenerate the infoset...
    2> make the field as an additional field and write my own code for it (the error comes before the code as i kept a breakpoint but it stopped before that)
    if i add other fields of this infoset instead of this field, then those appear in the output.
    Any solutions ??
    thanks in advance,
    Anuj

    Hi,
    Is the problem not clear or no one has an answer?
    Please reply with some suggestions..
    Regards,
    Anuj.

  • Can we show comments in adhoc query?

    Hello All,
           Can we put comments in Adhoc query?
           I have a comment icon in infotype 9903.
           I need to fetch that particular comments and show in a query output. It is not a field.
           Can we do this? If yes, then please let me know how?
    Cheers,
    Darshna.

    I did it sometime back. A bit complicated process.
    Create an infoobject, manually enter the values "keyfig1" and "keyfig2".
    Include this infoobject in the filters and restrict it using a "ready for input" variable.
    Now create two formula variables.
    Write a customer exit such that when you select "keyfig1", first formula variable's value should be set to 1 and other one's to 0.
    Then in the query create two calculated key figures, multiply both with the formula variable. Also supress column (all active value == 0).
    Then it will show the key figure which you have selected.
    Pravender

Maybe you are looking for