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: 

DELETE RECORDS IN db TABLE

former_member198275
Active Contributor
0 Kudos

i have to change entry for BSEG-HBKID in table GB01.BEXCLUDE is now X, i have to make it blank. Table maintainance is not there fot GB01. So from abap program, using DELETE statement will i be able to change that field?

5 REPLIES 5

Former Member
0 Kudos

HI Kaushik,

write the given query,

tables : GB01.

DATA: ITAB LIKE GB01 OCCURS 0 WITH HEADER LINE.

SELECT * FROM GB01 INTO TABLE ITAB WHERE ( CONDITION IF ANY ).

LOOP AT ITAB.

IF ITAB-BEXCLUDE = 'X'.

WRITE:/ ITAB-BOOLCLASS, ITAB-CLASSTYPE, ITAB-BCLTAB,

ITAB-BCLFIELD, ITAB-BEXCLUDE.

CLEAR ITAB-BEXCLUDE.

MODIFY GB01 FROM ITAB.

WRITE: ITAB-BEXCLUDE.

ENDIF.

ENDLOOP.

this will work

Former Member
0 Kudos

HI this is again me,

SELECT * FROM GB01 INTO TABLE ITAB WHERE ( CONDITION IF ANY ).

write the select query like

SELECT * FROM GB01 INTO TABLE ITAB

WHERE BCLTAB = 'BSEG'

AND BCLFIELD = 'HBKID'.

Former Member
0 Kudos

update gb01 set bseg_hbkid = ''.

(where condition statement).

Former Member
0 Kudos

HI

You can perform this by using Update statement

Regards

Pavan

former_member198275
Active Contributor
0 Kudos

THANKS