Question regarding AdHoc Query

I have to write a single adhoc query whose output will be two different reports.
One report should display pernr,perid, firstname, lastname, age, years of service, hire date,birthdate,
job title. The other should display pernr, firstname, lastname,hiredate, birthdate and department. So when first report is displayed the field department should be hidden and viceversa. Is it possible using adhoc query or custom report is better option. Any inputs will be highly appreciated.
Thanks

Hi,
Please check OSS notes 333517 and 357093. Both notes, though from 2000, contain detailed functionality and recommendation around u201Clength of serviceu201D.
Hope this helps.
Donnie

Similar Messages

  • Regarding Adhoc Query Creation

    Hi Experts,
    I am facing issue while creating Adhoc Query in the production Server. After clicking "Save"  button system shows the screen to enter "Package" related details.
    System shouldn't show this screen in the production server. I want query get save without package details.
    How i can remove that screen..
    I have observed one more thing also.. if i create User Group and Infoset, then save in Local Object package $TMP then system doesn't ask package details while creating query.
    Kindly help me

    Hi,
    Do in devlopment if sucess then move to PRD. Why you trying in direct PRD.
    Better go as per SAP standards only.. Production server is for only client purpose.
    Edited by: ERP12345 on Jan 6, 2012 2:20 PM

  • Question regarding SAP query (SQ01& SQ02)

    Hello everyone,
    I have been assigned a task of creating a SAP query in SQ01. The report requires me to incorporate a drill down functionality.
    i.e. when I double click on a material I should be able to see the components of that material.
    My question is "Is it possible to incorporate a drill down functionality in a Query through SQ01".
    If yes then how.
    Please provide me with some documentations or example codes for this.
    Regards,
    Deepti Jain.

    Deepti,
    There are 2 ways to get the output  From SAP query.
    1.Under record processing :
          if you don't write any code in Start of selection event for output
         (WRITE statements)  we can not have any control on that.
    2. Under start of selection event :
         If you write any code in START OF SELECTION event like
         get the data in internal table and loop the internal table
         In loop WRITE statement to display with format and try to use
        Interactive report commands Here. I think it will work fine.

  • Adhoc query missing field labels

    Hi,
    We have a problem regarding adhoc query. The fields are not showing all characters when you hit the refresh button at the bottom. For example, i chose to output Personnel Area, upon executing the refresh button, it is showing 2 characters only instead of four (US01 and is showing US only). This happens for some fields as well. It seems the labels are being cut. But when you check the field documentation, it says 4 characters. Also, when you click on the "output" button, everything is ok. Meaning, you can see all 4 characters for Personnel Area.
    The infoset we are using has been there for a long time already and there were no problems like this before, It was just now that this thing happened and were not sure what triggered this.
    please let us know if you have any thoughts about this, Thanks in advance!

    Hi Sanghamitra,
    Yes, i am referring to the reading pane at the bottom. However, there are quite number of fields that seem to be reduced. Also, the reading pane is working ok before and it shows the exact characters that you actually want to see. It has the same results as that when you hit the output button. We're not sure how it happened or if it was impacted by any support packs. With that, we want to know how to bring it back to its original appearance before.

  • Regarding  HR Adhoc  Query

    I came across a situation in the course of my job that certain people are able  to execute S_PH0_48000513 (HR Adhoc Query) without being added to the User Group. This was surprising.
    Can any of you tell me if this is because what security settings ? I am not sure if this could be some settings with auth object  S_QUERY .
    Acccording to the http://www.insightcp.com/res_15.htm it should not work if they are not added to any uset group. But in reality it is otherwise.
    Any thoughts on this , also if anyone can explain how security in Adhoc Query works , that would also be wonderful

    Hi,
    Most pobably these users are assigned with a role wherein they are assigned with the value S_PH0_48000513 under the auth object s_tcode or with the authorization object s_querry.
    Check this.
    Go to tcode S_BCE_68001397.
    In the Authorization tab enter value S_TCODE
    click ENTRY VALUES button
    In the next screen in the values field enter S_PH0_48000513
    and execute.
    It will show you which users are able to execute the said tcode
    Similarly check which users/roles are assigned with the auth object s_querry.
    In the roles assigned to the said users check if the r assigned with profile sap_all or sap_new profile.
    Or in the roles assigned to them the auth object S-Tcode containf the value S_PH0_48000513  or *  OR
    if there is an authorization  object s_querry.
    Note * means he is authorised to all tcodes.
    If the auth object s_querry exists make it inactive.
    A detailed analysis of the roles can give the way to regulate .
    If resolved dont forget to award few points.
    Regards

  • 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

  • Infotype 0120 - changes in adhoc query program

    Hi All,
    I have to make some code changes for the std infotype 0102 - Grievances NA in the adhoc query. My requirement is :-
    1) A range from 000-999 should be available for each Employee for the Grievance Number field. P0102-GRNUM.
    2) If a record already exists for the employee for a particular Grievance Number -GRNUM(e.g - 467) and Stage- GRSTG(e.g.- Stage1), the system should not allow to enter another record with the same Grievance Number and Stage for the same employee.i.e. No duplication should be allowed. i.e only 3 records for 1 Grievance Number as there are only 3 stages.
    Please advice me how to proceed for the same.
    Thanks & Regards,
    Preeti

    hi
    Its not getting clear that u want the changes for ADhoc query or in pa30.
    if u want validations in adhoc query as u have mentioned in the question
    u need not to go to a user exit.
    In adoc query itself u can incorporate these changes
    u can go to infoset of this query and write a abap code which checks the Infotype 102 for the grievance no.
    If u want the validation on while creating the record then u have to use user exit ZXPAUD01 or can use BADI's also .
    Regards
    Manish
    Award reward paoints If Useful

  • Adhoc query - length of service fields

    Hi all,
    I have question regarding the length of service fields in adhoc query (Actions infotype data fields PNP database).
    When I select these fields I get different results according to reporting period; if i select a keydate then the service is calculated according to this date, but if I select a reporting period, then the service is calculated according to the start date of the reporting period.
    Is this expected behaviour? Please let me know how this can be coded to reference the end date of the reporting period.
    many thanks

    Hi,
    Please check OSS notes 333517 and 357093. Both notes, though from 2000, contain detailed functionality and recommendation around u201Clength of serviceu201D.
    Hope this helps.
    Donnie

  • Adhoc Query HR

    Good Night.
    I am creating a adhoc query for HR.
    I create an Infoset in the T.Code SQ02, I am using the database PNP , add code abap for get data of other table in the the code section record processing.
    In the moment of Generate the system display a message warning
    Additional Fields
    **No code exists for additional field ZKTEXT,
    However the adhoc query work fine and get the data of the field ZKTEXT.
    The question is, There is some form in where the system no display this message of warning in the moment of generate the infoset?
    In this moment the field ZKTEXT is as a field of output , But There is some form in where el field  ZKTEXT. is  a field of selection. ?
    Regards

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

  • Adhoc query for HR.

    Good Morning
    I am creating a adhoc query for HR.
    I create an Infoset in the T.Code SQ02, I am using the database PNP , add code abap for get data of other table in the field additional ZKTEXT in the the code section record processing.
    In the moment of Generate the infoset, the system display the following message of warning
    Additional Fields
    **No code exists for additional field ZKTEXT,
    However the adhoc query work fine and get the data of the field ZKTEXT.
    1. The question is, There is some form in where the system no display this message of warning in the moment of generate the infoset?
    2. In this moment the field ZKTEXT is as a field of output in the Adhoc Query , But There is some form in where el field ZKTEXT. is as field of selection. ?
    Regards.
    sanew2

    *$HR$ [COMMON].
    *$HR$ PERSON_ONLY_ONCE = 'X'
    Regards

  • Adhoc Query Issue - How to restrict /SAPQUERY/H2 access

    Hi Experts,
    I have created two User Groups HR_1 (assigned to infosets for Time data) and HR_2 (assigned to Infosets for Payroll data). Also, I want to assign the HR_1 to a user Time_admin and HR_2 to Payroll_Admin, so that Payroll admin do not have access to Time data and vice versa.
    Now I can restrict the access but when I execute the Adhoc query for the user, I can see the User group that I have assigned with a default user
    group /SAPQUERY/H2, which has access to all data.
    My question is, how can I restrict the access for the /SAPQUERY/H2 for the users so that the users have only access to their user groups i.e.,
    Time_admin to HR_1 only and Payroll_admin to HR_2 only.
    Regards
    Vikrant

    I was expecting some Answer but was unfortunate enough.
    I have found a solution and will mention it for those who face this issue in future.
    Configuration in “The Global Area (Cross Client)”, has some limitations
    1)      1) Restricting the access via T-Code S_PH0_48000510 (Ad-hoc Query) is difficult as this t-code S_PH0_48000510 uses the user group /SAPQUERY/H2 to which an Infoset is assigned /SAPQUERY/HR_ADM. This infoset has access to all the master data and is standard one (default).
    2)      Also, this is available in “The Global Area (Cross Client)”, due to which there will be access to all HR master data.
    Configuration in “Standard Area, i.e., Client Specific”
    1)      With this approach, we will do the same configurations in “Standard Area (Client Specific)” i.e.,
    I.            Create User groups (ZHR_1 and ZHR_2)
    II.            Create Infosets (X1 for time management Infotypes and X2 for PM and PA Infotypes)
    III.            Assign User Groups to Infosets (X1 to ZHR_1 and X2 to ZHR_2)
    IV.            Assign Users to User Groups (As per the requirement)
    2)      Additionally, Admin need to do two things
    I.            For the Users Set Parameters via SU3 as:
    Parameters for Users for Time Data
    Parameter ID
    Parameter Value
    Description
    AQB
    ZHR_1
    ABAP Query: User group
    AQS
    X1
    SAP Query: Infoset
    AQW
    Standard
    ABAP Query: Query area
    Parameters for Users for OM/PA data
    Parameter ID
    Parameter Value
    Description
    AQB
    ZHR_2
    ABAP Query: User group
    AQS
    X2
    SAP Query: Infoset
    AQW
    Standard
    ABAP Query: Query area
    II.            Provide access to T-Code S_PH0_48000513 (also calls Adhoc Query but this t-code will respect the parameters set by us in SU3).
    III.            As a result of this approach, the Users on executing the T-Code S_PH0_48000513 will be directly moved to the Adhoc query screen with their authorized access.
    NOTE:
    these changes cannot be transported via Transport.
    Regards,
    Vikrant

  • Logical database in adhoc query

    Hello All,
    Can anyone tell me what is the logical database in adhoc query?

    Hi
    When you create a query , you have to select an infoset. Infoset can be considered as a source from which data is populated in the Query Fields.
    Infosets are created from Transaction SQ02.
    There can be four methods through which an Infoset can become a source of data:
    1.  Table join ( By joining two or more tables from Data dictionary)
         example: Joining tables PA0001 and PA0006 on Pernr to get a one resultant dataset
    2. Direct read of Basis Table ( Like PA0001 as a source for data in Infoset )
    3. Logical Database ( A Pre-written Program by SAP that extract data from clusters, tables taking care of authorizations and validity periods)
    Example : Logical database PNP, PNPCE (Concurrent Employement),PCH ( LDB for Personnel Development Data)
    Custom Logical DBs can be created in T_Code SE-36.
    4. Data Retrieval by a Program ( Custom code written by ABAP developers which will collect and process data) . This program has a corresponding Structure in data dictionary and the fields of this structure will be used in query)
    Reward Points, if helpful.
    Regards
    Waseem Imran

  • Problem in adhoc query

    Hi All,
    This is regarding a problem in the adhoc query.
    For one adhoc query in the selection field only personnel number is there. The adhoc query selects from 0022-infotype.In this case if the reporting period is ALL, all infotype records belonging to 0022 infotype are selected. Even if the end date of the infotype record is less than the initial date of Org.assignment.
    For the second adhoc query in the selction field only
    personnel area is there. In this case the adhoc query doesnot select infotype record belonging to 0022 infotype
    if the end date of the infotype record is less than the Org.assignment.
    Can anyone explain me this strange behaviour.
    Points will be rewarded.
    Regards,
    Aravind

    Some more additional info about the problem.
    Suppose in the selection screen there are 4 fields
    Company code, Personnel area, Personnel sub area and Personnel number.
    If you fill both Personnel subarea and personnel number,
    data record belonging to education infotype but whose end date is greater than the start date of Org.assignment
    infotype is not selected.
    But if you fill only personnel number the same data record belonging to education infotype is shown with blank values for Org.assignment.
    I tried debugging and found out that in the first case
    since there is no Org. assignment record for the time period of the education infotype nothing is shown.
    In the second case, it is allowed to be shown with blank values for Org.assignment.
    Any explanation for this behaviour?

  • 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

  • Blank entry in adhoc query

    Hi All,
    Im have created a data source with table joins T001W and T134M.
    Filed MANDT has been maintained when the join condition has been established at Data source level.
    Adhoc query in business rule identifies the deficiency. But some filed in the result has blank entry.
    Attached the screen shot for your reference.
    Can you please let me know, how to fix the blank entry issue.
    Thanks
    Ashok S

    Hello Ashok,
    In this case, you have foundation and plug-in in both systems. I assume you have set data source and business rules in GRC system, am I right?
    If this is the case, you might have several problems as before SP 10 for GRC 10.0, backwards compatibility was not implemented yet. It means that you must follow SAP note 1352498 in order to synchronize your systems.
    If this is not the case, have you checked these values in SCU3 in ECC system?
    Best Regards,
    Fernando

