02-08-2005 5:21 AM
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.
02-08-2005 5: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.
02-08-2005 5:36 AM
Hi,
Replace APPEND itab_data with MODIFY itab_data.
Regards
Message was edited by: Shehryar Khan
02-08-2005 5: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.
02-08-2005 5:44 AM
Hi,
I think this is even better:
itab_data-bukrs = v_code.
modify itab_data
from itab_data
transporting bukrs where ( bukrs ne v_bukrs ).
Regards,
Anand Mandalika.