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: 

reports

Former Member
0 Kudos
98

I generated number of records in mara. now i think to delete it without using internal table in reports. I given the statement like this..

delete from mara where matnr = v_matnr.

but it doesnot deleted...give a solution to it.plz..

1 ACCEPTED SOLUTION

Former Member
0 Kudos
66

Hi

generally we don't delete the records from DAtabase tables directly using the DELETE statement.

The statement what you wrote is OK

why can't you use the Internal table

tables: mara.

data: s_matnr for mara-matnr.

data: itab like mara occur 0 with header line.

select * from mara into table itab where matnr in s_matnr.

delete MARA from table ITAB.

<b>Reward points for useful Answers</b>

Regards

Anji

4 REPLIES 4

Former Member
0 Kudos
66

hi,

Check the value in v_matnr.

Is it satsfying any condition..

Regards

Azad.

Former Member
0 Kudos
66

hi

<b>delete from mara where matnr = v_matnr.</b>

<b>modify mara.</b>

regarsd

ravish

<b>plz reward if useful</b>

Former Member
0 Kudos
66

Use this code.

delete mara where matnr = v_matnr.

Manoj

Former Member
0 Kudos
67

Hi

generally we don't delete the records from DAtabase tables directly using the DELETE statement.

The statement what you wrote is OK

why can't you use the Internal table

tables: mara.

data: s_matnr for mara-matnr.

data: itab like mara occur 0 with header line.

select * from mara into table itab where matnr in s_matnr.

delete MARA from table ITAB.

<b>Reward points for useful Answers</b>

Regards

Anji