Infoset query with KNB1 customer's ADRC information

Hello,
An explanation into the problem:
I'm trying to create an infoset query with KNA1, KNB1 and ADRC which would do the following:
In KNA1-SORTL we hold customer numbers which can be found from KNB1. This query should:
Display KNA1-KUNNR and relevant address data for this customer via connection KNA1-ADRNR and ADRC-ADDRNUMBER. Then it should check KNA1-SORTL- field and if it corresponds to KNB1-KUNNR, it should go back to KNA1 with this KUNNR and display all this customer's relevant address data via this customer's KNA1-ADRNR to ADRC-ADDRNUMBER.
I'm relatively new to infoset coding and ABAP in general, plus I'm self- taught so please bear that in mind.
I'll give an example as to what I've managed to do so far. In SQ02 I joined tables KNA1(left outer join)KNB1 and KNA1(join)ADRC and created an extra field ZADRNR to see if I could display the ADRNR for the customer number found in KNB1.
Something along the lines of:
IF KNB1-KUNNR = KNA1-SORTL.
SELECT SINGLE ADDRNUMBER FROM ADRC INTO ZADRNR
WHERE ADDRNUMBER = KNA1-ADRNR.
ENDIF.
Obviously this doesn't work. Pseudocode would look like this:
Check field KNA1-SORTL
IF KNA1-SORTL = KNB1-KUNNR THEN
GO BACK TO KNA1 with this KUNNR and display it's ADRC.
KNB1 sadly doesn't maintain an ADRNR of it's own, or this would be much simpler.
Any help or advice is much appreciated, so far I've only been coding a few lines in infosets with ABAP so I'm not all that familiar with it. I've managed to create several queries through trial and error, mostly, and this forum and it's articles have helped a great deal.
Please let me know if I should provide any additional information, and my apologies if I posted this in the wrong forum area.

Hi Lalit, and thank you very much for your reply.
Unfortunately excluding space entries in selection screen wouldn't solve the issue, since we have KNA1-ADRNR for each entry, it's just that it would be different for customers found in KNB1.
I could probably solve this by making two separate queries and working on them in excel and that way we would have the necessary information.
But in order to do this in SAP seems to mean that I have to write a custom report. For that, it seems I'll be spending New Year's eve learning how to ABAP
Thank you for your help, at least we don't have to struggle with finding out a way to do this via queries so we'll just find alternative means for this.
Thanks again and have a happy new year!

