SQ02 - Create InfoSet using 'Data retrieval by program'

Using SQ02, I would like to use the data returned by an ABAP program as the data source for an InfoSet.  When attempting to create an InfoSet, I noticed the 'Data retrieval by program' option.  I would like to discover how to use this option and how to pass parameters to the ABAP program I'd like to use.

The "Data retrieval program" would be coded like any normal report except for adding a few comment tags that will be used by SQ01 query generator as placeholders to insert its own code into your code to generate the query program.
In general this is how a data retrieval program is coded. SQ01 when it generates the query will insert its own code in place of *<Query_body> and *<Query_head> comment tags
REPORT ztest_sq01_driver_program.
TABLES: <name of dictionary structure of your infoset>.
* DATA declarations
START-OF-SELECTION.
*<Query_head>
* <Fetch your data here and store it in an internal table gt_report> that has all the fields that you need in your query
END-OF-SELECTION.
  LOOP AT gt_report INTO gs_report.
    MOVE-CORRESPONDING gs_report TO <name of dictionary structure of your infoset>
*<Query_body>
  ENDLOOP.

Similar Messages

  • SQ02 Data retrieval by program

    Hello,
    I would like create an abap query 'SQ01' using infoset 'SQ02' with the option
    'Data retrieval by program' and 'Integrated program'
    I wrote and tested this program:
    REPORT  ZONR_REPORT_MBEW.
    data:  mbew_tab like mbew OCCURS 0 WITH HEADER LINE.
    * <Query_head>
    select * from mbew into table mbew_tab
        where bwkey = 'MANT' and bklas = '3000' and matnr = '000000000001027712'.
        call function  'MBEW_EXTEND'
          exporting
            XVPER = 'X'
          tables
            mbew_tab = mbew_tab.
    loop at mbew_tab.
    * <Query_body>
      endloop.
    Could you help how to fill the area 'Data structure' of the option
    'Data retrieval by program' ?
    With the menu 'Goto' -> 'Code' -> 'Data readindg program'
    I found this template of program :
    REPORT  RSAQDVP_TEMPLATE .
    *   declarations
    *   (insert your declarations in this section)
    data:
      MBEW                           type MBEW                          ,
      it_data type standard table of MBEW                          .
    field-symbols: <struc> type MBEW                          .
    *   selection screen statements
    *   (define your selection-screen here)
    * !! the following comment MUST NOT BE CHANGED !!
    *<QUERY_HEAD>
    *   read data into IT_DATA
    *  (select your data here into internal table IT_DATA)
    *   output of the data
    *   (this section can be left unchanged)
    loop at it_data assigning <struc>.
      move-corresponding <struc> to MBEW                          .
    * !! the following comment MUST NOT BE CHANGED !!
    *<QUERY_BODY>
    endloop.
    Could you help me to customize the program ZONR_REPORT_MBEW according
    to the template, because I'm a neewbie in abap ?
    Thanks for your helping
    Marco

    The "Data retrieval program" would be coded like any normal report except for adding a few comment tags that will be used by SQ01 query generator as placeholders to insert its own code into your code to generate the query program.
    In general this is how a data retrieval program is coded. SQ01 when it generates the query will insert its own code in place of *<Query_body> and *<Query_head> comment tags
    REPORT ztest_sq01_driver_program.
    TABLES: <name of dictionary structure of your infoset>.
    * DATA declarations
    START-OF-SELECTION.
    *<Query_head>
    * <Fetch your data here and store it in an internal table gt_report> that has all the fields that you need in your query
    END-OF-SELECTION.
      LOOP AT gt_report INTO gs_report.
        MOVE-CORRESPONDING gs_report TO <name of dictionary structure of your infoset>
    *<Query_body>
      ENDLOOP.

  • Creating a dynamic jtree using datas retrieved by dom in xml parsing

    help me with code to create a dynamic jtree using data retrieved as nodes by xml parsing using dom

    Ok, so you want to make a tree. To determine the data that appears in a tree, you have to make a custom tree model. The API for this is at :
    http://java.sun.com/j2se/1.4.2/docs/api/
    A tutorial for using trees is at :
    http://java.sun.com/docs/books/tutorial/uiswing/components/tree.html
    I assume you are going to be using Nodes, since you are using XML. For this I might start with something like
    class NodeTreeModel implements TreeModelI would then implement the 'getChildCount()' as the number of subnodes a node has, and the value of a tree node to the nodes value.
    Hope that starts you off.

  • Create XML using Data Templates

    Is anyone familiar will a tool, other than oracle that will create XML from data template definitions.
    I trying to understand if the data template definitions are an Oracle specific tool that only Oracle can use to generate XML files.
    If this is specific to Oracle, is there an easier way to use the data templates to generate XML without registering them in the concurrent manager, XMLP Admin, and then executing the concurrent process?
    I'm looking for a shortcut to testing these files without having to register everything.

    Why not using XML Publisher Standalone aka Enterprise 5.6.2 ?
    There you can generate the XML based on data templates without registering anything. The installation is quite easy.
    Juergen

  • Create JTree using data from DataBase

    Hi all,
    I have GUI with JTree, and i have data in database with ParentID, ChiledID fileds,
    i want to crate tree structure from using data in database.
    can you people tell me how can i proceed, I will get a data as List of Vectors from DB.
    Thanks
    Daya

    i got the solution,
    what i did i having object class extended DefaultMutableTreeNode and i have list of objects class refrence and i know which is parent and a child so just add the child refrence to parent refrence which stored in list.
    Thanks
    daya

  • Creating Infoset query based on ABAP program

    Hello
    I have 3 tables FEBEP, BKPF and BSEG and I need to join the 3 tables based on:
    FEBEP-MANDT = BKPF-MANDT = BSEG-MANDT
    FEBEP-NBBLN = BKPF-BELNR = BSEG-AUGBL
    FEBEP-GJAHR = BKPF-GJAHR = BSEG-GJAHR
    Then I have a few view fields from all the 3 tables. After this I can build an infoset query based on structure + ABAP program, and a generic datasource on top of it.
    Can someone give me the ABAP code to be written SE38? Also should I select integrated program/external program in the infoset query?
    Thanks,
    Srini.

    Hi,
    Even if you create an ABAP program for infoset, you will writing a SELECT statement from BSEG table which is quite huge.
    And you will putting JOIN with other tables.
    Performance wise this is not advisble.
    Why do not try the following other tables and check if the fields you need are available?
    You can't join BSEG as it is a Cluster Table.In the place of BSEG you can use:
    Account Recivables data use BSID and BSAD tables
    GL Account Related data use BSIS and BSAS tables
    Account payables data use BSIK and BSAK tables
    Thanks.

  • Create pdf using data from another pdf

    Hi,
    I need to automate the following process.
    A user fills in a pdf form(on a website) and submits it. A notification is sent to the appropriate person of the submission. This person will add in more information in the same form and when finished, clicks a ‘Generate’ button  that will create 3 pdf’s with the same data as the initial pdf but with some more added text.
    Is it possible to achieve this using adobe forms?
    Help is much appreciated.
    Thanks!

    Hi,
    Say you have a report for retrieving Sales by Products for a company and showing up grand total of sales for all products too in the same report. So, how about a case where you would like to see each product's contribution to the whole sales numbers? For this, a new column could be something like
    Measures.Sales*1.0/SUM(Measures.Sales)
    Here Measures.Sales is the sales for each product and SUM(Measures.Sales) is nothing but the total sales ie grand total.
    Hope this helps.
    Thank you,
    Dhar

  • Create XML using data from Oracle

    Other than using OracleXMLQuery, how do I create an XML file from the data from a table in Oracle?
    Rgds,
    Seetesh

    Vetsrini:
    Thanks for your response. I no longer can receive email at [email protected], because I am at a different company now. So please post directly to this forum so I can receive my messages.
    I would imagine that "look ahead" is a feature needed by many applications, since the heading of a document may depend on the data within. In my case, we have a Pack Slip that we want the bold heading title to change if the word "FAX" is inside the body of the document. Instead of saying "Pack Slip", it would say "Fax Pack Slip".
    Any hints would be greatly appreciated.
    Regards,
    Rich Locus

  • How to create and use Data Vault with HTML/JavaScript (SAPUI5) for Mobile Apps?

    Hello,
    I am creating a demo Enterprise Mobile App, for cross platform and I want to use the Data Vault.
    I am not able to figure out how to implement the Data Vault with HTML/JavaScript i.e. SAPUI5 for cross platform mobile apps I have a tutorial, but it is for Android based apps. Where as I want it for iOS as well. I guess, in this case, implementing the Data Vault using SAPUI5 over HTML and JavaScript would be  better.
    If anyone has any links or sample code to implement Data vault in HTML/JavaScript (SAPUI5) or specific for iOS apps, it would be great.
    Thank you.

    Hi,
    This is the "SAP Mobile Documents" community, so this seems to be the wrong place for asking your question related to Data Vault / SAPUI5.
    Maybe you should post your question here: http://scn.sap.com/community/developer-center/front-end.
    best regards,
    Ingo

  • Create Query using data from 0IC_C03 to show stock balance

    Dear All,
    I have successfully setup 0IC_C03. I have loaded in the data in accordance with the documentation. I check the result and it seems the stock balance match with the data source.
    However, my question is how can I setup a formula in the query so I can look up stock balance based on the date I put in to run the query.
    For example, I loaded in the data on Oct 13, 2008. For material A,  I have a key figure called Quantity total stock which is the net of receipt and issue total stock is  10,000 LB as of Oct 13, 2008. 
    When I run the same query using the date as of Oct 31, 2005, the quantity total stock show  -10,000 LB.  The stock balance of material should be 0 LB on Oct 31, 2005.   I know I can't just simply create 2 key figures - one using the loading date (Oct 13, 2008)  and one using the input variable date to add up together since I will have trouble if I enter Oct 13, 2008 as the input variable day because it will zero out.
    Please advise. Thanks.

    Hi Brian,
    Thank you for your reply.  After I double check, the setting was wrong in the DTP of 2LIS_03_BX to feed the infocube 0IC_C03.  it wasn't set to initial Non-cumulative for non-cumlative value in the extraction mode. after I change that and re-ran the whole process, the current and past stock balances are correct.
    However. the problem happen again when I test delta update.  I loaded 2LIS_03_BF delta update first to 0IC_C03 and compress with no marker update was checked. after that, I loaded 2LIS_03_UM delta update and compress with no no marker update was checked.  For some reasons, the quantity total stock doesn't add up. it should be 9600 LB in total quantity stock but show 0 LB as of Oct 08. When I ran the query for Oct 06, the quantity total stock show -9600 LB.  do you know why? Thanks again.

  • I need help I want to analyze and create reports using data from my firefox history files .

    I am not quite sure where to post this. I had a program for analyzing my firefox history which no longer works due to the change in how firefox stores history data. I am not an sqlite user. Any help will be greatly appreciated.
    I downloaded the sqlite manager addon and it is now installed on my firefox browser. I have tried it out and can make some sense of it. I would like to know how to decode the time/date storage system.

    It uses Unix time, which is the number of seconds that have elapsed since January 1, 1970 00:00 UTC /GMT.
    http://en.wikipedia.org/wiki/Unix_time <br />
    Here is an online converter tool for Unix times. <br />
    http://www.esqsoft.com/javascript_examples/date-to-epoch.htm

  • Need to create 'Characteristics' using data from legacy system

    Hi All,
            I need to create the 'Characteristics' in SAP using the data from legacy application. The allowable values list defer between characteristics.
    1) which upload tool & method I can use?
    Thx,
    Gopi

    no problem, lsmw is fine to read from text files, you can define the path & format in step 'Specify Files'
    Message was edited by:
            Harris Veziris

  • How to create JSON using data from websql

    Hi Experts,
                    am trying to make list in sapui5 and the data in the list should be populate from the database.....so far success but i want to make a json of database

    Ok, I got it.
    You have to store the data as a JSON object or get the data from WebSQL and convert to JSON before use it in your Model.
    You can check the links below.
    javascript - Inserting JSON data into Sqlite/webSQL database - Stack Overflow
    javascript - How can I get JSON fton WebSQL - Stack Overflow
    Hope it helps you.

  • Creating apps using SDK without any programming skills

    Hey there. I have no idea of writing programs, I'm a total beginner, but would actually like to write an app for the iPhone. So, is it possible to do so with the SDK or do you need any skills?

    You do need some programming skills in Objective C.

  • Creating Repositories using MS SQL Server DataBase in Data Service Reposito

    HI All,
    I installed BODS and I am trying to create repository using Data Service Repository Manager but I am getting the following error message :
    Cannot open connection to the repository.  The error message from the underlying DBMS is <ODBC call <SQLDriverConnect> for data source <localhost> failed: <[Microsoft][ODBC SQL Server Driver][DBNETLIB]SQL Server does not exist or access denied.>. Notify Customer Support.>. (BODI-20006)
    An error occurred during creation of the local repository. (BODI-300054)
    While installing BODS i used the option to create DB .... Before that even I had Microsoft SQL server installed for MDM which was working fine (Able to Log on and so on)...
    Do I need to install Oracle in order to create repositories? How to proceed further please suggest.
    many Thanks
    Rajeev.

    Hi!
    What version of SQL Server are you using for the repositories? Maybe the error is because DS can not create repositories in SQL Server 2008. You can read and write data with SQL2008, but you need to create the repositories in SQL2005 or another RDBMS. I'm not sure when DS is going to be able to create them in SQL2008.
    I hope this could help you. Greetings!
    See you
    LCGC

Maybe you are looking for