SAP Query for the report

Hi,
Can you all help me?
Is there any area or a table or query in SAP, which can create a list with the purchase order number (Field name EBELN),supplier(Field name SUPERFIELD) and header text(Field name EDITOR).
Please tell the table name that fetches all values from the same table.
Regards,
Smitha

Hi,
Try to Combine EKKO, EKPO & T166P tables and take common fields like:
EKKO:
EKKO-BSTYP
EKKO-BSART
EKKO-EBELN
EKKO-LIFNR
EKPO:
EKPO-EBELN
T166K
BSTYP
ESART
TDID = F01
You can use this for your customization.
regards,
Maia
Edited by: Maia on Jul 23, 2008 5:22 PM

Similar Messages

  • SAP Query for Appriasal Report

    Hello Experts,
    Can we use SAP Query (SQ03, SQ02, SQ01) based on Appriasal tables ( HRHAP*) to fetch records similar to tcode phap_search_pa?
    I tried building an infoset making a direct read of table HRHAP and then joining tables like - HRHAP_T, HRHAP_APPEE, HRHAP_APPER, HRHAP_OTHERS and HRHAP_ACT_LOG.
    Finally, created a query based on this infoset, however, it does not retreive any results. Seems, it requires more details as app templates...
    Can anyone give inputs on this?
    Regards,
    Sarvesh Hasija

    Hi Sarvesh
    SAP Query may not work here. Because more than often, the data available in PHAP tables need to be first brought into temporary tables using a match condition and then shown on screen. There are a lot of sub queries required between PHAP and HRPnnnn tables to see some meaningful results. Imagine how many Table joins the End User needs to do.
    SAP Query are ideal if we are pooling data from one or two tables using a match condition. I am not dening that InfoSet is not possible. Getting desired output from such InfoSet will be challenging.
    You mentioned you supplied Doc ID/Number to PHAP_Search_PA, which is incorrect. It is a report which works on Template not Document. I hope you know the difference between Template and Document in PMS/OSA. I cannot stress enough on how much important is PHAP_Search_PA. What this standard report can do, custom designed report will take huge time to get close to it.
    I am sorry, I am also going to recommend Z Reports in case desired output is not possible in PHAP_Search_PA. In one of my recent assignments we had "Trainer's Feedback Report for any training programme/programmes between any two dates" requirement, and we opted for a Z Report.
    Regards
    Yash

  • Need to execute Dynamic query for the report

    I was wondering if we can have the option of choosing at runtime from the report builder parameter so that if the end-user selects 'Yes' then the report will run one specific query and if he chooses 'No' then another particular query is invoked. What I mean to say that by choosing between Yes and No at runtime one should have the option of returning query results based on the same table but having different columns selected via the SELECT statement
    means we have two querires on our report & upon the chosen parameter we should execute only one of them ... wht should i do to apply tht ???

    As the previous post noted lexicals are a terrific way to accomplish dynamic queries in Oracle reports.
    Another way you could accomplish this would be to use a UNION, whereas the first select in the UNION represents one user option, then second query represents the second option.
    For example:
    SELECT customer_name name, customer_address address
    FROM customer_table
    WHERE :p_choice = 'Customer Info'
    UNION
    SELECT employee_name name, employee_address address
    FROM employee_table
    WHERE :p_choice = 'Employee Info'If when running the report, the user chooses 'Customer Info' the first query would return results, if the user chose 'Employee Info' then just information from the second query would return information.
    So there are different ways to accomplish what you are looking for, you just need to find which is going to work best for you.
    Hope this helps!

  • Urgent ; SAP Query for generating report  from BLNR ,DOCNR and oth in NEWGL

    We are posting document to 5 ledgers.There is a leading ledger and 4 non leadING ledgers. One Ledger contains the detailed information , and I need to add all the fields information when I create that report.
    We want BLNR field to be the reference for creating report.
    we have to create a report clubbing BLNR field from BKPF  , and DOCNR from FLEXA Table.
    Thanks,
    YGB

    Sorry it is BELNR not BLNR

  • SAP query for asset report with retirement and depreciation retirement

    Hi Expert,
    Can anyone tell me in table ADA which filed is holding the figure of retirement and retirement depreciation?
    Thank oyu

    Hi,
    Max.
    For your question you can check the tables ANEP for asset transactions line items and for asset value fields you can check out ANLC.
    I hope this may help you.
    If you have any doubts feel free to ask.
    Regards,
    Pankaj A Bhalerao.

  • Need to find SAP query for corresponding ABAP program.

    Hello SAP Experts,
    I have an ABAP program "AQDESYSTQV000001ORDERDETAILS==" in ECC 4.7. We had a client copy recently from ECC 4.7 to ECC 6.0. Now in ECC 6.0 I am unable to find this program in SE38.
    Can you please tell me how to create this program in ECC 6.0 ? Also, by the name of this program it is clearly seen that this program is automatically created by using SAP query.
    I tried to generate the program using SQ01, but system asks me for the SAP query.
    Can you please tell me how to find the SAP Query for the corresponding abap program ? Also, the steps as in how to generate the program in ECC 6.0.
    Thanks.

    Hi Danish,
    In the program name, the query name is always attached.
    For example : The program name is , AQ10SD==========Z10SD_INVPRODL=
                           Here the query name is Z10SD_INVPRODL and if you go to transaction SQ01 and enter the query name
    then you can find the infoset.
    And also you can gernate the program with the help of query name.
    Please try the same and let me know if any details are required.
    Regards,
    Darshana

  • SAP Query for AR Aging Report

    Hello Gurus-
    I am trying to build a query for Aging report, and would like to include something like this:
    Customer-Reference-Payment terms-Due date-Current-31-60days-61-90days-91-120days-over120days-toatal amount.
    I have an infoset which includes BSID, KNA1, KNB1. I have maintained local fields:
    Due Date  =     Baseline date + cash discount days
    Statement Date = My input date.
    Current    = Condition (DUEDTE >= STATDTE - 30) formula (Amount)
    31 - 60 Days = Condition (DUEDTE >= STATDTE - 60 AND DUEDTE < STATDTE - 30) formula (Amount)
    61 - 90 Days = similar to above
    91 - 120 Days = similar to above
    Amount  = - 1 * (If Debit credit indicator = "H" then "Amount in local currency") otherwise "Amt in Loc.Cur"
    Over 120 Days = similar to above
    When I enter a statement date of today it works hunky dory...it all looks good...my current column looks good and do the rest. When i want to run this query as of couple of months ago (if today is 12/19/08 and i wanted to run my aging report for 10/31/08) it should give me aging as of my statement date 10/31/08 but it does not. It calculates the total amount as of today. I know because of local field "Amount" where i gave amount in local currency, but how would I tell that it should pick up amount in local currency till the statement date?
    Any input in this regards is highly helpful.
    Thanks,
    RNarayan

    Hi Ram,
    On your aging report you want to see invoices which are still not paid (or still open) as of a certain date. This date is "key date". You need to define a variable for key date (which is normally system date if you run today) but it could be a past date.
    So key date is let us say Oct 31st (X) and the system date is Dec 19th. When you run the report as of Oct 31st all invoices that are posted prior to Oct 31st (posting date less than X) and are still in BSID will show on your report. There is no issue here.
    Let us say an invoice was created on Oct 25th (Y) and was paid on Nov 15th (Z). The clearing date is Z. That means if you run the aging report today this invoice will not show.
    But you want to run the report on Oct 31st. This means X is greater than Y but is less than Z.
    Clearing date and posting date are part of BSAD. Report run date is the user input and is a variable.
    With the above concept and with the help of an ABAP programmer you should be able to solve the problem.
    Regards
    Sharabh

  • Extracting the Logical sql query for the specified report  in OBIEE 11g

    Hi ,
    I want to extract the logical SQL Query for the Particular report in OBIEE 11.1.1.5.
    Any pointers related to this will be very helpful.
    Thanks,
    Sonali

    for a try please add Logical sql view to ur report it will dispaly the Logical sql for that Report..
    Hope it will helps you.

  • Query for the FULL AND FINAL SETTLEMENT REPORT

    Hi,  any one  has the query for the FULL AND FINAL SETTLEMENT REPORT in oracle hrms??

    Hi,
    I go through that .class file and find that they have used below package in that.
    PAY_IN_TERM_RPRT_GEN_PKG
    Hope this will help you.

  • Display records returned for a query in the Report Region Title

    Hi,
    Is there any variable set that can be referenced to indicate how many records have been returned for a specific query. I have several hide/show regions dealing with various reports, and I would like to add a little info into the region title to display how many records there were returned for the report in this region.
    Thx in Advance,
    cliff

    Hi,
    addendum
    These are simple sql queries BTW. I've seen posts alluding to the SQL%ROWCOUNT when using cursors. Is there any variable we can reference when using a simple sql query?
    thx
    cliff

  • Standard Reports in SAP HR for The Sales Promotion Employees

    Dear All,
    I wanted to check whether we have any standard reports / formats in SAP HR for The Sales Promotion Employees
    (Conditions of Service) Rules, 1976.
    Like Form A, Form B, Form C and Form E
    http://www.google.co.in/url?sa=t&rct=j&q=sales%20promotion%20employees%20act%201976&source=web&cd=2&sqi=2&ved=0CCQQFjAB&url=http%3A%2F%2Flabour.nic.in%2Fact%2Facts%2FTheSalesPromotionEmployees(ConditionsOfService)Rules%2C1976.doc&ei=fwXwTvLXBcrPrQet3_TyDw&usg=AFQjCNEXxqcRUzJ8M4LXxYYzTSm75Cdc_Q&cad=rja
    Pls provide some inputs on this...
    Kind Regards
    Nag

    Hi,
    this link will give you all the list of cubes, datasources, dso etc in payroll.
    http://help.sap.com/saphelp_nw70ehp1/helpdata/en/86/3a1d3c55a0f503e10000000a114084/frameset.htm
    regards,
    ray

  • Problem in Getting Count answer for the report in OBIEE 11g..

    Hi friends,
    I created a report in OBIEE 11g, but i'm not getting the correct answer as i expected...I'm getting answer in presentation services but the answer is wrong..
    I'll explain to you with an example report: Suppose in the report "NATIONALITY COUNT IN DEPARTMENT WISE" manner
    i dragged the Nationality column from per_all_people_f which is dim table and i dragged the column that i applied aggregation rule "count" for the column "nation count" from per_all_assignments_f which is fact table......If i viewed answers means i'm getting correct answer
    (i.e.) nation count per Nationality..........
    NATIONALITY<---------------------->NATION COUNT
    AUSTRALIA 40
    INDIA 20
    AFRICA 10
    USA 5
    The above is the answer I'm getting with out including the department column from hr_all_organization_units...........
    But since according to the report i need count in department wise manner, so for that along with nationality and nation count column i dragged department column from hr_all_organization_units which is dim table and also i hide that column as i dont want to view the department column in answers..........
    If i clicked answers, means then I'm not getting the nation count for the nationality......... I'm getting the answer 0 for each and every nationality, if i included the hided department column
    NATIONALITY<----------------->NATION COUNT
    AFRICA 0
    AUSTRALIA 0
    INDIA 0
    USA 0
    I'm getting answers like the above if i include the department dimension column which is in hided manner.........................
    What is wrong with it........Whether i made any logical mistake for the report.....If so guide me friends..........
    Cheers,
    Harry...........

    Hi,
    you said about writing query in DB.......whether U meant of trying checking the query in toad..or something else..........
    Since im giving only one join from dim to fact in the physical diagram........
    But more than one join exist between those dim and fact, but im giving only one join mainly the primary key column of the dimension table to the fact table....Whether i need to give all the joins that exist(even if it has 2 or 3 joins between those fact and dim) tables....
    If i give count distinct means it is giving count for every nation as 1....like i mentioned below
    NATIONALITY<----------------------------------------------------->NATION COUNT
    INDIA---------------------------------------------------------------------1
    AUS------------------------------------------------------------------------1
    CAN------------------------------------------------------------------------1
    Since you said to check about depts of the particular column....i couldn't able to understand about "depts" that you meant????
    Whether i made any logical mistake...........
    thanks,
    Harry...
    Edited by: HariPrasad on Oct 10, 2010 9:55 PM

  • Parameter REPORT for the Report Web item in the Web template is empty or mi

    Hello,
    I tried to create a Web-Template (WAD). By executing the report, I get the selection screnn, but by confirming the selection I get the following message:
    Web Item Report Error
    Web template error in specifications for the Web item report
    Parameter REPORT for the Report Web item in the Web template is empty or missing
    Use the BEx Web Application Designer to add parameter REPORT to the report Web item in the Web template, and assign a report name to the parameter
    Contact your system administrator. This error was recorded
    What can I do to solve this error?
    Thanks!
    XmchX

    As DP_1 Type Query_view_Data_provider, I have assinged a Query Designer Query wich works fine, if I execute it as QDR.
    The entry Query_view_Data_provider makes sense for me, but what do I need to maintain for the type "Filter"?
    Thanks!
    XmchX

  • Dynamic Query for a report

    Hi,
    I have to generate a report which contains a query with database link. This database link is not hard coded and would be picked up from another report which contans a link to this report. So this database link value for the query could be any. Can anyone guide me hot to write a dynamic select statement so that i could append database link value at run time.
    Thanks
    Salman

    Hi,
    You can not directly use a PL/SQL query to create an Interactive Report - that is not yet available.
    What you could do is create a collection from your query and then use that for the report. Have a look at: [http://download-uk.oracle.com/docs/cd/B32472_01/doc/appdev.300/b32471/advnc.htm#BABGHJFD].
    In there, you will see APEX_COLLECTION.CREATE_COLLECTION_FROM_QUERY - this allows you to create a collection from a string. You could add a PL/SQL process to your page that runs "On Load: Before Header" that actually creates the collection. Something like:
    BEGIN
    IF APEX_COLLECTION.COLLECTION_EXISTS('MYCOLLECTIONNAME') THEN
      APEX_COLLECTION.DELETE_COLLECTION('MYCOLLECTIONNAME');
    END IF;
    APEX_COLLECTION.CREATE_COLLECTION_FROM_QUERY('MYCOLLECTIONNAME','MY SQL QUERY STRING');
    END;Your Interactive Report can then be based on:
    SELECT SEQ_ID, C001, C002, C003, ...
    FROM APEX_COLLECTIONS
    WHERE COLLECTION_NAME = 'MYCOLLECTIONNAME'The tricky part is the headings as these would tend to be the SEQ_ID, C001, C002, C003, etc column names from the collection itself.
    To get around this, make sure that the report's sql statement includes as many Cnnn columns as you will need for the widest of the reports. Before doing anything else, run the report once to make sure that all these columns are included in the output.
    Then, through Shared Components, Application Items, create items that will hold heading names - for example, G_HEADING1, G_HEADING2 etc - one for each possibile column.
    Now, update the process to:
    BEGIN
    IF APEX_COLLECTION.COLLECTION_EXISTS('MYCOLLECTIONNAME') THEN
      APEX_COLLECTION.DELETE_COLLECTION('MYCOLLECTIONNAME');
    END IF;
    IF ..test1.. THEN
      APEX_COLLECTION.CREATE_COLLECTION_FROM_QUERY('MYCOLLECTIONNAME','MY SQL QUERY STRING 1');
      :G_HEADING1 := 'ColumnHeading1Value';
      :G_HEADING2 := 'ColumnHeading2Value';
      :G_HEADING3 := NULL; -- column not used for this query, so set it to null
    ELSIF ..test2 .. THEN
      APEX_COLLECTION.CREATE_COLLECTION_FROM_QUERY('MYCOLLECTIONNAME','MY SQL QUERY STRING 2');
      :G_HEADING1 := 'ColumnHeading1Value';
      :G_HEADING2 := 'ColumnHeading2Value';
      :G_HEADING3 := 'ColumnHeading3Value';
    ELSIF ...etc...
      .. etc ...
    END IF;
    END;Finally, on the report itself, set the column headings to *&G_HEADING1.*, *&G_HEADING2.* etc. Then, on each column, set a Condition of "Value of Item in Expression 1 is NOT NULL" and in Expression 1, enter in the application item for that column - eg, G_HEADING1
    I have done all that here: [http://apex.oracle.com/pls/otn/f?p=16338:5] - select either Departments or Employees from the list and the report will change.
    Andy

  • How to get the spool id or how to create a spool id for the report .

    hi,
    how to get the spool id or how to create a spool id for the report .
    this spool id i have to use it in CONVERT_ABAPSPOOLJOB_2_PDF fm to get the pdf download file.
    my requirement is to download a pdf file from the alv grid list.

    Hi Raghu,
    Execute this program.
    REPORT  ZTEST_3318                              .
    tables: usr01.
    perform send_report_to_spool.
    *&      Form  send_report_to_spool
          text
    form send_report_to_spool.
      data: loc_dest like pri_params-pdest,
            wf_listname type char12,
            wf_listtext like PRI_PARAMS-PRTXT,
            wf_copies type i,
            wf_days type i,
            wf_PARAMS LIKE PRI_PARAMS,     " achieving file PRI_PARAMS.
            wf_valid type c.
      clear : wf_listname , loc_dest , wf_listtext .
      move: 'AP interface' to   wf_listname .
      move: 'AP interface' to   wf_listtext .
    select single spld into usr01-spld from usr01 where bname eq sy-uname .
      if sy-subrc eq 0 .
        move: usr01-spld to loc_dest .
      endif .
      call function 'GET_PRINT_PARAMETERS'
        EXPORTING
          destination    = loc_dest
          copies         = 1
          list_name      = wf_listname
          list_text      = wf_listtext
          immediately    = ' '
          release        = ' '
          new_list_id    = 'X'
          expiration     = 1
          line_size      = 200
          line_count     = 65
          layout         = 'X_65_200'
          sap_cover_page = 'X'
          receiver       = 'SAP*'
          department     = ''
          no_dialog      = 'X'
        IMPORTING
          out_parameters = wf_params
          valid          = wf_valid.
      if wf_valid <> space.
        new-page print on parameters wf_params no dialog.
        perform write_summary .
        new-page print off.
      endif .
    endform.                    "send_report_to_spool
    *&      Form  write_summary
          text
    -->  p1        text
    <--  p2        text
    FORM write_summary .
    data: begin of itab occurs 0,
          matnr type matnr,
          end of itab.
    select matnr
           from mara
           into table itab
           up to 10 rows.
    loop at itab.
    write: / itab-matnr.
    endloop.
    ENDFORM.                    " write_summary
    This will create spool in SP01.What data you want to put in Spool write it in form write_summary.I have done coding for testing purpose
    After that use that spool for your purpose.
    If Useful award point

Maybe you are looking for