Similar Messages

  • Infoset query with cero values

    Hi
    I have an infoset query that reads the information from an infoset. The infoset query is able to read the values, because it shows me values, but everything is cero, although I have values different from 0.
    But if it didn`t find values it would tell me a different message as "No application data found" or something like this.
    Then the problem is, my infoset read values, but everything that shows me is cero, and that´s not true.
    Thanks and regards
    SEM SEM

    Hi,
    What do you mean with the join condition ?
    I have an infoset query with only one ODS inside. I didn´t want to build a query directly to the ODS as I did´t want to mark the flag available for reporting in the ODS, as it already had very importat data and I didn´t want to damage the ODS  data. That´s why I have built and infoset query with one ODS inside, and in this case I don´t understand the join condition....
    Regards
    SEM SEM
    Does anybody know something ????
    Regards
    SEM SEM
    Message was edited by:
            SEM SEM

  • Infoset Query probelm for Custom Subtypes

    Hi Experts.....
             I am new to Infoset Queries...
      The problem is an Infoset query is generated for PA infotypes. It is generating output for all the infotypes except for Communication infotype which contains custom Subtypes. Could you plz help me how to get the data from these custom subtypes.(For these subtypes a select query is written).
      Thanking you in advance.
    Regards,
    Sree

    hi
            Thanks for the reply.......
       We had already created custom fields in the query..... The problem is for some fields it is getting the data. but the select query for all the fields is same(i.e., the where condition is based on pernr & usrty fileds in IT 0105).
       I can't understand why it is taking for some fields & why not for some....
      Could you plz help me.
    Regards,
    Sree.

  • Question about infoset query with code

    Hi experts.
    I always appreciate your help. Today, I have some problem. I made infoset query using SQ01 and got some data. Those data include WBS no but some of them didn't. So I tried to put some code into the infoset query that any data has not WBS has some value, for example 'X', in WBS no field.
    I needed to know what field or table I should control to display value 'X' in WBS no field in case that WBS field has no value.
    I tried to put code at "END-OF-SELECTION(before display)" and control %dtab. But I met error message there is no such table %dtab. So, I define %dtab then during runtime, I also met error message %dtab has already been defiend.
    How can I do? Is it impossible thing?? I'm wating for your answer.
    regards.

    Hi, if you just want to fill the field if it is blank, you can do this in the Record Processing Section.
    I'm not familar with the WBS number, so for this example, I will fill the BISMT in MARA during the "Recording Processing" Section.
    if mara-bismt is initial.
    mara-bismt = 'X'.
    endif.
    Regards,
    Rich Heilman

  • Understanding complex query with selections(customer exit variables)

    Hi experts,
    I am trying to understand one query having  a combination of selections and BEx variables in it.
    In Characteristic Restrictions panel of Query Designer:
    we have some CHARs restricted by means of authorisation variables
    In Default Values panel:
    some other CHARs without any filters
    In free CHARS panel
    some characteristics
    In Rows panel:
    some more chars that were placed in Default values panel
    In Columns panel:
    Formula YTD on selection YTD
    Formula Monthly on selection Monthly
    Selection on YTD characteristic(hidden)
    Selection on Monthly characteristic(hidden)
    Selection XX(in definition,I saw selection on YTD Keyfigure and a characteristic variable VAR1(i-step=1) filled with customer exit..this variable picks up right version of Master Data...our system has many versions of master data,one for each year)
    Selection YY(in definition,I saw selection on Monthly key figure and the same characteristic variable VAR1 we used in Selection XX)
    When I execute this..I see one variable popup which asks for values for year and version of master data...I enter master data version for that year and the year....I see the result...
    Now I tried to experiment to learn...I deleted Selection XX and Selection YY and tried to execute....a variable popup asking for year...I enter year and tried to execute..it throws message---'Value for variable VAR2 cannot be determined'......
    I couldnot understand this error because VAR2 is a customer exit characteristic variable defined in CMOD...ITS NEVER USED IN THIS QUERY...but defined in CMOD to pick up correct version of Master data..its defined in such a way that it picks value depending upon VAR1 varaible....both variables function is same...its just that  VAR1 works on i_step=1 and VAR2 works on i_step=2 plus dependent on VAR1....
    Can anyone understand why I am seeing error about VAR2 when its never used in Query....??
    Thanks for your inputs....

    Hi Vikram,
    I am unable to find VAR2 anywhere in query designer....Can it be like that its hidden?
    Thanks and Rgds,
    SChand

  • Infoset - Query with navigational attribute as filter

    Dear all,
    We have created an InfoSet linking an InfoObject 0COORDER to an Info InfoCube containing order data.
    We have used a Left outer join to link 0COORDER tol 0COORDER in the InfoCube. The purpose is to be able to report on all 0COORDER even if they have no transaction data.
    When creating a query we get a list of all 0COORDER as expected. The problem arises when we try to use the navigational attribute "Status" from the InfoObect 0COORDER as a filter in the query. This does not work at all.
    Does anyone know what we are doing wrong here ? We are using BEx Query Designer 7.0.
    Kind Regards,
    Mikkel

    Hi Mikkel
    When you say that your Status field does not work at all, what is the error you are getting? Are you able to see this field in the query designer. If that is not the case that means your "status" is not chosen in the infoset design.
    If you are able to see it in the designer then please let us know what is the exact error you are getting.
    Thanks.

  • Additional fields in infoset query can not be used as datasource fields

    I create one infoset query with additional fields (using ABAP code) in R/3. When I create datasource RSO2 using this infoset query, system only show all fields without additional fields that I enhanced in infoset query. Does that mean we can not get additional fields information in generic datasource creation that we enhanced in infoset query?

    dear Awa,
       you are enhanced some fields in r/3.right that fields are  shown in
    rsa6 select your data source click on display your datasource then select
    extract structure its shows how many fields are haveing particular
    datasource .or otherwise goto rso2 select your data source display
    double click on  your extractstructure  its show how many fields haveing
    the particular datasource. check the Rsa6 what ever fields you newly added that field default hide mode
    you remove the hide tickmark.

  • Missing variables in Infoset Query.

    Hi All,
    0P_KEYD2 is a variable for characterstic "Posting Date" in the  query which fires on ODS 0FIAR_O03.I have created an Infoset on ODS 0FIAR_O03 and 0CUST_SALES(Master Data)and created a query on this infoset. But I am unable to see variable 0P_KEYD2 for Posting Date in the Infoset Query.
    (There are some other variables too which are not visible in Infoset Query, these include - custom "Z..." variables & BC variables, with SAP exit and with User entry, etc)
    Could anyone suggest how to access this same variable for query on infoset as in ODS query?
    I tried having an new Infoset with just the ODS 0FIAR_O03, but here again these variables are missing for this characterstic (and possibly other variables for other characterstic), while if I try to build the query on the above ODS directly I get the variables!
    Version: We are on BW 3.5
    Thanks,
    Melwyn Joseph
    Message was edited by: Melwyn Joseph
    Message was edited by: Melwyn Joseph

    Hi,
    I'd put this query in SDN quite some time back..but didn't get any response then.
    As Raymond said above, that is what I'd done in my case. The original variables are SAP exit (u can view their code in the standard SAP FM's). Here the code refers to other variables/objects with their specific tech names (or something similar..don't remember it now). In infoset, as we dont get the original tech. names of the objects in the query ...these SAP exit codes will not work for these variables.
    The solution is to create your own custom variables & populate it in Customer Exit. U can get the logic from the SAP exit code...its not that difficult to understand.
    cheers,
    -Me

  • Infoset Query is not available for generic Extractor

    Hi,
    I've created an infoset in SAP ECC with sq02. Then I've created an Infoset Query on top of this Infoset, because I wanted to exclude records with specific values. Now I want to use this Infoset Query (with the filter restrictions) in my generic DataSource. I can only chosse the Infoset, but not the InfoSet Query. Normally I use the filter in the InfoPackage, but neither IP nor DTP can exclude values with a pattern (f.e. exclude all record that contains a $ symbol in the string)
    Any suggestions?
    Thanks and regards,
    Sebastian

    I agree with Jen, that BW side routines would work just fine.
    If it is extractor performance you are worried about and that is why you want to build the $ exclusion in the select, then I would suggest just creating an extractor from scratch using a custom written function module.  It's actually very strait forward and provides many advantages over table/view/InfoSet based generic extractors.
    I am not a fan of using InfoSets for generic extractors.. but you can create InfoSets based on a data read program in which case you code all the selects and whatnot.  But if you go that far with the InfoSet, why not just write the FM...
    Thanks

  • Interactive report using Infoset quiereis with SQ01,SQ02,SQ03.

    Hi,
             I have to create a report by using the infoset query with SQ01,SQ02 and  SQ03 Tcodes. But problem my requerment is that I have to create one interactive report with these quereis.
    Can any body tell me how to create this interactive report using infoset quereis OR are there any standard quereis which are having interactive nature.
    Pleas send me the solution and thanks in advance.
    regards,
    J.

    Yes, but I am not able to figure exactly how to implement it? I mean I can do this same code in SE38 where I know names of the internal tables. But when in SQ02 we can't modify/read system tables (I found name of the system tables using report generated by SQ01). So how you will access them, then how you will reflect our changes in output ALV grid?
    Example:
    Data:
    Rate Cat.      Installation     Date
    71     60000984     20/10/2009
    71     60000984     20/12/2009
    71     60001101     10/09/2009
    78     60000310     10/09/2009
    78     60000315     10/09/2009
    83     60000297     10/09/2009
    so in this case I want output:
    Rate Cat.      Installation     Date
    71     60000984     20/12/2009
    71     60001101     10/09/2009
    78     60000310     10/09/2009
    78     60000315     10/09/2009
    83     60000297     10/09/2009
    You will see 71     60000984     20/10/2009 is not the latest one, therefore I don't want that row. I can do the ABAP logic for this, but exactly what and how to implement in SQ02?

  • Selecting table fields in InfoSet query manually?

    Hi Experts,
    I have created an infoset query with two table. At the end selected field group as 'Key fields only'.
    Can you please tell me how to manually select the fields from both tables so that I can build an InfoSet with the selected fields?
    Thank you for you help!
    Lakshmi

    hi,
    For manullay selecting the fields, Just drag and drop fields from respective tables ( left sub tree) to their
    respective field groups( Right sub tree ) in a infoset.
    If you wish to create your own field group, just delete the sytem created field group and then recreate it by giving suitable name and then again drag & drop fields from table to  your field groups.

  • Selecting table fileds in InfoSet query?

    Hi Experts,
    I have created an infoset query with two table. At the end selected field group as 'Key fields only'.
    Can you please tell me how to manually select the fields from both tables so that I can build an InfoSet with the selected fields?
    Thank you for you help!
    Lakshmi

    hi,
    For manullay selecting the fields, Just drag and drop fields from respective tables ( left sub tree) to their
    respective field groups( Right sub tree ) in a infoset.
    If you wish to create your own field group, just delete the sytem created field group and then recreate it by giving suitable name and then again drag & drop fields from table to  your field groups.

  • Sapquery , adhoc query and Infoset query

    any body having any material for ADHOC QUERY , SAP QUERY and Infoset query with detail explanation and steps for creation.
    plz forward it to me??????????

    hi,
       sap query r used to design reports to see the data according to our selections in this daa is fetched from diff tables its  much easier to desing reports using this
                 infoset query is somthign used with BI ints used to read data form PSA some temp storage loc
               if i am wrong someone correct me
    reward if useful
    ravi

  • Infoset Query Authorization

    Hi guys,
    I've created some infoset queries, and assigned those queries to specific user group. My purpose is to let only specific user group (e.g. Accounts User Group, to access only relevant queries)
    But later I found out, those users can actually switch to another group (at SQ01 -> Other User Group), and access those queries that they shouldnt be accessing.
    May I know if there's any way to prohibit this switch of group? Or is there any authorization that can be set?
    All ideas are appreciated. Thanks ^^

    Hi TY Ng,
    By including the InfoSet query in a role, you ensure that the InfoSet query is started with an InfoSet (and a query), and can therefore be easily used for appropriate reporting within the role.
    The basis for this is the assignment of user groups to roles, the option of calling the InfoSet query from different roles, and, in doing so, noting the specified context for this role.
    You assign user groups and InfoSets with transaction SQ10. You can also create and manage menu entries for the InfoSet query with this transaction.
    In order to include the InfoSet query in a role, you have to assign user groups first to the role and subsequently to one or more InfoSets.
    Check
    Please check administrator authorization for the SAP Query (authorization object S_Query, field ACTVT, value 23).
    Check whether the correct work area is set before you reassign user groups. If you call the role administration by using transaction SQ02 (see above), the work area set in transaction SQ02 is transferred.
    Hope you get some help
    Atul

  • Problem with custom code in infoset query

    Hi,
    I have created a infoset. In the infoset i added a few additional fields and wrote code in the field code for those fields. I saved and generated the infoset. But in the output of the query, i am getting blank values for those additional fields. When i checked the generated program (SE38), the code is not present in the program.
    If anyone has encountered a similar problem and resolved it, please let me know where i am going wrong.
    Thanks.

    Hello,
    After adding the code for additional fields in Infoset, please syntax check and then activate the Infoset. Then the program will be regenerated with your custom code.
    Thanks,
    Venu

Maybe you are looking for

  • I don't update anymore; what's my prognosis?

    I've decided to ignore all updates from now on. I'm on iOS 5, Snow Leopard, Airport Extreme with 2 Express routers (one 'n' and one 'g' for music). I'm off of MobileMe (except for email), and have decided to forego iCloud. I've learned from experienc

  • Ageing report in Disco

    Hi I am new to Oracle etc. I am trying to do an ageing report in oracle. To show how many days a job has been sitting on a status for grouped by days. So accrross the top I will have the groupings 1 day, 2 days, 3-7 days, 8-14 days, 15-21days, 22 - 2

  • Activated Acrobat 10 Pro requires re-activation

    I purchased CS5 about two months ago. After installing CS5 successfully, when I tried to install Acrobat 10 Pro, the installation won't accept the serial #. By the way, the PC had Acrobat 6 Pro on it which I uninstalled before installing CS5. Acrobat

  • "BPE_ADAPTER" SYSTEM_FAILURE_INTERNAL

    Hi Experts, I saw the previous blogs on the "BPE_ADAPTER">SYSTEM_FAILURE_INTERNAL failures but i didn't get the solution. My Scenario is SOAP to RFC to FILE with Asyn/Sync Bridge using BPM(Aync Receive, Sync Send,Send ), while I am testing messages a

  • What amplifier would work best for Airport Express?

    I have built in a ceiling speakers in all my rooms and all the rooms have their own apple macmini or laptop All wiring of the speakers come to a central media room, and in this, I want to place 8 airport express to allow each room to be able to play