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

Similar Messages

  • How to track changes in Adhoc query?

    Hi all,
    We have requirement for retrofitting  the changes done in one Server to other, in the process the Changes in New server should not be overwritten.Currently for Adhoc queries - we're downloading from one server-  loading to the New server.
    Is there any way to track the changes in Adhoc query to avoid overwriting the changes.
    Thanks  in advance.
    Harika.

    Hi,
    You can download the Employee wise Bank Details of IT0009 or using Adhoc query
    You have employee wise WT reporter
    Now do a Vlookup with the Employee Wt report  and the Adhoc query.
    If you have problems in vlookup
    pls send both the files to me on hemant.mahale capgemini com
    Regards
    Hemant V. Mahale

  • Adhoc query for Training & Event mgmt

    Hi,
    Can anybody guide me for design the adhoc query for training & event management. I needto extract data upto attende level from a particular infoset.
    Thanks
    Dadarao.

    Hi,
    I have got a query in AD-HOC query.
    After creating the Adhoc query using the join table functionality the resulting adhoc query does not results any out put.
    What I have done is :
    1.Created a user group through SQ03
    2.Attched user to My user group
    3.Created an infoset using join table functionality(SQ02).
    4.Saved and generated the infoset
    5.Added the user group to the infoset and than run the ADHOC query.
    The table I have used to join is all PA table (For test pupose)
    Though the purpose of the custom infoset is to join PA,OM and E rec infotypes, for testing purpose I have joined only PA infotypes.
    Result:The adhoc query does not gives any out put instead it says no data could be read.
    Could you please tell what else I need to do so that the custom infosets gives an out put.
    Will greatly appreciate your help.
    Thanks and best regards
    Rajeev

  • Adhoc query for OM infotypes

    Hi Experts,
    We have an adhoc query based on PNP logical database. But client wants to access OM infotypes data using that query. Can you guide me how we can do that?
    Thanks and Regards,
    Ashish.

    If you are looking to add few fields, you can create custom fields in function group and write code for them . You can create the custom fields by following steps.
    Go to t-code SQ02
    Give your infoset name go to change ->
    Click on "EXTRAS"
    Click "Paper u201CCreate " Pop-up will appear
    -Choose "Additional field" name as Zamnt1
    Give long text & header
    Like reference as u201Cpa0008-BET02u201D
    Code in screen u201Csave it"
    Go back to fields group and assign additional fields to your Fields group.
    Donu2019t forget to generate. You can create as many as fields this way.
    FYI https://forums.sdn.sap.com/click.jspa?searchID=14569976&messageID=5750674
          http://jelajahsap.files.wordpress.com/2008/01/abap-query.pdf
    Thanks,
    Khan

  • Text fields are not displayed for custom infotypes in Adhoc query

    We have developed a custom infotype , which we had incldued in the adhoc query.  when we generate output , it is showng codes instead of text . In the output filed , it is hwoing only vaue and Vale and text is diabled.
    please let me know , how to add text in the out filed filed
    thanks
    rajaram B bhat

    HI
    But in the out put filed , when  i click on the output filed , i am get three drop downs , only text , only value and valu & text.
    Only value is enabled and other two ate disabled.
    How to enable the othet two , i.e text only and value & text
    thanks & regards
    Rajaram B Bhat

  • How to adjust adhoc query when the database table changed.

    DearFreinds,
            I have created an adhoc Query , however after few days there was a requirement to remove some fields and change the length of some fields . Now the Adhoc query showing as to adjust , however when iam trying to adjust nothing is happening. Could any one let me know how to adjust with the table strucutre in the adhoc query.
    Regards
    madhu.

    Hi Sumit,
           Yes i have adjusted the database from se11 itself by going into utlity > adjust database . However i can still see the
    adhoc query -> infoset asking me when iam trying to go in change mode saying the database table has been changed do you want to adjust . 
    I have adjusted by going to more functions still there is no change. Please let me know what exactly i have to do.
    regards
    madhu

  • Adhoc query - Total payroll day issue on infotype 2001

    Dear Expert,
    I am working on the adhoc query and would like to generate the total number of payroll days taken by a particular employee.
    E.g. Employee A has 4 leave record in Nov 2011
    14-Nov, 16, Nov, 23 Nov, 25 Nov
    When I select the reporting period between 1-Nov-2011 to 30-Nov-2011, the total payroll days generated by the adhoc query is only 1. I am not sure why. Please help
    Best Regards,
    WF

    Hi,
    Might be remaining days are Non working days/Weekly offs/ Holidays falls..
    You Better Check through PA30 Overview of Absence records, Whether the Days are deducted from Quota or not.
    Need to check absence class in V_554s_0

  • Entry date not proper in adhoc query

    Hi,
    Entry date field in action infotype ( in the adhoc query) always returns 00.00.0000. Whereas the standard reports brings the entry date properly (This is from prelq.hiredate). How we can bring the values into this particular field.The feature 'ENTRY' returns DATYP but data is not maintained in IT41. System should bring the hiring action date (0000 start date) as the entry date. We want to use this entry date field in the adhoc query.
    Thanks in advance.
    Sreeja

    Hi Sreeja
    Please  read the following paragraph of the consulting note 508026 :
    "Exception:
    If the query is started with a key date selection, the query calls
    function module HR_LEAVING_DATE with the key date and not with the start
    and end date of the personnel action in which the key date exists. You
    can use modification note 562031 to change this system response."
    Please also make sure, that the corrections of note 561514 are contained in your system.
    I hope that this information be useful for you.
    Regards,
    Jun

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

    Hi Gurus,
    I am running 1 Adhoc Query.We are getting an error in Job description.
    We are passing Job code as input.For that job code it is not displaying Corresponding Job description.
    Ex :  Job Code -  - - -  1126
    This is the Data avilable in table M_PLOMC.
    Required Output  :  YOUTH SERVICE SPECIALIST    OTYPE2  =  C
    Current Output  :  ELEM TEACHER                           OTYPE2 =  S
    I specified OTYPE2 as C in the Infostet Code  to identify the Job description . SAVE and Generate
    i created new quey i can see the change code.
    If i run the Program behind the Query from SE38 it is displaying output Correctly.
    But if i run Query directly from SQ01 no Output.
    Bcaz of this Adhoc query also displaying No output.
    Please help me...
    What is this the difference in running program behind the Query and Running directly the Query?
    Here C specifies JOB.
            S specifies POSITION.

    Hi
    The program name is decided at the runtime...
    Might be you have taken the program name before doing some modifications to the adhoc query..
    Please check if the program name generated cuurently and the program name you are using the same...
    Thanks
    Sushmitha

  • Where do we specify Report category in HR Adhoc query

    Hi All.
    We have a standard query which shows a selection screen which is different in Production. When I went into the program behind the query and saw the report category, it is different in both the environments.
    I am not able to find where do we specify report category in the HR adhoc query.
    Can anyone please guide?
    Also, how is this possible that a standard report has different report category in Development and production env. ?
    Any help would be appreciated.
    Aishi

    Hi,
    There is no place in query, to maintain report category. Whenever an query is created, this table gets updated with default report category depending upon the LDB used. Now if you want to change this default screen to some other screen, then this is the only table where you can change the report category for that query or program.
    According to me, you have to maintain this table only, if you want different report category, since there is no place in query where you can do this.
    Hope this helps.
    Thanks,
    Sarika.

  • Adhoc Query data not getting displayed on Portal

    Hi,
    I have a problem with custom Adhoc query data not getting displayed on the portal.
    It was getting displayed initially but after a user made some changes to the query its not getting displayed.
    The query is displaying data perfectly on R/3 but on portal ..Its giving the message no data found.
    Can anyone help me on this.
    Also if anyone can tell me how do i debug an Adhoc query from potal.
    Is there any tool to debug an Abap program from portal.
    I dont want to use trace,
    Thanks
    GT
    Message was edited by: GT

    Hi GT
    find out the EXACT query u want to launch if it's display
    in BW buisness explorer then change the iview property
    for that query in portal . right click on iview
    BEx Web Application Query String -> assign correct query
    regards,
    kaushal

  • What does Adhoc query means

    Hello friends,
    The Report with tcode S_ahr_61016359 was persent in sap 4.6 c but now this tcode gives the message that this report was deleted use adhoc query instead in version ECC 6.0.
    can you tell what does this means.
    Regards,
    Vidya.

    hi
    good
    SAP HR Ad-Hoc Query
    One of the key requirements of a Human resources management system is the ability to facilitate decision-making use of the information in the system. The reporting functionality within SAP HR is one of the main reasons why clients have chosen SAP rather than another HRIS - one of our former research articles takes a closer look at the different reporting tools available and how to make most use of them.
    Reporting can become very challenging when the differing needs of many decision-makers - human resources, payroll and benefits professionals, line managers, and executives - must be met. SAP HR has responded to this challenge and offers a variety of access methods designed for the needs of different users. This article focuses on the functionality of Ad-hoc Query, a tool that still isn’t used by all companies who have SAP HR. Some of these organizations are still unfamiliar with the full potential of Ad Hoc query and are afraid to use it. This article has a closer look at how easy it is to use ad hoc query and how this simple but powerful tool can make your reporting so much more efficient and less time consuming.
    AD HOC QUERY AS AN IDEAL TOOL FOR DIFFERENT TYPES OF USERS
    The advantage of Ad Hoc Query is that it enables occasional system users or people with little experience to define their own reports according to their personal requirements in an easy and quick fashion. It is an ideal query tool for anyone who needs to obtain human resource information when and as needed.
    An overview of different types of available HR information (for example Personal data, Addresses, Basic pay, Organizational assignment etc.) is displayed in a list, which includes all the infotypes and the relevant fields, users need to pull the information from. This list is obtained by creating a functional area. Users simply select the information they want by marking checkboxes in the list. Report results can then be formatted to users' needs and preferences; for example the presentation style or the sequence of columns in the report can be changed. Users can create and then format the output of the desired report all in one screen and save the query to run it whenever needed.
    http://www.insightcp.com/res_15.htm
    thanks
    mrutyun^

  • Adhoc Query Vs SAP query

    Hi friends,
    Is there any difference between Adhoc query and SAP query.

    ADHOC QUERY:-
    Web item that enables you to create and change ad hoc queries in a Web application. You can use the Web item Ad-hoc Query Designer in the Web Application Designer to design Web applications in which you can create or change queries.
    SAP QUERY:-
    A tool that allows users who have no knowledge of the ABAP programming language to define and execute their own reports.
    To determine the structure of reports in SAP Query, you just have to enter texts, and select fields and options. If necessary, you can edit lists using Drag&Drop and the functions in the available toolbars.
    bye
    Naveen

  • 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

Maybe you are looking for