Application Development 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: 

need to delete the data from table

anil_kumar98
Participant
0 Kudos

call function 'ZCPD_POPUP_FOR_INPUT'

exporting

i_vbeln = vbap-vbeln

i_posnr = vbap-posnr

tables

t_curr = it_temp.

1)need to move from it_temp into it_currinp

it_currinp[] = it_temp[].

2) need to delete from temp where record exist in posnr and also

delete from it_currinp not exits in posnr .

Edited by: anil kumar on Jan 30, 2008 10:30 AM

1 ACCEPTED SOLUTION

Former Member
0 Kudos

HI,

loop at it_temp where posnr is not initial.

delete it_temp index sy-tabix.

endloop.

loop at it_currinp where posnr is initial.

delete it_currinp index sy-tabix.

endloop.

Cheers,

Will.

3 REPLIES 3

Former Member
0 Kudos

HI,

loop at it_temp where posnr is not initial.

delete it_temp index sy-tabix.

endloop.

loop at it_currinp where posnr is initial.

delete it_currinp index sy-tabix.

endloop.

Cheers,

Will.

Former Member
0 Kudos

Here, u r using Z FM, u have to check the code of that FM

Former Member
0 Kudos

Anil,

This is the correct way of coding.

SORT : it_temp BY posnr.

it_currinp[] = it_temp[].

DELETE it_temp WHERE POSNT NE ''.

DELETE it_currinp WHERE POSNT EQ ''.

LOOP may reduce the performance of the program.

Don't forget to reward if useful...