Conditions in infoset query (SQ02)

Hi, I´m working with BW 3.5 And I´m using infoset query(SQ02) for link two tables.
The second table is linked with left other join, and I need more one condition in this table, I just want the data with max(date) in table two.
For Example:
Table 1:
FIELD1  | FIELD2 | NET_PRICE
800001  | 0010   | 100.00
800002  | 0010   | 1520.30
800003  | 0010   | 48.54
Table 2:
FIELD3 | FIELD1 |  FIELD4  |BILL_QTY
900000 | 800001 | 20080101 |10
900001 | 800001 | 20080210 |15
900002 | 800003 | 20080101 |10
Result of InfoSet query (Table1-FIELD1 link Table2-FIELD1 with left other join) :
FIELD1  | FIELD2 | NET_PRICE | FIELD3 | FIELD1 |  FIELD4  |BILL_QTY
800001  | 0010   | 100.00    | 900000 | 800001 | 20080101 |10
800001  | 0010   | 100.00    | 900001 | 800001 | 20080210 |15
800002  | 0010   | 152.30    | 000000 | 000000 | 00000000 |0 
800003  | 0010   | 148.54    | 900002 | 800003 | 20080101 |10
But the result should be:
FIELD1  | FIELD2 | NET_PRICE | FIELD3 | FIELD1 |  FIELD4  |BILL_QTY
800001  | 0010   | 100.00    | 900001 | 800001 | 20080210 |15
800002  | 0010   | 152.30    | 000000 | 000000 | 00000000 |0 
800003  | 0010   | 148.54    | 900002 | 800003 | 20080101 |10
Is possible appear only the max(field4) for de left table 2 using infoset query (SQ02)?
Thank´s!!

Please check out this link and let me know if it is helpful..
http://help.sap.com/erp2005_ehp_02/helpdata/en/d2/cb449c455611d189710000e8322d00/frameset.htm
When outputting using the SAP List Viewer, the code at TOP-OF-PAGE has no significance

