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

code

Former Member
0 Likes
407

hi ,

based on selection screen i have to retrive the data.there r 4 fields inselection screen.one is manadatory(days).

select.....

........

...

written select for the 3 fields in selection screen by using if and endif.

i didn't use any loop upto now.

now the thing is for mandatory field

we have to remove the selected rows if number of days is fall below the values from selection screen parameter.

upto now i got values in itab only.i never moved to work area. is this wa_dets-trdat giving in this code is right?

LOOP AT i_dets INTO wa_dets.

L_DAYS = SY-DATUM - WA_DETS-TRDAT.

IF L_DAYS LT p_days.

DELETE TABLE i_dets FROM wa_dets.

ENDIF.

ENDLOOP.

is this code is right i can't debug(no authorisation for me in that server) now so plz help me.

2 REPLIES 2
Read only

Former Member
0 Likes
387

Hi,

The code you pasted here will work, proceed with your remaining code ...

Regaras

Sudheer

Read only

ibrahim_u
Active Participant
0 Likes
387

if you want to delete current record it is right.

and you can replace the line

DELETE TABLE i_dets FROM wa_dets.

as

DELETE i_dets.

ibrahim