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

replace code value.

I have parameter "v_code" with single values.

and I have one internal table itab_data with

below records.

Code Bizcode GLcode date Amount.

200 001A 12345678 20050202 100

790 001A 12345678 20050202 200

200 001A 12345678 20050202 300

790 011A 12345678 20050203 300

200 011A 12345678 20050203 300

790 011A 12345678 20050203 300

if i set value 200 to parameter and exec,it should replace

all the records of code field within the internal table itab_Data itself.

200 001A 12345678 20050202 100

200 001A 12345678 20050202 200

200 001A 12345678 20050202 300

200 011A 12345678 20050203 300

200 011A 12345678 20050203 300

200 011A 12345678 20050203 300

my code wont work.? it hangs.why.

loop at itab_data.

if itab_data-bukrs <> v_code.

move v_code to itab_data-bukrs.

endif.

append itab_Data.

endloop.

ambichan.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Feb 08, 2005 at 05:38 AM

    Hi Ambichan,

    Try this one...

    loop at itab_data.
      if itab_data-bukrs ne v_code.
        itab_data-bukrs = v_code.
        modify itab.  
      endif.
    endloop.

    Regards,

    Anand Mandalika.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Feb 08, 2005 at 05:36 AM

    Hi,

    Replace APPEND itab_data with MODIFY itab_data.

    Regards

    Message was edited by: Shehryar Khan

    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.