Info set query

Hello everybody,
I have a problem with the creation of info set (tcode : sq00 and sq02)
I need your help, i have to develop a query with a number Purchase Order and number of invoice.
For example : for a number of invoice : 5105617263
i have with TOAD (soft) this :
select distinct ekko.ebeln, rseg.belnr
from sapsr3.ekko, sapsr3.rseg
where ekko.ebeln = rseg.ebeln
and rseg.belnr = '5105617263'
and ekko.mandt = '350'
EBELN        BELNR
4500013374   5105617263
4500014267   5105617263
I've tried to have the same result with an info set (sq02) and i have this :
Purchase Order           Invoice
4500013374               5105617263
4500013374               5105617263
4500013374               5105617263
4500014267               5105617263
4500014267               5105617263
4500014267               5105617263
4500014267               5105617263
I dont know to develop in ABAP and i want to know if it's possible to have DISTINCT in an info set ?
Or which table can i use to have this ?
Thank you very much

thanks for your answers.
<br>
I tried to create a z programm with tcode SE38 but i dont have the key.
<br>
I would like to know if i can write this code on the tcode sq02 ?
<br>
this is my code :
<br><br><br>
FUNCTION /1BCDWB/IQG000000000487EXTR.<br>
<br>
""Interface locale :<br>
*"  TABLES<br>
*"      %SELOPT STRUCTURE  RSPARAMS<br>
*"      %DTAB STRUCTURE  /1BCDWB/IQG000000000487<br>
*"  CHANGING<br>
*"     VALUE(%RTMODE) TYPE  AQLIMODE<br>
*"  EXCEPTIONS<br>
*"      NO_DATA<br>
*"      NO_AUTHORIZATION<br>
*"      ILLEGAL_PACKAGE<br>
*"      CURSOR_NOT_OPEN<br>
<br>
<br><br><br>
call function 'RSAQRT_SET_IDENTIFICATION'<br>
exporting iqid        = %iqid<br>
          sscr_report = sy-repid<br>
changing  rtmode      = %rtmode.<br>
<br><br><br>
if %rtmode-pack_on = space or %rtmode-first_call = 'X'.<br>
   call function 'RSAQRT_FILL_SELECTIONS'<br>
     tables   selopt = %selopt<br>
     changing rtmode = %rtmode.<br>
endif.<br>
<br><br><br>
call function 'RSAQRT_INIT_TEXTHANDLING'    <br>
     exporting class   = 'CL_TEXT_IDENTIFIER'<br>
     wsid    = 'G'<br>
     infoset = 'REQUETE_EBELN'.<br>
<br><br>
if %rtmode-no_authchk = space<br>
and ( %rtmode-pack_on = space or %rtmode-first_call = 'X' ).<br>
refresh %auth_tabs.<br>
append 'RBKP' to %auth_tabs.<br>
append 'EKBE' to %auth_tabs.<br>
append 'EKKO' to %auth_tabs.<br>
call function 'RSAQRT_AUTHORITY_CHECK'<br>
      exporting<br>
          auth_tabs         = %auth_tabs<br>
          auth_clas         = 'CL_QUERY_TAB_ACCESS_AUTHORITY'<br>
      changing<br>
          rtmode            = %rtmode<br>
      exceptions<br>
          NO_AUTHORIZATION  = 1.<br>
if sy-subrc = 1.<br>
   raise no_authorization.<br>
endif.<br>
endif.<br>
break-point.<br>
<br><br><br>
data: %l_no_further_fetch type flag, " stop fetching<br>
       %l_hits_cnt         type i.    " cnt for %dbtab entries<br>
<br><br><br>
   if %rtmode-pack_abort = 'X'.<br>
     if not %dbcursor is initial.<br>
     close cursor %dbcursor.<br>
     endif.<br>
     exit.<br>
endif.<br>
<br><br><br>
if %rtmode-pack_on = space or %rtmode-first_call = 'X'.<br>
      if not %dbcursor is initial.<br>
          close cursor %dbcursor.<br>
      endif.<br>
      open cursor with hold %dbcursor for<br>
      select RBKPBELNR RBKPRMWWR RBKPWAERS RBKPWMWST1 EKBEBELNR EKKOEBELN<br>
      from ( RBKP<br>
           inner join EKBE<br>
              on  EKBEBELNR = RBKPBELNR<br>
           inner join EKKO<br>
            on  EKKOEBELN = EKBEEBELN )<br>
           where RBKP~BELNR in SP$00001<br>
           and EKKO~EBELN in SP$00002 .<br>
