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

How to modify previous lines in table maintenance

Hi ,

How to modify previous lines in table maintenance...

Needed info urgently..

Scenario as follows:

matnr       pltyp               datab              datbi
m1            01            01.01.2001         31.12.9999
m1            02            02.03.2002         31.12.9999
m1            03            06.01.2003         31.12.9999
m2            20            01.01.2001         31.12.9999
m2            21            01.01.2004         31.12.9999
m2            22            01.01.2007         31.12.9999
m3            31            01.01.2002         31.12.9999
m3            32            09.01.2006         31.12.9999
 

in the above scenario.

datbi is only diplay mode , user cannot change the value for datbi.

datbi will be changed acording to the datab values for the corresponding matnr .

my required output is as follows

 matnr           pltyp               datab           datbi
m1                01           01.01.2001      01.03.2002
m1                02           02.03.2002      05.01.2003
m1                03           06.01.2003      31.12.9999
m2                20           01.01.2001      31.12.2003
m2                21           01.01.2004      31.12.2006
m2                22           01.01.2007      31.12.9999
m3                31           01.01.2002      08.01.2006
m3                32           09.01.2006      31.12.9999

regards,

Pradipta

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • Posted on Jun 09, 2006 at 01:22 PM

    Hi If it is a custome table do like this.

    selct *

    from ztab

    into table it_ztab.

    loop at it_ztab.

    lv_tabix = sy-tabix.

    lv_tabix_next = sy-tabix + 1.

    read table it_ztab index lv_tabix_next.

    if sy-subrc = 0.

    it_ztab-datbi = it_ztab-datab - 1.

    modify it_ztab index lv_tabix.

    endif.

    endloop.

    modify ztab from table it_ztab.

    Regards,

    Ravi

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jun 09, 2006 at 01:38 PM

    Hi,

    Small correction

    <b>it_ztab-datbi = it_ztab-datab.</b>

    modify it_ztab index lv_tabix.

    endif.

    endloop.

    modify ztab from table it_ztab.

    Regards,

    Amole

    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.