ABAP QUERY , Tcode SQ01, operator OR

Hi
I want to create a query that list the purchasing orders created or modified during a given period. however, the creation date and the modification date are two different fields stored in differents tables.
if I have these two fields in the selection creteria screen, the relationship between them will be the operator AND. so this will not enable me to have the information targeted.
My quetion, is there a possibility to have the Operator OR in the first selection creteria screen , between these 2 fields.?
the tables are:
for the creation EKKO
for the change :
MECDGRID
CDHDR            Change document header
CDPOS            Change document items
thanks

Hi you there.... you can try this
1) create an abap report with the following source code
REPORT ZRUN_QUERY .
                      DECLARACIÓNES                                    *
DATA:
REPORTNAME LIKE AQADEF-PGNAME.
PANTALLA DE SELECCION                                                *
SELECTION-SCREEN BEGIN OF BLOCK B0 WITH FRAME TITLE TEXT-001.
  SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME.
  PARAMETERS: P_BGNAME LIKE AQADEF-BGNAME OBLIGATORY,
              P_QUNAME LIKE AQADEF-QUNAME OBLIGATORY.
  SELECTION-SCREEN END   OF BLOCK B1.
SELECTION-SCREEN END   OF BLOCK B0.
CUERPO DEL PROGRAMA                                                 *
CALL FUNCTION 'RSAQ_REPORT_NAME'
     EXPORTING
          WORKSPACE  = SPACE
          USERGROUP  = P_BGNAME
          QUERY      = P_QUNAME
     IMPORTING
         REPORTNAME = REPORTNAME.
CALL FUNCTION 'RSAQ_SUBMIT_QUERY_REPORT'
     EXPORTING
          QUERYREPORT       = REPORTNAME
          VARIANTE          = SPACE
    EXCEPTIONS
         ONLY_WITH_VARIANT = 1
         VARIANT_NOT_EXIST = 2
         OTHERS            = 3
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
2) Create a transaction for this program
3) Create a parameter transaction and execute this report passing by parameter the usergroup and Query, then, the program will automatically solve the program name and execute it.
Regards,
Daniel

