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

Similar Messages

  • Help in Ad-hoc query and Hr form editor

    any body have material links of Ad-hoc query(it means how the reports are generated with Ad-hoc query) and Hr form editor(with examples) plz forward it to me???????????

    Hi,
    HR Ad Hoc Query is the special version of InfoSet Query with the HR object selection.
    You can find the system documentation here:
    http://help.sap.com/saphelp_erp2005vp/helpdata/en/f9/cc9138e4a0341fe10000009b38f8cf/frameset.htm
    However I doubt the use of documentation of the query generator. So what is your concrete question?
    Or in any R/3 via application help of transaction SQ01.
    Also HR580 is a good course.
    Regards,
    Michael

  • Ad hoc query and Sap query

    Hi all
    What are Ad hod query and sap query? Why we use these two?
    thanks and regards
    Seenu

    in order to get the reports as per the client requiremnt
    we use the queries
    and the the data from these queries will be taken form PNP logical data based tables
    EX: in the standrad report for Absences
    the client may ask for
    PERNR   NAME    position   Department  Absence type start date Endate
    in the standrad report u can get the PERNR and Absence type and start date and end date
    but u cannot get position and department
    so we use  Queries we select the feidls from various reports and get a farmot as per the client reqiremnt
    Check SQ01  02  03 tcoeds
    u can alsoc check SQVI

  • 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

  • Transaction Code to AD Hoc Query

    I have created an Ad Hoc Query and Given it a name and saved it.
    Next Time when I wanted to execute that query I go to S_PH0_48000510 - Ad Hoc Query , select that query and press on Output to get the result. In between I have selected the setting "Start via selection screen" in Extras>Settings.
    Hence I get into the selection screen and while I execute, I go to the output result.
    What I am looking for is how to assign a transaction code to this query that I have created, so that I execute that transaction code I am directly into the selection screen. By means of this I can skip some of the steps like going to S_PH0_48000510 - Ad Hoc Query and then selecting the query and then the other steps.

    Both the ad-hoc and the SQ01 queries create a program that can be assigned to a transaction.  However, the program name that is generated contains a 2 digit code that is specific to the client you are working on.  This makes it hard to run the same transaction in DEV, QAS, and PRD.  Instead, create a parameter transaction that runs the START_REPORT transaction with parameters set that run the D_SREPOVARI-REPORTTYPE=AQ, D_SREPOVARI-EXTDREPORT=<sap query name in SQ01>, D_SREPOVARI-REPORT=<user groups belonging to the query>

  • AD HOC query (coding)

    Hi,
    I have Ad hoc query and in the selection screen I have  field(select option) for language , what I am trying to do is to make a login language  as default value for language field ,I tried throw SQ01 the only thing I could do is to add fixed value (for example 'EN') but need it to be login language.
    Its seems to be the only way is to write code But I donu2019t know how?
    PLEASE HELP.

    Defining ad hoc query you can select personnel number as output field by right clicking on "Personnel number" in "Key fields" group. In the context menu you can find "Output" and three possibilities:
    1. Only text - which is default and means an employee's name,
    2. Only value - which means personnel number,
    3. Value and text - in this case two columns are displayed: personnel number  and the employee's name.
    Regards,
    Renata

  • Ad-hoc query's program lost in SAP 4.7 upgraded box.

    Hello,
    Does anybody know what happen to the ad-hoc query programs
    after upgrading the box of SAP 4.6c to the SAP 4.7 ?
    What happen is that I had a transaction that would exec  the program created based on an ad-hoc query and now, after the box was upgraded to 4.7 the program doesn't exist.
    Can anybody give me an answer, please?
    Regards,
    Oli

    Hi Oli,
    Depending on how AD-HOC it was created.
    - If created within DEVELOPMENT CLASS $TMP, sorry mate, but this cannot be upgraded with the system.
    - If ad-hoc created as personalized to one user, sorry mate, no automated upgrade possible.
    Other causes might be, that your query uses data objects that no longer are available on the system (likely customer developed structures).
    Hope this gives you some hints.
    Regards,
    Rob.

  • Write code in ad hoc query

    hello All,
    I have a reqmnt, My client has an existing ad hoc query and I need to add two fields to it, both of the fields are not direct and needs some coding, cud anyone please explain how can i go bout it?
    thanks,
    RS

    Its quite straight forward, so just have a play around, but the steps are something like:
    1.     SQ01/environment/info sets/query areas/standard
    2.     Choose the info set you wish to change
    3.     Choose the filed group you wish to add a field to
    4.     Right click the infoset you want to add a field to
    5.     Add the new field to the field group for that infoset
    6.     Then use the extras button to add code to that field
    I tend to use the initialization, and record processing event blocks for adding my code.  USe the eblow link for the SAP documentation.
    http://saphelp.user.ad.glasgow.gov.uk:8000/saphelp/helpdata/EN/d2/cb3efb455611d189710000e8322d00/frameset.htm
    And here is some sample code i've used for one particaulr field, just to give you an idea of how easy it is.
    rp_provide_from_last p0000 space pn-begda pn-endda.
    * Get last Ity2001 record
    IF p0000-massn = '16'.
      SELECT SINGLE pernr max( endda )
             FROM pa2001
             INTO (p2001-pernr, p2001-endda)
                  WHERE pernr = pernr-pernr
                  GROUP BY pernr.
    ELSE.
      rp_provide_from_last p2001 space pn-begda pn-endda.
    ENDIF.
    SELECT SINGLE UMSKD
           INTO WA_UMSKD
           FROM Y0PT_AMMSUBS
                WHERE PERNR = p2001-pernr
                AND   ENDDA = p2001-endda.
    wa_OCCHC  = wa_UMSKD(2).
    occhealth = wa_OCCHC.
    <a href="http://saphelp.user.ad.glasgow.gov.uk:8000/saphelp/helpdata/EN/d2/cb3efb455611d189710000e8322d00/frameset.htm">http://saphelp.user.ad.glasgow.gov.uk:8000/saphelp/helpdata/EN/d2/cb3efb455611d189710000e8322d00/frameset.htm</a>

  • Ad-hoc Query & Ad-hoc Query Designer

    Hi Experts,
                   Please present some information about following question:
    1) Ad-hoc Query and Ad-hoc Query Designer.
    2) Under which senario we go for Ad-hoc Query instead of normal query.
    3) How it will be effective in reporting.
    4) How to get into Ad-hoc Query Designer, coz i couldn't  find anything in the Bex
    points vl be rewarded.thank you.
    Regards,
    Vasanth.D

    Hi,
    Check out the following link:
    http://help.sap.com/saphelp_nw70/helpdata/en/08/965b423be8de54e10000000a155106/frameset.htm
    Regards,
    Kishore

  • Scheduling Ad hoc query

    Dear all,
    I have created Ad hoc query and I would like to schedule a job to run this query and export the result into a local file (Unconverted txt file).  I would appreciate your letting me know the useful links to guide me the procedures to take.
    Thank you,
    Kiyomi

    On the selection screen of an ABAP query there is the field "file store" which I am guessing you can use to save the file to.
    In SM36 it is fairly easy to set up a job
    You need a job name and then go to the step list.
    You need to enter the program name, which if you save a variant of the query beforehand it should populate the query's program's name. You then need to add the variant. (have a look at the external command option)
    Once this is all done you then need to define the frequency of the report, this is done in the start condition screen. You need to select the date and time icon.
    Hope this helps more.

  • Ad-Hoc Query for OU's and their Cost Center

    Cost Centers are often inherited from parent OU's. If I try to make an Ad-Hoc query, select some OU's and show the Cost Centers via the relationship A11, the fields are empty unless the Cost Center is hardcoded for the OU.
    Is there a way to create an Ad-Hoc query that shows the Cost Centers even if they are inherited? I can't make any changes to system tables or other customizing.
    Thanks in advance!

    Unfortunately I'm not authorized to use SE16.
    This is my selection:
    Object ID: xxx (Selection)
    Object Type: O (Selection)
    Plan Version: 01 (Selection)
    Relationship Between Objects: 011 (IT1001)
    Relationship Specification: A (IT1001)
    Type of Related Object: K (IT1001)
    Output:
    Object ID (IT1000)
    Object Abbreviation (IT1000)
    Object Name (IT1000)
    ID of Related Object (IT1001)
    Any other way?

  • Addition of new fields and sub dields in ad hoc query

    hey all,
    hey friends i would like to know how to add additional fields and the sub fields in ad- hoc query.
    i had tried sq02 and went on creating new field but it is nt adng there and no options of sub fields are visible.
    note: i am entirely new to sap hr.. so plz try and help me out in a laymans language.

    At the Date Field, there is 1 node call the Additional fields.
    Then Right click the Additional field and choose create >> additional field.
    Then enter the field name, description, Data type and length.
    After that right click the newly created field name and choose code
    Then enter some simple code.
    E.g.
    For IT2006 the table does not provide the quota balance. If order to display the quota balance we can create an additional field call ZBalance. Then at code section enter the code ZBalance = p2006-anzhl - p2006-kverb.

  • How to schedule reports to be run and sent from Ad-hoc query.

    Dear Abapers,
    I got a requirement in which the user wants to know how to schedule reports to be run and sent from Ad-hoc query.
    Regards
    Venkat

    Ask him to look more carefully at the menu : Quickview > Execute > Exec. in background, then click on schedule
    Regards,
    Raymond

  • AAP and EEO Report by Ad Hoc Query

    SAP Gurus,
    My client went live with basic modules of SAP Jan 2007. The problem is with AAP EEO Report. We will develop ABAP report later. For now we want to generate the AAP EEO report by using Ad Hoc Query. We are storing the EEO and AAP codes in IT1610  for Job. If I have to build query what is the best way :
    1-     I tried an infoset with  PNPCE and apart from the basic PA infotypes I selected 1000, 1001 and 1610 for job. But when I select EEO and AAP category in output I don’t get the actual data. I know I am doing something wrong here but don’t know what ?
    2-     If I will start a table join with IT0000, IT0001,……….etc and V_T5U13 …….will it work ?
    Any other suggestions how can we address this issue temporarily by ad hoc query ?
    Sanghamitra

    First, do not try and reinvent the wheel...the EEO-1 and AAP reports are standard supplied SAP reports and can be found under Human Resources --> Personnel Management --> Administration --> Infosystem --> Reports --> Administration US --> Compliance.
    The EEO-1 report is changing for 2007 and the latest support packs must be installed to give you the new tables and table entries, features and report layout needed for this year.  See SAP Notes 976273, 435204 and 986115.  The IT1610 itself changes as do the definitions, so the support pack installation is a must,
    If you still want to try to get this information via Ad Hoc Query, you will need to utilize a PCH based Infoset.  Create this based on the object Position.  The position is your link between the person with HR Master Data and the Job with job related data such as IT1610.  With this infoset, you can do the reporting on the EEO Job classes from IT1610 and the Ethnic groupings from IT0077-Additional Personal Data for the employee and gender from IT0002.

  • IT 001, PPOME AND AD HOC QUERY

    hi
    i have an issue regarding all employees that their job description is ok in ppome but wrong in IT 001 and in ad hoc query
    can any one have solution?

    Hi,
    In table T77S0 (transaction SM30) you can set up what will be transferred to PA IT 0001 from OM:
    'X':  Transfer short text of org.unit to Personnel Administration
    ' ':  Transfer long text of org.unit to Personnel Administration
    PLOGI     TEXTC for Job
    PLOGI     TEXTD for Org.Unit
    PLOGI     TEXTS for Position
    Cheers

Maybe you are looking for

  • Anyconnect-win-3.1.03103-pre-deploy-k9.msi failed on Win 8.1

    Hi! Currently we are using 'anyconnect-win-3.1.03103-pre-deploy-k9.msi' package. On WinXp, Win7 are succesfully installations possible. On Win 8.1 I get the error: Source = Event Viewer Product: Cisco AnyConnect Secure Mobility Client -- Error 1722.

  • Enterprise Portal Source code

    I need to customise the login page and logged on page. Please help me out in finding the source code of the portal. so that i can make changes. Thanks in advance Arun

  • Classic scenario: Update shopping cart with changes in backend PO?

    The Shopper would like to have visibility in their shopping cart (SRM 5.0, classic scenario) of changes made to the follow-on PO created in ECC6. Is it possible for the cart to be updated with changes made to the backend document, or would the custom

  • I can't get the trial to install

    I can't get the trial to install as it says I have no internet connection. I do have an internet connection, help?

  • Computer with MS Office Died

    A few months ago my computer died under warranty, it also came with a preinstalled version of ms office student edition. I got a replacement computer but now I cannot use office even though I still have the product key and microsoft can't help me out