Skip to Content
author's profile photo Former Member
Former Member

To get the first and Last changer Value .

Hello Everybody,

I hav to take value from table CDPOD of the fields

VALUE_NEW and VALUE_OLD.

I WANT TO SORT CHANGENR for VAKEY AND TAKE

VALUE_OLD FOR 1ST CHANGNR AND VALUE_NEW FOR last CHANGNR

PLZ IF ANYBODY HAV THE SOLUTION,

HELP ME OUT,

TAHNX & REGARDS,

SADIK.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • Posted on Sep 04, 2006 at 01:43 AM

    Hi,

    The table name is CDPOS.

    Do a select query :

    SELECT OBJECTCLAS

    OBJECTID

    CHANGENR

    TABNAME

    TABKEY

    FNAME

    CHNGIND

    VALUE_NEW

    VALUE_OLD

    From CDPOS

    into table itab

    where <Specify your criteria here>.

    Now sort the table with VAKEY. Though i dont find any field with name VAKEY, i assume it is TABKEY.

    SORT ITAB BY CHANGENR TABKEY.

    Now get the total records using :

    Data : l_lines type i.

    DESCRIBE TABLE ITAB LINES l_lines.

    1. To get the 1st record.

    Read table itab into watab index 1.

    2. To get the last record.

    Read table itab into watab index l_lines.

    Best regards,

    Prashant

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hello sir,

      Thanks for your replay.

      Iam able to sort the CHANGENR AND TABKEY FROM TABLE CDPOS

      AND TAKE VALUES IN ITAB .

      KUMNH CHANGENR TABKEY VALUE_NEW VALUE_OLD

      0000008066 63623 900000000806601 31.00 32.00

      0000008066 63630 900000000806602 2.00 1.50

      0000008066 63630 900000000806603 1.50- 1.00-

      0000008066 63633 900000000806601 30.00 31.00

      0000008066 63643 900000000806601 25.00 30.00

      0000008066 63645 900000000806601 25.50 25.00

      0000008066 63664 900000000806604 17.50 16.50

      ABOVE IS THE SITUATION IAM FACING .

      HERE I WANT TO FETCH VALUE_OLD OF FIRST AND VALUE_NEW LAST CHANGENR CORRESPONDING TO PERTICULAR TABKEY .

      EXAMPLE: 32.00 & 25.50 FOR TABKEY 900000000806601 HERE 01 IN TABKEY REFERS TO CONDITION TYPE I.E P000.

      SAME FOR OTHER CONDITION TYPES.WE FIND THIS CONDITION TYPES FOR PERTICULAR IN KONP.

      IF ANYBODY HAS SOLUTION PLZ NEED YOUR GUIDENCE.

      THANKS & REGARDS,

      SADIK.

  • Posted on Sep 04, 2006 at 05:09 AM

    Hi Sadik,

    SORT ITAB BY KUMNH TABKEY.

    loop at itab into watab.

    loop at itab into watab1 where tabkey = watab-tabkey.

    append watab1 to itab1.

    endloop.

    delete itab where tabkey = watab1-tabkey.

    sort itab1 by kumnh tabkey.

    • Watab1 will be the 1st record

    read table itab1 into watab1 index 1.

    describe table itab1 lines l_lines.

    • Watab2 will have the last record for that tabkey

    read table itab1 into watab2index l_lines.

    wanew = watab1.

    wanew-value_new = watab2-value_new.

    append wanew to it_new.

    refresh itab1.

    clear : watab1,

    watab2,

    l_lines.

    endloop.

    Best regards,

    Prashant

    Message was edited by: Prashant Patil

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.