Maybe you are looking for

  • Help for first install of macpro with osx server

    Hello to all it's my first message on this forum, i'm seeking for help because i'm kind of new with Mac systems. I'm gonna explain the problem So we are going to buy a mac pro and put 4*2To inside with raid 5 and osx server. The problem is that the c

  • Is there a way to keep my 2nd, iMac connected monitor, from timing out?

    I own A 27" iMac that was purchased in late 2012. For the most part, I love this machine. The one thing that is a total drag, is that when I connected an Apple 30 inch Cinema Display to my iMac, using Apple's Mini DisplayPort to Dual-Link DVI Adapter

  • Multiple Accounts in ical

    I upgraded to Lion today. I have also transeferred my mobile me account to icloud. When i opened ical, my icloud account is multiplied by about 10 times so i can see 10 of each event. When i try and delete the accounts they just keep coming back, eve

  • How to use a variable to specify the color when setting an attribute

    Hi We are using BI Publisher (XDO) embedded in e-Business Suite. So we are effectively on version 5.6.3. I would like to conditionally set the background-color attribute of cells in a table by using a variable reference; something like this (the ways

  • Photo's not showing up inside Events

    When importing photos from my camera memory card, everything goes smoothly. I choose the new event I want to create and the photos import correctly. Although, when I go to the event in the event screen and "double-click" on the event, no photos show