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: 

Deleting string data is not working

Former Member
0 Kudos

Hi

I have created one temporary table and added data manuely

there is so many rows contains tmststats as 'Approved'

After executing these statement also it is not deleting.

DELETE i_output WHERE tmststats EQ u2018Approvedu2019.

the declaration of tmststats is like

tmststats(30) type c

Regards

Sebastian

1 ACCEPTED SOLUTION

rainer_hbenthal
Active Contributor
0 Kudos

whats the value of sy-subrc and sy-dbcnt after the delete?

9 REPLIES 9

rainer_hbenthal
Active Contributor
0 Kudos

whats the value of sy-subrc and sy-dbcnt after the delete?

former_member229729
Active Participant
0 Kudos

Hi,

It is not clear that, whether you want to delete record from Standard Table or Internal table.

Please clarify.

Rgds.,

RamaniN

Former Member
0 Kudos

Hi John,

ur checking with table field,

please give EQ 'APPROVED' insted of 'Approved'.

Former Member
0 Kudos

HI,

The syntax seems to be correct. check with 'APPROVED' ...it may work. Check for sy-subrc after the delete statement .

vallamuthu_madheswaran2
Active Contributor
0 Kudos

Hi,

DATA: L_DATA(20) TYPE C VALUE 'Approved'.

condense l_data.

DELETE i_output WHERE tmststats EQ l_data.

Thanks & Regards,

Vallamuthu.M

0 Kudos

I am using Internal table, I have stored data as 'Approved' not capital

if checking with upper case also it is not working

Regards

Sebastian John

0 Kudos

Thanks for everybody, its woking fine.

it is my mistake, inside the data having some mismatching.

Regards

Sebastian John

former_member222860
Active Contributor
0 Kudos

Hi,

DELETE i_output WHERE tmststats EQ u2018APPROVEDu2019.   "Check with all Caps

Former Member
0 Kudos

Hi,

Check with.

DELETE i_output WHERE tmststats EQ u2018APPROVEDu2019.

if sy-subrc = 0.

endif.

Hrere u check wgt is the vale of sy-subrc whether it is 0 or 4, if it is 0 then it will delete.

Regards