Getting the record data.

Hi All,
Good Morning.
I had same question before, but there I was not getting the record data.
This is my internal table structure.
KUNNR, VKORG, VTWEG, SPART, CRDATE, EFDATE, SPRICE, EPRICE, SQTY, EQTY.
This internal table is the user selected records using a report display with check box to select the records.
From the internal table with the user selected records if the KUNNR, VKORG, VTWEG, SPART values are same it has to go to if condition and I need to catch the data of the records to use in the Function other wise go to else condition.
lOOP AT ITAB.
IF ---
CALL FUNCTION
ELSE
EXIT.
ENDIF.
ENDLOOP.
1) 1001 300 20 01 12/01/2006 01/01/2007 10.00 9.00 10 09
2) 1001 300 10 01 -
3) 1001 300 20 01 -
If the user selects records 1 and 3 it has to go in to IF condition. Here I need the records data of 1 and 3.
If the user selects records 1 and 2 it has to go in to ELSE condition.
Please help me. Sorry for the confusion.
Thanks,
Neelu.

HI,
Loop at itab.
*--Write logic to get the selected records and store it in jtab. (Hope this logic is already in place with you)
put them into jtab.
endloop.
ktab[] = jtab[]. " Ktab to get the seleted records
sort table jtab by KUNNR, VKORG, VTWEG, SPART .
delete adjacent duplicates from jtab comparing VKORG, VTWEG, SPART .
describe table jtab lines v_lines.
and now your condition.
with your requirment.
if lv_lines is 1 then it indicates that you have selected lines 1 and 3 and in delete command it got deleted only one left as they have same values.
else
here you have selected lines 1 and 2 and the delete statment will not delete any records...
endif.
Hope this helps .. let me know if its not clear
Thanks
Mahesh

