Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

modify insert dump

Former Member
0 Likes
404

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.

2 REPLIES 2
Read only

Former Member
0 Likes
370

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

Read only

Former Member
0 Likes
370

Hi,

modify ITAB_SCHEDULE from itab_schedule index sy-tabix

transporting ebelp.

try it.

regards,

ravi shankar reddy