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

modify , copy itab.

Hi experts,

In my Internal table i have only one Record and i want copy of same record .with different salary ... like below

Example.

Name Age salary.

1) ABC 20 1000

now i want .

Name Age salary.

1) ABC 20 1000

2) ABC 20 1111.

********poiont is assured********

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

8 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Oct 19, 2007 at 07:09 AM

    then enter the same values for the other fields and different value for the salary field and append.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Oct 19, 2007 at 07:10 AM

    loop at itab into wa.

    wa-salary = 1111.

    insert wa into itab.

    end loop.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Oct 19, 2007 at 07:10 AM

    Hi,

    try like this

    loop at itab into wa.

    wa-salary = <new vlue>

    append itab from wa transporting salary.

    clear wa.

    endloop.

    Regards,

    nagaraj

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Oct 19, 2007 at 07:12 AM

    Hi Jim,

    read itab into wa.

    if sy-subrc eq 0.

    wa-salary = req value.

    append itab.

    endif.

    try this.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Oct 19, 2007 at 07:12 AM

    itab-a = abc. itab-b = 20. itab-c = 1000.

    append itab.

    itab-a = abc. itab-b = 20. itab-c = 2000.

    append itab.

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Oct 19, 2007 at 07:15 AM

    Hi..

    try this way....

    Read itab into wa WITH KEY Name = 'ABC' Age = '20'.

    if sy-subrc eq 0.

    wa-salary = '1111'.

    Append wa to itab.

    endif.

    REWARD IF HELPFUL.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Oct 19, 2007 at 07:46 AM

    hi,

    just do like this.

    read table itab of your row to be change into wa then

    wa-salary = <your salary value>.

    append wa to itab

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Oct 22, 2007 at 09:10 AM

    thanks to all,

    Point has been given

    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.