Similar Messages

  • Date fields and compare and get the later date of the fields

    I am trying to compare these date fields and compare and get the later date of the fields
    Tables are
    TABCASER
    TABCASER1
    EVCASERS
    Field
    Are
    TABCASER1.CASER_no
    The dates are to be compared and then get the records with the highest or latest date value.
    TABCASER1.CASERRECIEVEDDATE
    EVCASERS.FINALEVDATES
    EVCASERS.PUBLICATIONDATE
    EVCASERS.PUBLICATIONDATE
    TABCASER.COMPAREACCEPDATE
    I have this code but I am trying to figure out what it all means.
    I have several questions.
    1.
    1.     greatest it is used here to compare right? How do I then output this ? do I store it to a var (coldfusion) ultimately , I wish to send it to a page of records
    2.     is it necessary to use todate? And to_date? What does this do?
    3.     decode, is this necessary too. What does this do? NULL?
    4.     
    5.     
    6.     when I do get the query results how do I send it to coldsuion and out put to a display.
    Someone sent me this code.
    is there abetter way of doing this? To compare the dates and store in a var to display. thanks
    Here is my code below:
    Greatest(
         CASE
              WHEN INSTR(TABCASER1.CASER_no,'-CE') > 0 THEN
         decode(TABCASER1.CASERRECIEVEDDATE,NULL,TO_DATE('01/01/1900','mm/dd/yyyy'),TABCASER1.CASERRECIEVEDDATE)
                             WHEN INSTR(TABCASER1.CASER_no,'-ERNIE') > 0 THEN
         decode(EVCASERS.FINALEVDATES,NULL,TO_DATE('01/01/1900','mm/dd/yyyy'),EVCASERS.FINALEVDATES)
                             WHEN INSTR(TABCASER1.CASER_no,'-MONIE') > 0 THEN
         decode(EVCASERS.PUBLICATIONDATE,NULL,TO_DATE('01/01/1900','mm/dd/yyyy'),EVCASERS.PUBLICATIONDATE)
                             WHEN INSTR(TABCASER1.CASER_no,'-NADINE') > 0 THEN
         decode(EVCASERS.PUBLICATIONDATE,NULL,TO_DATE('01/01/1900','mm/dd/yyyy'),EVCASERS.PUBLICATIONDATE)
                             ELSE
         decode(TABCASER.COMPAREACCEPDATE,NULL,TO_DATE('01/01/1900','mm/dd/yyyy'),TABCASER.COMPAREACCEPDATE)
                        END
              ,decode(TABCASER.COMPAREACCEPDATE,NULL,TO_DATE('01/01/1900','mm/dd/yyyy'),TABCASER.COMPAREACCEPDATE))
              between TO_DATE('#dateformat(form.startDate,"mm/dd/yyyy")#','MM/DD/YYYY') and TO_DATE('#dateformat(form.endDate,"mm/dd/yyyy")#','MM/DD/YYYY')
    is there abetter way of doing this? To compare the dates and store in a var to display. thanks

    Hi
    If you have date datatypes than:
    select
    greatest(TABCASER1.CASERRECIEVEDDATE, EVCASERS.FINALEVDATES, EVCASERS.PUBLICATIONDATE, EVCASERS.PUBLICATIONDATE, TABCASER.COMPAREACCEPDATE)
    from TABCASER, TABCASER1, EVCASERS
    where ...-- join and other conditions
    1. greatest is good enough
    2. to_date creates date dataype from string with the format of format string ('mm/dd/yyyy')
    3. decode(a, b, c, d) is a function: if a = b than return c else d. NULL means that there is no data in the cell of the table.
    6. to format the date for display use to_char function with format modell as in the to_date function.
    Ott Karesz
    http://www.trendo-kft.hu

  • How to get the output data of Standard drill down report into z-program?

    HI every one,
            I want to get the output data of drill down report into z-program.
           Actually,if the output is only one, I can get into z-program,
          But, Here the report consists 3 alv outputs. when double clicking function happens, it will direct to another alv output.
        Those, all the outputs of report i want to get into z-program.
    PLease , give reply as early as possible.
    Thank u in advance,
    karthik

    HI,
      When i download,only one output i will get.
      But,if i double-click the particular record it will show another output. I want that output also.
      Like that,when i double-click particular record, it will show some other alv ouput based on record,     
    i wanted all those outputs.
    If  i copy the code, whether i face any problems?

  • How to Check the date and get the latest date?

    Hi Everyone,
    I've an internal table which holding few records which contain date field. How I can check this internal table by getting the record which contain "latest date" only? Kindly advise. Thank you.
    eg:
    I should only get the record which contain lastest date. (eg: I should picked up Record3)
    Table i_test
    Field 1              Field 2(date)
    Record1            20090322
    Record2            20090101
    Record3            20090601
    Moderator message - Please search before asking and do not ask basic questions - post locked
    Edited by: Rob Burbank on Jun 17, 2009 9:21 AM

    Its easy...sort the internal table using the field i.e. date field in DESCENDING manner
    SORT gt_final BY date_field DESCENDING.
    Read the first entry of the internal table..it will have what you require
    READ gt_final INDEX 1.

  • Get the run date and pages to appear at the top of a BI Answers report

    Hi,
    I'm trying to get the page number to appear at the bottom of each page.
    It should say eg. Page 2 of 10 pages'.
    I'm also trying to get the run date to appear at the top of each page.
    Thanks,
    Sally

    You can't get "page x of y" out of the box, but you can enable "Footers" and use the Page # variable to display the pages. To get the total number of records, you can use this method:
    http://oraclebizint.wordpress.com/2008/01/23/oracle-bi-ee-101332-total-number-of-rows-and-pagination/
    The other thing you can do is use pagination for pivot tables. See this link:
    http://oraclebizint.wordpress.com/2008/01/17/oracle-bi-101332-pagination-in-pivot-tables/
    And of course, displaying the run date and time is built in as a variable in the Header (of Header and Footer), which will appear on every page (unlike the Title View the previous poster pointed out, which will only appear on the first page). There you go.

  • Getting the latest dates

    Hello,
    I have simple question ....i dont know why i m brain dead today...
    I m trying to get the latest date for the each id
    with test_data as(
    select '001'id, 'xyz'name, '1/1/2009'start_date from dual union all
    select '001',  'abc', '1/2/2099' from dual union all
    select '001',  'def', '1/3/2009' from dual union all
    select '001',  'ghi', '1/4/2009' from dual union all
    select '001',  'jkl', '1/5/2009' from dual
    The output i m looking for just one record with latest date
      with result as
         select '001',  'jkl', '1/5/2009' from dual 
    i tried this
    select id,name, greatest(start_date) from test_data
      group by id,name,start_date
    It gives me output ...which i m not lookg for
      with t as
         select '001',  'abc', '1/3/2009' from dual union all
         select '001',  'ghi', '1/4/2009' from dual union all
         select '001',  'jkl', '1/5/2009' from dual
       )select * from t
       I was wondering if we have any function's in oracle PL/SQL to do these kind of stuff's
    Any suggestions is greatly appriciated!! Thank you sio much!!
    Edited by: user642297 on Mar 12, 2010 12:21 PM

    SQL> with test_data as(
      2  select '001'id, 'xyz'name, '1/1/2009'start_date from dual union all
      3  select '001',  'abc', '1/2/2099' from dual union all
      4  select '001',  'def', '1/3/2009' from dual union all
      5  select '001',  'ghi', '1/4/2009' from dual union all
      6  select '001',  'jkl', '1/5/2009' from dual union all
      7  select '002',  'ghi', '1/4/2009' from dual
      8  )
      9  select id, max(start_date), max(name) keep (dense_rank first order by start_date desc)
    10  from test_data
    11  group by id;
    ID  MAX(STAR MAX
    001 1/5/2009 jkl
    002 1/4/2009 ghiMax
    http://oracleitalia.wordpress.com

  • To get the PO data changed on a particular given date.

    hi,
        i want to get the PO data of all PO's changed on a particular day.
    when i am selecting from CDHDR
    SELECT objectclas
             objectid
             changenr
        FROM cdhdr INTO TABLE i_cdhdr
       WHERE objectclas = 'EINKBELEG'  AND
             udate      = p_date.
    1.Are the above condtions enough.?
    2.with the above conditions give me all the changes(Create,Change,Release,Delete..etc...)
    and as i will be getting multiple records...i can delete the adjacent duplicates..please confirm.
    2.Should i fetch CDPOS also...or can i ignore if i am not interested in type the change made to a PO?

    Hi Sravan,
    You can also think about using the field CHANGE_IND (Modification type) which I believe in your case would be 'U' (Update). This way you will exclude also those POs created, deleted, etc. and you will consider only those ones changed.
    If you are not interested in the type of the change it has been done through those POs, you don't need to consider the CDPOS table.
    Hope it helps you.
    Regards,
    Daniel

  • How to get the records of the particluar day when delta laod failed (Urgent

    Hello  BW Gurus,
    We are  facing one serious issue. Here is the scenario.
    1st time the Delta was init and for next consective two  loads delta ran sucessfully... then next time delta got failed and the status is in red..... even though system started next delta loading and it has fetched the records and status is in green but not activated ,,,,,its happening  still past one month so almost there are 20 requests which are to be get activatetd.
    How to resolve this issue.
    <b>And how to get the records of the partilcular day when the delta got failed.
    </b>
    Anyone have come across with this strange issue then help me out and i will rewarrd the points.
    Urs,
    Raki.

    Hi
    Can you provide more details about your extractor and data targets.
    Are you loading delta to an ODS ??
    If you are loading to an ODS, The only solution i can see is to get the missing delta records via FULL UPDATE. Because if you delete the error request from ODS it will also delete the 20 successful requests above it.
    Cheers
    Praveen
    null

  • How to get the records which has a specified x/y coordinates

    Hi,
    How to get the records which has a specified x/y coordinates. I have a table which has street data. And another table has a point data. Now I just want to get the records from street data which includes the points in the point data table. Can any one give your suggestions
    Thanks and Regards
    Aravindan

    Aravinda,
    If you want to find the line segments which intersect the given
    set of points, you can do that with SDO_RELATE.
    siva

  • RFC does not get the updated data

    Hi Experts,
    I am not getting the updated data via RFCs.
    The scenario is like this.
    Step 1: I open the Application running on System "B".
    Step 2: I add a record in second  Application which is on  system "A".
    Now I want the same data to be reflected on Application running on System "B" on some event.
    I observed the data is never reflected in Application running on System "B", but when I refresh the page of this Application, I get the updatred data. Do you have any clues why this is happening.
    Best Regards,
    Arti.

    Hi,
    Can you be bit more clear about the requirement. It is logical that without refresh updated data wont be shown.
    Thanks,
    Vinod.

  • Not able to get the Qualification data from BAPI

    Hi all,
    I am using a BAPI (BAPI_JOBREQUIRE_GETLIST) to get the qualifiaction data for requirement profile. It's working fine earlier but I did not get the qualification data from this BAPI, although the data is there in DB against this requirement profile.
    Can someone suggest me why I am getting this issue. I have looked into SDN and in BAPI documentation and found as below:
    "You require authorization (structural authorization) to read the Requirements subprofile."
    I am having the same User ID as I had before (when I getting back the correct data), so I don't think it should be authorization issue.
    Can someone help me out in this issue please.
    Thanks,
    Sanket Sethi

    Hi Shiva,
    It does not going to these includes at all. Message comes out with successfully done. The BApi is calling RHPP_COMMON_QUALI_READ inside, but this will not return any data. But if will call any qualification object ID, this BAPI will come up with data.
    So the QP type LO profile will not come up with any kind of data, but if we pass the OTYPE as Q and pass any Qualification object ID then the data will be returned.
    Is there any relationship or some other thing is missing? Any idea.
    Thanks,
    Sanket Sethi

  • How can i get the meta data from database?

    Hi, all java and db experts,
    I need to write a tool to generate java file which will be used to hold the resultset of a stored procedure of Oracle. Is there any API call or tools to connect to db and then get the meta data of the return cursor instead of reading stored procedure definition on my own?
    Please help, thanks a lot.
    Hanna

    if i execute a Oracle stored procedure, the resultset of a cursor is returned. It's easy to know the meta data at the runtime.
    However, could i get the meta data about the resultset of a cursor before runtime? Such as by connecting to the database and ask it about meta data of a specified stored procedure?
    Is it feasible?
    DatabaseMetaData dbmd = conn.getMetaData();
    ResultSet rs = dbmd.getProcedureColumns("", "%", "SP_NAME", "%");
    while (rs.next()) {
    String colName = rs.getString(4);
    int colType = rs.getInt(5);
    int colDataType = rs.getInt(6);
    int colPrecision = rs.getInt(8);
    int colLen = rs.getInt(9);
    int colScale = rs.getInt(10);
    long defaultValue = rs.getLong(11);
    But what i get is a list of stored procedure parameters. In oracle, cursor is IN OUT parameter . How can i get the meta data about the resultset of cursor?

  • How can I get the image data from Clipboard with LV

    Anybody knows How can get the image data after pressd "print screen button" with LV?
    I want to program a software which can save a image as a bmp or jpeg etc, and the image data is from pressed print screen button. 
    How to get it out from clipboard. I am trapping about. thanks in advance.
    Try to make everything Automatic

    You can have a look at Rolf Kalbermatter's post here (give him stars) or, if you're using scripting, you can use the Application class Get Clipboard Image method.
    Try to take over the world!

  • How to Get the Current data into Planning Layout from the Planning cube

    Hi,
    I have a problem in BPS.   I am selecting the data from cube based on Month org details but I want to see the latest data.   How can i get this data into planning cube.
    Like
    data
    Tran           cal month            org               amt
    1                 jan                        a                  100
    1                 feb                        a                   200
    if i want to read based on Tran org as input values I shoud get the below data but I am getting the previous data.   
    Tran           cal month            org               amt
    1                 feb                        a                   200
    Kindly help me in this regard
    Thanks
    Naveen

    Naveen,
        Are yo having issue when you save something in the layout, the data doesn't appear in the listcube ? Or do you have issue that the latest data you see in the cube doesn't appear in the layout ?
    For the former issue, please look at your selections of listcube and for the second issue, please check your planning level definition, make sure all the restrictions you have applied are valid for this latest data to be presented in the layout.
    Hope this helps.
    Cheers
    Srini

  • How to get  the actual data in ALV report

    I am doing some upgradation work   in that i am using Submit  & And return and  also i am using some function modules like LIST FROM MEMORY , LIST TO TXT wnd WRITE LIST , it gives output in normal list format , But i need to print in ALV report .
    With the use of set table for 1st display i got the  ALV report   but not with actual data, (some junk value is showing) , So can any 1 suggest me how to get  the  actual data in ALV report, With the use of  Any Function Module or with Coding,
    with regards,

    Hi Saravana
    I am sure you must be getting the values in tables of table parameters from every FM.
    consolidate the values from tables of all FMs in one table and built ALV for that table only.
    I hope this way you can show the actual data in ALV.
    thanks
    Lalit

Maybe you are looking for

  • T420s Linux and the DVI+VGA port

    Hi, I currently have some problems with my graphic ports of my new ThinkPad T420s (4173-W1J). My problem is a bit complicate (I think) but I will do my best to explain it very detailed. Sorry in advance for any stupid mistakes I made with my configur

  • HELP. Interminttern Kernel Panic & Restart

    Hello all, Ever since upgraded to Yosemite. My iMac will intermittently suffer a Kernel Panic, and it will Restart. I have not installed any new major apps since the upgrade and the usage is almost the same as previous Mavericks. The running apps are

  • Toshi SD-R5372 - doesn't recog CD R/Ws

    This post contains a very detailed description of my troubleshooting steps and admittedly is a little long. I wanted to be thorough so apologies right up front, OK? Also, I can't find a forum for North America! Here's an interesting situation. Have a

  • Help with installing new hard drive and transferring data?

    I have a MacBook Pro 13-inch mid 2009 that is running OS X version 10.6.8. The hard drive is full and I have a new one I'd like to install, but I am awfly intimidated. I'm hoping that someone could shed some light on kindergarten-style step-by-step i

  • Sun Cluster + RBAC

    hi, Sun Cluster 3.1 Solaris 10 11/06 I need to give rights to do scswitch -n ... scswitch -z ... scswitch -F ... to non-root users. I gonna todo it via sudo. Can someone send real examples how to do it via RBAC ? --mpech