SQ01 Sap Query - additional fields doesn't appear

Hi everybody,
i've created a SAP Query with transaction SQ01 but one of my additional fields doesn't appear when i execute my Query.
My query shows the G/L account number and the field status Group (table SKB1)
I just need to display equally the text field of "field status Group" but it doesn't work.
When i look at the parameters i can see that it makes the link between the table T004G and SKB1 in order to find the textfield but the field stay blank.
For information T004g is a Pooled table.
Is someone could help me?
Thank you

Hi,
First you need to create a structure in Data Dictionary - SE11. This structure will contain all the fields that you want to display in the query output.
Example - Name the Strucutre as zz_infoset01
fields of the structure( for your requirement )
BUKRS
SAKNR
FSTAG
FSTTX
Go to T-code SQ02
1) Enter the Infoset name - zinfoset01 press create
2) Enter a Short Description - G/L Infoset - 01
3) select radio button - "Data retrieval by program"
               and in "data structure" enter   zz_infoset01
4) select "Integrated program" radio button
5) In the next screen click on the "Data reading program" push button(on the application toolbar)
6) An Editor will open with the following code
REPORT  rsaqdvp_template .
  declarations
  (insert your declarations in this section)
DATA:
  zz_infoset01                          TYPE zz_infoset01                          ,
  it_data TYPE STANDARD TABLE OF zz_infoset01 WITH HEADER LINE.
  selection screen statements
  (define your selection-screen here)
!! the following comment MUST NOT BE CHANGED !!
*<QUERY_HEAD>
  read data into IT_DATA
(select your data here into internal table IT_DATA)
  output of the data
  (this section can be left unchanged)
LOOP AT it_data.
  zq01  = it_data.                        .
!! the following comment MUST NOT BE CHANGED !!
*<QUERY_BODY>
ENDLOOP.     
7) when you insert your code in the sections it will look like this
REPORT  rsaqdvp_template .
  declarations
  (insert your declarations in this section)
Tables:SKB1,
          t004g.          
DATA:
  zz_infoset01                          TYPE zz_infoset01 ,
  it_data TYPE STANDARD TABLE OF zz_infoset01 WITH HEADER LINE.
  selection screen statements
  (define your selection-screen here)
!! the following comment MUST NOT BE CHANGED !!
*<QUERY_HEAD>
*These will be the input parameters for the query
parameters: sp_bukrs like skb1-bukrs,
         sp_saknr like skb1-saknr.     
  read data into IT_DATA
(select your data here into internal table IT_DATA)
*get all the G/L for com code and G/L in selection screen
SELECT bukrs saknr fstag
            INTO TABLE it_data
            FROM skb1
            WHERE bukrs = sp_bukrs
            AND   saknr = sp_saknr.
  output of the data
  (this section can be left unchanged)
*for every G/L get the status text from t004g for lang 'EN'
LOOP AT it_data.
SELECT SINGLE fsttx
                FROM t004g
                INTO it_data-fsttx
                WHERE spras = 'EN' "Language
                AND   bukrs = it_data-bukrs
                AND   fstag = it_data-fstag.
  zz_infoset01  = it_data.                        .
!! the following comment MUST NOT BE CHANGED !!
*<QUERY_BODY>
ENDLOOP.     
8) Save and generate the Infoset.By clicking on the generate button.
9) Now assign the Infoset to the query in SQ01 and select the output list fields.
let me know if you need more info. Also award points if helpful.
Regards,
Santosh

