06-16-2008 10:02 AM
Hi...all...
Iam having one custom table... in that iam having records for 10 fields....
So now i hav to develop one report... in that selction i hav to maintain two key fields of that above table... if i give input to that two field and exucute the programmm the records in the table has to delete.. according to that in puts....
Thanks,
Naveen.I
06-16-2008 10:15 AM
hiiii
SELECTION-SCREEN BEGIN OF BLOCK a WITH FRAME TITLE text-001.
SELECT-OPTIONS s_matnr FOR mard-matnr OBLIGATORY.
SELECTION-SCREEN END OF BLOCK a.
SELECT * FROM z_mara
WHERE matnr IN s_matnr.
delete * from z_mara where matnr IN s_matnr.
reward if useful
thx
twinkal
06-16-2008 10:07 AM
hi this can be done by giving the name of the field and the field value in the loop statement..
loop at s_matnr.
r_ranges-low = s_matnr-low.
r_ranges-sign = s_matnr-sign.
r_ranges-options = s_matnr-options.
r_ranges-lhigh = s_matnr-high.
append r_ranges.
endloop.
select * from mara into table itab where matnr in s_matnr .
loop at itab .
delete matnr where matnr in r_matnr .
endloop.
06-16-2008 10:15 AM
hiiii
SELECTION-SCREEN BEGIN OF BLOCK a WITH FRAME TITLE text-001.
SELECT-OPTIONS s_matnr FOR mard-matnr OBLIGATORY.
SELECTION-SCREEN END OF BLOCK a.
SELECT * FROM z_mara
WHERE matnr IN s_matnr.
delete * from z_mara where matnr IN s_matnr.
reward if useful
thx
twinkal
06-16-2008 10:15 AM
HIiii
select * from <dbtable> into table <itab> where <field> in <select-options>
loop at <itab>.
delete from <dbtab> where <field> = <itab-field>.
endloop.
regards
chandu reddy