Present a record by date through an Abap Rutine

Hi Gurus,
i got in the cube the next records for example:
calday Material Quantity
01.01.2011 A 10
15.01.2011 A 20
if i present in the query these IO an KF the query will show these 2 records, now i want just show the last record by date
calday Material Quantity
15.01.2011 A 20
i tried in the query with a calculate KF with exception aggregation , MAX with Reference to calday , but, i need to show 0CALDAY for that reason this doesnt work, so i was thinking in an ABAP  rutine that read all the active table of the ODS and compare record by record whats the last date by material and this record must be marked with a vaalue in another Infoobject, before the load to the cube, then i filter in the query for this mark IO, now how will the code be? can you help  to build this code, or some advice or idea?,  i appreciate it

Thanks for helping me.
Currently, my application provides users a feature to sort all the ThreadBean retrieved from the database according to two criteria:
1. sort by
thread_last_post_date, thread_creation_date, message_sender, thread_reply_count, thread_view_count
2. order by DESC or ASC
Therefore, my existing query string looks like:
String query = "SELECT ...... FROM message_thread WHERE message_receiver = ? ORDER BY " + sort + " " + order;According to your advice, I simply add another criterion; say, articleTitle to my query string.
A. Will this added criterion articleTitle have any impact on the feature that the application provides to users; namely, sort and order? (Now, all messages will be presented to users in categories; i.e. articleTitle.)
B. Where should I add the articleTitle to the query string
B.1: before sort and order?
String query = "SELECT ...... FROM message_thread WHERE message_receiver = ? ORDER BY " + articleTitle + " " + sort + " " + order;or
B.2: after sort and order?
String query = "SELECT ...... FROM message_thread WHERE message_receiver = ? ORDER BY " + sort + " " + order + " " + articleTitle;

