Use data in structure in SAP Query

I am creating a SAP query using a logical database but will like to include data from a Structure can anyone help me.

Do not worry about this topic, I have obtained the result by myself, it can be done with global variables. The error was in the initialization of some of the variables involved.
Thank you any way and forgive me for the disturbance.
Sinceresly,
Miguel.

Similar Messages

  • Using several global structures in one query?

    Hello Together,
    I want to use several global structures in a query and group them for instance in the rows. I have tried it out, and it does not seem to be possible.
    Any ideas- can I overgo this problem somehow?
    Thanks,
    Elisabeth

    Hi Elisabeth,
    This should help:
    http://help.sap.com/saphelp_nw04/helpdata/en/f1/0a5632e09411d2acb90000e829fbfe/content.htm

  • BRAIN416 InfoObject 1KYFNM is used in both structures of the query

    Hi Expert,
    I have some problem with MDXTEST on BW 3.5 which i select multiprovider to generate MDX Staement but it goes to ABAP Debugger "CX_RSR_PROG_ERROR" and message BRAIN 416 information said "InfoObject 1KYFNM is used in both structures of the query".
    Anyone please explain me what should i do????
    Thank you for your help
    =SJ=

    Dear RajNi,
      In This Multiprovider A, i use only 1 infoset which only 1 ODS B.
      I'm so confuse because i create new ODS like ODS B and do step like Multiprovider A.
    Please help me if you have ever seen like that.
    Many thanks
    =SJ=

  • InfoObject 1KYFNM is used in both structures of the query

    I am getting the error message - "InfoObject 1KYFNM is used in both structures of the query", while executing the query. Can you please help me remove this error and proceed with the query execution?
    Thanks and Regards,
    Sachin Kalani.

    Hi Sachin,
    As the error suggested, make sure that u have used that KF only once in ur Query definition.
    Regards,
    Rajkandula

  • Need to include Structures in SAP Query

    Hi,
    I need to extract data of material master from a 3.1 System, where there is a Structure which contains my required information.
    How can i include the fields of the Strucutre into my query?
    thanks,
    Chintan

    Hi,
    As Christopher mentioned, structures do not contain saved information. You must read the tables for getting the information.
    I assume that you´re working with SAP Query (SQ00). If this is so, you need to create or modify an InfoSet (Environment --> Infosets), where you´re gonna declare the necessary table or view.
    When that part is done, go back to your query and assign the infoset, so that you can use the fields that you need.

  • Is it possible to use aggregation function in SQ Sap query?

    I need to create a sap query like using SELECT MAX(begda) statement.
    Please teach me how...
    Thank u in advance..

    Hi Ella,
    You can very well use the aggregate functions in sql which is usually a performance tuning technique.
    A calculation that is made on several records or cells of data. SUM, AVG, MAX, MIN and COUNT are examples of aggregate functions that are used in spreadsheets and database programs.
    SELECT ( ( ] ...
    MAX: returns the maximum value of the column
    MIN: returns the minimum value of the column
    AVG: returns the average value of the column
    SUM: returns the sum value of the column
    COUNT: counts values or lines as follows:
    · COUNT( DISTINCT ) returns the number of different values in the column.
    · COUNT( * ) returns the total number of lines in the selection.
    Ex:    DATA: fldate LIKE sbook-fldate,
          count  TYPE i,
          avg    TYPE p DECIMALS 2,
          max    TYPE p DECIMALS 2.
    SELECT fldate COUNT( * ) AVG( luggweight ) MAX( luggweight )
           FROM sbook
           INTO (fldate, count, avg, max)
           WHERE carrid = 'LH' AND
                 connid = '0400'
           GROUP BY fldate.
      WRITE: / fldate, count, avg, max.
    ENDSELECT.
    For further info:
    http://help.sap.com/saphelp_nw04/helpdata/EN/fc/eb3990358411d1829f0000e829fbfe/content.htm
    http://help.sap.com/abapdocu/en/ABAPSELECT_AGGREGATE.htm
    Thanks and Regards
    Srikant.P
    Edited by: SRIKANTH P on May 27, 2009 9:41 AM

  • Netweaver 04s - Use of two structures in the query craeted dump

    I have used two structures in a query, The same query works fine in current BW 3.5 system but in BI 7.O sandbox (copy of prod), it dumps out.
    When I check the query, it does give these message (same as in PROD, where it runs without a problem).
    - Different hierarchies are used for characteristic Cons Group
    - Number variable ZFV_HTES cannot be replaced.
    - Fiscal year variant is to be specified for key figure Cumulative (YTD) Value in Group Currency

    Hi Rakesh.
    Did you get a satisfactory outcome to this problem? Does the current patch of Netweaver 04S cover it?
    Would appreciate your reply, please.
    Patrick

  • Not able to use date with time in sql query

    Hi,
    select a.contract_number,b.start_date,b.end_date,b.price_negotiated,b.attribute_category,b.attribute1,a.sts_code,a.contract_number_modifier,b.cle_id,b.creation_date
    from OKC_K_HEADERS_ALL_B a,OKC_K_LINES_B b
    where a.id = b.dnz_chr_id
    and b.cle_id is not null
    and a.contract_number_modifier is not null
    and a.sts_code in ('ACTIVE','SIGNED','60 DAY HOLD','HOLD')
    and b.creation_date between to_date('21-10-2013 9:19:48','DD-MM-YYYY HH24:MI:SS')  and  sysdate;
    If I execute this query in toad it is giving me proper results.This query populates the results between the two date with time.
    But I am facing issue when I am using this query in the procedure. The procedure is as below.
    If I use the same query in the procedure I am getting wrong output.
    CREATE OR REPLACE procedure xx_prog_upd_annualized_amt(errbuf out varchar2, retcode out varchar2)
    as
    cursor c1 (l_date in varchar2)is
    select a.contract_number,b.start_date,b.end_date,b.price_negotiated,b.attribute_category,b.attribute1,a.sts_code,a.contract_number_modifier,b.cle_id
    from OKC_K_HEADERS_ALL_B a,OKC_K_LINES_B b
    where a.id = b.dnz_chr_id
    and b.cle_id is not null
    and a.contract_number_modifier is not null
    and a.sts_code in ('ACTIVE','SIGNED','60 DAY HOLD','HOLD')
    and b.creation_date between  to_date(l_date,'DD-MM-YYYY HH24:MI:SS')  and  sysdate;
    v_date varchar2(100);
    v_total_days number;
    v_annualized_amount number;
    begin
    begin
    select max(fcr.actual_start_date) into v_date
    from fnd_concurrent_programs_vl fcp
    ,fnd_concurrent_requests fcr
    where fcp.concurrent_program_id = fcr.concurrent_program_id
    and fcp.user_concurrent_program_name like 'Renewed Annualized Amount Updation';
    exception
    when others then
    fnd_file.put_line(fnd_file.log,'Invalid date');
    end;
    fnd_file.put_line(fnd_file.output,v_date);
    fnd_file.put_line(fnd_file.output,sysdate);
    fnd_file.put_line(fnd_file.output,'***************Start of Program***************');
    fnd_file.put_line(fnd_file.output,'***************Hi***************');
    For i in c1(v_date) loop
    SELECT
             1
           + 30 * TRUNC (MONTHS_BETWEEN ( TO_DATE (i.end_date, 'DD-MON-YYYY'),  TO_DATE (i.start_date, 'DD-MON-YYYY')))
           + LEAST (EXTRACT (DAY FROM TO_DATE (i.end_date, 'DD-MON-YYYY')), 30)
           - LEAST (EXTRACT (DAY FROM TO_DATE (i.start_date, 'DD-MON-YYYY')), 30)
           + CASE
                WHEN EXTRACT (DAY FROM TO_DATE (i.end_date, 'DD-MON-YYYY')) < EXTRACT (DAY FROM TO_DATE (i.start_date, 'DD-MON-YYYY')) THEN 30
                ELSE 0
             END
              daysbetween into v_total_days
      FROM dual;
      fnd_file.put_line(fnd_file.output,i.contract_number);
      fnd_file.put_line(fnd_file.output,v_total_days);
      If v_total_days < 360 then
      v_annualized_amount := (360*i.price_negotiated)/v_total_days;
      update OKC_K_LINES_B
      set attribute_category = 'Annualized Amount',attribute1 = v_annualized_amount
      where cle_id = i.cle_id;
       fnd_file.put_line(fnd_file.output,v_annualized_amount);
        fnd_file.put_line(fnd_file.output,i.cle_id);
        elsif v_total_days >= 360 then
      update OKC_K_LINES_B
      set attribute_category = 'Annualized Amount',attribute1 = i.price_negotiated
      where cle_id = i.cle_id;
      end if;
    end loop;
    commit;
    fnd_file.put_line(fnd_file.output,'***************End of Program***************');
    null;
    end;

    SureshM wrote:
    Hi Purvesh,
    Apologize for not giving the sufficient information.
    max(fcr.actual_start_date) = here I am getting date with time (for eg :9/4/2012 6:47:49 PM)
    Datatype for this column is date.
    This actual start date I am storing in varchar2 variable and then converting this value to date with time.
    My requirement is to pick the rows between the two timestamps which I am unable to do in the procedure.
    Regards
    Suresh
    YOu are losing the Time information while fetching the data into a VARCHAR2 variable. change the datatype of v_date to DATE and get rid of the TO_DATE logic in cursor and simply use v_date variable.
    Message was edited by: PurveshK misread.

  • Getting Error in Infoview while using Date Range Filter in SAP BW Universe

    Hi,
    I have created a date range Filter in My Universe
    <FILTER KEY= "@Select(Debit Memo Date\L01 Debit Memo Date)">
    <CONDITION OPERATORCONDITION= "Between">    
    <CONSTANT CAPTION= "[ZFDAY_MTH].[LEVEL01]"/>
    <CONSTANT CAPTION= "[ZCBDATE].[LEVEL01]"/> </CONDITION></FILTER>
    It was Parsed "OK" without any errors.
    When I used this filter in my report it does not return any records, while there are some records which I had verified earlier. When I include the two fields "[ZFDAY_MTH].[LEVEL01] and "[ZCBDATE].[LEVEL01] in My Report with the filter I am getting the following error -
    A database error occured. The database error text is: A pointer intended for use is NULL. pConstantOperand is NULL in SAPSQLExpressionEvaluator::getOperandsFromCondition, exception raised at line 125 of file source/sofasqlexpressionevaluatorbase.cpp. (WIS 10901)
    If I remove the filter and run the report , it gives me the expected results.
    Please help me if anyone has faced this issue earlier.
    Thanks ,
    Pankaj Goswami

    Hi,
    How about using this code.
    I have not tested but I think if we follow this syntax pattern, it might work
    <FILTER KEY="[Debit Memo Date\L01 Debit Memo Date].[LEVEL01].[TECH_NAME]"><CONDITION OPERATORCONDITION="Between"><CONSTANT TECH_NAME="@select(ZFDAY_MTH.LEVEL01','D',,mono,free)"/><CONSTANT TECH_NAME="@select(ZCBDATE.LEVEL01','D',,mono,free)"/></CONDITION></FILTER>
    Regards,

  • Could anyone provide the complete manual of SAP Query Creation

    Hi,
    Now I am learning to create SAP Query.
    I viewed many questions and answers about SAP Query.
    Some mentioned this,and some did that...
    Could anyone provide a complete manual of SAP Query Creation for developers.
    I can create SAP Queries step by step with it.

    http://help.sap.com/saphelp_46c/helpdata/en/35/26b413afab52b9e10000009b38f974/content.htm
    http://www.thespot4sap.com/Articles/SAP_ABAP_Queries_Introduction.asp
    Step-by-step guide for creating ABAP query
    http://www.sappoint.com/abap/ab4query.pdf
    ABAP query is mostly used by functional consultants.
    SAP Query
    Purpose
    The SAP Query application is used to create lists not already contained in the SAP standard system. It has been designed for users with little or no knowledge of the SAP programming language ABAP. SAP Query offers users a broad range of ways to define reporting programs and create different types of reports such as basic lists, statistics, and ranked lists.
    Features
    SAP Query's range of functions corresponds to the classical reporting functions available in the system. Requirements in this area such as list, statistic, or ranked list creation can be met using queries.
    All the data required by users for their lists can be selected from any SAP table created by the customer.
    To define a report, you first have to enter individual texts, such as titles, and select the fields and options which determine the report layout. Then you can edit list display in WYSIWYG mode whenever you want using drag and drop and the other toolbox functions available.
    ABAP Query, as far as I Believe, is the use of select statements in the ABAP Programming. This needs a knowledge of Open SQL commands like Select,UPdtae, Modify etc. This has to be done only by someone who has a little bit of ABAP experience.
    To sum up, SAP queries are readymade programs given by SAP, which the user can use making slight modification like the slection texts, the tables from which the data is to be retrieved and the format in which the data is to be displayed.ABAP queries become imperative when there is no such SAP query existing and also when there is a lot of customizing involved to use a SAP Query directly
    use either SQ02 ans SQ01
    or SQVI tr code
    for more information please go thru this url:
    http://www.thespot4sap.com/Articles/SAP_ABAP_Queries_Create_The_Query.asp
    http://goldenink.com/abap/sap_query.html
    Please check this PDF document (starting page 352) perhaps it will help u.
    http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCSRVQUE/BCSRVQUE.pdf
    check the below link will be helpful for u
    Tutorial on SQVI
    once you create query system generates a report starting with AQZZ/SAPQUERY/ABAGENCY2======= assing this report to tr code for the same
    useful
    http://www.erpgenie.com/abap/code/abap47.htm
    regards,
    Prabhu
    reward if it is helpful

  • SAP Query restriction by Company

    Dear SAP Experts,
    I would like to ask an opinion of how to create a general solution for creating SAP queries regarding this requirement:
    1) Create a query via SAP Query (transaction SQ01)
    2) Use a pre-created infoset (VBRK-VBRP header-detail connection)
    3) Restrict users to see only the data (e.g invoices) where he is allowed to see (based on VBRK-VKORG)
    A question would be, how could I assign a SAP ECC user to a certain Sales Organization/Company so that you can have some sort of a master data of which company he belongs to for reporting/query purposes (in the end, which invoices he is allowed see)?
    Is there a customizable way of linking a user to sales organization/s so that in the end I can use this filter in the SAP Query? Also, is there a way that this is generally done so that for all other queries which require Sales Organization/Company filtering (e.g. VBAK, other Finance reports), this is done "on the fly"/customized?
    Your inputs are appreciated, thanks in advance.

    Hai
    If u r Experience Candidate for 2+ years .Company will  Sponcer the Certification wilth low Cost
    Around Rs 35000.(INR).
    https://websmp204.sap-ag.de/~sapidp/011000358700003517532005E
    http://www.sap.com/services/education/certification/global-certification-policy.epx
    http://www.sapcertification.info/viewpage.php?page_id=40
    http://sapcertification.info/news.php
    Assign Points if it is Useful
    Thank u
    Naveen

  • Hi sap query doubt

    where shud we add two additional fields in SAP query ? actually i am not able to locate the query but i have the program whch is generated along it . so in whch section of the query i shud write the logic to get two additional fields ?

    Hi,
    Already there are some Infosets (tables) defined in that query.
    Go to that infosets and add extra fields which are there in those tables
    or add extra infoset(table) and link it to the existing table with the key, then add that table field.
    No need to write the code.
    Only thing is to select that field on to the Selection screen or on to the output is required.
    See the help:
    http://help.sap.com/saphelp_46c/helpdata/en/35/26b413afab52b9e10000009b38f974/content.htm
    http://www.thespot4sap.com/Articles/SAP_ABAP_Queries_Introduction.asp
    Step-by-step guide for creating ABAP query
    http://www.sappoint.com/abap/ab4query.pdf
    ABAP query is mostly used by functional consultants.
    SAP Query
    Purpose
    The SAP Query application is used to create lists not already contained in the SAP standard system. It has been designed for users with little or no knowledge of the SAP programming language ABAP. SAP Query offers users a broad range of ways to define reporting programs and create different types of reports such as basic lists, statistics, and ranked lists.
    Features
    SAP Query's range of functions corresponds to the classical reporting functions available in the system. Requirements in this area such as list, statistic, or ranked list creation can be met using queries.
    All the data required by users for their lists can be selected from any SAP table created by the customer.
    To define a report, you first have to enter individual texts, such as titles, and select the fields and options which determine the report layout. Then you can edit list display in WYSIWYG mode whenever you want using drag and drop and the other toolbox functions available.
    ABAP Query, as far as I Believe, is the use of select statements in the ABAP Programming. This needs a knowledge of Open SQL commands like Select,UPdtae, Modify etc. This has to be done only by someone who has a little bit of ABAP experience.
    To sum up, SAP queries are readymade programs given by SAP, which the user can use making slight modification like the slection texts, the tables from which the data is to be retrieved and the format in which the data is to be displayed.ABAP queries become imperative when there is no such SAP query existing and also when there is a lot of customizing involved to use a SAP Query directly
    use either SQ02 ans SQ01
    or SQVI tr code
    for more information please go thru this url:
    http://www.thespot4sap.com/Articles/SAP_ABAP_Queries_Create_The_Query.asp
    http://goldenink.com/abap/sap_query.html
    Please check this PDF document (starting page 352) perhaps it will help u.
    http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCSRVQUE/BCSRVQUE.pdf
    check the below link will be helpful for u
    Tutorial on SQVI
    once you create query system generates a report starting with AQZZ/SAPQUERY/ABAGENCY2======= assing this report to tr code for the same
    reward if useful
    regards,
    Anji

  • Diff between sap query and abap query

    diff between sap query and abap query

    Hi,
    ABAP query is mostly used by functional consultants.
    SAP Query :
    Purpose
    The SAP Query application is used to create lists not already contained in the SAP standard system. It has been designed for users with little or no knowledge of the SAP programming language ABAP. SAP Query offers users a broad range of ways to define reporting programs and create different types of reports such as basic lists, statistics, and ranked lists.
    Features
    SAP Query's range of functions corresponds to the classical reporting functions available in the system. Requirements in this area such as list, statistic, or ranked list creation can be met using queries.
    All the data required by users for their lists can be selected from any SAP table created by the customer.
    To define a report, you first have to enter individual texts, such as titles, and select the fields and options which determine the report layout. Then you can edit list display in WYSIWYG mode whenever you want using drag and drop and the other toolbox functions available.
    ABAP Query,:
    As far as I Believe, is the use of select statements in the ABAP Programming. This needs a knowledge of Open SQL commands like Select,UPdtae, Modify etc. This has to be done only by someone who has a little bit of ABAP experience.
    To sum up, SAP queries are readymade programs given by SAP, which the user can use making slight modification like the slection texts, the tables from which the data is to be retrieved and the format in which the data is to be displayed.ABAP queries become imperative when there is no such SAP query existing and also when there is a lot of customizing involved to use a SAP Query directly
    use either SQ02 ans SQ01
    or SQVI tr code
    for more information please go thru this url:
    http://www.thespot4sap.com/Articles/SAP_ABAP_Queries_Create_The_Query.asp
    http://goldenink.com/abap/sap_query.html
    Please check this PDF document (starting page 352) perhaps it will help u.
    http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCSRVQUE/BCSRVQUE.pdf
    check the below link will be helpful for u
    Tutorial on SQVI
    once you create query system generates a report starting with AQZZ/SAPQUERY/ABAGENCY2======= assing this report to tr code for the same
    regards,
    vasavi.
    reward if it is helpful.

  • SAP Query selection screen issues after ECC upgrade

    Hi all
    We have a custom query created and assigned to a custom transaction code, which after upgrade to ECC 6.0 we find that the selection screen layout is different from what was available in 4.6C system.
    All the fields required are available.
    However, the sequence of the fields on the screen is different from the 4.6C after the upgrade.
    Can anyone help identify the issue so that the issue can be resolved?
    Thanks
    Vinodh S

    Hi N_niki
    There is no resolution as such.
    We had raised a Customer message with SAP and were informed that this was expected as the procedure to execute the reports was changed in ECC when compared to 4.6 (technical changes) and hence this issue shall remain for some queries wherein the old changes need to be brought back using an option in the SAP Query.
    Please refer to SAP Note # 723577 which could provide a better explanation for the issue.
    Hope this helps.
    Thanks
    Vinodh Sudhakaran

  • The "Use Selection of Structure Elements" Option in RSRT Query Properties

    Hi, does anyone know the side effect of enabling this option for all BEx Queries? The help states the following: "The Use Selection of Structure Elements option can be selected for any query; however, it is only useful in some cases. In queries, selections are frequently based on one or more characteristics in the columns, or more precisely, in the structure elements. One or more of these structure elements are often filtered in the BEx Analyzer or in BEx Web applications. If you do not select the Use Selection of Structure Elements option, these dynamic (structure element) selections are not transferred to the database. Normally, the data for the entire structure or for both structures is then read from the database." It sounds to me that there is no harm in checking this flag all the time, but what is confusing is the default state of this option; i.e. unchecked.
    I would appreciate if someone can clarify the downside of checking this flag.
    Thanks,
    Mohamed Judi

    Hello Michael,
    Checking this simple property helps improve performance in situations where there are many Restricted Key Figures and other calculations in the Query Definition
    If analysis of the query performance indicates very high EVENTID 3200 times, and/or the FEMS number is very high try enabling this property and check performance.
    Checking this ensures the structure elements are sent to the database for processing.
    Check the below link: Page 14
    http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/006b1374-8f91-2d10-fe9c-f9fa12e2f595?QuickLink=index&overridelayout=true&48747879633011
    Thanks,
    Vinay

Maybe you are looking for

  • "Access denied because you do not have sufficient access privileges."

    That's the error message I get after I try to access my working files, even though I am logged in as administrator. This has just started since I restored my files with Time Machine. Help!

  • How to start and stop server?

    This is a design issue that may not belong in this forum, but bear with me, please. I have a stand-alone RMI server that I start thusly: public class StartServer {     public static void main( String[] args )         AppContext context = Server.getCo

  • "ORA-28267 Invalid NameSpace" with APEX 4.0.1 and WebLogic server

    Hi all, I have a page that has a simple query as Region Source. It all worked fine on Apex 3.2 with the iAS mod pl/sql gateway. Query goes like this: select servername, a.capture_name, a.status, a.source_database, a.captured_scn, a.applied_scn, b.sta

  • Getting rid of single letters in index

    Hello! Creating and index with framemaker I would like to get rid of the letters at the beginning (in red), e.g.: A Action Apple Artist B Bakery Beachball Bubble Where exactly on reference page is that coded?

  • Mountain lion disc 10.8.4

    how do i buy a apple mountain lion disc without having a mac to upgrade