SQ02 - Ad Hoc Query - Custom additional fields

HI experts
I am working additional fields in SQ02 .
I added a new additional field for an info type in SQ02.
Issue is when I right click on my additional field I can see options 'Only value' but for other fields I can see ' only value ' , 'only text' and ' value and text' .
When creating the new field in SQ02, the check box "Determine LIKE reference using text field" is disabled.
Is there is configuration somewhere or any other way, where I can also get the text for the custom additional field?
I can see that this question has been asked earlier, but there are no responses.
Also on SAP documentation, this field is shown as enabled.
But I cant get the text for a additional field working. Please coyu post your suggestions?
Thanks,
Vaishali

Hello Srini,
Thank you for your time.
Consider the additional field SYHR_A_P0001_AF_PL_CTRY (country) in Infotype 0001 in the infoset.
This field does not populate any country code or text for us, so I need to create a custom additional field that will have the same functionality.
I have created two new additional fields - Z_Country_Code and Z_country_text in additional fields section of IT0001.
One field fetches country code and other fetches the text corresponding to this code.
What I want to achieve is the standard functionality that is available for standard fields - P0001-WERKS for example.
In the query output, you could select to display text/code/ text and code.
For the additional field "Country", I have to select two separate fields - Z_Country_Code and Z_country_text  to achieve the same  functionality.
How can I achieve this?
When we define a custom additional field, in the field definition section, there is a check-box "Determine LIKE reference using TEXT FIELD" , but this is disabled when I create the additional fields. Perhaps, if this is enabled, then I can define the text table.
Any ideas how to enable this text box?
Vaishali

