SAP query load to Oracle

Hi,
I'm looking for the best way to automate the results of an SAP query (Quickviewer) to Oracle. The query would run nightly. I searched all SND forums but did not find much. I also looked at the SAP application help for Quickviewer.
Regards,
John

David,
Just an FYI the error message that you have found is not connected to your BLS transaction but rather the default IDoc listener trying to connect to something that doesn't exist.  This listener will automatically start each time xMII starts, as a result you can set it up to connect to an RFC destination or delete the default configuration and it will go away. 
Now onto your issue; How many Production Orders are being returned from the BAPI?  How are you loading each of them into Oracle?  How much memory is allocated to ServletExec vs. How much is available on the machine?  By default xMII will limit all SQL/Tag queries to their <b>RowCount</b> with a max at 250k rows but this does not apply to the JCo call.
My suggestion here is to look for the other error message that pertains to your transaction which may reside in the ServletExec logs and not xMII, they can be found on your xMII machine here: http://localhost/servletexec/admin/login.jsp
Hope this helps.
Sam

Similar Messages

  • Loading an Oracle SQL query into an MSSQL table

    I have a select query on an Oracle table. I want to load this data into an MSSQL table.
    Problem is that I cannot create an interim table on the Oracle database (lack of privelages)
    Is there a way to load an Oracle query into the MSSQL table without an interim table?
    Many thanks
    Z

    Yes,
    1) Create an ODI procedure
    2) Create a step inside
    3) at source tab put the oracle query
    4) at target tab put the sql insert code
    Refer to the oracle returned values like "#column_name_from_oracle_query"
    Make sense?
    Cezar Santos
    [www.odiexperts.com]

  • Standard variant of SAP query is loaded automatically

    Hi!
    I have created SAP query and standard variant via SQ01.
    When I run my query (via transaction) values of variant are loaded automatically in a selection screen and in my case I need empty selection screen at the beginning and values should appear in a selection screen only after choosing a variant, but not before this.
    Probably it is something about attributes of variant? Any ideas?
    <b><REMOVED BY MODERATOR></b>
    Mindaugas.
    Message was edited by:
            Alvaro Tejada Galindo

    Hi,
    What type of custom transaction code did you create?
    Was Dialog Transaction or Report Transaction?
    For your purpose, you can create with dialog transaction with specifying program name and screen number. If you want to execute with specific variant then choose report transaction.
    Regards,
    Ferry Lianto

  • SAP SRM Prod with Oracle DB and AIX 5.3 Performance Issue.

    Hi Basis Gurus,
    Today my SAP PRD system all of a sudden was running slow and users had difficulties executing TCodes as it took minutes before the screen appeared.My system is SAP SRM 4.00, Oracle Release 11.2.0.1.0 and AIX 5.3.
    From Basis point of view , we noticed that all the work process were hanged due to RFCs' occupying it.Couldnt investigate further on the system as we needed to restart asap because users needed to log on. A quick check on SICK shows no errors.What we managed to find out is that we needed to check this parameter below and set it accordingly:-
    rdisp/rfc_min_wait_dia_wp:-
    Definition
    Number of work processes kept free for other users.
    Use
    This parameter is used to reserve a number of dialog work processes for dialog mode. It prevents parallel RFCs from occupying all the processes.
    The parameter rdisp/wp_no_dia specifies the absolute number of dialog work processes.                               
    Unit: number of dialog work processes
    Default value: 1
    Example
    If 10 dialog work processes are configured for the instance (rdisp/wp_no_dia = 10) and the parameter rdisp/rfc_min_wait_dia_wp  = 3 is set, parallel RFCs can occupy a maximun of 7 dialog work processes. Three dialog work processes always remain free for dialog mode.
    There are 20 DIA processes in our system, perhaps reserving a minimum of about 5 work processes for DIA users will be useful via the parameter.
    So my first question would be is there any other suggestions besides adjusting the mentioned parameter above in order to ensure that no work processors going into hang state due to RFCs' occupying it as this issue always happens at the end of the month only when there are massive users accessing it.
    When we went for a restart of the system we encountered another issue. Steps to the issue are as below:-
    1) Did a proper shutdown of Oracle and SAP.
    2) When we start using startsap script, it doesn't start DB so we started DB manually but listener was having problem
        so we stopped all.
    3) We also did a cleanipc, it too throws below error:-
    sidadm> cleanipc <systemno> remove
                   exec(): 0509-036 Cannot load program cleanipc because of the following errors:
                   0509-130 Symbol resolution failed for cleanipc because:
                   0509-136   Symbol memmove (number 106) is not exported from
                   dependent module /usr/sap/sid/SYS/exe/run/libsapu16.so.
                   0509-192 Examine .loader section symbols with the
                   'dump -Tv' command.
    4) Also the Listener file has no contents,it's null file.
    5) This is another error :-
        exec(): 0509-036 Cannot load program /oracle/sid/112_64/bin/tnslsnr because of the following errors:
        0509-150   Dependent module /oracle/sid/112_64/lib/libttsh11.so could not be loaded.
        0509-101   The module has too many section headers
        or the file is damaged
    The libttsh11.so file was empty dated 25th timestamp as below in PRD:-
    -rw-rr    1 sid   dba               0 Nov 25 07:12 libttsh11.so
    Further checking has let me to understand this is an Oracle Bug from this link:-
    http://gavinsoorma.com/2009/12/11-1-0-6-clusterware-upgrade-to-11-1-0-7/
    This Oracle bug only happens in an Upgrade time and how could this happen to my Production system during a restart process.
    Also this system was restarted during the last weekend's maintainance window and it came up with no issues.
    6) We copied over the libttsh11.so from our QA environment to PRD and did a Startup:-
    -rwxr-x---    1 sid   dba        65967496 Nov 25 07:40 libttsh11.so (This is the copied over file from QA)
    7) After Startup everything has been in order till now.
    My second question is what went wrong with the libttsh11.so file. How could it be 0 size in PRD when no signs of changes had happen to the PRD system. Is this a proven Oracle Bug or something else since I have never encountered anything like this before. Hope all the Gurus here could shed some light into my 2 questions as I am looking for positive answers.
    Thank you.
    Regards,
    John

    Hi,
    Firstly I would suggest you to upgrade your database from Oracle Release 11.2.0.1.0 to Oracle Release 11.2.0.2 . This is the recommended Oracle 11g database version  for SAP solutions. Many of your problem will get resolved with it.
    Question 1:
    So my first question would be is there any other suggestions besides adjusting the mentioned parameter above in order to ensure that no work processors going into hang state due to RFCs' occupying it as this issue always happens at the end of the month only when there are massive users accessing it.
    For immediate resolution the approach you have followed is correct viz limiting number of dialog processes for RFC. Secondly you need to analyze why RFC processing takes so much time. You need check which programs are getting executed by those RFC.
    Generate EarlyWatch report for more detailed view
    Question 2:
    My second question is what went wrong with the libttsh11.so file. How could it be 0 size in PRD when no signs of changes had happen to the PRD system. Is this a proven Oracle Bug or something else since I have never encountered anything like this before.
    The libttsh11.so library cannot be found in the related directory.
    Cause
    The file system is mounted using CIO option, but per Note 257338.1 Direct I/O (DIO) and Concurrent I/O (CIO) on AIX 5L, an ORACLE_HOME on a filesystem mounted with "cio" option is not supported.
    Such a configuration will cause, installation, relinking and other unexpected problems.
    Solution
    Disable the CIO option on the filesystem.
    References
    NOTE:257338.1 - Direct I/O (DIO) and Concurrent I/O (CIO) on AIX 5L
    Hope this helps.
    Regards,
    Deepak Kori

  • Query based on Oracle and MS Access connections

    I hope this is in the correct spot.
    I am using Oracle SQL Developer to extract data from some Read Only tables in Oracle.
    What I would like to do it have a list of numbers in a MS Access database to select the same number from Oracle tables, then export the data out to Access or Excel. There may be several thousand numbers at a time.
    I asked if they would give me one table with one column in Oracle I could read/write to but the answer was no.
    I have my connection strings working to both the Oracle tables and to the Access database but i can not figure out how to build a query using both tables.
    If I build a query to the Access table can I use that query somehow in the query of the Oracle table?
    Thanks
    Steve

    Not real sure if this is doable or would help, but perhaps you can load the access table into an Oracle Global Temporary Table? See http://www.oracle-base.com/articles/8i/TemporaryTables.php (and google on it). I think I'm assuming your 11 hour query had something to do with shovelling a bucketload of data to the access side, perhaps if you could show us the plan on the Oracle side that access was generating to get the Oracle data there might be a different answer.
    Oftentimes cross-db tools won't use Oracle features like analytics, or do slow-by-slow row processing where a short procedure could do things within the Oracle sql engine and return data in larger arrays.
    Sometimes mass data cleansings benefit from using server side tools outside of the db. Do you have the data from before it was loaded to Oracle? What Oracle platform are you on?

  • How to Extract Data from SAP and Load it into Essbase

    Hi All,
    Can you recommend some ways to extract data from SAP and load it into Essbase?. I have no knowledge about SAP, not sure how I can perform this task. Can I use ODI for this job?
    Thanks

    hi,
    Not sure if this helps but give a try
    you can create connection from EAS to SAP .. using a plug-in .. if you have access to oracle Support go for [ID 968961.1]
    or
    below are steps
    1. In EASPATH\console, open components.xml in a text editor.
    2. Under <PluginList>, enter <Plugin archiveName="SAP" packageName="com.essbase.eas.sap.ui"/> before the closing </PlugIn> tag.
    3. Save and close the file.
    4. In EASPATH\console\bin, open admincon.lax in a text editor.
    5. Search for lax.class.path= and append ;..\lib\sap_client.jar;..\lib \sap_common.jar to the entry. Save and close the file.
    6. In EASPATH\server\bin, open adminsvr.lax in a text editor.
    7. Search for lax.nl.java.option.additional, and append -DRFC_INI=EASPATH\server\saprfc.ini. Save and close the file.
    8. Create a new environment variable, RFC_INI, with a value of EASPATH\server\saprfc.ini
    9. Copy librfc.dll andsapjcorfc.dll to EASPATH\server\bin. You may need to obtain these files from SAP.
    let me know if it works :)

  • Sap Query in Background

    Hi Experts,
    is there a way to write the spool list of a sap query (run in background) to application server or to a logical file ?
    Thanks,
    Angelo.

    this dump appears mostly though not only when someting has been changed but maybe it's different for those HR queries. anyway: the query has obviously not been generated since it was last loaded. you can correct that in SQ01 by forcing the coding to be generated anew.

  • SAP Query as extraction tool - any benchmarks 4 throughput/volume constrain

    We are looking to use SAP Query as our extraction tool to create a large dataset for downstream systems.  We also will allow the users of those systems to access our SAP system (4.6C) through SAP query for custom extracts.  We plan on controlling this by custom coding our own logical database. 
    Has anyone out there got any benchmarks/metrics/success stories on any other SAP client that might have already done this?  Our concern is that SAP Query cannot handle the volume we need to pull from the system, so we need to determine what the choking points of this solution is. 
    Please advise.
    Thanks,
    Gareth de Bruyn

    Hi Gareth,
    I already used sap query in the way you want. Additionally we added lots of abaps to the query as our extraction modules. Everything works fine. At least you will be able to do delta updates ...
    The only issue we faces right now was, while loading time dependend master data. Therefore you have to load the data to PSA first and then you can update your infoobject. But there is an oss note out for this behavior.
    regards
    Siggi

  • Error when uploading SAP query in ECC6 from 4.5B system

    Hi expert ,
    I have down loaded SAP Query(infoset) from 4.5B server and now i want to upload this query to ECC6.0.  when i upload this query(infoset) to ECC 6 as follows to download step like from SQ02 .  but after executing i am getting error
    "  infoset ZTEST (import option REPLACE)"
    " F | Error When generating Transport dataset
    I am following all steps even created user group in sq03 which it is in my 4.5b system.
    Thanks
    Chandra

    Hello,
    It won't usually work when you try to download a infoset from a older release and try to upload in a newer version. However there is a workaround for this.
    If you debug the program while uploading, you will notice that certain if conditions fail on a few fields in the file you are trying to upload are missing. What i would suggest you to do is, download any infoset from your ECC 6.0 version and keep it as a reference for filling these missing fields into the older version infoset you are trying to upload.
    Vikranth

  • Batch generation of sap query

    Hello there,
    I am looking for a way to generate program of sap query in one go. There are hundreds of sap queries are used in our system and programs are lost after system upgrade.
    So I am wondering if there is a standard program to do it automatically.
    Any input is welcome.
    Regards,
    Kazuya Imabayashi

    Dear Mathias,
    You have to do the step with the RFC Destination created. Did you select the load type as Initial Download? (Edited to contain the word Download)
    Did you check out the  following notes for SP07: 1263664, 1268773. Please make sure that you apply all the compulsory notes.
    Also try restarting the server and trying the step again.
    Also, just as a confirmation, are you doing it from the client you created or client 000. Are the general post installtion stms, initial profiles done?
    Regards,
    Veera
    Edited by: Veeraraagavan R on Jan 9, 2009 9:05 PM

  • Tcode to SAP Query

    Hi All,
    I have created a SAP Query and I have assigned a tcode in the dev Server, It is working fine in the Dvelopment But Throws a dump in the Quality and Production Server of Program not found and asks to create the program.
    The Program exists in se38 in the quality and Production Server and it works fine in the Devlopment Server.
    Nimisha Gandhi.

    Hi,
    1) set a break-point on:
    PERFORM load IN PROGRAM (i_s_prof_int-progname).
    and check which porgram-name is shown at runtime
    and search for this program and perform.
    if you don't find - create an oss-note
    what i can imagine - that it's a program, which should be generated at runtime - but wasn't gen. because of a syntax error!
    or
    try update debugging? Maybe this part is executed in an update task.
    Otherwise online/background version are really running different!
    or
    There is a dynamic call, which needs correct program in variable i_s_prof_int-progname.
    Obviously this is filled different (or not at all) in background run.
    Set a break-point and try to find out, how this field is filled. Maybe you get a hint, why this might be different in background
    Regards,
    Harini.S

  • How to improve query & loading performance.

    Hi All,
    How to improve query & loading performance.
    Thanks in advance.
    Rgrds
    shoba

    Hi Shoba
    There are lot of things to improve the query and loading performance.
    please refer oss note :557870 : Frequently asked questions on query performance
    also refer to
    weblogs:
    /people/prakash.darji/blog/2006/01/27/query-creation-checklist
    /people/prakash.darji/blog/2006/01/26/query-optimization
    performance docs on query
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/3f66ba90-0201-0010-ac8d-b61d8fd9abe9
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/cccad390-0201-0010-5093-fd9ec8157802
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/ce7fb368-0601-0010-64ba-fadc985a1f94
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/c8c4d794-0501-0010-a693-918a17e663cc
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/064fed90-0201-0010-13ae-b16fa4dab695
    This is the oss notes of FAQ on query performance
    1. What kind of tools are available to monitor the overall Query Performance?
    1. BW Statistics
    2. BW Workload Analysis in ST03N (Use Export Mode!)
    3. Content of Table RSDDSTAT
    2. Do I have to do something to enable such tools?
    Yes, you need to turn on the BW Statistics:
    RSA1, choose Tools -> BW statistics for InfoCubes
    (Choose OLAP and WHM for your relevant Cubes)
    3. What kind of tools is available to analyze a specific query in detail?
    1. Transaction RSRT
    2. Transaction RSRTRACE
    4. Do I have an overall query performance problem?
    i. Use ST03N -> BW System load values to recognize the problem. Use the number given in table 'Reporting - InfoCubes:Share of total time (s)' to check if one of the columns %OLAP, %DB, %Frontend shows a high number in all Info Cubes.
    ii. You need to run ST03N in expert mode to get these values
    5. What can I do if the database proportion is high for all queries?
    Check:
    1. If the database statistic strategy is set up properly for your DB platform (above all for the BW specific tables)
    2. If database parameter set up accords with SAP Notes and SAP Services (EarlyWatch)
    3. If Buffers, I/O, CPU, memory on the database server are exhausted?
    4. If Cube compression is used regularly
    5. If Database partitioning is used (not available on all DB platforms)
    6. What can I do if the OLAP proportion is high for all queries?
    Check:
    1. If the CPUs on the application server are exhausted
    2. If the SAP R/3 memory set up is done properly (use TX ST02 to find bottlenecks)
    3. If the read mode of the queries is unfavourable (RSRREPDIR, RSDDSTAT, Customizing default)
    7. What can I do if the client proportion is high for all queries?
    Check whether most of your clients are connected via a WAN connection and the amount of data which is transferred is rather high.
    8. Where can I get specific runtime information for one query?
    1. Again you can use ST03N -> BW System Load
    2. Depending on the time frame you select, you get historical data or current data.
    3. To get to a specific query you need to drill down using the InfoCube name
    4. Use Aggregation Query to get more runtime information about a single query. Use tab All data to get to the details. (DB, OLAP, and Frontend time, plus Select/ Transferred records, plus number of cells and formats)
    9. What kind of query performance problems can I recognize using ST03N
    values for a specific query?
    (Use Details to get the runtime segments)
    1. High Database Runtime
    2. High OLAP Runtime
    3. High Frontend Runtime
    10. What can I do if a query has a high database runtime?
    1. Check if an aggregate is suitable (use All data to get values "selected records to transferred records", a high number here would be an indicator for query performance improvement using an aggregate)
    2. o Check if database statistics are update to data for the Cube/Aggregate, use TX RSRV output (use database check for statistics and indexes)
    3. Check if the read mode of the query is unfavourable - Recommended (H)
    11. What can I do if a query has a high OLAP runtime?
    1. Check if a high number of Cells transferred to the OLAP (use "All data" to get value "No. of Cells")
    2. Use RSRT technical Information to check if any extra OLAP-processing is necessary (Stock Query, Exception Aggregation, Calc. before Aggregation, Virtual Char. Key Figures, Attributes in Calculated Key Figs, Time-dependent Currency Translation) together with a high number of records transferred.
    3. Check if a user exit Usage is involved in the OLAP runtime?
    4. Check if large hierarchies are used and the entry hierarchy level is as deep as possible. This limits the levels of the hierarchy that must be processed. Use SE16 on the inclusion tables and use the List of Value feature on the column successor and predecessor to see which entry level of the hierarchy is used.
    5. Check if a proper index on the inclusion table exist
    12. What can I do if a query has a high frontend runtime?
    1. Check if a very high number of cells and formatting are transferred to the Frontend (use "All data" to get value "No. of Cells") which cause high network and frontend (processing) runtime.
    2. Check if frontend PC are within the recommendation (RAM, CPU MHz)
    3. Check if the bandwidth for WAN connection is sufficient
    and the some threads:
    how can i increse query performance other than creating aggregates
    How to improve query performance ?
    Query performance - bench marking
    may be helpful
    Regards
    C.S.Ramesh
    [email protected]

  • SAP BIW - Load Schedule Map

    Hi all,
    I tried the new how-to paper (SAP BIW - Load Schedule Map) to greate a report to view the scheduled loadings via PCs, but some formula variables are used there, which are not defined within the howto paper.
    Did somebody of you generate the report already successfully ???
    And maybe you have some hints for me to define the variables (techn. name: Y....Avg_Dur_Sec).
    Seams to me that there is a calculation in secondes behind it.
    Thanks a lot !!!!
    Best Regards from Germany,
    Alex.

    Hello Alexander,
    Page 14 explains how to create each formula for 0-23.  One thing that was not illustrated was that on Page 14 where you see the number 15 a lot, well, just be sure you make each occurence of that a number 0 when you are on 0, 1 when you are on 1, 2 when you are on 2 etc.
    Also take note of what is a local formula and what is a global formula as noted in the directions.
    It took me a little while, but I got it working!
    Also if you chain names don't appear when you run the query, just change the display properties for the Key/Text (Long text)
    I also believe you need to use Analyzer Version 7 for the definition.  I couldn't find the 'TIME' function using analyzer version 3 (Although i didn't look very hard either)
    Thanks,
    Nick
    Edited by: Nick Bertz on Apr 29, 2010 10:16 AM

  • Difference between sap query and sap ad hoc query

    Hello Experts-
    Is there any difference between sap query and sap ad hoc query. If yes, I will appreciate if you can provide some input.
    Thanks,

    Hi,
    SAP Query
    Purpose
    The SAP Query application is used to create reports not already contained in the default. 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 reports and create different types of reports such as basic lists, statistics, and ranked lists.
    Features
    The SAP Query comprises five components: Queries, InfoSet Query, InfoSets, User Groups and Translation/Query.
    Classic reporting- the creation of lists, statistics and ranked lists- are covered by the InfoSet Query and Queries components. Other components’ range of functions cover the maintenance of InfoSets, the administration of user groups and also the translation of texts created in the SAP Query.
    All data required by a user for a report can be read from various tables.
    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. In the WYSIWYG mode, you can edit the lists using Drag & Drop and various toolbars.
    AD Hoc Query
    Definition
    A Web item that enables you to create and change queries in a Web application on an ad-hoc basis.
    Use
    You can use the  Ad-hoc Query Designer Web item in the Web Application Designer to structure Web applications in which you create or change queries. The Web item is as a tool for designing ad-hoc queries in a Web environment.
    In particular it enables you to:
    ·        Create queries by assigning characteristics from an InfoProvider to rows, columns, filters, and free characteristics, and including key figures from the InfoProvider in the key figure structure of the query.
    ·        Restrict or filter key figures and characteristics
    ·        Use predefined key figure structures and restricted or calculated key figures in the query
    ·        Set or change query properties and key figure/characteristic properties in the query
    ·        Create or change conditions and exceptions
    When compared with the BEx Query Designer, the Ad-hoc Query Designer Web item has the following restrictions when creating or changing queries:
    ·        You cannot integrate variables into the query directly.
    However, you can use variables in reusable structures, or restricted or calculate key figures, which are used in the Ad-hoc Query Designer
    ·        The query can contain only one structure. This structure has to be the key figure structure and be in the rows or columns of the query.
    -        You cannot use key figures or key figure structures in the filter.
    -        You cannot define exception cells, since this requires two structures.
    You cannot create the following objects using the Ad-hoc Query Designer Web item:
    -         Reusable structures
    -         Reusable restricted key figures
    -         Reusable calculated key figures
    -        Local calculated key figures
    You can create local, restricted key figures using the Ad-hoc Query Designer Web item.
    You can edit existing queries in the Ad-hoc Query Designer Web item, if the queries adhere to the restrictions laid out above The Ad-hoc Query Designer checks these requirements when loading a query. If the query is too complex, the query can be loaded into the Ad-hoc Query Designer but you cannot change it there. You then receive the appropriate message. You can still check and execute the query.
    "Ad Hoc" is a Latin phrase which means "for this purpose" and in today's parlance generally means "on the fly," or "spontaneously."
    An ad hoc query is a query that is run at the spur of the moment, and generally is never saved to run again. These queries are run using a SQL statement created by a tool or an administrator. So therefore, such a query is one that might suit a situation which is only there for the moment and later on will become irrelevant.
    As queries become more complex, it can be difficult to write them correctly ad-hoc. To help with this, one can instead write the knowledge needed for queries as business rules in English, and then use a system called "Internet Business Logic" to automatically generate and run the SQL queries. One can then get explanations of the results, in English, at the business level.
    Check these links....
    http://help.sap.com/saphelp_nw04/helpdata/en/1f/03223c5f00612be10000000a11402f/content.htm
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/80bf2f79-021d-2a10-5082-dadc79aaa92c
    http://www50.sap.com/businessmaps/27FEEF3A12444F89A8524CCACAF4F5BF.htm
    http://help.sap.com/saphelp_nw70/helpdata/en/15/00a042b443c56ae10000000a155106/content.htm
    Reward points if useful....
    Regards
    AK

  • Creation of SAP Query in SQ02 with Single Table With Condition

    Hi All,
    I want to Create SAP Query in SQ02 using single Table MCHA.
    ii) I dont want all entries of MCHA Table I mean , I have to apply some Condition on this Table.
    i.e  Suppose I am having actual data in MCHA table is like this for Material M1.
    Plant    Material   Batch   BatchCreationdate
    P1          M1         B1       20.06.2007
    P2          M1         B1       04.05.2009
    P3          M1         B1       04.05.2009
    But I want the Output of SAP Query is like this:
       Material   Batch   BatchCreationdate
          M1         B1       20.06.2007
    That is irrespective of Plant if Material & Batch are equal ---> 1st record with Lowest date shoud get at the output.
    Please help me How write the code on single table in the SAP Query.
    Thanks,
    Kiran Manyam

    Hi,
    Your query should be like this:
    Select MATNR CHARG HSDAT
    from MCHA
    into table t_mcha
    where matnr = Materlal number from selection screen.
    The structure of t_mcha should contain the fields that you select.
    Then sort the table by date ascending
    Sort t_mcha by HSDAT.
    Hope this solves your problem.
    Thanks,
    Sowmya

Maybe you are looking for