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

delete one perticula field data

Former Member
0 Likes
1,112

Hi All,

how to delete the perticular field data.(not complete field)

for expample:ztab is table with zno,zname are two fields

now i want to delete data for field of 'ztab-zno.

thanks,

sriii

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,057

Use the following command

If you want to Update Database table

UPDATE ZTAB SET ZNO = 0.

If you want to update internal table.

WA_ZTAB-ZNO = 0.

MODIFY ZTAB

FROM WA_ZTAB

TRANSPORTING ZNO.

Hi All,

how to delete the perticular field data.(not complete field)

for expample:ztab is table with zno,zname are two fields

now i want to delete data for field of 'ztab-zno.

thanks,

sriii

7 REPLIES 7
Read only

Former Member
0 Likes
1,057

hi,

loop at itab.

clear itab-field1.

modify itab index sy-tabix transporting field1.

endloop.

Is this you want?

Regards,

Theja

Read only

Former Member
0 Likes
1,058

Use the following command

If you want to Update Database table

UPDATE ZTAB SET ZNO = 0.

If you want to update internal table.

WA_ZTAB-ZNO = 0.

MODIFY ZTAB

FROM WA_ZTAB

TRANSPORTING ZNO.

Read only

GauthamV
Active Contributor
0 Likes
1,057

hi,

delete will remove entire record.

use modify statement for tht fields .

Read only

Former Member
0 Likes
1,057

Hello,

Try this

1.Select data into internal table it_data.

loop at it_data into wa_data.

wa_data-no = ' '.

modify it_data from wa_data index sy-tabix.

endloop.

modify db_table from table it_data.

Or

Create table maintainance generator for that.

Read only

Former Member
0 Likes
1,057

hi,

Use MODIFY statement.

ztab-<filed> = ' '.

MODIFY <tab> index sy-index.

Regards

Sumit Agarwal

Read only

former_member734916
Participant
0 Likes
1,057

First get all entries into one internal table.

Then loop at internal table and clear the field which you want to delete and modify the internal table.

The internal table type shoule be z table type.

Then use modify statement.

Regards.

Krishna Yerram.

Read only

Former Member
0 Likes
1,057

Hi Dude,

U Can Delete a particular column.

But this cannot be Done by Delete Statement.

One Way of doing this is by MODIFY Statement.

Declare WA_Ztab for the table Ztab.

set the value of this to space. 'wa_ztab-zno' = ' ' .

Modify ZTAB From WA_ztab.

Hope this helps U.