endif.<br>
<br><br><br>
if %dbcursor is initial.<br>
  raise cursor_not_open.<br>
endif.<br>
<br><br><br>
while %l_no_further_fetch = space.<br>
      fetch next cursor %dbcursor<br>
      into (RBKP-BELNR , RBKP-RMWWR , RBKP-WAERS , RBKP-WMWST1 , EKBE-BELNR , EKKO-EBELN ).<br>
      if ( ( %rtmode-acc_check = 'X' and<br>
           sy-dbcnt > %rtmode-acc_number )<br>
          or sy-subrc <> 0 ).<br>
          %l_no_further_fetch = 'X'.<br>
      else.<br>
           check SP$00001.<br>
           check SP$00002.<br>
          call function 'RSAQRT_TEXTFIELD_REFRESH'.<br>
           %dtab-BELNR = RBKP-BELNR .<br>
           %dtab-RMWWR = RBKP-RMWWR .<br>
           %dtab-WAERS = RBKP-WAERS .<br>
           %dtab-WMWST1 = RBKP-WMWST1 .<br>
           %dtab-WAERS001 = RBKP-WAERS .<br>
           %dtab-EBELN = EKKO-EBELN .<br>
           append %dtab.<br>
           %l_hits_cnt = %l_hits_cnt + 1.<br>
           if %rtmode-pack_on = 'X'<br>
               and %l_hits_cnt >= %rtmode-pack_size.<br>
                %l_no_further_fetch = 'X'.<br>
               endif.<br>
          endif.<br>
     endwhile.<br>
<br><br><br>
if %l_hits_cnt = 0.<br>
     if not %dbcursor is initial.<br>
      close cursor %dbcursor.<br>
     endif.<br>
     raise no_data.<br>
   endif.<br>
<br><br><br>
if %rtmode-pack_on <> 'X'.<br>
      close cursor %dbcursor.<br>
endif.<br>
read table %dtab index 1 transporting no fields.<br>
if sy-subrc ne 0.<br>
     raise no_data.<br>
endif.<br>
<br><br>
endfunction.
<br><br>
if i can write this code on the sq02, where i must write this ?  DATA ? INITIALISATION ? START-OF-SELECTION ?
Thank u very much for your help !
Edited by: missmiss25 on Oct 23, 2009 10:09 AM