Similar Messages

  • Conditions for InfoSet query.

    Hi, I am joining 2 tables CRMD_ORDERADM_H and the status table CRM_JCDS by the GUID.  Now currently it displays all the status with the transaction, but I only need the latest one.  There is a field UDATE and UTIME in CRM_JCDS, is there a way in InfoSet queries to sort and select only the latest record or can this only be accomplished using ABAP reports?

    Arthur,  I have been playing around with this a little and I have a solution.  I create a test infoset, it is a direct read on the MARC table.  In my query, I only want the last material and plant combination.  So my records in marc look like this.
    60001262 0001
    60001262 0004
    60001262 0005
    60001262 0006
    60001262 0007
    60001262 0011
    So my query is only supposed to bring the record for plant 0011.  Here is how I did it.
    In the record processing part of the infoset where you can put the code.  I did this.
    data: imarc type table of marc with header line.
    data: lines type i.
    select * into table imarc from marc
               where matnr = marc-matnr.
    describe table imarc lines lines.
    read table imarc with key matnr = marc-matnr
                              werks = marc-werks.
    check sy-tabix = lines.
    What this does is it goes back to the database against MARC and gets all of the records for that specific material that it is processing currently.  Finds how many records there are,  the reads this internal table with the key(currectly MATNR WERKS processing)  then checkes whether that record is the last of the sequence by checking the record read against the total number of records in the ITAB.   This really worked great.  I hope that you can implement a simular solution.
    Regards,
    Rich Heilman

  • Delete duplication in infoset query sq02 sq01

    i use a join which give many entrites same i want to remove all duplicates.

    Please check out this link and let me know if it is helpful..
    http://help.sap.com/erp2005_ehp_02/helpdata/en/d2/cb449c455611d189710000e8322d00/frameset.htm
    When outputting using the SAP List Viewer, the code at TOP-OF-PAGE has no significance

  • SQ02 Infoset Query

    Hi
    When I'm trying to create an infoset query by using the trasaction SQ02 , while generating it's throwing the error
    " Error in Parameter PYPARAID
        Statement concluding with "---Type" ended unexpectedly".
    Can anyone pl help me in creating a query using sq02, sq03 and sq01.
    rewared points will be given..
    Thanks
    Nanditha

    Check these links, they are very useful...
    http://www.insightcp.com/res_15.htm
    http://www.ams.utoronto.ca/Assets/output/assets/adhoc_2990830.pdf.pdf
    If you still have any queries, let us know...
    SKR

  • INFOSET QUERY: Set condition for output display

    Dear Experts,
    I have created a infoset query for display of Material inspection Characteristics using tables QPMK, QPMZ & QPMT.
    now the user wants to display data only of those transaction no.'s starting with 'MC' or 'EQP' or 'WE' so on & so forth.
    I do not know how to incorporate the same in the Infoset. I have tried putting the codes in DATA / START-OF-SELECTION / RECORD PROCESSING etc... but no use.
    There is another option of filtering the transaction no,'s in Layout, but user does not want the same.
    so kindly guide me.
    Thanks.
    Regards,
    Jitesh

    Hi Jitesh,
    Please follow the below stepas . (here pseudo code)
    In Data Section
    DATA: str1 TYPE string,
               str2 TYPE string,
               str3 TYPE string.
    str1 = 'MC*'.
    str2 = 'EQP*'.
    str3 = 'WE*'.
    If you have more strings to compare ..declare those like that.
    In 'Record processing Event' you need to use CHECK statement with CP operatoar of String
    CHECK table_name-transaction_field CP str1 OR  table_name-transaction_field CP str2 OR table_name-transaction_field CP str3.
    CHECK SY-SUBRC EQ 0.
    Genrtae the Infoset "Important step
    Go to SQ01(in a new session) , and see if your getting required result.
    Regards,
    Dinesh
    Edited by: Dinesh Tiwari on Oct 1, 2009 7:17 AM
    Edited by: Dinesh Tiwari on Oct 1, 2009 7:18 AM
    Edited by: Dinesh Tiwari on Oct 1, 2009 8:07 AM

  • BW Datasource on an Infoset Query based on 2 DSO Active tables

    Hello,
    We have created a Datasource in the BW system over an Infoset query (through SQ02) built on 2 DSO tables.
    In RSA3, this datasource is working fine - it shows us some data (close to 1000 records).
    The issue is when i try and run a infopackage for the datasource.
    The request times out and no records are fetched.
    I have added all the users to the Infoset user group - so, no issue with the authorization.
    IDoc Statuses changes from 53 --> 62 --> 64 --> 50.
    The extraction process does not complete - does not get the no. of records sent.
    Can anybody point to a probable cause here?
    Thank you.

    IDoc logs do not say much.
    Status Record 53: IDoc was successfully transferred
    Status Record 62: IDoc passed to application; Direct call started
    Status Record 64: IDoc ready to be transferred to application; No filter, no conversion
    Status Record 50: IDoc added
    Then, it does not go any further.
    We're using the Datasource on the Infoset query because we could not use the traditional BW infoset.
    Datsource is used to feed a DSO as we directly could not use anything else (we're trying with an expert routine also).
    The issue is that the base DSO tables are huge and querying on them (using SELECT) is taking a very long time.
    So, we thought of using an Infoset to create a view and then populatet he data.
    In an traditional infoset, we could not specify a condition with a range. So, the infoset query through SQ02.
    I have not tried using an APD, but that might be a good option.
    Only thing, we'll have to use a Direct DSO - which i am not sure will satisfy our requirement.
    Thank you.

  • InfoSet Query modification error

    Hi,
    I am trying to modify a InfoSet Query in SQ01 developed by a SD consultant last time. I already assigned my user ID in the User Group (in SQ03) which is referred by this Query. At the same time, I also assigned the Change Authorization to my ID.
    After that, I modified this InfoSet in the SQ02 to add on 1 table and the Save is successful. Then I try to modify the display layout of the Query in SQ01. When I save it, it give me a message "The query is locked for changes by SDUSER". The ID SDUSER is used by the SD consultant last time. Then the modification is not saved.
    I already checked in AL08 and also SM04, and found that this user is not log in at that time.
    I already done whatever I know to try to solve this problem but I still can't settle it. Can anyone please help me on this? Why can this happen? How can I unlock it?
    Thank you.

    Hi,
    the lock was made by SDUSER when he created the querie. It's an option in the first screen "Title, Format" (specials attributes). When this option is select, only the specific user can change the query (sometimes some modifications are allowed by other user's in specific conditions).
    The only way of resolving the problem, is the SDUSER to disable that option from there. After that you will be able to change it.
    If that user doesn't exists, you must call the Basis team to create the user again, log on, and change the option.
    Regards,

  • How to access a infoset query

    Hi
    I am assigned to a user group P1   but how to use the tcode SQ02 AND SQ03
    Whether to use TCODE SQ02 in first place or the other as i was unable to get in there To get into the infosetquery .
    Regards
    P

    You can create an infoset from SQ02.  If you need details on how to create an infoset, there are many postings in SDN, and you can check the sap help also.   You have to assign this infoset to your usergroup, by selecting the query and clicking on the Role/User Group assignment or from SQ03.  Make sure you are in the correct query area.  Once the infoset is assigned to the user-group, you can run the query from SQ01.
    Albert

  • How to delete Infoset Query in R/3

    Hi  Gurus,
    I created a Infoset using SQ02 in R/3 and generated the query. Now I need to delete that Infoset query. Please advice me how to delete infoset query from the functional group in R/3.
    Thanks
    Liza

    Hi,
    In SQ01 ,press shift+F7 then find your user group. then from infoset query tab ,select ur infoset.
    and try to delete , I think, it should work.
    Regards
    CSM Reddy

  • ABAP Query: Access variables in ABAP Program through InfoSet Query.

    Hi,
    While generating a report using ABAP Query Tool, how can we access the variables in the ABAP Program in the InfoSet Query?
    Thanks in Advance!!!

    HI,
    Dear, it seems that you have changed the query in SQ02 and then just save it and not generated.
    or may be after generation again clicked on SAVE button.
    So untill unless you will not generate the query, it won't work.
    Secondly, by chanegs in the query, i don't think it changes the name of the main program.
    Regds,
    Anil

  • Infoset-query-selection-screen-default-values

    Hi All,
    I am having the requirement as I need to put default values in the selecion-screen of the report by using  Infoset query. Let me know the settings required for this.
    I am using SQ01, SQ02, SQ03 T.Codes.
    And I need display  one record only if any field contains mulitple records, for example in the HR-ABAP, field p0105-usrid contains multiple values depending on the subtype.So, I need to display USRID when URSTY = '900'. All these should display by Infoset query only.
    Pls help me in this scenario , its an urgent requirement.I am very much thankful for you for reading my proble, if you will provide some sort of solution, I feel very happy.
    Advance thanks for this .
    Regards,
    Prakash.

    Prakash,
    To default the values on your selection screen, you will need to do some ABAP I guess. (if you do not want to use variant). Open up the infioset in SQ02 and then goto code option for the PNP**** field and then you can code to initialize the selection screen variables. Test with an ABAPer.
    To display multiple records as multiple columns, you will have to create custom fields in infoset, and then go from there. Again see ABAPer.

  • Infoset Query Wrong result after removing document number in the drilldown

    Hi Friends,
    I have 2 oDS,billing ODS and Condition ODS.I have created an infoset query based on these two ODS.
    From my Billing ODS i need QTY and from Condition ODS i need Value,Discount etc.
    Since there are more than one record in condition ods for each and every document of billin gods,i have divided the qty using number of records in the query.
    Im getting wrong qty if i run report based on customer or material,but if i drilldown based on document im getting the correct quanity.
    Can any one help me..
    Thanks & Regards
    Sudhakar

    Thnaks Oscar and Ganesh for your interest.
    FYI,my infoset is created based on bill doc and item number which is available in both the ODS.
    Here,for every document in Billing ODS,there are more number of documnets in Condition ODS,so the bill qty is getting added according to the numvber of records in Condition ODS.
    Eg.Billing ODS: Doc Num:100012, Qty = 8.if 10 records are ther in condition ODS,then in the infoset my QTY becomes,
    Doc Num:100012, Qty = 80.
    So in the query i divided it by number of records to get the qty and is coming correctly for documnet wise report.
    Problem comes when i remove documnet from the report and drilldown to higher level,say material,then it is calculated wrongly.
    Your suggestions plz..
    Regards
    Sudhakar

  • Select distinct from an infoset query

    Hello
    I need to select distinct / delete duplicate from an infoset query created thru SQ02.
    Please let me to know how this can be done?
    Many thanks in advance!
    regards
    Sanjyot

    Hi,
    You can verywell use infoset query if you are doing following things
    Join using Keyfields to retreive data from tables
    If not using keyfields create index for those table fields  in those fields which will improve in accessing database
    Try to use minimum of tables of small size dont try to join big tables like GLPCA and all.
    Try to load small set of data like a period or month. Dont try for a year or so.
    if your performance is good for aperiod you can go for a year.
    If you are good in function module you can try function module in which you will have the option of specifying no of records to be selected usign package size.
    Hope this helps for you.
    Thanks,
    Arun

  • Infoset Query-concatenate fileds

    Dear Experts,
    How to Concatenate two fields into a local field in an infoset query.
    Regards
    Jogeswara Rao

    Hello Jogeswara,
    If you are creating an additional field in the query, then do the following when calling transaction code SQ02.
    1.  Click pushbutton labeled Extras and create an additional field.  Make sure that it is in character format and that its length is long enough to fit the two fields to be concatenated including a space in between (if desired).
    2.  Then click the CodingForAddition pushbutton for the field you created in step 1.  Enter your CONCATENATE command.
    Suppose you want to concatenate MARA-ERNAM and MARA-ERSDA into additional field NAME_DATE separated by a space.  Define NAME_DATE to be character of length 23 which is large enough to contain the maximum size of the concatenated fields plus a space.  You would enter the command below for the additional field. 
    CONCATENATE MARA-ERNAM MARA-ERSDA INTO NAME_DATE
    SEPARATED BY SPACE.
    Kind Regards,
    Rae Ellen Woytowiez

  • Infoset Query Selection Screen

    Dear Experts,
    In an infoset query. how to split the Selection Screen into different screen areas (Blocks).
    Means, presently the Selection Screen is having 20 fields together under single block.
    I want to group them into different blocks with respective Headings.
    How to do it?
    Regards
    Jogeswara Rao

    Hello Jogeswara,
    Go back to the infoset using SQ02.  On the "Change Infoset" screen, go to the "Field groups" section.  You may have to click the "Field groups" pushbutton.  If you right-click on the field group, then you can create, change or delete a field group.  Add fields to a field group by dragging field from left-side of screen and dropping on the right-side of screen.
    Kind Regards,
    Rae Ellen

