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

Similar Messages

  • How to call SAP Webservice in standalone java program

    Hi,
    In our Java application, we want to use the SAP Webservices. I dont know much about authentication mechanism used by SAP. Can any one please help me with any sample code how to Call SAP webservice in Standalone Jave Program. I searched alot on the web regarding this, but helpless. Please help me.
    Thanks,
    Mohan

    Hi Mohan,
    You need an account for the ES Workplace. I'm afraid this is not free, e.g. check [SAP NetWeaver, Composition Subscription|https://www.sdn.sap.com/irj/sdn/subscriptions/composition].
    But I thought you wanted to play with a WSDL [you already had at hand|Sample code to access BAPI Web services from JAVA required;?

  • How to find which Query is using program AQ10MM==========Z6============

    Hi,
    I wanted to know how to find out which SAP query uses this program. AQ10MM==========Z6============
    I tried with SQ01/02 but was unable to get it. Can you please help.
    Regards,
    Mukund S

    In my installation , it is usually AQZZ"usergroup"========QUERYNAME======
    You could see if you have a user group 'MM' or '10MM' in SQ03 and set the user group if available.. then in SQ01, see if you have a query called Z6
    Also try out this function module RSAQ_DECODE_REPORT_NAME to see if it would give you the user group and query name...

  • How to call a idoc in abap program and updates catsdb table

    how to call a idoc in abap program and updates catsdb table
    thank you,
    Jagrut BharatKumar Shukla

    Hi Kishan,
    You can refer to following help document,
    http://help.sap.com/saphelp_nw04/helpdata/en/bf/d005244e9d1d4d92b2fe7935556b4c/content.htm
    Regards,
    Meera

  • How to create sap query with "or" relationship

    dear experts,
    I need a report to display the employee whoese WSR is
    changed in the month for infotype 0007.
    that is ,we want to search with selection
    begda OR endda between 2008-01-01 and 2008-01-31.
    how to create sap query with "or" relationship?

    hi use like this,
    CALL FUNCTION 'HR_READ_INFOTYPE'
      EXPORTING
        pernr                 =  p_pernr
        infty                   =  '0007'
       BEGDA                =  p_date1
       ENDDA                 = p_date2
      TABLES
        infty_tab             = itab .
    hi use this by passing the pernr to fm and giving the dates low and high in the p_date1 and p_date2.
    loop at itab where condition.
    endloop.
    may it helps u,
    regards,
    venkat.

  • 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 a Method in a Program?

    Hello,
    I am very new to the ABAP world.  I have been given a task to call a method if_hrbas_plain_infotype_access~read_single from the class CL_HRBAS_PLAIN_INFOTYPE_ACCESS in a program to see if we can use it to display some employee information.  I don't know how to call a method in a program.  Can somebody please provide me some pseudo code or instructions?
    Thanks.

    Hi Shan,
    here is the code to call a method. while calling the method Instance as 'r_info' which is the type reference to class as specified.
    pass the values to exporting parameters plvar,otype,objid...etc  according  to the requirement
    infotypes: 0002.   " creates an internal table p0002.
    data:
    r_info type ref to CL_HRBAS_PLAIN_INFOTYPE_ACCESS.
    TRY.
    CALL METHOD r_info->if_hrbas_plain_infotype_access~read
       EXPORTING
         plvar           = 
         otype           =
         objid           =
         istat           =
         infty           =
    *     SUBTY           =
         begda           =
         endda           =
         no_auth_check   =  'X'
         message_handler =
       IMPORTING
         PNNNN_TAB       = P0002
    *     HRTNNNN_TAB     =
    *     IS_OK           =
      CATCH CX_HRBAS_VIOLATED_ASSERTION .
    ENDTRY.
    LOOP AT P0002.
          WRITE:/
            P0002-VORNA,
            P0002-NCHMC,
            P0002-NACHN.
        ENDLOOP.
    Regards

  • How to call subroutines defined in ABAP program with type S

    how to call subroutines defined in ABAP program with type S? can you give an example?

    Normal executable program,
    REPORT  ZTEST_MAIN.
    perform sub1 in program ztest_sub.
    "you can call using in program addition
    Subroutine pool program
    PROGRAM  ZTEST_SUB.
    form sub1.
    endform.

  • How to call Operating System commands / external programs from within APEX

    Hi,
    Can someone please suggest how to call Operating Systems commands / external programs from within APEX?
    E.g. say I need to run a SQL script on a particular database. SQL script, database name, userid & password everything is available in a table in Oracle. I want to build a utility in APEX where by when I click a button APEX should run the following
    c:\oracle\bin\sqlplusw.exe userud/password@database @script_name.sql
    Any pointers will be greatly appreciated.
    Thanks & Regards,

    Hi Guys,
    I have reviewed the option of using scheduler and javascript and they do satisfy my requirements PARTIALLY. Any calls to operating system commands through these features will be made on the server where APEX is installed.
    However, here what I am looking at is to call operating systems programs on client machine. For example in my APEX application I have constructed the following strings of commands that needs to be run to execute a change request.
    sqlplusw.exe user/password@database @script1.sql
    sqlplusw.exe user/password@database @script2.sql
    sqlplusw.exe user/password@database @script3.sql
    sqlplusw.exe user/password@database @script4.sql
    What I want is to have a button/link on the APEX screen along with these lines so that when I click that link/button this entire line of command gets executed in the same way it would get executed if I copy and paste this command in the command window of windows.
    Believe me, if I am able to achieve what I intend to do, it is going to save a lot of our DBAs time and effort.
    Any help will be greatly appreciated.
    Thanks & Regards,

  • 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

  • How to create sap query

    how to create sap query if any one has the documentation pls foward to this mail id [email protected]
    thanks
    avinash

    check these links...
    http://www.sap-basis-abap.com/sapquery.htm
    http://www.thespot4sap.com/Articles/SAP_ABAP_Queries_Introduction.asp
    http://help.sap.com/saphelp_nw04/helpdata/en/25/8f4dd72b0f9f4fa6712fcf2f65f505/frameset.htm

  • How to link from query to executable program (38)

    Hi Experts,
    I develop one sq01 query and that I want link to my executable program which is created by from se38 to display the interactive report .
    The basic list is coming from the  query and secondary list is displaying from the program.
    please explain how to link the query and program to store the values TRSTI table.
    Please help me,its critical

    Kindly search on the net with the keyword "Report assignment in SAP Query", you will get lot of links.

  • How to call the webservice in abap program

    Hi All,
    I have created a web service for my RFC .  The RFC has Import and export paramaters.
    I want call the same web service into my  ABAP REPORT and at the same time i want pass the values to webservice  and get the result from webservice in my abap report,
    Please help me  how to call the web service and pass the values and get the values?
    Highly appreciate your assitance.
    Thanks,
    Kishan

    Hi Kishan,
    You can refer to following help document,
    http://help.sap.com/saphelp_nw04/helpdata/en/bf/d005244e9d1d4d92b2fe7935556b4c/content.htm
    Regards,
    Meera

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

  • How to transport SAP Query SQ01??

    Hi All,
    I am faced with a proble regarding the transportation of SAP query from the development system to the Production system.The following were the steps that I had taken:
    Step 1. Run RSAQR3TR in 'old' system. Select EXPORT and specify the
    objects to be transported.
    (System includes these in an automatically created transport request)
    Step 2. Release this transport and request it be transported to 'new'
    system.
    (This results in the entries being populated in transport table AQTDB
    in 'new' system).
    Step 3. Run RSAQR3TR in 'new' system. Select IMPORT and tick the
    Overwrite checkbox. Specify the transport number in the field labelled
    'dataset with imports'.
    After I had done all these ,the changes were not reflecting in the test system.
    Is there any steps missed ou in the transportation process or is there any other way of transporting the same???
    Thanks and regards,
    Rupesh

    Hi Rupesh
    run the program one emore time with
    specifying Copy Standard Area -> Global Area.
    regards
    kishore

Maybe you are looking for