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

need to delete the data from table

Former Member
0 Likes
729

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
Read only

Former Member
0 Likes
605

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.

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

3 REPLIES 3
Read only

Former Member
0 Likes
606

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.

Read only

Former Member
0 Likes
605

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

Read only

Former Member
0 Likes
605

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...