Query output list - SQ01

Hi Friends,
When i execute a query by tcode SQ01 & save the result in local file (unconverted) as text format, then it gives many unescessay fields, like header text, description date cloumn headers etc.
I want only the result (ASCII characters) that are seperated by space or either "tab" only.
Can it be done through "Encoding" ? or do we need to change the query itself ?
Please help.
regards,
Rohit

Yeah it is clear visible that, the same combination might have available in different plants.
So to avoid the duplicate entries, always select all the primary key fields available in all the tables in the output.
If not atleast try restricting based on plant in the selection screen or any possible duplicate entreis.
So add the key fields at Infoset level in SQ02

Similar Messages

  • Appearing Duplicate column in  ABAP QUERY  output list.

    Hi ,
             I have created a report using SAP QUERY having issue on output display  showing duplicate columns  name Weight Unit (LIKP-GEWEI ) and rest          of  field area  coming fine .
                  Kindly help to solve the issue .
             Thanks .

    Hi,
    The currency and quantity units get automatically displayed based on the currency and quantity fields on the output list. However you can restrict it by selecting those fields and choose No currency fields before or after and apply.
    How to do?
    1. Goto SQ01, provide your query name and select "Infoset Query".
    2. Now choose the currency/quantity fields on the lower bottom of window.
    3. Right click on the field and traverse to Unit->Do not Output.
    Hope this helps!
    Br,
    Maju

  • Change layout of Adhoc query output list for Custom infotype

    Hi All,
    The fields in the Infoset query output on a custom infotype are aligned with the fields u2018payment typeu2019 and u2018amountu2019 appearing repeatedly(in columns) as declared in the Infotype and the output will be a long horizontal list.
    Instead, the requirement is that the output list should show vertically so that If I choose u2018Payment Typeu2019 and u2018Amountu2019 as output fields, it will show a long vertical list as in the case of a standard infotype (IT0008).
    Also, this way enables user to use Payment Type as a selection criteria so as to just pulling the needed payment type. When we use IT0008 in the infoset it works fine but in custom IT it does not work.
    Any pointers/suggestions on how we can achieve this would be helpful.

    Hi yu liang,
                     You can find vendor list having Vendor No. & without showing total liability for every vendor.
    after executing the report,
    1.You need to select "change layout (ctrl+F8)",
    a small window comes, it has two part -> column content & hidden fields.
    then u select "Vendor" from hidden field & move it to column content.
    2. at column content there is a column named "Total". u need to remove check for your column name "amount".
    now select "copy" button or enter. u will find the req. report.
    u can save it also by ur name.
    hope its helpful to u.......
    plz, reward points as a way of thanks if helpful...

  • ABAP query output not showing all output fields

    I added a new field group in an existing query and marked them to display in the output list. When I test the output from SQ01 -> InfoSer Query, the output is what I expect. However, if I execute the query itself, it does not show the additional fields I just created.
    I notice that in the Basic List layout design, the new fields are on a new line and not appended to the same line as the output fields before I did the modifications. I already tried to manipulate the output length and positions, but it didn't help. I turned on the ruler to drag the fields in the desired positions, sometimes it works but not for all the fields. Can someone help me please?

    I figured it out already. The maximum width for the report output is 255 only. Switching from graphical query painter, I got the error that some fields were overlapping. Then I recalculated the starting positions of the fields and adjusted their lengths. 

  • How to store output of SQ01 into internal table.

    Hello Experts
    How to store output of SQ01 into internal table.
    Thanks,
    Umesh

    You can't store the sq01 output into internal table.
    Once you create the query it will generate the abap program, in that program you can see the contents.
    Regards
    Sasi

  • Regarding rental object-I want to add some fields in output list?

    Hi,
    I am creating Ze program of transaction REISROOC.I want to add some fields in the output list .
    here logical database is used & for adding some fields i need to write Select query.
    how n where should i add this query?
    can anyone help me????
    Thanks,
    vaishali

    Solved
    Edited by: vaishali patil on Mar 2, 2009 1:32 PM

  • Writing a function to find whether a value is present in a sql query output

    Hi gurus,
    I would like to write a function to which i will pass a value and a sql query as parameters.
    Now the function needs to execute that sql query and find whether the given value is present in the output list
    when the query is executed. If it is present it should return 'T' otherwise 'F'
    My function will look like
    CREATE FUNCTION CHECK_VALUE(VALUE VARCHAR2,V_SQL VARCHAR2) RETURN VARCHAR2
    SELECT CHECK_VALUE('Dallas','SELECT LOCATION_CODE FROM HR_LOCATIONS')
    It should check whether the value 'Dallas' is present in the output list returned by the sql query.
    Any help will be appreciated.
    Thank you.

    CREATE OR REPLACE
      FUNCTION CHECK_VALUE(
                           VALUE VARCHAR2,
                           V_SQL VARCHAR2
        RETURN VARCHAR2
        IS
            RETVAL VARCHAR2(4000);
            REFCUR SYS_REFCURSOR;
        BEGIN
            OPEN REFCUR FOR V_SQL;
            LOOP
              FETCH REFCUR INTO RETVAL;
              EXIT WHEN REFCUR%NOTFOUND;
              IF RETVAL = VALUE
                THEN
                  CLOSE REFCUR;
                  RETURN 'T';
              END IF;
            END LOOP;
            CLOSE REFCUR;
            RETURN 'F';
    END;
    Function created.
    SQL> SET SERVEROUTPUT ON
    SQL> EXEC DBMS_OUTPUT.PUT_LINE(CHECK_VALUE('DALLAS','select loc from dept'));
    T
    PL/SQL procedure successfully completed.
    SQL> EXEC DBMS_OUTPUT.PUT_LINE(CHECK_VALUE('PARIS','select loc from dept'));
    F
    PL/SQL procedure successfully completed.
    SQL> SY.

  • Ad-Hoc query output issue

    Hello Experts,
    Recently we have upgraded the system and we are facing issues with Ad-Hoc query output.
    Issue : After entering data in selection fields and click on "OUTPUT" button we  are getting output. now I changed the selection field  data and click on "OUTPUT" button then we are getting message "No Data selected".
    But when clicked on "HIT LIST" button for changed selection fields then we are getting HIT LIST count and after click of "OUTPUT" button we are getting output.
    So at this point this is unclear why it is working after HIT LIST? This is not consistent but appearing most of the time.
    Regards,
    Saurabh

    Thank you for reply. Yes I have checked SQ03, 02 and 01.
    It is not specific to particular query it is appears to be for all the queries.
    The important thing is to get the output we need to click first HIT LIST button and then OUTPUT. Is there any specific settings maintained for displaying output without clicking HIT LIST ?

  • Jump to search term in a query output...

    Hi,
    I have the results of a query outputted in a table. Depending
    on the user, this can be a longish query - maybe 100+ results. All
    these results have a checkbox next to them. The user checks the
    records they need to select, then submits the form to take that
    list of records in the "check" variable to another page which
    processes it.
    What I'd like to be able to do is provide a search box on top
    of this table, for the user to type in a search term in the record
    they want to find. Then, I'd like the page to jump down to that
    record so the user can check it. But here's the kicker - I don't
    want to lose any other already-checked boxes. So the form variable
    needs to persist, even if this is done multiple times.
    Any ideas on how this might be accomplished? I don't mind if
    the search has to be tied just to one field, etc. And I'm not
    asking anyone to write the code for me. Just point me in the
    direction of the right technique/technology, if ya can.
    Thank you!

    Hi,
    It might be worth checking out some of the Ajax libraries for
    this. jQuery (
    http://jquery.com) has a plugin
    called ScrollTo (
    http://plugins.jquery.com/project/ScrollTo)
    that lets you easily scroll to a specific position or element (or
    other) item on a page. The developer has more details on his site (
    http://flesler.blogspot.com/2007/10/jqueryscrollto.html).
    You could use the ScrollTo plugin in concert with one of the
    Auto Complete plugins for jQuery (one of them:
    http://bassistance.de/jquery-plugins/jquery-plugin-autocomplete/).
    Hope that helps get you started.

  • SAP Query: How to filter records from SAP Query output before display

    Hi Friends,
      Can I delete records from an SAP query basic list before it is displayed?
    For example I want to delte all the orders whose system status is "RELEASED" before the basic list of that SAP query is displayed.
    I have gone through SAP help and found out that we can write some code in <b>END code</b> section which will execute before the basic list of the query is displayed. But I could not figure out how the code this...following is an excerpt form SAP help.
    <b>"The END-OF-SELECTION code consists of two parts (Before list output and After list output). The first part is processed before the list is output and the second part afterwards."</b>
    Can anybody help me?
    Regards,
    Bharat.
    Message was edited by:
            Bharat Reddy V

    Try this simple procedure. <b>Hope</b> this should work for you.
    You do the slection of the status in the List-Processing. say your final field of status flag is GF_STATUS.
    Immediatly after that use this within the List-Processing.
    CHECK GF_STATUS EQ '<RELEASED STATUS>'
    How it works:
    SELECT  <>       "<-------Query processing(system code).
    *< Your code put in the List processing
    CHECK GF_STATUS EQ '<RELEASED STATUS>'   "< --only released records passed.
    *>
    ENDSELECT      "<-----Query endselect(system code).
    Please let me know the result.
    Regards,
    A.Singh
    Message was edited by:
            Amarjit Singh

  • Query output into cfmail

    I need to send an individual email to about 100 names fetched
    from an Access 2003 database. I am fetching the distinct emails
    from the database and getting each Project owned by each distinct
    email address.
    I created the correct output on a test web page where the
    query will list every distinct email address with each email
    address having their own Project Title listing. Now the question is
    how do I use my output to send an individual email to each of the
    distinct email addresses I got in my query??
    For example someone with the email Address of
    [email protected] would get one email with his Project Title
    listings that could be 3 or 4 titles. The next distinct email
    address of [email protected] will get his own email with his
    Project title listings.
    Here is my attempt but the #userEmail# has everyones email
    address.
    <cfoutput query = "theQuery" group = "userEmail">
    <cfmail to: #userEmail# subject: Project Listing
    <cfoutput>Project Listing:
    #ProjectTitle#</cfoutput>
    <cfmail>
    </cfoutput>
    Please help.

    Jazzy has the correct answer. And if your project listings
    reside in seperate tables, you need to run a seperate query within
    the loop BUT outside of the cfmail in order to retrieve those. So
    that would then be...
    <cfquery name="rs_read" datasource="xxx" >
    SELECT *
    FROM #session.sometable#
    WHERE whateverid = '#variables.whateverid#';
    </cfquery>
    <cfloop index="loopcount" from="1"
    to='#rs_read.RecordCount#' step="1">
    <cfquery name="rs_projects" datasource="xxx" >
    SELECT projects
    FROM #session.sometable#
    WHERE email = '#rs_read.email#';
    </cfquery>
    <cfset variables.proj = ''>
    <cfoutput query="rs_projects">
    <cfset variables.proj = variables.proj & ' ' &
    rs_projects.projects>
    </cfoutput>
    <cfmail from="[email protected]" to="#rs_read.email#"
    subject="#rs_projects.whatever#">
    bla bla #rs_read.anyvariable#
    PROJECTS: #variables.proj#
    </cfmail>
    </cfloop>
    REMEMBER: You can not nest outputs in outputs, that's why you
    can not run the query output inside CFMAIL because CF regards
    cfmail as an output routine.

  • Programme required for query output

    Hi,
    We have created a Query in system which will give output of non-printed invoices in system. User select these invoices list and prints it manually.
    Now user has comeup with a requirement that he wanted a programme that selects the query output (non printed invoices) and that automatically adds the output type XXXX.
    Pls let me know does anyone know about such progrmme??
    Thanks in advance
    Srikky

    hi,
    1. sorry we have some limitation in query.
    2. copy the logic into Zprogram and create newly.
    3. add check boxes for each invoice in teh report.
    4. keep select all and deselect all push buttons on the top.
    5. write a SPOOL request inside the program which converts into PDF.
    6. and execute for getting print out.
    or
    an out put is generated automatically when you save an invoice.
    requisites:  a spool program has to be attached to the driver program and execute the spool by selecting it.
    regards,
    balajia

  • About Query Output

    Why the Query Output format changed from 'Layout' to 'SAP List Viewer' after added some codes?
    How to modify it back?
    Edited by: abpjoel on Dec 2, 2010 2:45 AM

    你好!
    如果可以的话,你可以给我样例吗? 我想在我们的系统里,查一下有没有这个问题。
    还有你们系统的basis support package可以告诉我吗?

  • T.code FBL5N: a problem with the print of the output list

    Hi All,
    with reference to the t.code FBL5N, I have  a problem with the print of the output list of the report.
    When I execute the print, I obtain one customer for each page printed.
    I wonder if is possible to obtain more customers for each page printed.
    Could anyone help me?
    Thanks
    Gandalf
    Edited by: Umberto Gandalf on Dec 21, 2008 10:36 PM

    Hi,
    Though personally i havent tried this option, check the same
    Go to Menu: Settings >> Switch List
    This will make the value displayed in ALV format and then try taking print outs.
    Regards,
    Sridevi

  • How to select the output list check boxes

    Hi ABAP gurus,
       I am developing the on report, it display the output list, in that output list first column is Check box,
    here i created the 3 Pushbuttons on application tool bar,  one pushbutton is SELECT ALL, 2nd one is DESELECT ALL , 3rd one is CREDIT NOT CREATE,
    here when i click on the Select all button it will select all the check boxs and click on the credit not button  it will create credit memos for all the customers,  if i select the one or more than one check boxs, it will not working means (Credit note will not be created for that paricular customer)
    plz tell me answer, if u know the any example programs related to this program plz send me.

    Hi,
    refer this sample code.
    AT USER-COMMAND.
      CASE sy-ucomm.
        WHEN 'F2'.
          PERFORM selection.
        WHEN 'SELECTALL'.
          PERFORM selectall.
        WHEN 'DESELECTAL'.
          PERFORM deselectall.
      ENDCASE.                             " CASE SY-UCOMM
    *&      Form  selection                                                *
          Selecting records of basic list and display flight information *
          No parameters transferred                                      *
    FORM selection .
      DO w_lines TIMES.
        READ LINE w_lineno FIELD VALUE w_checkbox INTO w_checkbox
                                    fs_spfli-carrid INTO fs_spfli-carrid
                                    fs_spfli-connid INTO fs_spfli-connid
                                    w_mark INTO w_mark.
        IF sy-subrc EQ 0.
          IF w_checkbox EQ 'X' AND w_mark NE '*'.
            w_mark = '*'.
            MODIFY CURRENT LINE FIELD VALUE w_mark
                                FIELD FORMAT w_checkbox INPUT OFF.
            SELECT carrid                  " Airline Code
                   connid                  " Flight Connection Number
                   fldate                  " Flight date
                   seatsmax                " Maximum capacity
                   seatsocc                " Occupied seats
              FROM sflight
              INTO CORRESPONDING FIELDS OF TABLE t_sflight
              WHERE carrid EQ fs_spfli-carrid AND connid EQ fs_spfli-connid.
            IF sy-subrc EQ 0.
              LOOP AT t_sflight INTO fs_sflight.
                WRITE :/2 fs_sflight-carrid,
                       10 fs_sflight-fldate,
                       25 fs_sflight-seatsmax,
                       45 fs_sflight-seatsocc.
              ENDLOOP.                     " LOOP AT T_SFLIGHT INTO....
              ULINE.
              CLEAR t_sflight.
            ELSE.
              MESSAGE text-001 TYPE 'S'.
            ENDIF.                         " IF SY-SUBRC EQ 0
          ENDIF.                           " IF W_CHECKBOX EQ 'X' AND .....
        ENDIF.                             " IF SY-SUBRC EQ 0
        ADD 1 TO w_lineno.
        CLEAR w_checkbox.
      ENDDO.                               " DO W_LINES TIMES
      w_lineno = 3.
    ENDFORM.                               " Selection

Maybe you are looking for