Maybe you are looking for

  • My iTunes keep restarting by itself.

    I plugged in my iPad 2 to sync it and everything went like it should. I forgot to eject it first and just unplugged my iPad. Now iTunes keeps restarting as if the device has been plugged in agian , even though it has not. Anyone with some help?

  • MOF Syntax Error Installing SQL Server 2014 Express

    I am trying to install SQL Server 2014 Express With Tools on a fully updated Win 8.1 system having already installed Visual Studio Community 2013 with Update 4. During the installation of SQL Server, I am getting a "MOF Syntax Error". I found this ht

  • Photoshop Elements 10 now crashing on both of my computers.  Why?

    It was working perfectly for almost a year and suddenly it began crashing.  it's not a hardware problem, I had that checked first at the Apple Store. There's enough memory and I've removed many photos from the iPhoto file in case that was the problem

  • Mac OS X Leopard and eMac G4 hotkeys

    Hi! I have eMac G4 1.25gHz with OS X 10.5.8 installed. It is with PC wireless keyboard and I want to turn screen off from the keyboard. The combination is cmd+shift+eject, right? On my keyboard short press on F12 opens a dashboard and long press work

  • Master Data Exporting

    Hi All: I have a problem with the generation of the standard master data Idoc with message type HROT_UM. When ever I prepare to send an Idoc to a third party tool, Here we are using ADP Connections. The Idoc being generated sends all the data, not on