ABAP Query layout issue

Hi,
I need to add a new column in a ABAP-Query, while adding this column and executing the same. The layout has changed from custom to standard one.
Is there any way to retain the custom layout in the "Basic List" while changing the Infoset Query.
Thanks in advance.
Best Regards,
Gopi

hi,
I guess the transaction code directly calls the generated ABAP program, which is the bad approach, because the generated ABAP program might have different names in different systems (like here). You have to create a transaction, which calls transaction START_REPORT with the following parameters/attributes filled :
D_SREPOVARI-REPORTTYPE= AQ "parameter indicating Abap Query
D_SREPOVARI-REPORT= '...' "Query User group
D_SREPOVARI-EXTDREPORT= '...' "Query name
Of course you have to replace the dots with real usergoup and query names. You create this transaction code in the development system and transport it to test and production. It will work everywhere (in case the query is transported as well).
hope this helps
ec

Similar Messages

  • Regarding ABAP query layout changes

    In 46C system, we have addon transaction ZXX created thru ABAP query displaying in ALV report
    layout fields in order A,B,C,D. But after upgrade to ECC5.0 we found the layout is changed to fields D,B,C,A.
    why its changed? Is it Patch problem or its SAP problem.
    However after upgrade we could manualy drag and drop the fields as per the 46C existing report layout
    it works fine.
    But we would like to know the reason why its happenning.?
    Could somebody give me suggestion.
    Regards
    Ambichan

    Hi Ambikumar,
    The ALV output layout is dependent on user settings.
    THe order of layout fields is changed bcz user has saved the new layout.
    In the output, check the ALV toolbar for CHANGE LAYOUT button. Click on it & check if anyone has saved any new layout. Delete the layout & you would alwyz get the fields in the same order as specified in the query.
    No need to modify the query using SQ01/SQ02.
    Simply execute the query & click button CHANGE LAYOUT.
    Best regards,
    Prashant

  • ABAP Query Layout

    I am asked to change existing abap query. I need to add some more fields in output display layout. How can i select fields for display.

    check this
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/abap/abap%20query%20-%20a%20quick%20glance.pdf
    aRs

  • ABAP Query - Sorting Issue in Basic List (SQ03)

    Hi,
        I have developed a ABAP Query. I want to sort some of the fields, for which I need to add some output fields to the sort sequence box in the Basic List page in SQ03/SQ01. But, I am not able to drag and drop the fields directly. Please suggest how can this be done? Thanks in advance.
    Best Regards,
    Tejas Savla

    Hi Abhishek,
    There are three things related to Query.
    1) You have to create the USER GROUP in SQ03.
    2) You have to create the Infoset in SQ02. In this infoset you can write the logic of the program/Query what ever you want to perform.So you can sort the table in the infoset in the program logic.you have to create the output table of the query.
    3) you have to create the Query in SQ01 and you have to associate the User group and infoset . you have to design the layput of the output you want to have.this output fields would be same as you have defined in infoset(step 2).
    hope this will help you.
    thanks
    Tanmaya

  • ABAP Query Layout not proper

    Hi experts,
    I am facing a problem regarding the output display of ABAP Query that I have created using SAP List Viewer.
    I have used logical database VFV in the query and some selection fields and some additional fields also.
    The output is shown to me as a list output rather than an ALV output.
    Please suggest a solution so that I can display the output in ALV format and not List format.
    Regards,
    Garima.

    Hi,
    I have got the error removed by ensuring that fields from one table are a part of one line ( taking help of ruler) only. But the underlying problem remains, the output is not ALV but List output.
    I do not think having additional fields in the query is reason for this.
    Is it bcoz iI am adjusting the output length of columns to ensure no hierarchical error ?
    Can we not have a query using LDB which is shown as SAP List?
    Regards,
    Garima.

  • ABAP query transport issue

    Hi,
       I have copied an abap query ZGA to ZGA_IND1 and changed the title to INDIA.  I gave transport number and released and transported to Quality. A transaction has been assigned to this Query
      But when I execute this query from Quality machine using transaction, it says program AQZZZGA=========ZGA_IND1======   is missing.
       Transaction code is transported but not the ABAP query program.  I retransported and failed couple of times.
    Not sure why underlying program is not transpoorted to Quality.
    Any idea, what I am missing here.
    Cheers.
    Sudhaker

    hi,
    I guess the transaction code directly calls the generated ABAP program, which is the bad approach, because the generated ABAP program might have different names in different systems (like here). You have to create a transaction, which calls transaction START_REPORT with the following parameters/attributes filled :
    D_SREPOVARI-REPORTTYPE= AQ "parameter indicating Abap Query
    D_SREPOVARI-REPORT= '...' "Query User group
    D_SREPOVARI-EXTDREPORT= '...' "Query name
    Of course you have to replace the dots with real usergoup and query names. You create this transaction code in the development system and transport it to test and production. It will work everywhere (in case the query is transported as well).
    hope this helps
    ec

  • ABAP Query Performance Issue .

    Hii
         I need to print a very simple list of materials & there corresponding latest movement date for a specified period of say '365 Days'.
              Now for this i have written a join on MSEG & MKPF tables .but the issue is,this join gives me a very large number of records as all the material documents for that material in that period are fetched ,then i sort this table descending on date & delete other records.
      I just need to get that record of latest date (material document with latest date).How could that be done without fetching the other records ?
    Regards
    Ajitabh

    1. try to create/ use secondary indexes on MSEG and MKPF.
    2. Dont use For all Entries in this Join .
    it should be like this.
    if s_matnr[] is not initial.
    select a~mblnr
             a~mjahr
             a~vgart
             a~budat
             a~xblnr
             b~zeile
             b~bwart
             b~matnr
             b~werks
             b~kunnr
             b~shkzg
             b~menge
             b~meins
       from  ( mkpf as a join mseg as b
       on    a~mblnr = b~mblnr  and
             a~mjahr = b~mjahr )
       into  table t_mseg
       where a~budat ge s_date-low     and
             a~vgart in ('WA' ,'WL')   and
             b~matnr in s_matnr        and
             b~werks in s_werks1       and
             b~sobkz eq 'V'            and
             b~kunnr eq w_cust         .
    endif.
    Regards
    Prabhu

  • ABAP Query: add field on layout based on Company code

    Hello Experts,
    I currently working on ABAP Query report  for asset master issues and would like one more field added to layout for Company code XXXX . Is it possible to add fields to this layout based on company code .
    Thanks in Advance
    Nupur

    Hello Andreas,
    I'm asking is that possible to change ABAP Query report layout based on Company code.
    For Instance:
    Company code :1111
    Layout should : A B C D E F
    other than 1111.
    layout should : A X Y Z F
    My scenario is :
    ABAP Query is working fine but users from UK wants some more fields on the layout but rest of the country users other than UK, they don't want such changes.
    Regards,
    nupur

  • Abap query issue.

    Hi ,
    I have an existing abap query whose infoset has logical database ADA.
    Now I have to add a new table ANLC to this existing query .
    My main task is to add 3 new fields in the output of the existing abap query  One is a direct field from the ANLC table namely  Acquisition value and 2 other fields will be derived from the following formula :
    anlc-Acc ordinary depreciation + anlc-Ord. depreciation posted = Total accumulated depreciation.
    NBV = Acquisition value u2013 Total Acc depreciation
    Could you please sugest:
    1.  how to add  the ANLC table in the query?
    2.  How to calculate the above two fields and populate the output in an abap query?
    Thanks,
    Suchi.

    No, above mentioned is not the solution for your problem.
    I believe you want to write ABAP Query (i.e. Tcode SQ01), NOT the SQL Query in a normal program.
    Now, if you want to put abap code behind a field in your SQ01 query then you need to create custom field in your infoset. To learn how to create custom fields I have written a blog: SAP Adhoc Query SQ01 SQ02 SQ03
    Good news is that you do not need to create custom fields for the requirement that you mentioned.
    i want to fetch data where one field begins with 1* or 2* or 3* or 4* .
    For this, simply put the field on the selection screen by selecting appropriate check box and just use 1, 2, 3* or 4* in on the selection screen.
    Where should i COUNT the data selected and display it .
    when you execute the report, click on the 'Layout' icon, and select 'Column for number of rows'. It will give you last row with count. You can then save the layout as default layout so that it appears automatically.
    If you want to do anything different than above then you need to create custom fields, see my blog for that.

  • Regarding layout of abap query

    hi all,
    i have an issue in the output of abap query. in output i have many columns with values, nw i have to insert two additional  colums in between of the existing output.how to do that???

    Thanks everyone,
    i have found out  how to add checkbox on selection screen of abap query.
    These are the steps:
    1.goto tcode sq02 (infoset)
    2.put it in change mode.
    3.Then click on 'extras' button on application toolbar.
    4.Then select 'code' tab and write your code there.

  • Issue in ABAP Query varient

    I have created the varient name CUS& for attaching the abap query varient in tranport request.  I have done this. but I am geting following error. please help me on this. thanks.
    The varient is created as Protected by default. I can't able to create the varient unprotected. Can you tell me how to create unprotected varient for SAP Query? becuase other user can't able to change the varient it is giving the error message with my user name as " No authorization to change the varient <varient name> Protected by <my user name>".
    Please could you help me how to fix it. this issue?

    Hi
    Thanks for your inputs.I am using ABAP query for first time. Can you advice where to check for same.
    Regards
    Dinesh

  • ABAP query issue when logoff error message query not created

    Hi All ,
    I created a ABAP query using SQ01 . I saved it and i'm able to see the output . But , if i logoff from the system and relogin again to system and trying to execute the query , it is showing an error message
    " The query has not been created " Please help me , is there any settings change or i have to do any thing else ?
    Thanks & Regards ,
    Sabu

    Hi ,
    Yes you are right , when i try that way i can see , is it the correct solution ?
    i have one more issue , i created the query , i can display and execute the query , but no one in the same system able to display or execute the query . What should i do .
    Thanks & Regards ,
    Sabu.

  • Issue in ABAP query

    Hi
      I have a doubt regarding ABAP queries . I need to pass the output of an ABAP query to another program . For this i want to know if the output of an ABAP query is stored in some kind of internal table or some other logic is used in that .
    Is it possible to send the ABAP query output to a memory structure.
    Helpful answers will be suitably rewarded.
    Thanks.

    Hi,
    program 1:
    from select query get the output to internal table
    so that with export and import u can attain this
    EXPORT t_sflight1 TO MEMORY ID 'SFLI'.
    SUBMIT pgm2 AND RETURN.
    program2:
    IMPORT t_sflight1 FROM MEMORY ID 'SFLI'.
    LOOP AT t_sflight1 INTO fs_string1.
    where in use the same internal table in both reports
    Reward Points If helpful.
    Regards,
    priya.

  • Help in the ABAP query

    Hi Friends,
    I am having issue in the ABAP query in the HR report, i can able to change the column Heading in the report, but the same header is not coming in the layout details fields(after executing the ALV report we have layout options where we could not see the same header as in the coulmn heading)
    pls help me to solve this issue,
    Regards,
    boobalan.v

    Hi,
    Once you have made some changes to the infoset/query, You need to adjust the infoset(SQ02) and then regenerate the query(SQ01)
    >Menu->Query/Infoset->More functions->Adjust/Generate program.
    Letme know if this is still not reflecting..
    Reward if useful
    Regards
    Shiva

  • Pnp- logical db in abap query

    hi.
    i need to create an ABAP/sap query. when i created the InfoSet i used logical db-pnp.
    if i want to get only the employees which entered my organization during the last month where should i add the ABAP code,  under which section => extras -> code. i have there several options - data, initialization, at selection-screen output etc, what to choose??????????
    thanks,
    Ami

    Hi
    Welcome to SDN forum
    query has got some limitatins compared to Reports which we write using SE38
    these queries are user specific and client specific and can't be transportable and you can't write your own code as you wish like reports
    see the doc
    http://help.sap.com/saphelp_46c/helpdata/en/35/26b413afab52b9e10000009b38f974/content.htm
    http://www.thespot4sap.com/Articles/SAP_ABAP_Queries_Introduction.asp
    Step-by-step guide for creating ABAP query
    http://www.sappoint.com/abap/ab4query.pdf
    ABAP query is mostly used by functional consultants.
    SAP Query
    Purpose
    The SAP Query application is used to create lists not already contained in the SAP standard system. It has been designed for users with little or no knowledge of the SAP programming language ABAP. SAP Query offers users a broad range of ways to define reporting programs and create different types of reports such as basic lists, statistics, and ranked lists.
    Features
    SAP Query's range of functions corresponds to the classical reporting functions available in the system. Requirements in this area such as list, statistic, or ranked list creation can be met using queries.
    All the data required by users for their lists can be selected from any SAP table created by the customer.
    To define a report, you first have to enter individual texts, such as titles, and select the fields and options which determine the report layout. Then you can edit list display in WYSIWYG mode whenever you want using drag and drop and the other toolbox functions available.
    ABAP Query, as far as I Believe, is the use of select statements in the ABAP Programming. This needs a knowledge of Open SQL commands like Select,UPdtae, Modify etc. This has to be done only by someone who has a little bit of ABAP experience.
    To sum up, SAP queries are readymade programs given by SAP, which the user can use making slight modification like the slection texts, the tables from which the data is to be retrieved and the format in which the data is to be displayed.ABAP queries become imperative when there is no such SAP query existing and also when there is a lot of customizing involved to use a SAP Query directly
    use either SQ02 ans SQ01
    or SQVI tr code
    for more information please go thru this url:
    http://www.thespot4sap.com/Articles/SAP_ABAP_Queries_Create_The_Query.asp
    http://goldenink.com/abap/sap_query.html
    Please check this PDF document (starting page 352) perhaps it will help u.
    http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCSRVQUE/BCSRVQUE.pdf
    check the below link will be helpful for u
    Tutorial on SQVI
    once you create query system generates a report starting with AQZZ/SAPQUERY/ABAGENCY2======= assing this report to tr code for the same
    Regards
    Anji

Maybe you are looking for

  • IMac black screen

    When I turn my computer on, I get the apple as usual.  Once that process is complete, the screen goes black.  Any suggestions would be helpful.

  • Value set table name in fusion app

    Hi Team, Can any one please tell me the table name which is used in fusion app to store the value set name which we create. Thanks,Ajay

  • Java.lang.Runtime.exec()

    When using the exec method I cannot get it to run the specified application when I try to use the Runtime.execString[] cmdArray) The application I am running is windump, it runs ok when I specify it in the Runtime.exec(String cmd) method. I need to u

  • Configure the SIP account ... (VoIP)

    How to configure the SIP account on my E61i to use it in my company(VoIP)?

  • AVCHD blown highlights in AE and Premiere Pro CS6

    Hi Guys, I have the NEX 5n and Premiere Pro CS6 on Windows 7 Workstation. It seems as if Premiere is geting the 0-255 16-235 Levels kind of wrong. AVCHD files of all kinds have clipped highlights when exposure on the NEX or any other camcorder is set