‎2008 Feb 27 1:35 PM
Hello,
Why do i get a dump when i use modify or insert?? i do not want to use append because then i get a blank record on adding a record to my table control.
MODULE user_command_0020 INPUT.
loop at itab_line .
if itab_line-v eq 'X' .
FLAG_S = 1.
ENDIF.
ENDLOOP.
*CLEAR SY-UCOMM.
if flag_s eq 1 AND SY-UCOMM EQ 'TABLE_SCHEDULE_INSR'.
temp_index = sy-tabix.
temp_ebelp = itab_line-ebelp.
itab_schedule-ebelp = temp_ebelp.
temp_index = temp_index + 1.
append itab_schedule.
*insert itab_schedule into itab_schedule index temp_index.
*modify ITAB_SCHEDULE from itab_schedule index sy-tabix.
endif.
‎2008 Feb 27 1:56 PM
Hi
In your code when you say insert do not write index then it should work.
Note:
INSERT LINES OF <itab1> [FROM <n1>] [TO <n 2>] INTO TABLE <itab2>.
<itab1> and <itab2> are tables with a compatible line type. The system inserts the lines of table <itab1> one by one into <itab2> using the same rules as for single lines.
If <itab1> is an index table, you can specify the first and last lines of the table that you want to append in <n 1 > and <n 2 >.
Check this URL
http://help.sap.com/saphelp_47x200/helpdata/en/9f/dbac1d35c111d1829f0000e829fbfe/frameset.htm
Regards,
Lakshmikanth
‎2008 Feb 27 1:57 PM
Hi,
modify ITAB_SCHEDULE from itab_schedule index sy-tabix
transporting ebelp.
try it.
regards,
ravi shankar reddy