Cloning a Standard SAP Query

Hi guys,
I need to modify the transaction ME80FN, which is a SAP Query. I want to make a clone of the SAP Query, if isn't possible to modify the program AQZZ/SAPQUERY/MEME80FN========. I haven't deal with SAP Queries before. Can anyone please tell me the steps to accomplish this?
Thanks,
Raulie

Haven't worked with queries, but I think you should be able to make a copy on SQ01...anyway, querys are still ABAP programs, so you could the copy the code of AQZZ/SAPQUERY/MEME80FN======== paste it on a Z program and make the needed modifications...
Greetings,
Blag.

Similar Messages

  • Class to run standard SAP Query

    Hi,
    Could you help me with finding standard SAP class to run query created in SQ01?
    Thank you

    Hi,
    You can create the TCode for the Sap Query and use to run query.
    refer the links to create tcode for sap query..
    how to create a tcode for abap query
    tcode for sap query

  • How to edit a standard SAP Query

    I need to do authority check for satndard SAP Query....How to do it

    If you put code similar the following in the Infoset ---> Extras -> Code -> Start of Selection it should work
    CALL FUNCTION 'SD_ORGDATA_AUTHORITY_CHECK'
    EXPORTING
       I_VKORG            = P_VKORG
    *   I_VTWEG            =
    *   I_SPART            =
        I_ACTVT            = '01'
    EXCEPTIONS
       NO_AUTHORITY       = 1
       OTHERS             = 2.
    IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
             WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    So, if the user does not have the proper authorization, it will exit the program.  You will need to check with your Security administrator to verify what value to use for the Activity Code.

  • Retrieve a corrupted standard SAP query (SQ01)

    Hi experts,
    We have an standard query that is giving a dump because an user has modified and transported it to consolidation and production systems.
    I don't know if there's a way to compare versions and retrieve versions.  Right now we have accessed to client 000 and we are analysing if it's feasible to retrieve the  000 version. The query is defined as GLOBAL (client independent) and it's assigned to an standard package /SAPQUERY/FIAQ.
    I'm on the right way or maybe there's another solution that we're not taking into account?
    More ideas would be appreciated.
    Ismael
    Message was edited by:
            Ismael Mateo

    Thanks for the answer Barry, this is clear.
    But the problem is that all the systems are overwritten with the modified version (Development, Consolidation and Production) and we don't have the original version anywhere, therefore we can't export/import it.
    As the query is a global query (not client dependent), a modification in the query also affects to the other clients.  In this case this  modification has been transported to all systems as well...
    To correct that situation we want to identify the changes done by the user or retrieve the old version.
    One solution would be to create one transport request from an external SAP system, with the same SAP version(ECC 5.0), and transport it to our system.
    Before trying with this solution we want to know if there's any SAP standard tool to retrieve/compare query versions.

  • 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

  • Problem in sap query

    Hi All,
    I have  changed the standard sap query . i have written coding for newly added feilds in infoset(sq02 code part).
    I want to join my internal table with standard internal table ( final internal table ) to incorporate changes.
    Please guide me to merge both the internal tables.
    Thanks in advance
    Sudhakar

    Hi,
    All other part remain same.Could you please tell me why we got that error any probable Opinion from your side...
    thanks in advance.
    Regards,
    Moni

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

  • Restricting standard SAP queries from seeing HR Data

    Newbie back again with another question.  When our system was implemented 2 yrs ago, supposedly HR Master Data was restricted from the majority of users.  One of our SAP functional consultants just showed me how the Standard SAP Query can (if you know what to search for) pull up all HR master data. 
    Granted my user community isn't that knowledgeable (yet) but as the Security person, I'd rather they not be able too.
    How do I restrict access to the Standard Query?

    The lastest release-when I look up my component list they say 604 to 700
    view-quickview.
    Query types-HR Infotype tables may be accessed by users of SQVI, SQ01, etc.
    Which authority-checks - still researching.  Part of my problem is that when the system was developed we had an HR expert and he was pretty hands on and not into sharing information.  As often happens, he's moved on to other projects and I'm supposed to handle maintain and run with zero documentation or understand of his security model for HR.  So I'm not sure if this was 1. by design and supposed to be managed inside HR some other way, 2. a gap 3. a bug. 
    My assumption is 2... it appears the SQVI is not using S_TABU_DIS in any assignments

  • Standard variant of SAP query is loaded automatically

    Hi!
    I have created SAP query and standard variant via SQ01.
    When I run my query (via transaction) values of variant are loaded automatically in a selection screen and in my case I need empty selection screen at the beginning and values should appear in a selection screen only after choosing a variant, but not before this.
    Probably it is something about attributes of variant? Any ideas?
    <b><REMOVED BY MODERATOR></b>
    Mindaugas.
    Message was edited by:
            Alvaro Tejada Galindo

    Hi,
    What type of custom transaction code did you create?
    Was Dialog Transaction or Report Transaction?
    For your purpose, you can create with dialog transaction with specifying program name and screen number. If you want to execute with specific variant then choose report transaction.
    Regards,
    Ferry Lianto

  • Transport standard variant of SAP Query

    Hey,
    I made a SAP Query with SQO1. Within the attributes of the query, I defined a standard variant.
    How can I transport this variant.
    When I go to maintain variant, I can click to program RSTRANSP.
    When I try to execute, I get the following message "Function not possible for local/private objects". In the help it says that I have to create a transport for my program.
    But my query is in a transport. I already transported the query to QAS and it works fine.
    Do I have to put the program also in a transport? The program is SAP generated code with the following name "AQZZZISU========CP_METERS=====". I haven't transported the program but it is available in QAS. So I think I don't need to transport it.
    Does anyone how I can transport my variant?
    Thanks
    Steven

    I have attached the sap Query based on your idea. But I geting small probelm. Please help me on this.
    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?

  • How i can keep my code after %dba standard table in sap query

    hi expert,
    how i can keep my code after %dba standard table in sap query..
      add 1 to %count-VBRP.
      %linr-VBRP = '01'.
      extract %fg01.
      %linr-VBRP = '02'.
      extract %fg02.
      %linr-VBRP = '04'.
      extract %fg04.
      %linr-VBRP = '05'.
      extract %fg05.
      %ext-VBRP05 = 'X'.
        extract %fgwrVBRP05.
    endselect.
    i want keep my code after filling the standard table generated by sap abap query
    Thanks & regards
    Sajad Ahmad

    Hi,
    the above code is excuted succesfully, but if i have
    return "Navigation" ;
    it is not working
    any idea why??????????

  • Is there any Standard SAP Report?for displaying Billing block/Status-Order

    Hi,
    Am a ABAP Developer. I heard that there is SAP Query/ABAP Query/Standard SAP report for the below functionality/requirement. SO, pls. let me know if there is any SAP Query/ABAP Query/Standard SAP report?
    "This report is suppose to display Credit and Debit memo documents which are blocked and yet has a status of APRV; the other display is for Return Documents which are blocked and yet has a status RCVD."
    thanq

    Hi,
    Use t-code
    V23 - Blocked sales document for billing
    VA14L - Sales document blocked for delivery
    VFX3 - For blocked billing documents.
    Kapil
    Edited by: Kapildev Farakte on Jan 8, 2010 4:15 AM

  • Sales Order Text Lines in SAP Query

    I have a requirement to output several text lines into a SAP query based around sales orders.
    I have included some code to read the details into my query and get no syntax errors, however the report gives a blank output for each of the text fields included, despite there definitely being some text with the specified attribute ID and text object in the table STXL.
    Where am I going wrong?
    Please find the coding below for one of the text field I'm trying to extract:
    TABLES:STXL.
    DATA:
        VBELN LIKE VBAP-VBELN,
        POSNR LIKE VBAP-POSNR,
        TDNAME LIKE STXL-TDNAME,
        MYLINE LIKE TLINE-TDLINE,
        ZE18_LINE(1200) TYPE C.
    DATA:BEGIN OF LINES OCCURS 0.
            INCLUDE STRUCTURE TLINE.
    DATA:END OF LINES.
    DATA:BEGIN OF MYHEADER.
            INCLUDE STRUCTURE THEAD.
    DATA:END OF MYHEADER.
    CLEAR TDNAME.
    CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
    EXPORTING
      INPUT = VBAP-VBELN
    IMPORTING
      OUTPUT = VBELN.
      CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
    EXPORTING
      INPUT = VBAP-POSNR
    IMPORTING
      OUTPUT = POSNR.
      CONCATENATE VBELN POSNR INTO TDNAME.
    CALL FUNCTION 'READ_TEXT'
        EXPORTING
            ID = 'ZAT2'
            LANGUAGE = SY-LANGU
            NAME = TDNAME
            OBJECT = 'VBBP'
         IMPORTING
            HEADER = MYHEADER
         TABLES
            LINES  = LINES
    EXCEPTIONS
            ID = 1
            LANGUAGE = 2
            NAME = 3
            NOT FOUND = 4
            OBJECT= 5
            REFERENCE_CHECK = 6
            WRONG_ACCESS_TO_ARCHIVE = 7
            OTHERS = 8.
    IF SY-SUBRC = 0.
      LOOP AT LINES.
        MOVE LINES-TDLINE TO TEXT.
        ENDLOOP.
    ENDIF.

    Hi -
    Please check in debuging.
    check the value of TDNAME correctly populated with sales order no and sales order item.
    You can cross check with the table STXH with TDNAME and see if any entries is available for TDID 'ZAT2' as your case.
    Here are sample code.
    DATA :    lv_tdname TYPE tdobname,
                     lw_line TYPE tline,
                    li_line TYPE STANDARD TABLE OF tline.
    CLEAR : lv_tdname , li_line[],
    cocatenate w_vbak-vbeln w_vbap-posnr into lv_tdname.
    CALL FUNCTION 'READ_TEXT'
      EXPORTING
        id                      = 'ZAT2'
        language                = 'E'
        name                    = lv_tdname
        object                  = 'VBBP'
      TABLES
        lines                   = li_line
      EXCEPTIONS
        id                      = 1
        language                = 2
        name                    = 3
        not_found               = 4
        object                  = 5
        reference_check         = 6
        wrong_access_to_archive = 7
        OTHERS                  = 8.
    IF sy-subrc = 0.
      CLEAR lw_line.
      loop at li_line INTO lw_line .
    * Put your logic
      endloop.
    ENDIF.

  • Could anyone provide the complete manual of SAP Query Creation

    Hi,
    Now I am learning to create SAP Query.
    I viewed many questions and answers about SAP Query.
    Some mentioned this,and some did that...
    Could anyone provide a complete manual of SAP Query Creation for developers.
    I can create SAP Queries step by step with it.

    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
    useful
    http://www.erpgenie.com/abap/code/abap47.htm
    regards,
    Prabhu
    reward if it is helpful

  • SAP QUERY -logical data base ADA

    I have created a SAP Query with logical data base ADA,I have selected four tables in it.Do i need to link these tables if yes..where and how?The report is for fields in asset master data.
    .But i get below error when i try to genaret the output :
    Fields from parallel tables within a line
    Line: 01
    Field: Asset description
    (ANLT-TXT50, table ANLT)
    Field: License plate no. of vehichle
    (ANLZ-KFZKZ, table ANLZ)
    i get such similar five messages but they are warning..when i execute with warning however i get the fields with description but not with Value.Ex:i get asset description and not Asset number as required.

    You don't have to link them, they ar linked that is the power of a logical data base
    To get the text in your report you need the key fields
    Like
    (Lanque Key)
    company code
    asset number
    Asset sub number
    Go to info sets and look to the standard ones like /SAPQUERY/AM01

Maybe you are looking for

  • Using Federated Security in BizTalk against custom Token Provider and Custom Token

    Hi, I as the topic states, I'm trying to get BizTalk to use a Custom Token Provider with custom tokens. So I thought this would be rather painless using ws2007FederationHttpBinding but got stuck. The problem is that the service expect soap action and

  • Need a new Apple id for my daughter, but have a question first.

    My daughter had an ipod touch and we used my wife's apple id to put songs on it. Now we just bought her a new iphone and think its time she had her own apple id.  If she creates one, can we still put her music from her ipod onto her phone? Thanks for

  • Problem in Wage Type Creation

    Dear Gurus, I am going to configure wage types in IDES ECC6. I want to configure Wage Types for Infotype 0014 for Recurring Payments & Deductions. When I configure these wage types, it does not appear in infotype 0014 instead it appears in infotype 0

  • In smartform Text editor problem

    In smartform in text editor i writing text Invoice number it will in first line Invoice and second line number ,  Exactly very line taken 7 characters what is problem please give me advise.

  • MVIEW & Complex query.

    Is it impossible at all to create a materialized view using a complex query (i.e. joins + union)? Thanks in advance Fabio