Similar Messages

  • I am designing ABAP query in SQ01 i have not get one field MATNR

    Dear All,
    I am designing ABAP query in SQ01for MEK2 for Report.
    I  have not get one field MATNR
    I have two table konp and konh i have design in SQ1 i am not get field regarding this table .
    Please Help me.
    Thanks in Advance.
    Regards
    Kumar

    Dear Clemens
    I want MATNR FIELD related to these table.
    I am using KONP AND KONH TABLE .
    Regards
    Kumar

  • Schedule a ABAP query from SQ01 to transfer the output to a file path

    I am trying to schedule an ABAP query to run every night and transmit the output as a .TXT file to a particular file path on a server. In the "output format" of the selection screen I selected the second last radio button "File store" and entered the full path and file name.
    When I run this in foreground I get a pop up window confirming the file path before it is downloaded. I have to just hit enter. But when I run in background the file gets transmitted to the spool and not to the file path entered in "File Store".
    Is there any way I can make the file go to the specified path instead of the spool?
    Any help will be appreciated

    See documentation for enhancement SQUE0001. Go to SMOD, enter SQUE0001, and choose documentation.
    I had the same requirement, and I used enhancement SQUE0001 to create a screen exit that adds the selection, "private file". I then created a variant for my query with the private file button selected and the path included, and set up a batch job to run my query with my variant every night.
    Hope that helps.

  • Can we assign Transaction code to created  ABAP Query of  SQ01

    Hi ,
    Friends I want to run the abap query assigning t.code to it .. i will be thankfull if any body give me the steps or remedy .
    thanks

    Hi you there.... you can try this
    1) create an abap report with the following source code
    REPORT ZRUN_QUERY .
                          DECLARACIÓNES                                    *
    DATA:
    REPORTNAME LIKE AQADEF-PGNAME.
    PANTALLA DE SELECCION                                                *
    SELECTION-SCREEN BEGIN OF BLOCK B0 WITH FRAME TITLE TEXT-001.
      SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME.
      PARAMETERS: P_BGNAME LIKE AQADEF-BGNAME OBLIGATORY,
                  P_QUNAME LIKE AQADEF-QUNAME OBLIGATORY.
      SELECTION-SCREEN END   OF BLOCK B1.
    SELECTION-SCREEN END   OF BLOCK B0.
    CUERPO DEL PROGRAMA                                                 *
    CALL FUNCTION 'RSAQ_REPORT_NAME'
         EXPORTING
              WORKSPACE  = SPACE
              USERGROUP  = P_BGNAME
              QUERY      = P_QUNAME
         IMPORTING
             REPORTNAME = REPORTNAME.
    CALL FUNCTION 'RSAQ_SUBMIT_QUERY_REPORT'
         EXPORTING
              QUERYREPORT       = REPORTNAME
              VARIANTE          = SPACE
        EXCEPTIONS
             ONLY_WITH_VARIANT = 1
             VARIANT_NOT_EXIST = 2
             OTHERS            = 3
    IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
             WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    2) Create a transaction for this program
    3) Create a parameter transaction and execute this report passing by parameter the usergroup and Query, then, the program will automatically solve the program name and execute it.
    Regards,
    Daniel

  • Creation of ABAP Query- with SQ01.

    Dear Friends,
    Please provide the full notes to create ABAP Queries with the T.code SQ01.
    Thanks & Regards
    Sreehari.

    Dear Frind,
    My Mail ID - [email protected]
    Thanks & Regards,
    Sreehari

  • Problem in Currency field in Abap Query

    hi.
         I have created an additional field for storing the currency type.
         Based on some calculations i want to store the currency type into this additonal field.But the problem is that the currency field is not getting displayed in the report though i am getting the currency type in the additional field when i check it while debugging. Can anyone help me out...

    Vimal,
      Is it ABAP Query problem(SQ01).If yes, then
      In tcode SQ02(Infotype)>press extras button(F5)>In right side you will find 4 tabstrip buttons.Press on Extras--> create variable with same type of currency.
    goto Field group button--> add this field to field groups.
    In record processing event after your calculations assign your value of cuurncy to this new variable.
    In tcode SQ01-->enter query name >F6>F6>F6>select your new varaible
    >Press on basic list button(shift+F4)>left side you will find additional fields Node From there select your new field-->Save come back and execute the query.Now  you will find your variable.
    Don't forget ot reward if useful....

  • Program of abap query

    Hello experts ,
    I have program with this name : 'AQZZTAD-MM======VENDORS======='.
    I want to see this query in transaction SQ01 , how can i see this query , if i don't know what is the name of this query and i don't know what is the name of the infoset ?
    Thanks for the help.
    AVI.

    Hi
    Please find the Link below
    [Abap Query|Re: sq01 quick veiwer to query]
    [Query|Re: ABAP query]
    Hope this will be help full
    Thanks
    Kalyan

  • Error When Run ABAP Query in Different Client

    Hi ABAPers,
    Currently I develop ABAP Query using SQ01 / SQ02 / SQ03.
    Everything goes well, and I have already test that the query work well. The query can be execute and show the result correctly.
    My peer in same SAP system, but different client, run the same query. As I know that query is same with ABAP program which is client independent, can be execute across client. But then the runtime error show up.
    The error said that
        Exception condition "NO_POSITION_FOUND" raised.
    Can anybody told me what's happened here, and how can I resolve this problem?
    Thank you in advance
    Regards
    Hadi

    Hi,
    Since you are testing it in other client,i think due to data inconsistency you are getting that error.
    Try to  check the corresponding tables in both clients and can verify.
    Cheers,
    KK.

  • Regarding HR ABAP (query selction)

    Hai Experts,
    if i give the month and date means , I need to display all the values for all years.
    for example if i give month as may and then date as 15 means then i need the values for all years for that corresponding month and date upto system date.
    With Regards,
    R.Dhineshraj.

    one way would be to create two additional fields (month, day) in infoset of 2 characters one for month, one for day.
    Then in record processing write
    for e.g. your infotype is 0000 then the code will be
    data var_date(4) type c.
    concatenate month day into var_date.
    check p0000-begda-4(4) = var_date.
    add the fields month and day in the field group and assign it in the query (tcode sq01).
    Then select them in sq01 to be shown for selection.
    This should solve your problem.

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

  • Programs generated using ABAP query vanishes after upgrade

    Hi all,
    The programs generated using abap query in sq01 vanishes after upgrading from 4.6C to ECC 6.0 system.
    Is this a know issue, do we have a solution for this?
    Can anyone help
    Thanks
    Senthil

    Hi,
    Try to generate the Queries again in the new system...using the FM : RSAQ_GENERATE_PROGRAM
    The input needed is the Query name and the usergroup...The details can be obtained from the table AQLQCAT(local queries areas) and AQGQCAT(global areas queries).
    Once you generate the query , a program gets created...
    if you have lots of queries to be genretated, write a custom report by fetching the data from the above tables and use the FM to generate the same...
    Hope this helps you..
    Reward if useful
    Regards
    Shiva

  • ABAp query SQ01

    Hi guys,
    I want to make a ABAP Query via SQ01on SAP ECC.
    First i had created an infoset, that only based on one table.
    My requirement is to fetch alle data from this table grouped by customer number.
    Using an sql statement is this very easy to do, but in i had trouble making this in SAP (SQ01):
    SELECT CUST_ID, COUNT(ORDERID)
    FROM
    TABLE
    WHRE CONDITIONS
    GROUP by CUST_ID
    HAVING COUNT(ORDERID) > 1
    My question is where to put my requirement in order to get result using standard ABAP query SQ01.
    I will really appreciate your help.
    nabil

    Hi,
    Welcome to SDN.
    This is not possible exactly with ABAP Query but can be easily done by ADHOC query. Using Set operation A-B.
    Check the links for ADHOC Query -
    <a href="http://www.sap.cmich.edu/fihr/hr/adhoc-query.doc">http://www.sap.cmich.edu/fihr/hr/adhoc-query.doc</a>
    Regards,
    Amit
    Reward all helpful replies.

  • Creating TCODE for ABAP Query

    Hello everyone! I have created my very first ABAP Query, but I still need to create/assign TCODE for the said report.  Can anyone help me with it? Somebody told me to use SE93.  I found out that there are 5 options in SE93 to create a TCode, I tried all options but I could not get through it because I was asked for a program name or a transaction.  What should I put in there? The query name?  Please help.
    Thanks!

    HI Ervyone! Got it Already. To Get the program name of the ABAP Query,
             1. Go to SQ01> Query Menu>More Function--> Generate Program
             2. Go to SQ01> Query Menu>More Function--> Display Report Name. Copy the Report Name that Will be displayed.
             3.  Go to SE93 Enter the TCODE that you want to use, then click on Create BUtton.  Choose the second option "Program 
                  and Selection Screen (Report Option)".  The next screen will ask for your program name,  Paste/copy the program
                  name and save it.
    Thanks!
    Edited by: Ksbaizas on Jun 22, 2010 3:19 AM

  • Performance tuning for ABAP Query (created from t-cd SQ01)

    Hello all,
    We created ABAP Query report from transaction SQ01.
    But the generated report has an appropriate SQL statement which causes performance problem.
    To solve this issue, I guess the easiest way is;
    0. Give up to use it.
    1. Copy it to another object in the customer namespace.
    2. Ajust SQL statement.
    But I'm wondering if there're appropriate ways to adjust SQL statement of Query.
    Could anybody give me any better idea?
    Thank you
    Yuko

    You can try this: Create 2 ranges, for objnr and cdtcode and fill like:
    ra_objnr-sign = 'I'.
    ra_objnr-option = 'CP'.
    ra_objnr-low = 'OR*'.
    append ra_objnr.
    ra_code-sign = 'I'.
    ra_code-option = 'CP'.
    ra_code-low = 'CO*'.
    append ra_code.
    SELECT objnr udate utime
    FROM jcds
    INTO TABLE it_jcds
    WHERE objnr IN ra_objnr
    AND stat = l_tj02t
    AND cdtcode IN ra_code
    AND inact = space
    Regards,
    John.

  • 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

Maybe you are looking for

  • Radeon only boots with video sometimes

    Alright, I'm having a strange problem. About half the time when I start my system, the radeon driver loads properly, kms kicks in, the terminal resolution changes and everything works peachy. The other half of the time, right when the driver is loade

  • Can a G4 Desktop OS 8.6 be hooked up to cable modem high speed?

    Can anyone help me set up my apple G4 desktop os 8.6 to work with a high speed cable modem to get internet access?

  • Transaction roll back

              Dear Everyone,           What kind of exceptions do the wls container force to roll back a transaction?           Already a simple NullpointerException does it or it has to be a kind of special           Exception like EJbException?        

  • After 4.2 update movie file icon is picture-less

    I want my OS 4.1 back on my ipt4 and Ipad. How do I go back? Thanks.

  • Images sent to and from the Message app show up Black.

    When I am sent an image or I send an image in iMessage or as an MMS I can see the image when it's hits my phone or iPad but once I press it to open the image it's black. That's happening on my  iPhone 4 and my iPad 2 (both running on 5.0.1 I have yet