Similar Messages

  • Info set query condition

    we have a infoset query to generate a list of parked logistic invoices, we use the same vendor and the same T-code : MIR7 to generate park document, but I can see only the park documents generated by my collegue throgh this info set query.
    I can't see the park documents generated by me throgh this info set query, we are using the same T-code MIR7 and same query.
    why this happen? Is someone set the condition of this query, so i can't see the parked document generate by my self. I can see these parked document(both my collegue and mine) through MIR6

    any idea from query design point of view? thanks

  • Info-set query datasource

    Hi Geeks,
    I have created an infoset query. Based on tables
    VBAK - Sales order header data
    VBAP - Sales order item data
    VBUP - Sales document item status
    VBPA - Parnter function table.
    I created a custom data-source in RSO2 based on this infoset query.
    Now I want to delete tables (VBPA) or entries (VBPA-KUNNR) in field groups from infoset query.
    & system is not allowing me to do this saying
    System says "VBPA-KUNNR" is used in queries.
    Can anybody please suggest me any way to change the infoset & inturn datasource created over it.
    Thanx in advance.
    Monica

    If I correctly understand , you want to remove the filed or table from info set query .
    As data source is based on Infoset query , it  will not allow to change the  same
    You can delete the data source  or if you do not want to delete  just  detach the info set from Data source  by removing the info set name  ( may be you can replace it with another duplicate query name for time being ) and save activate datasource  and later change the info set .
    You can revert back to original info set  query name in data sources after changes are done.

  • Custom fields of standard info types to be included in Info set query

    Hi All,
    I want to understand if the following scenario is entirely a fucntional config or ABAP efforts are also required.
    A standard info type is already included in the Info set. But the (Z fields) in the Additional fields column of the IT are not visible in Info set for the respective  info type.
    I understand, with T-code SQ02 infotypes can be included in the existing info set, but not aware about the Z fields of a Standard Infotype.
    Hence, please let me know, if there is any config which is required, so that they are reflected in Info set.
    Thank you in Advance.
    Regards
    Simran

    Make sure you have the infoset in edit mode.
    if it is correct you see the addtional fields in the left half of the screen at the infotype.
    Select the field group on the right half of the screen, go to the left half of the screen, select the field you want to add to the fieldgroup with right mouse click and select 'add field to fieldgroup'
    good luck
    Theo

  • Unit Conversion in Info Set Query

    Hello Experts
    I have create a query on infoset in which I want to show the qty field with the unit conversion factor . but I am not able to do so.
    It is giving an error message while saving the query
    0Material is not a valid characteristics for Info provider ZINFOSET
    Diagnosis
    Customer enhancement RSR00002 or the implementation of BAdI RSR_OLAB_BADI delivers 0MATERIAL as the characteristic to be calculated. 1. is, however, not a valid key figure for InfoProvider ZIS_BILL.
    System Response
    The information from 0MATERIAL is ignored.
    Procedure
    Check the exit.
    Procedure for System Administration
    Please help me out
    Thanks
    Neha

    Hi,
    You can try unit conversion planning function,create planning function and add it at the back of button.
    Can refer to link below:-
    Not sure if it can solve your problem.As it also depends upon source and target keyfigure used.
    http://help.sap.com/saphelp_nw70/helpdata/en/44/21643cedf8648ee10000000a1553f7/content.htm

  • SAP Query Alias Table in Info-set not working

    Hi Guys,
    I'm having a bit of trouble with a query I'm writing in SQ01.
    I am trying to create a standard margin report between two different costing variants that we use.
    n order to do so I have had to employ the use of alias tables.
    I have named the alias tables KEKO_2 and KEPH_2 accordingly and joined them in the info set with the same joins as the original tables (Left Outer to MARC on MATNR and WERKS)
    However, when I have come to test the query in SQ01 I get a runtime error which states the following:
    The following syntax error was found in the program
      AQA0MASTER_DATA=STANDARDMARGIN :
    "Field "KEPH_2-KST001" is unknown. It is neither in one of the specified
    tables nor defined by a "DATA" statement . . . . . . . . . ."
    But it is in a specified table! My alias table.
    How can I make this query work?
    Any help would be appreciated.
    Thanks in advance.

    Hi,
    This is SAP business one reporting and printing forum. Please find correct forum and repost your question to get quick assistance.
    Please close this thread by marking helpful answer.
    Thanks & Regards,
    Nagarajan

  • Re:User group,info set and Query combination table

    Hi,
      I would like to know the combination table of User group,info set and Query.
    Can any body please respond to my question?
    Regards,
    Suresh Kumar.

    Hi,
    Check the tables starting with AQG*.
    Reward points if useful.
    Regards,
    Atish

  • Re: Info set and query transport under same request number

    Hi,
      I would like to know the details about info set and query transport from development to quality using SAP Query:  Trnasport tool.my quesion is,
    Can i create all info sets and related queries under same request number or will it be created in diffrent request numbers?Please respond any body to my question.
    Regards,
    Suresh Kumar.

    No it is possible as per SAP.
    Please read follwoing help-
    http://help.sap.com/saphelp_nw70/helpdata/en/e3/e60138fede083de10000009b38f8cf/frameset.htm
    It is talking abou the Special Features of InfoCubes in InfoSets.
    For queries based on an InfoSet with an InfoCube, the system decides at runtime whether aggregates can be used for the InfoCube. This is the case if all the required InfoObjects of the InfoCube exist in an aggregate. The following InfoObjects are required:
    The key figures of the InfoCube selected in the query
    The characteristics of the InfoCube selected in the query
    The characteristics required for a join with other InfoProviders in the InfoSet.
    Furthermore, as a prerequisite for using aggregates, all the data required by an InfoCube must be readable using logical access. For an InfoCube within an InfoSet with InfoCubes, it is no longer possible to read part of the data from one aggregate and part of the data from another aggregate or the InfoCube itself.

  • RE: Authority checks included in the info set of the query

    Hi all,
    I am checking the program code for one of our custom tcodes and i asked ABAP team to add authority check to the program code because there is no auth check in the code and abapers told me that the authority check is included inside the info set of the query and not in the program . the program is used to execute the query in the Tcode.
    how to find the Authority checks included in the info set of the query.
    Thanks in advance,
    Sun.

    If you have the BI support roles assigned to you  and the security admin  roles please login to the BI system
    execute transaction RSECADMIN, click on the analysis tab and execute as the user who is assigned the role with restrictions.
    For variables in authorizations like ( type customer exit )
    use RSECADMIN - maintain authorization tab - Click on value authorization tab.
    Keytransaction is RSECADMIN  & infoobject maintenance details you can get from RSD1.
    Regards

  • Error message when checking Aggregates on Info-set based Query

    Hi All,
    I have an Info-set (Inner-join between Info-cube and DSO) based Query. When I checking whethere it is picking up the aggregates (which is created on Info-cube) or not in RSRT, it is giving me following message -
    I>> Row: 23 Inc: SHOW_AGGR_COMPARISON Prog: CL_RSDDK_AGGREGATE_COLLECTION
    RS_EXCEPTION 
    301CL_RSDDK_AGGREGATE_COLLECTION
    SHOW_AGGR_COMPARISON
    I have checked fully that whatever fields I am using in my Query are available in Info-cube's Aggregate.
    Even when I am running same query (which I have created on same Info-cube direclty) in RSRT, it is picking up the aggregates.
    I have put the Request status 'Rolled up data (Rollup)' in Info-cube in Info-set as well.
    Please guide me what I need to do for picking up the aggregates.
    Regards,
    Dheeraj Kumar Garg

    No it is possible as per SAP.
    Please read follwoing help-
    http://help.sap.com/saphelp_nw70/helpdata/en/e3/e60138fede083de10000009b38f8cf/frameset.htm
    It is talking abou the Special Features of InfoCubes in InfoSets.
    For queries based on an InfoSet with an InfoCube, the system decides at runtime whether aggregates can be used for the InfoCube. This is the case if all the required InfoObjects of the InfoCube exist in an aggregate. The following InfoObjects are required:
    The key figures of the InfoCube selected in the query
    The characteristics of the InfoCube selected in the query
    The characteristics required for a join with other InfoProviders in the InfoSet.
    Furthermore, as a prerequisite for using aggregates, all the data required by an InfoCube must be readable using logical access. For an InfoCube within an InfoSet with InfoCubes, it is no longer possible to read part of the data from one aggregate and part of the data from another aggregate or the InfoCube itself.

  • Info Set on Transactional ODS

    Hi Friends,
    My Requiement is to create a Info Set on Tannsactional ODS and On this info set i have to create a Bex Query.
    If i creata a Query on this info set whether we can get  all the query properties like currency conversion etc as for the query created on noramal info set which is created on standard ODS.
    Looking for more suggessions and answers.
    Thanks in advance.

    Hi Ashok,
    Thanks for the immediate replay.
    Hear i have to do a lenthi process before doing that ,i an looking for some b'dy who has worked on currency conversions at query level whcih are developed on infosets(i.e on Transactional ODS).
    Once again thanks for the usefull answer.
    Laxman

  • Navigational attr in info-set.

    Hi Expects,
    I am using BW3.5
    I want display attribute as navigation attribute, so that i can restrict some of the conditions in the query designer,
    For this,
    1) first i checked in the master data object whether it is navigation attribute or not, i found that it is a navigation attribute
    2) Then in the ods i have swicted on i.e. the check box is checked, in the folder NavAttribute. and activated the ods.
    3) In the info-set, the field is not available.
    If i create report on ods, in report level the object is available, but if i create report on info-set the object is not available.
    So to available the object in the report level by creating on info-set. i need to do any settings in info-set level if so please tell me step by step.
    Thanks and regards,
    Sagar.

    Hi All,
    Thanks to all to your time.
    The issue was resouled, i have added master data object in the info-set.
    Thanks and Regards,
    Sagar.
    Edited by: Sagar Venkata on Oct 20, 2008 3:50 PM

  • Info-Set performance

    Hi, all
    I have a little problem with requests on my info-set. Info-set inner joins two ODS-objects 0FIAR_C03 and  ZC03_ODS on 0BILL_NUM. 0FIAR_C03 contains key fields:
    0COMP_CODE, 0DEBITOR, 0FISCPER, 0FISCVARNT, 0AC_DOC_NO, 0ITEM_NUM,0FI_DSBITEM and index OBILL_NUM.
    ZC03_ODS contains key fields: 0COMP_CODE, 0DOC_NUMBER, 0DELIV_NUMB, OBILL_NUM, 0DOC_CLASS. And then I filtered my request,for example, by 0DOC_NUMBER I was waiting for the result half an hour. But with no result. But then I filtered by OBILL_NUM, I've get the result for half a minute.
    PS: ZC03_ODS ~ 1000000 records
        0FIAR_C03 ~ about 700000 records

    ODS indexes are like normal tables. If you have not defined any index, then there will be a primary index on the key fields of the ODS.
    To analyze in detail, turn on SQL trace and run the query. In the trace results you should get the execution path with the index used, if any.

  • Info set , info provider and info spoke

    Hi gurus plz give me the difference in between info set and info provider and info spoke. and give me what are the prerequisites are needed to process infoset, infoprovider and info spoke?
    Regards
    Vidhu

    InfoProvider
    An InfoProvider is an object for which queries can be created or executed in BEx
    Check this for more,
    http://help.sap.com/saphelp_nw04/helpdata/en/4d/c3cd3a9ac2cc6ce10000000a114084/content.htm
    Infoset:
    An InfoSet is a special view of a dataset, such as logical database, table join, table, and sequential file, and is used by SAP Query as a source data. InfoSets determine the tables or fields in these tables that can be referenced by a report. In most cases, InfoSets are based on logical databases.
    SAP Query includes a component for maintaining InfoSets. When you create an InfoSet, a DataSource in an application system is selected.
    Navigating in a BW to an InfoSet Query, using one or more ODS objects or InfoObjects.You can also drill-through to BEx queries and InfoSet Queries from a second BW system, that isConnected as a data mart.
    The InfoSet Query functions allow you to report using flat data tables (master data reporting).Choose InfoObjects or ODS objects as data sources. These can be connected using joins.You define the data sources in an InfoSet. An InfoSet can contain data from one or more tables that are connected to one another by key fields.The data sources specified in the InfoSet form the basis of the InfoSet Query.
    Check the link for more,
    http://help.sap.com/saphelp_nw2004s/helpdata/en/ad/2225391d4f000be10000000a114084/frameset.htm
    InfoSpoke:
    Info spoke is an open hub destination defines to which target the data is to be relayed.
    Check this link for more,
    http://help.sap.com/saphelp_nw2004s/helpdata/en/ad/2225391d4f000be10000000a114084/frameset.htm
    Check this doc also,
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/eb462104-0701-0010-07ae-d866630e0989
    Hope this gives you a good idea...

  • Extended functions of Info Sets

    Hi Experts,
    what are Extended functions of Info Sets .....Could you plz explain me.
    Regards
    Venkat

    hi,
    we use cubes also in  an infoset like as data store object.
    SAP does not generally support more than two InfoCubes in an InfoSet. If you include more than two InfoCubes in an InfoSet, the system produces a warning. There are several reasons for this limitation
    see this link u get more information for infoset.
    http://help.sap.com/saphelp_nw70/helpdata/EN/42/ca6a69992f6bb1e10000000a1553f6/frameset.htm
    hope its help to u.
    plz assign points if its solve your query.
    thanks,
    suresh.
    Edited by: sureshkumar gedela on Feb 25, 2008 12:03 PM

