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

Similar Messages

  • Custom code in HR Ad Hoc query

    Hi Friends  ,
    I am facing one issue where the custom ad hoc query is giving incorrect results so I have to overwrite the values in available  internal tables with my own logic , But I am unable to write the code at right point through Extras>create>code  path in SQ02   the values are populate after the point where i can right code . Request you to kindly help me .
    Thanks & Regards
    Gaurav Deep

    Hi,
    Write the coding in End-of-selection(before list) event. Your internal table would not be changed after this point.
    Regards,
    Srini.

  • 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>

  • How to Modify the Ad-hoc Query Infoset of Standard Area.

    Hi all,
    Am having problem with Ad-hoc Query.
    i need to modify ZHR_PA_01 Infoset, this is an infoset available in Satandard Area.
    For displaying the Infoset, am Unsing T-code : S_PH0_48000510
    As of my knowledge Using T-Code SQ01& SQ02.... we can create , Change, delete the Infosets of Global Area.
    But
    please any body can tel me,How to Change the Infoset of Standard Area
    How to add the New Field Group to this Standard area infoset.
    Thanks in Advance.
    Points will be rewarded.
    Regards,
    Kalam A.

    Hi Prakash,
    thank u very much,
    yes, i have added the new Infotype 9105 to data fields.
    1.but this infotype in Data fields is showing as P8003.
    could you tel me why this is showing like this.?
    2.i have a field "Priority" in the existing "Critical Role" Field Group.
    n My requirement is
    "Add the Priority Field text description as an additional output field. the Numeric value stored in the Proirity field can be lookied up in the YHRPRIOX table,Object Type ZR."
    3.After adding fields to newly created Field Group, is there any think to do the Coding or Changes.
    4.After adding i have saved it & Generated the Infoset, i got few warnings.
    and Could you tel me How to test this..??
    Could you provide me, if any links or materials for this..?
    Please dont feel bad for all asking all the questions
    Cos am very new to Ad-hoc Querry and i have gone through the Documents in Help.sap.com.Am unable to find the above questions.
    So
    Could you please answer to my questions.
    Thanks&Regards,
    Kalam A.

  • Questions in Ad Hoc Query & How to Configure the EEO standard reports

    Hi all,
      I have a  question in Ad hoc query report in HR.
    <b>How to:</b> Get a list of the total number of employees included in a particular report at the end of the report. Ex: If i create and run a report for salaried employees, sorted out by company codes, how can i get a sub-total and total no. of employees listed in the report.
    I tried Ranked format, but when you print the report it doesn't retain the report name on the top.
    -->I have a question regarding the Standard reports for EEO and AAP
    <b> How do I</b>
    1. Start configuring these report
    2. What are the things i should have before configuring it in IMG
    If anyone can provide me with some documentation regarding the EEO and AAP report configuration that would be great.
    Thanks in advance.....
    Harish

    This can be done using the security for the Infoprovider,  provide the users access to create queries only for that Infoprovider.

  • 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 disable Wizard in Ad-hoc Query Designer

    Hi everybody,
    I am using the Bex Ad-hoc Query Designer in a web application. The users should be able to define their own queries, but just for one info provider. I selected the info provider in the properties of the ad-hoc query designer in the web template.
    Now the users are able to create queries for all info providers with the wizard.
    Is it possible to disable the wizard or to disable all buttons at the top of the ad-hoc query designer.
    Thanks in advance,
    Joerg

    This can be done using the security for the Infoprovider,  provide the users access to create queries only for that Infoprovider.

  • 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

  • How to activate Show Set Operations in Ad Hoc query

    When I go into ad hoc query using an infoset I created the Extras > Show Set Operations and Switch off object selection functions are greyed out and I cannot select them.  On another infoset these functions are available for selection.
    Is there some setting in the info set creation that allows these function to be available for selection?

    closing question

  • How to make a custom field as text as well as value fied in ad hoc query

    hi,
      i have created a custom infotype 9004 in which the custom field contain the code values, and the text of this code values are maintained in another ztable.
    when i am viewing this infotype in Ad hoc query i am able to see this fields as only value fields and hence i am unable to get text for this field i.e when we right click on this field only the value option is enabled and the text option is disabled, both these options are enabled in some other standard fields like pernr(personnel no), persg(employee group),persk(employee subgroup).
       can anybody suggest me how to enable both these options for custom fields.

    Assign you table of text as a table text to the data element/domain of your custom field or thru external key on your infotype.
    Query is able to analyse these links.
    Regards.

  • 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

  • SAP Query vs. Ad-Hoc Query

    Hi guys,
    Can anyone explain to a newbie like me
    1. what's the difference between SAP query and Ad-hoc query?
    2. Can we link all SAP Queries to tcode and thus access SAP QUeries via Tcode?
    3. Ad-hoc query is unlike SAP query as in it cannot be accessed via Tcode, correct?
    4. Seems to me SAP query works similarly to custom abap queries. Thus, y don't we just used custom abap queries instead?
    5. Are the selection screens for all SAP queries the same? Cause I accessed 3 SAP Queries, and all their selection screen are exactly the same with fields like Object ID, Evaluation Path...
    Message was edited by:
            zhenmin wang

    https://www.sdn.sap.com/irj/sdn/wiki?path=/pages/viewpage.action?pageId=30083
    Please give me reward points...

  • 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>

  • Expand the Ad-Hoc Query

    Dear all,
    Can anyone tell me the steps in detail on how to add extra infotypes (which is not in the standard selection area, of course) in the ad-hoc query selection area? In my case, I need to search an employee's personnel number by alternative name in local characters (IT0182) of the employee.
    Thanks,
    Steven

    Hi Steven,
    While creating Adhoc query choose Logical databse instead of a database table.
    then you get a pop up to select the Infotypes. there you can select the multiple info types.
    Regards,
    Kumar.

  • 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

Maybe you are looking for

  • Urgent ! UWL configuration file

    Hello experts, Is it possible to create a new UWL  connector which can lauch all mails in CRM inbox  with modify the exist connector? If it's possible , how to do it ? Thank you. BR, Jianguo Chen

  • Tax rate

    I want a functionality though which I just change the VAT/LST/CST rate without changing it for every plant/region/material combination? regards VS

  • Link between documents and update the version

    Hi I have linked documents between different sites in Sharepoint. When I change the contain in the main documents and the Version is change from 1.0 to Version 2.0. Now the version for the linked document is still Version 1.0 in the document list. Ho

  • KDE, HAL, cannot open the non-latin mount point

    I just installed ArchLinux for a few days and there is a problem here: I use KDE and hal, USB disk and CDROM can be auto-mounted. But if the USB Disk lable or CDROM label is non-latin characters, KDE, actually, Konqueror cannot open that mount point.

  • Install of HP network printers failing.

    OS- Windows 7 32bit Printers-  Laserjet 2605dn and deskjet 6840 I had to reinstall Windows 7 because the spooler would not stay running.  That's working now.  When I try to install either printer through "devices and printers" it finds the printers o