Ad-hoc query - excel problem

Hi,
I am trying to run an ad-hoc query to generate previous employer's report.When I click on Hit - list, it shows me 2,195 persons listed.However, when I click on output, it generates only 234 employees in the excel sheet.
Could anyone please help me as to why this is happening??
Priority:HIGH
Thanks in advance.
Regards,
Angel

Hi,
I am trying to run an ad-hoc query to generate previous employer's report.When I click on Hit - list, it shows me 2,195 persons listed.However, when I click on output, it generates only 234 employees in the excel sheet.
Could anyone please help me as to why this is happening??
Priority:HIGH
Thanks in advance.
Regards,
Angel
Hi Angel,
Check what Kumarpal has said, he may be correct.
What I would ask u to do is, ask your ABAP-er to pull a report from the table level using SE11. See what is the number of hits.If there is a difference then the Query behind Ad-Hoc query is not working properly.
The reason for your problem could be many if not one.
Regards,
ARNAV...

Similar Messages

  • Modifying  the Ad-hoc Query Infoset : problem with P9105 fields.

    Hi all,
    Am having problem with Infoset of Ad-hoc Query .
    i need to add the Critical role Field Group to ZHR_PA_01 Infoset of Satandard Area.
    for this i have imported that Infotype 9105 and included the following standard fields by drag and drop.
                    1. Role Category
                    2. Role SubCategory
                    3. Global Identifier 
                    4. Personnel Number
    and then Saved and Generated the infoset succesfully.(No syntax errors)
    But
    While testing, using the T-Code:  S_PH0_48000510
    if i select one of these above fields for the report,
    Am getting the message that "Error when generating the report".
    Error Description:The report cannot be generated because the internal description is invalid or incomplete.
    means what may be the problem.?
    if i select other fields its working fine.
    can any body explain me clearly..??
    Regars,
    Kalam A.

    Hi Manoj,
      yes, i have saved the T-code.and generated the Infoset Succesfully.
    and its showing the those additional fields while testing.
    for remaining fields its working fine.
    but am not getting wats problem with the four fields of P9105 infotype.
    could you please suggest me.?
    Regards,
    Kalam A.

  • Out put problem in Ad hoc query reports

    Hi Gurus,
    I am tryting to generate a report through Ad hoc query in S_PH0_48000510 - Ad Hoc Query SAP/Query/HR_ADM - > Selected several options like personnel number / employee name / entry date / leaving date.
    But when we select it shows the input details but when i try for output the entry date / leaving date even the names of the employees are not reflecting.
    But the age/date of birth other fields are coming in output.
    Kindly let me know the solution to get a out put. If there is any changes need to be done in the back end. Pls advice with the path details.
    Thanks & Regards,
    Pradeep Krishnamurthy

    Hi Madhu,
    Yes, I did but out put is not coming.
    Regards,
    Pradeep Krishnamurthy

  • How to add an Infotype to an exsting Infoset (ad hoc query)

    Hi,
    How to add an Infotype (Ex. 0025) to an exsting Infoset (ad hoc query)?
    I was trying by clicking on 'Extras' tab & create...I get three options, create field, create table or create structure.
    I am not sure which to use or is there any other way? Pls. let me know the steps...
    Also what is this 'Package', which is aked whenever you create or change an Infoset.
    Pls. suggest.
    Tnx
    SKR

    I was able to add the infotype by adding the table as PA0025 & include all the fields in the field group.
    When I check, I get the following error:
    "Access to PA0025 with sequence no. 01"
    Message Text
       Access to PA0025 with sequence number 01
    Technical data
    Message type__________ W (Warning)
    Message class_________ AQ (Message texts for SAP Query)
    Message number________ 006
    Message variable 1____    Access to PA0025 with sequence number 01
    Message variable 2____ 
    Message variable 3____ 
    Message variable 4____ 
    Message attributes
    Level of detail_______ 4 (Level of detail 4)
    Problem class_________ 3 (medium)
    Sort criterion________ 
    Number________________ 1
    Do we need to input the sequence no. as 00? or is their anything else that I have to maintain?
    Tnx
    SKR

  • Advanced Ad-Hoc Query and formulas

    Hi experts,
    I need to track new hire HR data on a report but am struggling to do this without some excel style formulas...
    Can you use excel style formulas in Ad-hoc query?? E.g. today(). I have run some tests and don't think it is possible...
    So if the hire date is less than 2 months old (from a calendar perspecitve) then I would want the new hire to show with only their current employee data (i.e. reporting period of 'today').
    Does anyone have any ideas of how I can do it or will this require some ABAP to work properly??
    Thanks!

    Hi,
    You can use SQ01, which is actually an enhanced Ad Hoc, but without using ABAP programming.  All Ad Hoc Queries are available via SQ01, but if you make certain entries SQ01 reports are not accessible via PQAH. 
    For your request to bring in data only on new hires within a certain period, you can first create the output you want in Ad Hoc.  Also add the selection fields for Action Type (enter the type for New Hire) and Start Date of the IT0000.  Save your query.  Now access the report via SQ01 entering the User Group and scrolling down to find your report.  Execute the report (green check with clock).  This will bring up a selection screen with your entries from Ad Hoc.  Select the "Save" button.  This will bring in a screen for you to name the selection varient. Name it "STANDARD".  Below this you will see all the selection fileds available with a number of boxes.  Scroll down to the field for your Start Date and under the "Selection Variable" column select "D-Dynamic date calculation".  Then in the far right column (Name of variable) select "Current date +/- days".   Enter the number of days you want to go back - say "-30" for new hires in the past month.  Then save the variable. 
    Now when you run the report (via SQ01) you will automatically select those individuals with a start date within the past 30 days.  No programming needed.
    Paul

  • Outputting System User Name in Ad Hoc Query (S_PH0_48000513)

    I am trying to create an HR Ad Hoc Query and one of the fields that I am trying to output is System User Name from infotype 0105 Communications.  If I choose this field and do not choose the Communication Type, I get two records per employee - one record with the System User Name populated and one record with a blank value for System User Name.
    If I choose the System User Name field for output and also make a selection on Communication Type (= subtype 0001), employees with no System User Name (i.e. no Infotype 0105, subtype 0001) are eliminated from the report.
    I want the report to show all selected employees, including those without a System User Name; however, I do not want the same employee to appear on the report twice.
    Has anyone else experience this problem?  If so, have you figured out how to eliminate the extraneous record for each employee when you do not select the Communication Type?
    Thanks in advance.

    Hi,
    Love to know if you managed to find a solution for this issue as I'm experiencing the same problem.  However I'm reporting on both system user and email address which are distinct fields and would prefer to see this information only on a single line.  With my report I get communication system user on one line and then email address on the another, I'd also like to be able to include those users where the info types have not been maintained.
    With the query I have created I also included logon data from the USR02 table.
    Cheers
    Bill

  • Ad Hoc Query Output

    When I access Ad Hoc query (S_PH0_48000510) to run an existing report, instead of selecting the output button right away, I click on Hit List, get the number of records, then I click on display (eyeglasses).  The pop-up window shows me 24 records, all of which I am expecting to see as they fall within my selection criteria.  I select them all, then click on the output button.  Only 7 records show upu2026  And, there are no error messages or authorization messages.  I checked the layout and filter, and everything looks correct.  Does anyone have any ideas as to what I'm missing?  There are no calculated fields; this is just a simple query.
    Thanks in advance!!

    Hi Debbie,
    One thing we did in all of our custom Infosets was to include the start date and end date of every infotype as well as the date changed and who changed it.  Thus, when we run reports that are date specific we can say that the start date and/or end date must fall within that range and we can also output that info. 
    I do not know your data or selection criteria, but the problem may lie with data that is no longer current or "top of stack" that excludes hits from being included in the output.  One example is with IT0000-Actions.  You may be seeking those employees who had a Rehire action since January 1st.  But a later transfer or leave of absence action may now be "top of stack" and the current action, thus is no longer "Rehire",  Your output would only be those whose latest action is Rehire and the others with later actions would be left off.  Adding the start and end date fields will sometimes allow the output of the older Rehire record as would deleting the action type in the selection once the Hit List was maintained in the Reporting Set section.  You would now see the Rehire along with the other actions.
    Paul
    Paul

  • Ad hoc query missing amounts

    Hi:
    I'm having problems in order to obtain amounts from a custom infotype, this custom infotype (9001) is attached to the positions. When I try to obtain information about amounts that I have store in the custom infotype with the ad hoc query, I have the following error:
    Error when generating the report (see long text)
    Message no. AQ_AD_HOC221
    Diagnosis
    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.
    And I just tried to obtain information of 1 record.
    I'm in 640 version.
    Thanks in advance!!

    Hi Antonio,
    Without knowing the structure of your custom infotype, it is difficult to identify the cause of your problem.  I would first start with that - use transaction SE11 and make sure the infotype structure and definition for the requested field are correct and activated. 
    Since the infotype is tied to Position, I would create a new PCH based Infoset (SQ02) with the Position as the key.  Then include the IT1001, 1005, 9001, etc as well as the IT0000, 0001, 0002, etc. for Person as Holder.  Generate the Infoset, assign it to your user group (via SQ03) and then create an Ad Hoc Query with it. 
    It is also possible the custom infotype may not work in Ad Hoc, but could if the query is created directly in SQ01.  I would also give that a try.  Again, the problem is probably in the custom infotype and the field itself or in the generation of your infoset. 
    Paul

  • Ad-Hoc Query Field using HR_99S_INTERVAL_BETWEEN_DATES function module

    I have created an additional field in Sq02 to calculate years between two dates and am using function module HR_99S_INTERVAL_BETWEEN_DATES.
    There are no syntax erros but when I run a query in Sq01 and output the field it doesn't calculate instead gives "00000" output.
    The field Code in the additional field
    Clear ZHR_SERVICEYRS.
    DATA: V_MONTHS TYPE  i.
    DATA: V_YEARS TYPE  i.
    DATA: V_MONTHS1 TYPE  char20.
    DATA: V_YEARS1 TYPE  char20.
    CALL FUNCTION 'HR_99S_INTERVAL_BETWEEN_DATES'
      EXPORTING
       BEGDA           = P0002-GBDAT
       ENDDA           = Sy-Datum
      TAB_MODE        = ' '
    IMPORTING
      DAYS            =
      C_WEEKS         =
       C_MONTHS        = V_MONTHS
       C_YEARS         = V_YEARS
      WEEKS           =
      MONTHS          =
      YEARS           =
      D_MONTHS        =
      MONTH_TAB       =
    V_MONTHS1 = V_MONTHS.
    V_YEARS1 =  V_YEARS.
    CONCATENATE V_YEARS1  '.'  V_MONTHS1 INTO ZHR_SERVICEYRS.
    condense ZHR_SERVICEYRS.
    has anybody had similar problems! Help Appreciated!

    Hi Anuj,
    Yes, you use Transaction Code SQ02.  Find your infoset on the list - if you want to create a new infoset you can do so.  If it is an existing infoset, select it and Change.  On the next screen you will see all the infotypes in that infoset on the left.  The fields available for Ad Hoc are on the right.  Open the infotype table on the left and the field group on the right.  If the field is not included in the field group all you have to do is drag and drop from the list on the left to the correct field group.  If the infotype is not already in your infoset, select Edit --> Change Infotype Selection from the top menu bar.  Place a check in the new infotype and then return and do the drag and drop if necessary.  You will find the basic fields already moved to the field group. 
    You say you want information from IT0008-Basic Pay and IT1005-Planned Compensation.  Problem is that if you use the standard HR logical data base, there is no link directly between a person and IT1005.  IT1005 is assigned to a Position or a Job.  If it is assigned to a Position, you can select the "Change Infotype Selection" action and ago to the bottom of the list to Related Objects.  Here select Position and open that to find the IT1005.  If the IT1005 is tied to the Job, there is no direct link. Thus, if it does not already exist, you will need to create an infoset based on the PCH logical database and object Position.  Now you can link that Position to "Holder"-Person and "Described by"-Job.  Again, select the infotypes and fields you want and you will be able to obtain your information via Ad Hoc Query based on that infoset.
    Paul

  • Ad hoc query - Infoset, after selection it is giving two different output

    Hi All,
    We are facing problem in ad hoc query, after PQAH Ad hoc query, when we go to one infoset, so after making some selection and putting some output field,
    When we click on refresh data button(in lower pane) so it gives only one record, which is incorrect, but when we click on u2018Start Outputu2019 button it gives 3 records those are correct.
    Can anyone tell me, why this is giving different output.(first time 1 record, and second time 3 records) record 3 output is correct.
    Regards,
    Kumar
    Edited by: kumar r12 on Mar 18, 2011 9:00 AM

    Hi Kumar,
    Are you looking at the "Hit List" or the output of the results in the lower pane?  The hit list will only give you the number of persons who will be in your output.  The refresh button should give you a preview of the output. 
    What persons or fields are different or not shown in the preview area vs. the output?  Also, what are the dates for the data?  Are you looking at current data or looking for history?  The output may be showing you history and the preview only current data.  Most concerns with Ad Hoc Query output are related to dates - for the selection and the output. 
    Paul

  • Ad Hoc Query Data Issue for Position Based Infoset

    Experts,
    I've created an infoset that is based on the S object using the PCH database.  For this infoset, I've included several infotypes with focus on 1000, 1001, and 1028.  I've included the Address infotype (1028) as this is where we store our work location information.  For some reason though when I attempt to pull information from 1028, specifically the House Number and Street field, the Postal Code field, and the City field.
    For some reason though, no data is being returned in those fields.  I've verified for the position (in PP01) that I'm querying on that the data is maintained in 1028, and I've verified that I'm attempting to report on the correct fields by verifying the field technical names I'm pulling in the Ad Hoc Query with those I know have data stored in them on the infotype for the specific position.
    Would anyone have any guidance on what could be happening here or what I might need to adjust to be able to pull this data?
    Thanks in advance for your time and help.
    Best Regards,
    Joe

    To add some further clarity to this item, the Address infotype on the Position (S) object is pulling from a dropdown of selectable Buildings.  If unfamiliar, the Building drop is populated by configuration data from the IMG.  The fields that are populated then in the Address infotype actually come then from the Building entries and are simply populated onto IT1028 (address) depending on which Building is selected.
    I think this is what it occuring then when I select the fields from the Address infotype and I see nothing populated in the Ad Hoc query since the field information is not actually stored in IT1028 but on in the Building entry.
    Has anyone else experiencing this particular problem?  If so, have you found a solution?
    Regards,
    Joe

  • Capture SAP Ad-Hoc query output in report

    Hi All,
    I have to run an Ad-hoc query from report (se38 program) and after execution of that Ad-hoc query I have to capture the output of that query and use in Report.
    I am trying the follwing approach but getting Run time error (internal Error)
    SUBMIT XXXXX EXPORTING LIST TO MEMORY
    Data:
    v_spool like pri_params-plist,
    v_text like pri_params-prtxt,
    v_print_parms type PRI_PARAMS,
    V_valid       TYPE c LENGTH 1,
    v_spool = sy-uzeit.
    v_text = sy-uname.
    call function 'GET_PRINT_PARAMETERS'
    exporting
    destination = 'locl'
    list_name = v_spool
    list_text = v_text
    user = sy-uname
    importing
    out_parameters = v_print_parms
    valid = v_valid
    exceptions
    archive_info_not_found = 1
    invalid_print_params = 2
    invalid_archive_params = 3
    others = 4.
    IF V_valid = 'X' AND sy-subrc = 0.
      SUBMIT SAP_QUERY_AD_HOC
                        TO SAP-SPOOL
                        SPOOL PARAMETERS v_print_parms
                       ARCHIVE PARAMETERS archi_parameters
                        WITHOUT SPOOL DYNPRO
                        WITH p_wsid = 'X'
                        WITH p_bgname = 'ZHR_OM_PA'
                        WITH p_sgname = 'ZHR_PA_PERSONNELADMIN'
                        WITH  p_quname = 'Z_HRDATA' AND RETURN.
    ENDIF.
    Thanks in Advance

    My friend. Runtime error is like saying "it doesn't work please help me". You need to give more details if you want someone give detailed anwser. It's technical forum so please try to explain technical nature of your problem. In other words, what is the dump saying?
    Regards
    Marcin

  • Ad-Hoc Query: no of hits???

    Hi,
    For Ad-hoc query, I encountered the below "strange" case:
    (1) When I click on "Hit List" button -> indicates 8033. However, when I click on the "glasses" button, it indicates 750 hits. IF I click on "Hit List" button again, it will indicate 7979???
    What is the problem???
    Thanks in advance.
    From,
    Santhi

    List of active employees and some data related to employee like name,date specifications,personel area, personel subarea, payscale group.

  • [TEM/Ad hoc Query] Showing Invalid Relationships in Ad Hoc Query

    Hi Experts,
    In our system, during internal transfers Persons, a new Personnel number is created for him/her. The old Personnel Number was delimited (Termination Action) and is stored in an Infotype as an Inactive Personnel number of that person.
    We are planning to copy an Inactive Personnel number's past A025 Relationships (Business Event is attended by) to its Active Personnel Number. So that the Active Personnel will keep the record of the Complete History of trainings taken by the employee.
    The problem is that in Ad Hoc Query. The copied A025 Relationships of the Active Personnel Number is not shown since it is not a valid relationship. (The validity period of the A025 relationships that was copied from the Inactive PERNR, is outside the validity period of the Active Personnel Number.)
    Is there a way to make Ad Hoc Query recognize these invalid relationshps?
    Points to those who can help.
    Thanks.
    Regards,
    Olekan Babatonde

    Logically the system will not accept an attendee to attend an event before his hiring date.
    You have to try some other way

  • Incorrect leaving date in ad hoc query

    Hi all
    Well I am running an ad hoc query for the numbers of leavers from the company and the reasons for it. This is working absolutely fine but its not showing the correct date of leaving for the employees. even if i have changed the period from 01.01.2007 to 04.07.2007, it still picks up the data for all the employees who have left the company before this period like for the years 2002, 2003, 2004, 2005, 2006.
    I need urgent help/advice on it.
    Please help me out urgently.
    Thanks and Regards.

    Hi Suresh..
    Thanks for the prompt reply. I have infotypes 0001, 0002, 0006. I also agree to the fact that infotypes like 0001 stay valid even after the employee has left the organization, but Suresh the problem is that it should not be picked up these in the report when it is run for the period from 01.01.2007 to 04.07.2007. this is what is happening in this scenario. the report is picking up the data which is a lot older than this. Is there any way to fix this problem??
    Thanks and Regards

Maybe you are looking for