SAP QUERY copied to z program.

Hi ,
There was an standard sap query ,system had generated a program for this ,this program is copied to a Zprogram and some modificationa had been done for the zprogram in_sap4.7_ version.Now they want this z program to be copied to ECC6.0.Here my question is as the z program is a copy of ssystem generated program,if we copy this program to ecc6.0 will it work or not?.

I don't think it will work. in the generated program you can see some function modules also. those functions will be in SAP name space. Better recreate the same in ECC6.0, instead of copying the code.

Similar Messages

  • Need to find SAP query for corresponding ABAP program.

    Hello SAP Experts,
    I have an ABAP program "AQDESYSTQV000001ORDERDETAILS==" in ECC 4.7. We had a client copy recently from ECC 4.7 to ECC 6.0. Now in ECC 6.0 I am unable to find this program in SE38.
    Can you please tell me how to create this program in ECC 6.0 ? Also, by the name of this program it is clearly seen that this program is automatically created by using SAP query.
    I tried to generate the program using SQ01, but system asks me for the SAP query.
    Can you please tell me how to find the SAP Query for the corresponding abap program ? Also, the steps as in how to generate the program in ECC 6.0.
    Thanks.

    Hi Danish,
    In the program name, the query name is always attached.
    For example : The program name is , AQ10SD==========Z10SD_INVPRODL=
                           Here the query name is Z10SD_INVPRODL and if you go to transaction SQ01 and enter the query name
    then you can find the infoset.
    And also you can gernate the program with the help of query name.
    Please try the same and let me know if any details are required.
    Regards,
    Darshana

  • Converting SAP Query to Report Program

    Hello Experts,
    I'm stuck up with an issue.
    I want to convert SAP query into a report program as the things which I need to implement is not possible with SAP Query anymore.
    So I need to convert SAP query to Report program.
    I'm very much aware about the SQ01--> Query --> More functions --> Display Report Program
    But this Report Program generates is AQ..................... but if you see the code there will be buch of dynamic calls not as clear as ABAP code and not much flexibility to modify...
    Please Provide a solution to this.
    Regards,
    Titiksha

    Hi Bhange,
    Glen Anthony has said very well and I support him. Even I suggest you to ignor the report generated with Query and develop a new report with the required business logic.
    Regards,
    Vijay

  • How to call SAP query in a program

    Hi experts
      I have created a query in SQVI its gives a result. Now i want this query to be used in my program. Is there any FM which gets the quary name and populates the result in iternal table. So that i can use that result.
       I know without query you can write using the tables you can fetch the records but i just want to explore a new way to do things. If any body done such type let me know and also give some sample code or process how to achieve it.
    Regards
    Vijay

    Hi Siva
      My final option is that only. That you can do any how. But my intension is to learn something new way. How to do copy the query and where to inject the code is there any example in wiki or artical for that. I want to something new. Old way of creating a report program is possible i want to do this way. If some body could help me out.
    @ karthik
       I have generated the SAP query and i got the program but when i view the code i dont find any select statment or where storing my input data. How to identity that i did in debug mode but am not sure where it pulls the data and where it put in internal table. Can you throw some light with example code or an article.
    Regards
    Vijay

  • Addition of new column into SAP query program

    Hi freinds,
    There is a query program(joins EKKO,EKPO) which contains columns like vendor,purchase doc,item,material and material description etc..
    I need to insert a new column 'Supplying plant' in 2nd position after vendor column...When I try to add a field into internal table,am getting short dump error...
    Kindly suggest on this problem...
    Thanks in advance...
    Bharat.

    Hi,
    the program you got is it a copy from a SAP QUERY created on TCode SQ01 ?
    If yes got to Tcode SQ01 draw a new one and see the report generated
    Best Regards
    Jaime

  • Declarations in SAP QUERY generated ABAP Programs

    hi,
    i had created a ABAP Program through ABAP Query (SQ01,SQ02,SQ03) but i have a issue that when i transport it to the PRD server i got the run time error. The Z program which i had created is the copy of the SQ01 generated program and i had done all the includes declarations in this program. but there is a problem that it is consist of the declarations of the structures,quries .
    I want to know is it necessary to always transport the Infoset and user group and the structure which is present in the program generated .
    Please provide me guidelines for this problem  .
    Edited by: ricx .s on Jul 6, 2009 5:31 AM
    Edited by: ricx .s on Jul 6, 2009 8:07 AM

    hi,
    i had copied the program bcoz i want to chekc that it is really necessary to transport the user group and infoset so that it can achieve functionality similar to the SAP QUERY.
    is there any other way without whichi can ahieve the functionality of SAP QUERY generated program and take it into the ABAP Porgram?

  • Problem in transporting generated program of SAP Query

    <h5> Hi all,
    I created a SAP query in development server and generated the program for the same, I transported the infoset and the user group etc. to the next server but couldnot transfer the program, since the program is not a Z Program, so coudlnot save it and capture it in request so that the same can be transported.
    What could be the possible solution for the same????
    Regards, </h5>

    Yep, this gets a bit tricky. Remember that SAP Query is designed as an end-user tool. To this end, the creation of queries could be done in a productive environment. The maintenance of infosets could be restricted to Development systems only. I know that some sites do not allow this.
    Through the use of authorisations, you could appoint an administrator to generate the queries in PRD for the users.
    The name of the ABAP is a combination of the query name, infoset and the client number (I think - going from memory). You could possibly change the package name of the generated program and then attach it to a transport, but it becomes very messy and I wouldn't recommend it.

  • How to find the program name of the created sap query ?

    how to find the program name of the created sap query ?

    Hi avinash,
    Try in this way..
    Go to SE16 and then go to table TSTC.
    in that give program name as <b>*followed by your query name</b>
    (for example *TESTQUERY)
    and run , that will give progname======queryname.
    this way you can find program name.
    vijay

  • SAP Query: Transport tool(program: RSAQR3TR)

    Does the SAP Query: Transport tool(program: RSAQR3TR) transport addtional fields and code in Extras of an InfoSet from one system to another?
    TKS in advance.

    Hello,
    Yes the ABAP query transports the whole Infoset.
    Goto Transaction SQ02
    Goto Environment -> Query areas -> Select teh Standard area.
    Select Environment -> Transports -> Import radio Button
    Check the Overwriting allowedand teh remove the check for Test Run
    Select the Transport Infosets and queries radiobutton
    Fill in the Infoset and teh Query with the corresponding names and the Import option with Transport Request Number
    Execute
    Regards

  • Caller Program name after SUBMIT or Call Tran (SAP-Query drill as ex)

    Hi ,  there is real simple situation
    I have SAP Query and do Drill Down to my Report or  Transaction.
    So I have two questions but as I believe they are equal:
    1) How I can get Caller SAP Query name from my Report ?
    2) How can we get  Caller Program name after SUBMIT or CALL TRANSACTION operator (in new started report for example )?

    Hi,
    there is a system variable sy-cprog ...check if u can use it...
    else from the caller prog move its name to SAP memory and retrive it in called prog..
    in caller prog
    data caller_prog type SYCPROG.
    move sy-repid to caller_prog.
    set parameter id 'ZCPROG' field caller_prog.
    submit <called_prog> and return.
    in called prog
    data caller_prog type SYCPROG.
    get parameter id 'ZCPROG' field caller_prog.
    write caller_prog.
    write / sy-repid.
    Cheers,
    jose.

  • To Find the SAP Query from the tranaction code or the program name

    Hi,
    I have a situation wherein I have to modify the sap query associated with an transaction code.But the problem is that I am unable to find the SAP Query.
    <b>Please let me know how to find the SAP query from the transaction code or the program name.</b>
    Thanks and Regards,
    Rupesh

    Hi Rupesh,
    1 use FM
      RSAQ_DECODE_REPORT_NAME
    2. This is one of the best and easiest way.
    3. It will provide u the following info.
       WORKSPACE
       USERGROUP
       QUERY    
       CLIENT   
    4. Thru TCode U must know the program name first.
       This can be discovered using SE93.
    Hope it helps.
    Regards,
    Amit M.

  • SAP Query - how to retrieve data within another program / FM

    Hi,
    I need to retrieve data from SAP Query, but when I used SUBMIT ..., the program results dump, because it is called within open custor loop.
    Is there any another way, some FM or sth else?
    thanks
    Juraj

    I already tried it, but I always get dump with CX_SY_OPEN_SQL_DB exception.
    The problem is, that I tried to execute the query within open custor loop and this exception is caused by calling commit work somewhere in query report.
    therefore I try to find another way
    thanks
    Juraj

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

    Hi all,
    I am working on the SAP Query by using transaction code SQ02, SQ03 and SQ01.
    I have also generated the program and copied display report name to create a transaction code for this report.
    I am able to use the transaction code in the Development Environment. However, when I transported everything into Quality Environment and run the transaction code. It prompt me a shortdump with the message "Program AQZZZQTEST=ZTEST=== not found".
    Anyone knows what is not right? How should I debug on this?
    Thank you so much.

    Create your query in the Global Area (Cross-client) instead of the Standard Area (Client-specific). When you create a query or Infoset in the Cross Client, you have to save your work in development package. Inturn, you will save your work in transportable request.
    So, if you create a tcode for this kind of query, their name will not change in the Other system and you will not get the dump.
    To change the Global Area, you can select it in Tcode SQ01 or SQ02: Environment > Query Areas
    Regards,
    Naimesh Patel

  • Transaction ME80FN, SAP Query ME80FN, and logical database MEPOLDB

    I am looking at transaction ME80FN. Is that from the global query /SAPQUERY/ME, ME80FN? I was told that ME80FN was from SAP Query... but doubts are creeping in.
       SE93 shows trans. ME80FN as Program RM06EAAW and no logical database. RM06EAAW has different headings and an additional toolbar in the results screen.
      Did RM06EAAW get generated from SQ01 ME80FN?
       I have to modify the ME80FN transaction output by adding a field to the PO History display, which is selected from the bottom toolbar, rightmost button. I guess I have to go with RM06EAAW as the starting point(?).
       We are on 4.6B Any suggestions are welcome.
      Thanks

    These are what I am dealing with:
      Transaction ME80FN
      /SAPQUERY/ME, ME80FN query.
      Another way to word the question is: How can I make a copy of the global query /SAPQUERY/ME, ME80FN to have that nifty bottom toolbar that transaction ME80FN has?
      At first glance, they are the same entity... But the toolbar in the transaction and display options via the last button on the toolbar differentiate the two.
       Thanks....

Maybe you are looking for