Maybe you are looking for

  • Free goods in Retail system

    Hello Guys, I have done all required steps to maintain Free Goods (in Retail system). Maintained following condition tables: 1. Company/Material 2. Sales org/Material 3. Sales org./Distr. Channel/Material 4. Sales org./Distr. Channel/Plant/Material 5

  • Adding a new Tab - ME22n - Item Detail Level

    Hi, This is a bit Urgent! I need to add a Tab to a TabStrip in Item Detail level, in ME22n that has a count of 12. Out of which 1 is custom made. Someone else had done this development and i can't figure out how it's done. Now, i am adding a 13th Tab

  • DC30 - Templates for original files

    Hello, is it only possible to create and change templates for original files without transport? I have one document type for templates which I want to use for different document types in DC30. I only want to create the templates (document type for te

  • Grainy Still Images and Titles

    I've just completed about a 10 minute film utilizing still images and video clips. It was made with the Adobe Premiere Elements 3 that came with my Sanyo Xacti camera, running on Windows XP. The video looks great all the way up until the end. I have

  • Problems Exporting HTML from Fireworks (new to Fireworks)

    Forgive me if this is a rudimentary question, but I've searched the help files as well as online and I'm not finding anything on it.  I have a bunch of PNG image maps I need to update (someone else created the PNGs in Fireworks several years ago).  I