Similar Messages

  • SAP Query - Additional field that collects information from table RESB

    Hello gurus. I have a question.
    I want to create a SAP Query that shows me the stock level of a list of materials, and also show me the total quantity of order reservations in an additional field.
    I created an InfoSet with table MARD, which is the one that holds the Stock information in a plant. Then I created an additional field which would read information from table RESB, the table that holds order reservations per material.
    So I wrote this piece of code:
    SELECT * FROM RESB
    WHERE MATNR EQ MARD-MATNR and
           WERKS EQ MARD-WERKS.
    ENDSELECT.
    if ( sy-dbcnt NE '0').
          MOVE RESB-BDMNG to ZQTY.
    ELSE.
          MOVE '' to ZQTY.
    ENDIF.
    This works fine. However, this is currently just catching the first record in table RESB that matches my condition.
    What I would like is to collect every instance of RESB-BDMNG and add them to field "ZQTY", have it loop in RESB until it finishes finding every record that match the MATNR and WERKS. With this I could get the total number of order reservations that this material has in that table.
    Could someone share some coding that would help me achieve this?

    Yes! That did it. That's what I needed to do. Thank you so much.
    While I'm at it, let me ask you a related question.
    When I execute the query, in the first records of the query where there's no value from RESB to transfer, the value of field ZQTY appears empty. Once it finds the first record in RESB and it populates ZQTY with a value, then the rest of the records with no hit get the proper value of 0.
    Do you know why the first records in the query appear empty and not with a 0? Is there anything I should add to the coding to fix this?

  • Sap Query Additional Fields using  Abap Code

    Hi Experts,
    I am relatively new to the world of SAP query (Log Database PNPCE), I have written a number of additional fields to retrieve previous info-type data using the select statement E.G
    prev_endda = p0008-begda - 1.
    SELECT  single bsgrd
          INTO FTE1
          FROM
            pa0008
          WHERE pernr EQ  P0008-pernr
          AND   endda EQ prev_endda
    Although I can retrieve the previous info-type data , I was wondering if there was a easy way where I could take this a step further and show the Previous , Previous record. I.E
    Pernr     FTE Current    FTE1      FTE2
    101              60%          30%       75%
    I guess what I am asking is , is there a way to loop through the HR info-type records, does anybody know if there is a standard function or macro I can use to achieve this.
    Your help is much appreciated.

    Hi ,
    Thanks for our reply.
    I have pasted some example code into my additional field which I have created in SAP Query But im not sure how the loop bit works and how I can populate the additional fields that I have created , could you please explain this
    CALL FUNCTION 'HR_READ_INFOTYPE'
      EXPORTING
        pernr                 = '000000019'
        infty                 = '01'
        BEGDA                 = '18000101'
        ENDDA                 = '99991231'
      tables
        infty_tab             = p0008
      EXCEPTIONS
        INFTY_NOT_FOUND       = 1
        OTHERS                = 2
        LOOP AT p0008.
    NOT SURE WHAT TO PUT IN THIS SECTION *****
      ENDLOOP.
    I have created 3 additional Fields in the infoset Current FTE ,FTE1 FTE2 , and I want to loop through the records and populate the relevant Additional field with the employees FTE  (I only want to populate  where there is a change)
    Sample Data
    Begda              Endda             FTE        Salary
    1/1/2010         31/12/999       60%         19K          (Current  FTE)
    01/08/2009     31/12/2009     100%       27k           (FTE1)
    01/07/2008     31/7/2009         50%       17K          (FTE2)
    Thanks in anticipation
    DM

  • How to make SAP Query additional field as one of the selection field ?

    Hi experts,
    I'm working on a AdHoc query. I added some Additional fields to the infoset. I put Abap code to populate this additional fields as output fields but I want to make these fields as selection fields also.
    How can I accomplish this ?
    I'd appreciate any answer or suggestion.
    Thanks in advance.

    See Extended / Quick Search capability with attributes in the following SAP notes.
    [482338 - Using Extended Search in ISA B2B, ver. 30|https://service.sap.com/sap/support/notes/482338]
    [792556 - Quick search using several attributes|https://service.sap.com/sap/support/notes/792556]
    [888528 - ISA R/3 4.0: Extended catalog search not consistent|https://service.sap.com/sap/support/notes/888258]

  • SAP Query : additional field

    Hi,
    in my HR query i need to add a new field in infotype specific 9016 to be calculated by ABAP code.
    I perform the following steps :
    - transaction SQ02, i modify my info-set, in the node of my infotype i add a new field, i give a new name and a LIKE reference, and i generate the info-set, it's ok.
    - transaction SQ01 : i add my new field in my request, i check it and it's ok but when i run it, i have a dump : Function module "RPAQ_GET_AF_9016" not found.
    Can you explain to me how can i resolve this problem ?
    Cheers
    Edited by: CECG on Aug 25, 2009 11:08 AM

    Hi,
    What is the field you have referred to using LIKE statement? If this is infotype 9016, there  would be the corresponding table which holds the data for 9016 infotype(PA table...PA9016(i hope so and not sure of HR tables))....
    If so please refer to a dataelement for the field and then try to regenrate your query in SQ01 after adjusting the infotype in SQ02.
    Hope this helps
    Regards
    Shiva

  • Oracle report, some fields doesn't appear

    i have a receipt report , it contains many fields,
    sometimes when i call the report some field doesn't appear like date, or amount
    any help please
    report builder : 6i
    and the database is 10g

    sometimes when i call the report some field doesn't appear like date, or amountCould be because
    - you have format triggers on the fields
    - the query doesn't return any value for these fields

  • "Add a column to show each of these additional fields: " doesn't support person feild

    "Add a column to show each of these additional fields: "  doesn't support person feild
    I've seen that its not supported in 2010 version of sharepoint but I was hoping in the last 3 years  its been fixed for the 2013 
    Any idea if this will be fixed or not?

    Given that it hasn't been fixed so far, i doubt it.
    The reason it doesn't work for some columns is that they themselves  are a form of lookup column. I suspect MS have disallowed it to prevent looping, where a lookup column eventually starts trying to look up on itself. There may be other technical challenges
    to making a double hop lookup column.

  • 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

  • Sap Query custom field assigned to wrong field group (in extract)

    Hello,
    I want to add an extra field to InfoSet /SAPQUERY/MEBANF at EBAN level. I added a field in a normal way:
    I fill it with a constant value. I adapted Sap Query:
    In result, I got the value in new column but only for certain rows:
    The value is there only for EBAN rows which have EBKN entries related.
    I checked the program, and my new field is added to field group %fg07 with some other fields from table EBKN (not EBAN):
    Fields from field group %fg07 are inserted to extract only in event get EBKN, so if there is no entries in EBKN, my field will not be inserted into extract:
    I tried a lot of things (assigning my field to new field group in InfoSource, adding a field on EBKN level). I can say that every extra field created by me was assigned to field group &fg07.
    Am I doing something wrong?
    The target is to add new field in the document overview panel in ME2xN transaction. I know that there is user-exit EXIT_SAPLMEQUERY_002 where I can specify a Z* query. But this solution requires a copy of InfoSet and query to Z*. Adding a new field to standard Sap query is the fastest way.
    Message was edited by: Rafal Matuszewski
    Now I tried to append EBAN table with my Z* field. I regenerated InfoSet and query but the result is still wrong:
    insert EBAN-GSFRG into %fg06.
    insert EBAN-ZUGBA into %fg06.
    insert EBKN-VBELN into %fg07.
    insert EBKN-AUFNR into %fg07.
    insert EBKN-KOSTL into %fg07.
    insert EBAN-ZZDELIV_DATE_MRP into %fg07.   <-- here again the Z* field is assigned to field group related to EBKN table

    Thanks Sandra

  • SAP Query Custom Field with ABAP Code

    Hi All,
    I have a custom field in my SAP query which has some ABAP code under it. The code finally writes some value to a variable. My question is do i need to explicitly link the variable in the ABAP code to the custom field OR it's done automatically. For some reason i don't see any value for this custom field. Thanks.

    Thanks Sandra

  • SAP query text field

    Hi,
    I created a new customised field in infotype 9000 that has the same domain (but not the same component type) as p0001-stell(job).
    During sap query, i notice that this field only contain values and does not contain the text field. Please advise how i can add in the text field for this.

    Hi Lanwu,
    For the Custom field, let its domain be the same as the Sap standard field P0001-STELL ( JOB) . Do Not Change the Domain.
    Instead Create a Custom Data Element on this standard sap domain STELL and use ur naming convection for the text.
    Use this Customised or Z Data Element into ur Customised Field.
    Now wherever u use this field, the text specified in the data element would pop up.
    Thus u wont be touching the standard SAP Fields.
    Hope this helps.
    Jay Gandhi

  • Fields doesn't appear in SM30

    I have 2 custom tables . One which has no key fields ( other than CLIENT-MANDT ) field , while the other table has 4 fields as key. I used table maintenance generator for both the tables. Both these tables currently has no data in them. When i view in SM30 , i find the template for the second table , i mean the field names but no records- as no data in table.
    But for the first table , the template [just field labels] doesn't appear. I just get the message " No entries exist "
    Why is it so ?
    Thanks in advance,
    Asha

    Hello Asha,
    (and for everyone else having a problem with tables having only MANDT as key-field.. )
    It is very well allowed and supported in View Maintenance.
    But you should remember and realise one thing. MANDT field is never display on screen. Hence, if you have a table with only MANDT as the key-field, then you realise you do not need what is known as the 'Overview Screen'. It is also not supported Technically, as you are always handling only one record of the table - that belonging to current client!
    Hence, please goto your SE54, and change your maintenance type to two-step. Simply maintain a detailed screen, and re-generate your entire dialog. You will now see that when you access via SM30 now, you will always be directed to the detailed screen of your login client. Which is what is required functionally, am I right?
    Good luck!
    Cheers
    Rekha

  • SQ01 ABAP Query - input field contains leading zeros

    Hi,
    I have a ABAP query where some of the values are stored with leading zeros in the table. This means that the user have to enter the leading zeros as well in the selection screen in SQ01 in order to get any output.
    What I would like to do is to restrict the input in the selection screen to allow only the digits without any leading zeros. For example, the user should not enter 000000000602590, but 602590. Also, the output should be without the leading zeros.
    Does anyone know how to do this in the InfoSet?
    Thanks in advance
    Br,
    Lars

    Hi Lars,
    The leading zeroes are appearing because your field is either a Numeric or Packed decimal.
    The leading zeroes can be suppressed if you  assign the packed to a Character field.
    You have option to change the datatype of the field in Infoset.
    Try converting it to equivalent character type.
    Let me know your findings.
    Thanks
    Ajay

  • Dynamically created text field doesn't appear when imported

    Greetings,
    I have 2 issues regarding dynamically created text fields.
    What I'm trying to do is to create a text field inside a swf file,
    then import that swf into another file. The main problem is, the
    text field is created and displayed perfectly when i execute the
    first swf, but when i try to import the whole thing into another
    file, the text is not displayed.
    I have to point out that, when I add "stage" before the
    addChildAt command, the text appears, but I don't want the
    coordinates of the text box depending on it's location on the
    stage.
    The second problem is, I want the scroll buttons to appear if
    the text is longer than the text box, however they appear no matter
    what. I trace the values and they are correct, so I can't really
    understand why they keep appearing.
    Thank you very much for your help.

    The same thing is happening to me and it is starting to get annoying. I too am using Chrome and I think that might just be part of the issue. I am running a Macbook Pro 2010 13". Any insight on this would be helpful. Sorry I don't have a solution, but know that your not alone in dealing eith this issue.

  • Copy Z program into SQ01 - SAP Query

    Hi all,
    i have this situation that i need to put a z program back into SQ01, can this be possibly done.
    I have previously generated the Z program from a different client using SQ01.
    please advice....
    Regards
    William Wilstroth

    Yes,
       You can do.Because System will generate a program .After processing its own code next the code which is under START-OF-SELECTION will get executed.Here if u want your output in excel or in file you do it by useing function module for excel & opendatabase statement  for files.
    If you want to see the progarm of system generated ,first execute query you will get your selection screen.Now open one more session using tcode SE38 there you can see the system program in display mode.
    Note : if there is no requiremnet of using event  "RECORD PROCESSING" then use "LEAVE."  word under this.With this your program performance will get increase.
    Let me know if you want more details.
    Pls. reward if  it useful

Maybe you are looking for

  • Want to know details of Oracle Support.

    Hi all, i need a following details. 1.Upto which date oracle will support for oracl 9i,10g,11g databases and all application servers in oracle. Please advise asap. Regards, Reshu

  • ANNOUNCE XML conference for data management

    XML For Information Resource Managers October 27-29, 1999 Wyndham Anatole Hotel, Dallas, Texas http://www.wilshireconferences.com/xml The program covers XML for data management, enterprise application integration, corporate information portals, and i

  • Camera for portrait apps

    When you create a portrait view app in Siena with a camera control, the image is rotated as is the application was in landscape.   Is there now, or will there be in the future, a way to rotate the control so it displays properly? Thanks. Please remem

  • Losing dimensions in the Grid Layout

    I hope someone can point me in the right direction with some help.I created a report in 7.0 and it works fine. I switched pc's at work and when I open that report, the dimensions that were left in the POV, not rows or columns, are missing. When I ope

  • I am unable to operate DMM in instrument launcher

    Hello, I just installed software for the NI myDAQ. When I run Instrument Launcher and select DMM I am unable to select anything in the box. Nothing is lit up. It seems like the software is not responding to the myDAQ. This is my second time installin