Defining Switches for HR Adhoc Query

Good Morning,
I have the following doubts.
I am reading in a documentation  the process for Define Switches in Adhoc Query.
The definition of switches is located within the same dialog, where Coding has to be stored, that should be executed at Event DATA. You can use function u2018Gotou2019 -> u2018Codeu2019 -> u2018Datau2019 to access this dialog. All switches are defined using a dedicated syntax:
NAME_OF_SWITCH = 'value'
Whereas NAME_OF_SWITCH has to be replaced be the name of the switch and the value has to be specified using single quotation marks. Furthermore, each line containing the definition of a switch has to start with the prefix *$HR$.
For example the proper definition of the switch LAST_REORD_ONLY with value u2018Xu2019 looks like:
*$HR$ LAST_RECORD_ONLY = 'X'
There exists two different types of switches: switches that
However, I do the following steps:
1.T.Code SQ02. In the event DATA.
2. NAME_OF_SWITCH = 'value' , ie TEST = 'value'.
3.$HR$ LAST_RECORD_ONLY = 'X',
The system send error in the moment of Check Code.
"The last statement is not complete (period missing)"
Regards

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

Similar Messages

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

  • Text (T) symbol  for field kostl not found  in adhoc query selection

    Dear Freinds,
                  We have developed a custom infotype , as per our requirement one of the field i have added is the Kostl field ( this i have created exactly the same way in infotype 0001).
    I have to devlop a report using ADHOC Query based on this custom infotype , so i have developed a adhoc report ( selecting the logical database PNPCE option as it is not allowing for PNP), when i selecting  the required feilds from the Custom infotype i can see for the field KOSTL field doesnt have the symbol(T)  against the field . However for another ADHOC report when i am selecting from the infotype 0001 i can see the T symbol for the KOSTL . So i went and check in the custom type structur and transparent table as well , the search help etc is exactly same as that of the which are there for this field in the standard infotype 0001(Kostl). Because i have to display the description of the cost centre along with the kostl field , howeve iam able to get for Pernr descirption , for pernr iam able to see the T symbol against the field Pernr.
    Please could any one guide why this field doesnt have the   symbol  T.
    regards
    divya.

    Why don't you the same data element of the KOSTL.
    Eventhough you created your own infotype you can still use the stanadard data element.
    If you use the standard datatype you will get those feature avalable
    Warm Regards

  • Adhoc query for IT0041

    I was told that it is possible to create a separate 'Date for Date Type' for each 'Date Type' in the selection criteria of an adhoc query for IT0041. Can somebody help me with this please?

    Hi Sven
    Thanks.
    I created it with PCH , but very few fields are visible for IT1001
    Hence if I want to find chief of Org unit A, then I cannot find it as 'Relationship type/relationship' field of IT1001 is missing here.
    Basically I need all the fields which are displayed in IT1001 as shown below:
    Need your help to find the way out. Thanks
    KP

  • How to define variable for value range in Bex Query?

    Hi
    How to define variable for Keyfig. value range on runtime like characteristic in Bex Query?
    Example: On runtime user select one of the following condition:
    1)User want to those records where amount is greater than $1000
    2)User want to those records where amount is greater than $1000 and less than $5000
    3)User want to those records where amount is greater than and equal to $1000

    Hi ,
    Need to Use exceptions & conditions for this scenario's  & need to create variable for exceptions based on condtions.
    Below document provides steps how to make selections at run time for a kfg.
    http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/60b33a28-dca2-2d10-f3b2-d2096b460b1e?QuickLink=index&overridelayout=true&48842368468641
    Regards,
    Seshu.P

  • 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

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

    Hi Guys.
    Can some body help me creating an Adhoc Query for the active employees whose Qualifications along with there Name reflects, can somebody guide me in this regard.
    Regards,
    Venkat.

    Hi Venky,
    You can pull the qualification details using SAP quick viewer (Tcode SQVI) and using logical database PNP
    -> Go to Tcode SQVI
    -> give Query name and Create
    -> In the data source field, select Logical database
    -> In logical database give PNP or PNPCE
    -> Then in basis mode u can find IT 0024 in Planning data header
    -> and then select the list fields u need and the additional selection criteria also
    -> Then execute the query.
    With smile,
    Venkatesh kumar

  • Created on Date for Adhoc Query

    Hi Everyone,
    I have a requirement for creating a query which will list the adhoc queries created by the power users.
    User - Query - Infocube - Created on - No of Navs - Last Used.
    Is there a way to make the BW Stats system give me the 'Created on' Day. I know it has the Last changed date which can be either the day it was created on or enhanced on.
    Also (just a thought I had) .... No of Navs - this number denoted the number of times the query requested data (executions and drilldowns). Is there key figure which can give only the no of times the query was executed and not the drilldowns it made.
    Any suggestions will be greatly appreciated.
    Thankx!
    Kumar.
    Edited by: kumar saurabh on Aug 18, 2008 5:34 PM

    Hi..
    Pls check below code to fetch the tesxt of historical org unit. hope it will help.
    *//Internal table declaration.
    DATA : lt_00  TYPE STANDARD TABLE OF pa0000,
           lt_psn TYPE STANDARD TABLE OF zhrpositions,
           lt_ret TYPE STANDARD TABLE OF bapiret2,
           lt_01  TYPE STANDARD TABLE OF pa0001,
           lw_01  TYPE pa0001,
           lw_psn TYPE zhrpositions,
           lt_comps  LIKE zstr_hr_comps,
           lt_return LIKE bapiret2.
    Thanks,
    kl
    Edited by: Narayana on Aug 10, 2010 10:50 AM

  • Adhoc Query (How to add search help for IT0008-subty)

    Hello Experts,
    My requirement is to get the search help on Field
    <b>SUBTY IT0008</b>,
    Field SYBTY is already there in the infoset,
    but when query has been run and we try to select SUBTY values using F4 it doen't give anthing. 
    Is there is anyway of cusotmization to meet this requirement.
    Any help would be appreciated and awarded. 
    With regrads,
    Harsh

    Go to SPRO >Personnel Management>Personnel Administration>Payroll Data>Basic Pay>Define reason for change   here u can create ur own subtypes for Basic PAY Infotype 0008

  • Adhoc Query iview for IT0006 and IT0021

    Hi All
    SAP has given page in MSS for IT0006 and IT0021 - 'Generic iview Test Page'. This page has 3 iViews : one for employee search , second for IT0006 and third for IT0021. This page is working ok and retrieving data from back end.
    But If I replace IT0006 or IT00021 query with my own query then the error on Page is 'System cannot retrieve data'
    SAP standard query given in iview property is MSS_IT0006, If I replace this query with my query ZMSS_IT0006 then I get above error.
    I have created query ZMSS_IT0006 in  work area:- global , usergroup:- /SAPQUERY/MS
    Is there any aditional config need if we replace standard SAP query by our own query?
    Amit.

    in the adhoc query we can select the periods based on the frequency but the dates will not get default
    As in the Pay roll driver the dates get defaulted based on the settings made in Control Record Status
    so i dont think this is possible thru Standrad
    let wait for expert views

  • Template for Adhoc Query

    Hi
    I need to create a role  so that user can create and execute adhoc query. Please let me know the template that can be copied in this regard in BI
    Thanks in advance

    Hi,
    with Regards to WebI you can create on Report based on a Universe....Design it as needed and save it. Afterwards copy it for each new created Report on the Universe.
    With Regards to CR you can create your template and save it in the Template directory on your PC where CR is installed.
    Regards
    -Seb.

  • Pre-define filter for query in a BEx Report

    Hi all experts, I have a question, I have created a report with WAD and Query Designer, and I need a pre-define filter for different user or different role. Anyone knows where should I set this pre-define filter to the query ? In the WAD itself, or must do it in backend ? My scenario is, lets say User A login to this report, he will have value A, B, C as filter value in characteristic Z, User B login to this report, he will have value D, E, F as filter value in characteristic Z. Perhaps you guys can understand what I trying to say.

    Hi,
    You can set a customer exit variable on characteristics Z. the value for Variable is populated in customer exit written in CMOD using I_STEP = 1.
    You also need to maintain a mapping table for value of characteristics Z to user. Now if user A checks the Report, using the sy-uname you lookup to the mapping table and get the corresponding values of characteristics Z and populate the default value of the variable or straight away restrict it in the query by not making it ready for input.
    Hope it helps....
    Regards,
    Umesh

  • 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

Maybe you are looking for