Similar Messages

  • How do I skip footer records in Data file through control file of sql*loade

    hi,
    I am using sql*loader to load data from data file and i have written control file for it. How do i skip last '5' records of data file or the footer records to be skiped to read.
    For first '5' records to be skiped we can use "skip" to achieve it but how do i acheive for last '5' records.
    2)
    Can I mention two data files in one control file if so what is the syntax(like we give INFILE Where we mention the path of data file can i mention two data file in same control file)
    3)
    If i have datafile with variable length (ie 1st record with 200 charcter, 2nd with 150 character and 3rd with 180 character) then how do i load data into table, i mean what will be the syntax for it in control file.
    4)if i want to insert sysdate into table through control file how do i do it.
    5) If i have variable length records in data file and i have first name then white space between then and then last name, how do i insert this value which includes first name and last name into single column of the table.( i mean how do you handle the white space in between first name and last name in data file)
    Thanks in advance
    ram

    You should read the documentation about SQL*Loader.

  • I can record midi data from my Mason & Hamlin Piano Disc Pro Record through my MOTU Traveller into Logic but Logic won't send midi data out to the MOTU Traveller to the Piano Disc player

    Hello All,
    I can record midi data from my Mason & Hamlin Piano Disc Pro Record through my MOTU Traveller into Logic Pro 9.1.8  but Logic won't send the midi data back out to the MOTU Traveller and thus to the Piano Disc player. I got it to playback one time but have no idea how and when it did it was looping or something because the velocity was way high coming back in and the damper pedal was slamming down. When I play a key on the piano the midi "in" light on the Traveller lights up. When I play the track back on my computer no lights blink on the Traveller and when I did the apple midi studio test in utilities when I play a key I get the confirmation signal noise and the Traveller blinks when I click on the down arrow of the Traveller in the Apple midi studio test the midi out light on the traveller never lights and the signal light on the piano does not blink either. No outbound signal at all...
    I have messed with every possible parameter I can find and and have had help from one of Piano Disc's premier editors but no luck. The piano was prepped for me on Logic so it would work with my studio.  I'm positive it's my fault and I'm overlooking something really simple and stupid but what!??!
    Somebody please help.  Thank you all in advance for ANY ideas you might have!

    Blues Piano,
    I'm not sure if this will be a help or not.  I'm so Logic Pro wet behind the ears that I make newbies look experienced.  However, I'm not expecting many on the Apple support forums have a PianoDisc system, much less one with the new optical record strip.  While I don't have any record strip on my PianoDisc, I do have a PianoDisc iQ that's only a month old.  I've been playing converted paper scrolls from hundred year old player pianos through it via the MIDI in port of the PianoDisc CPU.  I've found I have to open the MIDI file in Logic Pro (10.0.4) then go to <Track><New External MIDI Track> then copy the existing track to that new external track.  Only then can I see in the Track inspector (defaults left side of screen with the Icon for the instrument) the "Port" parameter.  Then I can select my external MIDI device in that Port selector. 
    I've also encountered problems with the PianoDisc not using enough force on the notes or using too much force.  To get around this problem, until I understand Logic better, I've been setting minimum and maximum volicities.  To do that I right click on the track and select "Select All."  Then I right click again and select "MIDI" then "MIDI Transform"  then "Velocity Limiter."  In the resulting pop up window in the center is a drop down and you can play with the velocity from "MIN" to "MAX" along with "ADD" "SUBTRACT" etc. 
    I hope this helps.  I envy you your Mason & Hamlin.  If you need more help on this just email me at pfleischmann at mac dot com.

  • How to compare the data in a view with data present in a master data?

    Hi All,
    We have loaded some data into a Master Data Object (YMETADATA) in Development system.
    Now, the same data can be present in a view RSDVCHA.
    Our aim is to write a ABAP program, which would read a record from RSDVCHA and look into Master Data records and show whether it is present in the master data or not?
    Has anyone written such type of code earlier, If so, please do help me out in writing this code?
    Thanks in advance,
    Anjum.

    Hello Anjum,  
    It looks that the view is based on the master data table itself and view doesn't contain data and is a logical representation of the underlying database tables.
    Moreover the view RSDVCHA is used for viewing the  characteristics, basic chars and local properties.
    Are you storing similar values in YMETADATA?
    [Thanks|http://chandranonline.blogspot.com/]
    [Chandran|http://chandranonline.blogspot.com/]

  • Is there "Interface Type Node" present in WD JAVA as in WD ABAP ?

    Hi,
    Experts,
    As i have gone through WD ABAP in that i found  "Interface Type Node"  under Context tab  but i have a dought is that type "Interface Type Node" is present in WD JAVA or not.If not why and its use ?
    Thank You,
    Shabeer Ahmed.

    Hi,
    There is no "Interface Type Node" exists in WD4J as we can create the node in the Interface controller and map it component controller.
    In WD4A we cannot create node under Interface Controller, we have to create the Interface Type Node in component controller then it automatically gets create in Interface Controller also.
    The Interface Type Node is used to exchange the data between the two WebDynrpo components.
    Thanks,
    Jhansi Miryala

  • Sending Data Through a Output Stream...

    Hello,
    I am writing a program that works on a network...a server is running and client will connect to the server and send specific data for the server to complete transactions on.
    The transactions that are mainly seen are SQL SELECT statements and as you can imagine a statement could bring back many records.
    At present I have been able to send specific data through streams and have turned this into parameters on the server side and performed SQL. What I need help with or suggestions on is how to get the data back to the client. In some cases it may need to be displayed on screen or just used for further processing?
    Please let me know if this is not 100% clear.
    Thanks,
    P

    If you are able to send data over a network, then I assume that you know how to do network programming in Java, as well as knowing SQL.
    Java has JDBC - Java DataBase Connectivity API that supports your requirements in full.
    If you require a custom solution, then you need to be able to read data back from the server - when the server returns the ResultSet back to the client.
    A Socket object has both input and output streams. Seems that you know about the output stream, do you not know about the input stream?
    If the server is setup to send data back to the client over the same socket, then you should simply be able to read the results back from the socket's input stream.

  • SAP paging overflow when storing data in the ABAP/4 memory.

    I am trying to create a data source in  BI7.0 in the Datawarehousing Workbench. But along the process when i need to select a view i get an error detailed in the following error file extract: Please go through and assist.
    untime Errors         MEMORY_NO_MORE_PAGING
    Date and Time          06.06.2009 14:21:35
    Short text
    SAP paging overflow when storing data in the ABAP/4 memory.
    What happened?
    The current program requested storage space from the SAP paging area,
    but this request could not be fulfilled.
    of this area in the SAP system profile.
    What can you do?
    Note which actions and input led to the error.
    For further help in handling the problem, contact your SAP administrator
    You can use the ABAP dump analysis transaction ST22 to view and manage
    termination messages, in particular for long term reference.
    Error analysis
    The ABAP/4 runtime system and the ABAP/4 compiler use a common
    interface to store different types of data in different parts of
    the SAP paging area. This data includes the
    ABAP/4 memory (EXPORT TO MEMORY), the SUBMIT REPORT parameters,
    CALL DIALOG and CALL TRANSACTION USING, as well as internally defined
    macros (specified with DEFINE).
    To store further data in the SAP paging area, you attempted to
    allocate a new SAP paging block, but no more blocks were
    available.
    When the SAP paging overflow occurred, the ABAP/4 memory contained
    entries for 20 of different IDs.
    Please note:
    To facilitate error handling, the ABAP/4 memory was
    deleted.
    How to correct the error
    The amount of storage space (in bytes) filled at termination time was:
    Roll area...................... 8176
    Extended memory (EM)........... 13587912
    Assigned memory (HEAP)......... 0
    Short area..................... " "
    Paging area.................... 40960
    Maximum address space.......... " "
    By calling Transaction SM04 and choosing 'Goto' -> 'Block list',
    you can display an overview of the current roll and paging memory
    levels resulting from active users and their transactions. Try to
    decide from this whether another program requires a lot of memory
    space (perhaps too much).
    The system log contains more detailed information about the
    termination. Check for any unwanted recursion.
    Determine whether the error also occurs with small volumes of
    data. Check the profile (parameter "rdisp/PG_MAXFS", see
    Installation Guidelines).
    Is the disk or the file system that contains the paging file
    full to the extent that it cannot be increased, although it has
    not yet reached the size defined in the profile? Is the
    operating system configured to accommodate files of such a
    size?
    The ABAP processor stores different types of data in the SAP
    paging area. These include:
    (1) Data clusters (EXPORT ... TO MEMORY ...)
    (2) Parameters for calling programs (SUBMIT REPORT ...),
    Dialog modules (CALL DIALOG ...) and transactions
    (CALL TRANSACTION USING ...)
    (3) Internally defined program macros (DEFINE ...)
    Accordingly, you should check the relevant statements in a program
    that results in an overflow of the SAP paging area.
    It is critical when many internal tables, possibly with
    different IDs, are written to memory (EXPORT).
    If the error occures in a non-modified SAP program, you may be able to
    find an interim solution in an SAP Note.
    If you have access to SAP Notes, carry out a search with the following
    keywords:
    "MEMORY_NO_MORE_PAGING" " "
    "SAPLWDTM" or "LWDTMU20"
    "TABC_ACTIVATE_AND_UPDATE"
    If you cannot solve the problem yourself and want to send an error
    notification to SAP, include the following information:
    1. The description of the current problem (short dump)
    To save the description, choose "System->List->Save->Local File
    (Unconverted)".
    2. Corresponding system log
    Display the system log by calling transaction SM21.
    Restrict the time interval to 10 minutes before and five minutes
    after the short dump. Then choose "System->List->Save->Local File
    (Unconverted)".
    3. If the problem occurs in a problem of your own or a modified SAP
    program: The source code of the program
    In the editor, choose "Utilities->More
    Utilities->Upload/Download->Download".
    4. Details about the conditions under which the error occurred or which
    actions and input led to the error.

    Hi Huggins,
    Maintenance of the Paging File is owned by your basis team.
    They should increase this in order for your transaction to process successfully.
    Just for your reference, in case the OS used is windows server 2003, paging file value can be checked through;
    Right click in the My Computer&gt;properties.
    Then go to Advance tab;
    Then there should be a performance section, click the settings
    Then Advance tab again. The paging file can be seen from there.
    (and can be adjusted from there also)
    The value of the paging file in general will be dependent with the available RAM from the hardware.
    Hope this helps. Thanks a lot.
    - Jeff

  • Importing of BPPayment Methods data through DTW

    HI All,
        Please explain how to upload BPPaymentMethods data through DTW?
    Kind Regards
      Silpa.N

    You can use oBPPaymentMethods template to reach your goal through DTW.  There are only 3 column needed to fill the teplate.
    RecordKey is identifier. It has to be unique.
    Linenum is (line number - 1) in that record.
    PaymentMethodCode is Incoming or Outgoing
    Hope this info is helpful to you.
    Thanks,
    Gordon

  • Upload excel sheet data through sqlloader into oracle tables

    hi everyone,
    i am working with excel sheet with following records
    8501      Jacob Marshall      15000      21/10/2009      Finance
    8502      Chris Campell      50000      13/06/2008      R&D
    8503      Simon Dough      50000      3/07/2008      Engineering
    8504      Mark Haggai      75000      9/3/2006      Product Management
    8505      Verica Beverley      45000      7/2/2008      HR
    and i saved it in emp_details.csv
    after that when i write following code to make control file
    load data
    infile 'C:\Documents and Settings\prashant_dabral\Desktop\a.txt'
    into table tmp
    field terminated by','optionally enclosed by" "
    (emp_no,emp_name,salary,doj,dept_name)
    after this pl\sqldev returning me error message that ORA-00900:invalid sql statement
    can anybody tell me how to resolve issue
    or
    another method to Upload excel sheet data through sqlloader into oracle tables

    A control file is a file located on the operating system, not some SQL or PL/SQL code you try and execute.
    Create the control file as a file and then use that to load your data with SQL*Loader from the command line.
    http://www.morganslibrary.org/reference/sqlloader.html
    Or better still, create it as an external table and then you don't need a seperate control file or need to use sql loader from the command line...
    http://www.morganslibrary.org/reference/externaltab.html

  • Differrences between structure and table in data dictionary in ABAP?

    What is the differrences between structure and table in data dictionary in ABAP?
    are they same?

    Tables :
    1. The place where the data is stored so that you can retrieve at any time.
    2. There can be more than one record stored
    Structures :
    1. The data / info stays only during the runtime of the application and will not get stored at all during the run time ....
    2. Only one record can be stored at the runtime .....
    A structure forms the skeleton of the table.
    A structure comprises components i.e., fields. Types are defined for the components A component can refer to an elementary type (via a data element or by directly specifying the data type and length in the structure definition), another structure or a table type. A structure can therefore be nested to any depth
    Tables can be defined independently of the database in the ABAP Dictionary. The fields of the table are defined with their (database-independent) data types and lengths.
    When the table is activated, a physical table definition is created in the database for the table definition stored in the ABAP Dictionary. The table definition is translated from the ABAP Dictionary to a definition of the particular database.

  • Getting present display records  or Row Id's information in ALV grid?

    Hi,
    I am using REUSE_ALV_GRID_DISPLAY for ALV display.
    I need to get the row id's when user filter the records with any conditions  - or any other ways if he selected particular records - I need to process my logic only for those present displaying records in ALV grid.
    So How do I can get preset display records in ALV grid or Present display records row id's ?
    Please let me know .
    And also I  am using 
    CALL FUNCTION 'GET_GLOBALS_FROM_SLVC_FULLSCR'
        IMPORTING
          e_repid = i_repid
          e_grid  = lt_grid
    In lt_grid there is a table MT_ROID  this table is having selected row id's information but I could not read this table. I think this will work only OO ABAP and also method - get_selected_rows is also not working.
    I highly appreciate your answers.
    Thanks
    Kevin

    Hallo,
    Any ideas?
    Thanks.

  • Error while loading data through flat files

    Hi,
    I am laoding data through flat files
    I loaded the data in development & then transported it to Quality  system  for doing Integration testing & loaded the data in Quality  system  & data loading was successful
    But we do the regression testing in one more Quality system where the objects get transported from Quality  system ,here when I try to the load the data to any of the cube in this system  I am getting the following error
    Error 'The argument 'US' cannot be interpreted as a number' on assignment field /BIC/ZIFBCOCTR record 1 value US
    Generally we get this error when there is the data of one field is going to the other field
    But one thing I am unable to understand is it was working fine in the Quality system and all the objects got transported from Quality to Regression testing system
    Could any one help me out
    Thanks
    Maya

    Hi,
    Can you please cross check the file structure and the transfer structure.
    Cheers,
    Malli....

  • J2ME app.: To update Oracle table by sending data through mobile phone

    Hello all,
    I want to develop a mobile app to update the table of oracle database by sending the data through the SMS (Short Message Service). Means I'll send a sms through my cellphone containing some data and this data will be used to update the remote oracle database. How to do that?. Plz help.
    Thanx in advance.

    hi
    My problem is here I need to update the loginfo table with the file name, count of records, table name and datetime.
    For instance my dat file is XX.dat
    my database table name is Mytable
    Total record count is 10,00,000 records
    datetime as on this date
    the data in the XX.dat file I am using the controlfile (SQL*loader and dumping into the Mytable.Now my 10,00,000 records are dumped into the Mytable.
    This process information I want to store it in the loginfo table. For this I need the trigger
    CREATE OR REPLACE TRIGGER MYTRIGG
    AFTER INSERT ON MYTABLE
    Declare
    V_Count Number;
    Begin
    Select count(*) into V_Count from Mytable;
    Insert into Loginfo(TotalRecords,Date)
    Values(V_Count,Sysdate);
    end;
    This is the trigger I have used.But in my loginfo table instead of one value as 10,00,000 it is getting each record as row by row
    1
    4
    100
    1000
    10,00,000
    So I need only one value to be stored and at the same time my tablename and filename must also be stored.
    Kindly help me
    suroop

  • SQL*Loader-510: Physical record in data file (clob_table.ldr) is long

    If I generate loader / Insert script from Raptor, it's not working for Clob columns.
    I am getting error:
    SQL*Loader-510: Physical record in data file (clob_table.ldr) is long
    er than the maximum(1048576)
    What's the solution?
    Regards,

    Hi,
    Has the file been somehow changed by copying it between windows and unix? Ora file transfer done as binary or ASCII? The most common cause of your problem. Is if the end of line carriage return characters have been changed so they are no longer /n/r could this have happened? Can you open the file in a good editor or do an od command in unix to see what is actually present?
    Regards,
    Harry
    http://dbaharrison.blogspot.co.uk/

  • Transfer data through bdc using as01 tr. code

    hi gurus,
    please tell me transfer data through bdc using as01 tr. code.please guide me through coading how to i will proceed.i am using call tr. through recording.
    thanks
    subhasis

    Subhasis,
    Best way to Convert data to AS01 is to Use BAPI BAPI_FIXEDASSET_CREATE.
    Trouble free and easy conversion.
    Hope this helps.
    Vinodh Balakrishnan

Maybe you are looking for

  • Users of Windows 7 Computers connected to Domain but can not get Internet Randomly

    After crash of DC, I have replaced the domain controller server 2008 with another machine but with same name. I got trust relationship issue, which I resolved by disjoining and rejoining. After this I am facing below mentioned issue on computers rand

  • PDF Portfolio compatible on PC and Mac?

    Hello, I have a very large InDesign file that I will need to seperate into individual PDF files. I've never used PDF Portfolio before, but have seen some samples and love how it allows 'interconnectivity' between multiple PDF files. My end-users are

  • Tab order of the JTable cell

    Hello there: I noticed on a JTable component, the default transversing order of the cells when pressing tab key is from left to right, row by row. Now if I want the order to be from top to bottom, column by column. How can I do it? Thanks, Sway

  • Need to add large (Physical) picture files to my iWeb page, best solution?

    I am designing a site for my friends restaurant. When I drag and drop the image files into iWeb as instructed when you view them back through the browser after uploading they are not large enough to read properly on the web - it is a menu so there is

  • Differences between == and .equals

    I'm rather new to Java programming and have learned that == can only be used to compare primitive types in Java (for example when comparing to int) and when comparing objects, one should use the .equals-method (that should be overloaded from the one