Similar Messages

  • Sap query and additional fields.

    Hello guys.
    ABAP it's not my strong skill, but i need to develop some report.
    What i need:
    input: material, SLED, plant
    output: material, SLED, plant, values from characteristic field.
    I have created sap query with additional field type c.
    Below my code:
    TYPES: BEGIN OF charast,
            ATNAM(50)    TYPE c,
            ATWTB(8)     TYPE n,
            X(50)        TYPE n,
            C(50)        TYPE n,
            ATINN(50)    TYPE n,
            END OF charast.
    DATA: char TYPE TABLE OF charast WITH HEADER LINE.
    CALL FUNCTION 'VB_BATCH_GET_DETAIL'
       EXPORTING
         MATNR              = MCH1-MATNR
         CHARG              = MCH1-CHARG
         GET_CLASSIFICATION = 'X'
       TABLES
         CHAR_OF_BATCH      = char.
    LOOP AT char into TEST (This is an additional field type C.
       ENDLOOP.
    Questions:
    1. How i can return internal table into standard abap type, because i can create additional field only with standart types.
    2. Need i fetch exporting parameters before calling FM? Or sap query do it automatically, based on given values on selection screen of the report?
    3. How i can return only needed field from FM output? Now, when i'm executing FM via SE37 it's show desired result, but when i'm getting it from code i see strange values.
    4. If i don't know exactly return by an FM values, how i can fill structure dynamically?
    5. How i can return result of a program not only to additional field but to layout?
    Sorry for noob questions and thank you in advance guys!

    Well, seems like it work fine for me.
    Below my crappy, but working code:
    DATA: material TYPE MCHB-MATNR,
           batch    TYPE MCHB-CHARG,
           plant    TYPE MCHB-WERKS,
           sloc     TYPE MCHB-LGORT,
           gtdt     TYPE STANDARD TABLE OF clbatch,
           gtdit    TYPE clbatch.
    SELECT MATNR INTO material FROM MCHB
       WHERE MATNR = MCHB-MATNR.
    ENDSELECT.
    SELECT CHARG INTO batch FROM MCHB
       WHERE CHARG = MCHB-CHARG.
    ENDSELECT.
    SELECT WERKS INTO plant FROM MCHB
       WHERE WERKS = MCHB-WERKS.
    ENDSELECT.
    SELECT LGORT INTO sloc FROM MCHB
       WHERE LGORT = MCHB-LGORT.
    ENDSELECT.
    CALL FUNCTION 'VB_BATCH_GET_DETAIL'
       EXPORTING
         MATNR = material
         CHARG = batch
         WERKS = plant
         GET_CLASSIFICATION = 'X'
        TABLES
          CHAR_OF_BATCH = gtdt.
    READ TABLE gtdt INTO gtdit
       WITH KEY atnam = 'BATCH_SHELF_LIFE_EXPIRY_DATE'.
    GTD = gtdit-ATWTB.

  • Ad-hoc  Query - Travel Privilege Field Group

    Hi am new to this Ad-hoc Query...
    can any body tel me this.
    Asia HR is currently using/assigned to AQB : ZHR_UG_01 ABAP Query: User group and AQS: ZHR_PA_ASIA SAP Query: InfoSet which does not include the Travel Privilege Field Group.  The same Travel Privilege Field Group is already included in the Global infoset AQB - ZHR_UG_01 - ABAP Query: User group and AQS - ZHR_UG_01 - SAP Query: InfoSet
    Please tel me how to create ASIA HR as per the requirement.
    Thanks in advance..
    Regards,
    kalam A.

    Hi Kalam,
    seems that you simply have to add this field to the use InfoSet in transaction SQ02.
    Regards,
    Michael

  • Adhoc query -sq02- Additional fields

    HI experts
    I am working additional fields in SQ02 .
    I added a additional field for an infotype in SQ02  .Issue when I go to Tcode PQAH and run the query .I Could not able to see the selections check box for my additional fields which is useful to select as input field .
    And when I right click on my additional field I could see  options 'Only value'  but for other fields I could see ' only value ' , 'only text' and ' value and text' .
    If any one worked on these kind of issues .Please give pointers .and requirement is specific.

    Hi Kamesh,
    I have the same issue - did you resolve this issue, and please could you share how?
    Thanks,
    Vaishali

  • SQ02 - Query with adicional fields

    Hi, I need your help to develop a query with additional fields.
    The case is that:
    In my query I only have a table VBAK and my propose is that this query returns me the quantity that are in a sales document for some material that should be selection parameters.
    So I create 2 additional fields: one that is the u2018 Material u2018 that have no codification and other that is the quantity that have the code:
    select single ZMENG into quantity from VBAK where matnr = material.
    But the result is null, I don't know why.
    Can you help me?
    Thanks in advance.
    Dora

    Hi,
    MATNR is not available in VBAK !
    You have to create first an info-set using SQ02 : here you link VBAK and VBAP, and select the fields you need.
    From SQ01, create a new query where matnr is a selection field ....

  • Additional fields in infoset query can not be used as datasource fields

    I create one infoset query with additional fields (using ABAP code) in R/3. When I create datasource RSO2 using this infoset query, system only show all fields without additional fields that I enhanced in infoset query. Does that mean we can not get additional fields information in generic datasource creation that we enhanced in infoset query?

    dear Awa,
       you are enhanced some fields in r/3.right that fields are  shown in
    rsa6 select your data source click on display your datasource then select
    extract structure its shows how many fields are haveing particular
    datasource .or otherwise goto rso2 select your data source display
    double click on  your extractstructure  its show how many fields haveing
    the particular datasource. check the Rsa6 what ever fields you newly added that field default hide mode
    you remove the hide tickmark.

  • LSMW Customer additional Data fields.

    Hi  everyone
    I m trying to do Lsmw By data migration fields value from excel  to  customer additional  fields but, when starting the recording I cant find the additional data fields  KNA1-KATR6  KATR7 KATR 8
    can anyone help  please
    Regards
    Zac

    Hello Zac,
    When recording it - In the Address screen click on  environment and additional data field. There you can see all attribute fields.
    Thank you for your time.
    Regards,
    Siva.

  • Ad Hoc Query Data Issue for Position Based Infoset

    Experts,
    I've created an infoset that is based on the S object using the PCH database.  For this infoset, I've included several infotypes with focus on 1000, 1001, and 1028.  I've included the Address infotype (1028) as this is where we store our work location information.  For some reason though when I attempt to pull information from 1028, specifically the House Number and Street field, the Postal Code field, and the City field.
    For some reason though, no data is being returned in those fields.  I've verified for the position (in PP01) that I'm querying on that the data is maintained in 1028, and I've verified that I'm attempting to report on the correct fields by verifying the field technical names I'm pulling in the Ad Hoc Query with those I know have data stored in them on the infotype for the specific position.
    Would anyone have any guidance on what could be happening here or what I might need to adjust to be able to pull this data?
    Thanks in advance for your time and help.
    Best Regards,
    Joe

    To add some further clarity to this item, the Address infotype on the Position (S) object is pulling from a dropdown of selectable Buildings.  If unfamiliar, the Building drop is populated by configuration data from the IMG.  The fields that are populated then in the Address infotype actually come then from the Building entries and are simply populated onto IT1028 (address) depending on which Building is selected.
    I think this is what it occuring then when I select the fields from the Address infotype and I see nothing populated in the Ad Hoc query since the field information is not actually stored in IT1028 but on in the Building entry.
    Has anyone else experiencing this particular problem?  If so, have you found a solution?
    Regards,
    Joe

  • SQ01 - Additional fields

    Hi friends,
    I generated new infotipo for personnel evaluation. Now when new infotipo i want to use it in trx. SQ01 to do query, the additional fields, are not seen. They are fields with description texts. How I can see those fields of infotipo?.
    Thank you very much,
    Regards.

    Were not the fields because query badly was made.
    Thanks.

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

  • Ad Hoc query Addition Field code

    Dear Experts,
    I need amend Ad hoc query to be able to report on Expected End MPP Q0088-EEMPP, It is not a standard field in the infotype for SE16 or SAP Query/Ad Hoc. We need to be able to query off this field. Can someone please point me in the right direction about how to get the calculated value from this field added to queries, or what code is needed.
    I have created an additional field in SQ02, i probably need code to make it fetch the data
    thanks
    haji

    Hi,
    Please take a look at standard function module HR_GBSMP_MPP_DATES. It returns the expected end date.
    Hope this helps.
    Donnie

  • Problem text additional fields Query ad-hoc

    Dear All,
    We created a query using an additional field in the structure created P0001_AF. The fact is that our field has an associated text, which indicates how the output of our query, but the text always appears empty.
    The field has duly informed the function that is responsible for recovering the text and it works well.
    Running the standard report is generated with the query (AQA0HCM ========= XXX ....) we realized that fields of the table P0001 read well , then read it the text associated with our field of P0001_AF, the problem is that after reading this right will find again our field Z in Table P0001, and as there is, delete the recovered value above.
    This code is standard and can not be changed. We also found no customizing to generate the program otherwise.
    Do you know any solution? Is it a standard problem?
    Thanks & Regards

    hi ,
    this field might not be running in std reports but you can do below
    did you created a local field in sq02  , and add custom coding at that field according to correspondig field text.

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

  • Adding code to additional fields in Ad Hoc Query

    Hello,
    I am trying to add code to existing additional fields available in IT0001 - Field SYHR_A_P0001_AF_PL_CTRY.
    I have added code in the field code section, but the field does not get populated.
    I also tried to add code to Start of selection / Record processing sections, but the values are not populated.
    What am I doing wrong?
    Thanks,
    Vaishali

    Hi Vaishali,,
       Your question is not clear, no probs. you plz check  this code !!
      FUNCTION zhrintf_om_pernr_info_adhocqry .
    ""Local Interface:
    *"  IMPORTING
    *"     VALUE(FI_PERNR) TYPE  PA0001-PERNR
    *"     VALUE(FI_BEGDA) TYPE  PA0001-BEGDA
    *"  EXPORTING
    *"     VALUE(L_MC_STEXT) TYPE  HRP1000-MC_STEXT
      DATA: dep_text(40) TYPE c,
            l_plans TYPE pa0001-plans,
            l_sobid TYPE hrp1001-sobid,
            l_mc_short TYPE hrp1000-mc_short.
    Get Employee Position ID
      SELECT SINGLE plans
        FROM pa0001
        INTO l_plans
        WHERE pernr = fi_pernr
              AND begda LE fi_begda
              AND endda GE fi_begda.
      l_sobid = l_plans.
    Check if OU is Department
      IF ( l_sobid NE '00000000' ) AND ( l_sobid NE '99999999' ). " Terminated Employee
        WHILE NOT ( ( l_mc_short(1) EQ '2' ) OR ( l_mc_short(1) EQ '1' ) OR ( l_mc_short(1) EQ 'X' ) ).
          SELECT SINGLE sobid FROM  hrp1001
                 INTO l_sobid
                 WHERE  objid  = l_sobid
                 AND    rsign  = 'A'
                 AND    sclas  = 'O'
                 AND    begda LE fi_begda
                 AND    endda GE fi_begda.
          SELECT SINGLE mc_short mc_stext FROM  hrp1000
                 INTO (l_mc_short, l_mc_stext)
                 WHERE  otype  = 'O'
                 AND    objid  = l_sobid
                 AND    begda LE fi_begda
                 AND    endda GE fi_begda.
    Empty l_mc_stext if OU is not Department
          IF NOT ( ( l_mc_short(1) EQ '2' ) OR ( l_mc_short(1) EQ 'X' ) ).
            l_mc_stext = ''.
          ENDIF.
        ENDWHILE.
      ENDIF.
    ENDFUNCTION.
      Regards
    Zulfikhar Ali

  • Additional field in selection screen of a abap query

    Hi,
    I am adding a new additional field in the selection screen through abap query(using transaction SQ02) which is of type VBRK-FKSTO.
    The value entered can be 'X' or empty space.But the value which is entered in the selection screen is not getting reflected in the code.Kindly advice me on what needs to be done to capture the selection screen value in the code.
    Regards,
    S.Subasree

    Hi
    You can add new field in VFX3 selection screen as follow. In the report code we can see various explicit enahcement points provided by SAP.One of them is ENHANCEMENT-POINT sdblbddl_01 SPOTS es_sdblbddl STATIC. Here you can declare your selection screen parameters.  Then in the processing i can see a call customer fucntion happening in VBSK_DISPALY which you can implement to add your logic.
    Thanks
    Nabheet

Maybe you are looking for

  • Will I be able to transfer movies from a windows pc to my iPad?

    And how would I do that? And what does iTunes have to do with it? Do i have to install another app from the store to make that video work on my iPad? Sorry I'm really new to this Been an android user and was just used to dragging and dropping files.

  • X-Fi Audio Console Launcher not in system t

    Since my new install of Windows, I can't get the Console Launcher for my X-Fi Elite Pro in the system tray anymore. On my previous install it was there from first install, even after updating the software and drivers, but now it seems to have dissape

  • Home sharing error 5599

    Hi, can anyone help on this, i have just had to reset my brothers Apple tv 2nd Gen (model no A1427), because of a problem with movie genres disappearing...and i now get the error message of 5599 when trying to setup home sharing on win xp machine...I

  • Entering serial Number on Expired LR4 Trail Version

    My trial LR4 has expired.  I have a serial number.   When I start LR I get a screen that says my trial has expired and LR will now quit.   My only option is to press OK, and the program quits.   I have read other responses, telling me to use the HELP

  • Volume button controlling camera???

    My iPod 4g has a cracked screen. Now when I go on the camera and turn the volume up or down it takes pictures. I'm not sure if its due to the crack or not. Any help on this would be appreciated. Like if it's supposed to do that or not. Also it seems